diff options
author | Sergey Vojtovich <svoj@sun.com> | 2010-02-09 12:53:13 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@sun.com> | 2010-02-09 12:53:13 +0400 |
commit | 0897669cba1b314c36f41a8a31ee73b6d0d11115 (patch) | |
tree | 4399c5a586ac17afc75f2a3776d0bf12b75315fe /sql/table.cc | |
parent | c12c9780cdbe965bcdce0326b14a171d2f2b8635 (diff) | |
download | mariadb-git-0897669cba1b314c36f41a8a31ee73b6d0d11115.tar.gz |
BUG#49902 - SELECT returns incorrect results
Queries optimized with GROUP_MIN_MAX didn't cleanup KEYREAD
optimization properly. As a result subsequent queries may
return incomplete rows (fields are initialized to default
values).
mysql-test/r/group_min_max.result:
A test case for BUG#49902.
mysql-test/t/group_min_max.test:
A test case for BUG#49902.
sql/opt_range.cc:
Refactor of KEYREAD optimization switch so that KEYREAD
handler state is in sync with st_table::key_read flag.
All SQL code is supposed to switch KEYREAD optimization
via st_table::set_keyread().
sql/opt_sum.cc:
Refactor of KEYREAD optimization switch so that KEYREAD
handler state is in sync with st_table::key_read flag.
All SQL code is supposed to switch KEYREAD optimization
via st_table::set_keyread().
sql/sql_select.cc:
Refactor of KEYREAD optimization switch so that KEYREAD
handler state is in sync with st_table::key_read flag.
All SQL code is supposed to switch KEYREAD optimization
via st_table::set_keyread().
sql/sql_update.cc:
Refactor of KEYREAD optimization switch so that KEYREAD
handler state is in sync with st_table::key_read flag.
All SQL code is supposed to switch KEYREAD optimization
via st_table::set_keyread().
sql/table.cc:
Refactor of KEYREAD optimization switch so that KEYREAD
handler state is in sync with st_table::key_read flag.
All SQL code is supposed to switch KEYREAD optimization
via st_table::set_keyread().
sql/table.h:
Refactor of KEYREAD optimization switch so that KEYREAD
handler state is in sync with st_table::key_read flag.
All SQL code is supposed to switch KEYREAD optimization
via st_table::set_keyread().
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc index c06ecf99926..9561e5fcc4b 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -4374,7 +4374,7 @@ void st_table::mark_columns_used_by_index(uint index) MY_BITMAP *bitmap= &tmp_set; DBUG_ENTER("st_table::mark_columns_used_by_index"); - (void) file->extra(HA_EXTRA_KEYREAD); + set_keyread(TRUE); bitmap_clear_all(bitmap); mark_columns_used_by_index_no_reset(index, bitmap); column_bitmaps_set(bitmap, bitmap); @@ -4397,8 +4397,7 @@ void st_table::restore_column_maps_after_mark_index() { DBUG_ENTER("st_table::restore_column_maps_after_mark_index"); - key_read= 0; - (void) file->extra(HA_EXTRA_NO_KEYREAD); + set_keyread(FALSE); default_column_bitmaps(); file->column_bitmaps_signal(); DBUG_VOID_RETURN; |