diff --git a/pkg/sql/compile2/compile.go b/pkg/sql/compile2/compile.go
index ac6a4a06f41e8f5da58f3e7dd62c730a5dec525a..d3d15c7cedaa9dd9f2630d2c4ac5cba40fbba654 100644
--- a/pkg/sql/compile2/compile.go
+++ b/pkg/sql/compile2/compile.go
@@ -160,6 +160,13 @@ func (c *Compile) compileScope(pn *plan.Plan) (*Scope, error) {
Magic: DropIndex,
Plan: pn,
}, nil
+ case plan.DataDefinition_SHOW_DATABASES,
+ plan.DataDefinition_SHOW_TABLES,
+ plan.DataDefinition_SHOW_COLUMNS:
+ return c.compileQuery(pn.GetDdl().GetQuery())
+ // 1、not supported: show arnings/errors/status/processlist
+ // 2、show variables will not return query
+ // 3、show create database/table need rewrite to create sql
}
}
return nil, errors.New(errno.SyntaxErrororAccessRuleViolation, fmt.Sprintf("query '%s' not support now", pn))