mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
5.5 merge
This commit is contained in:
@@ -21,4 +21,7 @@ master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp1 LIKE tmp
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp
|
||||
DROP TEMPORARY TABLE tmp;
|
||||
DROP TEMPORARY TABLE tmp1;
|
||||
DROP TEMPORARY TABLE tmp2;
|
||||
include/rpl_end.inc
|
||||
|
14
mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result
Normal file
14
mysql-test/suite/rpl/r/rpl_lost_events_on_rotate.result
Normal file
@@ -0,0 +1,14 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
SET @debug_saved= @@GLOBAL.DEBUG_DBUG;
|
||||
CREATE TABLE t (i INT);
|
||||
SET GLOBAL DEBUG_DBUG= "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_DBUG= @debug_saved;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
DROP TABLE t;
|
||||
include/rpl_end.inc
|
@@ -8,4 +8,5 @@ SET DEBUG_SYNC= "now WAIT_FOR m1_ready";
|
||||
SET GLOBAL rpl_semi_sync_master_enabled = OFF;
|
||||
SET DEBUG_SYNC= "now SIGNAL m1_cont";
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
include/rpl_end.inc
|
||||
|
@@ -43,4 +43,5 @@ t5 CREATE TABLE `t5` (
|
||||
`created` datetime DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t2,t3,t5;
|
||||
drop temporary table t4;
|
||||
include/rpl_end.inc
|
||||
|
@@ -1604,8 +1604,14 @@ master-bin.000001 # Query # # COMMIT
|
||||
SET @commands= 'clean';
|
||||
DROP TABLE IF EXISTS tt_xx_1;
|
||||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1;
|
||||
DROP TABLE IF EXISTS nt_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
|
||||
DROP TABLE IF EXISTS nt_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
|
||||
DROP TABLE IF EXISTS tt_2;
|
||||
DROP TABLE IF EXISTS tt_1;
|
||||
SET @commands= '';
|
||||
|
@@ -98,6 +98,7 @@ count(*)
|
||||
103
|
||||
unlock tables;
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
drop temporary table temp_table;
|
||||
End of 4.1 tests
|
||||
show binlog events in 'non existing_binlog_file';
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
||||
|
@@ -1667,8 +1667,14 @@ master-bin.000001 # Query # # COMMIT
|
||||
SET @commands= 'clean';
|
||||
DROP TABLE IF EXISTS tt_xx_1;
|
||||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1;
|
||||
DROP TABLE IF EXISTS nt_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
|
||||
DROP TABLE IF EXISTS nt_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
|
||||
DROP TABLE IF EXISTS tt_2;
|
||||
DROP TABLE IF EXISTS tt_1;
|
||||
SET @commands= '';
|
||||
|
@@ -23,6 +23,7 @@ include/start_slave.inc
|
||||
show status like 'slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 0
|
||||
drop temporary table if exists t1;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
include/check_slave_no_error.inc
|
||||
|
@@ -48,6 +48,7 @@ select (@id := id) - id from t2;
|
||||
0
|
||||
kill @id;
|
||||
drop table t2;
|
||||
drop temporary table t3;
|
||||
Got one of the listed errors
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1927]
|
||||
select count(*) from t1;
|
||||
|
@@ -1654,8 +1654,14 @@ master-bin.000001 # Query # # ROLLBACK
|
||||
SET @commands= 'clean';
|
||||
DROP TABLE IF EXISTS tt_xx_1;
|
||||
DROP TABLE IF EXISTS nt_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_xx_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_xx_1;
|
||||
DROP TABLE IF EXISTS nt_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_2;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_2;
|
||||
DROP TABLE IF EXISTS nt_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS tt_tmp_1;
|
||||
DROP TEMPORARY TABLE IF EXISTS nt_tmp_1;
|
||||
DROP TABLE IF EXISTS tt_2;
|
||||
DROP TABLE IF EXISTS tt_1;
|
||||
SET @commands= '';
|
||||
|
@@ -79,6 +79,7 @@ COUNT(*)
|
||||
FLUSH LOGS;
|
||||
-------- switch to master --------
|
||||
FLUSH LOGS;
|
||||
DROP TEMPORARY TABLE IF EXISTS mysqltest1.tmp2;
|
||||
DROP DATABASE mysqltest1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
|
@@ -23,6 +23,7 @@ include/start_slave.inc
|
||||
show status like 'slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 1
|
||||
drop temporary table if exists t1;
|
||||
include/stop_slave.inc
|
||||
reset slave;
|
||||
include/check_slave_no_error.inc
|
||||
|
@@ -113,7 +113,6 @@ ROLLBACK;
|
||||
[connection master]
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR signal.continued';
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
[connection slave]
|
||||
include/wait_for_slave_to_stop.inc
|
||||
[connection slave1]
|
||||
@@ -121,3 +120,4 @@ include/start_slave.inc
|
||||
[connection master]
|
||||
DROP TABLE t1, t2;
|
||||
include/rpl_end.inc
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
@@ -38,4 +38,8 @@ CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
|
||||
CREATE TEMPORARY TABLE IF NOT EXISTS tmp2 SELECT * FROM tmp;
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
DROP TEMPORARY TABLE tmp;
|
||||
DROP TEMPORARY TABLE tmp1;
|
||||
DROP TEMPORARY TABLE tmp2;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
51
mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test
Normal file
51
mysql-test/suite/rpl/t/rpl_lost_events_on_rotate.test
Normal file
@@ -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_DBUG;
|
||||
|
||||
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_DBUG= "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_DBUG= @debug_saved;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
DROP TABLE t;
|
||||
--source include/rpl_end.inc
|
@@ -27,5 +27,6 @@ SET DEBUG_SYNC= "now SIGNAL m1_cont";
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
@@ -44,6 +44,7 @@ show create table t3;
|
||||
show create table t5;
|
||||
connection master;
|
||||
drop table t2,t3,t5;
|
||||
drop temporary table t4;
|
||||
sync_slave_with_master;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@@ -176,6 +176,7 @@ unlock tables;
|
||||
#clean up
|
||||
connection master;
|
||||
drop table if exists t1,t2,t3,t4;
|
||||
drop temporary table temp_table;
|
||||
sync_slave_with_master;
|
||||
|
||||
--echo End of 4.1 tests
|
||||
|
@@ -92,8 +92,8 @@ let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHE
|
||||
source include/wait_condition.inc;
|
||||
select (@id := id) - id from t2;
|
||||
kill @id;
|
||||
# We don't drop t3 as this is a temporary table
|
||||
drop table t2;
|
||||
drop temporary table t3;
|
||||
connection master;
|
||||
# The get_lock function causes warning for unsafe statement.
|
||||
--disable_warnings
|
||||
|
@@ -107,7 +107,6 @@ ROLLBACK;
|
||||
--source include/rpl_connection_master.inc
|
||||
SET DEBUG_SYNC= 'now SIGNAL signal.continue';
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR signal.continued';
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
||||
--source include/rpl_connection_slave.inc
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
@@ -122,3 +121,4 @@ DROP TABLE t1, t2;
|
||||
eval SET GLOBAL debug_dbug= '$debug_save';
|
||||
--enable_query_log
|
||||
--source include/rpl_end.inc
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
|
Reference in New Issue
Block a user