summaryrefslogtreecommitdiff
path: root/sql/multi_range_read.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2010-11-26 00:30:39 +0300
committerSergey Petrunya <psergey@askmonty.org>2010-11-26 00:30:39 +0300
commit40822c81493722900087d3dca93fa959ec27a686 (patch)
treeb27817440871839283af433d512847323db1b123 /sql/multi_range_read.cc
parent92442fc59866445df21b38f21fe140c00b752094 (diff)
downloadmariadb-git-40822c81493722900087d3dca93fa959ec27a686.tar.gz
Fix buildbot failure
Diffstat (limited to 'sql/multi_range_read.cc')
-rw-r--r--sql/multi_range_read.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc
index c04a215f433..ea6a0ab58c1 100644
--- a/sql/multi_range_read.cc
+++ b/sql/multi_range_read.cc
@@ -834,10 +834,15 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
goto error;
}
}
-
+ strategy_exhausted= FALSE;
+
res= strategy->refill_buffer(TRUE);
- if (res && res != HA_ERR_END_OF_FILE) //psergey-todo: remove EOF check here
- goto error;
+ if (res)
+ {
+ if (res != HA_ERR_END_OF_FILE)
+ goto error;
+ strategy_exhausted= TRUE;
+ }
/*
If we have scanned through all intervals in *seq, then adjust *buf to
@@ -1232,6 +1237,9 @@ void Key_value_records_iterator::move_to_next_key_value()
int DsMrr_impl::dsmrr_next(char **range_info)
{
int res;
+ if (strategy_exhausted)
+ return HA_ERR_END_OF_FILE;
+
while ((res= strategy->get_next(range_info)) == HA_ERR_END_OF_FILE)
{
if ((res= strategy->refill_buffer(FALSE)))