summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index d6cdb252a85..5608e0dfc49 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -12067,7 +12067,13 @@ static bool send_server_handshake_packet(MPVIO_EXT *mpvio,
data_len= SCRAMBLE_LENGTH;
}
- end= strxnmov(end, SERVER_VERSION_LENGTH, RPL_VERSION_HACK, server_version, NullS) + 1;
+ /* When server version is specified in config file, don't include
+ the replication hack prefix. */
+ if (using_custom_server_version)
+ end= strnmov(end, server_version, SERVER_VERSION_LENGTH) + 1;
+ else
+ end= strxnmov(end, SERVER_VERSION_LENGTH, RPL_VERSION_HACK, server_version, NullS) + 1;
+
int4store((uchar*) end, mpvio->auth_info.thd->thread_id);
end+= 4;