aboutsummaryrefslogtreecommitdiffstats
path: root/tests/create_test_db.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/create_test_db.sh')
-rwxr-xr-xtests/create_test_db.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/create_test_db.sh b/tests/create_test_db.sh
index b98f5e2a5..dc9122aa0 100755
--- a/tests/create_test_db.sh
+++ b/tests/create_test_db.sh
@@ -40,6 +40,7 @@ case $HZ_TEST_DB_TYPE in
mariadb | mysql )
db_type="mysql"
+ db_binary=$HZ_TEST_DB_TYPE
default_charset="utf8mb4"
root_user="root"
root_passwd="root"
@@ -90,11 +91,11 @@ else
echo -e "\n--------------"
echo "Client version:"
echo -e "--------------\n"
- mysql --version
+ $db_binary --version
- mysql -v -u $HZ_TEST_DB_ROOT_USER -p$HZ_TEST_DB_ROOT_PASS -Ns -e "SELECT VERSION();"
+ $db_binary -v -u $HZ_TEST_DB_ROOT_USER -p$HZ_TEST_DB_ROOT_PASS -Ns -e "SELECT VERSION();"
- mysql -u $HZ_TEST_DB_ROOT_USER -p$HZ_TEST_DB_ROOT_PASS <<-EOSQL
+ $db_binary -u $HZ_TEST_DB_ROOT_USER -p$HZ_TEST_DB_ROOT_PASS <<-EOSQL
DROP DATABASE IF EXISTS $HZ_TEST_DB_NAME;
CREATE DATABASE $HZ_TEST_DB_NAME CHARACTER SET $HZ_TEST_DB_CHARSET;
@@ -107,7 +108,7 @@ else
echo -e "\n--------------"
echo "Importing schema..."
echo -e "--------------\n"
- mysql -u $HZ_TEST_DB_USER -p$HZ_TEST_DB_PASS $HZ_TEST_DB_NAME < ./install/schema_mysql.sql
- mysql -v -u $HZ_TEST_DB_ROOT_USER -p$HZ_TEST_DB_ROOT_PASS -Ns -e "show databases"
- mysql -v -u $HZ_TEST_DB_USER -p$HZ_TEST_DB_PASS $HZ_TEST_DB_NAME -Ns -e "show tables"
+ $db_binary -u $HZ_TEST_DB_USER -p$HZ_TEST_DB_PASS $HZ_TEST_DB_NAME < ./install/schema_mysql.sql
+ $db_binary -v -u $HZ_TEST_DB_ROOT_USER -p$HZ_TEST_DB_ROOT_PASS -Ns -e "show databases"
+ $db_binary -v -u $HZ_TEST_DB_USER -p$HZ_TEST_DB_PASS $HZ_TEST_DB_NAME -Ns -e "show tables"
fi