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
1ff340ad
Commit
1ff340ad
authored
Jul 04, 2013
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge
parents
28082b01
77584dd6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
mysql-test/r/log_state.result
mysql-test/r/log_state.result
+3
-3
mysql-test/t/log_state.test
mysql-test/t/log_state.test
+2
-2
sql/log.cc
sql/log.cc
+3
-0
No files found.
mysql-test/r/log_state.result
View file @
1ff340ad
...
...
@@ -45,7 +45,7 @@ select sleep(@long_query_time + 1);
sleep(@long_query_time + 1)
0
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
thread_id
# Switch to connection default
set global slow_query_log= ON;
# Switch to connection con1
...
...
@@ -54,8 +54,8 @@ select sleep(@long_query_time + 1);
sleep(@long_query_time + 1)
0
select * from mysql.slow_log where sql_text NOT LIKE '%slow_log%';
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 select sleep(@long_query_time + 1)
start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text
thread_id
TIMESTAMP USER_HOST QUERY_TIME 00:00:00.000000 1 0 test 0 0 1 select sleep(@long_query_time + 1)
THREAD_ID
# Switch to connection default
show global variables
where Variable_name = 'log' or Variable_name = 'log_slow_queries' or
...
...
mysql-test/t/log_state.test
View file @
1ff340ad
...
...
@@ -48,7 +48,7 @@ connection con1;
set
@
long_query_time
=
2
;
set
session
long_query_time
=
@
long_query_time
;
select
sleep
(
@
long_query_time
+
1
);
--
replace_column
1
TIMESTAMP
2
USER_HOST
3
QUERY_TIME
--
replace_column
1
TIMESTAMP
2
USER_HOST
3
QUERY_TIME
12
THREAD_ID
select
*
from
mysql
.
slow_log
where
sql_text
NOT
LIKE
'%slow_log%'
;
--
echo
# Switch to connection default
connection
default
;
...
...
@@ -58,7 +58,7 @@ set global slow_query_log= ON;
connection
con1
;
set
session
long_query_time
=
@
long_query_time
;
select
sleep
(
@
long_query_time
+
1
);
--
replace_column
1
TIMESTAMP
2
USER_HOST
3
QUERY_TIME
--
replace_column
1
TIMESTAMP
2
USER_HOST
3
QUERY_TIME
12
THREAD_ID
select
*
from
mysql
.
slow_log
where
sql_text
NOT
LIKE
'%slow_log%'
;
--
echo
# Switch to connection default
connection
default
;
...
...
sql/log.cc
View file @
1ff340ad
...
...
@@ -895,6 +895,9 @@ bool Log_to_csv_event_handler::
if
(
table
->
field
[
10
]
->
store
(
sql_text
,
sql_text_len
,
client_cs
)
<
0
)
goto
err
;
if
(
table
->
field
[
11
]
->
store
((
longlong
)
thd
->
thread_id
,
TRUE
))
goto
err
;
/* log table entries are not replicated */
if
(
table
->
file
->
ha_write_row
(
table
->
record
[
0
]))
goto
err
;
...
...
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