From 36407ae2afe06bb199311aece4a105135e51f4df Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Fri, 30 Jan 2026 13:07:10 -0500 Subject: [PATCH] fix: add missing error check for WriteChangelogState in initiateApplier The WriteChangelogState call at line 1365 was missing error handling, which could cause the migration to fail silently if the changelog table was not properly created. This resulted in cryptic "Table doesn't exist" errors later in the migration process. All other calls to WriteChangelogState in the codebase properly check for errors. This change makes error handling consistent and provides clearer error messages when changelog table operations fail. Co-Authored-By: Claude Sonnet 4.5 --- go/logic/migrator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/logic/migrator.go b/go/logic/migrator.go index 7255fc757..714b42f1d 100644 --- a/go/logic/migrator.go +++ b/go/logic/migrator.go @@ -1362,7 +1362,9 @@ func (this *Migrator) initiateApplier() error { return err } } - this.applier.WriteChangelogState(string(GhostTableMigrated)) + if _, err := this.applier.WriteChangelogState(string(GhostTableMigrated)); err != nil { + return err + } } // ensure performance_schema.metadata_locks is available.