diff --git a/ast/functions.go b/ast/functions.go index 6b0011bbc..6af8c5b50 100755 --- a/ast/functions.go +++ b/ast/functions.go @@ -245,6 +245,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 ea719212f..da4a9b95c 100755 --- a/parser_test.go +++ b/parser_test.go @@ -1078,6 +1078,8 @@ 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 {"CREATE TABLE t( c1 TIME(2), c2 DATETIME(2), c3 TIMESTAMP(2) );", true, "CREATE TABLE `t` (`c1` TIME(2),`c2` DATETIME(2),`c3` TIMESTAMP(2))"},