Commit d4f2e7a9 authored by Sergey Petrunya's avatar Sergey Petrunya

Fix failures introduced in the previous push

parent 51564575
...@@ -586,7 +586,7 @@ if (`select @@join_cache_level=6`) ...@@ -586,7 +586,7 @@ if (`select @@join_cache_level=6`)
--echo # Not anymore: --echo # Not anymore:
--echo # The following query gives wrong result due to Bug#49129 --echo # The following query gives wrong result due to Bug#49129
} }
select sin(0);
select * from t0 where t0.a in select * from t0 where t0.a in
(select t1.a from t1, t2 where t2.a=t0.a and t1.b=t2.b); (select t1.a from t1, t2 where t2.a=t0.a and t1.b=t2.b);
......
...@@ -852,13 +852,13 @@ bool Key_value_records_iterator::init(DsMrr_impl *dsmrr_arg) ...@@ -852,13 +852,13 @@ bool Key_value_records_iterator::init(DsMrr_impl *dsmrr_arg)
uchar *key_in_buf= dsmrr->cur_index_tuple; uchar *key_in_buf= dsmrr->cur_index_tuple;
last_identical_key_ptr= dsmrr->cur_index_tuple;
if (dsmrr->use_key_pointers) if (dsmrr->use_key_pointers)
dsmrr->cur_index_tuple= *((uchar**)dsmrr->cur_index_tuple); dsmrr->cur_index_tuple= *((uchar**)dsmrr->cur_index_tuple);
/* Check out how many more identical keys are following */ /* Check out how many more identical keys are following */
//char *save_cur_range_info= cur_range_info; //char *save_cur_range_info= cur_range_info;
uchar *save_cur_index_tuple= dsmrr->cur_index_tuple; uchar *save_cur_index_tuple= dsmrr->cur_index_tuple;
last_identical_key_ptr= dsmrr->cur_index_tuple;
while (!identical_key_it.read()) while (!identical_key_it.read())
{ {
if (DsMrr_impl::key_tuple_cmp(dsmrr, key_in_buf, dsmrr->cur_index_tuple)) if (DsMrr_impl::key_tuple_cmp(dsmrr, key_in_buf, dsmrr->cur_index_tuple))
...@@ -901,6 +901,7 @@ int Key_value_records_iterator::get_next() ...@@ -901,6 +901,7 @@ int Key_value_records_iterator::get_next()
return res; return res;
} }
identical_key_it.init(dsmrr->key_buffer); identical_key_it.init(dsmrr->key_buffer);
get_next_row= FALSE;
} }
identical_key_it.read(); // This gets us next range_id. identical_key_it.read(); // This gets us next range_id.
...@@ -1052,7 +1053,7 @@ int DsMrr_impl::dsmrr_next(char **range_info) ...@@ -1052,7 +1053,7 @@ int DsMrr_impl::dsmrr_next(char **range_info)
{ {
if (do_sort_keys) if (do_sort_keys)
{ {
if (index_scan_eof) if (!index_scan_eof)
{ {
/* There are some sorted keys left. Use them to get rowids */ /* There are some sorted keys left. Use them to get rowids */
if ((res= dsmrr_fill_rowid_buffer())) if ((res= dsmrr_fill_rowid_buffer()))
......
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