mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Fixed ndbcluster_rollback
This commit is contained in:
@@ -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)
|
|||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user