Bug #26979 | locking of memory tables prevents 2nd tablename reference in the same query | ||
---|---|---|---|
Submitted: | 9 Mar 2007 0:40 | Modified: | 9 Mar 2007 1:47 |
Reporter: | Dewey Gaedcke | Email Updates: | |
Status: | Unsupported | Impact on me: | |
Category: | MySQL Server: Memory storage engine | Severity: | S1 (Critical) |
Version: | 5.0.27 | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any | |
Tags: | can't reopen table, memory table, self join, UNION |
[9 Mar 2007 0:40]
Dewey Gaedcke
[9 Mar 2007 1:29]
MySQL Verification Team
Thank you for the bug report. This is a documented behavior of temporary table: http://dev.mysql.com/doc/refman/5.0/en/temporary-table-problems.html "You cannot refer to a TEMPORARY table more than once in the same query. For example, the following does not work: mysql> SELECT * FROM temp_table, temp_table AS t2; ERROR 1137: Can't reopen table: 'temp_table'"
[9 Mar 2007 1:47]
Dewey Gaedcke
Just because the manual documents the problem does not mean it should not be addressed. Without proper array support, temp tables are all that we have, and it's poor form to not support standard SQL on all supported storage engines. Is there any plan to solve this in a future version??