Merge branch 'hotfix/0.4.0.1'
This commit is contained in:
commit
d7249b245d
3 changed files with 17 additions and 2 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
# 0.4.0.1
|
||||||
|
|
||||||
|
## Bug fixes
|
||||||
|
|
||||||
|
Fix performance regression on stream loading with MySQL/MariaDB database backends [#5014](https://github.com/diaspora/diaspora/issues/5014).
|
||||||
|
|
||||||
# 0.4.0.0
|
# 0.4.0.0
|
||||||
|
|
||||||
## Ensure account deletions are run
|
## Ensure account deletions are run
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,16 @@ module User::Querying
|
||||||
|
|
||||||
def construct_public_followings_sql(opts)
|
def construct_public_followings_sql(opts)
|
||||||
Rails.logger.debug("[EVIL-QUERY] user.construct_public_followings_sql")
|
Rails.logger.debug("[EVIL-QUERY] user.construct_public_followings_sql")
|
||||||
query = opts[:klass].where(:author_id => Person.in_aspects(opts[:by_members_of]).select("people.id"), :public => true, :pending => false)
|
|
||||||
|
# For PostgreSQL and MySQL/MariaDB we use a different query
|
||||||
|
# see issue: https://github.com/diaspora/diaspora/issues/5014
|
||||||
|
if AppConfig.postgres?
|
||||||
|
query = opts[:klass].where(:author_id => Person.in_aspects(opts[:by_members_of]).select("people.id"), :public => true, :pending => false)
|
||||||
|
else
|
||||||
|
aspects = Aspect.where(:id => opts[:by_members_of])
|
||||||
|
person_ids = Person.connection.select_values(people_in_aspects(aspects).select("people.id").to_sql)
|
||||||
|
query = opts[:klass].where(:author_id => person_ids, :public => true, :pending => false)
|
||||||
|
end
|
||||||
|
|
||||||
unless(opts[:klass] == Photo)
|
unless(opts[:klass] == Photo)
|
||||||
query = query.where(:type => opts[:type])
|
query = query.where(:type => opts[:type])
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
version:
|
version:
|
||||||
number: "0.4.0.0" # Do not touch unless doing a release, do not backport the version number that's in master but keep develop to always say "head"
|
number: "0.4.0.1" # Do not touch unless doing a release, do not backport the version number that's in master but keep develop to always say "head"
|
||||||
heroku: false
|
heroku: false
|
||||||
environment:
|
environment:
|
||||||
url: "http://localhost:3000/"
|
url: "http://localhost:3000/"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue