summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2006-05-05 14:25:57 +0200
committerunknown <mskold@mysql.com>2006-05-05 14:25:57 +0200
commit4bc3ba7854150f8558dad77aee6ea18ff3018058 (patch)
tree9361c8a00edefade4cb52a7f5aa98ebb42156038
parent2a655fcc519a968d2dd33534b37c923549b37a7b (diff)
downloadmariadb-git-4bc3ba7854150f8558dad77aee6ea18ff3018058.tar.gz
Bug #18798: mysqld cores on update in ha_ndbcluster call if cluster has failed before, added extra check that transaction is started
-rw-r--r--sql/ha_ndbcluster.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 3544ccef42b..10d90dc1e04 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -6447,7 +6447,8 @@ ha_ndbcluster::records_in_range(uint inx, key_range *min_key,
}
// Define scan op for the range
- if ((trans=m_active_trans) == NULL)
+ if ((trans=m_active_trans) == NULL ||
+ trans->commitStatus() != NdbTransaction::Started)
{
DBUG_PRINT("info", ("no active trans"));
if (! (trans=ndb->startTransaction()))