diff options
author | unknown <pekka@sama.ndb.mysql.com> | 2007-08-29 21:45:53 +0300 |
---|---|---|
committer | unknown <pekka@sama.ndb.mysql.com> | 2007-08-29 21:45:53 +0300 |
commit | cc0750aceeb29fae7fd6544a5e46ed5b9c61d1d2 (patch) | |
tree | e3f750da001e4c89b1be008ed38958308691c646 /ndb | |
parent | b76fd3ed3bdcdfa58ab1c1f9afbf844bd296e4da (diff) | |
download | mariadb-git-cc0750aceeb29fae7fd6544a5e46ed5b9c61d1d2.tar.gz |
ndb - bug#29102 : use locked read even for blob parts
ndb/src/ndbapi/NdbBlob.cpp:
race condition : s/committedRead/readTuple/ when reading parts since TUP commits tuples separately
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/ndbapi/NdbBlob.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp index 7ab9c2132d8..611d0396f96 100644 --- a/ndb/src/ndbapi/NdbBlob.cpp +++ b/ndb/src/ndbapi/NdbBlob.cpp @@ -892,7 +892,12 @@ NdbBlob::readParts(char* buf, Uint32 part, Uint32 count) while (n < count) { NdbOperation* tOp = theNdbCon->getNdbOperation(theBlobTable); if (tOp == NULL || - tOp->committedRead() == -1 || + /* + * This was committedRead() before. However lock on main + * table tuple does not fully protect blob parts since DBTUP + * commits each tuple separately. + */ + tOp->readTuple() == -1 || setPartKeyValue(tOp, part + n) == -1 || tOp->getValue((Uint32)3, buf) == NULL) { setErrorCode(tOp); |