mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	Use DEBUG_SYNC to hang the execution at the interesting point, and then kill and restart the server externally. This will work also with Valgrind. DBUG_SUICIDE() causes Valgrind to hang, and it could also cause uninteresting reports about memory leaks. While we are at it, let us clean up innodb.innodb_bulk_create_index_debug so that it will actually test the desired functionality also in future versions (with instant ADD COLUMN and DROP COLUMN) and avoid some unnecessary restarts. We are adding two DEBUG_SYNC points for ALTER TABLE, because there were none that would be executed right before ha_commit_trans().
		
			
				
	
	
		
			537 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			537 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| CREATE PROCEDURE populate_t1()
 | |
| BEGIN
 | |
| DECLARE i int DEFAULT 1;
 | |
| START TRANSACTION;
 | |
| WHILE (i <= 10000) DO
 | |
| INSERT INTO t1 VALUES (i, i, CONCAT('a', i));
 | |
| SET i = i + 1;
 | |
| END WHILE;
 | |
| COMMIT;
 | |
| END|
 | |
| CREATE TABLE t1(
 | |
| class   INT,
 | |
| id      INT,
 | |
| title   VARCHAR(100)
 | |
| ) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
 | |
| SELECT COUNT(*) FROM t1;
 | |
| COUNT(*)
 | |
| 10000
 | |
| CREATE INDEX idx_title ON t1(title);
 | |
| affected rows: 0
 | |
| info: Records: 0  Duplicates: 0  Warnings: 0
 | |
| RENAME TABLE t1 TO t0;
 | |
| # Test Blob
 | |
| CREATE TABLE t1(
 | |
| a INT PRIMARY KEY,
 | |
| b TEXT,
 | |
| c TEXT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
 | |
| INSERT INTO t1 VALUES
 | |
| (1, REPEAT('a',10000), 'a'),
 | |
| (2, REPEAT('b',20000), 'b'),
 | |
| (3, REPEAT('c',40000), 'c'),
 | |
| (4, REPEAT('d',60000), 'd');
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| ALTER TABLE t1 DROP COLUMN c, FORCE;
 | |
| affected rows: 0
 | |
| info: Records: 0  Duplicates: 0  Warnings: 0
 | |
| CHECK TABLE t0,t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t0	check	status	OK
 | |
| test.t1	check	status	OK
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| DROP TABLE t1;
 | |
| RENAME TABLE t0 to t1;
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| SELECT * FROM t1 WHERE title = 'a10';
 | |
| class	id	title
 | |
| 10	10	a10
 | |
| SELECT * FROM t1 WHERE title = 'a5000';
 | |
| class	id	title
 | |
| 5000	5000	a5000
 | |
| SELECT * FROM t1 WHERE title = 'a10000';
 | |
| class	id	title
 | |
| 10000	10000	a10000
 | |
| SELECT * FROM t1 WHERE title = 'a10010';
 | |
| class	id	title
 | |
| DROP TABLE t1;
 | |
| CREATE TABLE t1(
 | |
| class   INT,
 | |
| id      INT,
 | |
| title   VARCHAR(100)
 | |
| ) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
 | |
| connect  hang,localhost,root;
 | |
| SET DEBUG_SYNC='alter_table_inplace_trans_commit SIGNAL hung WAIT_FOR ever';
 | |
| CREATE INDEX idx_title ON t1(title);
 | |
| connection default;
 | |
| SET DEBUG_SYNC='now WAIT_FOR hung';
 | |
| disconnect hang;
 | |
| SELECT COUNT(*) FROM t1;
 | |
| COUNT(*)
 | |
| 10000
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| EXPLAIN SELECT * FROM t1 WHERE title = 'a10';
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t1	ref	idx_title	idx_title	103	const	1	Using index condition
 | |
| SELECT * FROM t1 WHERE title = 'a10';
 | |
| class	id	title
 | |
| 10	10	a10
 | |
| SELECT * FROM t1 WHERE title = 'a5000';
 | |
| class	id	title
 | |
| 5000	5000	a5000
 | |
| SELECT * FROM t1 WHERE title = 'a10000';
 | |
| class	id	title
 | |
| 10000	10000	a10000
 | |
| SELECT * FROM t1 WHERE title = 'a10010';
 | |
| class	id	title
 | |
| DROP TABLE t1;
 | |
| # Test Blob
 | |
| CREATE TABLE t1(
 | |
| a INT PRIMARY KEY,
 | |
| b TEXT,
 | |
| c TEXT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
 | |
| INSERT INTO t1 VALUES
 | |
| (1, REPEAT('a',10000), 'a'),
 | |
| (2, REPEAT('b',20000), 'b'),
 | |
| (3, REPEAT('c',40000), 'c'),
 | |
| (4, REPEAT('d',60000), 'd');
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| connect  hang,localhost,root;
 | |
| SET DEBUG_SYNC='alter_table_inplace_trans_commit SIGNAL hung WAIT_FOR ever';
 | |
| ALTER TABLE t1 DROP COLUMN c, FORCE;
 | |
| connection default;
 | |
| SET DEBUG_SYNC='now WAIT_FOR hung';
 | |
| disconnect hang;
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| DROP TABLE t1;
 | |
| DROP PROCEDURE populate_t1;
 | |
| CREATE PROCEDURE populate_t1()
 | |
| BEGIN
 | |
| DECLARE i int DEFAULT 1;
 | |
| START TRANSACTION;
 | |
| WHILE (i <= 10000) DO
 | |
| INSERT INTO t1 VALUES (i, i, CONCAT('a', i));
 | |
| SET i = i + 1;
 | |
| END WHILE;
 | |
| COMMIT;
 | |
| END|
 | |
| CREATE TABLE t1(
 | |
| class   INT,
 | |
| id      INT,
 | |
| title   VARCHAR(100)
 | |
| ) ENGINE=InnoDB ROW_FORMAT=COMPACT;
 | |
| SELECT COUNT(*) FROM t1;
 | |
| COUNT(*)
 | |
| 10000
 | |
| CREATE INDEX idx_title ON t1(title);
 | |
| affected rows: 0
 | |
| info: Records: 0  Duplicates: 0  Warnings: 0
 | |
| RENAME TABLE t1 TO t0;
 | |
| # Test Blob
 | |
| CREATE TABLE t1(
 | |
| a INT PRIMARY KEY,
 | |
| b TEXT,
 | |
| c TEXT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
 | |
| INSERT INTO t1 VALUES
 | |
| (1, REPEAT('a',10000), 'a'),
 | |
| (2, REPEAT('b',20000), 'b'),
 | |
| (3, REPEAT('c',40000), 'c'),
 | |
| (4, REPEAT('d',60000), 'd');
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| ALTER TABLE t1 DROP COLUMN c, FORCE;
 | |
| affected rows: 0
 | |
| info: Records: 0  Duplicates: 0  Warnings: 0
 | |
| CHECK TABLE t0,t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t0	check	status	OK
 | |
| test.t1	check	status	OK
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| DROP TABLE t1;
 | |
| RENAME TABLE t0 to t1;
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| SELECT * FROM t1 WHERE title = 'a10';
 | |
| class	id	title
 | |
| 10	10	a10
 | |
| SELECT * FROM t1 WHERE title = 'a5000';
 | |
| class	id	title
 | |
| 5000	5000	a5000
 | |
| SELECT * FROM t1 WHERE title = 'a10000';
 | |
| class	id	title
 | |
| 10000	10000	a10000
 | |
| SELECT * FROM t1 WHERE title = 'a10010';
 | |
| class	id	title
 | |
| DROP TABLE t1;
 | |
| CREATE TABLE t1(
 | |
| class   INT,
 | |
| id      INT,
 | |
| title   VARCHAR(100)
 | |
| ) ENGINE=InnoDB ROW_FORMAT=COMPACT;
 | |
| connect  hang,localhost,root;
 | |
| SET DEBUG_SYNC='alter_table_inplace_trans_commit SIGNAL hung WAIT_FOR ever';
 | |
| CREATE INDEX idx_title ON t1(title);
 | |
| connection default;
 | |
| SET DEBUG_SYNC='now WAIT_FOR hung';
 | |
| disconnect hang;
 | |
| SELECT COUNT(*) FROM t1;
 | |
| COUNT(*)
 | |
| 10000
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| EXPLAIN SELECT * FROM t1 WHERE title = 'a10';
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t1	ref	idx_title	idx_title	103	const	1	Using index condition
 | |
| SELECT * FROM t1 WHERE title = 'a10';
 | |
| class	id	title
 | |
| 10	10	a10
 | |
| SELECT * FROM t1 WHERE title = 'a5000';
 | |
| class	id	title
 | |
| 5000	5000	a5000
 | |
| SELECT * FROM t1 WHERE title = 'a10000';
 | |
| class	id	title
 | |
| 10000	10000	a10000
 | |
| SELECT * FROM t1 WHERE title = 'a10010';
 | |
| class	id	title
 | |
| DROP TABLE t1;
 | |
| # Test Blob
 | |
| CREATE TABLE t1(
 | |
| a INT PRIMARY KEY,
 | |
| b TEXT,
 | |
| c TEXT) ENGINE=InnoDB ROW_FORMAT=COMPACT;
 | |
| INSERT INTO t1 VALUES
 | |
| (1, REPEAT('a',10000), 'a'),
 | |
| (2, REPEAT('b',20000), 'b'),
 | |
| (3, REPEAT('c',40000), 'c'),
 | |
| (4, REPEAT('d',60000), 'd');
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| connect  hang,localhost,root;
 | |
| SET DEBUG_SYNC='alter_table_inplace_trans_commit SIGNAL hung WAIT_FOR ever';
 | |
| ALTER TABLE t1 DROP COLUMN c, FORCE;
 | |
| connection default;
 | |
| SET DEBUG_SYNC='now WAIT_FOR hung';
 | |
| disconnect hang;
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| DROP TABLE t1;
 | |
| DROP PROCEDURE populate_t1;
 | |
| CREATE PROCEDURE populate_t1()
 | |
| BEGIN
 | |
| DECLARE i int DEFAULT 1;
 | |
| START TRANSACTION;
 | |
| WHILE (i <= 10000) DO
 | |
| INSERT INTO t1 VALUES (i, i, CONCAT('a', i));
 | |
| SET i = i + 1;
 | |
| END WHILE;
 | |
| COMMIT;
 | |
| END|
 | |
| CREATE TABLE t1(
 | |
| class   INT,
 | |
| id      INT,
 | |
| title   VARCHAR(100)
 | |
| ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
 | |
| SELECT COUNT(*) FROM t1;
 | |
| COUNT(*)
 | |
| 10000
 | |
| CREATE INDEX idx_title ON t1(title);
 | |
| affected rows: 0
 | |
| info: Records: 0  Duplicates: 0  Warnings: 0
 | |
| RENAME TABLE t1 TO t0;
 | |
| # Test Blob
 | |
| CREATE TABLE t1(
 | |
| a INT PRIMARY KEY,
 | |
| b TEXT,
 | |
| c TEXT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
 | |
| INSERT INTO t1 VALUES
 | |
| (1, REPEAT('a',10000), 'a'),
 | |
| (2, REPEAT('b',20000), 'b'),
 | |
| (3, REPEAT('c',40000), 'c'),
 | |
| (4, REPEAT('d',60000), 'd');
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| ALTER TABLE t1 DROP COLUMN c, FORCE;
 | |
| affected rows: 0
 | |
| info: Records: 0  Duplicates: 0  Warnings: 0
 | |
| CHECK TABLE t0,t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t0	check	status	OK
 | |
| test.t1	check	status	OK
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| DROP TABLE t1;
 | |
| RENAME TABLE t0 to t1;
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| SELECT * FROM t1 WHERE title = 'a10';
 | |
| class	id	title
 | |
| 10	10	a10
 | |
| SELECT * FROM t1 WHERE title = 'a5000';
 | |
| class	id	title
 | |
| 5000	5000	a5000
 | |
| SELECT * FROM t1 WHERE title = 'a10000';
 | |
| class	id	title
 | |
| 10000	10000	a10000
 | |
| SELECT * FROM t1 WHERE title = 'a10010';
 | |
| class	id	title
 | |
| DROP TABLE t1;
 | |
| CREATE TABLE t1(
 | |
| class   INT,
 | |
| id      INT,
 | |
| title   VARCHAR(100)
 | |
| ) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
 | |
| connect  hang,localhost,root;
 | |
| SET DEBUG_SYNC='alter_table_inplace_trans_commit SIGNAL hung WAIT_FOR ever';
 | |
| CREATE INDEX idx_title ON t1(title);
 | |
| connection default;
 | |
| SET DEBUG_SYNC='now WAIT_FOR hung';
 | |
| disconnect hang;
 | |
| SELECT COUNT(*) FROM t1;
 | |
| COUNT(*)
 | |
| 10000
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| EXPLAIN SELECT * FROM t1 WHERE title = 'a10';
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t1	ref	idx_title	idx_title	103	const	1	Using index condition
 | |
| SELECT * FROM t1 WHERE title = 'a10';
 | |
| class	id	title
 | |
| 10	10	a10
 | |
| SELECT * FROM t1 WHERE title = 'a5000';
 | |
| class	id	title
 | |
| 5000	5000	a5000
 | |
| SELECT * FROM t1 WHERE title = 'a10000';
 | |
| class	id	title
 | |
| 10000	10000	a10000
 | |
| SELECT * FROM t1 WHERE title = 'a10010';
 | |
| class	id	title
 | |
| DROP TABLE t1;
 | |
| # Test Blob
 | |
| CREATE TABLE t1(
 | |
| a INT PRIMARY KEY,
 | |
| b TEXT,
 | |
| c TEXT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
 | |
| INSERT INTO t1 VALUES
 | |
| (1, REPEAT('a',10000), 'a'),
 | |
| (2, REPEAT('b',20000), 'b'),
 | |
| (3, REPEAT('c',40000), 'c'),
 | |
| (4, REPEAT('d',60000), 'd');
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| connect  hang,localhost,root;
 | |
| SET DEBUG_SYNC='alter_table_inplace_trans_commit SIGNAL hung WAIT_FOR ever';
 | |
| ALTER TABLE t1 DROP COLUMN c, FORCE;
 | |
| connection default;
 | |
| SET DEBUG_SYNC='now WAIT_FOR hung';
 | |
| disconnect hang;
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| DROP TABLE t1;
 | |
| DROP PROCEDURE populate_t1;
 | |
| CREATE PROCEDURE populate_t1()
 | |
| BEGIN
 | |
| DECLARE i int DEFAULT 1;
 | |
| START TRANSACTION;
 | |
| WHILE (i <= 10000) DO
 | |
| INSERT INTO t1 VALUES (i, i, CONCAT('a', i));
 | |
| SET i = i + 1;
 | |
| END WHILE;
 | |
| COMMIT;
 | |
| END|
 | |
| SET GLOBAL innodb_file_per_table=1;
 | |
| CREATE TABLE t1(
 | |
| class   INT,
 | |
| id      INT,
 | |
| title   VARCHAR(100)
 | |
| ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 | |
| SELECT COUNT(*) FROM t1;
 | |
| COUNT(*)
 | |
| 10000
 | |
| CREATE INDEX idx_title ON t1(title);
 | |
| affected rows: 0
 | |
| info: Records: 0  Duplicates: 0  Warnings: 0
 | |
| RENAME TABLE t1 TO t0;
 | |
| # Test Blob
 | |
| SET GLOBAL innodb_file_per_table=1;
 | |
| CREATE TABLE t1(
 | |
| a INT PRIMARY KEY,
 | |
| b TEXT,
 | |
| c TEXT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 | |
| INSERT INTO t1 VALUES
 | |
| (1, REPEAT('a',10000), 'a'),
 | |
| (2, REPEAT('b',20000), 'b'),
 | |
| (3, REPEAT('c',40000), 'c'),
 | |
| (4, REPEAT('d',60000), 'd');
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| ALTER TABLE t1 DROP COLUMN c, FORCE;
 | |
| affected rows: 0
 | |
| info: Records: 0  Duplicates: 0  Warnings: 0
 | |
| CHECK TABLE t0,t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t0	check	status	OK
 | |
| test.t1	check	status	OK
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| DROP TABLE t1;
 | |
| RENAME TABLE t0 to t1;
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| SELECT * FROM t1 WHERE title = 'a10';
 | |
| class	id	title
 | |
| 10	10	a10
 | |
| SELECT * FROM t1 WHERE title = 'a5000';
 | |
| class	id	title
 | |
| 5000	5000	a5000
 | |
| SELECT * FROM t1 WHERE title = 'a10000';
 | |
| class	id	title
 | |
| 10000	10000	a10000
 | |
| SELECT * FROM t1 WHERE title = 'a10010';
 | |
| class	id	title
 | |
| DROP TABLE t1;
 | |
| SET GLOBAL innodb_file_per_table=1;
 | |
| CREATE TABLE t1(
 | |
| class   INT,
 | |
| id      INT,
 | |
| title   VARCHAR(100)
 | |
| ) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 | |
| connect  hang,localhost,root;
 | |
| SET DEBUG_SYNC='alter_table_inplace_trans_commit SIGNAL hung WAIT_FOR ever';
 | |
| CREATE INDEX idx_title ON t1(title);
 | |
| connection default;
 | |
| SET DEBUG_SYNC='now WAIT_FOR hung';
 | |
| disconnect hang;
 | |
| SELECT COUNT(*) FROM t1;
 | |
| COUNT(*)
 | |
| 10000
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| EXPLAIN SELECT * FROM t1 WHERE title = 'a10';
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t1	ref	idx_title	idx_title	103	const	1	Using index condition
 | |
| SELECT * FROM t1 WHERE title = 'a10';
 | |
| class	id	title
 | |
| 10	10	a10
 | |
| SELECT * FROM t1 WHERE title = 'a5000';
 | |
| class	id	title
 | |
| 5000	5000	a5000
 | |
| SELECT * FROM t1 WHERE title = 'a10000';
 | |
| class	id	title
 | |
| 10000	10000	a10000
 | |
| SELECT * FROM t1 WHERE title = 'a10010';
 | |
| class	id	title
 | |
| DROP TABLE t1;
 | |
| # Test Blob
 | |
| SET GLOBAL innodb_file_per_table=1;
 | |
| CREATE TABLE t1(
 | |
| a INT PRIMARY KEY,
 | |
| b TEXT,
 | |
| c TEXT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 | |
| INSERT INTO t1 VALUES
 | |
| (1, REPEAT('a',10000), 'a'),
 | |
| (2, REPEAT('b',20000), 'b'),
 | |
| (3, REPEAT('c',40000), 'c'),
 | |
| (4, REPEAT('d',60000), 'd');
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| connect  hang,localhost,root;
 | |
| SET DEBUG_SYNC='alter_table_inplace_trans_commit SIGNAL hung WAIT_FOR ever';
 | |
| ALTER TABLE t1 DROP COLUMN c, FORCE;
 | |
| connection default;
 | |
| SET DEBUG_SYNC='now WAIT_FOR hung';
 | |
| disconnect hang;
 | |
| CHECK TABLE t1;
 | |
| Table	Op	Msg_type	Msg_text
 | |
| test.t1	check	status	OK
 | |
| SELECT CHAR_LENGTH(b) FROM t1;
 | |
| CHAR_LENGTH(b)
 | |
| 10000
 | |
| 20000
 | |
| 40000
 | |
| 60000
 | |
| DROP TABLE t1;
 | |
| DROP PROCEDURE populate_t1;
 |