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.
This commit is contained in:
Vasil Dimov 2010-11-29 14:50:26 +02:00
parent 0bd12718dd
commit 24d1b3ef88
2 changed files with 15 additions and 8 deletions

View file

@ -19,6 +19,10 @@ INCLUDE(CheckFunctionExists)
INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckCSourceRuns)
# Make MySQL version available to InnoDB
ADD_DEFINITIONS("-DMYSQL_MAJOR_VERSION=${MAJOR_VERSION}")
ADD_DEFINITIONS("-DMYSQL_MINOR_VERSION=${MINOR_VERSION}")
# OS tests
IF(UNIX)
IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")

View file

@ -44,6 +44,11 @@ Created 1/20/1994 Heikki Tuuri
#include "hb_univ.i"
#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_MINOR 1
#define INNODB_VERSION_BUGFIX 4
@ -57,16 +62,14 @@ component, i.e. we show M.N.P as M.N */
#define INNODB_VERSION_SHORT \
(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 \
_INNODB_VERSION(INNODB_VERSION_MAJOR, \
INNODB_VERSION_MINOR, \
INNODB_VERSION_BUGFIX)
IB_TO_STR(INNODB_VERSION_MAJOR) "." \
IB_TO_STR(INNODB_VERSION_MINOR) "." \
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
/* In the dynamic plugin, redefine some externally visible symbols