diff options
-rw-r--r-- | mysql-test/t/bdb-crash.test | 2 | ||||
-rw-r--r-- | sql/ha_berkeley.cc | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/mysql-test/t/bdb-crash.test b/mysql-test/t/bdb-crash.test index a966ea4659d..98b542bf4c3 100644 --- a/mysql-test/t/bdb-crash.test +++ b/mysql-test/t/bdb-crash.test @@ -45,4 +45,4 @@ create table t1 (a int) engine=bdb; set autocommit=0; insert into t1 values(1); analyze table t1; -drop table t1;
\ No newline at end of file +drop table t1; diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index d0ce8f1fdb2..3522aadf349 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -2102,6 +2102,15 @@ int ha_berkeley::analyze(THD* thd, HA_CHECK_OPT* check_opt) DB_TXN_STAT *txn_stat_ptr= 0; /* + Original bdb documentation says: + "The DB->stat method cannot be transaction-protected. + For this reason, it should be called in a thread of + control that has no open cursors or active transactions." + So, let's check if there are any changes have been done since + the beginning of the transaction.. + */ + + /* If it's a merge conflict here (4.0->4.1), please ignore it! The reason of the conflict is the difference between versions of bdb: |