• unknown's avatar
    Proposed fix for bug #5003 (subselect with MIN() and LIKE crashes server) · ac4c0538
    unknown authored
    We have next problem here:
    active_index is wrong in the subselect's handler on the second val_int() call.
    Optimizer sees that we can use index-read for that kind of condition,
    and matching_cond() (sql/opt_sum.cc) doesn't. I suspect, proper solution is
    to add appropriate code to the matching_cond() but now just added
    missed initialization.
    
    
    mysql-test/r/subselect.result:
      Appropriate test result
    mysql-test/t/subselect.test:
      Test case added
    sql/records.cc:
      index's initialization added
    ac4c0538
records.cc 12.3 KB