1
0
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:
Sergei Golubchik
2014-02-01 00:54:03 +01:00
304 changed files with 12473 additions and 942 deletions

View File

@@ -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

View 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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';