mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +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
45 lines
1.4 KiB
Text
45 lines
1.4 KiB
Text
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;
|
|
create database if not exists mysqltest1;
|
|
DROP PROCEDURE IF EXISTS mysqltest1.p1;
|
|
DROP PROCEDURE IF EXISTS mysqltest1.p2;
|
|
DROP TABLE IF EXISTS mysqltest1.t2;
|
|
DROP TABLE IF EXISTS mysqltest1.t1;
|
|
CREATE TABLE IF NOT EXISTS mysqltest1.t1(name CHAR(16), birth DATE,PRIMARY KEY(name))ENGINE=NDBCLUSTER;
|
|
CREATE TABLE IF NOT EXISTS mysqltest1.t2(name CHAR(16), age INT ,PRIMARY KEY(name))ENGINE=NDBCLUSTER;
|
|
CREATE PROCEDURE mysqltest1.p1()
|
|
BEGIN
|
|
DECLARE done INT DEFAULT 0;
|
|
DECLARE spa CHAR(16);
|
|
DECLARE spb INT;
|
|
DECLARE cur1 CURSOR FOR SELECT name,
|
|
(YEAR(CURDATE())-YEAR(birth))-(RIGHT(CURDATE(),5)<RIGHT(birth,5))
|
|
FROM mysqltest1.t1;
|
|
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
|
|
OPEN cur1;
|
|
SET AUTOCOMMIT=0;
|
|
REPEAT
|
|
FETCH cur1 INTO spa, spb;
|
|
IF NOT done THEN
|
|
START TRANSACTION;
|
|
INSERT INTO mysqltest1.t2 VALUES (spa,spb);
|
|
COMMIT;
|
|
END IF;
|
|
UNTIL done END REPEAT;
|
|
SET AUTOCOMMIT=1;
|
|
CLOSE cur1;
|
|
END|
|
|
CREATE PROCEDURE mysqltest1.p2()
|
|
BEGIN
|
|
INSERT INTO mysqltest1.t1 VALUES ('MySQL','1993-02-04'),('ROCKS', '1990-08-27'),('Texas', '1999-03-30'),('kyle','2005-1-1');
|
|
END|
|
|
CALL mysqltest1.p2();
|
|
CALL mysqltest1.p1();
|
|
DROP PROCEDURE IF EXISTS mysqltest1.p1;
|
|
DROP PROCEDURE IF EXISTS mysqltest1.p2;
|
|
DROP TABLE IF EXISTS mysqltest1.t1;
|
|
DROP TABLE IF EXISTS mysqltest1.t2;
|