1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

relay_log_space_limit

DBUG_ macro cleanup
buffer boundary cleanup
This changeset, although not fully tested, works for me better than 
anything I've had so far, including what is in the repository. I will 
push it unless something crashes while I am writing this :-)


mysql-test/r/rpl000014.result:
  updated result
mysql-test/r/rpl000015.result:
  updated result
mysql-test/r/rpl000016.result:
  updated result
mysql-test/r/rpl_log.result:
  new result
mysys/mf_iocache.c:
  DBUG_ cleanup
mysys/mf_iocache2.c:
  DBUG_ fix
sql/log.cc:
  added relay_log_space_limit
sql/mysqld.cc:
  relay_log_space_limit
sql/slave.cc:
  relay_log_space_limit
sql/slave.h:
  relay_log_space_limit
sql/sql_class.h:
  relay_log_space_limit
sql/sql_repl.cc:
  fixed buffer overrun bug
This commit is contained in:
unknown
2002-04-01 21:46:23 -07:00
parent 869e671f98
commit d7cfbff5b0
12 changed files with 185 additions and 48 deletions

View File

@@ -78,12 +78,29 @@ class MYSQL_LOG {
bool need_start_event;
pthread_cond_t update_cond;
bool no_auto_events; // for relay binlog
ulonglong bytes_written;
friend class Log_event;
public:
MYSQL_LOG();
~MYSQL_LOG();
pthread_mutex_t* get_log_lock() { return &LOCK_log; }
void reset_bytes_written()
{
bytes_written = 0;
}
void harvest_bytes_written(ulonglong* counter)
{
#ifndef DBUG_OFF
char buf1[22],buf2[22];
#endif
DBUG_ENTER("harvest_bytes_written");
(*counter)+=bytes_written;
DBUG_PRINT("info",("counter=%s,bytes_written=%s", llstr(*counter,buf1),
llstr(bytes_written,buf2)));
bytes_written=0;
DBUG_VOID_RETURN;
}
IO_CACHE* get_log_file() { return &log_file; }
void signal_update() { pthread_cond_broadcast(&update_cond);}
void wait_for_update(THD* thd);