mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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
This commit is contained in:
parent
6cddf47086
commit
64dc74a13d
3 changed files with 72 additions and 9 deletions
25
mysql-test/t/multi_update.test
Normal file
25
mysql-test/t/multi_update.test
Normal file
|
|
@ -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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue