mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 22:33:33 +01:00
Merge pull request 'fix: don't specify FOR clause for index hint' (#6188) from gusted/forgejo-mariadb-2 into forgejo
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
Some checks are pending
/ release (push) Waiting to run
testing / backend-checks (push) Waiting to run
testing / frontend-checks (push) Waiting to run
testing / test-unit (push) Blocked by required conditions
testing / test-e2e (push) Blocked by required conditions
testing / test-remote-cacher (redis) (push) Blocked by required conditions
testing / test-remote-cacher (valkey) (push) Blocked by required conditions
testing / test-remote-cacher (garnet) (push) Blocked by required conditions
testing / test-remote-cacher (redict) (push) Blocked by required conditions
testing / test-mysql (push) Blocked by required conditions
testing / test-pgsql (push) Blocked by required conditions
testing / test-sqlite (push) Blocked by required conditions
testing / security-check (push) Blocked by required conditions
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")
|
||||
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).
|
||||
And("status = ? OR status = ?", status, activities_model.NotificationStatusPinned).
|
||||
|
|
Loading…
Reference in a new issue