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