summaryrefslogtreecommitdiff
path: root/mysql-test/r/multi_update.result
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-03-19 00:45:44 +0200
committerunknown <monty@narttu.mysql.fi>2003-03-19 00:45:44 +0200
commitf45236de394523115dfd160a00a42072b6536fc0 (patch)
treecb3c86ac4e063681514b1a8ffa9db31b639b9c46 /mysql-test/r/multi_update.result
parent21b0873a3ce5ee079b120199eb0423bdcff78c22 (diff)
downloadmariadb-git-f45236de394523115dfd160a00a42072b6536fc0.tar.gz
Allow optimzation of multi-table-update also for InnoDB tables
MEMORY is alias for HEAP for CREATE TABLE ... TYPE=HEAP Fixed bug in multi-table-update where a row could be updated several times mysql-test/r/heap.result: Test of CREATE TABLE ... type=MEMORY mysql-test/r/innodb.result: Added multi-update-test mysql-test/r/multi_update.result: Added multi-update-test mysql-test/t/heap.test: Test of CREATE TABLE ... type=MEMORY mysql-test/t/innodb.test: Added multi-update-test mysql-test/t/multi_update.test: Added multi-update-test sql/ha_innodb.h: Allow optimzation of multi-table-update also for InnoDB tables sql/handler.h: Allow optimzation of multi-update also for InnoDB tables sql/key.cc: After merge fix sql/lex.h: MEMORY is alias for HEAP sql/sql_test.cc: Fixed wrong printf sql/sql_update.cc: Fixed bug in multi-table-update where a row could be updated several times sql/sql_yacc.yy: MEMORY is alias for HEAP
Diffstat (limited to 'mysql-test/r/multi_update.result')
-rw-r--r--mysql-test/r/multi_update.result64
1 files changed, 64 insertions, 0 deletions
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index fe028a4cb95..0f3644f15bc 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -246,3 +246,67 @@ INSERT INTO t3 VALUES (1,'jedan'),(2,'dva');
update t1,t2 set t1.naziv="aaaa" where t1.broj=t2.broj;
update t1,t2,t3 set t1.naziv="bbbb", t2.naziv="aaaa" where t1.broj=t2.broj and t2.broj=t3.broj;
drop table if exists t1,t2,t3;
+CREATE TABLE t1 (a int not null primary key, b int not null, key (b));
+CREATE TABLE t2 (a int not null primary key, b int not null, key (b));
+INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+INSERT INTO t2 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
+update t1,t2 set t1.a=t1.a+100;
+select * from t1;
+a b
+101 1
+102 2
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+update t1,t2 set t1.a=t1.a+100 where t1.a=101;
+select * from t1;
+a b
+201 1
+102 2
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+update t1,t2 set t1.b=t1.b+10 where t1.b=2;
+select * from t1;
+a b
+201 1
+102 12
+103 3
+104 4
+105 5
+106 6
+107 7
+108 8
+109 9
+update t1,t2 set t1.b=t1.b+2,t2.b=t1.b where t1.b between 3 and 5;
+select * from t1;
+a b
+201 1
+102 12
+103 5
+104 6
+105 7
+106 6
+107 7
+108 8
+109 9
+select * from t2;
+a b
+1 3
+2 3
+3 3
+4 3
+5 3
+6 3
+7 3
+8 3
+9 3
+drop table t1,t2;