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
66c62de1
Commit
66c62de1
authored
Jun 25, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MWL#182: Explain running statements
- Remove out-of-date comments, add dbug assertions.
parent
45503698
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
18 deletions
+8
-18
sql/filesort.cc
sql/filesort.cc
+0
-5
sql/my_apc.cc
sql/my_apc.cc
+2
-3
sql/my_apc.h
sql/my_apc.h
+1
-1
sql/sql_class.cc
sql/sql_class.cc
+4
-2
sql/sql_select.cc
sql/sql_select.cc
+1
-6
sql/sql_show.cc
sql/sql_show.cc
+0
-1
No files found.
sql/filesort.cc
View file @
66c62de1
...
...
@@ -1242,11 +1242,6 @@ int merge_buffers(SORTPARAM *param, IO_CACHE *from_file,
status_var_increment
(
thd
->
status_var
.
filesort_merge_passes
);
thd
->
query_plan_fsort_passes
++
;
/*if (param->not_killable)
{
killed= ¬_killable;
not_killable= NOT_KILLED;
}*/
error
=
0
;
rec_length
=
param
->
rec_length
;
...
...
sql/my_apc.cc
View file @
66c62de1
...
...
@@ -86,7 +86,7 @@ void Apc_target::disable()
void
Apc_target
::
enqueue_request
(
Call_request
*
qe
)
{
//call_queue_size++
;
mysql_mutex_assert_owner
(
LOCK_thd_data_ptr
)
;
if
(
apc_calls
)
{
Call_request
*
after
=
apc_calls
->
prev
;
...
...
@@ -112,12 +112,11 @@ void Apc_target::enqueue_request(Call_request *qe)
void
Apc_target
::
dequeue_request
(
Call_request
*
qe
)
{
//call_queue_size--
;
mysql_mutex_assert_owner
(
LOCK_thd_data_ptr
)
;
if
(
apc_calls
==
qe
)
{
if
((
apc_calls
=
apc_calls
->
next
)
==
qe
)
{
//DBUG_ASSERT(!call_queue_size);
apc_calls
=
NULL
;
}
}
...
...
sql/my_apc.h
View file @
66c62de1
...
...
@@ -28,7 +28,7 @@ class Apc_target
{
mysql_mutex_t
*
LOCK_thd_data_ptr
;
public:
Apc_target
()
:
enabled
(
0
),
apc_calls
(
NULL
)
/*, call_queue_size(0)*/
{}
Apc_target
()
:
enabled
(
0
),
apc_calls
(
NULL
)
{}
~
Apc_target
()
{
DBUG_ASSERT
(
!
enabled
&&
!
apc_calls
);}
void
init
(
mysql_mutex_t
*
target_mutex
);
...
...
sql/sql_class.cc
View file @
66c62de1
...
...
@@ -3333,12 +3333,14 @@ void THD::restore_active_arena(Query_arena *set, Query_arena *backup)
void
Show_explain_request
::
get_explain_data
(
void
*
arg
)
{
Show_explain_request
*
req
=
(
Show_explain_request
*
)
arg
;
//TODO: change mem_root to point to request_thd->mem_root.
// Actually, change the ARENA, because we're going to allocate items!
Query_arena
backup_arena
;
THD
*
target_thd
=
req
->
target_thd
;
bool
printed_anything
=
FALSE
;
/*
Change the arena because JOIN::print_explain and co. are going to allocate
items. Let them allocate them on our arena.
*/
target_thd
->
set_n_backup_active_arena
((
Query_arena
*
)
req
->
request_thd
,
&
backup_arena
);
...
...
sql/sql_select.cc
View file @
66c62de1
...
...
@@ -10321,12 +10321,7 @@ void JOIN_TAB::cleanup()
if
(
cache
)
{
cache
->
free
();
cache
=
0
;
// psergey: this is why we don't see "Using join cache" in SHOW EXPLAIN
// when it is run for "Using temporary+filesort" queries while they
// are at reading-from-tmp-table phase.
//
// TODO ask igor if this can be just moved to later phase
// (JOIN_CACHE objects themselves are not big, arent they)
cache
=
0
;
}
limit
=
0
;
if
(
table
)
...
...
sql/sql_show.cc
View file @
66c62de1
...
...
@@ -2092,7 +2092,6 @@ void mysqld_show_explain(THD *thd, ulong thread_id)
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_NOTE
,
ER_YES
,
explain_req
.
query_str
.
c_ptr_safe
());
}
//mysql_mutex_unlock(&tmp->LOCK_thd_data);
if
(
!
bres
)
{
explain_buf
->
flush_data
();
...
...
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