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
4d04076c
Commit
4d04076c
authored
Feb 12, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Tokutek/ft-engine
parents
bc07ccf8
59fc549e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
scripts/setup.mysql.bash
scripts/setup.mysql.bash
+11
-8
No files found.
scripts/setup.mysql.bash
View file @
4d04076c
...
@@ -13,6 +13,7 @@ s3bucket=tokutek-mysql-build
...
@@ -13,6 +13,7 @@ s3bucket=tokutek-mysql-build
sleeptime
=
60
sleeptime
=
60
builtins
=
"mysqlbuild shutdown install startup s3bucket sleeptime"
builtins
=
"mysqlbuild shutdown install startup s3bucket sleeptime"
mysqld_args
=
"--user=mysql --core-file --core-file-size=unlimited"
mysqld_args
=
"--user=mysql --core-file --core-file-size=unlimited"
sudo
=
/usr/bin/sudo
defaultsfile
=
""
defaultsfile
=
""
if
[
-f
/etc/
$(
whoami
)
.my.cnf
]
;
then
if
[
-f
/etc/
$(
whoami
)
.my.cnf
]
;
then
defaultsfile
=
/etc/
$(
whoami
)
.my.cnf
defaultsfile
=
/etc/
$(
whoami
)
.my.cnf
...
@@ -92,13 +93,13 @@ fi
...
@@ -92,13 +93,13 @@ fi
# set ldpath
# set ldpath
ldpath
=
""
ldpath
=
""
if
[
-d
/usr/local/gcc-4.7/lib64
]
;
then
if
[
-d
/usr/local/gcc-4.7/lib64
]
;
then
ldpath
=
"export LD_LIBRARY_PATH=/usr/local/gcc-4.7/lib64:
\$
LD_LIBRARY_PATH;"
echo
skip
ldpath
=
"export LD_LIBRARY_PATH=/usr/local/gcc-4.7/lib64:
\$
LD_LIBRARY_PATH;"
fi
fi
# shutdown mysql
# shutdown mysql
if
[
$shutdown
-ne
0
]
;
then
if
[
$shutdown
-ne
0
]
;
then
if
[
-x
/etc/init.d/mysql
]
;
then
if
[
-x
/etc/init.d/mysql
]
;
then
sudo
setsid /etc/init.d/mysql stop
$
sudo
setsid /etc/init.d/mysql stop
else
else
/usr/local/mysql/bin/mysqladmin shutdown
/usr/local/mysql/bin/mysqladmin shutdown
fi
fi
...
@@ -123,7 +124,7 @@ fi
...
@@ -123,7 +124,7 @@ fi
if
[
!
-d
$mysqlbuild
]
||
[
$install
-ne
0
]
;
then
if
[
!
-d
$mysqlbuild
]
||
[
$install
-ne
0
]
;
then
rm
mysql
rm
mysql
if
[
-d
$mysqlbuild
]
;
then
sudo rm
-rf
$mysqlbuild
;
fi
if
[
-d
$mysqlbuild
]
;
then
$
sudo
rm
-rf
$mysqlbuild
;
fi
tar
-x
$compression
-f
$basedir
/
$mysqltarball
tar
-x
$compression
-f
$basedir
/
$mysqltarball
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
...
@@ -137,8 +138,8 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
...
@@ -137,8 +138,8 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
installdb
=
$mysqlbuild
/scripts/mysql_install_db
installdb
=
$mysqlbuild
/scripts/mysql_install_db
fi
fi
sudo chown
-R
mysql
$mysqlbuild
/data
$
sudo
chown
-R
mysql
$mysqlbuild
/data
sudo chgrp
-R
mysql
$mysqlbuild
/data
$
sudo
chgrp
-R
mysql
$mysqlbuild
/data
# 5.6 debug build needs this
# 5.6 debug build needs this
if
[
!
-f
$mysqlbuild
/bin/mysqld
]
&&
[
-f
$mysqlbuild
/bin/mysqld-debug
]
;
then
if
[
!
-f
$mysqlbuild
/bin/mysqld
]
&&
[
-f
$mysqlbuild
/bin/mysqld-debug
]
;
then
...
@@ -150,12 +151,14 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
...
@@ -150,12 +151,14 @@ if [ ! -d $mysqlbuild ] || [ $install -ne 0 ] ; then
else
else
default_arg
=
"--defaults-file=
$defaultsfile
"
default_arg
=
"--defaults-file=
$defaultsfile
"
fi
fi
sudo
bash
-c
"
$ldpath
$installdb
$default_arg
--user=mysql --basedir=
$PWD
/
$mysqlbuild
--datadir=
$PWD
/
$mysqlbuild
/data"
$
sudo
bash
-c
"
$ldpath
$installdb
$default_arg
--user=mysql --basedir=
$PWD
/
$mysqlbuild
--datadir=
$PWD
/
$mysqlbuild
/data"
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
else
else
# create link
# create link
rm
/usr/local/mysql
ln
-s
$mysqldir
/usr/local/mysql
ln
-s
$mysqldir
/usr/local/mysql
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
rm
/usr/local/
$mysqlbuild
ln
-s
$mysqldir
/usr/local/
$mysqlbuild
ln
-s
$mysqldir
/usr/local/
$mysqlbuild
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
if
[
$?
-ne
0
]
;
then
exit
1
;
fi
fi
fi
...
@@ -170,14 +173,14 @@ if [ $startup -ne 0 ] ; then
...
@@ -170,14 +173,14 @@ if [ $startup -ne 0 ] ; then
echo ulimit
-n
10240 exitcode
$exitcode
echo ulimit
-n
10240 exitcode
$exitcode
if
[
-x
/etc/init.d/mysql
]
;
then
if
[
-x
/etc/init.d/mysql
]
;
then
sudo
setsid /etc/init.d/mysql start
$
sudo
setsid /etc/init.d/mysql start
else
else
if
[
-z
"
$defaultsfile
"
]
;
then
if
[
-z
"
$defaultsfile
"
]
;
then
default_arg
=
""
default_arg
=
""
else
else
default_arg
=
"--defaults-file=
$defaultsfile
"
default_arg
=
"--defaults-file=
$defaultsfile
"
fi
fi
sudo
-b
bash
-c
"
$ldpath
/usr/local/mysql/bin/mysqld_safe
$default_arg
$mysqld_args
"
>
/dev/null 2>&1 &
$
sudo
-b
bash
-c
"
$ldpath
/usr/local/mysql/bin/mysqld_safe
$default_arg
$mysqld_args
"
>
/dev/null 2>&1 &
fi
fi
sleep
$sleeptime
sleep
$sleeptime
...
...
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