summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-11-25 18:03:05 +0300
committerAlexander Nozdrin <alik@sun.com>2009-11-25 18:03:05 +0300
commit52c66b56710046034fc631df4f3a165ba5a704f7 (patch)
treeb7488b7a2e23cf4b596766c1c84f64235543757a /sql/log.cc
parent72a26125e21fc4c654a8a1c9c1841f79f62d4d7a (diff)
parentbe0add42f53b23d8a5e279cb3041a3fc93e375a0 (diff)
downloadmariadb-git-52c66b56710046034fc631df4f3a165ba5a704f7.tar.gz
Manual merge/pull from mysql-next-mr.
Conflicts: - sql/sql_insert.cc
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/sql/log.cc b/sql/log.cc
index e34b54f5c3b..94949ebef40 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2909,7 +2909,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
thread. If the transaction involved MyISAM tables, it should go
into binlog even on rollback.
*/
- VOID(pthread_mutex_lock(&LOCK_thread_count));
+ pthread_mutex_lock(&LOCK_thread_count);
/* Save variables so that we can reopen the log */
save_name=name;
@@ -2989,7 +2989,7 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd)
my_free((uchar*) save_name, MYF(0));
err:
- VOID(pthread_mutex_unlock(&LOCK_thread_count));
+ pthread_mutex_unlock(&LOCK_thread_count);
pthread_mutex_unlock(&LOCK_index);
pthread_mutex_unlock(&LOCK_log);
DBUG_RETURN(error);
@@ -4084,12 +4084,11 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info)
if ((thd && !(thd->options & OPTION_BIN_LOG)) ||
(!binlog_filter->db_ok(local_db)))
{
- VOID(pthread_mutex_unlock(&LOCK_log));
+ pthread_mutex_unlock(&LOCK_log);
DBUG_RETURN(0);
}
#endif /* HAVE_REPLICATION */
-#if defined(USING_TRANSACTIONS)
/*
Should we write to the binlog cache or to the binlog on disk?
Write to the binlog cache if:
@@ -4124,7 +4123,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info)
LOCK_log.
*/
}
-#endif /* USING_TRANSACTIONS */
+
DBUG_PRINT("info",("event type: %d",event_info->get_type_code()));
/*
@@ -4547,7 +4546,7 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event,
bool incident)
{
DBUG_ENTER("MYSQL_BIN_LOG::write(THD *, IO_CACHE *, Log_event *)");
- VOID(pthread_mutex_lock(&LOCK_log));
+ pthread_mutex_lock(&LOCK_log);
/* NULL would represent nothing to replicate after ROLLBACK */
DBUG_ASSERT(commit_event != NULL);
@@ -4636,7 +4635,7 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event,
else
rotate_and_purge(RP_LOCK_LOG_IS_ALREADY_LOCKED);
}
- VOID(pthread_mutex_unlock(&LOCK_log));
+ pthread_mutex_unlock(&LOCK_log);
DBUG_RETURN(0);
@@ -4646,7 +4645,7 @@ err:
write_error= 1;
sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
}
- VOID(pthread_mutex_unlock(&LOCK_log));
+ pthread_mutex_unlock(&LOCK_log);
DBUG_RETURN(1);
}
@@ -4866,7 +4865,7 @@ bool flush_error_log()
char err_renamed[FN_REFLEN], *end;
end= strmake(err_renamed,log_error_file,FN_REFLEN-4);
strmov(end, "-old");
- VOID(pthread_mutex_lock(&LOCK_error_log));
+ pthread_mutex_lock(&LOCK_error_log);
#ifdef __WIN__
char err_temp[FN_REFLEN+4];
/*
@@ -4913,7 +4912,7 @@ bool flush_error_log()
else
result= 1;
#endif
- VOID(pthread_mutex_unlock(&LOCK_error_log));
+ pthread_mutex_unlock(&LOCK_error_log);
}
return result;
}
@@ -4988,7 +4987,7 @@ static void print_buffer_to_file(enum loglevel level, const char *buffer)
DBUG_ENTER("print_buffer_to_file");
DBUG_PRINT("enter",("buffer: %s", buffer));
- VOID(pthread_mutex_lock(&LOCK_error_log));
+ pthread_mutex_lock(&LOCK_error_log);
skr= my_time(0);
localtime_r(&skr, &tm_tmp);
@@ -5007,7 +5006,7 @@ static void print_buffer_to_file(enum loglevel level, const char *buffer)
fflush(stderr);
- VOID(pthread_mutex_unlock(&LOCK_error_log));
+ pthread_mutex_unlock(&LOCK_error_log);
DBUG_VOID_RETURN;
}