Changeset: 56fb90c410f8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=56fb90c410f8
Modified Files:
clients/mapiclient/Tests/mclient--help.stable.err
clients/mapiclient/Tests/stethoscope--help.stable.err
clients/mapiclient/mclient.1
clients/mapiclient/mclient.c
clients/mapiclient/msqldump.c
clients/mapiclient/stethoscope.c
clients/mapiclient/tomograph.c
monetdb5/mal/Tests/run
monetdb5/modules/mal/mdb.c
monetdb5/tools/Tests/mserver5--help.stable.err
testing/Mtest.py.in
testing/README
testing/process.py
tools/mserver/mserver5.1
tools/mserver/mserver5.c
Branch: default
Log Message:
Merge with Feb2013 branch.
diffs (truncated from 346 to 300 lines):
diff --git a/clients/mapiclient/Tests/mclient--help.stable.err
b/clients/mapiclient/Tests/mclient--help.stable.err
--- a/clients/mapiclient/Tests/mclient--help.stable.err
+++ b/clients/mapiclient/Tests/mclient--help.stable.err
@@ -28,6 +28,7 @@ Options are:
-X | --Xdebug trace mapi network interaction
-z | --timezone do not tell server our timezone
-| cmd | --pager=cmd for pagination
+ -v | --version show version information and exit
-? | --help show this usage message
SQL specific opions
diff --git a/clients/mapiclient/Tests/stethoscope--help.stable.err
b/clients/mapiclient/Tests/stethoscope--help.stable.err
--- a/clients/mapiclient/Tests/stethoscope--help.stable.err
+++ b/clients/mapiclient/Tests/stethoscope--help.stable.err
@@ -16,6 +16,7 @@ stethoscope [options] +[trace options] {
-P | --password=<password>
-p | --port=<portnr>
-h | --host=<hostname>
+ -? | --help
The trace options (default 'ISTest'):
S = monitor start of instruction profiling
diff --git a/clients/mapiclient/mclient.1 b/clients/mapiclient/mclient.1
--- a/clients/mapiclient/mclient.1
+++ b/clients/mapiclient/mclient.1
@@ -86,6 +86,9 @@ General Options
\fB\-\-help\fP (\fB\-?\fP)
Print usage information and exit.
.TP
+\fB\-\-version\fP (\fB\-v\fP)
+Print version information and exit.
+.TP
\fB\-\-encoding=\fP\fIencoding\fP (\fB\-E\fP \fIencoding\fP)
Specify the character encoding of the input. The option applies to
both the standard input of
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -2613,6 +2613,7 @@ usage(const char *prog, int xit)
#ifdef HAVE_POPEN
fprintf(stderr, " -| cmd | --pager=cmd for pagination\n");
#endif
+ fprintf(stderr, " -v | --version show version
information and exit\n");
fprintf(stderr, " -? | --help show this usage
message\n");
fprintf(stderr, "\nSQL specific opions \n");
diff --git a/clients/mapiclient/msqldump.c b/clients/mapiclient/msqldump.c
--- a/clients/mapiclient/msqldump.c
+++ b/clients/mapiclient/msqldump.c
@@ -104,7 +104,7 @@ main(int argc, char **argv)
{"functions", 0, 0, 'f'},
{"table", 1, 0, 't'},
{"inserts", 0, 0, 'N'},
- {"Xdebug", 2, 0, 'X'},
+ {"Xdebug", 0, 0, 'X'},
{"user", 1, 0, 'u'},
{"quiet", 0, 0, 'q'},
{"help", 0, 0, '?'},
@@ -172,7 +172,7 @@ main(int argc, char **argv)
mnstr_destroy(config);
}
- while ((c = getopt_long(argc, argv, "h:p:d:Dft:NX::u:q?", long_options,
NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "h:p:d:Dft:NXu:q?", long_options,
NULL)) != -1) {
switch (c) {
case 'u':
user = optarg;
diff --git a/clients/mapiclient/stethoscope.c b/clients/mapiclient/stethoscope.c
--- a/clients/mapiclient/stethoscope.c
+++ b/clients/mapiclient/stethoscope.c
@@ -119,6 +119,7 @@ usage(void)
fprintf(stderr, " -P | --password=<password>\n");
fprintf(stderr, " -p | --port=<portnr>\n");
fprintf(stderr, " -h | --host=<hostname>\n");
+ fprintf(stderr, " -? | --help\n");
fprintf(stderr, "\n");
fprintf(stderr, "The trace options (default '%s'):\n",COUNTERSDEFAULT);
fprintf(stderr, " S = monitor start of instruction profiling\n");
@@ -396,9 +397,14 @@ main(int argc, char **argv)
host = optarg;
break;
case '?':
+ usage();
+ /* a bit of a hack: look at the option that the
+ current `c' is based on and see if we recognize
+ it: if -? or --help, exit with 0, else with -1 */
+ exit(strcmp(argv[optind - 1], "-?") == 0 ||
strcmp(argv[optind - 1], "--help") == 0 ? 0 : -1);
default:
usage();
- exit(0);
+ exit(-1);
}
}
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -1524,7 +1524,7 @@ main(int argc, char **argv)
while (1) {
int option_index = 0;
- int c = getopt_long(argc, argv, "d:u:P:p:h:?:T:t:r:o:D:b:B:s:m",
+ int c = getopt_long(argc, argv, "d:u:P:p:h:?T:t:r:o:Db:B:s:m",
long_options, &option_index);
if (c == -1)
break;
diff --git a/monetdb5/mal/Tests/run b/monetdb5/mal/Tests/run
--- a/monetdb5/mal/Tests/run
+++ b/monetdb5/mal/Tests/run
@@ -3,8 +3,8 @@
#DBFARM=$PWD/dbfarm
DBFARM=/ufs/mk/monet5/Linux/var/MonetDB/dbfarm
DBNAME=test
-#MSERVER="Mtimeout -timeout 123 mserver --dbfarm=$DBFARM --dbname=$DBNAME -c
All.conf --set monet_prompt= --trace"
-MSERVER="valgrind --leak-check=full --show-reachable=yes --num-callers=20
mserver5 --dbfarm=$DBFARM --dbname=$DBNAME --set monet_prompt= --trace"
+#MSERVER="Mtimeout -timeout 123 mserver --dbfarm=$DBFARM --dbname=$DBNAME -c
All.conf --set monet_prompt="
+MSERVER="valgrind --leak-check=full --show-reachable=yes --num-callers=20
mserver5 --dbfarm=$DBFARM --dbname=$DBNAME --set monet_prompt="
echo "Initialize database"
rm -rf $DBFARM/$DBNAME
diff --git a/monetdb5/modules/mal/mdb.c b/monetdb5/modules/mal/mdb.c
--- a/monetdb5/modules/mal/mdb.c
+++ b/monetdb5/modules/mal/mdb.c
@@ -219,8 +219,10 @@ MDBsetDebugStr(int *ret, str *flg)
GDKdebug |= GRPalgorithms;
if( strcmp("performance",*flg)==0)
GDKdebug |= GRPperformance;
+#if 0
if( strcmp("xproperties",*flg)==0)
GDKdebug |= GRPxproperties;
+#endif
if( strcmp("forcemito",*flg)==0)
GDKdebug |= GRPforcemito;
return MAL_SUCCEED;
diff --git a/monetdb5/tools/Tests/mserver5--help.stable.err
b/monetdb5/tools/Tests/mserver5--help.stable.err
--- a/monetdb5/tools/Tests/mserver5--help.stable.err
+++ b/monetdb5/tools/Tests/mserver5--help.stable.err
@@ -29,7 +29,6 @@ The debug, testing & trace options:
--transactions
--modules
--algorithms
- --xproperties
--performance
--optimizers
--forcemito
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3641,7 +3641,7 @@ def main(argv) :
if THISFILE == "Mtest.py":
exe = {}
exe['Mtimeout'] = CheckExec('Mtimeout') , 'Mtimeout -timeout
%d ' % par['TIMEOUT']
- exe['Mserver'] = CheckExec('mserver5') , '%s mserver5 %s
--debug=%s --set gdk_nr_threads=%s %s --set mapi_open=true --set mapi_port=%s
--set monet_prompt= --trace --forcemito --set mal_listing=2 %s' % \
+ exe['Mserver'] = CheckExec('mserver5') , '%s mserver5 %s
--debug=%s --set gdk_nr_threads=%s %s --set mapi_open=true --set mapi_port=%s
--set monet_prompt= --forcemito --set mal_listing=2 %s' % \
(env['setDBG'],
config, env['GDK_DEBUG'], env['GDK_NR_THREADS'], env['setMONETDB_MOD_PATH'],
env['MAPIPORT'], env['MSERVER_SET'])
exe['Mdiff'] = CheckExec('Mdiff') , 'Mdiff'
exe['python'] = CheckExec(sys.executable) , sys.executable
diff --git a/testing/README b/testing/README
--- a/testing/README
+++ b/testing/README
@@ -208,10 +208,10 @@ http://monetdb.cwi.nl/Development/TestWe
SYSTVER `uname``uname -r`
MTIMEOUT "Mtimeout -timeout $TIMEOUT"
MDIFF "$MTIMEOUT Mdiff"
- MSERVER "$MTIMEOUT mserver5 --config=$MONETDB_CONF
--debug=$GDK_DEBUG $setMONETDB_MOD_PATH $setGDK_DBFARM --set
mapi_port=$MAPIPORT --set monet_prompt= --trace"
+ MSERVER "$MTIMEOUT mserver5 --config=$MONETDB_CONF
--debug=$GDK_DEBUG $setMONETDB_MOD_PATH $setGDK_DBFARM --set
mapi_port=$MAPIPORT --set monet_prompt="
MAL_CLIENT "$MTIMEOUT $MALCLIENT --config=$MONETDB_CONF
--host=$HOST --port=$MAPIPORT"
- SQL_CLIENT "$MTIMEOUT $SQLCLIENT -u monetdb -P monetdb
--host=$HOST --port=$MAPIPORT --trace"
- SQL_DUMP "$MTIMEOUT $SQLDUMP -u monetdb -P monetdb --host=$HOST
--port=$MAPIPORT --trace"
+ SQL_CLIENT "$MTIMEOUT $SQLCLIENT -u monetdb -P monetdb
--host=$HOST --port=$MAPIPORT"
+ SQL_DUMP "$MTIMEOUT $SQLDUMP -u monetdb -P monetdb --host=$HOST
--port=$MAPIPORT"
MAPIPORT the MAPI port (random number between 30000 and 39999)
TST name of the current test
TSTDB name of default test database, unique for each directory
diff --git a/testing/process.py b/testing/process.py
--- a/testing/process.py
+++ b/testing/process.py
@@ -320,8 +320,7 @@ def server(args = [], stdin = None, stdo
cmd = ['mserver5',
'--set', 'mapi_open=true',
'--set', 'gdk_nr_threads=1',
- '--set', 'monet_prompt=',
- '--trace']
+ '--set', 'monet_prompt=']
if notrace and '--trace' in cmd:
cmd.remove('--trace')
if dbinit is not None:
diff --git a/tools/mserver/mserver5.1 b/tools/mserver/mserver5.1
--- a/tools/mserver/mserver5.1
+++ b/tools/mserver/mserver5.1
@@ -112,7 +112,7 @@ integer, which value can be (a combinati
for debugging (GDK developers, only)
134217728 = OPTMASK = trace the actions, decisions and
effects of MAL optimizers
- 268435456 = HEAPMASK = trace/debug HEAPextend;
+ 268435456 = HEAPMASK = trace/debug HEAPextend;
used only for development & debugging
536870912 = FORCEMITOMASK = forcefully activate mitosis even on
small tables, i.e., split small tables
@@ -130,14 +130,15 @@ integer, which value can be (a combinati
Note that mserver5 recognizes a series of command line options that sets
one or more of these debug flags as well:
.EX
- --threads (1 | PARMASK)
- --memory (MEMMASK)
+ --threads (THRDMASK | PARMASK)
+ --memory (MEMMASK | ALLOCMASK)
--properties (CHECKMASK | PROPMASK | BATMASK)
--io (IOMASK | PERFMASK)
+ --heaps (HEAPMASK)
--transactions (TMMASK | DELTAMASK | TEMMASK)
- --modules (DLMASK | LOADMASK)
+ --modules (LOADMASK)
--algorithms (ALGOMASK | ESTIMASK)
- --xproperties (XPROPMASK )
+.\" --xproperties (XPROPMASK )
--performance (JOINPROPMASK | DEADBEEFMASK)
--optimizers (OPTMASK)
--forcemito (FORCEMITOMASK)
diff --git a/tools/mserver/mserver5.c b/tools/mserver/mserver5.c
--- a/tools/mserver/mserver5.c
+++ b/tools/mserver/mserver5.c
@@ -76,11 +76,11 @@ mserver_abort()
}
#endif
-static void usage(char *prog)
+static void usage(char *prog, int xit)
__attribute__((__noreturn__));
static void
-usage(char *prog)
+usage(char *prog, int xit)
{
fprintf(stderr, "Usage: %s [options] [scripts]\n", prog);
fprintf(stderr, " --dbpath=<directory> Specify database
location\n");
@@ -102,13 +102,15 @@ usage(char *prog)
fprintf(stderr, " --transactions\n");
fprintf(stderr, " --modules\n");
fprintf(stderr, " --algorithms\n");
+#if 0
fprintf(stderr, " --xproperties\n");
+#endif
fprintf(stderr, " --performance\n");
fprintf(stderr, " --optimizers\n");
fprintf(stderr, " --forcemito\n");
fprintf(stderr, " --debug=<bitmask>\n");
- exit(0);
+ exit(xit);
}
static void
@@ -218,22 +220,23 @@ main(int argc, char **av)
{ "dbinit", 1, 0, 0 },
{ "daemon", 1, 0, 0 },
{ "debug", 2, 0, 'd' },
- { "help", 0, 0, 'h' },
+ { "help", 0, 0, '?' },
{ "version", 0, 0, 0 },
{ "readonly", 0, 0, 'r' },
{ "single-user", 0, 0, 0 },
{ "set", 1, 0, 's' },
- { "trace", 0, 0, 't' },
{ "threads", 0, 0, 0 },
{ "memory", 0, 0, 0 },
{ "properties", 0, 0, 0 },
{ "io", 0, 0, 0 },
- { "transaction", 0, 0, 0 },
+ { "transactions", 0, 0, 0 },
{ "modules", 0, 0, 0 },
{ "algorithms", 0, 0, 0 },
{ "optimizers", 0, 0, 0 },
{ "performance", 0, 0, 0 },
+#if 0
{ "xproperties", 0, 0, 0 },
+#endif
{ "forcemito", 0, 0, 0 },
{ "heaps", 0, 0, 0 },
{ 0, 0, 0, 0 }
@@ -275,12 +278,12 @@ main(int argc, char **av)
binpath = get_bin_path();
if (!(setlen = mo_builtin_settings(&set)))
- usage(prog);
+ usage(prog, -1);
for (;;) {
int option_index = 0;
- int c = getopt_long(argc, av, "c:d::t:rh?s:m:i:a:e:x:h",
+ int c = getopt_long(argc, av, "c:d::rs:?",
long_options, &option_index);
if (c == -1)
@@ -326,10 +329,12 @@ main(int argc, char **av)
grpdebug |= GRPoptimizers;
break;
}
+#if 0
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list