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
423119d2
Commit
423119d2
authored
Apr 18, 2006
by
petr@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin
parents
ac6450b8
de97f94a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
11 deletions
+27
-11
sql/log.cc
sql/log.cc
+27
-11
No files found.
sql/log.cc
View file @
423119d2
...
@@ -676,20 +676,36 @@ bool LOGGER::flush_logs(THD *thd)
...
@@ -676,20 +676,36 @@ bool LOGGER::flush_logs(THD *thd)
/* reopen log files */
/* reopen log files */
file_log_handler
->
flush
();
file_log_handler
->
flush
();
/*
/* flush tables, in the case they are enabled */
this will lock and wait for all but the logger thread to release the
if
(
logger
.
is_log_tables_initialized
)
tables. Then we could reopen log tables. Then release the name locks.
{
*/
/*
lock_and_wait_for_table_name
(
thd
,
&
close_slow_log
);
This will lock and wait for all but the logger thread to release the
lock_and_wait_for_table_name
(
thd
,
&
close_general_log
);
tables. Then we could reopen log tables. Then release the name locks.
NOTE: in fact, the first parameter used in lock_and_wait_for_table_name()
and table_log_handler->flush() could be any non-NULL THD, as the
underlying code makes certain assumptions about this.
Here we use one of the logger handler THD's. Simply because it
seems appropriate.
*/
lock_and_wait_for_table_name
(
table_log_handler
->
general_log_thd
,
&
close_slow_log
);
lock_and_wait_for_table_name
(
table_log_handler
->
general_log_thd
,
&
close_general_log
);
/* deny others from logging to general and slow log, while reopening tables */
/*
logger
.
lock
();
Deny others from logging to general and slow log,
while reopening tables.
*/
logger
.
lock
();
table_log_handler
->
flush
(
thd
,
&
close_slow_log
,
&
close_general_log
);
table_log_handler
->
flush
(
table_log_handler
->
general_log_thd
,
&
close_slow_log
,
&
close_general_log
);
/* end of log tables flush */
/* end of log tables flush */
logger
.
unlock
();
logger
.
unlock
();
}
return
FALSE
;
return
FALSE
;
}
}
...
...
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