institution.id column breaks "auth_get_auth_instances_for_wwwroot()" function

Bug #1323911 reported by Aaron Wells on 2014-05-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Aaron Wells

Bug Description

The function (which is used during Mnet login) has a SQL query that selects "auth_instance.*, institution.*". It used to be that auth_instance had a column called "id" and institution did not, so this didn't cause any problems. But now that institution also has an "id" column, it overwrites the auth_instance.id in the PHP result set.

Aaron Wells (u-aaronw) on 2014-05-28
Changed in mahara:
assignee: nobody → Aaron Wells (u-aaronw)

Reviewed: https://reviews.mahara.org/3391
Committed: http://gitorious.org/mahara/mahara/commit/b1ee27e05481cc2dd9554d125b082c556289719d
Submitter: Yuliya Bozhko (<email address hidden>)
Branch: master

commit b1ee27e05481cc2dd9554d125b082c556289719d
Author: Aaron Wells <email address hidden>
Date: Wed May 28 14:46:29 2014 +1200

Adjust auth_get_auth_instances_for_wwwroot() to handle the new institution.id column

Bug 1323911: Now that the auth_instance table and the institution table both have a
column called "id", the SQL query is ambiguous about which one it will return.
Cutting the query down so that it only returns the fields actually used in the code
resolves this ambiguity.

Change-Id: I5242aa7bdee38af9aa0a7da308bb0d30dc700621
Signed-off-by: Yuliya Bozhko <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw) on 2014-10-21
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers