summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-11-10 18:07:39 +0200
committerunknown <monty@mysql.com>2004-11-10 18:07:39 +0200
commit69bce9c68d2dd38bc4cb58b19fbf609aca11e5dd (patch)
tree60f8373ec30a2ed262c9a3d17d596cb7897a54d3 /sql/log.cc
parent977fef311eb67fa6f7ec81f38f3b3190eb3e1ed5 (diff)
downloadmariadb-git-69bce9c68d2dd38bc4cb58b19fbf609aca11e5dd.tar.gz
More debugging
Print position in normal log for Binlog dump dbug/dbug.c: Added DBUG_OUTPUT() to temporary start/stop trace-file output Optimized alignment of CODE_STATE structure include/my_dbug.h: Added DBUG_OUTPUT() to temporary start/stop trace-file output sql/field.cc: Safety fix when used with future 5.0 .frm tables sql/log.cc: More debugging sql/mysqld.cc: Fixed type sql/slave.cc: Fixed wrong cast (not a bug) sql/sql_class.h: More DBUG output sql/sql_parse.cc: Print position in normal log for Binlog dump
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc32
1 files changed, 23 insertions, 9 deletions
diff --git a/sql/log.cc b/sql/log.cc
index ef57a57d3b4..bcd99326501 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1703,6 +1703,8 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
time_t current_time;
if (!is_open())
return 0;
+ DBUG_ENTER("MYSQL_LOG::write");
+
VOID(pthread_mutex_lock(&LOCK_log));
if (is_open())
{ // Safety agains reopen
@@ -1712,7 +1714,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
if (!(thd->options & OPTION_UPDATE_LOG))
{
VOID(pthread_mutex_unlock(&LOCK_log));
- return 0;
+ DBUG_RETURN(0);
}
if (!(specialflag & SPECIAL_SHORT_LOG_FORMAT) || query_start_arg)
{
@@ -1812,7 +1814,7 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
}
}
VOID(pthread_mutex_unlock(&LOCK_log));
- return error;
+ DBUG_RETURN(error);
}
@@ -1832,16 +1834,19 @@ bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
THD::enter_cond() (see NOTES in sql_class.h).
*/
-void MYSQL_LOG:: wait_for_update(THD* thd, bool master_or_slave)
+void MYSQL_LOG::wait_for_update(THD* thd, bool master_or_slave)
{
- const char* old_msg = thd->enter_cond(&update_cond, &LOCK_log,
- master_or_slave ?
- "Has read all relay log; waiting for \
-the slave I/O thread to update it" :
- "Has sent all binlog to slave; \
-waiting for binlog to be updated");
+ const char *old_msg;
+ DBUG_ENTER("wait_for_update");
+ old_msg= thd->enter_cond(&update_cond, &LOCK_log,
+ master_or_slave ?
+ "Has read all relay log; waiting for the slave I/O "
+ "thread to update it" :
+ "Has sent all binlog to slave; waiting for binlog "
+ "to be updated");
pthread_cond_wait(&update_cond, &LOCK_log);
thd->exit_cond(old_msg);
+ DBUG_VOID_RETURN;
}
@@ -2198,6 +2203,15 @@ void MYSQL_LOG::report_pos_in_innodb()
DBUG_VOID_RETURN;
}
+
+void MYSQL_LOG::signal_update()
+{
+ DBUG_ENTER("MYSQL_LOG::signal_update");
+ pthread_cond_broadcast(&update_cond);
+ DBUG_VOID_RETURN;
+}
+
+
#ifdef __NT__
void print_buffer_to_nt_eventlog(enum loglevel level, char *buff,
uint length, int buffLen)