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
17f6d6a3
Commit
17f6d6a3
authored
Jan 15, 2015
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DB-792 build tokudb backup plugin
parent
7629f479
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
3 deletions
+45
-3
scripts/common.sh
scripts/common.sh
+22
-0
scripts/make.mysql.bash
scripts/make.mysql.bash
+19
-1
scripts/make.mysql.debug.env.bash
scripts/make.mysql.debug.env.bash
+4
-2
No files found.
scripts/common.sh
View file @
17f6d6a3
...
...
@@ -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,6 +161,7 @@ function parse_mysqlbuild() {
else
build_debug
=
0
fi
# set tag or HEAD
if
[[
$temp_tokudb_version
=
~ ^
([
0-9]+
)
\\
.
([
0-9]+
)
\\
.
([
0-9]+
)
]]
;
then
git_tag
=
tokudb-
$temp_tokudb_version
...
...
@@ -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
...
...
scripts/make.mysql.bash
View file @
17f6d6a3
...
...
@@ -103,10 +103,22 @@ 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
mv
backup-enterprise/backup plugin/tokudb-backup-plugin
rm
-rf
backup-enterprise
fi
if
[
!
-d
tokudb-engine
]
;
then
...
...
@@ -123,6 +135,11 @@ if [ ! -d tokudb-engine ] ; then
# install the tokudb scripts
cp
-r
tokudb-engine/scripts/
*
scripts/
# link hot backup into mysqld
if
[
"
$tokudb_backup
"
!=
"patch"
]
;
then
sed
-i
-e
's/${JEMALLOC_LIBRARY}/${HOT_BACKUP_LIBS} ${JEMALLOC_LIBRARY}/'
sql/CMakeLists.txt
fi
fi
if
[
!
-d
storage/tokudb/ft-index
]
;
then
...
...
@@ -153,6 +170,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
}
\
...
...
scripts/make.mysql.debug.env.bash
View file @
17f6d6a3
...
...
@@ -55,7 +55,7 @@ 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
...
...
@@ -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
...
...
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