Fix buildbot failure

This commit is contained in:
Sergey Petrunya 2010-11-26 00:30:39 +03:00
parent 92442fc598
commit 40822c8149
2 changed files with 14 additions and 3 deletions

View file

@ -834,10 +834,15 @@ int DsMrr_impl::dsmrr_init(handler *h_arg, RANGE_SEQ_IF *seq_funcs,
goto error; goto error;
} }
} }
strategy_exhausted= FALSE;
res= strategy->refill_buffer(TRUE); res= strategy->refill_buffer(TRUE);
if (res && res != HA_ERR_END_OF_FILE) //psergey-todo: remove EOF check here if (res)
goto error; {
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 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 DsMrr_impl::dsmrr_next(char **range_info)
{ {
int res; int res;
if (strategy_exhausted)
return HA_ERR_END_OF_FILE;
while ((res= strategy->get_next(range_info)) == HA_ERR_END_OF_FILE) while ((res= strategy->get_next(range_info)) == HA_ERR_END_OF_FILE)
{ {
if ((res= strategy->refill_buffer(FALSE))) if ((res= strategy->refill_buffer(FALSE)))

View file

@ -544,7 +544,10 @@ private:
bool is_mrr_assoc; bool is_mrr_assoc;
Mrr_reader_factory reader_factory; Mrr_reader_factory reader_factory;
Mrr_reader *strategy; Mrr_reader *strategy;
bool strategy_exhausted;
Mrr_index_reader *index_strategy; Mrr_index_reader *index_strategy;
/* The whole buffer space that we're using */ /* The whole buffer space that we're using */