4 messages in com.mysql.lists.bugsRe: Can't reopen table: 'd1' when d1 ...| From | Sent On | Attachments |
|---|---|---|
| Philip Lijnzaad | 25 Apr 2001 06:29 | |
| Sinisa Milivojevic | 25 Apr 2001 07:44 | |
| Philip Lijnzaad | 25 Apr 2001 07:53 | |
| Michael Widenius | 25 Apr 2001 10:53 |
| Subject: | Re: Can't reopen table: 'd1' when d1 is renaming of a TEMPORARY table![]() |
|---|---|
| From: | Philip Lijnzaad (lijn...@ebi.ac.uk) |
| Date: | 04/25/2001 07:53:20 AM |
| List: | com.mysql.lists.bugs |
On Wed, 25 Apr 2001 17:45:12 +0300 (EEST), "Sinisa" == Sinisa Milivojevic <sin...@mysql.com> wrote:
Sinisa> Philip Lijnzaad writes:
When doing a cumulation:
select d1.n, d1.cnt, sum(d2.cnt*d2.n) as cum from distro d1, distro d2 where d1.n >= d2.n group by d1.n, d1.cnt order by d1.n;
this works fine if distro is an ordinary table, but not if distro is a TEMPORARY one. In that case, I get a message
Can't reopen table: 'd1'
which is not very helpful, and in the case of the not entirely trivial query above, leads one to you waste a lot of time trying to get the query right.
There may be special limitations on TEMPORARY tables, but this should either work, or fail with a proper error message.
(This is MySQL 3.23.25-beta, on Tru64 Unix).
With kind regards, Philip
Sinisa> Hi!
Hi, thanks for your fast answer.
Sinisa> The above is not a bug.
Well ... it's at least a strange inconsistency. Common sense, nor the documentation, nor the error message suggest that you can not have a table alias for temporary tables. As a result, I spent an hour or so getting a tricky query right. So it may not be a programming error, but it's certainly something that could (and should) be improved.
Sinisa> Aliasing temporary tables will be introduced in some of 4.* releases.
That's very good to hear. Many thanks, Philip
-- Why don't Alice and Bob simply get married?
----------------------------------------------------------------------------- Philip Lijnzaad, lijn...@ebi.ac.uk \ European Bioinformatics Institute,rm A2-08 +44 (0)1223 49 4639 / Wellcome Trust Genome Campus, Hinxton +44 (0)1223 49 4468 (fax) \ Cambridgeshire CB10 1SD, GREAT BRITAIN PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53




