mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 07:13:02 -05:00
Merge pull request 'fix: don't specify FOR clause for index hint' (#6188) from gusted/forgejo-mariadb-2 into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6188 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
48131547a1
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ func getNotifications(ctx *context.Context) {
|
||||||
|
|
||||||
sess := db.GetEngine(ctx).Table("notification")
|
sess := db.GetEngine(ctx).Table("notification")
|
||||||
if setting.Database.Type.IsMySQL() {
|
if setting.Database.Type.IsMySQL() {
|
||||||
sess = sess.IndexHint("USE", "JOIN", "IDX_notification_user_id")
|
sess = sess.IndexHint("USE", "", "IDX_notification_user_id")
|
||||||
}
|
}
|
||||||
sess.Where("user_id = ?", ctx.Doer.ID).
|
sess.Where("user_id = ?", ctx.Doer.ID).
|
||||||
And("status = ? OR status = ?", status, activities_model.NotificationStatusPinned).
|
And("status = ? OR status = ?", status, activities_model.NotificationStatusPinned).
|
||||||
|
|
Loading…
Reference in a new issue