Commit 48968c65 authored by jmiller@mysql.com's avatar jmiller@mysql.com

Test updates

parent 904b5304
......@@ -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;
......
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;
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;
......@@ -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
......
......@@ -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
......
########################################################
# 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
###################################################
# 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
#########################################
# 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
#############################################################################
# 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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment