Skip to content

Commit

Permalink
sql: add drop type to the prepared statement generator
Browse files Browse the repository at this point in the history
Release justification: fixes for high-priority or high-severity bugs in existing functionality

Previously, prepare statement doesnt have support for drop type
in optimizer, so it panic during execution as no flags are generated.

This patch fixes this by adding dropType to the optimizer.

Resolves #61226

Release note: none

Signed-off-by: Tharun <[email protected]>
  • Loading branch information
tharun208 committed Mar 3, 2021
1 parent 6de4313 commit 1c0ec3b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/sql/plan_opt.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func (p *planner) prepareUsingOptimizer(ctx context.Context) (planFlags, error)
*tree.RenameIndex, *tree.RenameTable, *tree.Revoke, *tree.RevokeRole,
*tree.RollbackToSavepoint, *tree.RollbackTransaction,
*tree.Savepoint, *tree.SetTransaction, *tree.SetTracing, *tree.SetSessionAuthorizationDefault,
*tree.DropType,
*tree.SetSessionCharacteristics:
// These statements do not have result columns and do not support placeholders
// so there is no need to do anything during prepare.
Expand Down

0 comments on commit 1c0ec3b

Please sign in to comment.