summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/extra/rpl_tests/rpl_trig004.test11
-rw-r--r--mysql-test/r/rpl_ndb_delete_nowhere.result15
-rw-r--r--mysql-test/r/rpl_ndb_trig004.result30
-rw-r--r--mysql-test/r/rpl_row_trig004.result1
-rw-r--r--mysql-test/t/disabled.def1
-rw-r--r--mysql-test/t/rpl_EE_err.test5
-rw-r--r--mysql-test/t/rpl_delete_no_where.test4
-rw-r--r--mysql-test/t/rpl_ndb_delete_nowhere.test6
-rw-r--r--mysql-test/t/rpl_ndb_trig004.test15
-rw-r--r--mysql-test/t/rpl_row_trig004.test4
10 files changed, 90 insertions, 2 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_trig004.test b/mysql-test/extra/rpl_tests/rpl_trig004.test
index 17031421bbe..0206241eae9 100644
--- a/mysql-test/extra/rpl_tests/rpl_trig004.test
+++ b/mysql-test/extra/rpl_tests/rpl_trig004.test
@@ -5,7 +5,10 @@
# TEST: Use after insert and before inset triggers and stored procdures to #
# Update and insert data #
#############################################################################
-
+# Change Auth: JBM #
+# Date: 2006-02-14 #
+# Change: Added error, sleep and comments (ndb) #
+####################################################
# Begin clean up test section
connection master;
@@ -25,12 +28,16 @@ CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO t
delimiter ;//
INSERT INTO test.t2 VALUES (1, 0.0);
---error 0,1062
+# Expect duplicate error 1022 == ndb
+--error 1022,1062
INSERT INTO test.t2 VALUES (1, 0.0);
#show binlog events;
select * from test.t1;
select * from test.t2;
+# Have to sleep for a few seconds to allow
+# NDB injector thread to populate binlog
+sleep 10;
sync_slave_with_master;
connection slave;
select * from test.t1;
diff --git a/mysql-test/r/rpl_ndb_delete_nowhere.result b/mysql-test/r/rpl_ndb_delete_nowhere.result
new file mode 100644
index 00000000000..1cecb030181
--- /dev/null
+++ b/mysql-test/r/rpl_ndb_delete_nowhere.result
@@ -0,0 +1,15 @@
+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 table t1 (a int, b int) engine=NDB;
+insert into t1 values(1,1);
+select * from t1;
+a b
+1 1
+delete from t1;
+select * from t1;
+a b
+drop table t1;
diff --git a/mysql-test/r/rpl_ndb_trig004.result b/mysql-test/r/rpl_ndb_trig004.result
new file mode 100644
index 00000000000..ba5f0dea91c
--- /dev/null
+++ b/mysql-test/r/rpl_ndb_trig004.result
@@ -0,0 +1,30 @@
+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 TRIGGER test.t1_bi_t2;
+DROP TABLE IF EXISTS test.t1;
+DROP TABLE IF EXISTS test.t2;
+CREATE TABLE test.t1 (n MEDIUMINT NOT NULL AUTO_INCREMENT, d FLOAT, PRIMARY KEY(n))ENGINE=NDB;
+CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=NDB;
+CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)//
+INSERT INTO test.t2 VALUES (1, 0.0);
+INSERT INTO test.t2 VALUES (1, 0.0);
+Got one of the listed errors
+select * from test.t1;
+n d
+1 1.234
+select * from test.t2;
+n f
+1 0
+select * from test.t1;
+n d
+1 1.234
+select * from test.t2;
+n f
+1 0
+DROP TRIGGER test.t1_bi_t2;
+DROP TABLE test.t1;
+DROP TABLE test.t2;
diff --git a/mysql-test/r/rpl_row_trig004.result b/mysql-test/r/rpl_row_trig004.result
index 04f46121994..d0d0657f875 100644
--- a/mysql-test/r/rpl_row_trig004.result
+++ b/mysql-test/r/rpl_row_trig004.result
@@ -12,6 +12,7 @@ CREATE TABLE test.t2 (n MEDIUMINT NOT NULL, f FLOAT, PRIMARY KEY(n))ENGINE=INNOD
CREATE TRIGGER test.t1_bi_t2 BEFORE INSERT ON test.t2 FOR EACH ROW INSERT INTO test.t1 VALUES (NULL, 1.234)//
INSERT INTO test.t2 VALUES (1, 0.0);
INSERT INTO test.t2 VALUES (1, 0.0);
+Got one of the listed errors
select * from test.t1;
n d
1 1.234
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index 182a9cefcd9..bb10fa0d635 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -26,6 +26,7 @@ rpl_bit_npk : Bug#13418
rpl_ddl : Bug#15963 SBR does not show "Definer" correctly
rpl_ndb_auto_inc : Bug#17086
rpl_ndb_basic : Bug#16228 [IN REVIEW]
+rpl_ndb_delete_nowhere : Bug#17400: Cluster Replication: delete of rows in table without pk fails
rpl_ndb_relay_space : Bug#16993
rpl_ndb_sp007 : Bug #17290
rpl_sp : Bug#16456
diff --git a/mysql-test/t/rpl_EE_err.test b/mysql-test/t/rpl_EE_err.test
index 28c5af0a192..6d064ae3197 100644
--- a/mysql-test/t/rpl_EE_err.test
+++ b/mysql-test/t/rpl_EE_err.test
@@ -1,2 +1,7 @@
+########################################################
+# By JBM 2006-02-14 Wrapped to share test code between #
+# engines. Added to skip test when NDB is default #
+########################################################
+-- source include/not_ndb_default.inc
let $engine_type=myisam;
-- source extra/rpl_tests/rpl_EE_err.test
diff --git a/mysql-test/t/rpl_delete_no_where.test b/mysql-test/t/rpl_delete_no_where.test
index b4cbda64ea3..11adb2e6dd5 100644
--- a/mysql-test/t/rpl_delete_no_where.test
+++ b/mysql-test/t/rpl_delete_no_where.test
@@ -1,2 +1,6 @@
+###################################################
+# By JBM 2006-02-14 added to skip test when NDB #
+##################################################
+-- source include/not_ndb_default.inc
let $engine_type=myisam;
-- source extra/rpl_tests/rpl_delete_no_where.test
diff --git a/mysql-test/t/rpl_ndb_delete_nowhere.test b/mysql-test/t/rpl_ndb_delete_nowhere.test
new file mode 100644
index 00000000000..64e0156c3f8
--- /dev/null
+++ b/mysql-test/t/rpl_ndb_delete_nowhere.test
@@ -0,0 +1,6 @@
+#########################################
+# By JBM 2006-02-14 Test wrapping to #
+# Share test code between engine tests #
+#########################################
+let $engine_type=NDB;
+-- source extra/rpl_tests/rpl_delete_no_where.test
diff --git a/mysql-test/t/rpl_ndb_trig004.test b/mysql-test/t/rpl_ndb_trig004.test
new file mode 100644
index 00000000000..7439da563a6
--- /dev/null
+++ b/mysql-test/t/rpl_ndb_trig004.test
@@ -0,0 +1,15 @@
+#############################################################################
+# Original Author: JBM #
+# Original Date: 2006-02-14 #
+#############################################################################
+# TEST: Use before insert triggers and has the second insert fail #
+# Test is wrapped to save code and share between engines #
+#############################################################################
+
+# Includes
+-- source include/have_binlog_format_row.inc
+-- source include/have_ndb.inc
+-- source include/master-slave.inc
+let $engine_type=NDB;
+-- source extra/rpl_tests/rpl_trig004.test
+
diff --git a/mysql-test/t/rpl_row_trig004.test b/mysql-test/t/rpl_row_trig004.test
index 2ad0b46211b..a918c602d56 100644
--- a/mysql-test/t/rpl_row_trig004.test
+++ b/mysql-test/t/rpl_row_trig004.test
@@ -4,8 +4,12 @@
#############################################################################
# TEST: Use before insert triggers and has the second insert fail #
#############################################################################
+# Change by JBM 2006-02-14 added to skip when NDB default engine #
+# This test has been wrapped to allow multipal engines to use same code #
+#############################################################################
# Includes
+-- source include/not_ndb_default.inc
-- source include/have_binlog_format_row.inc
-- source include/have_innodb.inc
-- source include/master-slave.inc