Commit f0916967 authored by mikael@dator6.(none)'s avatar mikael@dator6.(none)

Fixed ndbcluster_rollback

parent 0f18ff33
...@@ -4643,6 +4643,8 @@ static int ndbcluster_commit(handlerton *hton, THD *thd, bool all) ...@@ -4643,6 +4643,8 @@ static int ndbcluster_commit(handlerton *hton, THD *thd, bool all)
DBUG_ENTER("ndbcluster_commit"); DBUG_ENTER("ndbcluster_commit");
DBUG_ASSERT(ndb); DBUG_ASSERT(ndb);
PRINT_OPTION_FLAGS(thd);
DBUG_PRINT("enter", ("Commit %s", (all ? "all" : "stmt")));
thd_ndb->start_stmt_count= 0; thd_ndb->start_stmt_count= 0;
if (trans == NULL || (!all && if (trans == NULL || (!all &&
thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
...@@ -4714,8 +4716,11 @@ static int ndbcluster_rollback(handlerton *hton, THD *thd, bool all) ...@@ -4714,8 +4716,11 @@ static int ndbcluster_rollback(handlerton *hton, THD *thd, bool all)
DBUG_ENTER("ndbcluster_rollback"); DBUG_ENTER("ndbcluster_rollback");
DBUG_ASSERT(ndb); DBUG_ASSERT(ndb);
thd_ndb->start_stmt_count= 0; 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); DBUG_RETURN(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment