mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
545ac7f323
mysql-test/t/rpl_trigger.test: Test cleanup mysql-test/t/rpl_ndb_sync.test: Test cleanup mysql-test/t/rpl_ndb_idempotent.test: Test cleanup mysql-test/r/rpl_trigger.result: Updated result files mysql-test/r/rpl_ndb_sync.result: Updated result files mysql-test/r/rpl_ndb_idempotent.result: Updated result files mysql-test/t/rpl_ndb_dd_basic.test: Rename: mysql-test/t/rpl_ndb_disk.test -> mysql-test/t/rpl_ndb_dd_basic.test mysql-test/r/rpl_ndb_dd_basic.result: Rename: mysql-test/t/rpl_ndb_dd_basic.result -> mysql-test/r/rpl_ndb_dd_basic.result mysql-test/r/rpl_ndb_sp006.result: New results file mysql-test/t/rpl_row_sp007_innodb-slave.opt: Ensure slave tables are created as innodb mysql-test/t/disabled.def: updated 17290 mysql-test/r/rpl_ndb_sp007.result: New results file mysql-test/t/rpl_ndb_sp007.test: Added comment mysql-test/t/rpl_ndb_sp006.test: Added comment mysql-test/extra/rpl_tests/rpl_row_sp003.test: Augmented for use with NDB due to injector thread not populating the bin log before sync with master is done mysql-test/r/rpl_ndb_sp003.result: New results file mysql-test/t/rpl_ndb_sp003.test: Wrapper to use same code for testing NDB that is used for InnoDB Currently
75 lines
1.8 KiB
Text
75 lines
1.8 KiB
Text
#############################################################################
|
|
# Original Author: JBM #
|
|
# Original Date: Aug/13/2005 Created from Bug 12335 #
|
|
#############################################################################
|
|
|
|
# Includes
|
|
-- source include/have_binlog_format_row.inc
|
|
-- source include/master-slave.inc
|
|
|
|
|
|
# Begin clean up test section
|
|
connection master;
|
|
--disable_warnings
|
|
DROP PROCEDURE IF EXISTS test.p1;
|
|
DROP PROCEDURE IF EXISTS test.p2;
|
|
DROP TABLE IF EXISTS test.t1;
|
|
--enable_warnings
|
|
# End of cleanup
|
|
|
|
# Begin test section 1
|
|
|
|
eval CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=$engine_type;
|
|
|
|
delimiter |;
|
|
CREATE PROCEDURE test.p1()
|
|
BEGIN
|
|
INSERT INTO test.t1 VALUES (4);
|
|
SELECT get_lock("test", 100);
|
|
UPDATE test.t1 set a=a+4 WHERE a=4;
|
|
END|
|
|
CREATE PROCEDURE test.p2()
|
|
BEGIN
|
|
UPDATE test.t1 SET a=a+1;
|
|
END|
|
|
delimiter ;|
|
|
|
|
SELECT get_lock("test", 200);
|
|
|
|
connection master1;
|
|
send CALL test.p1();
|
|
|
|
connection master;
|
|
# To make sure tha the call on master1 arrived at the get_lock
|
|
sleep 1;
|
|
CALL test.p2();
|
|
SELECT release_lock("test");
|
|
SELECT * FROM test.t1;
|
|
#show binlog events;
|
|
# Added sleep for use with NDB to ensure that
|
|
# the injector thread will populate log before
|
|
# we switch to the slave.
|
|
sleep 5;
|
|
sync_slave_with_master;
|
|
connection slave;
|
|
SELECT * FROM test.t1;
|
|
|
|
connection master;
|
|
DROP TABLE IF EXISTS test.t1;
|
|
eval CREATE TABLE test.t1(a INT,PRIMARY KEY(a))ENGINE=$engine_type;
|
|
CALL test.p2();
|
|
CALL test.p1();
|
|
SELECT * FROM test.t1;
|
|
|
|
sync_slave_with_master;
|
|
connection slave;
|
|
SELECT * FROM test.t1;
|
|
connection master;
|
|
#show binlog events from 719;
|
|
|
|
DROP PROCEDURE IF EXISTS test.p1;
|
|
DROP PROCEDURE IF EXISTS test.p2;
|
|
DROP TABLE IF EXISTS test.t1;
|
|
sync_slave_with_master;
|
|
|
|
# End of 5.0 test case
|