Bug #6524 ERROR 1051 (42S02): Unknown table '%s'
Submitted: 9 Nov 2004 14:05 Modified: 11 Nov 2004 9:23
Reporter: Ryan Schmidt Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.7 OS:N/A
Assigned to: Assigned Account CPU Architecture:Any

[9 Nov 2004 14:05] Ryan Schmidt
Description:
Hello. I found two bugs relating to the display of error message 1051, the "unknown table" 
message, when dropping tables. I do not know if the bug is in the server or the client, but it 
occurs with several versions of client and server, including 4.0.18, 4.0.21 and 4.1.7.

The first bug is that if I specify multiple tables to drop, then the error message makes it sound 
like it can't find a table whose name is the concatenation of all the table names I specified.

The second bug is that if I specify a whole lotta tables that don't exist, then it says it can't find a 
table named "%s".

How to repeat:
SQL:
 DROP  TABLE `xxxxxxxxxxxxxxxxxx`  ,
`xxxxxxxxxxxxxxxxxxxxxxx` ;

ACTUAL RESULT:
ERROR 1051 (42S02): Unknown table 'xxxxxxxxxxxxxxxxxx,xxxxxxxxxxxxxxxxxxxxxxx'

EXPECTED RESULT:
ERROR 1051 (42S02): Unknown table 'xxxxxxxxxxxxxxxxxx'

SQL:
 DROP  TABLE `xxxxxxxxxxxxxxxxxx`  ,
`xxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxx` ,
`xxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` ,
`xxxxxxxxxxxxxx` ,
`xxxxxxx` ;

ACTUAL RESULT:
ERROR 1051 (42S02): Unknown table '%s'

EXPECTED RESULT:
ERROR 1051 (42S02): Unknown table 'xxxxxxxxxxxxxxxxxx'
[11 Nov 2004 7:32] Ramil Kalimullin
Hello!

This is expected behavior.
Mysql lists all non-existent tables separated by commas.
For those error messages which are longer than 256 characters, only
its templates are displayed.
So, I'll close #6524 as 'not a bug'.

Regards, Ramil.
[11 Nov 2004 9:00] Ryan Schmidt
Well, yes, clearly, as you say, this is what MySQL does. But it is not, contrary to what you say, 
expected behavior. If I had expected that behavior, I wouldn't have filed it as a bug. The 
behavior doesn't make sense. It is unfriendly. It's programmerish. Just because MySQL is a 
server product does not mean that it can't at least try to be a little more user-friendly here and 
there. But, of course, it is up to you whether you want to fix this bug or not.
[11 Nov 2004 9:19] Ramil Kalimullin
Ryan, thank you for the suggestion, we'll discuss it.
[11 Nov 2004 9:23] Sergei Golubchik
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in MySQL.

Additional info:

see http://bugs.mysql.com/3891