summaryrefslogtreecommitdiff
path: root/client/mysqlimport.c
diff options
context:
space:
mode:
authorunknown <monty@nosik.monty.fi>2007-08-02 07:55:33 +0300
committerunknown <monty@nosik.monty.fi>2007-08-02 07:55:33 +0300
commit926664fe2c802bd7ffc6d9a6b56372ba2e142b23 (patch)
tree5c544cc45c47bbd06c8b4d216aab02fe9307f8de /client/mysqlimport.c
parentccada6ff956e2fed0347051890445049ec9ed8df (diff)
parentf9ea427508fa5451bd22c0d6366a855a4d88800d (diff)
downloadmariadb-git-926664fe2c802bd7ffc6d9a6b56372ba2e142b23.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/my/mysql-5.1 client/client_priv.h: Auto merged client/mysqldump.c: Auto merged client/mysqlslap.c: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/lib/mtr_report.pl: Auto merged mysql-test/t/disabled.def: Auto merged sql/event_data_objects.cc: Auto merged sql/event_queue.cc: Auto merged sql/ha_partition.cc: Auto merged sql/lock.cc: Auto merged sql/log.cc: Auto merged sql/log.h: Auto merged sql/mysql_priv.h: Auto merged sql/set_var.cc: Auto merged sql/slave.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_plugin.cc: Auto merged sql/sql_select.cc: Auto merged sql-common/client.c: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_cache.cc: Manual merge Removed comment about bug in old code (not relevant)
Diffstat (limited to 'client/mysqlimport.c')
-rw-r--r--client/mysqlimport.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 396063731cf..afd9454d6be 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -24,7 +24,7 @@
** * *
** *************************
*/
-#define IMPORT_VERSION "3.6"
+#define IMPORT_VERSION "3.7"
#include "client_priv.h"
#include "mysql_version.h"
@@ -49,8 +49,8 @@ static char *add_load_option(char *ptr,const char *object,
static my_bool verbose=0,lock_tables=0,ignore_errors=0,opt_delete=0,
replace=0,silent=0,ignore=0,opt_compress=0,
opt_low_priority= 0, tty_password= 0;
-static my_bool info_flag= 0;
-static uint opt_use_threads=0, opt_local_file=0;
+static my_bool debug_info_flag= 0, debug_check_flag= 0;
+static uint opt_use_threads=0, opt_local_file=0, my_end_arg= 0;
static char *opt_password=0, *current_user=0,
*current_host=0, *current_db=0, *fields_terminated=0,
*lines_terminated=0, *enclosed=0, *opt_enclosed=0,
@@ -87,8 +87,12 @@ static struct my_option my_long_options[] =
0, 0, 0},
{"debug",'#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0,
GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
- {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (uchar**) &info_flag,
- (uchar**) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
+ (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.",
+ (uchar**) &debug_info_flag, (uchar**) &debug_info_flag,
+ 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"delete", 'd', "First delete all rows from table.", (uchar**) &opt_delete,
(uchar**) &opt_delete, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"fields-terminated-by", OPT_FTB,
@@ -236,6 +240,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case '#':
DBUG_PUSH(argument ? argument : "d:t:o");
+ debug_check_flag= 1;
break;
#include <sslopt-case.h>
case 'V': print_version(); exit(0);
@@ -254,6 +259,10 @@ static int get_options(int *argc, char ***argv)
if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option)))
exit(ho_error);
+ if (debug_info_flag)
+ my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
+ if (debug_check_flag)
+ my_end_arg= MY_CHECK_ERROR;
if (enclosed && opt_enclosed)
{
@@ -659,6 +668,6 @@ int main(int argc, char **argv)
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
#endif
free_defaults(argv_to_free);
- my_end(info_flag ? MY_CHECK_ERROR : 0);
+ my_end(my_end_arg);
return(exitcode);
}