summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-05-02 10:19:37 -0700
committerunknown <jimw@mysql.com>2005-05-02 10:19:37 -0700
commit41e7a9709db166842e11d00dd15eb8d1762d3285 (patch)
tree64d81ff9452ecfafb3894ee63c2acd7ccf96ce64 /extra
parentd41aa2976ed430dce3fa9ebff84c8bdddbbb967a (diff)
parent9f5a4955d0ccfd27f5338c04e17e5fabd3840616 (diff)
downloadmariadb-git-41e7a9709db166842e11d00dd15eb8d1762d3285.tar.gz
Clean up merge from 4.1
configure.in: Auto merged extra/my_print_defaults.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/lowercase_table.result: Auto merged mysql-test/r/query_cache.result: Mege results mysql-test/t/lowercase_table.test: Merge tests mysql-test/t/query_cache.test: Merge tests mysys/default.c: Merge from 4.1 sql/sql_cache.cc: Merge sql/sql_parse.cc: Merge from 4.1 sql/sql_table.cc: Merge tests/mysql_client_test.c: Merge
Diffstat (limited to 'extra')
-rw-r--r--extra/my_print_defaults.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index d5836cb0dc8..c0461fd0368 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -27,12 +27,20 @@
const char *config_file="my"; /* Default config file */
uint verbose= 0, opt_defaults_file_used= 0;
+const char *default_dbug_option="d:t:o,/tmp/my_print_defaults.trace";
static struct my_option my_long_options[] =
{
{"config-file", 'c', "The config file to be used.",
(gptr*) &config_file, (gptr*) &config_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
+#ifdef DBUG_OFF
+ {"debug", '#', "This is a non-debug version. Catch this and exit",
+ 0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
+#else
+ {"debug", '#', "Output debug log", (gptr*) &default_dbug_option,
+ (gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
+#endif
{"defaults-file", 'c', "Synonym for --config-file.",
(gptr*) &config_file, (gptr*) &config_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
@@ -95,6 +103,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case 'V':
usage(1);
exit(0);
+ case '#':
+ DBUG_PUSH(argument ? argument : default_dbug_option);
+ break;
}
return 0;
}
@@ -118,7 +129,7 @@ static int get_options(int *argc,char ***argv)
int main(int argc, char **argv)
{
int count, error;
- char **load_default_groups, *tmp_arguments[2],
+ char **load_default_groups, *tmp_arguments[3],
**argument, **arguments;
char *defaults, *extra_defaults;
MY_INIT(argv[0]);