Below is the list of changes that have just been committed into a local
5.1 repository of ndbdev. When ndbdev does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2111 06/02/15 14:36:31 jmiller@stripped +3 -0
Merge jmiller@stripped:/home/bk/mysql-5.1-new
into mysql.com:/home/ndbdev/jmiller/clones/mysql-5.1-new
mysql-test/t/rpl_trigger.test
1.7 06/02/15 14:36:22 jmiller@stripped +0 -0
Auto merged
mysql-test/t/disabled.def
1.69 06/02/15 14:36:22 jmiller@stripped +0 -0
Auto merged
mysql-test/r/rpl_trigger.result
1.5 06/02/15 14:36:22 jmiller@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jmiller
# Host: ndb08.mysql.com
# Root: /home/ndbdev/jmiller/clones/mysql-5.1-new/RESYNC
--- 1.68/mysql-test/t/disabled.def 2006-02-15 14:07:21 +01:00
+++ 1.69/mysql-test/t/disabled.def 2006-02-15 14:36:22 +01:00
@@ -35,3 +35,8 @@
sp-goto : GOTO is currently is disabled - will be fixed in the future
subselect : Bug#15706 (ps mode) [PATCH PENDING]
rpl_ndb_log : result not deterministic
+binlog_row_mix_innodb_myisam : Bug #17386
+binlog_row_insert_select : Bug #17385
+rpl_row_basic_2myisam : Bug #17385
+rpl_row_basic_3innodb : Bug #17385
+rpl_row_create_table : Bug #17385
--- 1.4/mysql-test/r/rpl_trigger.result 2006-01-30 13:33:11 +01:00
+++ 1.5/mysql-test/r/rpl_trigger.result 2006-02-15 14:36:22 +01:00
@@ -4,6 +4,9 @@
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
create table t1 (a int auto_increment, primary key (a), b int, rand_value double not null);
create table t2 (a int auto_increment, primary key (a), b int);
create table t3 (a int auto_increment, primary key (a), name varchar(64) not null, old_a int, old_b int, rand_value double not null);
--- 1.6/mysql-test/t/rpl_trigger.test 2006-02-09 19:28:14 +01:00
+++ 1.7/mysql-test/t/rpl_trigger.test 2006-02-15 14:36:22 +01:00
@@ -171,7 +171,103 @@
drop database other;
#
-# End of test
+# Test specific triggers including SELECT into var with replication
+# BUG#13227:
+# slave performs an update to the replicatable table, t1,
+# and modifies its local data, t3, by mean of its local trigger that uses
+# another local table t2.
+# Expected values are commented into queries.
+#
+# Body of the test executes in a loop since the problem occurred randomly.
+#
+
+let $max_rows=5;
+let $rnd=10;
+
+--echo test case for BUG#13227
+while ($rnd)
+{
+ --echo -------------------
+ echo $rnd;
+ --echo -------------------
+
+### SETUP
+
+--disable_warnings
+ connection master;
+ eval drop table if exists t1$rnd;
+ connection slave;
+ eval drop table if exists t2$rnd,t3$rnd;
+--enable_warnings
+
+ connection master;
+ eval create table t1$rnd (f1 int) /* 2 replicate */;
+ let $i=$max_rows;
+ while ($i)
+ {
+ eval insert into t1$rnd values (-$i);
+ dec $i;
+ }
+
+ sync_slave_with_master;
+#connection slave;
+ eval select * from t1$rnd;
+ delimiter |;
+ eval create trigger trg1$rnd before update on t1$rnd /* slave local */
+ for each row
+ begin
+ DECLARE r integer;
+ SELECT f2 INTO r FROM t2$rnd where f1=NEW.f1;
+ INSERT INTO t3$rnd values (r);
+ end|
+ delimiter ;|
+ eval create table t2$rnd (f1 int, f2 int) /* slave local */;
+ eval create table t3$rnd (f3 int) /* slave local */;
+ let $i=$max_rows;
+ while ($i)
+ {
+ eval insert into t2$rnd values ($i, $i*100);
+ dec $i;
+ }
+
+### Test
+
+#connection slave;
+
+# trigger works as specified when updates from slave
+ eval select * from t2$rnd;
+ eval UPDATE t1$rnd SET f1=$max_rows where f1=-$max_rows;
+ eval SELECT * from t1$rnd /* must be f1 $max_rows, 1 - $max_rows 2 - $max_rows ... -1 */;
+ eval SELECT * from t3$rnd /* must be f3 $max_rows*100 */;
+
+ connection master;
+ let $i=$max_rows;
+ while ($i)
+ {
+ eval UPDATE t1$rnd SET f1=$i where f1=-$i;
+ dec $i;
+ }
+
+ sync_slave_with_master;
+#connection slave;
+ eval SELECT * from t1$rnd /* must be f1 $max_rows ... 1 */;
+ eval SELECT * from t3$rnd /* must be f3 $max_rows * 100 ... 100 */;
+
+### CLEANUP
+#connection slave;
+ eval drop trigger trg1$rnd;
+ eval drop table t2$rnd,t3$rnd;
+
+ connection master;
+ eval drop table t1$rnd;
+
+ dec $rnd;
+}
+
+
+
+#
+# End of tests
#
save_master_pos;
connection slave;
| Thread |
|---|
| • bk commit into 5.1 tree (jmiller:1.2111) | Jonathan Miller | 15 Feb |