Commit 715cf980 authored by Vasil Dimov's avatar Vasil Dimov

Fix pointers to documentation

Do not print pointer to the 5.1 documentation from within MySQL 5.5.

Instead of hardcoding the MySQL version, use the MAJOR_VERSION and
MINOR_VERSION CMake variables defined at top-level.
parent ec3224b1
...@@ -19,6 +19,10 @@ INCLUDE(CheckFunctionExists) ...@@ -19,6 +19,10 @@ INCLUDE(CheckFunctionExists)
INCLUDE(CheckCSourceCompiles) INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckCSourceRuns) INCLUDE(CheckCSourceRuns)
# Make MySQL version available to InnoDB
ADD_DEFINITIONS("-DMYSQL_MAJOR_VERSION=${MAJOR_VERSION}")
ADD_DEFINITIONS("-DMYSQL_MINOR_VERSION=${MINOR_VERSION}")
# OS tests # OS tests
IF(UNIX) IF(UNIX)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
......
...@@ -44,6 +44,11 @@ Created 1/20/1994 Heikki Tuuri ...@@ -44,6 +44,11 @@ Created 1/20/1994 Heikki Tuuri
#include "hb_univ.i" #include "hb_univ.i"
#endif /* UNIV_HOTBACKUP */ #endif /* UNIV_HOTBACKUP */
/* aux macros to convert M into "123" (string) if M is defined like
#define M 123 */
#define _IB_TO_STR(s) #s
#define IB_TO_STR(s) _IB_TO_STR(s)
#define INNODB_VERSION_MAJOR 1 #define INNODB_VERSION_MAJOR 1
#define INNODB_VERSION_MINOR 1 #define INNODB_VERSION_MINOR 1
#define INNODB_VERSION_BUGFIX 4 #define INNODB_VERSION_BUGFIX 4
...@@ -57,16 +62,14 @@ component, i.e. we show M.N.P as M.N */ ...@@ -57,16 +62,14 @@ component, i.e. we show M.N.P as M.N */
#define INNODB_VERSION_SHORT \ #define INNODB_VERSION_SHORT \
(INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR) (INNODB_VERSION_MAJOR << 8 | INNODB_VERSION_MINOR)
/* auxiliary macros to help creating the version as string */
#define __INNODB_VERSION(a, b, c) (#a "." #b "." #c)
#define _INNODB_VERSION(a, b, c) __INNODB_VERSION(a, b, c)
#define INNODB_VERSION_STR \ #define INNODB_VERSION_STR \
_INNODB_VERSION(INNODB_VERSION_MAJOR, \ IB_TO_STR(INNODB_VERSION_MAJOR) "." \
INNODB_VERSION_MINOR, \ IB_TO_STR(INNODB_VERSION_MINOR) "." \
INNODB_VERSION_BUGFIX) IB_TO_STR(INNODB_VERSION_BUGFIX)
#define REFMAN "http://dev.mysql.com/doc/refman/5.1/en/" #define REFMAN "http://dev.mysql.com/doc/refman/" \
IB_TO_STR(MYSQL_MAJOR_VERSION) "." \
IB_TO_STR(MYSQL_MINOR_VERSION) "/en/"
#ifdef MYSQL_DYNAMIC_PLUGIN #ifdef MYSQL_DYNAMIC_PLUGIN
/* In the dynamic plugin, redefine some externally visible symbols /* In the dynamic plugin, redefine some externally visible symbols
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment