Skip to content

Commit

Permalink
fix: enable delete table alias for MySQL >= 8.0.16
Browse files Browse the repository at this point in the history
  • Loading branch information
jsclayton committed May 3, 2023
1 parent 522ad5a commit 77a600b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dialect/mysqldialect/dialect.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ func (d *Dialect) Init(db *sql.DB) {

version = semver.MajorMinor("v" + cleanupVersion(version))
if semver.Compare(version, "v8.0") >= 0 {
d.features |= feature.CTE | feature.WithValues | feature.DeleteTableAlias
d.features |= feature.CTE | feature.WithValues
}
if semver.Compare(version, "v8.0.16") >= 0 {
d.features |= feature.DeleteTableAlias
}
}

Expand Down

0 comments on commit 77a600b

Please sign in to comment.