Skip to content

Commit

Permalink
[parser] add drop column with index flag (pingcap#1286)
Browse files Browse the repository at this point in the history
Signed-off-by: ailinkid <314806019@qq.com>
  • Loading branch information
AilinKid authored and ti-chi-bot committed Oct 9, 2021
1 parent a4d223e commit 6790f20
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions parser/mysql/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const (
IsBooleanFlag uint = 1 << 19 /* Internal: Used for telling boolean literal from integer */
PreventNullInsertFlag uint = 1 << 20 /* Prevent this Field from inserting NULL values */
EnumSetAsIntFlag uint = 1 << 21 /* Internal: Used for inferring enum eval type. */
DropColumnIndexFlag uint = 1 << 22 /* Internal: Used for indicate the column is being dropped with index */
)

// TypeInt24 bounds.
Expand All @@ -82,6 +83,11 @@ const (
MinInt24 = -1 << 23
)

// HasDropColumnWithIndexFlag checks if DropColumnIndexFlag is set.
func HasDropColumnWithIndexFlag(flag uint) bool {
return (flag & DropColumnIndexFlag) > 0
}

// HasNotNullFlag checks if NotNullFlag is set.
func HasNotNullFlag(flag uint) bool {
return (flag & NotNullFlag) > 0
Expand Down

0 comments on commit 6790f20

Please sign in to comment.