From 56129ce634088b51dd60381711519c9125e8df72 Mon Sep 17 00:00:00 2001 From: "sasha@mysql.sashanet.com" <> Date: Sat, 19 Jan 2002 19:16:52 -0700 Subject: Here comes a nasty patch, although I am not ready to push it yet. I will first pull, merge,test, and get it to work. The main change is the new replication code - now we have two slave threads SQL thread and I/O thread. I have also re-written a lot of the code to prepare for multi-master implementation. I also documented IO_CACHE quite extensively and to some extend, THD class. --- libmysqld/lib_sql.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libmysqld') diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index d241ceaada0..f22cc1b6101 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -396,8 +396,8 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) (void) pthread_mutex_init(&LOCK_bytes_sent,MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_bytes_received,MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_timezone,MY_MUTEX_INIT_FAST); - (void) pthread_mutex_init(&LOCK_binlog_update, MY_MUTEX_INIT_FAST); // QQ NOT USED - (void) pthread_mutex_init(&LOCK_slave, MY_MUTEX_INIT_FAST); + (void) pthread_mutex_init(&LOCK_slave_io, MY_MUTEX_INIT_FAST); + (void) pthread_mutex_init(&LOCK_slave_sql, MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_server_id, MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_user_conn, MY_MUTEX_INIT_FAST); (void) pthread_cond_init(&COND_thread_count,NULL); @@ -406,8 +406,11 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups) (void) pthread_cond_init(&COND_flush_thread_cache,NULL); (void) pthread_cond_init(&COND_manager,NULL); (void) pthread_cond_init(&COND_binlog_update, NULL); - (void) pthread_cond_init(&COND_slave_stopped, NULL); - (void) pthread_cond_init(&COND_slave_start, NULL); + (void) pthread_cond_init(&COND_slave_log_update, NULL); + (void) pthread_cond_init(&COND_slave_sql_stop, NULL); + (void) pthread_cond_init(&COND_slave_sql_start, NULL); + (void) pthread_cond_init(&COND_slave_sql_stop, NULL); + (void) pthread_cond_init(&COND_slave_sql_start, NULL); if (set_default_charset_by_name(default_charset, MYF(MY_WME))) { -- cgit v1.2.1