blob: 5f9db0730606733c0f08cf403f16d15efba80ce2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
-- source include/have_xtradb.inc
SET @old_innodb_file_format=@@innodb_file_format;
SET @old_innodb_file_format_max=@@innodb_file_format_max;
SET @old_innodb_file_per_table=@@innodb_file_per_table;
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=ON;
-- disable_query_log
-- disable_result_log
DROP TABLE IF EXISTS `test1`;
CREATE TABLE IF NOT EXISTS `test1` (
`a` int primary key auto_increment,
`b` int default 0,
`c` char(100) default 'testtest'
) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
set autocommit=0;
delimiter |;
CREATE PROCEDURE insert_many(p1 int)
BEGIN
SET @x = 0;
SET @y = 0;
start transaction;
REPEAT
insert into test1 set b=1;
SET @x = @x + 1;
SET @y = @y + 1;
IF @y >= 1000 THEN
commit;
start transaction;
SET @y = 0;
END IF;
UNTIL @x >= p1 END REPEAT;
commit;
END|
delimiter ;|
call insert_many(100000);
DROP PROCEDURE insert_many;
# The bug is hangup at the following statement
ALTER TABLE test1 ENGINE=MyISAM;
DROP TABLE test1;
SET GLOBAL innodb_file_format=@old_innodb_file_format;
SET GLOBAL innodb_file_format_max=@old_innodb_file_format_max;
SET GLOBAL innodb_file_per_table=@old_innodb_file_per_table;
|