1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Added support for rw_tryrdlock() and rw_trywrlock()

include/my_sys.h:
  Removed not needed macro (SAFE_MUTEX can handle this case better).
sql/log.cc:
  Simple optimization
sql/log_event.cc:
  Fix problem in LOAD DATA if table_name is NULL (unlikely event)
sql/log_event.h:
  cleanup
sql/slave.cc:
  remove unnecessary assert
This commit is contained in:
unknown
2002-06-29 20:26:33 +03:00
parent 6e5952d087
commit 10d282f632
7 changed files with 74 additions and 43 deletions

View File

@ -888,15 +888,15 @@ bool MYSQL_LOG::write(THD *thd,enum enum_server_command command,
bool MYSQL_LOG::write(Log_event* event_info)
{
/* In most cases this is only called if 'is_open()' is true */
bool error=0;
bool should_rotate = 0;
if (!inited) // Can't use mutex if not init
return 0;
VOID(pthread_mutex_lock(&LOCK_log));
/* In most cases this is only called if 'is_open()' is true */
if (is_open())
{
bool should_rotate = 0;
THD *thd=event_info->thd;
const char* db = event_info->get_db();
#ifdef USING_TRANSACTIONS
@ -985,9 +985,9 @@ err:
}
if (file == &log_file)
signal_update();
if (should_rotate)
new_file(1); // inside mutex
}
if (should_rotate)
new_file(1); // inside mutex
VOID(pthread_mutex_unlock(&LOCK_log));
return error;
}