diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-31 18:27:49 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-31 18:27:49 +0200 |
commit | 03f6fdd575f71aacd4b6e782c9df4b929f8222b1 (patch) | |
tree | 603547f133fd6eaa7de511aeb171eb8224e0d208 /sql/log.cc | |
parent | 3f7cf671a1d735a72e98e89d91a16cce085e6817 (diff) | |
download | mariadb-git-03f6fdd575f71aacd4b6e782c9df4b929f8222b1.tar.gz |
Portability fixes
Fix for consistent 0000-00-00 date handling
Close + open binary logs on flush tables
Fix for AVG() in HAVING.
BUILD/SETUP.sh:
Compile MySQL with -O0 to make debugging easier.
Docs/manual.texi:
Changelog
configure.in:
Version change
innobase/buf/buf0lru.c:
Fix for windows
mysql-test/r/func_time.result:
Updated tests
mysql-test/r/having.result:
Updated tests
mysql-test/t/func_time.test:
Updated tests
mysql-test/t/having.test:
Updated tests
mysys/mf_casecnv.c:
Portability fix
mysys/mf_qsort.c:
Portability fix
mysys/my_compress.c:
Portability fix
mysys/my_tempnam.c:
More comments
sql/field.cc:
Fix for consistent 0000-00-00 date handling
sql/item.h:
Fix for AVG() in HAVING
sql/log.cc:
Close + open update logs on flush tables
sql/sql_select.cc:
More debugging info
sql/time.cc:
Fix for consistent 0000-00-00 date handling
strings/ctype.c:
Portability fix
strings/strto.c:
Portability fix
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/sql/log.cc b/sql/log.cc index d7825ce0e93..0417f7eb06b 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -513,29 +513,37 @@ bool MYSQL_LOG::is_active(const char* log_file_name) void MYSQL_LOG::new_file(bool inside_mutex) { - // only rotate open logs that are marked non-rotatable - // (binlog with constant name are non-rotatable) - if (is_open() && ! no_rotate) + if (is_open()) { char new_name[FN_REFLEN], *old_name=name; if (!inside_mutex) VOID(pthread_mutex_lock(&LOCK_log)); - if (generate_new_name(new_name, name)) - { - if (!inside_mutex) - VOID(pthread_mutex_unlock(&LOCK_log)); - return; // Something went wrong - } - if (log_type == LOG_BIN) + + if (!no_rotate) { /* - We log the whole file name for log file as the user may decide - to change base names at some point. + only rotate open logs that are marked non-rotatable + (binlog with constant name are non-rotatable) */ - Rotate_log_event r(new_name+dirname_length(new_name)); - r.write(&log_file); - VOID(pthread_cond_broadcast(&COND_binlog_update)); + if (generate_new_name(new_name, name)) + { + if (!inside_mutex) + VOID(pthread_mutex_unlock(&LOCK_log)); + return; // Something went wrong + } + if (log_type == LOG_BIN) + { + /* + We log the whole file name for log file as the user may decide + to change base names at some point. + */ + Rotate_log_event r(new_name+dirname_length(new_name)); + r.write(&log_file); + VOID(pthread_cond_broadcast(&COND_binlog_update)); + } } + else + strmov(new_name, old_name); // Reopen old file name name=0; close(); open(old_name, log_type, new_name); |