• ramil/ram@mysql.com/myoffice.izhnet.ru's avatar
    Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes · 0027b6e4
    We miss some records sometimes using RANGE method if we have
    partial key segments.
    Example:
      Create table t1(a char(2), key(a(1)));
      insert into t1 values ('a'), ('xx');
      select a from t1 where a > 'x';
    We call index_read() passing 'x' key and HA_READ_AFTER_KEY flag
    in the handler::read_range_first() wich is wrong because we have
    a partial key segment for the field and might miss records like 'xx'.
    
    Fix: don't use open segments in such a case.
    0027b6e4
range.test 21.4 KB