diff options
author | monty@mashka.mysql.fi <> | 2002-12-14 12:45:31 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-12-14 12:45:31 +0200 |
commit | 9c509fcb52e9b8d8342374370708912ab6e8b282 (patch) | |
tree | 3788562d6e317e766885341d638abf4c2828870d /sql/log.cc | |
parent | a37ae546d7762754253d53a033a4ea68103b3e72 (diff) | |
download | mariadb-git-9c509fcb52e9b8d8342374370708912ab6e8b282.tar.gz |
Transactions in AUTOCOMMIT=0 mode didn't rotate binary log
Don't enable any bulk insert or record caching code if inserting less than MIN_ROWS_TO_USE_BULK_INSERT rows (100)
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/log.cc b/sql/log.cc index 21c88cc1616..58f5298dad0 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1239,6 +1239,13 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache) log_file.pos_in_file))) goto err; signal_update(); + if (my_b_tell(&log_file) >= (my_off_t) max_binlog_size) + { + pthread_mutex_lock(&LOCK_index); + new_file(0); // inside mutex + pthread_mutex_unlock(&LOCK_index); + } + } VOID(pthread_mutex_unlock(&LOCK_log)); DBUG_RETURN(0); |