summaryrefslogtreecommitdiff
path: root/mysql-test/t/multi_update.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/multi_update.test')
-rw-r--r--mysql-test/t/multi_update.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
new file mode 100644
index 00000000000..c9c705b2e64
--- /dev/null
+++ b/mysql-test/t/multi_update.test
@@ -0,0 +1,25 @@
+drop table if exists t1,t2,t3;
+create table t1(id1 int not null auto_increment primary key, t char(12));
+create table t2(id2 int not null, t char(12), index(id2));
+create table t3(id3 int not null, t char(12), index(id3));
+let $1 = 3;
+while ($1)
+ {
+ let $2 = 3;
+ eval insert into t1(t) values ('$1');
+ while ($2)
+ {
+ eval insert into t2(id2,t) values ($1,'$2');
+ eval insert into t3(id3,t) values ($1,'$2');
+ dec $2;
+ }
+ dec $1;
+ }
+
+select * from t1;
+select * from t2;
+select * from t3;
+
+delete from t1,t2 where t1.id = t2.id and t1.id = 3;
+select * from t1;
+select * from t2;