mirror of https://github.com/go-gitea/gitea.git
Backport #28546 by @lunny Fixes #28155 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
fbf29f29b5
commit
6493085aee
|
@ -446,9 +446,12 @@ func GetFeeds(ctx context.Context, opts GetFeedsOptions) (ActionList, int64, err
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
sess := db.GetEngine(ctx).Where(cond).
|
sess := db.GetEngine(ctx).Where(cond)
|
||||||
Select("`action`.*"). // this line will avoid select other joined table's columns
|
if setting.Database.Type.IsMySQL() {
|
||||||
Join("INNER", "repository", "`repository`.id = `action`.repo_id")
|
sess = sess.IndexHint("USE", "JOIN", "IDX_action_c_u_d")
|
||||||
|
}
|
||||||
|
sess = sess.Select("`action`.*"). // this line will avoid select other joined table's columns
|
||||||
|
Join("INNER", "repository", "`repository`.id = `action`.repo_id")
|
||||||
|
|
||||||
opts.SetDefaultValues()
|
opts.SetDefaultValues()
|
||||||
sess = db.SetSessionPagination(sess, &opts)
|
sess = db.SetSessionPagination(sess, &opts)
|
||||||
|
|
Loading…
Reference in New Issue