summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2006-10-19 09:27:58 +0200
committerunknown <jonas@perch.ndb.mysql.com>2006-10-19 09:27:58 +0200
commitd262020f44988305f45519b21d3568fad0eb6b9a (patch)
treeafd31614b1aebf20ec5eb88b69a109a64a2a84a1 /sql/ha_ndbcluster.cc
parenteb1d1202c9662f9496426c0a8cdd84505a959fce (diff)
downloadmariadb-git-d262020f44988305f45519b21d3568fad0eb6b9a.tar.gz
ndb - bug#23200
this changes lock taken during peek, to decrease likelyhood of transaction abort sql/ha_ndbcluster.cc: use exclusive lock in peek, as peek is used just before insert/update
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index b03dbde31ab..afd5d04fa87 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -1588,7 +1588,9 @@ int ha_ndbcluster::peek_indexed_rows(const byte *record)
int res;
DBUG_ENTER("peek_indexed_rows");
- NdbOperation::LockMode lm= NdbOperation::LM_Read;
+ NdbOperation::LockMode lm=
+ (NdbOperation::LockMode)get_ndb_lock_type(m_lock.type);
+
first= NULL;
if (table->s->primary_key != MAX_KEY)
{