summaryrefslogtreecommitdiff
path: root/include/mysql_com.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-14 10:04:07 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-14 10:04:07 +0200
commitf57ecb7786177e0af3b1e3ec94302720b2e0f967 (patch)
treefcbed357c5bcdb373830413086d4f58ff9ba2998 /include/mysql_com.h
parent9bfbe7fbce86eab5a8a5de7e401772f058872716 (diff)
parentd364e64ae28c5588ea0ad013738a8dfe18412292 (diff)
downloadmariadb-git-f57ecb7786177e0af3b1e3ec94302720b2e0f967.tar.gz
5.5 merge
Diffstat (limited to 'include/mysql_com.h')
-rw-r--r--include/mysql_com.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/mysql_com.h b/include/mysql_com.h
index e9a24fd767d..be1d727c15a 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -34,6 +34,24 @@
#define MYSQL50_TABLE_NAME_PREFIX_LENGTH (sizeof(MYSQL50_TABLE_NAME_PREFIX)-1)
#define SAFE_NAME_LEN (NAME_LEN + MYSQL50_TABLE_NAME_PREFIX_LENGTH)
+/*
+ MDEV-4088
+
+ MySQL (and MariaDB 5.x before the fix) was using the first character of the
+ server version string (as sent in the first handshake protocol packet) to
+ decide on the replication event formats. And for 10.x the first character
+ is "1", which the slave thought comes from some ancient 1.x version
+ (ignoring the fact that the first ever MySQL version was 3.x).
+
+ To support replication to these old clients, we fake the version in the
+ first handshake protocol packet to start from "5.5.5-" (for example,
+ it might be "5.5.5-10.0.1-MariaDB-debug-log".
+
+ On the client side we remove this fake version prefix to restore the
+ correct server version. The version "5.5.5" did not support
+ pluggable authentication, so any version starting from "5.5.5-" and
+ claiming to support pluggable auth, must be using this fake prefix.
+*/
#ifdef EMBEDDED_LIBRARY
#define RPL_VERSION_HACK ""
#else