delimiter $ drop procedure if exists runmaybe $ create procedure runmaybe(query longblob) begin declare continue handler for sqlexception begin end; if rand() >= 0.5 then set @s:=query;prepare stmt from @s;execute stmt;deallocate prepare stmt; end if; end $ drop procedure if exists p1$ create procedure p1() begin declare i int default 0; declare continue handler for sqlexception begin end; repeat call runmaybe('start transaction;'); call runmaybe('drop table if exists t1;'); call runmaybe('create table if not exists t1(a varchar(5),fulltext key(a))engine=innodb;'); call runmaybe('replace into t1(a) values("aaa");'); call runmaybe('commit;'); set i:=i+1; until 1=2 end repeat; end $ delimiter ; call p1(); # call from multiple connections