Fetching folder size value not working for Mysql

Bug #1691329 reported by Robert Lyon
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned
17.04
Fix Released
High
Unassigned
17.10
Fix Released
High
Unassigned

Bug Description

We have a bit of code to estimate the size of a folder to display it in the files content list.

This works on postgres but fails on mysql

The issue is when we call SUM(aff.size) in postgres it sets the column title to sum for the results but with mysql it returns SUM(aff.size) as the column title.

The fix https://reviews.mahara.org/#/c/7765/

sorts this out as we give it a column alias

Robert Lyon (robertl-9)
Changed in mahara:
importance: Undecided → High
milestone: none → 17.10.0
status: New → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7765
Committed: https://git.mahara.org/mahara/mahara/commit/1f3927b3526c46a1123ad513dff0be618769feef
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 1f3927b3526c46a1123ad513dff0be618769feef
Author: Robert Lyon <email address hidden>
Date: Wed May 17 11:14:45 2017 +1200

Bug 1691329: Fixing folder size call for mysql

We need to actually define an alias for the column to return

behatnotneeded

Change-Id: I6eec34389a24c1eef647963348ae8bcb60d716f5
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "17.04_STABLE" branch: https://reviews.mahara.org/7821

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

Reviewed: https://reviews.mahara.org/7821
Committed: https://git.mahara.org/mahara/mahara/commit/99c2251ee2cc38ef8a2972891e4548331d045581
Submitter: Robert Lyon (<email address hidden>)
Branch: 17.04_STABLE

commit 99c2251ee2cc38ef8a2972891e4548331d045581
Author: Robert Lyon <email address hidden>
Date: Wed May 17 11:14:45 2017 +1200

Bug 1691329: Fixing folder size call for mysql

We need to actually define an alias for the column to return

behatnotneeded

Change-Id: I6eec34389a24c1eef647963348ae8bcb60d716f5
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 1f3927b3526c46a1123ad513dff0be618769feef)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.