• Martin Hansson's avatar
    Bug#48459: valgrind errors with query using 'Range checked · 14f2eb12
    Martin Hansson authored
    for each record'
    
    There was an error in an internal structure in the range
    optimizer (SEL_ARG). Bad design causes parts of a data
    structure not to be initialized when it is in a certain
    state. All client code must check that this state is not
    present before trying to access the structure's data. Fixed
    by
    
    - Checking the state before trying to access data (in
    several places, most of which not covered by test case.)
    
    - Copying the keypart id when cloning SEL_ARGs
    
    
    mysql-test/r/range.result:
      Bug#48459: Test result.
    mysql-test/t/range.test:
      Bug#48459: Test case.
    sql/opt_range.cc:
      Bug#48459: Fix + doxygenated count_key_part_usage comment.
    14f2eb12
range.result 57 KB