-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
3.9.11
-
None
-
3.9.0 2020110300
-
MOODLE_39_STABLE
Moodle uses PostgreSQL.
There are 323965 users.
The steps:
In columns tab add 5 columns of 'userfield' type :
- fullname
- 3 custom text fields
When you try to view the report, you get a database read error.
The error:
"
...
Debug info: number of parameters must be between 0 and 65535
SELECT * FROM mdl_user WHERE id IN ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20... ,$324179)
[array (
0 => '1',
1 => '2',
2 => '3',
3 => '5',
4 => '6',
5 => '7',
6 => '8',
7 => '9',
8 => '10',
9 => '11',
10 => '12',
11 => '15',
12 => '16',
13 => '17',
14 => '19',
15 => '20',
16 => '21',
17 => '22',
18 => '23',
19 => '18',
20 => '24',
...
324178 => '406489',
)]
Error code: dmlreadexception
Stack trace:
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 248 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 859 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 1400 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
line 48 of /blocks/configurable_reports/reports/users/report.class.php: call to moodle_database->get_records_select()
line 433 of /blocks/configurable_reports/report.class.php: call to report_users->get_rows()
line 74 of /blocks/configurable_reports/viewreport.php: call to report_base->create_report()
"
There are 324179 parameters in the query.
The expectations:
No errors while viewing the report.