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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9f5e2eee
Commit
9f5e2eee
authored
May 04, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build a debug mysql env
parent
e6b903de
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 @
9f5e2eee
#!/usr/bin/env bash
#!/usr/bin/env bash
set
-e
function
usage
()
{
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
"--git_tag=
$git_tag
"
echo
"--mysql=
$mysql
--mysql_
branch=
$mysql_branch
"
echo
"--mysql=
$mysql
--mysql_
tree=
$mysql_tree
"
echo
"--ftengine=
$ftengine
--ftengine_
branch=
$ftengine_branch
"
echo
"--ftengine=
$ftengine
--ftengine_
tree=
$ftengine_tree
"
echo
"--ftindex=
$ftindex
--ftindex_
branch=
$ftindex_branch
"
echo
"--ftindex=
$ftindex
--ftindex_
tree=
$ftindex_tree
"
echo
"--jemalloc=
$jemalloc
--jemalloc_
branch=
$jemalloc_branch
"
echo
"--jemalloc=
$jemalloc
--jemalloc_
tree=
$jemalloc_tree
"
echo
"--backup=
$backup
--backup_
branch=
$backup_branch
"
echo
"--backup=
$backup
--backup_
tree=
$backup_tree
"
echo
"--
install_dir=
$install_dir
"
echo
"--
cc=
$cc
--cxx=
$cxx
"
}
}
function
github_clone
()
{
function
github_clone
()
{
local
repo
=
$1
;
local
branch
=
$2
local
repo
=
$1
;
local
tree
=
$2
echo
git clone git@github.com:Tokutek/
$repo
git clone git@github.com:Tokutek/
$repo
echo
'if [ $? != 0 ] ; then exit 1; fi'
if
[
$?
!=
0
]
;
then
exit
1
;
fi
echo
pushd
$repo
pushd
$repo
echo
'if [ $? != 0 ] ; then exit 1; fi'
if
[
$?
!=
0
]
;
then
exit
1
;
fi
if
[
-z
$git_tag
]
;
then
if
[
-z
$git_tag
]
;
then
echo
git checkout
$branch
git checkout
$tree
else
else
echo
git checkout
$git_tag
git checkout
$git_tag
fi
fi
echo
'if [ $? != 0 ] ; then exit 1; fi'
if
[
$?
!=
0
]
;
then
exit
1
;
fi
echo
popd
popd
}
}
shopt
-s
compat31 2>/dev/null
shopt
-s
compat31 2>/dev/null
git_tag
=
git_tag
=
mysql
=
mysql
mysql
=
mysql
mysql_
branch
=
5.5.30
mysql_
tree
=
5.5.30
jemalloc
=
jemalloc
jemalloc
=
jemalloc
jemalloc_
branch
=
3.3.1
jemalloc_
tree
=
3.3.1
ftengine
=
ft-engine
ftengine
=
ft-engine
ftengine_
branch
=
master
ftengine_
tree
=
master
ftindex
=
ft-index
ftindex
=
ft-index
ftindex_
branch
=
master
ftindex_
tree
=
master
backup
=
backup-community
backup
=
backup-community
backup_branch
=
master
backup_tree
=
master
install_dir
=
mysql
cc
=
gcc47
cxx
=
g++47
while
[
$#
-ne
0
]
;
do
while
[
$#
-ne
0
]
;
do
arg
=
$1
;
shift
arg
=
$1
;
shift
...
@@ -50,70 +54,64 @@ while [ $# -ne 0 ] ; do
...
@@ -50,70 +54,64 @@ while [ $# -ne 0 ] ; do
fi
fi
done
done
echo
'# setup environment variables'
# setup environment variables
echo
install_dir
=
\$
PWD/
$install_dir
install_dir
=
$PWD
/
$mysql
-install
echo mkdir
\$
install_dir-build
\$
install_dir
mkdir
$install_dir
echo
'if [ $? != 0 ] ; then exit 1; fi'
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
echo
'# checkout the community backup'
# checkout the fractal tree
github_clone
$backup
$backup_branch
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
'
# checkout mysql
'
github_clone
$
ftengine
$ftengine_branch
github_clone
$
mysql
$mysql_tree
echo
'# setup links'
# checkout the community backup
echo pushd
$ftengine
/storage/tokudb
github_clone
$backup
$backup_tree
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
echo
'# build in the mysql directory'
# checkout the tokudb handlerton
echo cd
$mysql
github_clone
$ftengine
$ftengine_tree
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'
echo
'# install'
# setup links'
echo
make
-j4
install
pushd
$ftengine
/storage/tokudb
echo
'if [ $? != 0 ] ; then exit 1; fi'
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'
# build in the mysql directory
echo
'cd $install_dir'
mkdir
$mysql
/build.debug
echo
'if [ $? != 0 ] ; then exit 1; fi'
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'
pushd
$install_dir
echo
scripts/mysql_install_db
--defaults-file
=
\$
HOME/my
.cnf
scripts/mysql_install_db
--defaults-file
=
$HOME
/
$(
whoami
)
.cnf
echo
'if [ $? != 0 ] ; then exit 1; fi'
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