summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2002-04-01 21:46:23 -0700
committerunknown <sasha@mysql.sashanet.com>2002-04-01 21:46:23 -0700
commitd7cfbff5b0a53ba22bb731dec70c4886d2ff9570 (patch)
tree0156e4a56e551202f8c7a8237544114db4a8d1bc /sql/sql_class.h
parent869e671f98b1a056595e259283bf4e5e40256a20 (diff)
downloadmariadb-git-d7cfbff5b0a53ba22bb731dec70c4886d2ff9570.tar.gz
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
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 289a2ab9255..d8824e80686 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -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);