summaryrefslogtreecommitdiff
path: root/mysql-test/t/multi_update.test
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-06-11 17:28:26 -0600
committerunknown <sasha@mysql.sashanet.com>2001-06-11 17:28:26 -0600
commit243acd11a048a1e5d79015cc789aac42c290251e (patch)
treeb5250cb90f659530c386c257c3c88b396e68b170 /mysql-test/t/multi_update.test
parent4cf1c6f255595dfdec4c54ccc72d69d360d148f5 (diff)
downloadmariadb-git-243acd11a048a1e5d79015cc789aac42c290251e.tar.gz
fixed bugs in mysqltest to get nested while loops to work
added multi-delete test case that does not work - something for Sinisa to fix client/mysqltest.c: fixed bugs to make nested whiles to work
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;