Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL)
Description
Here is a test case:
CREATE TABLE t1(i INT PRIMARY KEY, b CHAR(10), INDEX i_b(b));
INSERT INTO t1 VALUES (1, 'ab\n');
INSERT INTO t1 VALUES (2, 'ab\n');
set optimizer_trace=1;
EXPLAIN SELECT * FROM t1 WHERE b IN ('ab\n');
select * from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
"analyzing_range_alternatives": {
|
"range_scan_alternatives": [
|
{
|
"index": "i_b",
|
"ranges": ["ab
|
<= b <= ab
|
"],
|
"rowid_ordered": true,
|
"using_mrr": false,
|
"index_only": false,
|
"rows": 2,
|
"cost": 3.632,
|
"chosen": true
|
}
|
],
|
It would be good to see the range as 'ab\n' <= b <= 'ab\n'
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
|
JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives'))
|
NULL
|
Warnings:
|
Warning 4036 Character disallowed in JSON in argument 1 to function 'json_extract' at position 2582
|