• unknown's avatar
    Fix bug#13293 Wrongly used index results in endless loop. · 591fabb3
    unknown authored
    Loose index scan using only second part of multipart index was choosen, which
    results in creating wrong keys and endless loop.
    
    get_best_group_min_max() now allows loose index scan for distinct only if used
    keyparts forms a prefix of the index.
    
    
    mysql-test/t/group_min_max.test:
      Test case for bug #13293 Wrongly used index results in endless loop.
    mysql-test/r/group_min_max.result:
      Test case for bug #13293 Wrongly used index results in endless loop.
    sql/opt_range.cc:
      Fix bug #13293 Wrongly used index results in endless loop.
      get_best_group_min_max() now allows loose index scan for distinct only if used keyparts forms a prefix of the index.
    591fabb3
opt_range.cc 273 KB