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 | ade2a371187ff5e810fd732908071c338807bb32 (patch) | |
tree | ed06f905f1515a2117cc0c243c526264fccaac77 /sql/log_event.cc | |
parent | 11a766674366b56d678ad0610d396ae1b54a75bd (diff) | |
parent | e415d5620181913d069cefc758ea84f0bf8d3933 (diff) | |
download | mariadb-git-ade2a371187ff5e810fd732908071c338807bb32.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); |