summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-08-04 05:48:58 -0600
committerunknown <sasha@mysql.sashanet.com>2001-08-04 05:48:58 -0600
commit39045174a55972dba7c2d208dfbc98824ee70832 (patch)
treedf20b670229c5cc4c79a31f63dc4f74b32dc6ad9 /sql/log.cc
parent8d89555e4602d817b6ebc449635cca47e3380b90 (diff)
downloadmariadb-git-39045174a55972dba7c2d208dfbc98824ee70832.tar.gz
new file_id generation method
mysql-test/r/rpl_log.result: fixed result for new file_id generating method BitKeeper/etc/ignore: Added vio/viotest-ssl to the ignore list sql/log.cc: use a different method to generate unique file_id sql/log_event.cc: new file_id generationg method sql/sql_class.h: new file_id generationg method
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc11
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.