From 68e58bc10c15872e65bc84d42039fd7dcbee7a16 Mon Sep 17 00:00:00 2001 From: prabatuty Date: Mon, 26 Oct 2009 13:57:33 +0000 Subject: [PATCH] removing repltable tool --- src/tools/Makefile.am.full | 10 +----- src/tools/repltable.cxx | 78 ---------------------------------------------- 2 files changed, 1 insertion(+), 87 deletions(-) delete mode 100644 src/tools/repltable.cxx diff --git a/src/tools/Makefile.am.full b/src/tools/Makefile.am.full index 6552c340..f3c55592 100644 --- a/src/tools/Makefile.am.full +++ b/src/tools/Makefile.am.full @@ -1,6 +1,6 @@ INCLUDES = -I$(top_srcdir)/include $(all_includes) -I$(top_srcdir)/src/sql METASOURCES = AUTO -bin_PROGRAMS = csql catalog cachetable csqlserver csqlreplserver csqlsqlserver repltable csqlcacheserver csqldump cacheverify +bin_PROGRAMS = csql catalog cachetable csqlserver csqlreplserver csqlsqlserver csqlcacheserver csqldump cacheverify csql_SOURCES = isql.cxx csql_LDADD = $(top_builddir)/src/storage/.libs/libcsql $(top_builddir)/src/sql/.libs/libcsqlsql $(top_builddir)/src/sqllog/.libs/libcsqlsqllog $(top_builddir)/src/network/.libs/libcsqlnw $(top_builddir)/src/adapter/.libs/libcsqlodbcadapter $(top_builddir)/src/gateway/.libs/libcsqlgw $(top_builddir)/src/cache/.libs/libcacheload $(top_builddir)/src/sqlnetwork/.libs/libcsqlsqlnw -lrt -lpthread -lcrypt -lodbc -lreadline @@ -25,14 +25,6 @@ cacheverify_LDADD = $(top_builddir)/src/sql/libcsqlsql.la \ cacheverify_LDFLAGS = -lcrypt -lodbc cacheverify_SOURCES = cacheverify.cxx -repltable_LDADD = $(top_builddir)/src/cache/libcacheload.la \ - $(top_builddir)/src/storage/libcsql.la \ - $(top_builddir)/src/adapter/libcsqlodbcadapter.la \ - $(top_builddir)/src/cache/libcacheload.la \ - $(top_builddir)/src/gateway/libcsqlgw.la -repltable_LDFLAGS = -lcrypt -lodbc -repltable_SOURCES = repltable.cxx - csqlserver_LDADD = $(top_builddir)/src/cache/libcacheload.la \ $(top_builddir)/src/storage/libcsql.la \ $(top_builddir)/src/cache/libcacheload.la \ diff --git a/src/tools/repltable.cxx b/src/tools/repltable.cxx deleted file mode 100644 index d4bc574c..00000000 --- a/src/tools/repltable.cxx +++ /dev/null @@ -1,78 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by www.databasecache.com * - * Contact: praba_tuty@databasecache.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - ***************************************************************************/ -#include -#include - -void printUsage() -{ - printf("Usage: repltable [-U username] [-P passwd] -t tablename \n" - " [-m TSYNC|ASYNC>][-u] [-r] \n"); - printf(" username -> username to connect with csql.\n"); - printf(" passwd -> password for the above username to connect with csql.\n"); - printf(" tablename -> table name to be replicated in csql with peers.\n"); - printf(" u -> unreplicate the table\n"); - printf(" r -> replicate and load all the records from peer site\n"); - printf(" m -> replication mode for the table\n"); - printf(" -> Modes could be one of TSYNC|ASYNC\n"); - printf(" no option -> replicates with default mode ASYNC\n"); - printf(" Note:Table should not have any records for this command to succeed\n"); - return; -} - -int main(int argc, char **argv) -{ - char username[IDENTIFIER_LENGTH]; - username [0] = '\0'; - char password[IDENTIFIER_LENGTH]; - password [0] = '\0'; - int c = 0, opt = 10; - char tablename[IDENTIFIER_LENGTH]; - char syncModeStr[IDENTIFIER_LENGTH]; - bool tableNameSpecified = false; - while ((c = getopt(argc, argv, "U:P:t:l:m:u?")) != EOF) - { - switch (c) - { - case 'U' : { strcpy(username, argv[optind - 1]); opt=10; break; } - case 'P' : { strcpy(password, argv[optind - 1]); opt=10; break; } - case 't' : { strcpy(tablename, argv[optind - 1]); - if (opt==10) opt = 2; - tableNameSpecified = true; - break; - } - case '?' : { opt = 10; break; } //print help - case 'r' : { opt = 4; break; } //replicate the table - case 'u' : { opt = 5; break; } //unreplicate the table - default: opt=10; - - } - }//while options - if (opt == 10) { - printUsage(); - return 0; - } - - //printf("%s %s \n", username, password); - if (username[0] == '\0' ) - { - strcpy(username, "root"); - strcpy(password, "manager"); - } - DbRetVal rv = OK; - if (opt==2) { - } - return 0; -} -- 2.11.4.GIT