Skip to content

Commit 6c5bcce

Browse files
crazycs520ti-chi-bot
authored andcommitted
[parser] ast/functions: add tidb_decode_plan() function (#557)
1 parent 190f905 commit 6c5bcce

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

parser/ast/functions.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ const (
246246
Version = "version"
247247
TiDBVersion = "tidb_version"
248248
TiDBIsDDLOwner = "tidb_is_ddl_owner"
249+
TiDBDecodePlan = "tidb_decode_plan"
249250

250251
// control functions
251252
If = "if"

parser/parser_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,7 @@ func (s *testParserSuite) TestBuiltin(c *C) {
11981198

11991199
{`SELECT tidb_version();`, true, "SELECT TIDB_VERSION()"},
12001200
{`SELECT tidb_is_ddl_owner();`, true, "SELECT TIDB_IS_DDL_OWNER()"},
1201+
{`SELECT tidb_decode_plan();`, true, "SELECT TIDB_DECODE_PLAN()"},
12011202
{`SELECT tidb_decode_key('abc');`, true, "SELECT TIDB_DECODE_KEY('abc')"},
12021203

12031204
// for time fsp

0 commit comments

Comments
 (0)