ALTER TABLE temporary tables not listed in INFORMATION_SCHEMA.TEMPORARY_TABLES
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Invalid
|
Undecided
|
Unassigned | ||
5.1 |
Fix Released
|
Medium
|
Hrvoje Matijakovic | ||
5.5 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
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);
connect (conn2,
connection conn2;
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.
Related branches
- Alexey Kopytov (community): Approve
-
Diff: 100 lines (+13/-10)7 files modifieddoc/source/conf.py (+2/-2)
doc/source/diagnostics/misc_info_schema_tables.rst (+1/-1)
doc/source/flexibility/buff_read_ahead_area.rst (+1/-1)
doc/source/management/innodb_expand_import.rst (+4/-1)
doc/source/management/innodb_lru_dump_restore.rst (+1/-1)
doc/source/reliability/innodb_recovery_update_relay_log.rst (+2/-2)
doc/source/scalability/innodb_expand_undo_slots.rst (+2/-2)
IMHO not worth to fix in 5.1, let's document the limitation instead.