>Description:

When a temp table is included twice in a query mysql fails with the error:

ERROR 1137 at line 9: Can't reopen table: 'foo'

This happens on both 4.0.17 and 4.0.18. It did not happen on 4.0.14.

>How-To-Repeat:

create temporary table test (pk int primary key);
select * from test as foo, test as bar where foo.pk=bar.pk;

>Fix:

Dropping the "temporary" from the above example fixes the problem, but is not a great solution.

>Submitter-Id: John Heitmann
>Originator:
>Organization:
<organization of PR author (multiple lines)>
>MySQL support: none
>Synopsis: Temp table can't be used twice in a query [4.0.x]
>Severity: serious
>Priority: medium
>Category: mysql
>Class: sw-bug
>Release: mysql-4.0.18 (Source distribution)
>Server: /opt/cn/bin/mysqladmin Ver 8.40 Distrib 4.0.18, for pc-linux on i686
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license


Server version          4.0.18-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /opt/cn/var/mysql4/mysql.sock
Uptime:                 43 min 7 sec

Threads: 9 Questions: 839777 Slow queries: 0 Opens: 2313 Flush tables: 1 Open tables: 64 Queries per second avg: 324.614
>C compiler: cc (GCC) 3.2.1
>C++ compiler: c++ (GCC) 3.2.1
>Environment:
<machine, os, target, libraries (multiple lines)>
System: Linux *******blanked********* 2.4.18-24.7.xsmp #3 SMP Thu Feb 13 10:34:29 EST 2003 i686 unknown
Architecture: i686


Some paths: /opt/cn/bin/perl /opt/cn/bin/make /opt/cn/bin/gmake /opt/cn/bin/gcc /opt/cn/bin/cc
GCC: Reading specs from /opt/cn/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/specs
Configured with: ../configure --prefix=/opt/cn --exec-prefix=/opt/cn --includedir=/opt/cn/include/gcc --with-gxx-include-dir=/opt/cn/include/g++ --with-local-prefix=/opt/cn/lib/gcc-lib --enable-languages=c,c++ --enable-threads=posix --disable-maintainer-mode --disable-shared --disable-nls --with-gnu-ld --with-ld=/opt/cn/bin/ld --with-gnu-as --with-as=/opt/cn/bin/as --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 3.2.1
Compilation info: CC='/opt/cn/bin/cc' CFLAGS='-O2 -pipe' CXX='/opt/cn/bin/c++' CXXFLAGS='-O2 -pipe' LDFLAGS='' ASFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 Mar 2 2003 /lib/libc.so.6 -> libc-2.2.5.so
-rwxr-xr-x 1 root root 1260480 Apr 15 2002 /lib/libc-2.2.5.so
-rw-r--r-- 1 root root 2310808 Apr 15 2002 /usr/lib/libc.a
-rw-r--r-- 1 root root 178 Apr 15 2002 /usr/lib/libc.so
Configure command: ./configure '--prefix=/opt/cn' '--sysconfdir=/opt/cn/etc/mysql4' '--localstatedir=/opt/cn/var/mysql4' '--libexecdir=/opt/cn/libexec/mysql4' '--with-unix-socket-path=/opt/cn/var/mysql4/mysql.sock' '--with-mysqld-user=bschmaus' '--enable-thread-safe-client' '--with-berkeley-db' '--with-low-memory' '--disable-shared' '--with-client-ldflags=-static' '--with-mysqld-ldflags=-static' 'CC=/opt/cn/bin/cc' 'CFLAGS=-O2 -pipe' 'CXXFLAGS=-O2 -pipe' 'CXX=/opt/cn/bin/c++'



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to