mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
73df7a3009
MDEV-27036: repeated "table" key resolve for print_explain_json MDEV-27036: duplicated keys in best_access_path MDEV-27036: Explain_aggr_filesort::print_json_members: resolve duplicated "filesort" member in Json object MDEV-27036: Explain_basic_join:: print_explain_json_interns fixed start_dups_weedout case for main.explain_json test
67 lines
2 KiB
Text
67 lines
2 KiB
Text
drop table if exists t0,t1,t2;
|
|
#
|
|
# MDEV-7266: Assertion `!element_started' failed in Json_writer& Json_writer::add_member
|
|
#
|
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1),(2);
|
|
CREATE TABLE t2 (column_name_1 INT, column_name_2 VARCHAR(52)) ENGINE=InnoDB;
|
|
INSERT INTO t2 VALUES (3,'United States');
|
|
CREATE TABLE t3 (b INT, c VARCHAR(3), PRIMARY KEY (c,b)) ENGINE=InnoDB;
|
|
INSERT INTO t3 VALUES (4,'USA'),(5,'CAN');
|
|
EXPLAIN FORMAT=JSON SELECT * FROM t1 WHERE 0 < ALL (
|
|
SELECT tbl_alias1.column_name_1 FROM t2 AS tbl_alias1, t3 AS tbl_alias2
|
|
WHERE tbl_alias2.b = tbl_alias1.column_name_1 AND tbl_alias2.c = tbl_alias1.column_name_2
|
|
);
|
|
EXPLAIN
|
|
{
|
|
"query_block": {
|
|
"select_id": 1,
|
|
"nested_loop": [
|
|
{
|
|
"table": {
|
|
"table_name": "t1",
|
|
"access_type": "ALL",
|
|
"rows": 2,
|
|
"filtered": 100
|
|
}
|
|
}
|
|
],
|
|
"subqueries": [
|
|
{
|
|
"query_block": {
|
|
"select_id": 2,
|
|
"nested_loop": [
|
|
{
|
|
"table": {
|
|
"table_name": "tbl_alias1",
|
|
"access_type": "ALL",
|
|
"rows": 1,
|
|
"filtered": 100,
|
|
"attached_condition": "tbl_alias1.column_name_2 is not null and tbl_alias1.column_name_1 is not null"
|
|
}
|
|
},
|
|
{
|
|
"table": {
|
|
"table_name": "tbl_alias2",
|
|
"access_type": "eq_ref",
|
|
"possible_keys": ["PRIMARY"],
|
|
"key": "PRIMARY",
|
|
"key_length": "9",
|
|
"used_key_parts": ["c", "b"],
|
|
"ref": [
|
|
"test.tbl_alias1.column_name_2",
|
|
"test.tbl_alias1.column_name_1"
|
|
],
|
|
"rows": 1,
|
|
"filtered": 100,
|
|
"attached_condition": "tbl_alias2.c = tbl_alias1.column_name_2",
|
|
"using_index": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
drop table t1,t2,t3;
|