diff options
author | monty@donna.mysql.com <> | 2000-11-27 02:28:41 +0200 |
---|---|---|
committer | monty@donna.mysql.com <> | 2000-11-27 02:28:41 +0200 |
commit | dc5e32ea40b435c13cb2d9c03e465743aff14b51 (patch) | |
tree | edb54aec005b494e1195e3b4c62ef7b81153a705 /sql/ha_berkeley.cc | |
parent | 8e3322098ac94687ab13aec1a09e8ed2ce93ef9c (diff) | |
download | mariadb-git-dc5e32ea40b435c13cb2d9c03e465743aff14b51.tar.gz |
Added connect_timeout and fix for transactions per statement
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r-- | sql/ha_berkeley.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 8545f5015bd..60830f4df37 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -171,7 +171,8 @@ bool berkeley_flush_logs() int berkeley_commit(THD *thd, void *trans) { DBUG_ENTER("berkeley_commit"); - DBUG_PRINT("trans",("ending transaction")); + DBUG_PRINT("trans",("ending transaction %s", + trans == thd->transaction.stmt.bdb_tid ? "stmt" : "all")); int error=txn_commit((DB_TXN*) trans,0); #ifndef DBUG_OFF if (error) @@ -183,7 +184,8 @@ int berkeley_commit(THD *thd, void *trans) int berkeley_rollback(THD *thd, void *trans) { DBUG_ENTER("berkeley_rollback"); - DBUG_PRINT("trans",("aborting transaction")); + DBUG_PRINT("trans",("aborting transaction %s", + trans == thd->transaction.stmt.bdb_tid ? "stmt" : "all")); int error=txn_abort((DB_TXN*) trans); DBUG_RETURN(error); } @@ -1350,7 +1352,7 @@ int ha_berkeley::external_lock(THD *thd, int lock_type) if (!thd->transaction.bdb_lock_count++) { /* First table lock, start transaction */ - if (!(thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN)) && + if ((thd->options & (OPTION_NOT_AUTO_COMMIT | OPTION_BEGIN)) && !thd->transaction.all.bdb_tid) { /* We have to start a master transaction */ |