Cron error with over 65535 users
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Jono M | ||
1.10 |
Won't Fix
|
High
|
Unassigned | ||
1.9 |
Won't Fix
|
High
|
Unassigned | ||
15.04 |
Fix Released
|
High
|
Unassigned | ||
16.04 |
Fix Released
|
High
|
Unassigned |
Bug Description
I discovered another case of things failing when there are too many users to substitute IDs as question marks in a postgres query - specifically, when running cron on a site with ~68000 users I get:
[WAR] 3f (lib/dml.php:480) Failed to get a recordset: postgres8 error: [-1: number of parameters must be between 0 and 65535] in EXECUTE("SELECT COUNT(*) FROM "usr" WHERE lastaccess >= DATE(?) AND lastaccess < DATE(?)+ INTERVAL '1 day' AND id IN (?,?,?,
Command was: SELECT COUNT(*) FROM "usr" WHERE lastaccess >= DATE(?) AND lastaccess < DATE(?)+ INTERVAL '1 day' AND id IN (?,?,?,
Call stack (most recent first):
get_
count_
count_
cron_
Should be a similar fix to Bug #1456849
Changed in mahara: | |
milestone: | none → 16.04.0 |
status: | In Progress → Fix Committed |
no longer affects: | mahara/15.10 |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
This also affects the Institution Statistics page, so for a more dramatic demonstration, create more than 65535 users and try to view statistics for "No Institution"