• Nayuta Yanagisawa's avatar
    MDEV-27172 Prefix indices on Spider tables may lead to wrong query results · e4cffc92
    Nayuta Yanagisawa authored
    Spider converts HA_READ_KEY_EXACT to the equality (=) in the
    function spider_db_append_key_where_internal() but the conversion
    is not necessarily correct for tables with prefix indices.
    
    We fix the bug by converting HA_READ_KEY_EXACT to 'LIKE "foo%"' when
    a target key is a prefix key. The fix is partly inspired by FEDERATED.
    See ha_federated::create_where_from_key() for more details.
    e4cffc92
spd_db_mysql.h 36.5 KB