Bug #24024 | wrong error message when drop table (used by pending transaction) fails | ||
---|---|---|---|
Submitted: | 6 Nov 2006 19:14 | Modified: | 1 Nov 2007 15:54 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Errors | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[6 Nov 2006 19:14]
Matthias Leich
[7 Nov 2006 16:55]
Matthias Leich
Protocol of simplified testcase: set storage_engine = Falcon; DROP TABLE IF EXISTS t1; create table t1(a int not null, b int, primary key(a)); insert into t1(a) values (1); commit; set autocommit = 0; update t1 set b = 5 where a = 1; # Switch to session b (user=root) insert into t1(a) values(7); commit; SELECT * FROM t1; a b 1 NULL 7 NULL drop table t1; ERROR 42S02: Unknown table 't1' <-- It is in my eyes ok that the server refuses the execution of DROP TABLE. But the error message is tottally misleading. An message telling that DROP TABLE is denied because another transaction uses this table or has a lock on this table would be much better.
[7 Dec 2006 14:39]
Hakan Küçükyılmaz
Verified with falcon_bug_24024.test on Linux 32-bit with change set 1.2395, 2006-12-07. Regards, Hakan
[19 Oct 2007 16:36]
Kevin Lewis
Chris, This is a wrong error message.
[1 Nov 2007 5:39]
Christopher Powers
This is a problem with error handling in the server. Falcon returns error HA_ERR_TABLE_EXIST (156) to ha_delete_table(), along with the text "table TEST.T1 has uncommitted updates and can't be dropped". ha_delete_table() adds to the error message and pushes on the error list. The error is changed to 1051, "Unknown table" in mysql_rm_table_part2() and later printed.
[1 Nov 2007 15:54]
Christopher Powers
Dupe of bug#22972, "Falcon: Partitioned table with pending transaction leads to strange error".