diff options
author | tim@threads.polyesthetic.msg <> | 2000-11-07 00:53:24 -0500 |
---|---|---|
committer | tim@threads.polyesthetic.msg <> | 2000-11-07 00:53:24 -0500 |
commit | aacaaf5922ed78c0046bd0ae676ac2a389043559 (patch) | |
tree | caf3effd506be5c04531ae4c3a312388c7114fa8 /sql | |
parent | fd17c119cf19b5b7e40756026b2720f19e46c190 (diff) | |
parent | 96b8ab704fdcdb65984a5a3064b1622088d3ce0f (diff) | |
download | mariadb-git-aacaaf5922ed78c0046bd0ae676ac2a389043559.tar.gz |
Merge work:/home/bk/mysql
into threads.polyesthetic.msg:/usr/local/src/my/work
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_berkeley.cc | 4 | ||||
-rw-r--r-- | sql/handler.cc | 7 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index 1239c7db7d3..6cf97f16bb8 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -1370,8 +1370,8 @@ int ha_berkeley::external_lock(THD *thd, int lock_type) current_row.data=0; if (!--thd->transaction.bdb_lock_count) { - if (thd->transaction.bdb_tid && (thd->options & - (OPTION_AUTO_COMMIT | OPTION_BEGIN))) + if (thd->transaction.bdb_tid && (thd->options & OPTION_AUTO_COMMIT) + && !(thd->options & OPTION_BEGIN)) { /* F_UNLOCK is done without a transaction commit / rollback. This diff --git a/sql/handler.cc b/sql/handler.cc index df44df4a8c1..f1ec7ea7e09 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -178,7 +178,8 @@ int ha_autocommit_or_rollback(THD *thd, int error) { DBUG_ENTER("ha_autocommit_or_rollback"); #if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB) - if ((thd->options & OPTION_AUTO_COMMIT) && !thd->locked_tables) + if ((thd->options & OPTION_AUTO_COMMIT) && !(thd->options & OPTION_BEGIN) + && !thd->locked_tables) { if (!error) { @@ -195,7 +196,7 @@ int ha_autocommit_or_rollback(THD *thd, int error) int ha_commit(THD *thd) { int error=0; - DBUG_ENTER("commit"); + DBUG_ENTER("ha_commit"); #ifdef HAVE_BERKELEY_DB if (thd->transaction.bdb_tid) { @@ -224,7 +225,7 @@ int ha_commit(THD *thd) int ha_rollback(THD *thd) { int error=0; - DBUG_ENTER("commit"); + DBUG_ENTER("ha_rollback"); #ifdef HAVE_BERKELEY_DB if (thd->transaction.bdb_tid) { diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 3f94f89f366..915cda4e0f6 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1536,7 +1536,7 @@ mysql_execute_command(void) /* Check if auto_commit mode changed */ if ((org_options ^ lex->options) & OPTION_AUTO_COMMIT) { - if (org_options & OPTION_AUTO_COMMIT) + if (!org_options & OPTION_AUTO_COMMIT) { /* We changed to auto_commit mode */ thd->options&= ~OPTION_BEGIN; |