summaryrefslogtreecommitdiff
path: root/storage/tokudb/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'storage/tokudb/scripts')
-rw-r--r--storage/tokudb/scripts/common.sh24
-rwxr-xr-xstorage/tokudb/scripts/make.mysql.bash16
-rwxr-xr-xstorage/tokudb/scripts/make.mysql.debug.env.bash12
3 files changed, 45 insertions, 7 deletions
diff --git a/storage/tokudb/scripts/common.sh b/storage/tokudb/scripts/common.sh
index fc676ceeceb..fe39b9feca7 100644
--- a/storage/tokudb/scripts/common.sh
+++ b/storage/tokudb/scripts/common.sh
@@ -131,11 +131,20 @@ function parse_mysqlbuild() {
tokudb_version=${BASH_REMATCH[6]}
target_system=${BASH_REMATCH[7]}
target_arch=${BASH_REMATCH[8]}
+
# verify targets
if [ $target_system != $system ] ; then exitcode=1; fi
if [ $target_arch != $arch ] ; then exitcode=1; fi
+ # split the version string into major.minor.patch
+ if [[ $mysql_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+.*) ]] ; then
+ mysql_version_major=${BASH_REMATCH[1]}
+ mysql_version_minor=${BASH_REMATCH[2]}
+ mysql_version_patch=${BASH_REMATCH[3]}
+ fi
+
local temp_tokudb_version=$tokudb_version
+
# decode enterprise
if [[ $temp_tokudb_version =~ (.*)-e$ ]] ; then
build_type=enterprise
@@ -143,6 +152,7 @@ function parse_mysqlbuild() {
else
build_type=community
fi
+
# decode debug
if [[ $temp_tokudb_version =~ (.*)-debug$ ]] ; then
build_debug=1
@@ -151,8 +161,9 @@ function parse_mysqlbuild() {
else
build_debug=0
fi
+
# set tag or HEAD
- if [[ $temp_tokudb_version =~ ^([0-9]+)\\.([0-9]+)\\.([0-9]+) ]] ; then
+ if [[ $temp_tokudb_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+) ]] ; then
git_tag=tokudb-$temp_tokudb_version
else
git_tag=HEAD
@@ -160,6 +171,8 @@ function parse_mysqlbuild() {
if [ -z $mysql_tree ] ; then mysql_tree=$mysql_distro-$mysql_version; fi
if [ -z $jemalloc_tree ] ; then jemalloc_tree=$jemalloc_version; fi
fi
+
+ # set repository
mysql_repo=$mysql_distro
if [[ $mysql_version =~ ^([0-9]+\.[0-9]+) ]] ; then mysql_repo=$mysql_distro-${BASH_REMATCH[1]}; else exitcode=1; fi
else
@@ -174,6 +187,15 @@ function parse_mysql() {
if [[ $mysql =~ ^(mysql|mariadb)-(.*)$ ]] ; then
mysql_distro=${BASH_REMATCH[1]}
mysql_version=${BASH_REMATCH[2]}
+
+ # split the version string into major.minor.patch
+ if [[ $mysql_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+.*) ]] ; then
+ mysql_version_major=${BASH_REMATCH[1]}
+ mysql_version_minor=${BASH_REMATCH[2]}
+ mysql_version_patch=${BASH_REMATCH[3]}
+ fi
+
+ # set repository
mysql_repo=$mysql_distro
if [[ $mysql_version =~ ^([0-9]+\.[0-9]+) ]] ; then mysql_repo=$mysql_distro-${BASH_REMATCH[1]}; else exitcode=1; fi
exitcode=0
diff --git a/storage/tokudb/scripts/make.mysql.bash b/storage/tokudb/scripts/make.mysql.bash
index 5654c1c7926..c1259797590 100755
--- a/storage/tokudb/scripts/make.mysql.bash
+++ b/storage/tokudb/scripts/make.mysql.bash
@@ -103,10 +103,23 @@ fi
cd $mysql_distro-$mysql_version
if [ $? != 0 ] ; then exit 1; fi
+# extract mysql version patch number only
+if [[ $mysql_version_patch =~ ^([0-9]+) ]] ; then p=${BASH_REMATCH[1]}; else p=$mysql_version_patch; fi
+
# install the backup source
-if [ ! -d toku_backup ] ; then
+tokudb_backup=
+if [ $mysql_version_major -eq 5 -a $mysql_version_minor -eq 5 -a $p -le 40 ] ; then
+ tokudb_backup=patch
github_download Tokutek/backup-$build_type $(git_tree $git_tag $backup_tree) backup-$build_type
cp -r backup-$build_type/backup toku_backup
+elif [ $build_type = enterprise ] ; then
+ tokudb_backup=plugin
+ github_download Tokutek/tokudb-backup-plugin $(git_tree $git_tag $backup_tree) tokudb-backup-plugin
+ mv tokudb-backup-plugin plugin
+ github_download Tokutek/backup-enterprise $(git_tree $git_tag $backup_tree) backup-enterprise
+ rm -rf plugin/tokudb-backup-plugin/backup
+ mv backup-enterprise/backup plugin/tokudb-backup-plugin
+ rm -rf backup-enterprise
fi
if [ ! -d tokudb-engine ] ; then
@@ -153,6 +166,7 @@ function generate_cmake_cmd () {
echo -n CC=$cc CXX=$cxx cmake \
-D BUILD_CONFIG=mysql_release \
+ -D MYSQL_MAINTAINER_MODE=OFF \
-D CMAKE_BUILD_TYPE=$cmake_build_type \
-D CMAKE_TOKUDB_REVISION=$ft_revision \
-D TOKUDB_VERSION=tokudb-${tokudb_version} \
diff --git a/storage/tokudb/scripts/make.mysql.debug.env.bash b/storage/tokudb/scripts/make.mysql.debug.env.bash
index b7c270cfbd7..3f8b4e6c219 100755
--- a/storage/tokudb/scripts/make.mysql.debug.env.bash
+++ b/storage/tokudb/scripts/make.mysql.debug.env.bash
@@ -55,14 +55,14 @@ function github_clone() {
git_tag=
mysql=mysql-5.5
-mysql_tree=mysql-5.5.35
+mysql_tree=mysql-5.5.41
jemalloc=jemalloc
jemalloc_tree=3.6.0
tokudbengine=tokudb-engine
tokudbengine_tree=master
ftindex=ft-index
ftindex_tree=master
-backup=backup-community
+backup=tokudb-backup-plugin
backup_tree=master
cc=gcc
cxx=g++
@@ -119,9 +119,9 @@ if [ $? != 0 ] ; then exit 1; fi
ln -s ../../$tokudbengine/storage/tokudb tokudb
if [ $? != 0 ] ; then exit 1; fi
popd
-pushd $mysql_tree
+pushd $mysql_tree/plugin
if [ $? != 0 ] ; then exit 1; fi
-ln -s ../$backup/backup toku_backup
+ln -s ../../$backup $backup
if [ $? != 0 ] ; then exit 1; fi
popd
pushd $mysql_tree/scripts
@@ -148,13 +148,15 @@ fi
pushd $build_dir
if [ $? != 0 ] ; then exit 1; fi
extra_cmake_options="-DCMAKE_LINK_DEPENDS_NO_SHARED=ON"
+extra_cmake_options+=" -DBUILD_TESTING=OFF"
+extra_cmake_options+=" -DMYSQL_MAINTAINER_MODE=OFF"
if (( $cmake_valgrind )) ; then
extra_cmake_options+=" -DUSE_VALGRIND=ON"
fi
if (( $cmake_debug_paranoid )) ; then
extra_cmake_options+=" -DTOKU_DEBUG_PARANOID=ON"
fi
-CC=$cc CXX=$cxx cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$install_dir -DBUILD_TESTING=OFF $extra_cmake_options ../$mysql_tree
+CC=$cc CXX=$cxx cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$install_dir $extra_cmake_options ../$mysql_tree
if [ $? != 0 ] ; then exit 1; fi
make -j4 install
if [ $? != 0 ] ; then exit 1; fi