diff options
author | unknown <mikael@dator6.(none)> | 2007-09-15 23:33:04 +0200 |
---|---|---|
committer | unknown <mikael@dator6.(none)> | 2007-09-15 23:33:04 +0200 |
commit | 75b153f2404035476288df95d6101da305bb969d (patch) | |
tree | aae2ab68dc007890367e4cf7b74691d08479f331 /sql/ha_ndbcluster.cc | |
parent | 5f95f01b4d723fd05cc6de75ba62326084172754 (diff) | |
download | mariadb-git-75b153f2404035476288df95d6101da305bb969d.tar.gz |
Fixed ndbcluster_rollback
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index c090f2a4cde..239b0fa13ec 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -4643,6 +4643,8 @@ static int ndbcluster_commit(handlerton *hton, THD *thd, bool all) DBUG_ENTER("ndbcluster_commit"); DBUG_ASSERT(ndb); + PRINT_OPTION_FLAGS(thd); + DBUG_PRINT("enter", ("Commit %s", (all ? "all" : "stmt"))); thd_ndb->start_stmt_count= 0; if (trans == NULL || (!all && thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) @@ -4714,8 +4716,11 @@ static int ndbcluster_rollback(handlerton *hton, THD *thd, bool all) DBUG_ENTER("ndbcluster_rollback"); DBUG_ASSERT(ndb); thd_ndb->start_stmt_count= 0; - if (!trans) + if (trans == NULL || (!all && + thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) { + /* Ignore end-of-statement until real rollback or commit is called */ + DBUG_PRINT("info", ("Rollback before start or end-of-statement only")); DBUG_RETURN(0); } |