Commit f84d6308 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

add tokudb_version string derived from the build branch name. closes #597

git-svn-id: file:///svn/mysql/tokudb-engine/src@3070 c7de825b-a66e-492c-adef-691d508d4ae1
parent 15f55a7d
......@@ -2,6 +2,7 @@
MYSQL_SRC = $(HOME)/mysql-5.1.23-rc
MYSQL_LIBDIR = $(HOME)/mysql-5.1.23-rc-build/lib/mysql
TOKUDB = /usr/local/tokudb-4.4
TOKUDB_VERSION = "Tokudb"
DEBUG = 1
# sources to target
......@@ -26,6 +27,7 @@ MYSQL_CXXFLAGS = -fno-implicit-templates -fno-exceptions -fno-rtti
CPPFLAGS = -I. -I$(MYSQL_SRC)/sql -I$(MYSQL_SRC)/include -I$(MYSQL_SRC)/regex -I$(TOKUDB)/include
CPPFLAGS += $(MYSQL_FLAGS)
CPPFLAGS += -DTOKUDB_VERSION=\"$(TOKUDB_VERSION)\"
CXXFLAGS = -Wall -Werror -g $(OPTFLAGS) $(GCOV_FLAGS) $(MYSQL_CXXFLAGS)
CXXFLAGS += -fPIC
LDFLAGS = -fPIC -shared -Wl,-soname -Wl,libtokudb_engine.so
......
......@@ -35,6 +35,7 @@ if [ ! -d $libdir ] ; then
fi
if [ $error -ne 0 ] ; then exit 1 ; fi
tokudb_version=`basename $tokudb`
# escape the path names so that the sed works
# note: i was not smart enough to get this right without a sequence of experiments
tokudb=`echo $tokudb | sed -e s/\\\//\\\\\\\\\\\//g`
......@@ -46,4 +47,5 @@ libdir=`echo $libdir | sed -e s/\\\//\\\\\\\\\\\//g`
sed -e "s/^TOKUDB =\(.*\)$/TOKUDB = $tokudb/" \
-e "s/^MYSQL_SRC = \(.*\)/MYSQL_SRC = $mysql/" \
-e "s/^MYSQL_LIBDIR = \(.*\)/MYSQL_LIBDIR = $libdir/" <Makefile.tokutek >Makefile
-e "s/^MYSQL_LIBDIR = \(.*\)/MYSQL_LIBDIR = $libdir/" \
-e "s/^TOKUDB_VERSION =\(.*\)/TOKUDB_VERSION = \"$tokudb_version\"/" <Makefile.tokutek >Makefile
......@@ -95,6 +95,7 @@ static char *tokudb_log_dir;
static ulong tokudb_trans_retry = 1;
static ulong tokudb_max_lock;
static ulong tokudb_debug;
static char* tokudb_version = TOKUDB_VERSION;
static DB_ENV *db_env;
......@@ -2527,6 +2528,8 @@ static MYSQL_SYSVAR_STR(log_dir, tokudb_log_dir, PLUGIN_VAR_READONLY, "TokuDB Lo
static MYSQL_SYSVAR_STR(data_dir, tokudb_data_dir, PLUGIN_VAR_READONLY, "TokuDB Data Directory", NULL, NULL, NULL);
static MYSQL_SYSVAR_STR(version, tokudb_version, PLUGIN_VAR_READONLY, "TokuDB Version", NULL, NULL, NULL);
#if 0
static MYSQL_SYSVAR_ULONG(cache_parts, tokudb_cache_parts, PLUGIN_VAR_READONLY, "Sets TokuDB set_cache_parts", NULL, NULL, 0, 0, ~0L, 0);
......@@ -2564,6 +2567,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
MYSQL_SYSVAR(log_dir),
MYSQL_SYSVAR(debug),
MYSQL_SYSVAR(commit_sync),
MYSQL_SYSVAR(version),
#if 0
MYSQL_SYSVAR(cache_parts),
MYSQL_SYSVAR(env_flags),
......
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