@@ -14,11 +14,13 @@ ghost_binary=""
1414exec_command_file=/tmp/gh-ost-test.bash
1515orig_content_output_file=/tmp/gh-ost-test.orig.content.csv
1616ghost_content_output_file=/tmp/gh-ost-test.ghost.content.csv
17+ throttle_flag_file=/tmp/gh-ost-test.ghost.throttle.flag
1718
1819master_host=
1920master_port=
2021replica_host=
2122replica_port=
23+ original_sql_mode=
2224
2325OPTIND=1
2426while getopts " b:" OPTION
@@ -45,6 +47,8 @@ verify_master_and_replica() {
4547 echo " Cannot enable event_scheduler on master"
4648 exit 1
4749 fi
50+ original_sql_mode=" $( gh-ost-test-mysql-master -e " select @@global.sql_mode" -s -s) "
51+ echo " sql_mode on master is ${original_sql_mode} "
4852
4953 if [ " $( gh-ost-test-mysql-replica -e " select 1" -ss) " != " 1" ] ; then
5054 echo " Cannot verify gh-ost-test-mysql-replica"
@@ -87,7 +91,6 @@ start_replication() {
8791test_single () {
8892 local test_name
8993 test_name=" $1 "
90- original_sql_mode=" $( gh-ost-test-mysql-master -e " select @@global.sql_mode" -s -s) "
9194
9295 if [ -f $tests_path /$test_name /ignore_versions ] ; then
9396 ignore_versions=$( cat $tests_path /$test_name /ignore_versions)
@@ -108,7 +111,7 @@ test_single() {
108111 gh-ost-test-mysql-master --default-character-set=utf8mb4 test -e " set @@global.sql_mode='$( cat $tests_path /$test_name /sql_mode) '"
109112 gh-ost-test-mysql-replica --default-character-set=utf8mb4 test -e " set @@global.sql_mode='$( cat $tests_path /$test_name /sql_mode) '"
110113 fi
111-
114+
112115 gh-ost-test-mysql-master --default-character-set=utf8mb4 test < $tests_path /$test_name /create.sql
113116
114117 extra_args=" "
@@ -145,6 +148,7 @@ test_single() {
145148 --initially-drop-old-table \
146149 --initially-drop-ghost-table \
147150 --throttle-query='select timestampdiff(second, min(last_update), now()) < 5 from _gh_ost_test_ghc' \
151+ --throttle-flag-file=$throttle_flag_file \
148152 --serve-socket-file=/tmp/gh-ost.test.sock \
149153 --initially-drop-socket-file \
150154 --test-on-replica \
0 commit comments