Bug #15319 | Cannot drop a corrupt BDB table / Bad error message | ||
---|---|---|---|
Submitted: | 29 Nov 2005 16:39 | Modified: | 31 Aug 2006 14:38 |
Reporter: | Ingo Strüwing | Email Updates: | |
Status: | Unsupported | Impact on me: | |
Category: | MySQL Server: BDB | Severity: | S3 (Non-critical) |
Version: | 5.0.17/4.1.16 BK | OS: | Linux (Linux) |
Assigned to: | Elliot Murphy | CPU Architecture: | Any |
[29 Nov 2005 16:39]
Ingo Strüwing
[29 Nov 2005 17:37]
MySQL Verification Team
mysql> use test; Database changed mysql> create table t1 (c1 int) engine=bdb; Query OK, 0 rows affected (0.07 sec) mysql> system > /home/miguel/dbs/5.0/var/test/t1.db mysql> drop table if exists t1; ERROR 1051 (42S02): Unknown table 't1' mysql> create table t1 (c1 int) engine=bdb; ERROR 1050 (42S01): Table 't1' already exists mysql> repair table t1; +---------+--------+----------+---------------------------------+ | Table | Op | Msg_type | Msg_text | +---------+--------+----------+---------------------------------+ | test.t1 | repair | error | Got error 1 from storage engine | +---------+--------+----------+---------------------------------+ 1 row in set, 1 warning (0.00 sec) mysql> drop table if exists t1; ERROR 1051 (42S02): Unknown table 't1' mysql> create table t1 (c1 int) engine=bdb; ERROR 1050 (42S01): Table 't1' already exists mysql> drop table if exists t1; ERROR 1051 (42S02): Unknown table 't1' mysql> create table t1 (c1 int) engine=bdb; ERROR 1050 (42S01): Table 't1' already exists mysql> select version(); +--------------+ | version() | +--------------+ | 5.0.17-debug | +--------------+ 1 row in set (0.00 sec) 051129 12:31:50 [Note] libexec/mysqld: ready for connections. Version: '5.0.17-debug' socket: '/tmp/mysql.sock' port: 3306 Source distribution 051129 14:46:04 [ERROR] bdb: /home/miguel/dbs/5.0/var/././test/t1.db: unexpected file type or format 051129 14:48:47 [ERROR] bdb: /home/miguel/dbs/5.0/var/././test/t1.db: unexpected file type or format 051129 14:48:47 [ERROR] bdb: /home/miguel/dbs/5.0/var/././test/t1.db: unexpected file type or format 051129 14:49:02 [ERROR] bdb: /home/miguel/dbs/5.0/var/././test/t1.db: unexpected file type or format 051129 14:49:46 [ERROR] bdb: /home/miguel/dbs/5.0/var/././test/t1.db: unexpected file type or format miguel@hegel:~/dbs/mytest> bin/mysql -uroot Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.1.16-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use test; Database changed mysql> create table t1 (c1 int) engine=bdb; Query OK, 0 rows affected (0.05 sec) mysql> system > /home/miguel/dbs/mytest/var/test/t1.db mysql> drop table if exists t1; ERROR 1051 (42S02): Unknown table 't1' mysql> show tables; +----------------+ | Tables_in_test | +----------------+ | t1 | +----------------+ 1 row in set (0.00 sec) Version: '4.1.16-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution 051129 15:36:32 [ERROR] bdb: /home/miguel/dbs/mytest/var/././test/t1.db: unexpected file type or format
[1 Dec 2005 23:01]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/32934
[14 Jan 2006 1:03]
Jim Winstead
Turns out that the fix is not correct. If we go behind the scenes to delete the corrupt .db file, bdb then gets confused when we call DB_ENV->txn_checkpoint() (which we do from FLUSH LOGS) and throws an undocumented error.