mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
358327618d
- Added --disable_query_log ; begin ; .... commit; --enable_query_log around all while loops that does insert
48 lines
1.2 KiB
Text
48 lines
1.2 KiB
Text
--source include/have_innodb.inc
|
|
|
|
SET @old_innodb_file_format=@@innodb_file_format;
|
|
SET @old_innodb_file_per_table=@@innodb_file_per_table;
|
|
SET @old_innodb_file_format_check=@@innodb_file_format_check;
|
|
SET GLOBAL innodb_file_format='Barracuda';
|
|
SET GLOBAL innodb_file_per_table=ON;
|
|
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS `test1`;
|
|
--enable_warnings
|
|
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;
|
|
REPEAT
|
|
insert into test1 set b=1;
|
|
SET @x = @x + 1;
|
|
SET @y = @y + 1;
|
|
IF @y >= 1000 THEN
|
|
commit;
|
|
SET @y = 0;
|
|
END IF;
|
|
UNTIL @x >= p1 END REPEAT;
|
|
END|
|
|
delimiter ;|
|
|
--disable_query_log
|
|
--disable_result_log
|
|
call insert_many(100000);
|
|
--enable_query_log
|
|
--enable_result_log
|
|
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_per_table=@old_innodb_file_per_table;
|
|
SET GLOBAL innodb_file_format_check=@old_innodb_file_format_check;
|