diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-03-15 18:24:15 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-03-15 18:24:15 +0100 |
commit | d7304375e5e0ce30979c2b92e70eb0effaa30a25 (patch) | |
tree | bb9d05f40e948d4b027f4da9c007c433a16fa1a6 /mysql-test/suite | |
parent | cd29dc98216d822ad701d604b3eda886e1db2aaa (diff) | |
parent | e0f3a0fae98bea144b962ef8dbbe62e0935aebb1 (diff) | |
download | mariadb-git-d7304375e5e0ce30979c2b92e70eb0effaa30a25.tar.gz |
mysql-5.1.73 merge
Diffstat (limited to 'mysql-test/suite')
27 files changed, 269 insertions, 125 deletions
diff --git a/mysql-test/suite/binlog/t/binlog_killed_simulate.test b/mysql-test/suite/binlog/t/binlog_killed_simulate.test index b87d47559fe..fcedd884183 100644 --- a/mysql-test/suite/binlog/t/binlog_killed_simulate.test +++ b/mysql-test/suite/binlog/t/binlog_killed_simulate.test @@ -20,11 +20,9 @@ reset master; update t1 set a=2 /* will be "killed" after work has been done */; # a proof the query is binlogged with no error -#todo: introduce a suite private macro that provides numeric values -# for some constants like the offset of the first real event -# that is different between severs versions. +--let $binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 2) let $MYSQLD_DATADIR= `select @@datadir`; ---exec $MYSQL_BINLOG --force-if-open --start-position=106 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog +--exec $MYSQL_BINLOG --force-if-open --start-position=$binlog_load_data $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) @@ -48,11 +46,12 @@ reset master; load data infile '../../std_data/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */; +--let $binlog_load_data= query_get_value(SHOW BINLOG EVENTS, Pos, 2) # a proof the query is binlogged with an error - source include/show_binlog_events.inc; ---exec $MYSQL_BINLOG --force-if-open --start-position=98 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog +--mkdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 +--exec $MYSQL_BINLOG --local-load=$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 --force-if-open --start-position=$binlog_load_data $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval select (@a:=load_file("$MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) @@ -64,6 +63,8 @@ eval select $error_code /* must return 0 to mean the killed query is in */; # cleanup for the sub-case remove_file $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog; +--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 * +--rmdir $MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571 drop table t1,t2; diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result index 2b285d7cc56..090eeff9f07 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result @@ -66,7 +66,7 @@ NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NUL NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references +NULL mysql help_category url 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references @@ -76,7 +76,7 @@ NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_gen NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references +NULL mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references @@ -348,7 +348,7 @@ NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned 3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64) NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128) +1.0000 mysql help_category url text 65535 65535 utf8 utf8_general_ci text NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64) NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned @@ -358,7 +358,7 @@ NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned 1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text 1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text -3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128) +1.0000 mysql help_topic url text 65535 65535 utf8 utf8_general_ci text 3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result index 983f9dd833e..8cc2db6d12f 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result @@ -66,7 +66,7 @@ NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NUL NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned -NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) +NULL mysql help_category url 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI @@ -76,7 +76,7 @@ NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_gen NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI -NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) +NULL mysql help_topic url 6 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') @@ -348,7 +348,7 @@ NULL mysql general_log server_id int NULL NULL NULL NULL int(10) unsigned NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned 3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64) NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128) +1.0000 mysql help_category url text 65535 65535 utf8 utf8_general_ci text NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64) NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned @@ -358,7 +358,7 @@ NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned 1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text 1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text -3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128) +1.0000 mysql help_topic url text 65535 65535 utf8 utf8_general_ci text 3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result index b41318d9bae..3d58af72550 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result @@ -133,7 +133,7 @@ TABLE_NAME help_category TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result index a8b2813b162..9e191842e64 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result @@ -133,7 +133,7 @@ TABLE_NAME help_category TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# @@ -678,7 +678,7 @@ TABLE_NAME help_category TABLE_TYPE BASE TABLE ENGINE MYISAM_OR_MARIA VERSION 10 -ROW_FORMAT Fixed +ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# DATA_LENGTH #DL# diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341.test b/mysql-test/suite/innodb/t/innodb_bug12400341.test index 2ab1be81f6d..ab69e20c495 100644 --- a/mysql-test/suite/innodb/t/innodb_bug12400341.test +++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test @@ -7,6 +7,10 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n --skip Test requires InnoDB built with UNIV_DEBUG definition. } +# Don't test under valgrind, undo slots of the previous test might exist still +# and cause unstable result. +--source include/not_valgrind.inc + call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too"); --disable_query_log diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug12400341.test b/mysql-test/suite/innodb_plugin/t/innodb_bug12400341.test index b9e40e0dff3..2ecf30edfa7 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb_bug12400341.test +++ b/mysql-test/suite/innodb_plugin/t/innodb_bug12400341.test @@ -7,6 +7,10 @@ if (`select count(*)=0 from information_schema.global_variables where variable_n --skip Test requires InnoDB built with UNIV_DEBUG definition. } +# Don't test under valgrind, undo slots of the previous test might exist still +# and cause unstable result. +--source include/not_valgrind.inc + call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too"); --disable_query_log diff --git a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result index 412021d6446..66974762ebc 100644 --- a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result +++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result @@ -1,6 +1,18 @@ *** Set up circular replication on four servers *** include/rpl_init.inc [topology=1->2->3->4->1] +[connection server_4] +SET auto_increment_increment= 4; +SET auto_increment_offset= 4; +[connection server_3] +SET auto_increment_increment= 4; +SET auto_increment_offset= 3; +[connection server_2] +SET auto_increment_increment= 4; +SET auto_increment_offset= 2; +[connection server_1] +SET auto_increment_increment= 4; +SET auto_increment_offset= 1; *** Preparing data *** CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM; CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB; diff --git a/mysql-test/suite/rpl/r/rpl_dump_events_twice_bug.result b/mysql-test/suite/rpl/r/rpl_dump_events_twice_bug.result new file mode 100644 index 00000000000..8e6c8c122b5 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_dump_events_twice_bug.result @@ -0,0 +1,15 @@ +include/master-slave.inc +[connection master] +CALL mtr.add_suppression("Failed to read an event from active binlog.*"); +SET @debug_saved= @@GLOBAL.DEBUG; +CREATE TABLE t1(c1 INT); +INSERT INTO t1 VALUES(1); +[connection master] +SET GLOBAL debug='+d,dump_fake_io_error'; +INSERT INTO t1 VALUES(2); +INSERT INTO t1 VALUES(3); +include/diff_tables.inc [master:t1, slave:t1] +[connection master] +SET @@GLOBAL.DEBUG= @debug_saved; +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_loaddata_m.result b/mysql-test/suite/rpl/r/rpl_loaddata_m.result index ad9fb6e0896..58339811a1a 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata_m.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata_m.result @@ -32,5 +32,5 @@ SELECT COUNT(*) FROM mysqltest.t1; COUNT(*) 2 DROP DATABASE mysqltest; -DROP TABLE test.t1; +DROP TABLE IF EXISTS test.t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result index f07eaac94e9..a3cc88fe229 100644 --- a/mysql-test/suite/rpl/r/rpl_log_pos.result +++ b/mysql-test/suite/rpl/r/rpl_log_pos.result @@ -3,7 +3,7 @@ include/master-slave.inc create table if not exists t1 (n int); drop table t1; call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); -call mtr.add_suppression ("Error in Log_event::read_log_event"); +CALL mtr.add_suppression("Failed to read an event from active binlog.*"); show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB> diff --git a/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result b/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result new file mode 100644 index 00000000000..eee2effccea --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result @@ -0,0 +1,14 @@ +include/master-slave.inc +[connection master] +SET @debug_saved= @@GLOBAL.DEBUG; +CREATE TABLE t (i INT); +SET GLOBAL DEBUG= "d,wait_after_binlog_EOF"; +INSERT INTO t VALUES (1); +INSERT INTO t VALUES (2); +FLUSH LOGS; +SET DEBUG_SYNC= 'now SIGNAL signal.rotate_finished'; +include/diff_tables.inc [master:t,slave:t] +SET @@GLOBAL.DEBUG= @debug_saved; +SET DEBUG_SYNC= 'RESET'; +DROP TABLE t; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result index be8f17c6f01..5ab39a00946 100644 --- a/mysql-test/suite/rpl/r/rpl_row_until.result +++ b/mysql-test/suite/rpl/r/rpl_row_until.result @@ -27,12 +27,6 @@ n 3 4 include/check_slave_param.inc [Exec_Master_Log_Pos] -include/wait_for_slave_sql_to_stop.inc -SELECT * FROM t2; -n -1 -2 -include/check_slave_param.inc [Exec_Master_Log_Pos] START SLAVE; include/wait_for_slave_to_start.inc include/stop_slave.inc @@ -54,6 +48,18 @@ START SLAVE; START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=MASTER_LOG_POS; Warnings: Note 1254 Slave is already running -include/stop_slave.inc -RESET SLAVE; +include/start_slave.inc +Warnings: +Note 1254 Slave is already running +include/rpl_reset.inc +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1); +include/stop_slave_sql.inc +INSERT INTO t1 VALUES (2); +INSERT INTO t1 VALUES (3); +include/sync_slave_io_with_master.inc +include/wait_for_slave_sql_to_stop.inc +include/assert.inc [table t1 should have two rows.] +include/start_slave.inc +DROP TABLE t1; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stm_until.result b/mysql-test/suite/rpl/r/rpl_stm_until.result index 72495831f6e..a4a0cdaf595 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_until.result +++ b/mysql-test/suite/rpl/r/rpl_stm_until.result @@ -94,17 +94,4 @@ one 1 drop table t1; start slave; -include/rpl_reset.inc -drop table if exists t1; -stop slave; -flush logs; -flush logs; -reset slave; -start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */; -include/wait_for_slave_sql_to_stop.inc -show tables /* t1 must exist */; -Tables_in_test -t1 -drop table t1; -stop slave; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index d33f85091ff..d3339c1bfe8 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -12,5 +12,3 @@ rpl_row_create_table : Bug#11759274 Feb 27 2010 andrei failed different way than earlier with bug#45576 rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock -rpl_stm_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out -rpl_row_until @macosx : BUG#15965353 RPL.RPL_ROW_UNTIL FAILS ON PB2 , PLATFORM= MACOSX10.6 X86_64 MAX diff --git a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test index 1380b3d97cf..f1d42089869 100644 --- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test +++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test @@ -20,6 +20,18 @@ --source include/rpl_init.inc --echo +#set auto inc variables at each server +--let $_rpl_server= $rpl_server_count +while ($_rpl_server) +{ + --let $rpl_connection_name= server_$_rpl_server + --source include/rpl_connection.inc + eval SET auto_increment_increment= $rpl_server_count; + eval SET auto_increment_offset= $_rpl_server; + + --dec $_rpl_server +} + # Preparing data. --echo *** Preparing data *** --connection server_1 diff --git a/mysql-test/suite/rpl/t/rpl_dump_events_twice_bug.test b/mysql-test/suite/rpl/t/rpl_dump_events_twice_bug.test new file mode 100644 index 00000000000..de82769010e --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_dump_events_twice_bug.test @@ -0,0 +1,28 @@ +# +# Verify dump thread can send events in active file, correctly after +# encountering an IO error. +# +--source include/have_debug.inc +--source include/master-slave.inc + +CALL mtr.add_suppression("Failed to read an event from active binlog.*"); +SET @debug_saved= @@GLOBAL.DEBUG; + +CREATE TABLE t1(c1 INT); +INSERT INTO t1 VALUES(1); + +--sync_slave_with_master + +--source include/rpl_connection_master.inc +SET GLOBAL debug='+d,dump_fake_io_error'; +INSERT INTO t1 VALUES(2); +INSERT INTO t1 VALUES(3); + +--sync_slave_with_master +--let $diff_tables= master:t1, slave:t1 +--source include/diff_tables.inc + +--source include/rpl_connection_master.inc +SET @@GLOBAL.DEBUG= @debug_saved; +DROP TABLE t1; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_loaddata_m.test b/mysql-test/suite/rpl/t/rpl_loaddata_m.test index bbe11bbb887..034fefa95f5 100644 --- a/mysql-test/suite/rpl/t/rpl_loaddata_m.test +++ b/mysql-test/suite/rpl/t/rpl_loaddata_m.test @@ -46,7 +46,7 @@ SELECT COUNT(*) FROM mysqltest.t1; # Cleanup connection master; DROP DATABASE mysqltest; -DROP TABLE test.t1; +DROP TABLE IF EXISTS test.t1; sync_slave_with_master; # End of test diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test index 0e746d55935..d5a788bacd1 100644 --- a/mysql-test/suite/rpl/t/rpl_log_pos.test +++ b/mysql-test/suite/rpl/t/rpl_log_pos.test @@ -20,7 +20,7 @@ create table if not exists t1 (n int); drop table t1; call mtr.add_suppression ("Slave I/O: Got fatal error 1236 from master when reading data from binary"); -call mtr.add_suppression ("Error in Log_event::read_log_event"); +CALL mtr.add_suppression("Failed to read an event from active binlog.*"); source include/show_master_status.inc; sync_slave_with_master; source include/stop_slave.inc; diff --git a/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test b/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test new file mode 100644 index 00000000000..08884ee8e26 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test @@ -0,0 +1,51 @@ +# +# Whenever the mysql_binlog_send method (dump thread) reaches the +# end of file when reading events from the binlog, before checking +# if it should wait for more events, there was a test to check if +# the file being read was still active, i.e, it was the last known +# binlog. However, it was possible that something was written to +# the binary log and then a rotation would happen, after EOF was +# detected and before the check for active was performed. In this +# case, the end of the binary log would not be read by the dump +# thread, and this would cause the slave to lose updates. +# +# This test verifies that the problem has been fixed. It waits +# during this window while forcing a rotation in the binlog. +# +--source include/have_debug.inc +--source include/master-slave.inc + +--connection master + +SET @debug_saved= @@GLOBAL.DEBUG; + +CREATE TABLE t (i INT); + +# When reaching the EOF the dump thread will wait before deciding if +# it should move to a new binlong file. +SET GLOBAL DEBUG= "d,wait_after_binlog_EOF"; + +INSERT INTO t VALUES (1); + +--sleep 1 + +# A insert and a rotate happens before the decision +INSERT INTO t VALUES (2); +FLUSH LOGS; + +SET DEBUG_SYNC= 'now SIGNAL signal.rotate_finished'; + +--sync_slave_with_master + +# All the rows should be sent to the slave. +--let $diff_tables=master:t,slave:t +--source include/diff_tables.inc + +##Clean up +--connection master + +SET @@GLOBAL.DEBUG= @debug_saved; +SET DEBUG_SYNC= 'RESET'; + +DROP TABLE t; +--source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test index eaa99c29694..1e5bc341b1a 100644 --- a/mysql-test/suite/rpl/t/rpl_row_until.test +++ b/mysql-test/suite/rpl/t/rpl_row_until.test @@ -2,7 +2,13 @@ -- source include/have_binlog_format_row.inc -- source include/master-slave.inc -# Note: The test is dependent on binlog positions +############################################################################## +# The test is dependent on binlog positions. The test is divided into two +# sections. The first section checks START SLAVE UNTIL MASTER_LOG_FILE = +# 'log_name', MASTER_LOG_POS = log_pos followed by a couple of failure +# scenarios. The second section checks START SLAVE UNTIL RELAY_LOG_FILE = +# 'log_name', RELAY_LOG_POS = log_pos. +############################################################################## # Create some events on master connection master; @@ -22,14 +28,8 @@ let $master_pos_create_t2= query_get_value(SHOW BINLOG EVENTS, Pos, 8); INSERT INTO t2 VALUES (1),(2); save_master_pos; # Save master log position for query INSERT INTO t2 VALUES (1),(2); -let $master_pos_insert1_t2= query_get_value(SHOW BINLOG EVENTS, End_log_pos, 12); -sync_slave_with_master; - -# Save relay log position for query INSERT INTO t2 VALUES (1),(2); -let $relay_log_file= query_get_value(show slave status, Relay_Log_File,1); -let $relay_pos_insert1_t2= query_get_value(show slave status, Relay_Log_Pos, 1); +let $master_pos_insert1_t2= query_get_value(SHOW MASTER STATUS, Position, 1); -connection master; INSERT INTO t2 VALUES (3),(4); DROP TABLE t2; # Save master log position for query INSERT INTO t2 VALUES (1),(2); @@ -68,17 +68,6 @@ SELECT * FROM t1; --let $slave_param_value= $master_pos_drop_t1 --source include/check_slave_param.inc -# Try replicate all up to and not including the second insert to t2; ---disable_query_log -eval START SLAVE UNTIL RELAY_LOG_FILE='$relay_log_file', RELAY_LOG_POS=$relay_pos_insert1_t2; ---enable_query_log ---source include/wait_for_slave_sql_to_stop.inc -SELECT * FROM t2; - ---let $slave_param= Exec_Master_Log_Pos ---let $slave_param_value= $master_pos_insert1_t2 ---source include/check_slave_param.inc - # clean up START SLAVE; --source include/wait_for_slave_to_start.inc @@ -119,9 +108,49 @@ START SLAVE; --replace_result 740 MASTER_LOG_POS START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=740; ---source include/stop_slave.inc -# Clear slave IO error. -RESET SLAVE; +--source include/start_slave.inc + +############################################################################## +# The second section - checks START SLAVE UNTIL RELAY_LOG_FILE =# 'log_name', +# RELAY_LOG_POS = log_pos. This section of the test does the following: +# 1) At master, create a table and inserts a value. Let slave replicate this. +# 2) Stop slave sql thread. +# 3) Insert some more values at master. Note that io thread copies this insert +# 4) Use start slave until to start the sql thread and check if it +# stops at the correct position. +############################################################################## ---let $rpl_only_running_threads= 1 +--source include/rpl_reset.inc + +--connection master +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1); + +--sync_slave_with_master +--source include/stop_slave_sql.inc + +--connection master +INSERT INTO t1 VALUES (2); +--let $master_log_pos= query_get_value(SHOW MASTER STATUS, Position, 1) +INSERT INTO t1 VALUES (3); + +--source include/sync_slave_io_with_master.inc + +--let $relay_log_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File,1) +--source include/get_relay_log_pos.inc + +--disable_query_log +--eval start slave until relay_log_file='$relay_log_file', relay_log_pos=$relay_log_pos +--enable_query_log +--source include/wait_for_slave_sql_to_stop.inc + +--let $assert_cond= COUNT(*) = 2 FROM t1 +--let $assert_text= table t1 should have two rows. +--source include/assert.inc + +#cleanup +--source include/start_slave.inc +--connection master +DROP TABLE t1; +--sync_slave_with_master --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stm_until.test b/mysql-test/suite/rpl/t/rpl_stm_until.test index feac9b21c84..3db3731194e 100644 --- a/mysql-test/suite/rpl/t/rpl_stm_until.test +++ b/mysql-test/suite/rpl/t/rpl_stm_until.test @@ -184,44 +184,6 @@ connection slave; start slave; sync_with_master; - # Bug #47142 "slave start until" stops 1 event too late in 4.1 to 5.0 replication -# -# testing fixes that refine the start position of prior-5.0 master's event -# and by that provide correct execution of -# START SLAVE UNTIL ... master_log_pos= x; -# Keep the test at the end of the file because it manipulates with binlog files -# to substitute the genuine one with a prepared on 4.1 server. -# - ---source include/rpl_reset.inc - -connection master; ---disable_warnings -drop table if exists t1; # there is create table t1 in bug47142_master-bin.000001 ---enable_warnings -sync_slave_with_master; -connection slave; -stop slave; -connection master; - -flush logs; -let $MYSQLD_DATADIR= `select @@datadir`; ---remove_file $MYSQLD_DATADIR/master-bin.000001 ---copy_file $MYSQL_TEST_DIR/std_data/bug47142_master-bin.000001 $MYSQLD_DATADIR/master-bin.000001 -flush logs; - -connection slave; -reset slave; -start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */; ---source include/wait_for_slave_sql_to_stop.inc - -show tables /* t1 must exist */; - -# clean-up of Bug #47142 testing - -drop table t1; # drop on slave only, master does not have t1. -stop slave; - # End of tests --let $rpl_only_running_threads= 1 --source include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result new file mode 100644 index 00000000000..459ad95bdc6 --- /dev/null +++ b/mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result @@ -0,0 +1,7 @@ +SELECT @@global.innodb_buffer_pool_evict; +@@global.innodb_buffer_pool_evict + +SET GLOBAL innodb_buffer_pool_evict = 'uncompressed'; +SELECT @@global.innodb_buffer_pool_evict; +@@global.innodb_buffer_pool_evict + diff --git a/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result b/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result index bdb586e84c2..ede412c28b7 100644 --- a/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result +++ b/mysql-test/suite/sys_vars/r/rpl_init_slave_func.result @@ -1,9 +1,5 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; +include/master-slave.inc +[connection master] connection slave SET @start_max_connections= @@global.max_connections; SET @start_init_slave= @@global.init_slave; @@ -18,23 +14,19 @@ SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connec @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1' 1 Expect 1 -SELECT @@global.max_connections= @start_max_connections; -@@global.max_connections= @start_max_connections -1 -Expect 1 +include/assert.inc [@@global.max_connections = @start_max_connections] STOP SLAVE; RESET MASTER; RESET SLAVE; START SLAVE; -SELECT @@global.max_connections = @start_max_connections + 1; -@@global.max_connections = @start_max_connections + 1 -1 -Expect 1 +include/wait_for_slave_to_start.inc +include/assert.inc [@@global.max_connections = @start_max_connections + 1] SET @@global.init_slave = "SET @a=5"; STOP SLAVE; RESET MASTER; RESET SLAVE; START SLAVE; +include/wait_for_slave_to_start.inc SHOW VARIABLES LIKE 'init_slave'; Variable_name Value init_slave SET @a=5 @@ -44,3 +36,4 @@ NULL Expect NULL SET @@global.max_connections= @start_max_connections; SET @@global.init_slave= @start_init_slave; +include/rpl_end.inc diff --git a/mysql-test/suite/sys_vars/t/disabled.def b/mysql-test/suite/sys_vars/t/disabled.def index 866172fb51a..98625a2ec54 100644 --- a/mysql-test/suite/sys_vars/t/disabled.def +++ b/mysql-test/suite/sys_vars/t/disabled.def @@ -9,5 +9,14 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -sys_vars.max_binlog_cache_size_basic_64 : bug#11763668 2010-08-31 Horst -sys_vars.max_binlog_cache_size_basic_32 : bug#11763668 2010-08-31 Horst +sys_vars.max_allowed_packet_basic : bug#16295372 2013-02-09 veduggir +sys_vars.max_allowed_packet_func : bug#16295372 2013-02-09 veduggir +sys_vars.net_buffer_length_basic : bug#16295372 2013-02-09 veduggir +sys_vars.insert_id_basic : bug#16295418 2013-02-09 veduggir +sys_vars.key_cache_age_threshold_basic_64 : bug#16295418 2013-02-09 veduggir +sys_vars.key_cache_block_size_basic_64 : bug#16295418 2013-02-09 veduggir +sys_vars.key_cache_division_limit_basic_64 : bug#16295418 2013-02-09 veduggir +sys_vars.identity_basic : bug#16295418 2013-02-09 veduggir +sys_vars.key_buffer_size_basic_64 : bug#16295418 2013-02-09 veduggir +sys_vars.key_buffer_size_func : bug#16295418 2013-02-09 veduggir +sys_vars.timestamp_basic_64 : bug#16295457 2013-02-09 veduggir diff --git a/mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test new file mode 100644 index 00000000000..2350d55c57b --- /dev/null +++ b/mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test @@ -0,0 +1,10 @@ +-- source include/have_innodb_plugin.inc +# This is a debug variable for now +-- source include/have_debug.inc + +SELECT @@global.innodb_buffer_pool_evict; + +SET GLOBAL innodb_buffer_pool_evict = 'uncompressed'; + +# Should always be empty. +SELECT @@global.innodb_buffer_pool_evict; diff --git a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test index d4607dc6bf1..edc77816c9c 100644 --- a/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test +++ b/mysql-test/suite/sys_vars/t/rpl_init_slave_func.test @@ -59,8 +59,9 @@ let $wait_timeout= 240; let $wait_condition= SELECT @@global.max_connections = @start_max_connections; --source include/wait_condition_sp.inc # check that the action in init_slave does not happen immediately -SELECT @@global.max_connections= @start_max_connections; ---echo Expect 1 +--let $assert_text= @@global.max_connections = @start_max_connections +--let $assert_cond= @@global.max_connections = @start_max_connections +--source include/assert.inc # # reset of the server STOP SLAVE; @@ -75,8 +76,9 @@ let $wait_timeout= 90; let $wait_condition= SELECT @@global.max_connections = @start_max_connections + 1; --source include/wait_condition_sp.inc # check that the action in init_slave was executed and had the intended effect -SELECT @@global.max_connections = @start_max_connections + 1; ---echo Expect 1 +--let $assert_text= @@global.max_connections = @start_max_connections + 1 +--let $assert_cond= @@global.max_connections = @start_max_connections + 1 +--source include/assert.inc # # Setting a variable(which is local to a session) and must not be visible SET @@global.init_slave = "SET @a=5"; |