blob: a39750e2635cf2ee1ac66cae5162a44c62a00c48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--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 #
|