diff options
author | unknown <sasha@mysql.sashanet.com> | 2001-08-09 19:16:15 -0600 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2001-08-09 19:16:15 -0600 |
commit | 9a6a7bf5f694dae0b33e61301a17f7aa6fcd1b62 (patch) | |
tree | ed06f905f1515a2117cc0c243c526264fccaac77 /sql/log_event.cc | |
parent | 4bb40187438bdfb8b1d8b091399bd01e0e3425c1 (diff) | |
parent | ebb3bd0f75ecb2b89e4fe07c693caa9e09c2ce3a (diff) | |
download | mariadb-git-9a6a7bf5f694dae0b33e61301a17f7aa6fcd1b62.tar.gz |
merged
BitKeeper/etc/logging_ok:
auto-union
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
ltmain.sh:
Auto merged
libmysql/Makefile.shared:
Auto merged
libmysql/libmysql.c:
Auto merged
myisam/myisamchk.c:
Auto merged
mysql-test/t/bdb.test:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index 14524216076..ca01e418992 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -404,15 +404,26 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet, #endif // MYSQL_CLIENT -// allocates memory - the caller is responsible for clean-up +#ifndef MYSQL_CLIENT +#define UNLOCK_MUTEX if(log_lock) pthread_mutex_unlock(log_lock); +#else +#define UNLOCK_MUTEX +#endif +// allocates memory - the caller is responsible for clean-up +#ifndef MYSQL_CLIENT Log_event* Log_event::read_log_event(IO_CACHE* file, pthread_mutex_t* log_lock) +#else +Log_event* Log_event::read_log_event(IO_CACHE* file) +#endif { char head[LOG_EVENT_HEADER_LEN]; - if(log_lock) pthread_mutex_lock(log_lock); +#ifndef MYSQL_CLIENT + if(log_lock) pthread_mutex_lock(log_lock); +#endif if (my_b_read(file, (byte *) head, sizeof(head))) { - if (log_lock) pthread_mutex_unlock(log_lock); + UNLOCK_MUTEX; return 0; } @@ -449,7 +460,7 @@ Log_event* Log_event::read_log_event(IO_CACHE* file, pthread_mutex_t* log_lock) if((res = read_log_event(buf, data_len))) res->register_temp_buf(buf); err: - if (log_lock) pthread_mutex_unlock(log_lock); + UNLOCK_MUTEX; if(error) { sql_print_error(error); |