--echo # --echo # Start of 10.4 tests --echo # --echo # --echo # MDEV-16426 Optimizer erroneously treats equal constants of different formats as same --echo # # It's important for CHARSET('a') and CHARSET(0x61) to have different lengths in this test. # 'latin1' and 'binary' have same lengths, so using 'utf8'. SET NAMES utf8; CREATE TABLE t1 (a DECIMAL(10,3)); INSERT INTO t1 VALUES (10.0),(10.1); SELECT CHARSET('a'),CHARSET(0x61),LENGTH(CHARSET('a'))+a,LENGTH(CHARSET(0x61))+a FROM t1; SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a; EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a; DROP TABLE t1; --echo # --echo # End of 10.4 tests --echo #