• unknown's avatar
    Added test for Bug #11521 · 3fc69476
    unknown authored
    "Negative integer keys incorrectly substituted for 0 during range analysis."
    
    The problem is that the range optimizer incorrectly replaces any negative
    constant with '0' for all types except BIGINT because the method save_in_field()
    casts negative integers to non-negative. This causes incorrect query
    results where (0 = any_negative_number).
    
    The problem caused by this bug is fixed by the patch for BUG#11185.
    That patch constitutes an optimization due to which the problem code is
    never called with negative constants. This patch adds a test so we are sure
    that the problem does not reappear.
    
    
    mysql-test/r/select.result:
      Test for BUG#11521.
    mysql-test/t/select.test:
      Test for BUG#11521.
    3fc69476
select.result 64.7 KB