Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/bd/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ EXAMPLES:
bd import backup.jsonl # Import from a specific file
bd import --dry-run # Show what would be imported`,
GroupID: "sync",
RunE: runImport,
RunE: runImport,
}

var (
Expand Down
10 changes: 9 additions & 1 deletion internal/storage/dolt/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,15 @@ func applyConfigDefaults(cfg *Config) {
cfg.ServerPort = p
}
}
// If env var didn't provide a port, consult the full resolution chain:
// port file > config.yaml > metadata.json (GH#2590).
// Previously, port 0 fell through to the MySQL driver default (3307),
// causing cross-project connections when another Dolt sat on 3307.
if cfg.ServerPort == 0 && cfg.Path != "" {
if resolved := doltserver.DefaultConfig(cfg.Path); resolved.Port > 0 {
cfg.ServerPort = resolved.Port
}
}
// Port 0 means "not yet resolved" — auto-start (EnsureRunning) will
// allocate an ephemeral port. Don't default to 3307 as that caused
// cross-project data leakage (GH#2098, GH#2372).
Expand Down Expand Up @@ -1844,7 +1853,6 @@ func (s *DoltStore) tryAutoResolveMetadataConflicts(ctx context.Context, tx *sql
return true, nil
}


// Branch creates a new branch
func (s *DoltStore) Branch(ctx context.Context, name string) (retErr error) {
ctx, span := doltTracer.Start(ctx, "dolt.branch",
Expand Down
Loading