Below is the list of changes that have just been committed into a local
4.1 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2474 05/12/01 15:07:21 jimw@stripped +3 -0
Allow a corrupt BDB table to be dropped. (Bug #15319)
sql/ha_berkeley.cc
1.153 05/12/01 15:07:18 jimw@stripped +12 -6
In delete_table(), do a brute-force removal of the .db file if
BDB is not able to remove it (because it is corrupt, for example).
mysql-test/t/bdb-crash.test
1.13 05/12/01 15:07:18 jimw@stripped +8 -1
Add new test
mysql-test/r/bdb-crash.result
1.10 05/12/01 15:07:18 jimw@stripped +3 -0
Add new results
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-4.1-15319
--- 1.152/sql/ha_berkeley.cc 2005-06-05 10:38:38 -07:00
+++ 1.153/sql/ha_berkeley.cc 2005-12-01 15:07:18 -08:00
@@ -2013,13 +2013,19 @@
{
int error;
char name_buff[FN_REFLEN];
- DBUG_ENTER("delete_table");
- if ((error=db_create(&file, db_env, 0)))
- my_errno=error; /* purecov: inspected */
+ DBUG_ENTER("ha_berkeley::delete_table");
+ if ((error= db_create(&file, db_env, 0)))
+ my_errno= error; /* purecov: inspected */
else
- error=file->remove(file,fn_format(name_buff,name,"",ha_berkeley_ext,2 | 4),
- NULL,0);
- file=0; // Safety
+ {
+ error= file->remove(file, fn_format(name_buff, name, "", ha_berkeley_ext,
+ MY_REPLACE_EXT | MY_UNPACK_FILENAME),
+ NULL, 0);
+ /* If BDB couldn't do it, just brute force the removal. */
+ if (error)
+ error= my_delete(name_buff, MYF(0));
+ }
+ file= 0; // Safety
DBUG_RETURN(error);
}
--- 1.9/mysql-test/r/bdb-crash.result 2004-03-29 15:32:39 -08:00
+++ 1.10/mysql-test/r/bdb-crash.result 2005-12-01 15:07:18 -08:00
@@ -37,3 +37,6 @@
Table Op Msg_type Msg_text
test.t1 analyze status Operation need committed state
drop table t1;
+create table t1 (a int) engine=bdb;
+drop table t1;
+End of 4.1 tests
--- 1.12/mysql-test/t/bdb-crash.test 2005-07-27 17:21:39 -07:00
+++ 1.13/mysql-test/t/bdb-crash.test 2005-12-01 15:07:18 -08:00
@@ -48,4 +48,11 @@
analyze table t1;
drop table t1;
-# End of 4.1 tests
+#
+# Bug #15319: Cannot drop a corrupt BDB table
+#
+create table t1 (a int) engine=bdb;
+system echo "this is a junk file for test" > var/master-data/test/t1.db ;
+drop table t1;
+
+--echo End of 4.1 tests
| Thread |
|---|
| • bk commit into 4.1 tree (jimw:1.2474) BUG#15319 | Jim Winstead | 1 Dec |