Below is the list of changes that have just been committed into a local
5.0 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.1946 05/10/25 17:00:39 jimw@stripped +3 -0
Fix crash in BDB from improper cleanup of transactions. (Bug #14212)
sql/ha_berkeley.cc
1.159 05/10/25 17:00:34 jimw@stripped +5 -2
Clean up all transactions when we close all transactions
mysql-test/t/bdb.test
1.48 05/10/25 17:00:34 jimw@stripped +11 -0
Add new regression test
mysql-test/r/bdb.result
1.45 05/10/25 17:00:34 jimw@stripped +5 -0
Add new result
# 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-5.0-14212
--- 1.158/sql/ha_berkeley.cc 2005-10-03 21:08:54 -07:00
+++ 1.159/sql/ha_berkeley.cc 2005-10-25 17:00:34 -07:00
@@ -254,12 +254,15 @@
static int berkeley_commit(THD *thd, bool all)
{
+ int error= 0;
DBUG_ENTER("berkeley_commit");
DBUG_PRINT("trans",("ending transaction %s", all ? "all" : "stmt"));
berkeley_trx_data *trx=(berkeley_trx_data *)thd->ha_data[berkeley_hton.slot];
DB_TXN **txn= all ? &trx->all : &trx->stmt;
- int error=txn_commit(*txn,0);
- *txn=0;
+ if (*txn)
+ error= txn_commit(*txn,0);
+ /* If we commit the parent (all), the stmt will also be committed. */
+ *txn= trx->stmt= 0;
#ifndef DBUG_OFF
if (error)
DBUG_PRINT("error",("error: %d",error));
--- 1.44/mysql-test/r/bdb.result 2005-09-29 20:05:59 -07:00
+++ 1.45/mysql-test/r/bdb.result 2005-10-25 17:00:34 -07:00
@@ -1895,3 +1895,8 @@
) ENGINE=BerkeleyDB DEFAULT CHARSET=latin1
drop table t1;
set storage_engine=MyISAM;
+set autocommit=0;
+create table t1 (a int) engine=bdb;
+commit;
+alter table t1 add primary key(a);
+drop table t1;
--- 1.47/mysql-test/t/bdb.test 2005-08-23 08:08:01 -07:00
+++ 1.48/mysql-test/t/bdb.test 2005-10-25 17:00:34 -07:00
@@ -973,3 +973,14 @@
# End varchar test
eval set storage_engine=$default;
+
+#
+# Bug #14212: Server crash after COMMIT + ALTER TABLE
+#
+set autocommit=0;
+create table t1 (a int) engine=bdb;
+commit;
+alter table t1 add primary key(a);
+drop table t1;
+
+# End of 5.0 tests
| Thread |
|---|
| • bk commit into 5.0 tree (jimw:1.1946) BUG#14212 | Jim Winstead | 26 Oct |