diff --git a/ast/functions.go b/ast/functions.go index 74f09bf1b..30e723a2b 100755 --- a/ast/functions.go +++ b/ast/functions.go @@ -246,6 +246,7 @@ const ( Version = "version" TiDBVersion = "tidb_version" TiDBIsDDLOwner = "tidb_is_ddl_owner" + TiDBDecodePlan = "tidb_decode_plan" // control functions If = "if" diff --git a/parser_test.go b/parser_test.go index 68502999e..15f7cc7a9 100644 --- a/parser_test.go +++ b/parser_test.go @@ -1198,6 +1198,7 @@ func (s *testParserSuite) TestBuiltin(c *C) { {`SELECT tidb_version();`, true, "SELECT TIDB_VERSION()"}, {`SELECT tidb_is_ddl_owner();`, true, "SELECT TIDB_IS_DDL_OWNER()"}, + {`SELECT tidb_decode_plan();`, true, "SELECT TIDB_DECODE_PLAN()"}, {`SELECT tidb_decode_key('abc');`, true, "SELECT TIDB_DECODE_KEY('abc')"}, // for time fsp