mirror of
https://github.com/MariaDB/server.git
synced 2025-10-22 19:52:58 +03:00
Bug#50201: Server crashes in explain_filename on an InnoDB partitioned table
Problem was that in mysql-trunk the ER() macro is now dependent on current_thd and the innodb monitor thread has no binding to that thd object. This cause the crash because of bad derefencing. Solution was to add a new macro which take the thd as an argument (which the innodb thread uses for the call). (Updated according to reviewers comments, i.e. added ER_THD_OR_DEFAULT and moved test to suite parts.) mysql-test/suite/parts/r/partition_innodb_status_file.result: Bug#50201: Server crashes in explain_filename on an InnoDB partitioned table New test result file mysql-test/suite/parts/t/partition_innodb_status_file-master.opt: Bug#50201: Server crashes in explain_filename on an InnoDB partitioned table New test opt file mysql-test/suite/parts/t/partition_innodb_status_file.test: Bug#50201: Server crashes in explain_filename on an InnoDB partitioned table New test. Note that the innodb monitor thread only runs every 15 seconds, so this test will take at least 15 seconds, so I have moved it to the parts suite. sql/sql_table.cc: Bug#50201: Server crashes in explain_filename on an InnoDB partitioned table Using thd safe ER macro. sql/unireg.h: Bug#50201: Server crashes in explain_filename on an InnoDB partitioned table Added ER macros for use with specified thd pointer.
This commit is contained in:
14
mysql-test/suite/parts/r/partition_innodb_status_file.result
Normal file
14
mysql-test/suite/parts/r/partition_innodb_status_file.result
Normal file
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE t1 (a INT) ENGINE = InnoDB PARTITION BY HASH(a);
|
||||
INSERT INTO t1 VALUES (0), (1), (2);
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET a = 5 WHERE a = 1;
|
||||
# Connection con1
|
||||
# InnoDB lock timeout and monitor thread runs every 15 seconds
|
||||
SET innodb_lock_wait_timeout = 20;
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET a = 3 WHERE a = 1;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
COMMIT;
|
||||
# Connection default
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
@@ -0,0 +1 @@
|
||||
--innodb-status-file=1
|
20
mysql-test/suite/parts/t/partition_innodb_status_file.test
Normal file
20
mysql-test/suite/parts/t/partition_innodb_status_file.test
Normal file
@@ -0,0 +1,20 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_partition.inc
|
||||
|
||||
CREATE TABLE t1 (a INT) ENGINE = InnoDB PARTITION BY HASH(a);
|
||||
INSERT INTO t1 VALUES (0), (1), (2);
|
||||
START TRANSACTION;
|
||||
UPDATE t1 SET a = 5 WHERE a = 1;
|
||||
connect (con1, localhost, root,,);
|
||||
--echo # Connection con1
|
||||
--echo # InnoDB lock timeout and monitor thread runs every 15 seconds
|
||||
SET innodb_lock_wait_timeout = 20;
|
||||
START TRANSACTION;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
UPDATE t1 SET a = 3 WHERE a = 1;
|
||||
COMMIT;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
--echo # Connection default
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user