diff options
author | Matthias Leich <Matthias.Leich@sun.com> | 2009-02-09 12:44:01 +0100 |
---|---|---|
committer | Matthias Leich <Matthias.Leich@sun.com> | 2009-02-09 12:44:01 +0100 |
commit | 4c0dd2a7b346604ca57ea5871bc04298f174561c (patch) | |
tree | 45389ffca26f0fe589ff1ec0135b62977bfbdd0b /mysql-test/t/multi_update.test | |
parent | 6c6fc0978e0123d515bf95059028ebdb9afd75f8 (diff) | |
parent | 41e6a1f89c943083e46fba9f548333629eefbbd9 (diff) | |
download | mariadb-git-4c0dd2a7b346604ca57ea5871bc04298f174561c.tar.gz |
Merge of ifx into GCA tree
no conflicts
Diffstat (limited to 'mysql-test/t/multi_update.test')
-rw-r--r-- | mysql-test/t/multi_update.test | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test index 2bb3b17340c..9f493189e6d 100644 --- a/mysql-test/t/multi_update.test +++ b/mysql-test/t/multi_update.test @@ -24,17 +24,17 @@ let $1 = 100; while ($1) { let $2 = 5; - eval insert into t1(t) values ('$1'); + eval insert into t1(t) values ('$1'); while ($2) { - eval insert into t2(id2,t) values ($1,'$2'); + eval insert into t2(id2,t) values ($1,'$2'); let $3 = 10; while ($3) { - eval insert into t3(id3,t) values ($1,'$2'); + eval insert into t3(id3,t) values ($1,'$2'); dec $3; } - dec $2; + dec $2; } dec $1; } @@ -79,11 +79,11 @@ let $1 = 1000; while ($1) { let $2 = 5; - eval insert into t1 values ($1,'aaaaaaaaaaaaaaaaaaaa'); + eval insert into t1 values ($1,'aaaaaaaaaaaaaaaaaaaa'); while ($2) { - eval insert into t2(id2,t) values ($1,'bbbbbbbbbbbbbbbbb'); - dec $2; + eval insert into t2(id2,t) values ($1,'bbbbbbbbbbbbbbbbb'); + dec $2; } dec $1; } @@ -317,7 +317,7 @@ update t2, t1 set t2.field=t1.field delete t1, t2 from t2 inner join t1 on t1.id1=t2.id2 where 0=1; -delete t1, t2 from t2,t1 +delete t1, t2 from t2,t1 where t1.id1=t2.id2 and 0=1; drop table t1,t2; @@ -351,7 +351,7 @@ create table `t2` (`c2_id` int(10) unsigned NULL auto_increment, `c2_p_id` int(1 insert into t1 values (0,'A01-Comp',1); insert into t1 values (0,'B01-Comp',1); insert into t2 values (0,1,'A Note',1); -update t1 left join t2 on p_id = c2_p_id set c2_note = 'asdf-1' where p_id = 2; +update t1 left join t2 on p_id = c2_p_id set c2_note = 'asdf-1' where p_id = 2; select * from t1; select * from t2; drop table t1, t2; @@ -379,6 +379,9 @@ revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; revoke all privileges on mysqltest.* from mysqltest_1@localhost; delete from mysql.user where user=_binary'mysqltest_1'; drop database mysqltest; +connection default; +disconnect user1; +disconnect root; # # multi delete wrong table check @@ -393,7 +396,7 @@ drop table t1, t2, t3; # # multi* unique updating table check # -create table t1 (col1 int); +create table t1 (col1 int); create table t2 (col1 int); -- error ER_UPDATE_TABLE_USED update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; @@ -401,16 +404,16 @@ update t1,t2 set t1.col1 = (select max(col1) from t1) where t1.col1 = t2.col1; delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1; drop table t1,t2; -# Test for BUG#5837 - delete with outer join and const tables +# Test for Bug#5837 delete with outer join and const tables --disable_warnings create table t1 ( - aclid bigint not null primary key, - status tinyint(1) not null + aclid bigint not null primary key, + status tinyint(1) not null ) engine = innodb; create table t2 ( - refid bigint not null primary key, - aclid bigint, index idx_acl(aclid) + refid bigint not null primary key, + aclid bigint, index idx_acl(aclid) ) engine = innodb; --enable_warnings insert into t2 values(1,null); @@ -418,7 +421,7 @@ delete t2, t1 from t2 left join t1 on (t2.aclid=t1.aclid) where t2.refid='1'; drop table t1, t2; # -# Bug#19225: unchecked error leads to server crash +# Bug#19225 unchecked error leads to server crash # create table t1(a int); create table t2(a int); @@ -428,7 +431,7 @@ drop table t1, t2; # End of 4.1 tests # -# Test for bug #1980. +# Test for Bug#1980. # --disable_warnings create table t1 ( c char(8) not null ) engine=innodb; @@ -484,9 +487,12 @@ send alter table t1 add column c int default 100 after a; connect (updater,localhost,root,,test); connection updater; +# Wait till "alter table t1 ..." is in work. +sleep 2; send update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a; connection locker; +# Wait till "update t1, v1 ..." is in work. sleep 2; unlock tables; @@ -500,8 +506,14 @@ select * from t2; drop view v1; drop table t1, t2; +connection default; +disconnect locker; +disconnect changer; +disconnect updater; + + # -# Bug#27716 multi-update did partially and has not binlogged +# Bug#27716 multi-update did partially and has not binlogged # CREATE TABLE `t1` ( @@ -536,11 +548,12 @@ reset master; UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a; show master status /* there must be the UPDATE query event */; -# cleanup bug#27716 +# cleanup drop table t1, t2; + # -# Bug #29136 erred multi-delete on trans table does not rollback +# Bug#29136 erred multi-delete on trans table does not rollback # # prepare @@ -569,7 +582,7 @@ select count(*) from t3 /* must be 1 */; # the query must be in binlog (no surprise though) source include/show_binlog_events.inc; -# cleanup bug#29136 +# cleanup drop table t1, t2, t3; |