Comment 9 for bug 1476495

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5000
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/462b1c471c851c1093797f99fbc2bc798c396c3a
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 462b1c471c851c1093797f99fbc2bc798c396c3a
Author: Aaron Wells <email address hidden>
Date: Mon Jul 20 19:39:17 2015 +1200

Refactoring SQL query in View::shared_to_user() (Bug 1476495)

The old one unnecessarily used two separate queries for Postgres
& MySQL. And it had a bug in how it used MySQL's extended
"GROUP BY" functionality. While MySQL does let you return
non-aggregated columns, it uses an arbitrary record for these of
them, NOT the first record according to ORDER BY.

Also restructured the query a bit for optimization purposes.

behatnotneeded (Test in subsequent patch)

Change-Id: I3d49292025dcf7ac510a84d7e800476defec0525