summaryrefslogtreecommitdiff
path: root/client
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
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')
-rw-r--r--client/client_priv.h4
-rw-r--r--client/mysql.cc23
-rw-r--r--client/mysql_upgrade.c34
-rw-r--r--client/mysqladmin.cc23
-rw-r--r--client/mysqlbinlog.cc23
-rw-r--r--client/mysqlcheck.c22
-rw-r--r--client/mysqldump.c77
-rw-r--r--client/mysqlimport.c21
-rw-r--r--client/mysqlshow.c21
-rw-r--r--client/mysqlslap.c23
-rw-r--r--client/mysqltest.c41
11 files changed, 224 insertions, 88 deletions
diff --git a/client/client_priv.h b/client/client_priv.h
index 8bc8ef692de..97ff44b67fc 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -79,6 +79,6 @@ enum options_client
OPT_SLAP_DETACH,
OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID,
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
- OPT_DEBUG_INFO, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE, OPT_WRITE_BINLOG,
- OPT_MAX_CLIENT_OPTION
+ OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
+ OPT_WRITE_BINLOG, OPT_MAX_CLIENT_OPTION
};
diff --git a/client/mysql.cc b/client/mysql.cc
index fe057c8b8a4..c0423e0c897 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -43,7 +43,7 @@
#include <locale.h>
#endif
-const char *VER= "14.13";
+const char *VER= "14.14";
/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH 1024
@@ -129,7 +129,7 @@ enum enum_info_type { INFO_INFO,INFO_ERROR,INFO_RESULT};
typedef enum enum_info_type INFO_TYPE;
static MYSQL mysql; /* The connection */
-static my_bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0,
+static my_bool ignore_errors=0,wait_flag=0,quick=0,
connected=0,opt_raw_data=0,unbuffered=0,output_tables=0,
opt_rehash=1,skip_updates=0,safe_updates=0,one_database=0,
opt_compress=0, using_opt_local_infile=0,
@@ -139,9 +139,11 @@ static my_bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0,
default_charset_used= 0, opt_secure_auth= 0,
default_pager_set= 0, opt_sigint_ignore= 0,
show_warnings= 0, executing_query= 0, interrupted_query= 0;
+static my_bool debug_info_flag, debug_check_flag;
static my_bool column_types_flag;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
+static uint my_end_arg;
static char * opt_mysql_unix_port=0;
static int connect_flag=CLIENT_INTERACTIVE;
static char *current_host,*current_db,*current_user=0,*opt_password=0,
@@ -541,7 +543,7 @@ sig_handler mysql_end(int sig)
my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR));
mysql_server_end();
free_defaults(defaults_argv);
- my_end(info_flag ? MY_CHECK_ERROR : 0);
+ my_end(my_end_arg);
exit(status.exit_status);
}
@@ -611,8 +613,11 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"debug-info", 'T', "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", 'T', "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},
{"database", 'D', "Database to use.", (uchar**) &current_db,
(uchar**) &current_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"default-character-set", OPT_DEFAULT_CHARSET,
@@ -927,7 +932,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
- info_flag= 1;
+ debug_info_flag= 1;
break;
case 's':
if (argument == disabled_my_option)
@@ -1021,6 +1026,10 @@ static int get_options(int argc, char **argv)
}
if (tty_password)
opt_password= get_tty_password(NullS);
+ if (debug_info_flag)
+ my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
+ if (debug_check_flag)
+ my_end_arg= MY_CHECK_ERROR;
return(0);
}
@@ -3288,7 +3297,7 @@ sql_real_connect(char *host,char *database,char *user,char *password,
}
connected=1;
#ifndef EMBEDDED_LIBRARY
- mysql.reconnect=info_flag ? 1 : 0; // We want to know if this happens
+ mysql.reconnect= debug_info_flag; // We want to know if this happens
#else
mysql.reconnect= 1;
#endif
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 504b4c95a8b..5da0235c913 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -17,6 +17,8 @@
#include <sslopt-vars.h>
#include "../scripts/mysql_fix_privilege_tables_sql.c"
+#define VER "1.1"
+
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
@@ -32,7 +34,8 @@
static char mysql_path[FN_REFLEN];
static char mysqlcheck_path[FN_REFLEN];
-static my_bool opt_force, opt_verbose;
+static my_bool opt_force, opt_verbose, debug_info_flag, debug_check_flag;
+static uint my_end_arg= 0;
static char *opt_user= (char*)"root";
static DYNAMIC_STRING ds_args;
@@ -56,6 +59,11 @@ static struct my_option my_long_options[]=
NO_ARG, 0, 0, 0, 0, 0, 0},
{"basedir", 'b', "Not used by mysql_upgrade. Only for backward compatibilty",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"character-sets-dir", OPT_CHARSETS_DIR,
+ "Directory where character sets are.", 0,
+ 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
+ (uchar**)&not_used, (uchar**)&not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"datadir", 'd',
"Not used by mysql_upgrade. Only for backward compatibilty",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -66,14 +74,14 @@ static struct my_option my_long_options[]=
{"debug", '#', "Output debug log", (uchar* *) & default_dbug_option,
(uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"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", 'T', "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},
{"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", 0,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"character-sets-dir", OPT_CHARSETS_DIR,
- "Directory where character sets are.", 0,
- 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
- (uchar**)&not_used, (uchar**)&not_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
"has already been executed for the current version of MySQL.",
(uchar**)&opt_force, (uchar**)&opt_force, 0,
@@ -138,7 +146,7 @@ static void die(const char *fmt, ...)
va_end(args);
free_used_memory();
- my_end(MY_CHECK_ERROR);
+ my_end(my_end_arg);
exit(1);
}
@@ -200,8 +208,9 @@ get_one_option(int optid, const struct my_option *opt,
switch (optid) {
case '?':
- printf("MySQL utility for upgrading database to MySQL version %s\n",
- MYSQL_SERVER_VERSION);
+ printf("%s Ver %s Distrib %s, for %s (%s)\n",
+ my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
+ puts("MySQL utility for upgrading databases to new MySQL versions\n");
my_print_help(my_long_options);
exit(0);
break;
@@ -209,6 +218,7 @@ get_one_option(int optid, const struct my_option *opt,
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
add_option= FALSE;
+ debug_check_flag= 1;
break;
case 'p':
@@ -732,6 +742,10 @@ int main(int argc, char **argv)
if (handle_options(&argc, &argv, my_long_options, get_one_option))
die(NULL);
+ if (debug_info_flag)
+ my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
+ if (debug_check_flag)
+ my_end_arg= MY_CHECK_ERROR;
if (tty_password)
{
@@ -780,7 +794,7 @@ int main(int argc, char **argv)
create_mysql_upgrade_info_file();
free_used_memory();
- my_end(MY_CHECK_ERROR);
+ my_end(my_end_arg);
exit(0);
}
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index f6ff44c7d56..ce48ad03d33 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -40,9 +40,10 @@ ulonglong last_values[MAX_MYSQL_VAR];
static int interval=0;
static my_bool option_force=0,interrupted=0,new_line=0,
opt_compress=0, opt_relative=0, opt_verbose=0, opt_vertical=0,
- tty_password= 0, info_flag= 0, opt_nobeep;
-static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations,
- opt_count_iterations= 0;
+ tty_password= 0, opt_nobeep;
+static my_bool debug_info_flag= 0, debug_check_flag= 0;
+static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations;
+static uint opt_count_iterations= 0, my_end_arg;
static ulong opt_connect_timeout, opt_shutdown_timeout;
static char * unix_port=0;
#ifdef LATER_HAVE_NDBCLUSTER_DB
@@ -134,10 +135,16 @@ static struct my_option my_long_options[] =
"Number of iterations to make. This works with -i (--sleep) only.",
(uchar**) &nr_iterations, (uchar**) &nr_iterations, 0, GET_UINT,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+#ifndef DBUG_OFF
{"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},
+#endif
+ {"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},
{"force", 'f',
"Don't ask for confirmation on drop database; with multiple commands, continue even if an error occurs.",
(uchar**) &option_force, (uchar**) &option_force, 0, GET_BOOL, NO_ARG, 0, 0,
@@ -315,6 +322,10 @@ int main(int argc,char *argv[])
free_defaults(save_argv);
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 (argc == 0)
{
@@ -413,7 +424,7 @@ int main(int argc,char *argv[])
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
#endif
free_defaults(save_argv);
- my_end(info_flag ? MY_CHECK_ERROR : 0);
+ my_end(my_end_arg);
exit(error ? 1 : 0);
return 0;
}
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index edade347783..d8c4f4bbcbf 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -65,11 +65,13 @@ static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0;
static bool opt_hexdump= 0;
static bool opt_base64_output= 0;
static const char* database= 0;
-static my_bool force_opt= 0, short_form= 0, remote_opt= 0, info_flag;
+static my_bool force_opt= 0, short_form= 0, remote_opt= 0;
+static my_bool debug_info_flag, debug_check_flag;
static my_bool force_if_open_opt= 1;
static ulonglong offset = 0;
static const char* host = 0;
static int port= 0;
+static uint my_end_arg;
static const char* sock= 0;
static const char* user = 0;
static char* pass = 0;
@@ -727,8 +729,12 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log.", (uchar**) &default_dbug_option,
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"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},
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
"enabled --to-last-log and are sending the output to the same MySQL server. "
"This way you could avoid an endless loop. You would also like to use it "
@@ -860,7 +866,7 @@ static void die(const char* fmt, ...)
va_end(args);
cleanup();
/* We cannot free DBUG, it is used in global destructors after exit(). */
- my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);
+ my_end(my_end_arg | MY_DONT_FREE_DBUG);
exit(1);
}
@@ -868,7 +874,7 @@ static void die(const char* fmt, ...)
static void print_version()
{
- printf("%s Ver 3.2 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
+ printf("%s Ver 3.3 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
NETWARE_SET_SCREEN_MODE(1);
}
@@ -984,7 +990,10 @@ static int parse_args(int *argc, char*** argv)
load_defaults("my",load_default_groups,argc,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;
return 0;
}
@@ -1597,7 +1606,7 @@ int main(int argc, char** argv)
my_free_open_file_info();
load_processor.destroy();
/* We cannot free DBUG, it is used in global destructors after exit(). */
- my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);
+ my_end(my_end_arg | MY_DONT_FREE_DBUG);
if (file_not_closed_error)
{
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 372dfe860df..ee8d5c0d6d3 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -15,7 +15,7 @@
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
-#define CHECK_VERSION "2.4.5"
+#define CHECK_VERSION "2.5.0"
#include "client_priv.h"
#include <m_ctype.h>
@@ -33,10 +33,11 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
opt_compress = 0, opt_databases = 0, opt_fast = 0,
opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0,
opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0,
- tty_password= 0, opt_frm= 0, info_flag= 0,
+ tty_password= 0, opt_frm= 0, debug_info_flag= 0, debug_check_flag= 0,
opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0,
opt_write_binlog= 1;
static uint verbose = 0, opt_mysql_port=0;
+static int my_end_arg;
static char * opt_mysql_unix_port = 0;
static char *opt_password = 0, *current_user = 0,
*default_charset = (char *)MYSQL_DEFAULT_CHARSET_NAME,
@@ -96,8 +97,12 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"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},
{"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (uchar**) &default_charset,
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -305,6 +310,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 OPT_TABLES:
@@ -375,6 +381,10 @@ static int get_options(int *argc, char ***argv)
}
if (tty_password)
opt_password = get_tty_password(NullS);
+ if (debug_info_flag)
+ my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
+ if (debug_check_flag)
+ my_end_arg= MY_CHECK_ERROR;
return(0);
} /* get_options */
@@ -762,7 +772,7 @@ int main(int argc, char **argv)
*/
if (get_options(&argc, &argv))
{
- my_end(info_flag ? MY_CHECK_ERROR : 0);
+ my_end(my_end_arg);
exit(EX_USAGE);
}
if (dbConnect(current_host, current_user, opt_password))
@@ -804,6 +814,6 @@ int main(int argc, char **argv)
#ifdef HAVE_SMEM
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
#endif
- my_end(info_flag ? MY_CHECK_ERROR : 0);
+ my_end(my_end_arg);
return(first_error!=0);
} /* main */
diff --git a/client/mysqldump.c b/client/mysqldump.c
index cfdde285040..bea360a1fb3 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -36,7 +36,7 @@
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
*/
-#define DUMP_VERSION "10.12"
+#define DUMP_VERSION "10.13"
#include <my_global.h>
#include <my_sys.h>
@@ -100,9 +100,9 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
opt_dump_triggers= 0, opt_routines=0, opt_tz_utc=1,
opt_events= 0,
opt_alltspcs=0, opt_notspcs= 0;
+static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static MYSQL mysql_connection,*mysql=0;
-static my_bool insert_pat_inited= 0, info_flag;
static DYNAMIC_STRING insert_pat;
static char *opt_password=0,*current_user=0,
*current_host=0,*path=0,*fields_terminated=0,
@@ -116,7 +116,8 @@ static char compatible_mode_normal_str[255];
static ulong opt_compatible_mode= 0;
#define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1
#define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2
-static uint opt_mysql_port= 0, opt_master_data;
+static uint opt_mysql_port= 0, opt_master_data;
+static uint my_end_arg;
static char * opt_mysql_unix_port=0;
static int first_error=0;
static DYNAMIC_STRING extended_row;
@@ -242,8 +243,12 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
- {"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},
{"default-character-set", OPT_DEFAULT_CHARSET,
"Set the default character set.", (uchar**) &default_charset,
(uchar**) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -724,7 +729,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
- info_flag= 1;
+ debug_check_flag= 1;
break;
#include <sslopt-case.h>
case 'V': print_version(); exit(0);
@@ -858,6 +863,10 @@ static int get_options(int *argc, char ***argv)
*mysql_params->p_max_allowed_packet= opt_max_allowed_packet;
*mysql_params->p_net_buffer_length= opt_net_buffer_length;
+ if (debug_info_flag)
+ my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
+ if (debug_check_flag)
+ my_end_arg= MY_CHECK_ERROR;
if (opt_delayed)
opt_lock=0; /* Can't have lock with delayed */
@@ -1262,7 +1271,7 @@ static void free_resources()
dynstr_free(&insert_pat);
if (defaults_argv)
free_defaults(defaults_argv);
- my_end(info_flag ? MY_CHECK_ERROR : 0);
+ my_end(my_end_arg);
}
@@ -2061,7 +2070,6 @@ static uint get_table_structure(char *table, char *db, char *table_type,
int len;
MYSQL_RES *result;
MYSQL_ROW row;
-
DBUG_ENTER("get_table_structure");
DBUG_PRINT("enter", ("db: %s table: %s", db, table));
@@ -2481,6 +2489,7 @@ static uint get_table_structure(char *table, char *db, char *table_type,
fprintf(sql_file, " (%s)",row[7]); /* Sub key */
check_io(sql_file);
}
+ mysql_free_result(result);
if (!opt_xml)
{
if (keynr)
@@ -2822,7 +2831,7 @@ static void dump_table(char *table, char *db)
/*
The "table" could be a view. If so, we don't do anything here.
*/
- if (strcmp (table_type, "VIEW") == 0)
+ if (strcmp(table_type, "VIEW") == 0)
DBUG_VOID_RETURN;
/* Check --no-data flag */
@@ -2912,6 +2921,7 @@ static void dump_table(char *table, char *db)
if (mysql_real_query(mysql, query_string.str, query_string.length))
{
DB_error(mysql, "when executing 'SELECT INTO OUTFILE'");
+ dynstr_free(&query_string);
DBUG_VOID_RETURN;
}
}
@@ -3266,8 +3276,8 @@ static void dump_table(char *table, char *db)
check_io(md_result_file);
}
mysql_free_result(res);
- dynstr_free(&query_string);
}
+ dynstr_free(&query_string);
DBUG_VOID_RETURN;
err:
@@ -3388,6 +3398,7 @@ static int dump_tablespaces(char* ts_where)
char extra_format[]= "UNDO_BUFFER_SIZE=";
char *ubs;
char *endsemi;
+ DBUG_ENTER("dump_tablespaces");
init_dynamic_string_checked(&sqlbuf,
"SELECT LOGFILE_GROUP_NAME,"
@@ -3419,6 +3430,7 @@ static int dump_tablespaces(char* ts_where)
if (mysql_query(mysql, sqlbuf.str) ||
!(tableres = mysql_store_result(mysql)))
{
+ dynstr_free(&sqlbuf);
if (mysql_errno(mysql) == ER_BAD_TABLE_ERROR ||
mysql_errno(mysql) == ER_BAD_DB_ERROR ||
mysql_errno(mysql) == ER_UNKNOWN_TABLE)
@@ -3427,12 +3439,12 @@ static int dump_tablespaces(char* ts_where)
"\n--\n-- Not dumping tablespaces as no INFORMATION_SCHEMA.FILES"
" table on this server\n--\n");
check_io(md_result_file);
- return 0;
+ DBUG_RETURN(0);
}
- my_printf_error(0, "Error: Couldn't dump tablespaces %s",
+ my_printf_error(0, "Error: '%s' when trying to dump tablespaces",
MYF(0), mysql_error(mysql));
- return 1;
+ DBUG_RETURN(1);
}
buf[0]= 0;
@@ -3484,6 +3496,7 @@ static int dump_tablespaces(char* ts_where)
}
}
dynstr_free(&sqlbuf);
+ mysql_free_result(tableres);
init_dynamic_string_checked(&sqlbuf,
"SELECT DISTINCT TABLESPACE_NAME,"
" FILE_NAME,"
@@ -3501,7 +3514,10 @@ static int dump_tablespaces(char* ts_where)
dynstr_append_checked(&sqlbuf, " ORDER BY TABLESPACE_NAME, LOGFILE_GROUP_NAME");
if (mysql_query_with_error_report(mysql, &tableres, sqlbuf.str))
- return 1;
+ {
+ dynstr_free(&sqlbuf);
+ DBUG_RETURN(1);
+ }
buf[0]= 0;
while ((row= mysql_fetch_row(tableres)))
@@ -3547,8 +3563,9 @@ static int dump_tablespaces(char* ts_where)
}
}
+ mysql_free_result(tableres);
dynstr_free(&sqlbuf);
- return 0;
+ DBUG_RETURN(0);
}
static int dump_all_databases()
@@ -3635,8 +3652,11 @@ RETURN VALUES
0 Success.
1 Failure.
*/
+
int init_dumping_tables(char *qdatabase)
{
+ DBUG_ENTER("init_dumping_tables");
+
if (!opt_create_db)
{
char qbuf[256];
@@ -3669,10 +3689,10 @@ int init_dumping_tables(char *qdatabase)
{
fprintf(md_result_file,"\n%s;\n",row[1]);
}
+ mysql_free_result(dbinfo);
}
}
-
- return 0;
+ DBUG_RETURN(0);
} /* init_dumping_tables */
@@ -3955,8 +3975,13 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
}
else
{
- maybe_die(EX_ILLEGAL_TABLE, "Couldn't find table: \"%s\"", *table_names);
- /* We shall countinue here, if --force was given */
+ if (!ignore_errors)
+ {
+ dynstr_free(&lock_tables_query);
+ free_root(&root, MYF(0));
+ }
+ maybe_die(EX_ILLEGAL_TABLE, "Couldn't find table: \"%s\"", *table_names);
+ /* We shall countinue here, if --force was given */
}
}
end= pos;
@@ -3965,14 +3990,25 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
{
if (mysql_real_query(mysql, lock_tables_query.str,
lock_tables_query.length-1))
+ {
+ if (!ignore_errors)
+ {
+ dynstr_free(&lock_tables_query);
+ free_root(&root, MYF(0));
+ }
DB_error(mysql, "when doing LOCK TABLES");
/* We shall countinue here, if --force was given */
+ }
}
dynstr_free(&lock_tables_query);
if (flush_logs)
{
if (mysql_refresh(mysql, REFRESH_LOG))
+ {
+ if (!ignore_errors)
+ free_root(&root, MYF(0));
DB_error(mysql, "when doing refresh");
+ }
/* We shall countinue here, if --force was given */
}
if (opt_xml)
@@ -4535,6 +4571,9 @@ static my_bool get_view_structure(char *table, char* db)
if (!(table_res= mysql_store_result(mysql)) ||
!(row= mysql_fetch_row(table_res)))
{
+ if (table_res)
+ mysql_free_result(table_res);
+ dynstr_free(&ds_view);
DB_error(mysql, "when trying to save the result of SHOW CREATE TABLE in ds_view.");
DBUG_RETURN(1);
}
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);
}
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index 649658d6223..a7f6cadf450 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -15,7 +15,7 @@
/* Show databases, tables or columns */
-#define SHOW_VERSION "9.6"
+#define SHOW_VERSION "9.10"
#include "client_priv.h"
#include <my_sys.h>
@@ -28,7 +28,9 @@
static char * host=0, *opt_password=0, *user=0;
static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0;
-static my_bool tty_password= 0, opt_table_type= 0, info_flag= 0;
+static my_bool tty_password= 0, opt_table_type= 0;
+static my_bool debug_info_flag= 0, debug_check_flag= 0;
+static uint my_end_arg= 0;
static uint opt_verbose=0;
static char *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
@@ -150,7 +152,7 @@ int main(int argc, char **argv)
#ifdef HAVE_SMEM
my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR));
#endif
- my_end(info_flag ? MY_CHECK_ERROR : 0);
+ my_end(my_end_arg);
exit(error ? 1 : 0);
return 0; /* No compiler warnings */
}
@@ -176,8 +178,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},
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG,
0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (uchar**) &host, (uchar**) &host, 0, GET_STR,
@@ -293,6 +299,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':
@@ -326,6 +333,10 @@ get_options(int *argc,char ***argv)
*/
opt_verbose= 2;
}
+ if (debug_info_flag)
+ my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
+ if (debug_check_flag)
+ my_end_arg= MY_CHECK_ERROR;
return;
}
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index aa15141bfdc..a550dcae260 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -69,7 +69,7 @@ TODO:
*/
-#define SHOW_VERSION "0.9"
+#define SLAP_VERSION "1.0"
#define HUGE_STRING_LENGTH 8196
#define RAND_STRING_SIZE 126
@@ -131,10 +131,8 @@ const char *delimiter= "\n";
const char *create_schema_string= "mysqlslap";
-static my_bool opt_preserve;
-
+static my_bool opt_preserve= 0, debug_info_flag= 0, debug_check_flag= 0;
static my_bool opt_only_print= FALSE;
-
static my_bool opt_compress= FALSE, tty_password= FALSE,
opt_silent= FALSE,
auto_generate_sql_autoincrement= FALSE,
@@ -149,13 +147,14 @@ static uint commit_rate;
static uint detach_rate;
const char *num_int_cols_opt;
const char *num_char_cols_opt;
+
/* Yes, we do set defaults here */
static unsigned int num_int_cols= 1;
static unsigned int num_char_cols= 1;
static unsigned int num_int_cols_index= 0;
static unsigned int num_char_cols_index= 0;
-
static unsigned int iterations;
+static uint my_end_arg= 0;
static char *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
static ulonglong actual_queries= 0;
static ulonglong auto_actual_queries;
@@ -410,7 +409,7 @@ int main(int argc, char **argv)
my_free(shared_memory_base_name, MYF(MY_ALLOW_ZERO_PTR));
#endif
free_defaults(defaults_argv);
- my_end(0);
+ my_end(my_end_arg);
return 0;
}
@@ -569,6 +568,11 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
(uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR,
OPT_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", 'T', "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},
{"delimiter", 'F',
"Delimiter to use in SQL statements supplied in file or command line.",
(uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG,
@@ -672,7 +676,7 @@ static struct my_option my_long_options[] =
static void print_version(void)
{
- printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,SHOW_VERSION,
+ printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname, SLAP_VERSION,
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
}
@@ -731,6 +735,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break;
case '#':
DBUG_PUSH(argument ? argument : default_dbug_option);
+ debug_check_flag= 1;
break;
#include <sslopt-case.h>
case 'V':
@@ -1126,6 +1131,10 @@ get_options(int *argc,char ***argv)
DBUG_ENTER("get_options");
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 (!user)
user= (char *)"root";
diff --git a/client/mysqltest.c b/client/mysqltest.c
index e5b9a2eaf12..7ba57f7515c 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -31,7 +31,7 @@
Holyfoot
*/
-#define MTEST_VERSION "3.2"
+#define MTEST_VERSION "3.3"
#include "client_priv.h"
#include <mysql_version.h>
@@ -80,6 +80,7 @@ const char *opt_include= 0, *opt_charsets_dir;
static int opt_port= 0;
static int opt_max_connect_retries;
static my_bool opt_compress= 0, silent= 0, verbose= 0;
+static my_bool debug_info_flag= 0, debug_check_flag= 0;
static my_bool tty_password= 0;
static my_bool opt_mark_progress= 0;
static my_bool ps_protocol= 0, ps_protocol_enabled= 0;
@@ -100,6 +101,7 @@ static const char *load_default_groups[]= { "mysqltest", "client", 0 };
static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer;
static uint start_lineno= 0; /* Start line of current command */
+static uint my_end_arg= 0;
static char delimiter[MAX_DELIMITER_LENGTH]= ";";
static uint delimiter_length= 1;
@@ -807,12 +809,10 @@ void free_used_memory()
static void cleanup_and_exit(int exit_code)
{
free_used_memory();
- my_end(MY_CHECK_ERROR);
+ my_end(my_end_arg);
- if (!silent)
- {
- switch (exit_code)
- {
+ if (!silent) {
+ switch (exit_code) {
case 1:
printf("not ok\n");
break;
@@ -1084,8 +1084,7 @@ void check_result(DYNAMIC_STRING* ds)
DBUG_ENTER("check_result");
DBUG_ASSERT(result_file_name);
- switch (dyn_string_cmp(ds, result_file_name))
- {
+ switch (dyn_string_cmp(ds, result_file_name)) {
case RESULT_OK:
break; /* ok */
case RESULT_LENGTH_MISMATCH:
@@ -1929,7 +1928,10 @@ void do_exec(struct st_command *command)
command->first_argument, ds_cmd.str));
if (!(res_file= my_popen(&ds_cmd, "r")) && command->abort_on_error)
+ {
+ dynstr_free(&ds_cmd);
die("popen(\"%s\", \"r\") failed", command->first_argument);
+ }
while (fgets(buf, sizeof(buf), res_file))
{
@@ -1953,6 +1955,7 @@ void do_exec(struct st_command *command)
{
log_msg("exec of '%s failed, error: %d, status: %d, errno: %d",
ds_cmd.str, error, status, errno);
+ dynstr_free(&ds_cmd);
die("command \"%s\" failed", command->first_argument);
}
@@ -1971,8 +1974,11 @@ void do_exec(struct st_command *command)
}
}
if (!ok)
+ {
+ dynstr_free(&ds_cmd);
die("command \"%s\" failed with wrong error: %d",
command->first_argument, status);
+ }
}
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
command->expected_errors.err[0].code.errnum != 0)
@@ -1980,6 +1986,7 @@ void do_exec(struct st_command *command)
/* Error code we wanted was != 0, i.e. not an expected success */
log_msg("exec of '%s failed, error: %d, errno: %d",
ds_cmd.str, error, errno);
+ dynstr_free(&ds_cmd);
die("command \"%s\" succeeded - should have failed with errno %d...",
command->first_argument, command->expected_errors.err[0].code.errnum);
}
@@ -4482,6 +4489,12 @@ static struct my_option my_long_options[] =
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"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},
{"host", 'h', "Connect to host.", (uchar**) &opt_host, (uchar**) &opt_host, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"include", 'i', "Include SQL before each test case.", (uchar**) &opt_include,
@@ -4625,6 +4638,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
case '#':
#ifndef DBUG_OFF
DBUG_PUSH(argument ? argument : "d:t:S:i:O,/tmp/mysqltest.trace");
+ debug_check_flag= 1;
#endif
break;
case 'r':
@@ -4724,6 +4738,10 @@ int parse_args(int argc, char **argv)
opt_db= *argv;
if (tty_password)
opt_pass= get_tty_password(NullS); /* purify tested */
+ if (debug_info_flag)
+ my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
+ if (debug_check_flag)
+ my_end_arg= MY_CHECK_ERROR;
return 0;
}
@@ -5377,11 +5395,8 @@ end:
ds - dynamic string which is used for output buffer
NOTE
- If there is an unexpected error this function will abort mysqltest
- immediately.
-
- RETURN VALUE
- error - function will not return
+ If there is an unexpected error this function will abort mysqltest
+ immediately.
*/
void handle_error(struct st_command *command,