HomePhabricator

resourceloader: Use AND instead of OR for upsert conds in saveFileDependencies()
4012d8a52e18Unpublished

Tags
None
Referenced Files
None
Subscribers
None

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

resourceloader: Use AND instead of OR for upsert conds in saveFileDependencies()

Follows-up e7b57d881a, which changed it from replace() to upsert()
but lost one of the wrapping arrays in doing so.

Previously updated many more rows than expected on Postgresql, when it
should only be updating individual rows, not all rows that match either
criteria.

SQL query before:
WHERE ((md_module = 'jquery.makeCollapsible.styles') OR (md_skin = 'vector|en-gb'))

SQL query after:
WHERE ((md_module = 'jquery.makeCollapsible.styles' AND md_skin = 'vector|en-gb'))

Not a problem on MySQL as upsert() is implemented differently there.

Bug: T222385
Change-Id: If8a458bf4543b297b3a06f31e09c0e77666bf7e6

Details

Provenance
ReedyAuthored on May 23 2019, 11:16 PM
Parents
rMWc33a0f6af7c1: Update git submodules
Branches
Unknown
Tags
Unknown
ChangeId
If8a458bf4543b297b3a06f31e09c0e77666bf7e6