File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ The following variables are available on all hooks:
8181
8282The following variable are available on particular hooks:
8383
84- - ` GH_OST_INSTANT_DDL ` is only available in ` gh-ost-on-success ` . The value is true if instant DDL was successful.
84+ - ` GH_OST_INSTANT_DDL ` is only available in ` gh-ost-on-success ` . The value is ` true ` if instant DDL was successful, and ` false ` if it was not .
8585- ` GH_OST_COMMAND ` is only available in ` gh-ost-on-interactive-command `
8686- ` GH_OST_STATUS ` is only available in ` gh-ost-on-status `
8787- ` GH_OST_LAST_BATCH_COPY_ERROR ` is only available in ` gh-ost-on-batch-copy-retry `
Original file line number Diff line number Diff line change @@ -105,6 +105,8 @@ func TestHooksExecutorExecuteHooks(t *testing.T) {
105105 require .Equal (t , 50.0 , progress )
106106 case "GH_OST_TABLE_NAME" :
107107 require .Equal (t , migrationContext .OriginalTableName , split [1 ])
108+ case "GH_OST_INSTANT_DDL" :
109+ require .Equal (t , "false" , split [1 ])
108110 case "TEST" :
109111 require .Equal (t , t .Name (), split [1 ])
110112 }
Original file line number Diff line number Diff line change @@ -478,7 +478,6 @@ func (this *Migrator) Migrate() (err error) {
478478 if this .migrationContext .AttemptInstantDDL {
479479 if this .migrationContext .Noop {
480480 this .migrationContext .Log .Debugf ("Noop operation; not really attempting instant DDL" )
481- return this .hooksExecutor .onSuccess (true )
482481 } else {
483482 this .migrationContext .Log .Infof ("Attempting to execute alter with ALGORITHM=INSTANT" )
484483 if err := this .applier .AttemptInstantDDL (); err == nil {
You can’t perform that action at this time.
0 commit comments