Commit b7170cf9 authored by sasha@mysql.sashanet.com's avatar sasha@mysql.sashanet.com
Browse files

replication fixes

parent 28d23e87
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -41585,6 +41585,9 @@ not yet 100 % confident in this code.
@appendixsubsec Changes in release 3.23.34
@itemize @bullet
@item
Limit query length for replication by max_allowed_packet, not the arbitrary
limit of 4 MB
@item
Allow space around @code{=} in argument to @code{--set-variable}.
@item
Fixed problem in automatic repair that could let some threads in state
@@ -41606,7 +41609,7 @@ Fixed that @code{mysqlbinlog} writes the timestamp value for each query.
This ensures that on gets same values for date functions like @code{NOW()}
when using @code{mysqlbinlog} to pipe the queries to another server.
@item
Allow one to use @code{--skip-gemeni}, @code{--skip-bdb} and
Allow one to use @code{--skip-gemini}, @code{--skip-bdb} and
@code{--skip-innobase} to @code{mysqld} even if these databases are not
compiled in @code{mysqld}.
@item
+4 −0
Original line number Diff line number Diff line
@@ -21,5 +21,9 @@ Log_name
master-bin.003
master-bin.004
master-bin.005
File	Position	Binlog_do_db	Binlog_ignore_db
master-bin.005	1504		
Master_Host	Master_User	Master_Port	Connect_retry	Log_File	Pos	Slave_Running	Replicate_do_db	Replicate_ignore_db	Last_errno	Last_error	Skip_counter
127.0.0.1	root	9306	60	master-bin.005	1504	Yes			0		0
count(*)
100
+2 −0
Original line number Diff line number Diff line
@@ -78,11 +78,13 @@ while ($1)
 dec $1;
}
show master logs;
show master status;
save_master_pos;
connection slave;
slave stop;
slave start;
sync_with_master;
show slave status;
select count(*) from t3 where n = 4;
#clean up
connection master;
+3 −2
Original line number Diff line number Diff line
@@ -85,10 +85,11 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet,
    return file->error > 0 ? LOG_READ_TRUNC: LOG_READ_IO;
  }
  data_len = uint4korr(buf + EVENT_LEN_OFFSET);
  if (data_len < LOG_EVENT_HEADER_LEN || data_len > MAX_EVENT_LEN)
  if (data_len < LOG_EVENT_HEADER_LEN || data_len > max_allowed_packet)
  {
    if (log_lock) pthread_mutex_unlock(log_lock);
    return LOG_READ_BOGUS;
    return (data_len < LOG_EVENT_HEADER_LEN) ? LOG_READ_BOGUS :
      LOG_READ_TOO_LARGE;
  }
  packet->append(buf, sizeof(buf));
  data_len -= LOG_EVENT_HEADER_LEN;
+1 −1
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
#define LOG_READ_IO     -3
#define LOG_READ_MEM    -5
#define LOG_READ_TRUNC  -6
#define LOG_READ_TOO_LARGE -7

#define LOG_EVENT_OFFSET 4
#define BINLOG_VERSION    1
@@ -42,7 +43,6 @@
  + sizeof(uint32) + 2 + sizeof(uint32))
#define EVENT_LEN_OFFSET     9
#define EVENT_TYPE_OFFSET    4
#define MAX_EVENT_LEN        4*1024*1024 
#define QUERY_EVENT_OVERHEAD  (LOG_EVENT_HEADER_LEN+QUERY_HEADER_LEN)
#define ROTATE_EVENT_OVERHEAD LOG_EVENT_HEADER_LEN
#define LOAD_EVENT_OVERHEAD   (LOG_EVENT_HEADER_LEN+LOAD_HEADER_LEN+sizeof(sql_ex_info))
Loading