summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi>2006-11-14 12:48:17 +0200
committerunknown <aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi>2006-11-14 12:48:17 +0200
commitd149fc30d0e48bf1d01e0a962fa74a228c63bb75 (patch)
tree3818898ea889297a251b0d484c83340a48f0339d
parent1613ad2c9836f83d366ca9d6d3aaff741262842c (diff)
downloadmariadb-git-d149fc30d0e48bf1d01e0a962fa74a228c63bb75.tar.gz
bug#19402 SQL close to the size of the max_allowed_packet fails on the slave
ver 5.0 and 5.1 refinement. adding to the MAX_SIZE_LOG_EVENT_STATUS estimation status vars and EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN sql/log_event.cc: assertion on size of status vars sql/log_event.h: MAX_SIZE_LOG_EVENT_STATUS as the max bytes of contribution of status vars into repl message; MAX_SIZE_LOG_EVENT_STATUS is getting more wrt to 4.1 version.
-rw-r--r--sql/log_event.cc1
-rw-r--r--sql/log_event.h18
2 files changed, 15 insertions, 4 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 271658d8054..2ad52945c9e 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1212,6 +1212,7 @@ bool Query_log_event::write(IO_CACHE* file)
/* Store length of status variables */
status_vars_len= (uint) (start-start_of_status);
+ DBUG_ASSERT(status_vars_len <= MAX_SIZE_LOG_EVENT_STATUS);
int2store(buf + Q_STATUS_VARS_LEN_OFFSET, status_vars_len);
/*
diff --git a/sql/log_event.h b/sql/log_event.h
index b62a624ab33..247e1962776 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -202,11 +202,21 @@ struct sql_ex_info
/*
Max number of possible extra bytes in a replication event compared to a
- packet (i.e. a query) sent from client to master.
+ packet (i.e. a query) sent from client to master;
+ First, an auxiliary log_event status vars estimation:
*/
-#define MAX_LOG_EVENT_HEADER (LOG_EVENT_HEADER_LEN + /* write_header */ \
- QUERY_HEADER_LEN + /* write_data */ \
- NAME_LEN + 1)
+#define MAX_SIZE_LOG_EVENT_STATUS (4 /* flags2 */ + \
+ 8 /* sql mode */ + \
+ 1 + 1 + 255 /* catalog */ + \
+ 4 /* autoinc */ + \
+ 6 /* charset */ + \
+ MAX_TIME_ZONE_NAME_LENGTH)
+#define MAX_LOG_EVENT_HEADER ( /* in order of Query_log_event::write */ \
+ LOG_EVENT_HEADER_LEN + /* write_header */ \
+ QUERY_HEADER_LEN + /* write_data */ \
+ EXECUTE_LOAD_QUERY_EXTRA_HEADER_LEN + /*write_post_header_for_derived */ \
+ MAX_SIZE_LOG_EVENT_STATUS + /* status */ \
+ NAME_LEN + 1)
/*
Event header offsets;