1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

merge ft-index and ft-engine as of 7.1.5

This commit is contained in:
Sergei Golubchik
2014-03-18 09:02:57 +01:00
528 changed files with 128632 additions and 120785 deletions

View File

@@ -17,10 +17,15 @@ function usage() {
}
function github_clone() {
local repo=$1; local tree=$2
local repo=
if [ $# -gt 0 ] ; then repo=$1; shift; else test 0 = 1; return; fi
local tree=
if [ $# -gt 0 ] ; then tree=$1; shift; else test 0 = 1; return; fi
local destdir=
if [ $# -gt 0 ] ; then destdir=$1; shift; fi
if [[ -z "$local_cache_dir" ]] ; then
git clone git@github.com:Tokutek/$repo
if [ $? != 0 ] ; then exit 1; fi
git clone git@github.com:Tokutek/$repo $destdir
if [ $? != 0 ] ; then test 0 = 1; return; fi
else
if (( "$local_cache_update" )) ; then
pushd $local_cache_dir/$repo.git
@@ -28,13 +33,12 @@ function github_clone() {
git fetch --all -f -p -v -t
popd
fi
git clone --reference $local_cache_dir/$repo.git git@github.com:Tokutek/$repo
if [ $? != 0 ] ; then exit 1; fi
git clone --reference $local_cache_dir/$repo.git git@github.com:Tokutek/$repo $destdir
if [ $? != 0 ] ; then test 0 = 1; return; fi
fi
pushd $repo
if [ $? != 0 ] ; then exit 1; fi
if [ -z $git_tag ] ; then
if [ -z "$destdir" ] ; then pushd $repo; else pushd $destdir; fi
if [ -z "$git_tag" ] ; then
if ! git branch | grep "\<$tree\>" > /dev/null && git branch -a | grep "remotes/origin/$tree\>" > /dev/null; then
git checkout --track origin/$tree
else
@@ -43,7 +47,7 @@ function github_clone() {
else
git checkout $git_tag
fi
if [ $? != 0 ] ; then exit 1; fi
if [ $? != 0 ] ; then test 0 = 1; return; fi
popd
}
@@ -51,7 +55,7 @@ function github_clone() {
git_tag=
mysql=mysql
mysql_tree=5.5.30
mysql_tree=mysql-5.5.35
jemalloc=jemalloc
jemalloc_tree=3.3.1
ftengine=ft-engine
@@ -60,8 +64,8 @@ ftindex=ft-index
ftindex_tree=master
backup=backup-community
backup_tree=master
cc=gcc47
cxx=g++47
cc=gcc
cxx=g++
local_cache_dir=
local_cache_update=1
cmake_valgrind=
@@ -77,21 +81,21 @@ while [ $# -ne 0 ] ; do
done
# setup environment variables
install_dir=$PWD/$mysql-install
build_dir=$PWD/build
mkdir $build_dir
if [ $? != 0 ] ; then exit 1; fi
install_dir=$PWD/install
mkdir $install_dir
if [ $? != 0 ] ; then exit 1; fi
# checkout the fractal tree
github_clone $ftindex $ftindex_tree
github_clone $jemalloc $jemalloc_tree
pushd $ftindex/third_party
if [ $? != 0 ] ; then exit 1; fi
ln -s ../../$jemalloc $jemalloc
if [ $? != 0 ] ; then exit 1; fi
popd
# checkout mysql'
github_clone $mysql $mysql_tree
# checkout jemalloc
github_clone $jemalloc $jemalloc_tree
# checkout mysql
github_clone $mysql $mysql_tree $mysql_tree
# checkout the community backup
github_clone $backup $backup_tree
@@ -105,28 +109,38 @@ if [ $? != 0 ] ; then exit 1; fi
ln -s ../../../$ftindex ft-index
if [ $? != 0 ] ; then exit 1; fi
popd
pushd $mysql/storage
pushd $mysql_tree/storage
if [ $? != 0 ] ; then exit 1; fi
ln -s ../../$ftengine/storage/tokudb tokudb
if [ $? != 0 ] ; then exit 1; fi
popd
pushd $mysql
pushd $mysql_tree
if [ $? != 0 ] ; then exit 1; fi
ln -s ../$backup/backup toku_backup
if [ $? != 0 ] ; then exit 1; fi
popd
pushd $mysql/scripts
pushd $mysql_tree/scripts
if [ $? != 0 ] ; then exit 1; fi
ln ../../$ftengine/scripts/tokustat.py
if [ $? != 0 ] ; then exit 1; fi
ln ../../$ftengine/scripts/tokufilecheck.py
if [ $? != 0 ] ; then exit 1; fi
popd
if [[ $mysql =~ mariadb ]] || [[ $mysql_tree =~ mariadb ]] ; then
pushd $mysql_tree/extra
if [ $? != 0 ] ; then exit 1; fi
ln -s ../../$jemalloc $jemalloc
if [ $? != 0 ] ; then exit 1; fi
popd
else
pushd $ftindex/third_party
if [ $? != 0 ] ; then exit 1; fi
ln -s ../../$jemalloc $jemalloc
if [ $? != 0 ] ; then exit 1; fi
popd
fi
# build in the mysql directory
mkdir $mysql/build.debug
if [ $? != 0 ] ; then exit 1; fi
pushd $mysql/build.debug
pushd $build_dir
if [ $? != 0 ] ; then exit 1; fi
extra_cmake_options="-DCMAKE_LINK_DEPENDS_NO_SHARED=ON"
if (( $cmake_valgrind )) ; then
@@ -135,7 +149,7 @@ 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
CC=$cc CXX=$cxx cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$install_dir -DBUILD_TESTING=OFF $extra_cmake_options ../$mysql_tree
if [ $? != 0 ] ; then exit 1; fi
make -j4 install
if [ $? != 0 ] ; then exit 1; fi