Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL)
-
None
Description
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a VARCHAR(10));
|
INSERT INTO t1 VALUES ('a'),('b');
|
EXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE a=_latin1 0xDF;
|
returns:
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| EXPLAIN |
|
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| {
|
"query_block": {
|
"select_id": 1,
|
"table": {
|
"table_name": "t1",
|
"access_type": "ALL",
|
"rows": 1,
|
"filtered": 100,
|
"attached_condition": "(t1.a = _latin1'�')"
|
}
|
}
|
} |
|
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
Notice some garbage in the output.
EXPLAIN EXTENDED in for the same thing:
DROP TABLE IF EXISTS t1;
|
CREATE TABLE t1 (a VARCHAR(10));
|
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=_latin1 0xDF;
|
SHOW WARNINGS;
|
produces a result without garbage:
+-------+------+----------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+-------+------+----------------------------------------------------------------------------------------+
|
| Note | 1003 | select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = _latin1'\xDF') |
|
+-------+------+----------------------------------------------------------------------------------------+
|
Perhaps FORMAT=JSON should use the same style for output.