ALTER TABLE temporary tables not listed in INFORMATION_SCHEMA.TEMPORARY_TABLES
The temporary tables that are created for ALTER TABLE execution are not listed in INFORMATION_
To verify, add a debug sync point that stops the ALTER TABLE thread when temporary table is in use, e.g. at the start of handler:
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2), (3);
SET DEBUG_SYNC= 'start_ha_write_row SIGNAL write_in_progress WAIT_FOR i_s_completed';
send ALTER TABLE t1 ADD COLUMN b VARCHAR(10);
SET DEBUG_SYNC= 'now WAIT_FOR write_in_progress';
SELECT COUNT(*) FROM INFORMATION_
will return 0 for the temp table count even though it should be 1.
The cause for this is that the temp table is created with open_temporary_
This was fixed in 5.5 by the 2875.107.1 revision (backport from 6.0 WL#3726 "DDL locking for all metadata objects")
Test case and fix will be together with bug 951588.
- Alexey Kopytov (community): Approve on 2012-06-14
Diff: 100 lines (+13/-10)7 files modifieddoc/source/conf.py (+2/-2)