Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5a20c542
Commit
5a20c542
authored
Nov 12, 2006
by
aelkin/elkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#19402 SQL close to the size of the max_allowed_packet fails on the slave
comments are fixed as was suggested in reviews.
parent
fe5de9f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
sql/log_event.h
sql/log_event.h
+4
-2
sql/slave.cc
sql/slave.cc
+11
-2
sql/sql_repl.cc
sql/sql_repl.cc
+5
-1
No files found.
sql/log_event.h
View file @
5a20c542
...
...
@@ -147,8 +147,10 @@ struct sql_ex_info
#define EXEC_LOAD_HEADER_LEN 4
#define DELETE_FILE_HEADER_LEN 4
/* amount of byte is contribution of replicaton protocol to a query
received from user when the query goes to binlog */
/*
Max number of possible extra bytes in a replication event compared to a
packet (i.e. a query) sent from client to master.
*/
#define MAX_LOG_EVENT_HEADER (LOG_EVENT_HEADER_LEN +
/* write_header */
\
QUERY_HEADER_LEN +
/* write_data */
\
NAME_LEN + 1)
...
...
sql/slave.cc
View file @
5a20c542
...
...
@@ -2618,8 +2618,13 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
SYSTEM_THREAD_SLAVE_SQL
:
SYSTEM_THREAD_SLAVE_IO
;
thd
->
host_or_ip
=
""
;
my_net_init
(
&
thd
->
net
,
0
);
/*
Adding MAX_LOG_EVENT_HEADER_LEN to the max_allowed_packet on all
slave threads, since a replication event can become this much larger
than the corresponding packet (query) sent from client to master.
*/
thd
->
variables
.
max_allowed_packet
=
global_system_variables
.
max_allowed_packet
+
MAX_LOG_EVENT_HEADER
;
/*
reentering secured through using global
*/
+
MAX_LOG_EVENT_HEADER
;
/*
note, incr over the global not session var
*/
thd
->
net
.
read_timeout
=
slave_net_timeout
;
thd
->
master_access
=
~
(
ulong
)
0
;
thd
->
priv_user
=
0
;
...
...
@@ -3156,7 +3161,11 @@ slave_begin:
mi
->
host
,
mi
->
port
,
IO_RPL_LOG_NAME
,
llstr
(
mi
->
master_log_pos
,
llbuff
));
/* post-net-init for slave */
/*
Adding MAX_LOG_EVENT_HEADER_LEN to the max_packet_size on the I/O
thread, since a replication event can become this much larger than
the corresponding packet (query) sent from client to master.
*/
mysql
->
net
.
max_packet_size
=
thd
->
net
.
max_packet_size
+=
MAX_LOG_EVENT_HEADER
;
}
else
...
...
sql/sql_repl.cc
View file @
5a20c542
...
...
@@ -420,7 +420,11 @@ impossible position";
goto
err
;
}
packet
->
set
(
"
\0
"
,
1
,
&
my_charset_bin
);
/* dump thread the whole header size of query_log_event */
/*
Adding MAX_LOG_EVENT_HEADER_LEN, since a binlog event can become
this larger than the corresponding packet (query) sent
from client to master.
*/
thd
->
variables
.
max_allowed_packet
+=
MAX_LOG_EVENT_HEADER
;
while
(
!
net
->
error
&&
net
->
vio
!=
0
&&
!
thd
->
killed
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment