mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-new-rpl
into dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl
This commit is contained in:
commit
45eab6d350
16 changed files with 221 additions and 65 deletions
33
mysql-test/include/wait_for_binlog_event.inc
Normal file
33
mysql-test/include/wait_for_binlog_event.inc
Normal file
|
@ -0,0 +1,33 @@
|
|||
# include/wait_for_binlog_event.inc
|
||||
#
|
||||
# SUMMARY
|
||||
#
|
||||
# Waits until SHOW BINLOG EVENTS has returned in last event a specified substring.
|
||||
#
|
||||
# USAGE
|
||||
#
|
||||
# let $wait_binlog_event= DROP;
|
||||
# --source include/wait_for_binlog_event.inc
|
||||
|
||||
let $_loop_count= 300;
|
||||
let $_last_event= ;
|
||||
let $_event_pos= 1;
|
||||
|
||||
while (`SELECT INSTR("$_last_event","$wait_binlog_event") = 0`)
|
||||
{
|
||||
dec $_loop_count;
|
||||
if (!$_loop_count)
|
||||
{
|
||||
SHOW BINLOG EVENTS;
|
||||
--die ERROR: failed while waiting for $wait_binlog_event in binlog
|
||||
}
|
||||
real_sleep 0.1;
|
||||
let $_event= query_get_value(SHOW BINLOG EVENTS, Info, $_event_pos);
|
||||
let $_last_event= $_event;
|
||||
while (`SELECT "$_event" != "No such row"`)
|
||||
{
|
||||
inc $_event_pos;
|
||||
let $_last_event= $_event;
|
||||
let $_event= query_get_value(SHOW BINLOG EVENTS, Info, $_event_pos);
|
||||
}
|
||||
}
|
|
@ -3,8 +3,8 @@ CREATE TABLE t1b (b INT, c INT) ENGINE=BLACKHOLE;
|
|||
CREATE TABLE t1n (e INT, f INT) ENGINE=NDB;
|
||||
RESET MASTER;
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
|
||||
*** Please look in binlog_multi_engine.test if you have a diff here ****
|
||||
START TRANSACTION;
|
||||
|
@ -17,30 +17,28 @@ TRUNCATE t1b;
|
|||
TRUNCATE t1n;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1m
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1b
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1n)
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1m
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1b
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1n
|
||||
RESET MASTER;
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
|
||||
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
|
||||
|
@ -52,21 +50,19 @@ TRUNCATE t1b;
|
|||
TRUNCATE t1n;
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; BEGIN
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c
|
||||
master-bin.000001 # Query # # use `test`; COMMIT
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1m
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1b
|
||||
master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2)
|
||||
master-bin.000001 # Query # # BEGIN
|
||||
master-bin.000001 # Table_map # # table_id: # (test.t1n)
|
||||
master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 # Write_rows # # table_id: #
|
||||
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||
master-bin.000001 # Query # # COMMIT
|
||||
master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1m
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1b
|
||||
master-bin.000001 # Query # # use `test`; TRUNCATE t1n
|
||||
RESET MASTER;
|
||||
SET SESSION BINLOG_FORMAT=ROW;
|
||||
|
|
|
@ -15,11 +15,16 @@ RESET MASTER;
|
|||
|
||||
SET SESSION BINLOG_FORMAT=STATEMENT;
|
||||
|
||||
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
|
||||
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
|
||||
|
||||
# Here and below we need to wait when some event appears in binlog
|
||||
# to avoid unsrted mixing local events and from NDB
|
||||
let $wait_binlog_event= t1m, t1b;
|
||||
source include/wait_for_binlog_event.inc;
|
||||
|
||||
echo *** Please look in binlog_multi_engine.test if you have a diff here ****;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
|
@ -27,20 +32,33 @@ UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
|
|||
UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c;
|
||||
COMMIT;
|
||||
|
||||
let $wait_binlog_event= COMMIT;
|
||||
source include/wait_for_binlog_event.inc;
|
||||
|
||||
TRUNCATE t1m;
|
||||
TRUNCATE t1b;
|
||||
TRUNCATE t1n;
|
||||
|
||||
let $wait_binlog_event= t1n;
|
||||
source include/wait_for_binlog_event.inc;
|
||||
|
||||
source include/show_binlog_events.inc;
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
SET SESSION BINLOG_FORMAT=MIXED;
|
||||
|
||||
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
|
||||
let $wait_binlog_event= t1m;
|
||||
source include/wait_for_binlog_event.inc;
|
||||
|
||||
INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2);
|
||||
|
||||
let $wait_binlog_event= COMMIT;
|
||||
source include/wait_for_binlog_event.inc;
|
||||
|
||||
UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c;
|
||||
error ER_BINLOG_LOGGING_IMPOSSIBLE;
|
||||
UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f;
|
||||
|
|
|
@ -9,4 +9,3 @@
|
|||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
binlog_multi_engine : Bug#32663 binlog_multi_engine.test fails randomly
|
||||
|
|
23
mysql-test/suite/bugs/r/rpl_bug23533.result
Normal file
23
mysql-test/suite/bugs/r/rpl_bug23533.result
Normal file
|
@ -0,0 +1,23 @@
|
|||
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;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
SET AUTOCOMMIT=0;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
SHOW VARIABLES LIKE 'max_binlog_cache_size';
|
||||
Variable_name Value
|
||||
max_binlog_cache_size 4096
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1000
|
||||
START TRANSACTION;
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
ERROR HY000: Writing one row to the row-based binary log failed
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
Tables_in_test (t%)
|
||||
t1
|
43
mysql-test/suite/bugs/t/rpl_bug23533.test
Normal file
43
mysql-test/suite/bugs/t/rpl_bug23533.test
Normal file
|
@ -0,0 +1,43 @@
|
|||
#############################################################
|
||||
# Author: Serge Kozlov <skozlov@mysql.com>
|
||||
# Date: 02/26/2008
|
||||
# Purpose: testing bug report
|
||||
# Bug#23533: CREATE SELECT max_binlog_cache_size test
|
||||
# case needed
|
||||
#############################################################
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--source include/master-slave.inc
|
||||
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
--enable_warnings
|
||||
|
||||
SET AUTOCOMMIT=0;
|
||||
SET GLOBAL max_binlog_cache_size=4096;
|
||||
SHOW VARIABLES LIKE 'max_binlog_cache_size';
|
||||
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB;
|
||||
|
||||
--disable_query_log
|
||||
let $i= 1000;
|
||||
while ($i)
|
||||
{
|
||||
eval INSERT INTO t1 VALUES($i, REPEAT('x', 4096));
|
||||
dec $i;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
# Copied data from t1 into t2 large than max_binlog_cache_size
|
||||
START TRANSACTION;
|
||||
--error 1534
|
||||
CREATE TABLE t2 SELECT * FROM t1;
|
||||
COMMIT;
|
||||
SHOW TABLES LIKE 't%';
|
||||
|
||||
|
||||
# 5.1 End of Test
|
|
@ -23,7 +23,7 @@ start slave;
|
|||
let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%' ;
|
||||
|
||||
--source include/wait_slave_status.inc
|
||||
flush logs;
|
||||
FLUSH LOGS;
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
|
@ -31,7 +31,7 @@ Master_User root
|
|||
Master_Port SLAVE_PORT
|
||||
Connect_Retry 60
|
||||
Master_Log_File slave-bin.000001
|
||||
Read_Master_Log_Pos 216
|
||||
Read_Master_Log_Pos POSITION
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File slave-bin.000001
|
||||
|
@ -46,7 +46,7 @@ Replicate_Wild_Ignore_Table
|
|||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 216
|
||||
Exec_Master_Log_Pos POSITION
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
|
|
|
@ -116,23 +116,23 @@ t12
|
|||
t13
|
||||
t2
|
||||
t3
|
||||
SELECT table_name FROM information_schema.views WHERE table_schema='test' ORDER BY table_name;
|
||||
SELECT table_name FROM information_schema.views WHERE table_schema='test';
|
||||
table_name
|
||||
v1
|
||||
v11
|
||||
SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test' ORDER BY trigger_name;
|
||||
SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test';
|
||||
trigger_name event_manipulation event_object_table
|
||||
t11_tr1 INSERT t11
|
||||
t11_tr2 UPDATE t11
|
||||
t1_tr1 INSERT t1
|
||||
t1_tr2 UPDATE t1
|
||||
SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test' ORDER BY routine_name;
|
||||
SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test';
|
||||
routine_type routine_name
|
||||
FUNCTION f1
|
||||
FUNCTION f2
|
||||
PROCEDURE p1
|
||||
PROCEDURE p11
|
||||
SELECT event_name, status FROM information_schema.events WHERE event_schema='test' ORDER BY event_name;
|
||||
SELECT event_name, status FROM information_schema.events WHERE event_schema='test';
|
||||
event_name status
|
||||
e1 DISABLED
|
||||
e11 DISABLED
|
||||
|
@ -276,23 +276,23 @@ t12
|
|||
t13
|
||||
t2
|
||||
t3
|
||||
SELECT table_name FROM information_schema.views WHERE table_schema='test' ORDER BY table_name;
|
||||
SELECT table_name FROM information_schema.views WHERE table_schema='test';
|
||||
table_name
|
||||
v1
|
||||
v11
|
||||
SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test' ORDER BY trigger_name;
|
||||
SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test';
|
||||
trigger_name event_manipulation event_object_table
|
||||
t11_tr1 INSERT t11
|
||||
t11_tr2 UPDATE t11
|
||||
t1_tr1 INSERT t1
|
||||
t1_tr2 UPDATE t1
|
||||
SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test' ORDER BY routine_name;
|
||||
SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test';
|
||||
routine_type routine_name
|
||||
FUNCTION f1
|
||||
FUNCTION f2
|
||||
PROCEDURE p1
|
||||
PROCEDURE p11
|
||||
SELECT event_name, status FROM information_schema.events WHERE event_schema='test' ORDER BY event_name;
|
||||
SELECT event_name, status FROM information_schema.events WHERE event_schema='test';
|
||||
event_name status
|
||||
e1 SLAVESIDE_DISABLED
|
||||
e11 SLAVESIDE_DISABLED
|
||||
|
|
|
@ -13,6 +13,7 @@ DROP TABLE IF EXISTS mysqltest1.t3;
|
|||
DROP TABLE IF EXISTS mysqltest1.t1;
|
||||
DROP TABLE IF EXISTS mysqltest1.t2;
|
||||
DROP TABLE IF EXISTS mysqltest1.t4;
|
||||
DROP TABLE IF EXISTS mysqltest1.t10;
|
||||
CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a));
|
||||
CREATE TABLE mysqltest1.t2 (a INT, c CHAR(6),PRIMARY KEY(a));
|
||||
CREATE TABLE mysqltest1.t3 (a INT, c CHAR(6), c2 CHAR(6), PRIMARY KEY(a));
|
||||
|
@ -35,6 +36,7 @@ a c c2
|
|||
1 Thank GOD
|
||||
2 it is
|
||||
3 Friday TGIF
|
||||
CREATE TABLE mysqltest1.t10 (a INT, PRIMARY KEY(a));
|
||||
SELECT * FROM mysqltest1.v2;
|
||||
qty price value
|
||||
3 50 150
|
||||
|
@ -98,4 +100,5 @@ DROP TABLE IF EXISTS mysqltest1.t3;
|
|||
DROP TABLE IF EXISTS mysqltest1.t1;
|
||||
DROP TABLE IF EXISTS mysqltest1.t2;
|
||||
DROP TABLE IF EXISTS mysqltest1.t4;
|
||||
DROP TABLE IF EXISTS mysqltest1.t10;
|
||||
DROP DATABASE mysqltest1;
|
||||
|
|
|
@ -15,8 +15,10 @@ connection master;
|
|||
insert into t1 values(1);
|
||||
insert into t1 values(2);
|
||||
save_master_pos;
|
||||
let $slave_param= Read_Master_Log_Pos;
|
||||
let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
|
||||
connection slave;
|
||||
--real_sleep 3 # wait for I/O thread to have read updates
|
||||
source include/wait_for_slave_param.inc;
|
||||
stop slave;
|
||||
source include/show_slave_status2.inc;
|
||||
change master to master_user='root';
|
||||
|
|
|
@ -6,19 +6,25 @@
|
|||
# to work around NDB's issue with temp tables
|
||||
##############################################
|
||||
source include/master-slave.inc;
|
||||
source include/have_binlog_format_mixed_or_statement.inc;
|
||||
|
||||
--disable_warnings
|
||||
create database if not exists mysqltest;
|
||||
--enable_warnings
|
||||
|
||||
create temporary table mysqltest.t1 (n int)ENGINE=MyISAM;
|
||||
create temporary table mysqltest.t2 (n int)ENGINE=MyISAM;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
disconnect master;
|
||||
connection slave;
|
||||
--real_sleep 3 # time for DROP to be written
|
||||
show status like 'Slave_open_temp_tables';
|
||||
|
||||
connection master1;
|
||||
# Wait until drop of temp tables appears in binlog
|
||||
let $wait_binlog_event= DROP;
|
||||
source include/wait_for_binlog_event.inc;
|
||||
|
||||
sync_slave_with_master;
|
||||
show status like 'Slave_open_temp_tables';
|
||||
# Cleanup
|
||||
connection default;
|
||||
drop database mysqltest;
|
||||
|
|
|
@ -35,12 +35,35 @@ let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%
|
|||
#
|
||||
# Flush logs of slave
|
||||
#
|
||||
flush logs;
|
||||
sleep 5;
|
||||
# Create full loop by following way:
|
||||
# 1. Insert into t1 on master (1st).
|
||||
# 2. Insert into t1 on slave (2nd) when the event (1st) for t1 replicated.
|
||||
# 3. Master waits until the event (2nd) for t1 will be replicated.
|
||||
|
||||
--disable_query_log
|
||||
CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM;
|
||||
let $wait_binlog_event= CREATE TABLE t1;
|
||||
--source include/wait_for_binlog_event.inc
|
||||
sync_slave_with_master;
|
||||
connection master;
|
||||
INSERT INTO t1 VALUE(1);
|
||||
--enable_query_log
|
||||
FLUSH LOGS;
|
||||
connection slave;
|
||||
let $wait_condition= SELECT COUNT(*) = 1 FROM t1;
|
||||
-- source include/wait_condition.inc
|
||||
--disable_query_log
|
||||
INSERT INTO t1 VALUE(2);
|
||||
--enable_query_log
|
||||
connection master;
|
||||
let $wait_condition= SELECT COUNT(*) = 2 FROM t1;
|
||||
-- source include/wait_condition.inc
|
||||
--enable_query_log
|
||||
|
||||
#
|
||||
# Show status of slave
|
||||
#
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
let $pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT $pos POSITION
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
|
|
|
@ -201,11 +201,16 @@ SET GLOBAL EVENT_SCHEDULER = off;
|
|||
|
||||
# Check original objects
|
||||
--echo
|
||||
--sorted_result
|
||||
SHOW TABLES LIKE 't%';
|
||||
SELECT table_name FROM information_schema.views WHERE table_schema='test' ORDER BY table_name;
|
||||
SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test' ORDER BY trigger_name;
|
||||
SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test' ORDER BY routine_name;
|
||||
SELECT event_name, status FROM information_schema.events WHERE event_schema='test' ORDER BY event_name;
|
||||
--sorted_result
|
||||
SELECT table_name FROM information_schema.views WHERE table_schema='test';
|
||||
--sorted_result
|
||||
SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test';
|
||||
--sorted_result
|
||||
SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test';
|
||||
--sorted_result
|
||||
SELECT event_name, status FROM information_schema.events WHERE event_schema='test';
|
||||
|
||||
# Check original data
|
||||
--echo
|
||||
|
@ -228,11 +233,16 @@ SELECT a,b FROM v11 ORDER BY a;
|
|||
|
||||
# Check replicated objects
|
||||
--echo
|
||||
--sorted_result
|
||||
SHOW TABLES LIKE 't%';
|
||||
SELECT table_name FROM information_schema.views WHERE table_schema='test' ORDER BY table_name;
|
||||
SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test' ORDER BY trigger_name;
|
||||
SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test' ORDER BY routine_name;
|
||||
SELECT event_name, status FROM information_schema.events WHERE event_schema='test' ORDER BY event_name;
|
||||
--sorted_result
|
||||
SELECT table_name FROM information_schema.views WHERE table_schema='test';
|
||||
--sorted_result
|
||||
SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test';
|
||||
--sorted_result
|
||||
SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test';
|
||||
--sorted_result
|
||||
SELECT event_name, status FROM information_schema.events WHERE event_schema='test';
|
||||
|
||||
# Check replicated data
|
||||
--echo
|
||||
|
|
|
@ -14,23 +14,10 @@ connection slave;
|
|||
reset slave;
|
||||
start slave io_thread;
|
||||
# Give the I/O thread time to block.
|
||||
let $run= 1;
|
||||
let $counter= 300;
|
||||
while ($run)
|
||||
{
|
||||
let $io_state= query_get_value("SHOW SLAVE STATUS", Slave_IO_State, 1);
|
||||
if (`SELECT '$io_state' = 'Waiting for the slave SQL thread to free enough relay log space'`){
|
||||
let $run= 0;
|
||||
}
|
||||
sleep 0.1;
|
||||
if (!$counter){
|
||||
--echo "Failed while waiting for slave IO thread block"
|
||||
SHOW SLAVE STATUS;
|
||||
exit;
|
||||
}
|
||||
dec $counter;
|
||||
}
|
||||
sleep 2;
|
||||
let $slave_param= Slave_IO_State;
|
||||
let $slave_param_value= Waiting for the slave SQL thread to free enough relay log space;
|
||||
source include/wait_for_slave_param.inc;
|
||||
|
||||
# A bug caused the I/O thread to refuse stopping.
|
||||
stop slave io_thread;
|
||||
reset slave;
|
||||
|
|
|
@ -23,6 +23,7 @@ DROP TABLE IF EXISTS mysqltest1.t3;
|
|||
DROP TABLE IF EXISTS mysqltest1.t1;
|
||||
DROP TABLE IF EXISTS mysqltest1.t2;
|
||||
DROP TABLE IF EXISTS mysqltest1.t4;
|
||||
DROP TABLE IF EXISTS mysqltest1.t10;
|
||||
|
||||
# Begin test section 1
|
||||
CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a));
|
||||
|
@ -43,12 +44,18 @@ CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL
|
|||
|
||||
SELECT * FROM mysqltest1.v2;
|
||||
SELECT * FROM mysqltest1.v1;
|
||||
# Had to add a sleep for use with NDB
|
||||
|
||||
|
||||
# Had to add a waiting for use with NDB
|
||||
# engine. Injector thread would have not
|
||||
# populated biblog and data would not be on
|
||||
# populated binlog and data would not be on
|
||||
# the slave.
|
||||
sleep 10;
|
||||
sync_slave_with_master;
|
||||
|
||||
CREATE TABLE mysqltest1.t10 (a INT, PRIMARY KEY(a));
|
||||
let $wait_binlog_event= CREATE TABLE mysqltest1.t10;
|
||||
-- source include/wait_for_binlog_event.inc
|
||||
--sync_slave_with_master
|
||||
|
||||
SELECT * FROM mysqltest1.v2;
|
||||
SELECT * FROM mysqltest1.v1;
|
||||
connection master;
|
||||
|
@ -82,6 +89,7 @@ DROP TABLE IF EXISTS mysqltest1.t3;
|
|||
DROP TABLE IF EXISTS mysqltest1.t1;
|
||||
DROP TABLE IF EXISTS mysqltest1.t2;
|
||||
DROP TABLE IF EXISTS mysqltest1.t4;
|
||||
DROP TABLE IF EXISTS mysqltest1.t10;
|
||||
DROP DATABASE mysqltest1;
|
||||
sync_slave_with_master;
|
||||
|
||||
|
|
|
@ -27,7 +27,12 @@ show status like 'Slave_open_temp_tables';
|
|||
|
||||
# Disconnect the master, temp table on slave should dissapear
|
||||
disconnect master;
|
||||
--real_sleep 3 # time for DROP to be read by slave
|
||||
|
||||
connection master1;
|
||||
# Wait until drop of temp tables appers in binlog
|
||||
let $wait_binlog_event= DROP;
|
||||
source include/wait_for_binlog_event.inc;
|
||||
|
||||
connection slave;
|
||||
show status like 'Slave_open_temp_tables';
|
||||
|
||||
|
|
Loading…
Reference in a new issue