Loading client/mysql.cc +25 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ static int com_quit(String *str,char*), com_connect(String *str,char*), com_status(String *str,char*), com_use(String *str,char*), com_source(String *str, char*), com_rehash(String *str, char*), com_tee(String *str, char*), com_notee(String *str, char*), com_notee(String *str, char*), com_charset(String *str,char*), com_prompt(String *str, char*), com_delimiter(String *str, char*); #ifdef USE_POPEN Loading Loading @@ -263,6 +263,8 @@ static COMMANDS commands[] = { "Set outfile [to_outfile]. Append everything into given outfile." }, { "use", 'u', com_use, 1, "Use another database. Takes database name as argument." }, { "charset_name", 'C', com_charset, 1, "Switch to another charset. Might be needed for processing binlog." }, /* Get bash-like expansion for some commands */ { "create table", 0, 0, 0, ""}, { "create database", 0, 0, 0, ""}, Loading Loading @@ -1850,6 +1852,28 @@ com_clear(String *buffer,char *line __attribute__((unused))) return 0; } /* ARGSUSED */ static int com_charset(String *buffer __attribute__((unused)), char *line) { char buff[256], *param; CHARSET_INFO * new_cs; strmake(buff, line, sizeof(buff) - 1); param= get_arg(buff, 0); if (!param || !*param) { return put_info("Usage: \\C char_setname | charset charset_name", INFO_ERROR, 0); } new_cs= get_charset_by_csname(param, MY_CS_PRIMARY, MYF(MY_WME)); if (new_cs) { charset_info= new_cs; put_info("Charset changed", INFO_INFO); } else put_info("Charset is not found", INFO_INFO); return 0; } /* Execute command Loading client/mysqldump.c +5 −2 Original line number Diff line number Diff line Loading @@ -2557,7 +2557,10 @@ static const char *check_if_ignore_table(const char *table_name) mysql_free_result(res); return 0; /* assume table is ok */ } if (strcmp(row[1], (result= "MRG_MyISAM")) && /* Some forward-compatibility: don't dump data from a VIEW */ if (!row[1]) result= "VIEW"; else if (strcmp(row[1], (result= "MRG_MyISAM")) && strcmp(row[1], (result= "MRG_ISAM"))) result= 0; mysql_free_result(res); Loading client/mysqltest.c +26 −24 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ enum {OPT_MANAGER_USER=256,OPT_MANAGER_HOST,OPT_MANAGER_PASSWD, The list of error codes to --error are stored in an internal array of structs. This struct can hold numeric SQL error codes or SQLSTATE codes as strings. The element next to the last active element in the list is set to type ERR_EMPTY. When an SQL statement return an error we use set to type ERR_EMPTY. When an SQL statement returns an error, we use this list to check if this is an expected error. */ Loading Loading @@ -320,13 +320,6 @@ const char *command_names[]= "connection", "query", "connect", /* the difference between sleep and real_sleep is that sleep will use the delay from command line (--sleep) if there is one. real_sleep always uses delay from mysqltest's command line argument. the logic is that sometimes delays are cpu-dependent (and --sleep can be used to set this delay. real_sleep is used for cpu-independent delays */ "sleep", "real_sleep", "inc", Loading Loading @@ -986,8 +979,8 @@ int do_source(struct st_query *query) *p++= 0; query->last_argument= p; /* If this file has already been sourced, dont source it again. It's already available in the q_lines cache If this file has already been sourced, don't source it again. It's already available in the q_lines cache. */ if (parser.current_line < (parser.read_lines - 1)) return 0; Loading Loading @@ -1536,11 +1529,19 @@ int do_disable_rpl_parse(struct st_query *query __attribute__((unused))) do_sleep() q called command real_sleep use the value from opt_sleep as number of seconds to sleep if real_sleep is false DESCRIPTION sleep <seconds> real_sleep real_sleep <seconds> The difference between the sleep and real_sleep commands is that sleep uses the delay from the --sleep command-line option if there is one. (If the --sleep option is not given, the sleep command uses the delay specified by its argument.) The real_sleep command always uses the delay specified by its argument. The logic is that sometimes delays are cpu-dependent, and --sleep can be used to set this delay. real_sleep is used for cpu-independent delays. */ int do_sleep(struct st_query *query, my_bool real_sleep) Loading @@ -1549,18 +1550,19 @@ int do_sleep(struct st_query *query, my_bool real_sleep) char *p= query->first_argument; char *sleep_start, *sleep_end= query->end; double sleep_val; char *cmd = (real_sleep ? "real_sleep" : "sleep"); while (my_isspace(charset_info, *p)) p++; if (!*p) die("Missing argument to sleep"); die("Missing argument to %s", cmd); sleep_start= p; /* Check that arg starts with a digit, not handled by my_strtod */ if (!my_isdigit(charset_info, *sleep_start)) die("Invalid argument to sleep \"%s\"", query->first_argument); die("Invalid argument to %s \"%s\"", cmd, query->first_argument); sleep_val= my_strtod(sleep_start, &sleep_end, &error); if (error) die("Invalid argument to sleep \"%s\"", query->first_argument); die("Invalid argument to %s \"%s\"", cmd, query->first_argument); /* Fixed sleep time selected by --sleep option */ if (opt_sleep && !real_sleep) Loading Loading @@ -2151,7 +2153,7 @@ my_bool end_of_query(int c) Normally that means it will read lines until it reaches the "delimiter" that marks end of query. Default delimiter is ';' The function should be smart enough not to detect delimiter's found inside strings sorrounded with '"' and '\'' escaped strings. found inside strings surrounded with '"' and '\'' escaped strings. If the first line in a query starts with '#' or '-' this line is treated as a comment. A comment is always terminated when end of line '\n' is Loading Loading @@ -2485,7 +2487,7 @@ static struct my_option my_long_options[] = {"result-file", 'R', "Read/Store result from/in this file.", (gptr*) &result_file, (gptr*) &result_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"server-arg", 'A', "Send enbedded server this as a paramenter.", {"server-arg", 'A', "Send option value to embedded server as a parameter.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"server-file", 'F', "Read embedded server arguments from file.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, Loading Loading @@ -2966,7 +2968,7 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags) warn_res= mysql_store_result(mysql); } if (!warn_res) verbose_msg("Warning count is %u but didn't get any warnings\n", die("Warning count is %u but didn't get any warnings\n", count); else { Loading Loading @@ -3446,7 +3448,7 @@ static void run_query_stmt_handle_warnings(MYSQL *mysql, DYNAMIC_STRING *ds) { MYSQL_RES *warn_res= mysql_store_result(mysql); if (!warn_res) verbose_msg("Warning count is %u but didn't get any warnings\n", die("Warning count is %u but didn't get any warnings\n", count); else { Loading Loading @@ -4074,8 +4076,8 @@ int main(int argc, char **argv) /* my_stat() successful on result file. Check if we have not run a single query, but we do have a result file that contains data. Note that we don't care, if my_stat() fails. For example for non-existing or non-readable file we assume it's fine to have Note that we don't care, if my_stat() fails. For example, for a non-existing or non-readable file, we assume it's fine to have no query output from the test file, e.g. regarded as no error. */ if (res_info.st_size) Loading configure.in +3 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb AM_INIT_AUTOMAKE(mysql, 4.1.18) AM_INIT_AUTOMAKE(mysql, 4.1.19) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 Loading @@ -17,7 +17,7 @@ SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=4 NDB_VERSION_MINOR=1 NDB_VERSION_BUILD=18 NDB_VERSION_BUILD=19 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? Loading Loading @@ -435,7 +435,7 @@ fi # libmysqlclient versioning when linked with GNU ld. if $LD --version 2>/dev/null|grep -q GNU; then LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libmysql/libmysql.ver" LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver" AC_CONFIG_FILES(libmysql/libmysql.ver) fi AC_SUBST(LD_VERSION_SCRIPT) Loading heap/hp_create.c +1 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, DBUG_RETURN(1); } share->keydef= (HP_KEYDEF*) (share + 1); share->key_stat_version= 1; keyseg= (HA_KEYSEG*) (share->keydef + keys); init_block(&share->block, reclength + 1, min_records, max_records); /* Fix keys */ Loading Loading
client/mysql.cc +25 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,7 @@ static int com_quit(String *str,char*), com_connect(String *str,char*), com_status(String *str,char*), com_use(String *str,char*), com_source(String *str, char*), com_rehash(String *str, char*), com_tee(String *str, char*), com_notee(String *str, char*), com_notee(String *str, char*), com_charset(String *str,char*), com_prompt(String *str, char*), com_delimiter(String *str, char*); #ifdef USE_POPEN Loading Loading @@ -263,6 +263,8 @@ static COMMANDS commands[] = { "Set outfile [to_outfile]. Append everything into given outfile." }, { "use", 'u', com_use, 1, "Use another database. Takes database name as argument." }, { "charset_name", 'C', com_charset, 1, "Switch to another charset. Might be needed for processing binlog." }, /* Get bash-like expansion for some commands */ { "create table", 0, 0, 0, ""}, { "create database", 0, 0, 0, ""}, Loading Loading @@ -1850,6 +1852,28 @@ com_clear(String *buffer,char *line __attribute__((unused))) return 0; } /* ARGSUSED */ static int com_charset(String *buffer __attribute__((unused)), char *line) { char buff[256], *param; CHARSET_INFO * new_cs; strmake(buff, line, sizeof(buff) - 1); param= get_arg(buff, 0); if (!param || !*param) { return put_info("Usage: \\C char_setname | charset charset_name", INFO_ERROR, 0); } new_cs= get_charset_by_csname(param, MY_CS_PRIMARY, MYF(MY_WME)); if (new_cs) { charset_info= new_cs; put_info("Charset changed", INFO_INFO); } else put_info("Charset is not found", INFO_INFO); return 0; } /* Execute command Loading
client/mysqldump.c +5 −2 Original line number Diff line number Diff line Loading @@ -2557,7 +2557,10 @@ static const char *check_if_ignore_table(const char *table_name) mysql_free_result(res); return 0; /* assume table is ok */ } if (strcmp(row[1], (result= "MRG_MyISAM")) && /* Some forward-compatibility: don't dump data from a VIEW */ if (!row[1]) result= "VIEW"; else if (strcmp(row[1], (result= "MRG_MyISAM")) && strcmp(row[1], (result= "MRG_ISAM"))) result= 0; mysql_free_result(res); Loading
client/mysqltest.c +26 −24 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ enum {OPT_MANAGER_USER=256,OPT_MANAGER_HOST,OPT_MANAGER_PASSWD, The list of error codes to --error are stored in an internal array of structs. This struct can hold numeric SQL error codes or SQLSTATE codes as strings. The element next to the last active element in the list is set to type ERR_EMPTY. When an SQL statement return an error we use set to type ERR_EMPTY. When an SQL statement returns an error, we use this list to check if this is an expected error. */ Loading Loading @@ -320,13 +320,6 @@ const char *command_names[]= "connection", "query", "connect", /* the difference between sleep and real_sleep is that sleep will use the delay from command line (--sleep) if there is one. real_sleep always uses delay from mysqltest's command line argument. the logic is that sometimes delays are cpu-dependent (and --sleep can be used to set this delay. real_sleep is used for cpu-independent delays */ "sleep", "real_sleep", "inc", Loading Loading @@ -986,8 +979,8 @@ int do_source(struct st_query *query) *p++= 0; query->last_argument= p; /* If this file has already been sourced, dont source it again. It's already available in the q_lines cache If this file has already been sourced, don't source it again. It's already available in the q_lines cache. */ if (parser.current_line < (parser.read_lines - 1)) return 0; Loading Loading @@ -1536,11 +1529,19 @@ int do_disable_rpl_parse(struct st_query *query __attribute__((unused))) do_sleep() q called command real_sleep use the value from opt_sleep as number of seconds to sleep if real_sleep is false DESCRIPTION sleep <seconds> real_sleep real_sleep <seconds> The difference between the sleep and real_sleep commands is that sleep uses the delay from the --sleep command-line option if there is one. (If the --sleep option is not given, the sleep command uses the delay specified by its argument.) The real_sleep command always uses the delay specified by its argument. The logic is that sometimes delays are cpu-dependent, and --sleep can be used to set this delay. real_sleep is used for cpu-independent delays. */ int do_sleep(struct st_query *query, my_bool real_sleep) Loading @@ -1549,18 +1550,19 @@ int do_sleep(struct st_query *query, my_bool real_sleep) char *p= query->first_argument; char *sleep_start, *sleep_end= query->end; double sleep_val; char *cmd = (real_sleep ? "real_sleep" : "sleep"); while (my_isspace(charset_info, *p)) p++; if (!*p) die("Missing argument to sleep"); die("Missing argument to %s", cmd); sleep_start= p; /* Check that arg starts with a digit, not handled by my_strtod */ if (!my_isdigit(charset_info, *sleep_start)) die("Invalid argument to sleep \"%s\"", query->first_argument); die("Invalid argument to %s \"%s\"", cmd, query->first_argument); sleep_val= my_strtod(sleep_start, &sleep_end, &error); if (error) die("Invalid argument to sleep \"%s\"", query->first_argument); die("Invalid argument to %s \"%s\"", cmd, query->first_argument); /* Fixed sleep time selected by --sleep option */ if (opt_sleep && !real_sleep) Loading Loading @@ -2151,7 +2153,7 @@ my_bool end_of_query(int c) Normally that means it will read lines until it reaches the "delimiter" that marks end of query. Default delimiter is ';' The function should be smart enough not to detect delimiter's found inside strings sorrounded with '"' and '\'' escaped strings. found inside strings surrounded with '"' and '\'' escaped strings. If the first line in a query starts with '#' or '-' this line is treated as a comment. A comment is always terminated when end of line '\n' is Loading Loading @@ -2485,7 +2487,7 @@ static struct my_option my_long_options[] = {"result-file", 'R', "Read/Store result from/in this file.", (gptr*) &result_file, (gptr*) &result_file, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"server-arg", 'A', "Send enbedded server this as a paramenter.", {"server-arg", 'A', "Send option value to embedded server as a parameter.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"server-file", 'F', "Read embedded server arguments from file.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, Loading Loading @@ -2966,7 +2968,7 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags) warn_res= mysql_store_result(mysql); } if (!warn_res) verbose_msg("Warning count is %u but didn't get any warnings\n", die("Warning count is %u but didn't get any warnings\n", count); else { Loading Loading @@ -3446,7 +3448,7 @@ static void run_query_stmt_handle_warnings(MYSQL *mysql, DYNAMIC_STRING *ds) { MYSQL_RES *warn_res= mysql_store_result(mysql); if (!warn_res) verbose_msg("Warning count is %u but didn't get any warnings\n", die("Warning count is %u but didn't get any warnings\n", count); else { Loading Loading @@ -4074,8 +4076,8 @@ int main(int argc, char **argv) /* my_stat() successful on result file. Check if we have not run a single query, but we do have a result file that contains data. Note that we don't care, if my_stat() fails. For example for non-existing or non-readable file we assume it's fine to have Note that we don't care, if my_stat() fails. For example, for a non-existing or non-readable file, we assume it's fine to have no query output from the test file, e.g. regarded as no error. */ if (res_info.st_size) Loading
configure.in +3 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb AM_INIT_AUTOMAKE(mysql, 4.1.18) AM_INIT_AUTOMAKE(mysql, 4.1.19) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 Loading @@ -17,7 +17,7 @@ SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=4 NDB_VERSION_MINOR=1 NDB_VERSION_BUILD=18 NDB_VERSION_BUILD=19 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? Loading Loading @@ -435,7 +435,7 @@ fi # libmysqlclient versioning when linked with GNU ld. if $LD --version 2>/dev/null|grep -q GNU; then LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_srcdir)/libmysql/libmysql.ver" LD_VERSION_SCRIPT="-Wl,--version-script=\$(top_builddir)/libmysql/libmysql.ver" AC_CONFIG_FILES(libmysql/libmysql.ver) fi AC_SUBST(LD_VERSION_SCRIPT) Loading
heap/hp_create.c +1 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, DBUG_RETURN(1); } share->keydef= (HP_KEYDEF*) (share + 1); share->key_stat_version= 1; keyseg= (HA_KEYSEG*) (share->keydef + keys); init_block(&share->block, reclength + 1, min_records, max_records); /* Fix keys */ Loading