fix(dev-env): use -o so myloader drops existing tables before import#2871
Merged
Conversation
myloader >= 0.20 deprecated --overwrite-tables into a no-op that no longer sets the purge mode, so imports fail with ERROR 1050 on any pre-existing table. -o maps to the correct behavior on every myloader version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
sjinks
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Problem
vip dev-env import sqlfails for every MyDumper-format dump imported into an environment that has any pre-existing tables — which is all of them, since a fresh dev-env ships with the default WordPress tables. myloader exits with code 133 (SIGTRAP via GLibg_error) after:Retrying after a partial import fails instantly for the same reason.
Root cause
vip-container-images#1463 bumped mydumper 0.18.1 → 0.21.3 in the php image. In myloader ≥ 0.20,
--overwrite-tableswas deprecated in favor of-o/--drop-tableand re-registered as a bare boolean that no longer sets the purge mode, which stays at its defaultFAIL(myloader_arguments.c#L206, myloader_restore_job.c#L43). NoDROP TABLEis ever issued — theoverwrite_table()switch falls through to itsThis should not happenbranch — and the first collidingCREATE TABLEis fatal.Fix
Pass
-oinstead of the long flag ingetImportArgs()(src/commands/dev-env-import-sql.ts).-ois correct on every myloader version:-oresolves to--overwrite-tables--drop-table, defaulting toDROPmodeTesting
ERROR 1050failure against a populated dev-env DB with--overwrite-tables; instant failure (<1s).-o, myloader emitsDropping table or view (if exists) ...per table and a 201,721-table production-scale dump imports over a populated database end to end.Changelog Description
Fixed
ERROR 1050: Table already existswhen the local database contains existing tablesRelated
🤖 Generated with Claude Code