Commit f93fa8df authored by Rich Prohaska's avatar Rich Prohaska

DB-742 use consistent version macros

parent aed868b4
...@@ -24,12 +24,12 @@ IF(NOT DEFINED TOKUDB_VERSION) ...@@ -24,12 +24,12 @@ IF(NOT DEFINED TOKUDB_VERSION)
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(DEFINED TOKUDB_VERSION) IF(DEFINED TOKUDB_VERSION)
ADD_DEFINITIONS("-DTOKUDB_VERSION=\"${TOKUDB_VERSION}\"") ADD_DEFINITIONS("-DTOKUDB_VERSION=${TOKUDB_VERSION}")
IF (${TOKUDB_VERSION} MATCHES "^tokudb-([0-9]+)\\.([0-9]+)\\.([0-9]+.*)") IF (${TOKUDB_VERSION} MATCHES "^tokudb-([0-9]+)\\.([0-9]+)\\.([0-9]+.*)")
ADD_DEFINITIONS("-DTOKUDB_VERSION_MAJOR=${CMAKE_MATCH_1}") ADD_DEFINITIONS("-DTOKUDB_VERSION_MAJOR=${CMAKE_MATCH_1}")
ADD_DEFINITIONS("-DTOKUDB_VERSION_MINOR=${CMAKE_MATCH_2}") ADD_DEFINITIONS("-DTOKUDB_VERSION_MINOR=${CMAKE_MATCH_2}")
ADD_DEFINITIONS("-DTOKUDB_VERSION_PATCH=\"${CMAKE_MATCH_3}\"") ADD_DEFINITIONS("-DTOKUDB_VERSION_PATCH=${CMAKE_MATCH_3}")
ENDIF() ENDIF()
ENDIF() ENDIF()
IF(DEFINED TOKUDB_NOPATCH_CONFIG) IF(DEFINED TOKUDB_NOPATCH_CONFIG)
......
...@@ -264,11 +264,15 @@ static uint32_t tokudb_checkpointing_period; ...@@ -264,11 +264,15 @@ static uint32_t tokudb_checkpointing_period;
static uint32_t tokudb_fsync_log_period; static uint32_t tokudb_fsync_log_period;
uint32_t tokudb_write_status_frequency; uint32_t tokudb_write_status_frequency;
uint32_t tokudb_read_status_frequency; uint32_t tokudb_read_status_frequency;
#ifdef TOKUDB_VERSION #ifdef TOKUDB_VERSION
char *tokudb_version = (char*) TOKUDB_VERSION; #define tokudb_stringify_2(x) #x
#define tokudb_stringify(x) tokudb_stringify_2(x)
#define TOKUDB_VERSION_STR tokudb_stringify(TOKUDB_VERSION)
#else #else
char *tokudb_version; #define TOKUDB_VERSION_STR NULL
#endif #endif
char *tokudb_version = (char *) TOKUDB_VERSION_STR;
static int tokudb_fs_reserve_percent; // file system reserve as a percentage of total disk space static int tokudb_fs_reserve_percent; // file system reserve as a percentage of total disk space
#if defined(_WIN32) #if defined(_WIN32)
...@@ -2500,12 +2504,6 @@ mysql_declare_plugin_end; ...@@ -2500,12 +2504,6 @@ mysql_declare_plugin_end;
#ifdef MARIA_PLUGIN_INTERFACE_VERSION #ifdef MARIA_PLUGIN_INTERFACE_VERSION
#ifdef TOKUDB_VERSION
#define TOKUDB_PLUGIN_VERSION_STR TOKUDB_VERSION
#else
#define TOKUDB_PLUGIN_VERSION_STR NULL
#endif
maria_declare_plugin(tokudb) maria_declare_plugin(tokudb)
{ {
MYSQL_STORAGE_ENGINE_PLUGIN, MYSQL_STORAGE_ENGINE_PLUGIN,
...@@ -2519,7 +2517,7 @@ maria_declare_plugin(tokudb) ...@@ -2519,7 +2517,7 @@ maria_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, TOKUDB_PLUGIN_VERSION,
toku_global_status_variables_export, /* status variables */ toku_global_status_variables_export, /* status variables */
tokudb_system_variables, /* system variables */ tokudb_system_variables, /* system variables */
TOKUDB_PLUGIN_VERSION_STR, /* string version */ tokudb_version,
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}, },
{ {
...@@ -2534,7 +2532,7 @@ maria_declare_plugin(tokudb) ...@@ -2534,7 +2532,7 @@ maria_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, TOKUDB_PLUGIN_VERSION,
NULL, /* status variables */ NULL, /* status variables */
NULL, /* system variables */ NULL, /* system variables */
TOKUDB_PLUGIN_VERSION_STR, /* string version */ tokudb_version,
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}, },
{ {
...@@ -2549,7 +2547,7 @@ maria_declare_plugin(tokudb) ...@@ -2549,7 +2547,7 @@ maria_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, TOKUDB_PLUGIN_VERSION,
NULL, /* status variables */ NULL, /* status variables */
NULL, /* system variables */ NULL, /* system variables */
TOKUDB_PLUGIN_VERSION_STR, /* string version */ tokudb_version,
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}, },
{ {
...@@ -2564,7 +2562,7 @@ maria_declare_plugin(tokudb) ...@@ -2564,7 +2562,7 @@ maria_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, TOKUDB_PLUGIN_VERSION,
NULL, /* status variables */ NULL, /* status variables */
NULL, /* system variables */ NULL, /* system variables */
TOKUDB_PLUGIN_VERSION_STR, /* string version */ tokudb_version,
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}, },
{ {
...@@ -2579,7 +2577,7 @@ maria_declare_plugin(tokudb) ...@@ -2579,7 +2577,7 @@ maria_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, TOKUDB_PLUGIN_VERSION,
NULL, /* status variables */ NULL, /* status variables */
NULL, /* system variables */ NULL, /* system variables */
TOKUDB_PLUGIN_VERSION_STR, /* string version */ tokudb_version,
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}, },
{ {
...@@ -2594,7 +2592,7 @@ maria_declare_plugin(tokudb) ...@@ -2594,7 +2592,7 @@ maria_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, TOKUDB_PLUGIN_VERSION,
NULL, /* status variables */ NULL, /* status variables */
NULL, /* system variables */ NULL, /* system variables */
TOKUDB_PLUGIN_VERSION_STR, /* string version */ tokudb_version,
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
}, },
{ {
...@@ -2609,7 +2607,7 @@ maria_declare_plugin(tokudb) ...@@ -2609,7 +2607,7 @@ maria_declare_plugin(tokudb)
TOKUDB_PLUGIN_VERSION, TOKUDB_PLUGIN_VERSION,
NULL, /* status variables */ NULL, /* status variables */
NULL, /* system variables */ NULL, /* system variables */
TOKUDB_PLUGIN_VERSION_STR, /* string version */ tokudb_version,
MariaDB_PLUGIN_MATURITY_STABLE /* maturity */ MariaDB_PLUGIN_MATURITY_STABLE /* maturity */
} }
maria_declare_plugin_end; maria_declare_plugin_end;
......
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