#At file:///home/oleja/mysql/mysql-5.1-telco-7.0-spj-scan-scan/ based on revid:jonas@perch-20101029200644-m3ynfl6dfb60bb8u
3330 Ole John Aske 2010-10-29
spj-svs: Fixed mutex / mt concurrency problem when receiving fragment data.
Ensure that the class NdbQueryImpl member fields m_pendingFrags & m_finalBatchFrags
are only accessed when the PollGuard mutex is locked.
modified:
storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp
=== modified file 'storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp'
--- a/storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp 2010-10-12 13:00:44 +0000
+++ b/storage/ndb/src/ndbapi/NdbQueryOperationImpl.hpp 2010-10-29 21:06:35 +0000
@@ -364,8 +364,10 @@ private:
*/
Uint32 m_globalCursor;
- /** Number of root fragments not yet completed within the current batch.*/
- Uint32 m_pendingFrags;
+ /** Number of root fragments not yet completed within the current batch.
+ * Only access w/ PollGuard mutex as it is also updated by receiver threa
+ */
+ Uint32 m_pendingFrags; // BEWARE: protect with PollGuard mutex
/** Number of fragments to be read by the root operation. (1 if root
* operation is a lookup)*/
@@ -394,7 +396,7 @@ private:
* m_finalBatchFrags==m_rootFragCount, all tuples for the final batches may
* still not have been received (i.e. m_pendingFrags>0).
*/
- Uint32 m_finalBatchFrags;
+ Uint32 m_finalBatchFrags; // BEWARE: protect with PollGuard mutex
/** Number of IndexBounds set by API (index scans only) */
Uint32 m_num_bounds;
Attachment: [text/bzr-bundle] bzr/ole.john.aske@oracle.com-20101029210635-63pmwllzvz739acs.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(ole.john.aske:3330) | Ole John Aske | 29 Oct |