mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #27908
[Bug 1456849] A patch has been submitted for review
Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5004
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1456849
Title:
Problem with prepared statements in stats functions
Status in Mahara:
Fix Committed
Status in Mahara 15.04 series:
In Progress
Status in Mahara 15.10 series:
Fix Committed
Bug description:
Failed to get a recordset: postgres8 error: [-1: number of parameters must be between 0 and 65535] in EXECUTE("
SELECT (0.0 + COUNT(id)) / NULLIF(COUNT(DISTINCT "owner"), 0)
FROM "view"
WHERE id IN (?,? ... ?,?)
and values was (2848,81339 ... 123,456)
The full error shows 65000+ question marks etc
There are a bunch of functions that generate stats but are poorly
written (in lib/registration.php I think) where it tries to get info
by passing in every user id that relates to the search as a prepared
statement value - but when we have too many users (like on Mahara.org)
it dies as there is a maximum number of ? we can have in prepared
statement before the underlying database chokes.
Need to rewrite the stats so that they scale better
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1456849/+subscriptions
References