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
03c71ff2
Commit
03c71ff2
authored
Jul 01, 2013
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-4683 query start_time not reset when going to sleep
parent
a924e900
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
mysql-test/r/processlist.result
mysql-test/r/processlist.result
+6
-0
mysql-test/t/processlist.test
mysql-test/t/processlist.test
+13
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-0
No files found.
mysql-test/r/processlist.result
View file @
03c71ff2
...
...
@@ -7,3 +7,9 @@ SELECT INFO,TIME,TIME_MS FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO IS NULL;
SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed';
INFO TIME TIME_MS
NULL 0 0.000
select sleep(5);
sleep(5)
0
select command, time < 5 from information_schema.processlist where id != connection_id();
command time < 5
Sleep 1
mysql-test/t/processlist.test
View file @
03c71ff2
...
...
@@ -18,5 +18,18 @@ SET DEBUG_SYNC = 'now SIGNAL fill_schema_proceed';
connection
con1
;
reap
;
connection
default
;
#
# MDEV-4683 query start_time not reset when going to sleep
#
connection
con1
;
select
sleep
(
5
);
#run a query that will take some time
connection
default
;
# verify that the time in COM_SLEEP doesn't include the query run time
select
command
,
time
<
5
from
information_schema
.
processlist
where
id
!=
connection_id
();
disconnect
con1
;
sql/sql_parse.cc
View file @
03c71ff2
...
...
@@ -1461,6 +1461,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd_proc_info
(
thd
,
"cleaning up"
);
thd
->
reset_query
();
thd
->
command
=
COM_SLEEP
;
thd
->
set_time
();
dec_thread_running
();
thd_proc_info
(
thd
,
0
);
thd
->
packet
.
shrink
(
thd
->
variables
.
net_buffer_length
);
// Reclaim some memory
...
...
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