diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-10-04 00:37:30 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-10-04 00:37:30 +0400 |
commit | d4f2e7a9a931912999f9d126fb1476f40a861635 (patch) | |
tree | d832782cf90afd009e7eadb856b5335f2fd81bea | |
parent | 51564575068494463d6591356c28d771858e280f (diff) | |
download | mariadb-git-d4f2e7a9a931912999f9d126fb1476f40a861635.tar.gz |
Fix failures introduced in the previous push
-rw-r--r-- | mysql-test/t/subselect_sj2.test | 2 | ||||
-rw-r--r-- | sql/multi_range_read.cc | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mysql-test/t/subselect_sj2.test b/mysql-test/t/subselect_sj2.test index 5c40da0f56f..67452b5a69e 100644 --- a/mysql-test/t/subselect_sj2.test +++ b/mysql-test/t/subselect_sj2.test @@ -586,7 +586,7 @@ if (`select @@join_cache_level=6`) --echo # Not anymore: --echo # The following query gives wrong result due to Bug#49129 } -select sin(0); + select * from t0 where t0.a in (select t1.a from t1, t2 where t2.a=t0.a and t1.b=t2.b); diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index 0cf31c222c6..b5ec4b075df 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -852,13 +852,13 @@ bool Key_value_records_iterator::init(DsMrr_impl *dsmrr_arg) uchar *key_in_buf= dsmrr->cur_index_tuple; + last_identical_key_ptr= dsmrr->cur_index_tuple; if (dsmrr->use_key_pointers) dsmrr->cur_index_tuple= *((uchar**)dsmrr->cur_index_tuple); /* Check out how many more identical keys are following */ //char *save_cur_range_info= cur_range_info; uchar *save_cur_index_tuple= dsmrr->cur_index_tuple; - last_identical_key_ptr= dsmrr->cur_index_tuple; while (!identical_key_it.read()) { 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() return res; } identical_key_it.init(dsmrr->key_buffer); + get_next_row= FALSE; } identical_key_it.read(); // This gets us next range_id. @@ -1052,7 +1053,7 @@ int DsMrr_impl::dsmrr_next(char **range_info) { if (do_sort_keys) { - if (index_scan_eof) + if (!index_scan_eof) { /* There are some sorted keys left. Use them to get rowids */ if ((res= dsmrr_fill_rowid_buffer())) |