Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4da7aa55
Commit
4da7aa55
authored
Feb 17, 2015
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a testcase for EXPLAIN FORMAT=JSON for ROR-union index_merge.
parent
3e2849d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
mysql-test/r/explain_json.result
mysql-test/r/explain_json.result
+29
-0
mysql-test/t/explain_json.test
mysql-test/t/explain_json.test
+3
-0
No files found.
mysql-test/r/explain_json.result
View file @
4da7aa55
...
...
@@ -148,6 +148,35 @@ EXPLAIN
}
}
}
explain format=json select * from t2 where (a1=1 and a2=1) or
(b1=2 and b2=1);
EXPLAIN
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "t2",
"access_type": "index_merge",
"possible_keys": ["a1", "b1"],
"key_length": "10,10",
"index_merge": {
"union": {
"range": {
"key": "a1",
"used_key_parts": ["a1", "a2"]
},
"range": {
"key": "b1",
"used_key_parts": ["b1", "b2"]
}
}
},
"rows": 2,
"filtered": 100,
"attached_condition": "(((t2.a1 = 1) and (t2.a2 = 1)) or ((t2.b1 = 2) and (t2.b2 = 1)))"
}
}
}
# Try ref access on two key components
explain format=json select * from t0,t2 where t2.b1=t0.a and t2.b2=4;
EXPLAIN
...
...
mysql-test/t/explain_json.test
View file @
4da7aa55
...
...
@@ -34,6 +34,9 @@ explain format=json select * from t2 where a1<5;
explain
format
=
json
select
*
from
t2
where
a1
=
1
or
b1
=
2
;
explain
format
=
json
select
*
from
t2
where
a1
=
1
or
(
b1
=
2
and
b2
=
3
);
explain
format
=
json
select
*
from
t2
where
(
a1
=
1
and
a2
=
1
)
or
(
b1
=
2
and
b2
=
1
);
--
echo
# Try ref access on two key components
explain
format
=
json
select
*
from
t0
,
t2
where
t2
.
b1
=
t0
.
a
and
t2
.
b2
=
4
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment