Skip to content

Commit

Permalink
remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
qw4990 committed Jun 6, 2019
1 parent 960c1f9 commit a60414d
Showing 1 changed file with 0 additions and 67 deletions.
67 changes: 0 additions & 67 deletions expression/function_traits.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,76 +50,9 @@ var unFoldableFunctions = map[string]struct{}{
ast.SetVar: {},
ast.GetVar: {},
ast.GetParam: {},
ast.Benchmark: {},
ast.DayName: {},
}

// DisableFoldFunctions stores functions which prevent child scope functions from being constant folded.
// Typically, these functions shall also exist in unFoldableFunctions, to stop from being folded when they themselves
// are in child scope of an outer function, and the outer function is recursively folding its children.
var DisableFoldFunctions = map[string]struct{}{
ast.Benchmark: {},
}

// IllegalFunctions4GeneratedColumns stores functions that is illegal for generated columns.
// See https://github.com/mysql/mysql-server/blob/5.7/mysql-test/suite/gcol/inc/gcol_blocked_sql_funcs_main.inc for details
var IllegalFunctions4GeneratedColumns = map[string]struct{}{
ast.ConnectionID: {},
ast.LoadFile: {},
ast.LastInsertId: {},
ast.Rand: {},
ast.UUID: {},
ast.UUIDShort: {},
ast.Curdate: {},
ast.CurrentDate: {},
ast.Curtime: {},
ast.CurrentTime: {},
ast.CurrentTimestamp: {},
ast.LocalTime: {},
ast.LocalTimestamp: {},
ast.Now: {},
ast.UnixTimestamp: {},
ast.UTCDate: {},
ast.UTCTime: {},
ast.UTCTimestamp: {},
ast.Benchmark: {},
ast.CurrentUser: {},
ast.Database: {},
ast.FoundRows: {},
ast.GetLock: {},
ast.IsFreeLock: {},
ast.IsUsedLock: {},
ast.MasterPosWait: {},
ast.NameConst: {},
ast.ReleaseLock: {},
ast.RowCount: {},
ast.Schema: {},
ast.SessionUser: {},
ast.Sleep: {},
ast.SystemUser: {},
ast.User: {},
ast.Values: {},
ast.Encrypt: {},
ast.Version: {},
}

// DeferredFunctions stores non-deterministic functions, which can be deferred only when the plan cache is enabled.
var DeferredFunctions = map[string]struct{}{
ast.Now: {},
ast.CurrentTimestamp: {},
ast.UTCTime: {},
ast.Curtime: {},
ast.CurrentTime: {},
ast.UTCTimestamp: {},
ast.UnixTimestamp: {},
ast.Sysdate: {},
ast.Curdate: {},
ast.CurrentDate: {},
ast.UTCDate: {},
ast.Rand: {},
ast.UUID: {},
}

// inequalFunctions stores functions which cannot be propagated from column equal condition.
var inequalFunctions = map[string]struct{}{
ast.IsNull: {},
Expand Down

0 comments on commit a60414d

Please sign in to comment.