4425 jonas oreland 2011-05-27
ndb - fix bug with batch size increase/decrease
modified:
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
4424 Jan Wedvik 2011-05-26
This commit concerns pushed queries (those using NdbQuery etc.).
This is a fix for an error that would occur when pushing an index scan that is sorted on a string field.
The problem was an assumption that compare_ndbrecord() would always return 0,-1 or 1, when it can in fact return any
number. This could cause results to be sorted in the wrong order, or mysqld to loop for ever.
modified:
storage/ndb/src/ndbapi/NdbQueryOperation.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2011-05-25 14:31:47 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2011-05-27 06:15:17 +0000
@@ -10131,7 +10131,11 @@ Dblqh::seize_acc_ptr_list(ScanRecord* sc
Uint32 segments= (new_batch_size + (SectionSegment::DataLength -2 )) /
SectionSegment::DataLength;
- ndbassert(segments >= scanP->scan_acc_segments);
+ if (segments <= scanP->scan_acc_segments)
+ {
+ // No need to allocate more segments.
+ return true;
+ }
if (new_batch_size > 1)
{
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (jonas:4424 to 4425) | jonas oreland | 27 May |