can"t reopen table when using a temporary table and a self left join
am 23.10.2002 05:07:43 von chaimDescription:
When using temporary tables, the following script fails:
-----------------------------------
CREATE TEMPORARY TABLE zz1tmpq (id bigint NOT NULL auto_increment,root_id
int NOT NULL def
ault '0', level int default NULL, parent_id bigint default NULL, left_seq
int default NULL
, right_seq int default NULL, lookup_id bigint default NULL, PRIMARY KEY
(id), KEY parent_
id_k1 (parent_id), KEY left_seq_k1 (left_seq), KEY right_seq_k1
(right_seq), KEY lookup_id
_k1 (lookup_id) );
SELECT p.id FROM zz1tmpq AS p LEFT JOIN zz1tmpq AS c ON p.id = c.parent_id
WHERE c.parent_
id IS NULL AND p.parent_id = 1 AND p.root_id = 0;
----------------------------------------
with the following error:
--------------
ERROR 1137 at line 3: Can't reopen table: 'p'
--------------------
This works for regular tables (non-temporary ones).
How-To-Repeat:
see above.
Fix:
?
Synopsis: temporary tables and self left-join
Submitter-Id:
Originator: Chaim Bear
Organization: none
MySQL support: none
Severity: non-critical
Priority: medium
Category: mysqld
Class: sw-bug
Release: mysql-3.23.53-max-nt
Exectutable: mysqld-nt
Environment: Intel Pentium III 933 Mhz, 128MB ram
System: Win2k
Architecture: i
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12822@lists.mysql.com
To unsubscribe, e-mail