Below is the list of changes that have just been committed into a local
5.1 repository of cps. When cps does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2077 06/01/27 16:10:40 petr@stripped +3 -0
fix safemalloc warnings
sql/mysqld.cc
1.525 06/01/27 16:10:37 petr@stripped +4 -1
split logger cleanup in two phases
sql/log.h
1.3 06/01/27 16:10:37 petr@stripped +4 -1
split logging cleanup function in two
sql/log.cc
1.189 06/01/27 16:10:37 petr@stripped +12 -1
split logging cleanup function in two
and do actual delete of the log event
handlers
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: petr
# Host: outpost.site
# Root: /home/cps/mysql/trees/5.1/5.1-virgin-debug
--- 1.188/sql/log.cc 2006-01-20 15:50:49 +03:00
+++ 1.189/sql/log.cc 2006-01-27 16:10:37 +03:00
@@ -561,14 +561,25 @@
}
-void LOGGER::cleanup()
+void LOGGER::cleanup_base()
{
DBUG_ASSERT(inited == 1);
(void) pthread_mutex_destroy(&LOCK_logger);
if (table_log_handler)
+ {
table_log_handler->cleanup();
+ delete table_log_handler;
+ }
if (file_log_handler)
file_log_handler->cleanup();
+}
+
+
+void LOGGER::cleanup_end()
+{
+ DBUG_ASSERT(inited == 1);
+ if (file_log_handler)
+ delete file_log_handler;
}
--- 1.524/sql/mysqld.cc 2006-01-24 15:33:58 +03:00
+++ 1.525/sql/mysqld.cc 2006-01-27 16:10:37 +03:00
@@ -1144,7 +1144,8 @@
if (cleanup_done++)
return; /* purecov: inspected */
- logger.cleanup();
+ logger.cleanup_base();
+
/*
make sure that handlers finish up
what they have that is dependent on the binlog
@@ -1237,6 +1238,8 @@
/* do the broadcast inside the lock to ensure that my_end() is not called */
(void) pthread_cond_broadcast(&COND_thread_count);
(void) pthread_mutex_unlock(&LOCK_thread_count);
+ logger.cleanup_end();
+
/*
The following lines may never be executed as the main thread may have
killed us
--- 1.2/sql/log.h 2006-01-19 05:56:00 +03:00
+++ 1.3/sql/log.h 2006-01-27 16:10:37 +03:00
@@ -479,7 +479,10 @@
{
return (THD *) table_log_handler->slow_log_thd;
}
- void cleanup();
+ /* Perform basic logger cleanup. this will leave e.g. error log open. */
+ void cleanup_base();
+ /* Free memory. Nothing could be logged after this function is called */
+ void cleanup_end();
bool error_log_print(enum loglevel level, const char *format,
va_list args);
bool slow_log_print(THD *thd, const char *query, uint query_length,
| Thread |
|---|
| • bk commit into 5.1 tree (petr:1.2077) | Petr Chardin | 27 Jan |