Comment 13 for bug 1193264

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

MTR testcase, almost identical to that of bug 1193308, but with partitioning specified:

# Test for bug 1193264 (handle_fatal_signal in ha_partition::clone (sql/ha_partition.cc:3412))

--source include/have_innodb.inc
--source include/have_debug_sync.inc

--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

CREATE TABLE t1(a INT PRIMARY KEY, b INT, c INT) ENGINE=InnoDB PARTITION BY HASH(a) PARTITIONS 2;
INSERT INTO t1 VALUES (1, 1, 1);

SET DEBUG_SYNC= 'innodb_alter_commit_after_lock_table SIGNAL alter_ready WAIT_FOR i_s_completed';
send ALTER TABLE t1 DROP COLUMN c, ALGORITHM=INPLACE;

connect (conn2,localhost,root,,);
connection conn2;

SET DEBUG_SYNC= 'now WAIT_FOR alter_ready';
SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLES;
SET DEBUG_SYNC= 'now SIGNAL i_s_completed';

disconnect conn2;
connection default;
reap;

DROP TABLE t1;

The cause is similar to bug 1193308. ha_partition::clone() dereferences NULL if this->table == NULL, which will happen for temp tables created for 5.6 ALTER.