mariadb/mysql-test/t/multi_update.test
unknown 64dc74a13d 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
2001-06-11 17:28:26 -06:00

25 lines
601 B
Text

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;