• unknown's avatar
    Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar · 762f4ac1
    unknown authored
               statements
    Currently the optimizer evaluates loose index scan only for top-level SELECT
    statements
    Extend loose index scan applicability by :
     - Test the applicability of loose scan for each sub-select, instead of the
       whole query. This change enables loose index scan for sub-queries.
     - allow non-select statements with SELECT parts (like, e.g. 
       CREATE TABLE .. SELECT ...) to use loose index scan.
    
    
    mysql-test/r/group_min_max.result:
      Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
                 statements
       - test case
    mysql-test/t/group_min_max.test:
      Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
                 statements
       - test case
    sql/opt_range.cc:
      Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar
                 statements
       - loose index scan will be tried over the current subselect 
         (lex->current_select) instead of the whole query (lex->select_lex).
       - allow non-select statements with SELECT parts (like, e.g. 
         CREATE TABLE .. SELECT ...) to use loose index scan.
    762f4ac1
group_min_max.test 45.3 KB