From 3a15439d3c7bd4e1ac4ad357d52856fdefa95331 Mon Sep 17 00:00:00 2001 From: tianjiqx Date: Mon, 15 Oct 2018 23:05:57 +0800 Subject: [PATCH] fix drop view if exist error (#7833) --- planner/core/planbuilder.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/planner/core/planbuilder.go b/planner/core/planbuilder.go index f54675f142d74..28f7b25dbf1fa 100644 --- a/planner/core/planbuilder.go +++ b/planner/core/planbuilder.go @@ -227,6 +227,8 @@ func (b *PlanBuilder) buildDo(v *ast.DoStmt) (Plan, error) { RetType: expr.GetType(), }) } + //make dual schema if not + var _ = dual.Schema() p.SetChildren(dual) p.self = p p.SetSchema(schema)