diff options
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/log.cc b/sql/log.cc index 61384f85085..ba09ac86fe6 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -81,7 +81,7 @@ static int find_uniq_filename(char *name) MYSQL_LOG::MYSQL_LOG(): last_time(0), query_start(0),index_file(-1), name(0), log_type(LOG_CLOSED),write_error(0), - inited(0), log_seq(1), no_rotate(0) + inited(0), log_seq(1), file_id(1),no_rotate(0) { /* We don't want to intialize LOCK_Log here as the thread system may @@ -724,6 +724,15 @@ err: return error; } +uint MYSQL_LOG::next_file_id() +{ + uint res; + pthread_mutex_lock(&LOCK_log); + res = file_id++; + pthread_mutex_unlock(&LOCK_log); + return res; +} + /* Write a cached log entry to the binary log We only come here if there is something in the cache. |