Commit 2dbded80 authored by unknown's avatar unknown
Browse files

Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/home/ndbdev/jmiller/clones/mysql-5.1-new


mysql-test/r/rpl_trigger.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/rpl_trigger.test:
  Auto merged
parents 48b224fa 9b9f9406
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
#
# Test of auto_increment with offset
#
#####################################
# By: JBM
# Date: 2006-02-10
# Change: NDB does not support auto inc
# in this usage. Currently there is no
# plan to implment. Skipping test when
# NDB is default engine.
#####################################
-- source include/not_ndb_default.inc
-- source include/master-slave.inc

eval create table t1 (a int not null auto_increment,b int, primary key (a)) engine=$engine_type2 auto_increment=3;
+6 −1
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ data LONGBLOB, PRIMARY KEY(c1))ENGINE=$engine_type;
INSERT INTO test.t1 VALUES (NULL, NULL);
INSERT INTO test.t1 VALUES (NULL, repeat('a',1*1024));
INSERT INTO test.t1 VALUES (NULL, repeat('b',16*1024));
CHECK TABLE test.t1;
--echo

--echo **** Data Insert Validation Master Section test.t1 ****
@@ -60,6 +59,9 @@ UPDATE t1 set data=repeat('c',17*1024) where c1 = 2;
--echo
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 1;
SELECT LENGTH(data) FROM test.t1 WHERE c1 = 2;
# Sleep is needed for NDB to allow time for
# Injector thread to populate the bin log.
sleep 10;
save_master_pos;
connection slave;
sync_with_master; 
@@ -155,6 +157,9 @@ SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=1;
SELECT c1, LENGTH(c2), SUBSTR(c2,1+2*900,2), LENGTH(c4), SUBSTR(c4,1+3*900,3)
FROM test.t2 WHERE c1=2;
# Sleep is needed for NDB to allow time for
# Injector thread to populate the bin log.
sleep 15;
save_master_pos;
connection slave;
sync_with_master; 
+4 −1
Original line number Diff line number Diff line
@@ -46,7 +46,10 @@ 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;
+9 −2
Original line number Diff line number Diff line
@@ -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;
+4 −0
Original line number Diff line number Diff line
--require r/true.require
disable_query_log;
select convert(@@table_type using latin1) NOT IN ("ndbcluster","NDBCLUSTER") as "TRUE";
enable_query_log;
Loading