reading original_sql_mode once

This commit is contained in:
Shlomi Noach 2018-10-16 10:22:59 +03:00
parent 789d247d83
commit b8e02df0fe

View File

@ -20,6 +20,7 @@ master_host=
master_port= master_port=
replica_host= replica_host=
replica_port= replica_port=
original_sql_mode=
OPTIND=1 OPTIND=1
while getopts "b:" OPTION while getopts "b:" OPTION
@ -46,6 +47,8 @@ verify_master_and_replica() {
echo "Cannot enable event_scheduler on master" echo "Cannot enable event_scheduler on master"
exit 1 exit 1
fi fi
original_sql_mode="$(gh-ost-test-mysql-master -e "select @@global.sql_mode" -s -s)"
echo "sql_mode on master is ${original_sql_mode}"
if [ "$(gh-ost-test-mysql-replica -e "select 1" -ss)" != "1" ] ; then if [ "$(gh-ost-test-mysql-replica -e "select 1" -ss)" != "1" ] ; then
echo "Cannot verify gh-ost-test-mysql-replica" echo "Cannot verify gh-ost-test-mysql-replica"
@ -88,7 +91,6 @@ start_replication() {
test_single() { test_single() {
local test_name local test_name
test_name="$1" test_name="$1"
original_sql_mode="$(gh-ost-test-mysql-master -e "select @@global.sql_mode" -s -s)"
if [ -f $tests_path/$test_name/ignore_versions ] ; then if [ -f $tests_path/$test_name/ignore_versions ] ; then
ignore_versions=$(cat $tests_path/$test_name/ignore_versions) ignore_versions=$(cat $tests_path/$test_name/ignore_versions)