*** Bug #22154 ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS tj9;
DROP PROCEDURE IF EXISTS pj9;
CREATE TABLE tj9 (s0 int);
create procedure pj9 ()
begin
declare v int default 1;
while v < 500 do
set @v = concat('alter table tj9 add column s',v,' char(64) default ''Hello World''');
prepare stmt1 from @v;
execute stmt1;
set v = v + 1;
end while;
set v = 1;
while v < 500 do
insert into tj9 (s1) values (v);
set v = v + 1;
end while;
set v = 1;
while v < 500 do
set @v = concat('update tj9 set s',v,'=concat(s2,s1)');
prepare stmt1 from @v;
execute stmt1;
set v = v + 1;
end while;
end//
call pj9();
SELECT count(*) FROM tj9;
count(*)
499
DROP TABLE tj9;
DROP PROCEDURE pj9;
