1 -- source include/have_innodb_plugin.inc
4 # Test multi update with different join methods
7 CREATE TABLE bug38999_1 (a int not null primary key, b int not null, key (b)) engine=innodb;
8 CREATE TABLE bug38999_2 (a int not null primary key, b int not null, key (b)) engine=innodb;
9 INSERT INTO bug38999_1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9),(10,10),(11,11),(12,12);
10 INSERT INTO bug38999_2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
12 # Full join, without key
13 update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100;
14 select * from bug38999_1;
17 update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101;
18 select * from bug38999_1;
21 update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2;
22 select * from bug38999_1;
24 # Range key (in bug38999_1)
25 update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+2,bug38999_2.b=bug38999_1.b+10 where bug38999_1.b between 3 and 5 and bug38999_1.a=bug38999_2.a+100;
26 select * from bug38999_1;
27 select * from bug38999_2;
29 drop table bug38999_1,bug38999_2;
33 --echo # Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb
35 CREATE TABLE t1(f1 INT) ENGINE=INNODB;
36 INSERT INTO t1 VALUES(1);
37 --error ER_OPERAND_COLUMNS
38 UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;