• Alexander Barkov's avatar
    MDEV-6950 Bad results with joins comparing DATE/DATETIME and... · e52b1637
    Alexander Barkov authored
    MDEV-6950 Bad results with joins comparing DATE/DATETIME and INT/DECIMAL/DOUBLE/ENUM/VARCHAR columns
    MDEV-6971 Bad results with joins comparing TIME and DOUBLE/DECIMAL columns
    Disallow using indexes on non-temporal columns to optimize
    ref access, range access and table elimination when the counterpart's
    cmp_type is TIME_RESULT, e.g.:
      SELECT * FROM t1 WHERE indexed_int_column=time_expression;
    Only index on a temporal column can be used to optimize temporal comparison
    operations.
    
    e52b1637
opt_table_elimination.cc 57.1 KB