From 1c0ec3b04669b77b32c2b5d3a50ebc14469c6e81 Mon Sep 17 00:00:00 2001 From: Tharun Date: Wed, 3 Mar 2021 13:41:10 +0530 Subject: [PATCH] sql: add drop type to the prepared statement generator 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 --- pkg/sql/plan_opt.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/sql/plan_opt.go b/pkg/sql/plan_opt.go index 55688430cc87..866dac0f2e72 100644 --- a/pkg/sql/plan_opt.go +++ b/pkg/sql/plan_opt.go @@ -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.