diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-15 18:07:04 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-06-16 13:04:59 +0200 |
commit | 425987861530c9c0fb7fe618d7f4bab017a80253 (patch) | |
tree | fbeb789604d219eb26049e0f1e5280bc66642b7f /db | |
parent | 33b68f87803edc2b484e94e277dcaf67175340c1 (diff) | |
download | gitlab-ce-fix-project-find-with-namespace-order.tar.gz |
Fixed ordering in Project.find_with_namespacefix-project-find-with-namespace-order
This ensures that Project.find_with_namespace returns a row matching
literally as the first value, instead of returning a random value.
The ordering here is _only_ applied to Project.find_with_namespace and
_not_ Project.where_paths_in as currently there's no code that requires
Project.where_paths_in to return rows in a certain order. Since this
method also returns all rows that match there's no real harm in not
setting a specific order either. Another reason is that generating all
the "WHEN" arms for multiple values in Project.where_paths_in becomes
really messy.
On MySQL we have to use the "BINARY" operator to turn a "WHERE" into a
case-sensitive WHERE as otherwise MySQL may still end up returning rows
in an unpredictable order.
Fixes gitlab-org/gitlab-ce#18603
Diffstat (limited to 'db')
0 files changed, 0 insertions, 0 deletions