Skip to content

sql/pgwire: panic when number of output columns changes between prepare and execute #16062

@knz

Description

@knz

https://sentry.io/cockroach-labs/cockroachdb/issues/278019124/

*errors.errorString: runtime.errorString v3.go:353
  File "github.com/cockroachdb/cockroach/pkg/sql/pgwire/v3.go", line 353, in func1
  File "github.com/cockroachdb/cockroach/pkg/sql/pgwire/v3.go", line 981, in sendResponse
  File "github.com/cockroachdb/cockroach/pkg/sql/pgwire/v3.go", line 846, in executeStatements
  File "github.com/cockroachdb/cockroach/pkg/sql/pgwire/v3.go", line 823, in handleExecute
  File "github.com/cockroachdb/cockroach/pkg/sql/pgwire/v3.go", line 455, in serve
...
(6 additional frame(s) were not displayed)

runtime.errorString v3.go:353

The stack trace says the query has returned more result columns than the query preparation had decided there would be. Either a logic error somewhere or we've not been careful about schema changes happening between prepare and execute.

cc @jordanlewis

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions