Skip to content

Commit

Permalink
Updated Travis and AppVeyor configs to use 10.4
Browse files Browse the repository at this point in the history
for tests. Fixed typo in one test preventing function from being created
with 10.4 for the test
  • Loading branch information
lawrinn committed Jun 25, 2019
1 parent d8dc34c commit 64bc771
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .travis/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ echo "**************************************************************************
echo "* searching for last complete build"
echo "**************************************************************************"

wget -q -o /dev/null index.html http://hasky.askmonty.org/archive/10.3/
wget -q -o /dev/null index.html http://hasky.askmonty.org/archive/10.4/
grep -o ">build-[0-9]*" index.html | grep -o "[0-9]*" | tac | while read -r line ; do

curl -s --head http://hasky.askmonty.org/archive/10.3/build-$line/kvm-deb-jessie-amd64/md5sums.txt | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null
curl -s --head http://hasky.askmonty.org/archive/10.4/build-$line/kvm-deb-bionic-amd64/md5sums.txt | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null
if [ $? = "0" ]; then
echo "**************************************************************************"
echo "* Processing $line"
echo "**************************************************************************"
wget -q -o /dev/null -O $line.html http://hasky.askmonty.org/archive/10.3/build-$line/kvm-deb-jessie-amd64/debs/binary/
wget -q -o /dev/null -O $line.html http://hasky.askmonty.org/archive/10.4/build-$line/kvm-deb-bionic-amd64/debs/binary/
grep -o ">[^\"]*\.deb" $line.html | grep -o "[^>]*\.deb" | while read -r file ; do
if [[ "$file" =~ ^mariadb-plugin.* ]] ;
then
echo "skipped file: $file"
else
echo "download file: $file"
wget -q -o /dev/null -O .travis/build/$file http://hasky.askmonty.org/archive/10.3/build-$line/kvm-deb-jessie-amd64/debs/binary/$file
wget -q -o /dev/null -O .travis/build/$file http://hasky.askmonty.org/archive/10.4/build-$line/kvm-deb-bionic-amd64/debs/binary/$file
fi
done

Expand Down
21 changes: 13 additions & 8 deletions .travis/build/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ _check_config() {
toRun=( "$@" --verbose --help --log-bin-index="$(mktemp -u)" )
if ! errors="$("${toRun[@]}" 2>&1 >/dev/null)"; then
cat >&2 <<-EOM
ERROR: mysqld failed while attempting to check config
command was: "${toRun[*]}"
$errors
EOM
exit 1
Expand All @@ -59,15 +57,17 @@ _check_config() {
# latter only show values present in config files, and not server defaults
_get_config() {
local conf="$1"; shift
"$@" --verbose --help --log-bin-index="$(mktemp -u)" 2>/dev/null | awk '$1 == "'"$conf"'" { print $2; exit }'
"$@" --verbose --help --log-bin-index="$(mktemp -u)" 2>/dev/null \
| awk '$1 == "'"$conf"'" && /^[^ \t]/ { sub(/^[^ \t]+[ \t]+/, ""); print; exit }'
# match "datadir /some/path with/spaces in/it here" but not "--xyz=abc\n datadir (xyz)"
}

# allow the container to be started with `--user`
if [ "$1" = 'mysqld' -a -z "$wantHelp" -a "$(id -u)" = '0' ]; then
_check_config "$@"
DATADIR="$(_get_config 'datadir' "$@")"
mkdir -p "$DATADIR"
chown -R mysql:mysql "$DATADIR"
find "$DATADIR" \! -user mysql -exec chown mysql '{}' +
exec gosu mysql "$BASH_SOURCE" "$@"
fi

Expand All @@ -88,7 +88,15 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
mkdir -p "$DATADIR"

echo 'Initializing database'
mysql_install_db --datadir="$DATADIR" --rpm
installArgs=( --datadir="$DATADIR" --rpm )
if { mysql_install_db --help || :; } | grep -q -- '--auth-root-authentication-method'; then
# beginning in 10.4.3, install_db uses "socket" which only allows system user root to connect, switch back to "normal" to allow mysql root without a password
# see https://github.com/MariaDB/server/commit/b9f3f06857ac6f9105dc65caae19782f09b47fb3
# (this flag doesn't exist in 10.0 and below)
installArgs+=( --auth-root-authentication-method=normal )
fi
# "Other options are passed to mysqld." (so we pass all "mysqld" arguments directly here)
mysql_install_db "${installArgs[@]}" "${@:2}"
echo 'Database initialized'

SOCKET="$(_get_config 'socket' "$@")"
Expand Down Expand Up @@ -135,7 +143,6 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
-- What's done in this file shouldn't be replicated
-- or products like mysql-fabric won't work
SET @@SESSION.SQL_LOG_BIN=0;
DELETE FROM mysql.user WHERE user NOT IN ('mysql.sys', 'mysqlxsys', 'root') OR host NOT IN ('localhost') ;
SET PASSWORD FOR 'root'@'localhost'=PASSWORD('${MYSQL_ROOT_PASSWORD}') ;
GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION ;
Expand All @@ -162,8 +169,6 @@ if [ "$1" = 'mysqld' -a -z "$wantHelp" ]; then
if [ "$MYSQL_DATABASE" ]; then
echo "GRANT ALL ON \`$MYSQL_DATABASE\`.* TO '$MYSQL_USER'@'%' ;" | "${mysql[@]}"
fi

echo 'FLUSH PRIVILEGES ;' | "${mysql[@]}"
fi

echo
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
DB: 10.3.14
DB: 10.4.6
CMAKE_PARAM_G: 'Visual Studio 14 2015 Win64'

- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
DB: 10.3.14
DB: 10.4.6
CMAKE_PARAM_G: 'Visual Studio 15 2017 Win64'

# scripts that are called at very beginning, before repo cloning
Expand Down
2 changes: 1 addition & 1 deletion test/catalog2.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ ODBC_TEST(t_sqlprocedurecolumns)
);

OK_SIMPLE_STMT(Hstmt1, "create function procedure_columns_test4_func(re_paramF int) returns varchar(32) deterministic "\
"begin return CONCAT('abc', paramF); end;"
"begin return CONCAT('abc', re_paramF); end;"
);

OK_SIMPLE_STMT(Hstmt1, "create function procedure_columns_test4_func_noparam() returns varchar(32) deterministic "\
Expand Down

0 comments on commit 64bc771

Please sign in to comment.