Commit 493911bd authored by unknown's avatar unknown

ndb - fix problems introduced/discovered by XA


sql/ha_ndbcluster.cc:
  Respect "all" flag so that correct transaction is released
sql/handler.cc:
  Make sure innodb temporary latches are only released if innodb is used
parent a89dcc58
...@@ -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 @@ err: ...@@ -860,7 +860,8 @@ err:
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