@@ -38,6 +38,7 @@ original_sql_mode=
3838current_gtid_mode=
3939test_timeout=120
4040test_failure_log_tail_lines=50
41+ tables_to_migrate=()
4142
4243OPTIND=1
4344while getopts " b:s:dg" OPTION; do
@@ -177,8 +178,16 @@ build_ghost_command() {
177178 # Build gh-ost command with all standard options
178179 #
179180 # expected $1 to be a comma-separated list of tables to move
180- cmd=" GOTRACEBACK=crash $ghost_binary \
181- --move-tables=$1 \
181+
182+ # build comma-separated list of tables to move
183+ move_tables_arg=$( IFS=, ; echo " ${tables_to_migrate[*]} " )
184+
185+ # NOTE(chriskirkland): fully qualified package name + failpoint name
186+ FAILPOINT=" github.com/github/gh-ost/go/logic/panic-on-row-copy=return(true)"
187+ cmd=" GOTRACEBACK=crash \
188+ GO_FAILPOINTS='github.com/github/gh-ost/go/logic/panic-on-row-copy=return(true)' \
189+ $ghost_binary \
190+ --move-tables=$move_tables_arg \
182191 --user=root \
183192 --password=opensesame \
184193 --host=$source_replica_host \
@@ -199,6 +208,7 @@ build_ghost_command() {
199208 --stack \
200209 --checkpoint \
201210 --postpone-cut-over-flag-file=$postpone_cutover_flag_file \
211+ --unsafe-fail-points-enabled \
202212 --execute ${extra_args[@]} "
203213}
204214
@@ -371,8 +381,7 @@ test_single() {
371381 ) &
372382
373383 # Build and execute gh-ost command
374- move_tables_arg=$( IFS=, ; echo " ${tables_to_migrate[*]} " )
375- build_ghost_command " $move_tables_arg "
384+ build_ghost_command
376385 echo_dot
377386 echo $cmd > $exec_command_file
378387 echo_dot
0 commit comments