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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7e919c52
Commit
7e919c52
authored
Oct 09, 2013
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-3798: EXPLAIN UPDATE/DELETE
- Produce correct `key_len` when type=index.
parent
3c6ac669
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
mysql-test/r/explain_non_select.result
mysql-test/r/explain_non_select.result
+1
-1
sql/sql_delete.cc
sql/sql_delete.cc
+4
-1
No files found.
mysql-test/r/explain_non_select.result
View file @
7e919c52
...
...
@@ -21,7 +21,7 @@ from t0 A, t0 B, t0 C;
# This should use an index, possible_keys=NULL because there is no WHERE
explain delete from t1 order by a limit 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL a
NULL
NULL 2
1 SIMPLE t1 index NULL a
5
NULL 2
# This should use range, possible_keys={a,b}
explain delete from t1 where a<20 and b < 10;
id select_type table type possible_keys key key_len ref rows Extra
...
...
sql/sql_delete.cc
View file @
7e919c52
...
...
@@ -158,8 +158,11 @@ void Update_plan::save_explain_data_intern(Explain_query *query,
if
(
index
!=
MAX_KEY
)
{
explain
->
key_str
.
append
(
table
->
key_info
[
index
].
name
);
char
buf
[
64
];
size_t
length
;
length
=
longlong10_to_str
(
table
->
key_info
[
index
].
key_length
,
buf
,
10
)
-
buf
;
explain
->
key_len_str
.
append
(
buf
,
length
);
}
// key_len stays NULL
}
explain
->
rows
=
scanned_rows
;
...
...
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