Commit 83281cf2 authored by Sergey Petrunya's avatar Sergey Petrunya

Fix buildbot failure

parent 1cf1926f
......@@ -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
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)))
......
......@@ -544,7 +544,10 @@ class DsMrr_impl : public Buffer_manager
bool is_mrr_assoc;
Mrr_reader_factory reader_factory;
Mrr_reader *strategy;
bool strategy_exhausted;
Mrr_index_reader *index_strategy;
/* The whole buffer space that we're using */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment