From: Ole John Aske Date: October 29 2010 9:06pm Subject: bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (ole.john.aske:3330) List-Archive: http://lists.mysql.com/commits/122351 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0063591220==" --===============0063591220== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #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; --===============0063591220== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/ole.john.aske@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: ole.john.aske@stripped\ # 63pmwllzvz739acs # target_branch: file:///home/oleja/mysql/mysql-5.1-telco-7.0-spj-\ # scan-scan/ # testament_sha1: 56af44a1b59bf4417b26605d3456855d9fff47da # timestamp: 2010-10-29 23:06:54 +0200 # source_branch: bzr+ssh://oaske@stripped/bzrroot/server\ # /mysql-5.1-telco-7.0-spj/ # base_revision_id: jonas@perch-20101029200644-m3ynfl6dfb60bb8u # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWY+dMnQAAa5fgAAQUXP//3Ox 8oC////wUASWZ6nXI5Qps1bYJJET0AKbU8RkaBTyZU/VM00TTI2RGDU0oeJqPRkaTQAAAAAAANCZ BNCaekQ000DIAaA0MgNBzAJpgEyGAAJgmAAACSQITNJpqn4gEjaEzKNGQ0aaBiKDanwF08BqXugW 9EZCVyoEkDCmKB4gk8Ghk4KBVpThYMKGH36aGZlr1F9LIyw5ko9zGvnHcHE66l3qHs4bQ++7U9AZ /abIa2ecIjk0IfxZAhkayw3V4QdHDYYe604Z5fWfQM2Wv2s1yVdxzC1EjY+LvUmKskwttPMXutut 3ESl9o8bsIsHc4caYNKBklWyTr7z/8EYx2Q3Rqhgs7O98YBBCON2+BpCIoLA63GoMYqpTi+ntmps nW9FCR7mQVi1GOdrnxEehuRdF6XtWOXGWUwJK7pud96nhPfMqyWJUwioeKA6mMzHHKUzFBneEx93 TArOBYcdMLhSnrZOfnvWwfEoFtV0R5nJVDC6lTmqCJGVc0ijRMPNMkEEPakxkOXPFUMUJCFH3GpE IfMaFywD2EbhPV8pNoZsSiy5X2vWh1kp1PzVZ9jOMvUVZr3OptgTVhFuqEMGJoUvcJCWISgGD3qK 2J8io4REgwghAXEuW1BUIoCxiLDaOXUJ0sKFqRmbOmW8oQ3OI6GiSpBqWzHzLt+Bmw6WOf380ksy 4eZXZEGHGoy/xHcSly7hqQ46IlzdjQYPcfgcWl5bVk5HCBhbEzSdwNkQ1E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