Commit b6e20e35 authored by joreland@mysql.com's avatar joreland@mysql.com

ndb - fix problems introduced/discovered by XA

parent 9f1f8d32
...@@ -3400,7 +3400,12 @@ int ndbcluster_commit(THD *thd, bool all) ...@@ -3400,7 +3400,12 @@ int ndbcluster_commit(THD *thd, bool all)
ndbcluster_print_error(res, error_op); ndbcluster_print_error(res, error_op);
} }
ndb->closeTransaction(trans); ndb->closeTransaction(trans);
thd_ndb->all= thd_ndb->stmt= NULL;
if(all)
thd_ndb->all= NULL;
else
thd_ndb->stmt= NULL;
DBUG_RETURN(res); DBUG_RETURN(res);
} }
...@@ -3432,7 +3437,12 @@ int ndbcluster_rollback(THD *thd, bool all) ...@@ -3432,7 +3437,12 @@ int ndbcluster_rollback(THD *thd, bool all)
ndbcluster_print_error(res, error_op); ndbcluster_print_error(res, error_op);
} }
ndb->closeTransaction(trans); ndb->closeTransaction(trans);
thd_ndb->all= thd_ndb->stmt= NULL;
if(all)
thd_ndb->all= NULL;
else
thd_ndb->stmt= NULL;
DBUG_RETURN(res); DBUG_RETURN(res);
} }
......
...@@ -860,7 +860,8 @@ bool mysql_xa_recover(THD *thd) ...@@ -860,7 +860,8 @@ bool mysql_xa_recover(THD *thd)
int ha_release_temporary_latches(THD *thd) int ha_release_temporary_latches(THD *thd)
{ {
#ifdef HAVE_INNOBASE_DB #ifdef HAVE_INNOBASE_DB
innobase_release_temporary_latches(thd); if (opt_innodb)
innobase_release_temporary_latches(thd);
#endif #endif
return 0; 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