*** Bug #30124 ***
SET @@storage_engine = 'Falcon';
DROP TABLE IF EXISTS t1;
DROP PROCEDURE IF EXISTS p1;
SET @@autocommit=0;
CREATE TABLE t1 (a int auto_increment PRIMARY KEY, b int);
PREPARE stmt1 FROM 'INSERT INTO t1 (b) VALUES (?)';
CREATE PROCEDURE p1()
BEGIN
SET @i = 0;
SET @v = 0;
WHILE @i < 100000 DO
SET @a = @v;
EXECUTE stmt1 USING @a;
SET @v = @v + 1;
IF @v = 10 THEN
SET @v = 0;
END IF;
SET @i = @i + 1;
END WHILE;
END;//
CALL p1;
COMMIT;
SET @@autocommit = 1;
UPDATE t1 SET b = 5 WHERE b = 3;
SELECT count(*) FROM t1;
count(*)
100000
SELECT count(*) FROM t1 WHERE b = 5;
count(*)
20000
DEALLOCATE PREPARE stmt1;
DROP TABLE t1;
DROP PROCEDURE p1;
