mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge of 5.1-main into 5.1-maria; MyISAM changes are also ported to Maria.
This commit is contained in:
@ -419,7 +419,7 @@ connection master;
|
||||
update t31 set f5=555555555555555 where f3=6;
|
||||
update t31 set f2=2 where f3=2;
|
||||
update t31 set f1=NULL where f3=1;
|
||||
update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3;
|
||||
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
|
||||
|
||||
--echo
|
||||
--echo ** Delete from Master **
|
||||
|
@ -9,27 +9,8 @@
|
||||
|
||||
--source include/master-slave.inc
|
||||
|
||||
let $format = STATEMENT;
|
||||
let $stmt = TRUNCATE TABLE;
|
||||
let $trunc_stmt = TRUNCATE TABLE;
|
||||
--source extra/rpl_tests/rpl_truncate_helper.test
|
||||
|
||||
let $format = MIXED;
|
||||
let $stmt = TRUNCATE TABLE;
|
||||
let $trunc_stmt = DELETE FROM;
|
||||
--source extra/rpl_tests/rpl_truncate_helper.test
|
||||
|
||||
let $format = ROW;
|
||||
let $stmt = TRUNCATE TABLE;
|
||||
--source extra/rpl_tests/rpl_truncate_helper.test
|
||||
|
||||
let $format = STATEMENT;
|
||||
let $stmt = DELETE FROM;
|
||||
--source extra/rpl_tests/rpl_truncate_helper.test
|
||||
|
||||
let $format = MIXED;
|
||||
let $stmt = DELETE FROM;
|
||||
--source extra/rpl_tests/rpl_truncate_helper.test
|
||||
|
||||
let $format = ROW;
|
||||
let $stmt = DELETE FROM;
|
||||
--source extra/rpl_tests/rpl_truncate_helper.test
|
||||
|
||||
|
@ -1,47 +1,35 @@
|
||||
connection slave;
|
||||
STOP SLAVE;
|
||||
source include/wait_for_slave_to_stop.inc;
|
||||
connection master;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
RESET SLAVE;
|
||||
START SLAVE;
|
||||
source include/reset_master_and_slave.inc;
|
||||
|
||||
--echo **** On Master ****
|
||||
connection master;
|
||||
SET @old_session_binlog_format= @@session.binlog_format;
|
||||
SET @old_global_binlog_format= @@global.binlog_format;
|
||||
|
||||
eval SET SESSION BINLOG_FORMAT=$format;
|
||||
eval SET GLOBAL BINLOG_FORMAT=$format;
|
||||
|
||||
eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
SELECT * FROM t1;
|
||||
--echo **** On Slave ****
|
||||
sync_slave_with_master;
|
||||
INSERT INTO t1 VALUE (3,3);
|
||||
SELECT * FROM t1;
|
||||
--echo **** On Master ****
|
||||
connection master;
|
||||
eval $stmt t1;
|
||||
SELECT * FROM t1;
|
||||
--echo **** On Slave ****
|
||||
eval $trunc_stmt t1;
|
||||
sync_slave_with_master;
|
||||
# Should be empty
|
||||
SELECT * FROM t1;
|
||||
|
||||
let $diff_table_1=master:test.t1;
|
||||
let $diff_table_2=slave:test.t1;
|
||||
source include/diff_tables.inc;
|
||||
|
||||
--echo ==== Test using a table with delete triggers ====
|
||||
--echo **** On Master ****
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
let $SERVER_VERSION=`select version()`;
|
||||
source include/show_binlog_events.inc;
|
||||
SET @count := 1;
|
||||
eval CREATE TABLE t2 (a INT, b LONG) ENGINE=$engine;
|
||||
CREATE TRIGGER trg1 BEFORE DELETE ON t1 FOR EACH ROW SET @count := @count + 1;
|
||||
sync_slave_with_master;
|
||||
--echo **** On Master ****
|
||||
connection master;
|
||||
eval $trunc_stmt t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
let $diff_table_1=master:test.t2;
|
||||
let $diff_table_2=slave:test.t2;
|
||||
source include/diff_tables.inc;
|
||||
|
||||
connection master;
|
||||
RESET MASTER;
|
||||
SET @@session.binlog_format= @old_session_binlog_format;
|
||||
SET @@global.binlog_format= @old_global_binlog_format;
|
||||
DROP TABLE t1,t2;
|
||||
sync_slave_with_master;
|
||||
|
Reference in New Issue
Block a user