mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-qc-4.1
This commit is contained in:
commit
f89b2ab09b
3 changed files with 46 additions and 2 deletions
|
@ -4,6 +4,7 @@ reset master;
|
|||
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 @@ SELECT * FROM t2 ORDER BY a;
|
|||
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;
|
||||
|
|
|
@ -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
|
||||
|
@ -32,4 +36,27 @@ 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
|
||||
|
|
|
@ -569,7 +569,9 @@ int mysql_multi_update_lock(THD *thd,
|
|||
}
|
||||
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 @@ int mysql_multi_update_lock(THD *thd,
|
|||
// 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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue