-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
85 changed files
with
156 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[ -d __datadir ] || mkdir __datadir |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
echo version |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!t/lib/test-in-image.sh mariadb-server | ||
set -euo pipefail | ||
ma=$(environ ma9-10.10.2) | ||
|
||
$ma/download | ||
|
||
$ma/start | ||
$ma/status | ||
|
||
$ma/create_db tst | ||
$ma/sql_tst "create table t1 as select 'x1'" | ||
|
||
test x1 == $($ma/sql --batch -Ne "select * from t1" tst) | ||
test x1 == $($ma/sql_tst "select * from t1") | ||
|
||
$ma/sql_test x1 == "select * from t1" | ||
$ma/sql_test x2 != "select * from t1" | ||
|
||
rc=0 | ||
$ma/sql_test x2 == "select * from t1" || rc=$? | ||
test $rc -gt 0 | ||
|
||
$ma/stop | ||
|
||
rc=0 | ||
$ma/status || rc=$? | ||
|
||
test $rc -gt 0 | ||
echo PASS $0 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
set -e | ||
|
||
# $eatmydata mysql_install_db --no-defaults --data=__datadir --log-error=__workdir/.install | head -n 3 | ||
|
||
# example url ftp://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-__version/bintar-linux-x86_64/mariadb-__version-linux-x86_64.tar.gz | ||
# | ||
|
||
file=ftp://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-__version/bintar-linux-systemd-x86_64/mariadb-__version-linux-systemd-x86_64.tar.gz | ||
|
||
file1=http://mirrors.dotsrc.org/mariadb/mariadb-__version/bintar-linux-systemd-x86_64/mariadb-__version-linux-systemd-x86_64.tar.gz | ||
|
||
mkdir -p __cachedir/ma-version/__version | ||
|
||
( | ||
cd __cachedir/ma-version/__version | ||
|
||
function cleanup { | ||
[ -z "$wgetpid" ] || kill "$wgetpid" 2>/dev/null | ||
} | ||
|
||
trap cleanup INT TERM | ||
|
||
if [ ! -f "$(basename $file)" ] ; then | ||
echo downloading "$file" | ||
( wget -q -np -nc "$file" || wget -q -np -nc "$file1" )& | ||
wgetpid=$! | ||
while kill -0 $wgetpid 2>/dev/null ; do | ||
sleep 10 | ||
echo -n . | ||
done | ||
res=0 | ||
wait $wgetpid || res=$? | ||
wgetpid="" | ||
if [ "$res" -ne 0 ] ; then | ||
>&2 echo "failed to download '$file1' ($res)" | ||
exit $res | ||
fi | ||
fi | ||
|
||
if [ -f "$(basename $file)" ] ; then | ||
if [ ! -x bin/mysqld ] ; then | ||
tar -zxf "$(basename $file)" ${ERN_M_TAR_EXTRA_FLAGS} --strip 1 | ||
fi | ||
fi | ||
) | ||
: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set -e | ||
[ -d __datadir ] || mkdir __datadir | ||
|
||
eatmydata=$(which eatmydata 2>/dev/null) || : | ||
|
||
$eatmydata __bindir/../scripts/mysql_install_db --no-defaults --data=__datadir --log-error=__workdir/.install | head -n 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
if [[ $1 == -* ]] ; then | ||
__bindir/mysql --batch --socket=__workdir/.sock "$@" | ||
elif [ -z "$2" ]; then | ||
if [ "$(basename $0)" == sql ]; then | ||
if [ -f __workdir/default_db.cnf ] && [ "$#" == 1 ]; then | ||
__bindir/mysql "$(cat __workdir/default_db.cnf)" --batch --socket=__workdir/.sock -Ne "$*" | ||
else | ||
__bindir/mysql --batch --socket=__workdir/.sock -Ne "$*" | ||
fi | ||
else | ||
db=${0#*_} | ||
if [ "$#" == 0 ]; then | ||
__bindir/mysql "$db" --socket=__workdir/.sock | ||
else | ||
__bindir/mysql $db --socket=__workdir/.sock --batch -Ne "$@" | ||
fi | ||
fi | ||
else | ||
db=$1 | ||
shift | ||
__bindir/mysql "$db" --batch --socket=__workdir/.sock -Ne "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
set -e | ||
[ -d __workdir/dt ] || mkdir __workdir/dt | ||
[ -f __datadir/ibdata1 ] || __workdir/init_datadir | ||
|
||
__bindir/mariadbd --datadir=__datadir --user=$USER --socket=__workdir/.sock --skip-networking --log-error=__workdir/.cerr --pid-file=__workdir/.pid "$@" & | ||
|
||
sleep 1 | ||
__workdir/status >& /dev/null || sleep 1 | ||
__workdir/status >& /dev/null || sleep 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__bindir/mysqladmin --socket=__workdir/.sock status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__bindir/mysqladmin --socket=__workdir/.sock shutdown |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.