Below is the list of changes that have just been committed into a local
4.1 repository of bell. When bell 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.2479 05/10/14 00:02:38 bell@stripped +3 -0
- set 'updating' in both tables list if we have two of them (because of subquery)
(BUG#13236)
- fixed test
sql/sql_update.cc
1.145 05/10/14 00:02:36 bell@stripped +6 -2
set 'updating' in both tables list if we have two of them (because of subquery)
mysql-test/t/rpl_multi_update2.test
1.6 05/10/14 00:02:36 bell@stripped +27 -0
fixed setting/reseting environment
multi-update with subquery added
mysql-test/r/rpl_multi_update2.result
1.4 05/10/14 00:02:35 bell@stripped +13 -0
fixed setting/reseting environment
multi-update with subquery added
# 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: bell
# Host: sanja.is.com.ua
# Root: /home/bell/mysql/bk/work-qc-4.1
--- 1.144/sql/sql_update.cc 2005-10-10 16:09:44 +03:00
+++ 1.145/sql/sql_update.cc 2005-10-14 00:02:36 +03:00
@@ -569,7 +569,9 @@
}
DBUG_PRINT("info",("setting table `%s` for update", tl->alias));
tl->lock_type= thd->lex->multi_lock_option;
- tl->updating= 1;
+ tl->updating= 1; // loacal or only list
+ if (tl->table_list)
+ tl->table_list->updating= 1; // global list (if we have 2 lists)
wants= UPDATE_ACL;
}
else
@@ -579,7 +581,9 @@
// correct order of statements. Otherwise, we use a TL_READ lock to
// improve performance.
tl->lock_type= using_update_log ? TL_READ_NO_INSERT : TL_READ;
- tl->updating= 0;
+ tl->updating= 0; // loacal or only list
+ if (tl->table_list)
+ tl->table_list->updating= 0; // global list (if we have 2 lists)
wants= SELECT_ACL;
}
--- 1.3/mysql-test/r/rpl_multi_update2.result 2005-09-15 17:18:53 +03:00
+++ 1.4/mysql-test/r/rpl_multi_update2.result 2005-10-14 00:02:35 +03:00
@@ -4,6 +4,7 @@
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+drop table if exists t1,t2;
CREATE TABLE t1 (
a int unsigned not null auto_increment primary key,
b int unsigned
@@ -40,3 +41,15 @@
a b
1 0
2 1
+drop table t1,t2;
+reset master;
+CREATE TABLE t1 ( a INT );
+INSERT INTO t1 VALUES (0);
+UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b;
+select * from t1;
+a
+3
+select * from t1;
+a
+3
+drop table t1;
--- 1.5/mysql-test/t/rpl_multi_update2.test 2005-09-15 17:17:20 +03:00
+++ 1.6/mysql-test/t/rpl_multi_update2.test 2005-10-14 00:02:36 +03:00
@@ -4,6 +4,10 @@
source include/master-slave.inc;
+--disable_warnings
+drop table if exists t1,t2;
+--enable_warnings
+
CREATE TABLE t1 (
a int unsigned not null auto_increment primary key,
b int unsigned
@@ -31,5 +35,28 @@
sync_with_master;
SELECT * FROM t1 ORDER BY a;
SELECT * FROM t2 ORDER BY a;
+
+connection master;
+drop table t1,t2;
+sync_slave_with_master;
+
+#
+# BUG#13236 multi-update with subquery & --replicate-ignore-table
+#
+reset master;
+
+connection master;
+CREATE TABLE t1 ( a INT );
+INSERT INTO t1 VALUES (0);
+UPDATE t1, (SELECT 3 as b) AS x SET t1.a = x.b;
+select * from t1;
+sync_slave_with_master;
+
+connection slave;
+select * from t1;
+
+connection master;
+drop table t1;
+sync_slave_with_master;
# End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (bell:1.2479) BUG#13236 | sanja | 13 Oct |