Loading client/mysqltest.c +26 −4 Original line number Diff line number Diff line Loading @@ -1887,6 +1887,18 @@ void var_set_errno(int sql_errno) var_set_int("$mysql_errno", sql_errno); } /* Update $mysql_get_server_version variable with version of the currently connected server */ void var_set_mysql_get_server_version(MYSQL* mysql) { var_set_int("$mysql_get_server_version", mysql_get_server_version(mysql)); } /* Set variable from the result of a query Loading Loading @@ -2196,7 +2208,7 @@ int open_file(const char *name) if (!(cur_file->file = my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) { cur_file--; die("Could not open file '%s'", buff); die("Could not open '%s' for reading", buff); } cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); cur_file->lineno=1; Loading Loading @@ -4016,6 +4028,10 @@ int select_connection_name(const char *name) if (!(cur_con= find_connection_by_name(name))) die("connection '%s' not found in connection pool", name); /* Update $mysql_get_server_version to that of current connection */ var_set_mysql_get_server_version(&cur_con->mysql); DBUG_RETURN(0); } Loading Loading @@ -4403,6 +4419,9 @@ void do_connect(struct st_command *command) next_con++; /* if we used the next_con slot, advance the pointer */ } /* Update $mysql_get_server_version to that of current connection */ var_set_mysql_get_server_version(&cur_con->mysql); dynstr_free(&ds_connection_name); dynstr_free(&ds_host); dynstr_free(&ds_user); Loading Loading @@ -5245,7 +5264,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0); if (!(cur_file->file= my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) die("Could not open %s: errno = %d", buff, errno); die("Could not open '%s' for reading: errno = %d", buff, errno); cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); cur_file->lineno= 1; break; Loading Loading @@ -5362,9 +5381,9 @@ void str_to_file2(const char *fname, char *str, int size, my_bool append) flags|= O_TRUNC; if ((fd= my_open(buff, flags, MYF(MY_WME | MY_FFNF))) < 0) die("Could not open %s: errno = %d", buff, errno); die("Could not open '%s' for writing: errno = %d", buff, errno); if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR) die("Could not find end of file %s: errno = %d", buff, errno); die("Could not find end of file '%s': errno = %d", buff, errno); if (my_write(fd, (uchar*)str, size, MYF(MY_WME|MY_FNABP))) die("write failed"); my_close(fd, MYF(0)); Loading Loading @@ -6928,6 +6947,9 @@ int main(int argc, char **argv) */ var_set_errno(-1); /* Update $mysql_get_server_version to that of current connection */ var_set_mysql_get_server_version(&cur_con->mysql); if (opt_include) { open_file(opt_include); Loading include/m_ctype.h +1 −0 Original line number Diff line number Diff line Loading @@ -282,6 +282,7 @@ typedef struct charset_info_st MY_COLLATION_HANDLER *coll; } CHARSET_INFO; #define ILLEGAL_CHARSET_INFO_NUMBER (~0U) extern CHARSET_INFO my_charset_bin; Loading mysql-test/extra/binlog_tests/ctype_cp932.test +2 −0 Original line number Diff line number Diff line Loading @@ -404,8 +404,10 @@ DROP TABLE t4; SET collation_connection='cp932_japanese_ci'; -- source include/ctype_filesort.inc -- source include/ctype_like_range_f1f2.inc SET collation_connection='cp932_bin'; -- source include/ctype_filesort.inc -- source include/ctype_like_range_f1f2.inc # # Bug#29333 myisam corruption with Loading mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ -- source include/have_log_bin.inc -- source include/have_innodb.inc -- source include/have_debug.inc --disable_warnings drop table if exists t1, t2; Loading mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +26 −33 Original line number Diff line number Diff line Loading @@ -403,45 +403,38 @@ sync_slave_with_master; # added columns do not have default values# # Expect: Proper error message # ########################################### # Commented out due to Bug #23907 Extra Slave Col is not # Bug#22234, Bug#23907 Extra Slave Col is not # erroring on extra col with no default values. ######################################################## #--echo *** Create t9 on slave *** #STOP SLAVE; #RESET SLAVE; #eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), # d TIMESTAMP, # e INT DEFAULT '1')ENGINE=$engine_type; #--echo *** Create t9 on Master *** #connection master; #eval CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) # ) ENGINE=$engine_type; #RESET MASTER; STOP SLAVE; RESET SLAVE; eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), d TIMESTAMP, e INT NOT NULL) ENGINE=$engine_type; #--echo *** Start Slave *** #connection slave; #START SLAVE; --echo *** Create t9 on Master *** connection master; eval CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) ) ENGINE=$engine_type; RESET MASTER; #--echo *** Master Data Insert *** #connection master; #set @b1 = 'b1b1b1b1'; #set @b1 = concat(@b1,@b1); #INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); --echo *** Start Slave *** connection slave; START SLAVE; #--echo ************************************************* #--echo ** Currently giving wrong error see bug#22234 *** #--echo ************************************************* #sync_slave_with_master; #connection slave; --echo *** Master Data Insert *** connection master; set @b1 = 'b1b1b1b1'; set @b1 = concat(@b1,@b1); INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); #--echo *** Select from T9 *** #--source include/wait_for_slave_sql_to_stop.inc #--replace_result $MASTER_MYPORT MASTER_PORT #--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # #--query_vertical SHOW SLAVE STATUS #SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; #START SLAVE; --source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # --query_vertical SHOW SLAVE STATUS SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; #--echo *** Drop t9 *** #connection master; Loading Loading
client/mysqltest.c +26 −4 Original line number Diff line number Diff line Loading @@ -1887,6 +1887,18 @@ void var_set_errno(int sql_errno) var_set_int("$mysql_errno", sql_errno); } /* Update $mysql_get_server_version variable with version of the currently connected server */ void var_set_mysql_get_server_version(MYSQL* mysql) { var_set_int("$mysql_get_server_version", mysql_get_server_version(mysql)); } /* Set variable from the result of a query Loading Loading @@ -2196,7 +2208,7 @@ int open_file(const char *name) if (!(cur_file->file = my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) { cur_file--; die("Could not open file '%s'", buff); die("Could not open '%s' for reading", buff); } cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); cur_file->lineno=1; Loading Loading @@ -4016,6 +4028,10 @@ int select_connection_name(const char *name) if (!(cur_con= find_connection_by_name(name))) die("connection '%s' not found in connection pool", name); /* Update $mysql_get_server_version to that of current connection */ var_set_mysql_get_server_version(&cur_con->mysql); DBUG_RETURN(0); } Loading Loading @@ -4403,6 +4419,9 @@ void do_connect(struct st_command *command) next_con++; /* if we used the next_con slot, advance the pointer */ } /* Update $mysql_get_server_version to that of current connection */ var_set_mysql_get_server_version(&cur_con->mysql); dynstr_free(&ds_connection_name); dynstr_free(&ds_host); dynstr_free(&ds_user); Loading Loading @@ -5245,7 +5264,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0); if (!(cur_file->file= my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) die("Could not open %s: errno = %d", buff, errno); die("Could not open '%s' for reading: errno = %d", buff, errno); cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); cur_file->lineno= 1; break; Loading Loading @@ -5362,9 +5381,9 @@ void str_to_file2(const char *fname, char *str, int size, my_bool append) flags|= O_TRUNC; if ((fd= my_open(buff, flags, MYF(MY_WME | MY_FFNF))) < 0) die("Could not open %s: errno = %d", buff, errno); die("Could not open '%s' for writing: errno = %d", buff, errno); if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR) die("Could not find end of file %s: errno = %d", buff, errno); die("Could not find end of file '%s': errno = %d", buff, errno); if (my_write(fd, (uchar*)str, size, MYF(MY_WME|MY_FNABP))) die("write failed"); my_close(fd, MYF(0)); Loading Loading @@ -6928,6 +6947,9 @@ int main(int argc, char **argv) */ var_set_errno(-1); /* Update $mysql_get_server_version to that of current connection */ var_set_mysql_get_server_version(&cur_con->mysql); if (opt_include) { open_file(opt_include); Loading
include/m_ctype.h +1 −0 Original line number Diff line number Diff line Loading @@ -282,6 +282,7 @@ typedef struct charset_info_st MY_COLLATION_HANDLER *coll; } CHARSET_INFO; #define ILLEGAL_CHARSET_INFO_NUMBER (~0U) extern CHARSET_INFO my_charset_bin; Loading
mysql-test/extra/binlog_tests/ctype_cp932.test +2 −0 Original line number Diff line number Diff line Loading @@ -404,8 +404,10 @@ DROP TABLE t4; SET collation_connection='cp932_japanese_ci'; -- source include/ctype_filesort.inc -- source include/ctype_like_range_f1f2.inc SET collation_connection='cp932_bin'; -- source include/ctype_filesort.inc -- source include/ctype_like_range_f1f2.inc # # Bug#29333 myisam corruption with Loading
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ -- source include/have_log_bin.inc -- source include/have_innodb.inc -- source include/have_debug.inc --disable_warnings drop table if exists t1, t2; Loading
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +26 −33 Original line number Diff line number Diff line Loading @@ -403,45 +403,38 @@ sync_slave_with_master; # added columns do not have default values# # Expect: Proper error message # ########################################### # Commented out due to Bug #23907 Extra Slave Col is not # Bug#22234, Bug#23907 Extra Slave Col is not # erroring on extra col with no default values. ######################################################## #--echo *** Create t9 on slave *** #STOP SLAVE; #RESET SLAVE; #eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), # d TIMESTAMP, # e INT DEFAULT '1')ENGINE=$engine_type; #--echo *** Create t9 on Master *** #connection master; #eval CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) # ) ENGINE=$engine_type; #RESET MASTER; STOP SLAVE; RESET SLAVE; eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), d TIMESTAMP, e INT NOT NULL) ENGINE=$engine_type; #--echo *** Start Slave *** #connection slave; #START SLAVE; --echo *** Create t9 on Master *** connection master; eval CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) ) ENGINE=$engine_type; RESET MASTER; #--echo *** Master Data Insert *** #connection master; #set @b1 = 'b1b1b1b1'; #set @b1 = concat(@b1,@b1); #INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); --echo *** Start Slave *** connection slave; START SLAVE; #--echo ************************************************* #--echo ** Currently giving wrong error see bug#22234 *** #--echo ************************************************* #sync_slave_with_master; #connection slave; --echo *** Master Data Insert *** connection master; set @b1 = 'b1b1b1b1'; set @b1 = concat(@b1,@b1); INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); #--echo *** Select from T9 *** #--source include/wait_for_slave_sql_to_stop.inc #--replace_result $MASTER_MYPORT MASTER_PORT #--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # #--query_vertical SHOW SLAVE STATUS #SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; #START SLAVE; --source include/wait_for_slave_sql_to_stop.inc --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # --query_vertical SHOW SLAVE STATUS SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; #--echo *** Drop t9 *** #connection master; Loading