Skip to content

Commit

Permalink
ast/functions: add tidb_decode_plan() function (pingcap#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycs520 authored Oct 14, 2019
1 parent 7f8227e commit fe54b7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ast/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ const (
Version = "version"
TiDBVersion = "tidb_version"
TiDBIsDDLOwner = "tidb_is_ddl_owner"
TiDBDecodePlan = "tidb_decode_plan"

// control functions
If = "if"
Expand Down
1 change: 1 addition & 0 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe54b7a

Please sign in to comment.