Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL)
-
10.1.8-2, 10.1.8-3
Description
In this script:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a DECIMAL(10,1),b DECIMAL(10,1),c VARCHAR(10),d VARCHAR(10));
|
INSERT INTO t1 VALUES (1.5,1.5,'1','1'),(3.5,3.5,'3','3');
|
explain EXTENDED SELECT * FROM t1 WHERE
|
COALESCE(c,0)='3 ' AND
|
COALESCE(d,0)=COALESCE(c,0);
|
SHOW WARNINGS;
|
the condition gets rewritten by optimizer by replacing COALESCE(c,0) to '3'.
It seems something goes wrong with the created replacement Item corresponding to '3', so the warnings generated by the EXPLAIN query return dirty characters:
+-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Note | 1003 | select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where ((coalesce(`test`.`t1`.`c`,0) = '3 ') and (coalesce(`test`.`t1`.`d`,0) = '¥¥')) |
|
+-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
Notice the unexpected YEN signs in the above output.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
In this script: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DECIMAL(10,1),b DECIMAL(10,1),c VARCHAR(10),d VARCHAR(10)); INSERT INTO t1 VALUES (1.5,1.5,'1','1'),(3.5,3.5,'3','3'); explain EXTENDED SELECT * FROM t1 WHERE COALESCE(c,0)='3 ' AND COALESCE(d,0)=COALESCE(c,0); SHOW WARNINGS; {code} the condition gets rewritten by optimizer by replacing COALESCE(c,0) to '3'. It seems something goes wrong with the created replacement Item corresponding to '3', so the warnings generated by the EXPLAIN query return dirty characters: {format} +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Note | 1003 | select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where ((coalesce(`test`.`t1`.`c`,0) = '3 ') and (coalesce(`test`.`t1`.`d`,0) = '¥¥')) | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {format} |
In this script: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DECIMAL(10,1),b DECIMAL(10,1),c VARCHAR(10),d VARCHAR(10)); INSERT INTO t1 VALUES (1.5,1.5,'1','1'),(3.5,3.5,'3','3'); explain EXTENDED SELECT * FROM t1 WHERE COALESCE(c,0)='3 ' AND COALESCE(d,0)=COALESCE(c,0); SHOW WARNINGS; {code} the condition gets rewritten by optimizer by replacing COALESCE(c,0) to '3'. It seems something goes wrong with the created replacement Item corresponding to '3', so the warnings generated by the EXPLAIN query return dirty characters: {format} +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Note | 1003 | select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where ((coalesce(`test`.`t1`.`c`,0) = '3 ') and (coalesce(`test`.`t1`.`d`,0) = '¥¥')) | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {format} |
Description |
In this script: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DECIMAL(10,1),b DECIMAL(10,1),c VARCHAR(10),d VARCHAR(10)); INSERT INTO t1 VALUES (1.5,1.5,'1','1'),(3.5,3.5,'3','3'); explain EXTENDED SELECT * FROM t1 WHERE COALESCE(c,0)='3 ' AND COALESCE(d,0)=COALESCE(c,0); SHOW WARNINGS; {code} the condition gets rewritten by optimizer by replacing COALESCE(c,0) to '3'. It seems something goes wrong with the created replacement Item corresponding to '3', so the warnings generated by the EXPLAIN query return dirty characters: {format} +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Note | 1003 | select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where ((coalesce(`test`.`t1`.`c`,0) = '3 ') and (coalesce(`test`.`t1`.`d`,0) = '¥¥')) | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {format} |
In this script: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DECIMAL(10,1),b DECIMAL(10,1),c VARCHAR(10),d VARCHAR(10)); INSERT INTO t1 VALUES (1.5,1.5,'1','1'),(3.5,3.5,'3','3'); explain EXTENDED SELECT * FROM t1 WHERE COALESCE(c,0)='3 ' AND COALESCE(d,0)=COALESCE(c,0); SHOW WARNINGS; {code} the condition gets rewritten by optimizer by replacing COALESCE(c,0) to '3'. It seems something goes wrong with the created replacement Item corresponding to '3', so the warnings generated by the EXPLAIN query return dirty characters: {noformat} +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Note | 1003 | select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where ((coalesce(`test`.`t1`.`c`,0) = '3 ') and (coalesce(`test`.`t1`.`d`,0) = '¥¥')) | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {noformat} |
Description |
In this script: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DECIMAL(10,1),b DECIMAL(10,1),c VARCHAR(10),d VARCHAR(10)); INSERT INTO t1 VALUES (1.5,1.5,'1','1'),(3.5,3.5,'3','3'); explain EXTENDED SELECT * FROM t1 WHERE COALESCE(c,0)='3 ' AND COALESCE(d,0)=COALESCE(c,0); SHOW WARNINGS; {code} the condition gets rewritten by optimizer by replacing COALESCE(c,0) to '3'. It seems something goes wrong with the created replacement Item corresponding to '3', so the warnings generated by the EXPLAIN query return dirty characters: {noformat} +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Note | 1003 | select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where ((coalesce(`test`.`t1`.`c`,0) = '3 ') and (coalesce(`test`.`t1`.`d`,0) = '¥¥')) | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {noformat} |
In this script: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a DECIMAL(10,1),b DECIMAL(10,1),c VARCHAR(10),d VARCHAR(10)); INSERT INTO t1 VALUES (1.5,1.5,'1','1'),(3.5,3.5,'3','3'); explain EXTENDED SELECT * FROM t1 WHERE COALESCE(c,0)='3 ' AND COALESCE(d,0)=COALESCE(c,0); SHOW WARNINGS; {code} the condition gets rewritten by optimizer by replacing COALESCE(c,0) to '3'. It seems something goes wrong with the created replacement Item corresponding to '3', so the warnings generated by the EXPLAIN query return dirty characters: {noformat} +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Note | 1003 | select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` where ((coalesce(`test`.`t1`.`c`,0) = '3 ') and (coalesce(`test`.`t1`.`d`,0) = '¥¥')) | +-------+------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {noformat} Notice the unexpected YEN signs in the above output. |
Rank | Ranked higher |
Rank | Ranked higher |
Sprint | 10.1.8-2 [ 14 ] |
Rank | Ranked higher |
Fix Version/s | 10.1.8 [ 19605 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Sprint | 10.1.8-2 [ 14 ] | 10.1.8-2, 10.1.8-3 [ 14, 15 ] |
Labels | upstream-not-affected |
Workflow | MariaDB v3 [ 69808 ] | MariaDB v4 [ 149229 ] |
MySQL-5.7.8-rc-debug is not affected