1
-- source include/have_ndb.inc
2
-- source include/not_embedded.inc
5
drop table if exists t1;
6
drop table if exists t2;
10
a int not null primary key,
15
a int not null primary key,
19
insert into t1 values (1,10), (2,20), (3,30), (4, 40);
22
create procedure test_cursor ()
24
declare done int default 0;
27
declare cur1 cursor for select a,b from t1;
28
declare continue handler for sqlstate '02000' set done = 1;
31
fetch cur1 into temp_a, temp_b;
33
insert into t2 values (temp_a, temp_b);
35
until done end repeat;
41
select * from t2 order by a;
43
select * from t2 order by a;
44
drop procedure test_cursor;
47
--echo end of 5.1 tests