Skip to content

Commit bae8b17

Browse files
committed
fix test
1 parent 9c0c993 commit bae8b17

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

doc/hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The following variables are available on all hooks:
8181

8282
The 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`

go/logic/hooks_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

go/logic/migrator.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)