Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0737fbee
Commit
0737fbee
authored
May 04, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build a debug mysql env
parent
416bfd5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
82 deletions
+80
-82
scripts/make.mysql.debug.env.bash
scripts/make.mysql.debug.env.bash
+80
-82
No files found.
scripts/make.mysql.debug.env.bash
View file @
0737fbee
#!/usr/bin/env bash
set
-e
function
usage
()
{
echo
"generate a script that builds a debug mysql from github repo's"
echo
"build a debug mysql in the current directory"
echo
"with default parameters it builds a debug
$mysql
-
$mysql_tree
"
echo
"--git_tag=
$git_tag
"
echo
"--mysql=
$mysql
--mysql_
branch=
$mysql_branch
"
echo
"--ftengine=
$ftengine
--ftengine_
branch=
$ftengine_branch
"
echo
"--ftindex=
$ftindex
--ftindex_
branch=
$ftindex_branch
"
echo
"--jemalloc=
$jemalloc
--jemalloc_
branch=
$jemalloc_branch
"
echo
"--backup=
$backup
--backup_
branch=
$backup_branch
"
echo
"--
install_dir=
$install_dir
"
echo
"--mysql=
$mysql
--mysql_
tree=
$mysql_tree
"
echo
"--ftengine=
$ftengine
--ftengine_
tree=
$ftengine_tree
"
echo
"--ftindex=
$ftindex
--ftindex_
tree=
$ftindex_tree
"
echo
"--jemalloc=
$jemalloc
--jemalloc_
tree=
$jemalloc_tree
"
echo
"--backup=
$backup
--backup_
tree=
$backup_tree
"
echo
"--
cc=
$cc
--cxx=
$cxx
"
}
function
github_clone
()
{
local
repo
=
$1
;
local
branch
=
$2
echo
git clone git@github.com:Tokutek/
$repo
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo
pushd
$repo
echo
'if [ $? != 0 ] ; then exit 1; fi'
local
repo
=
$1
;
local
tree
=
$2
git clone git@github.com:Tokutek/
$repo
if
[
$?
!=
0
]
;
then
exit
1
;
fi
pushd
$repo
if
[
$?
!=
0
]
;
then
exit
1
;
fi
if
[
-z
$git_tag
]
;
then
echo
git checkout
$branch
git checkout
$tree
else
echo
git checkout
$git_tag
git checkout
$git_tag
fi
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo
popd
if
[
$?
!=
0
]
;
then
exit
1
;
fi
popd
}
shopt
-s
compat31 2>/dev/null
git_tag
=
mysql
=
mysql
mysql_
branch
=
5.5.30
mysql_
tree
=
5.5.30
jemalloc
=
jemalloc
jemalloc_
branch
=
3.3.1
jemalloc_
tree
=
3.3.1
ftengine
=
ft-engine
ftengine_
branch
=
master
ftengine_
tree
=
master
ftindex
=
ft-index
ftindex_
branch
=
master
ftindex_
tree
=
master
backup
=
backup-community
backup_branch
=
master
install_dir
=
mysql
backup_tree
=
master
cc
=
gcc47
cxx
=
g++47
while
[
$#
-ne
0
]
;
do
arg
=
$1
;
shift
...
...
@@ -50,70 +54,64 @@ while [ $# -ne 0 ] ; do
fi
done
echo
'# setup environment variables'
echo
install_dir
=
\$
PWD/
$install_dir
echo mkdir
\$
install_dir-build
\$
install_dir
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo cd
\$
install_dir-build
echo
'# checkout the fractal tree'
github_clone
$ftindex
$ftindex_branch
github_clone
$jemalloc
$jemalloc_branch
echo pushd
$ftindex
/third_party
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo ln
-s
../../
$jemalloc
$jemalloc
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo popd
echo
'# checkout mysql'
github_clone
$mysql
$mysql_branch
# setup environment variables
install_dir
=
$PWD
/
$mysql
-install
mkdir
$install_dir
if
[
$?
!=
0
]
;
then
exit
1
;
fi
echo
'# checkout the community backup'
github_clone
$backup
$backup_branch
# 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
echo
'# checkout the tokudb handlerton
'
github_clone
$
ftengine
$ftengine_branch
# checkout mysql
'
github_clone
$
mysql
$mysql_tree
echo
'# setup links'
echo pushd
$ftengine
/storage/tokudb
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo ln
-s
../../../
$ftindex
ft-index
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo popd
echo pushd
$mysql
/storage
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo ln
-s
../../
$ftengine
/storage/tokudb tokudb
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo popd
echo pushd
$mysql
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo ln
-s
../
$backup
/backup toku_backup
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo popd
echo pushd
$mysql
/scripts
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo ln
../../
$ftengine
/scripts/tokustat.py
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo ln
../../
$ftengine
/scripts/tokufilecheck.py
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo popd
# checkout the community backup
github_clone
$backup
$backup_tree
echo
'# build in the mysql directory'
echo cd
$mysql
echo mkdir
build.debug
echo
'if [ $? != 0 ] ; then exit 1; fi'
echo cd
build.debug
echo
CC
=
gcc47
CXX
=
g++47 cmake ..
-DBUILD_CONFIG
=
mysql_release
-DCMAKE_BUILD_TYPE
=
Debug
-DCMAKE_INSTALL_PREFIX
=
\$
install_dir
-DBUILD_TESTING
=
OFF
echo
'if [ $? != 0 ] ; then exit 1; fi'
# checkout the tokudb handlerton
github_clone
$ftengine
$ftengine_tree
echo
'# install'
echo
make
-j4
install
echo
'if [ $? != 0 ] ; then exit 1; fi'
# setup links'
pushd
$ftengine
/storage/tokudb
if
[
$?
!=
0
]
;
then
exit
1
;
fi
ln
-s
../../../
$ftindex
ft-index
if
[
$?
!=
0
]
;
then
exit
1
;
fi
popd
pushd
$mysql
/storage
if
[
$?
!=
0
]
;
then
exit
1
;
fi
ln
-s
../../
$ftengine
/storage/tokudb tokudb
if
[
$?
!=
0
]
;
then
exit
1
;
fi
popd
pushd
$mysql
if
[
$?
!=
0
]
;
then
exit
1
;
fi
ln
-s
../
$backup
/backup toku_backup
if
[
$?
!=
0
]
;
then
exit
1
;
fi
popd
pushd
$mysql
/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
echo
'# create a var directory so mysql does not complain'
echo
'cd $install_dir'
echo
'if [ $? != 0 ] ; then exit 1; fi'
# build in the mysql directory
mkdir
$mysql
/build.debug
if
[
$?
!=
0
]
;
then
exit
1
;
fi
pushd
$mysql
/build.debug
if
[
$?
!=
0
]
;
then
exit
1
;
fi
CC
=
$cc
CXX
=
$cxx
cmake ..
-DBUILD_CONFIG
=
mysql_release
-DCMAKE_BUILD_TYPE
=
Debug
-DCMAKE_INSTALL_PREFIX
=
$install_dir
-DBUILD_TESTING
=
OFF
if
[
$?
!=
0
]
;
then
exit
1
;
fi
make
-j4
install
if
[
$?
!=
0
]
;
then
exit
1
;
fi
popd
echo
'# install the databases in msyql'
echo
scripts/mysql_install_db
--defaults-file
=
\$
HOME/my
.cnf
echo
'if [ $? != 0 ] ; then exit 1; fi'
pushd
$install_dir
scripts/mysql_install_db
--defaults-file
=
$HOME
/
$(
whoami
)
.cnf
popd
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment