diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-10-29 13:42:48 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-10-29 13:42:48 +0400 |
commit | 1e82320d27ab0c5de7cffcef49ead619b7893038 (patch) | |
tree | 4fb69b9fe74d9d07d4cb6e069001cf3430b6f1ab | |
parent | a88bd5cf56f44f7e1a2714b471f13f123735f864 (diff) | |
download | mariadb-git-1e82320d27ab0c5de7cffcef49ead619b7893038.tar.gz |
DS-MRR improvements
- buildbot test failure fixes: don't try to get more records from SimpleIndexReader
if we've already got EOF for it.
-rw-r--r-- | sql/multi_range_read.cc | 4 | ||||
-rw-r--r-- | sql/multi_range_read.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index 9e8ffef529a..c1b166cb4e7 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -303,6 +303,7 @@ int Mrr_simple_index_reader::init(handler *h_arg, RANGE_SEQ_IF *seq_funcs, { HANDLER_BUFFER no_buffer = {NULL, NULL, NULL}; h= h_arg; + res= 0; return h->handler::multi_range_read_init(seq_funcs, seq_init_param, n_ranges, mode, &no_buffer); } @@ -559,6 +560,9 @@ int Mrr_ordered_rndpos_reader::refill_buffer() last_identical_rowid= NULL; + if (index_reader->eof()) + DBUG_RETURN(0); + while (rowid_buffer->can_write()) { res= index_reader->get_next(&range_info); diff --git a/sql/multi_range_read.h b/sql/multi_range_read.h index 1f53b212c93..a7748a32b6b 100644 --- a/sql/multi_range_read.h +++ b/sql/multi_range_read.h @@ -126,8 +126,8 @@ public: index tuple or a table record. Getting HA_ERR_END_OF_FILE from get_next() means that the source should be - re-filled. if eof() returns true after refill attempt, then end of stream has - been reached and get_next() must not be called anymore. + re-filled. if eof() returns true after refill attempt, then the end of + stream has been reached and get_next() must not be called anymore. */ class Mrr_reader |