summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-11 19:30:59 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-11 19:30:59 +0200
commit61ed0ebe7388d8302f2de7144de41da32bf085ba (patch)
tree8b47861aeeef1db8fcbf8d0a558043aab93187a8 /include
parent48be80cd95c9121d2730ebcd1df2a1a37fe73f3d (diff)
parent7b55b59b5792d87dedd946487769bc2b1dc36833 (diff)
downloadmariadb-git-61ed0ebe7388d8302f2de7144de41da32bf085ba.tar.gz
5.1 merge
Diffstat (limited to 'include')
-rw-r--r--include/my_global.h3
-rw-r--r--include/mysql_com.h25
2 files changed, 27 insertions, 1 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 105a346a69f..9d982373545 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -496,7 +496,8 @@ C_MODE_END
#define compile_time_assert(X) \
do \
{ \
- typedef char compile_time_assert[(X) ? 1 : -1]; \
+ typedef char compile_time_assert[(X) ? 1 : -1] \
+ __attribute__((unused)); \
} while(0)
#endif
diff --git a/include/mysql_com.h b/include/mysql_com.h
index d7441036a98..ec38d516172 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -31,6 +31,31 @@
#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
+/* this version must be the one that *does not* support pluggable auth */
+#define RPL_VERSION_HACK "5.5.5-"
+#endif
+
#define SERVER_VERSION_LENGTH 60
#define SQLSTATE_LENGTH 5
#define LIST_PROCESS_HOST_LEN 64