--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;
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.
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 have_debug_ sync.inc
--source include/
--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'; SCHEMA. GLOBAL_ TEMPORARY_ TABLES;
SELECT COUNT(*) FROM INFORMATION_
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.