~ubuntu-branches/ubuntu/trusty/mariadb-5.5/trusty-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/t/innodb_multi_update.test

  • Committer: Package Import Robot
  • Author(s): Otto Kekäläinen
  • Date: 2013-12-22 10:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20131222102705-mndw7s12mz0szrcn
Tags: upstream-5.5.32
Import upstream version 5.5.32

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/have_innodb.inc
 
2
 
 
3
#
 
4
# Test multi update with different join methods
 
5
#
 
6
 
 
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);
 
11
 
 
12
# Full join, without key
 
13
update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100;
 
14
select * from bug38999_1;
 
15
 
 
16
# unique key
 
17
update bug38999_1,bug38999_2 set bug38999_1.a=bug38999_1.a+100 where bug38999_1.a=101;
 
18
select * from bug38999_1;
 
19
 
 
20
# ref key
 
21
update bug38999_1,bug38999_2 set bug38999_1.b=bug38999_1.b+10 where bug38999_1.b=2;
 
22
select * from bug38999_1;
 
23
 
 
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;
 
28
 
 
29
drop table bug38999_1,bug38999_2;
 
30
 
 
31
--echo #
 
32
--echo # Bug#54475 improper error handling causes cascading crashing failures in innodb/ndb
 
33
--echo #
 
34
CREATE TABLE t1(f1 INT) ENGINE=INNODB;
 
35
INSERT INTO t1 VALUES(1);
 
36
--error ER_OPERAND_COLUMNS
 
37
UPDATE (SELECT ((SELECT 1 FROM t1), 1) FROM t1 WHERE (SELECT 1 FROM t1)) x, (SELECT 1) AS d SET d.f1 = 1;
 
38
DROP TABLE t1;