• unknown's avatar
    Fixed bug #26159. · 3e4f834d
    unknown authored
    A wrong order of statements in QUICK_GROUP_MIN_MAX_SELECT::reset
    caused a crash when a query with DISTINCT was executed by a loose scan
    for an InnoDB table that had been emptied. 
    
    
    mysql-test/r/innodb_mysql.result:
      Added a test case for bug #26159.
    mysql-test/t/innodb_mysql.test:
      Added a test case for bug #26159.
    sql/opt_range.cc:
      Fixed bug #26159.
      A wrong order of statements in QUICK_GROUP_MIN_MAX_SELECT::reset
      caused a crash when a query with DISTINCT was executed by a loose scan
      for an InnoDB table that had been emptied. 
      For an empty table quick_prefix_select->reset() was not called at all
      and thus some important initialization steps were missing.
    3e4f834d
innodb_mysql.result 15.5 KB