• Sergey Vojtovich's avatar
    BUG#49902 - SELECT returns incorrect results · 0897669c
    Sergey Vojtovich authored
    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().
    0897669c
group_min_max.test 50.1 KB