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
be83a97f
Commit
be83a97f
authored
Jul 30, 2007
by
malff/marcsql@weblab.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into weblab.(none):/home/marcsql/TREE/mysql-5.1-cleanup
parents
ffecd803
edf784f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
sql/log.cc
sql/log.cc
+15
-6
No files found.
sql/log.cc
View file @
be83a97f
...
...
@@ -1096,37 +1096,46 @@ void LOGGER::init_general_log(uint general_log_printer)
bool
LOGGER
::
activate_log_handler
(
THD
*
thd
,
uint
log_type
)
{
MYSQL_QUERY_LOG
*
file_log
;
bool
res
=
FALSE
;
lock_exclusive
();
switch
(
log_type
)
{
case
QUERY_LOG_SLOW
:
if
(
!
opt_slow_log
)
{
file_log
_handler
->
get_mysql_slow_log
()
->
open_slow_log
(
sys_var_slow_log_path
.
value
);
init_slow_log
(
log_output_options
);
file_log
=
file_log_handler
->
get_mysql_slow_log
();
file_log
->
open_slow_log
(
sys_var_slow_log_path
.
value
);
if
(
table_log_handler
->
activate_log
(
thd
,
QUERY_LOG_SLOW
))
{
/* Error printed by open table in activate_log() */
res
=
TRUE
;
file_log
->
close
(
0
);
}
else
{
init_slow_log
(
log_output_options
);
opt_slow_log
=
TRUE
;
}
}
break
;
case
QUERY_LOG_GENERAL
:
if
(
!
opt_log
)
{
file_log
_handler
->
get_mysql_log
()
->
open_query_log
(
sys_var_general_log_path
.
value
);
init_general_log
(
log_output_options
);
file_log
=
file_log_handler
->
get_mysql_log
();
file_log
->
open_query_log
(
sys_var_general_log_path
.
value
);
if
(
table_log_handler
->
activate_log
(
thd
,
QUERY_LOG_GENERAL
))
{
/* Error printed by open table in activate_log() */
res
=
TRUE
;
file_log
->
close
(
0
);
}
else
{
init_general_log
(
log_output_options
);
opt_log
=
TRUE
;
}
}
break
;
default:
...
...
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