2010-02-25 01:29:32 +00:00
|
|
|
/*
|
|
|
|
* drop_database.cpp
|
|
|
|
*
|
|
|
|
* Created on: Feb 23, 2010
|
|
|
|
* Author: sears
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "../tcpclient.h"
|
|
|
|
#include "../network.h"
|
|
|
|
#include "../datatuple.h"
|
|
|
|
void usage(char * argv[]) {
|
|
|
|
fprintf(stderr, "usage %s [host [port]]\n", argv[0]);
|
|
|
|
}
|
2010-03-01 21:26:07 +00:00
|
|
|
#include "util_main.h"
|
2010-02-25 01:29:32 +00:00
|
|
|
int main(int argc, char * argv[]) {
|
2010-03-01 21:26:07 +00:00
|
|
|
logstore_handle_t * l = util_open_conn(argc, argv);
|
2010-02-25 01:29:32 +00:00
|
|
|
|
2012-02-23 01:11:55 +00:00
|
|
|
dataTuple * ret = logstore_client_op(l, OP_DBG_DROP_DATABASE);
|
2010-02-25 01:29:32 +00:00
|
|
|
if(ret == NULL) {
|
2010-03-01 21:26:07 +00:00
|
|
|
perror("Drop database failed"); return 3;
|
|
|
|
} else {
|
2012-02-23 01:11:55 +00:00
|
|
|
dataTuple::freetuple(ret);
|
2010-02-25 01:29:32 +00:00
|
|
|
}
|
|
|
|
logstore_client_close(l);
|
2010-03-01 21:26:07 +00:00
|
|
|
printf("Drop database succeeded\n");
|
2010-02-25 01:29:32 +00:00
|
|
|
return 0;
|
2010-03-01 21:26:07 +00:00
|
|
|
|
2010-02-25 01:29:32 +00:00
|
|
|
}
|
2010-03-01 21:26:07 +00:00
|
|
|
|