cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.15k stars 3.81k forks source link

schemachanger: v24.2.0: CREATE SCHEMA: schema name empty when resolving database prefix for a schema name #129676

Open cockroach-sentry opened 2 months ago

cockroach-sentry commented 2 months ago

This issue was auto filed by Sentry. It represents a crash or reported error on a live cluster with telemetry enabled.

Sentry Link: https://cockroach-labs.sentry.io/issues/5759891887/?referrer=webhooks_plugin

Panic Message:

builder_state.go:1824: building declarative schema change targets for CREATE SCHEMA: schema name empty when resolving database prefix for a schema name
(1) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scerrors.EventLogger.HandlePanicAndLogError
  |     github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scerrors/errors.go:81
  | runtime.gopanic
  |     GOROOT/src/runtime/panic.go:770
  | [...repeated from below...]
Wraps: (2) building declarative schema change targets for CREATE SCHEMA
Wraps: (3) assertion failure
Wraps: (4) attached stack trace
  -- stack trace:
  | github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbuild.(*builderState).ResolveDatabasePrefix
  |     github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbuild/builder_state.go:1824
  | github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbuild/internal/scbuildstmt.CreateSchema
  |     github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/create_schema.go:34
  | reflect.Value.call
  |     GOROOT/src/reflect/value.go:596
  | reflect.Value.Call
  |     GOROOT/src/reflect/value.go:380
  | github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbuild/internal/scbuildstmt.Process
  |     github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/process.go:190
  | github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbuild.Build
  |     github.com/cockroachdb/cockroach/pkg/sql/schemachanger/scbuild/build.go:103
  | github.com/cockroachdb/cockroach/pkg/sql.(*planner).SchemaChange
  |     github.com/cockroachdb/cockroach/pkg/sql/schema_change_plan_node.go:72
  | github.com/cockroachdb/cockroach/pkg/sql.buildOpaque
  |     github.com/cockroachdb/cockroach/pkg/sql/opaque.go:57
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).tryBuildOpaque
  |     github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/opaque.go:70
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmt
  |     github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:467
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope
  |     github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:299
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot
  |     github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:280
  | github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder.(*Builder).Build
  |     github.com/cockroachdb/cockroach/pkg/sql/opt/optbuilder/builder.go:259
  | github.com/cockroachdb/cockroach/pkg/sql.(*optPlanningCtx).buildExecMemo
  |     github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:862
  | github.com/cockroachdb/cockroach/pkg/sql.(*planner).makeOptimizerPlan
  |     github.com/cockroachdb/cockroach/pkg/sql/plan_opt.go:251
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).makeExecPlan
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:2291
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).dispatchToExecutionEngine
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1841
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmtInOpenState
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:1174
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt.func1
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:146
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling.func1
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3426
  | runtime/pprof.Do
  |     GOROOT/src/runtime/pprof/runtime.go:51
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execWithProfiling
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:3425
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execStmt
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor_exec.go:145
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd.func1
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2316
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).execCmd
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2321
  | github.com/cockroachdb/cockroach/pkg/sql.(*connExecutor).run
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:2238
  | github.com/cockroachdb/cockroach/pkg/sql.(*Server).ServeConn
  |     github.com/cockroachdb/cockroach/pkg/sql/conn_executor.go:963
  | github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*conn).processCommands
  |     github.com/cockroachdb/cockroach/pkg/sql/pgwire/conn.go:253
  | github.com/cockroachdb/cockroach/pkg/sql/pgwire.(*Server).serveImpl.func4
  |     github.com/cockroachdb/cockroach/pkg/sql/pgwire/server.go:1036
  | runtime.goexit
  |     src/runtime/asm_amd64.s:1695
Wraps: (5) schema name empty when resolving database prefix for a schema name
Error types: (1) *withstack.withStack (2) *errutil.withPrefix (3) *assert.withAssertionFailure (4) *withstack.withStack (5) *errutil.leafError
-- report composition:
*errutil.leafError: schema name empty when resolving database prefix for a schema name
builder_state.go:1824: *withstack.withStack (top exception)
*assert.withAssertionFailure
*errutil.withPrefix: building declarative schema change targets for CREATE SCHEMA
errors.go:81: *withstack.withStack (1)
(check the extra data payloads)
Stacktrace (expand for inline code snippets): [src/runtime/asm_amd64.s#L1694-L1696](src/runtime/asm_amd64.s#L1694-L1696) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/pgwire/server.go#L1035-L1037](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/pgwire/server.go#L1035-L1037) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/pgwire/conn.go#L252-L254](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/pgwire/conn.go#L252-L254) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L962-L964](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L962-L964) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2237-L2239](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2237-L2239) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2320-L2322](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2320-L2322) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2315-L2317](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2315-L2317) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L144-L146](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L144-L146) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L3424-L3426](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L3424-L3426) [GOROOT/src/runtime/pprof/runtime.go#L50-L52](GOROOT/src/runtime/pprof/runtime.go#L50-L52) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L3425-L3427](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L3425-L3427) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L145-L147](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L145-L147) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L1173-L1175](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L1173-L1175) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L1840-L1842](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L1840-L1842) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L2290-L2292](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L2290-L2292) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/plan_opt.go#L250-L252](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/plan_opt.go#L250-L252) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/plan_opt.go#L861-L863](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/plan_opt.go#L861-L863) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L258-L260](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L258-L260) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L279-L281](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L279-L281) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L298-L300](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L298-L300) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L466-L468](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L466-L468) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/opaque.go#L69-L71](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/opaque.go#L69-L71) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opaque.go#L56-L58](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opaque.go#L56-L58) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schema_change_plan_node.go#L71-L73](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schema_change_plan_node.go#L71-L73) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/build.go#L102-L104](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/build.go#L102-L104) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/process.go#L189-L191](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/process.go#L189-L191) [GOROOT/src/reflect/value.go#L379-L381](GOROOT/src/reflect/value.go#L379-L381) [GOROOT/src/reflect/value.go#L595-L597](GOROOT/src/reflect/value.go#L595-L597) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/create_schema.go#L33-L35](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/create_schema.go#L33-L35) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/builder_state.go#L1823-L1825](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/builder_state.go#L1823-L1825) [GOROOT/src/runtime/panic.go#L769-L771](GOROOT/src/runtime/panic.go#L769-L771) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scerrors/errors.go#L80-L82](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scerrors/errors.go#L80-L82) [src/runtime/asm_amd64.s#L1694-L1696](src/runtime/asm_amd64.s#L1694-L1696) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/pgwire/server.go#L1035-L1037](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/pgwire/server.go#L1035-L1037) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/pgwire/conn.go#L252-L254](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/pgwire/conn.go#L252-L254) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L962-L964](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L962-L964) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2237-L2239](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2237-L2239) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2320-L2322](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2320-L2322) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2315-L2317](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor.go#L2315-L2317) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L144-L146](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L144-L146) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L3424-L3426](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L3424-L3426) [GOROOT/src/runtime/pprof/runtime.go#L50-L52](GOROOT/src/runtime/pprof/runtime.go#L50-L52) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L3425-L3427](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L3425-L3427) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L145-L147](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L145-L147) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L1173-L1175](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L1173-L1175) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L1840-L1842](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L1840-L1842) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L2290-L2292](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/conn_executor_exec.go#L2290-L2292) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/plan_opt.go#L250-L252](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/plan_opt.go#L250-L252) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/plan_opt.go#L861-L863](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/plan_opt.go#L861-L863) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L258-L260](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L258-L260) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L279-L281](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L279-L281) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L298-L300](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L298-L300) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L466-L468](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/builder.go#L466-L468) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/opaque.go#L69-L71](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opt/optbuilder/opaque.go#L69-L71) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opaque.go#L56-L58](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/opaque.go#L56-L58) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schema_change_plan_node.go#L71-L73](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schema_change_plan_node.go#L71-L73) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/build.go#L102-L104](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/build.go#L102-L104) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/process.go#L189-L191](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/process.go#L189-L191) [GOROOT/src/reflect/value.go#L379-L381](GOROOT/src/reflect/value.go#L379-L381) [GOROOT/src/reflect/value.go#L595-L597](GOROOT/src/reflect/value.go#L595-L597) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/create_schema.go#L33-L35](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/create_schema.go#L33-L35) [https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/builder_state.go#L1823-L1825](https://github.com/cockroachdb/cockroach/blob/953d09cce5a01cc0053e138516d80a27454f027c/pkg/sql/schemachanger/scbuild/builder_state.go#L1823-L1825)
src/runtime/asm_amd64.s in runtime.goexit at line 1695
pkg/sql/pgwire/server.go in pkg/sql/pgwire.(*Server).serveImpl.func4 at line 1036
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommands at line 253
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 963
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2238
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2321
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func1 at line 2316
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 145
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithProfiling at line 3425
GOROOT/src/runtime/pprof/runtime.go in runtime/pprof.Do at line 51
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithProfiling.func1 at line 3426
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt.func1 at line 146
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 1174
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).dispatchToExecutionEngine at line 1841
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).makeExecPlan at line 2291
pkg/sql/plan_opt.go in pkg/sql.(*planner).makeOptimizerPlan at line 251
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildExecMemo at line 862
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).Build at line 259
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 280
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope at line 299
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 467
pkg/sql/opt/optbuilder/opaque.go in pkg/sql/opt/optbuilder.(*Builder).tryBuildOpaque at line 70
pkg/sql/opaque.go in pkg/sql.buildOpaque at line 57
pkg/sql/schema_change_plan_node.go in pkg/sql.(*planner).SchemaChange at line 72
pkg/sql/schemachanger/scbuild/build.go in pkg/sql/schemachanger/scbuild.Build at line 103
pkg/sql/schemachanger/scbuild/internal/scbuildstmt/process.go in pkg/sql/schemachanger/scbuild/internal/scbuildstmt.Process at line 190
GOROOT/src/reflect/value.go in reflect.Value.Call at line 380
GOROOT/src/reflect/value.go in reflect.Value.call at line 596
pkg/sql/schemachanger/scbuild/internal/scbuildstmt/create_schema.go in pkg/sql/schemachanger/scbuild/internal/scbuildstmt.CreateSchema at line 34
pkg/sql/schemachanger/scbuild/builder_state.go in pkg/sql/schemachanger/scbuild.(*builderState).ResolveDatabasePrefix at line 1824
GOROOT/src/runtime/panic.go in runtime.gopanic at line 770
pkg/sql/schemachanger/scerrors/errors.go in pkg/sql/schemachanger/scerrors.EventLogger.HandlePanicAndLogError at line 81
src/runtime/asm_amd64.s in runtime.goexit at line 1695
pkg/sql/pgwire/server.go in pkg/sql/pgwire.(*Server).serveImpl.func4 at line 1036
pkg/sql/pgwire/conn.go in pkg/sql/pgwire.(*conn).processCommands at line 253
pkg/sql/conn_executor.go in pkg/sql.(*Server).ServeConn at line 963
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).run at line 2238
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd at line 2321
pkg/sql/conn_executor.go in pkg/sql.(*connExecutor).execCmd.func1 at line 2316
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt at line 145
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithProfiling at line 3425
GOROOT/src/runtime/pprof/runtime.go in runtime/pprof.Do at line 51
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execWithProfiling.func1 at line 3426
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmt.func1 at line 146
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).execStmtInOpenState at line 1174
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).dispatchToExecutionEngine at line 1841
pkg/sql/conn_executor_exec.go in pkg/sql.(*connExecutor).makeExecPlan at line 2291
pkg/sql/plan_opt.go in pkg/sql.(*planner).makeOptimizerPlan at line 251
pkg/sql/plan_opt.go in pkg/sql.(*optPlanningCtx).buildExecMemo at line 862
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).Build at line 259
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRoot at line 280
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmtAtRootWithScope at line 299
pkg/sql/opt/optbuilder/builder.go in pkg/sql/opt/optbuilder.(*Builder).buildStmt at line 467
pkg/sql/opt/optbuilder/opaque.go in pkg/sql/opt/optbuilder.(*Builder).tryBuildOpaque at line 70
pkg/sql/opaque.go in pkg/sql.buildOpaque at line 57
pkg/sql/schema_change_plan_node.go in pkg/sql.(*planner).SchemaChange at line 72
pkg/sql/schemachanger/scbuild/build.go in pkg/sql/schemachanger/scbuild.Build at line 103
pkg/sql/schemachanger/scbuild/internal/scbuildstmt/process.go in pkg/sql/schemachanger/scbuild/internal/scbuildstmt.Process at line 190
GOROOT/src/reflect/value.go in reflect.Value.Call at line 380
GOROOT/src/reflect/value.go in reflect.Value.call at line 596
pkg/sql/schemachanger/scbuild/internal/scbuildstmt/create_schema.go in pkg/sql/schemachanger/scbuild/internal/scbuildstmt.CreateSchema at line 34
pkg/sql/schemachanger/scbuild/builder_state.go in pkg/sql/schemachanger/scbuild.(*builderState).ResolveDatabasePrefix at line 1824

Tags

Tag Value
Command server
Environment v24.2.0
Go Version go1.22.5 X:nocoverageredesign
Platform linux amd64
Distribution CCL
Cockroach Release v24.2.0
Cockroach SHA 953d09cce5a01cc0053e138516d80a27454f027c
# of CPUs 8
# of Goroutines 683

Jira issue: CRDB-41674

fqazi commented 11 hours ago

Easily reproduces with:

CREATE SCHEMA "".""