vitessio/vitess · error

Unsupported strategy: %+v

Error message

Unsupported strategy: %+v

What it means

executeMigration dispatches on the DDL strategy (e.g. vitess, mysql). If the strategy stored on the migration does not match any supported case, the migration is failed with 'Unsupported strategy'. This guards against invalid or unrecognized -ddl_strategy values reaching execution.

Source

Thrown at go/vt/vttablet/onlineddl/executor.go:2865

		return failMigration(err)
	}
	if specialMigrationExecuted {
		return nil
	}

	// OK, nothing special about this ALTER. Let's go ahead and execute it.
	switch onlineDDL.Strategy {
	case schema.DDLStrategyOnline, schema.DDLStrategyVitess:
		if err := e.ExecuteWithVReplication(ctx, onlineDDL, nil); err != nil {
			return failMigration(err)
		}
	case schema.DDLStrategyMySQL:
		if _, err := e.executeDirectly(ctx, onlineDDL); err != nil {
			return failMigration(err)
		}
	default:
		{
			return failMigration(fmt.Errorf("Unsupported strategy: %+v", onlineDDL.Strategy))
		}
	}
	return nil
}

// executeMigration executes a single migration. It analyzes the migration type:
// - is it declarative?
// - is it CREATE / DROP / ALTER?
// - it is a Revert request?
// - what's the migration strategy?
// The function invokes the appropriate handlers for each of those cases.
func (e *Executor) executeMigration(ctx context.Context, onlineDDL *schema.OnlineDDL) error {
	defer e.triggerNextCheckInterval()
	failMigration := func(err error) error {
		return e.failMigration(ctx, onlineDDL, err)
	}

	ddlAction, err := onlineDDL.GetAction(e.env.Environment().Parser())

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Resubmit the migration with an explicitly supported strategy, e.g. --ddl_strategy="vitess" or "mysql"
  2. Check the exact strategy string for typos or extra characters
  3. Confirm vtctld and vttablet are the same version so strategy names match
  4. Inspect the migration row's strategy field to see what was actually stored

Example fix

// before
vtctldclient ApplySchema --ddl_strategy="veetess" --sql "ALTER TABLE t ADD COLUMN c INT" ks
// after
vtctldclient ApplySchema --ddl_strategy="vitess" --sql "ALTER TABLE t ADD COLUMN c INT" ks
Defensive patterns

Strategy: validation

Validate before calling

var validStrategies = map[string]bool{"vitess": true, "mysql": true}
if !validStrategies[strings.ToLower(strings.TrimSpace(strategy))] {
    return fmt.Errorf("strategy %q not supported; use vitess or mysql", strategy)
}

Try / catch

err := applySchema(ctx, sql, ddlStrategy)
if err != nil && strings.Contains(err.Error(), "Unsupported strategy") {
    // resubmit with --ddl_strategy="vitess"
}

Prevention

When it happens

Trigger: Submitting an online DDL migration whose strategy (onlineDDL.Strategy, derived from the --ddl_strategy flag) is not one of vitess/mysql supported values, e.g. a typo or a strategy string that failed to normalize.

Common situations: Typo in ddl_strategy flag (e.g. 'gh-ost' on a build without it being a recognized value here, or misspelled 'vitess'), older clients sending strategies removed in newer versions, config drift between vtctld and vttablet versions.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/ff15c646fb919cce. Report an issue: GitHub.