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.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
{code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a VARCHAR(10)); EXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE a=_latin1 0xDF; {code} returns: {noformat} +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | EXPLAIN | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | { "query_block": { "select_id": 1, "table": { "table_name": "t1", "access_type": "ALL", "rows": 1, "filtered": 100, "attached_condition": "(t1.a = _latin1'�')" } } } | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {noformat} Notice some garbage in the output. EXPLAIN EXTENDED in for the same thing: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a VARCHAR(10)); EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=_latin1 0xDF; SHOW WARNINGS; {code} produces a result without garbage: {noformat} +-------+------+----------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+----------------------------------------------------------------------------------------+ | Note | 1003 | select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = _latin1'\xDF') | +-------+------+----------------------------------------------------------------------------------------+ {noformat} Perhaps FORMAT=JSON should use the same style for output. |
{code} 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; {code} returns: {noformat} +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | EXPLAIN | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | { "query_block": { "select_id": 1, "table": { "table_name": "t1", "access_type": "ALL", "rows": 1, "filtered": 100, "attached_condition": "(t1.a = _latin1'�')" } } } | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ {noformat} Notice some garbage in the output. EXPLAIN EXTENDED in for the same thing: {code} DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a VARCHAR(10)); EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=_latin1 0xDF; SHOW WARNINGS; {code} produces a result without garbage: {noformat} +-------+------+----------------------------------------------------------------------------------------+ | Level | Code | Message | +-------+------+----------------------------------------------------------------------------------------+ | Note | 1003 | select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = _latin1'\xDF') | +-------+------+----------------------------------------------------------------------------------------+ {noformat} Perhaps FORMAT=JSON should use the same style for output. |
Fix Version/s | 10.1.8 [ 19605 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Component/s | Character Sets [ 10801 ] | |
Component/s | OTHER [ 10125 ] |
Workflow | MariaDB v3 [ 71515 ] | MariaDB v4 [ 149604 ] |