-
Sub-task
-
Resolution: Fixed
-
Critical
-
2.1.5, 2.2.2
-
Oracle
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
wip-mdl-30051
-
-
Easy
-
The following sql query used in /lib/moodlelib.php is not valid (in Oracle):
...
|
$sql = "SELECT l.*, u.firstname, u.lastname
|
FROM {log} l
|
JOIN {cache_flags} cf ON l.ip = cf.name
|
LEFT JOIN {user} u ON l.userid = u.id
|
WHERE l.module = 'login' AND l.action = 'error'
|
AND l.time > ?
|
AND cf.flagtype = 'login_failure_by_ip'
|
UNION ALL
|
SELECT l.*, u.firstname, u.lastname
|
FROM {log} l
|
JOIN {cache_flags} cf ON l.info = cf.name
|
LEFT JOIN {user} u ON l.userid = u.id
|
WHERE l.module = 'login' AND l.action = 'error'
|
AND l.time > ?
|
AND cf.flagtype = 'login_failure_by_info'
|
ORDER BY time DESC";
|
It crashes with ORA-00904
* line 394 of \lib\dml\moodle_database.php: dml_read_exception thrown
|
* line 268 of \lib\dml\oci_native_moodle_database.php: call to moodle_database->query_end()
|
* line 1059 of \lib\dml\oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
|
* line 8089 of \lib\moodlelib.php: call to oci_native_moodle_database->get_recordset_sql()
|
* line 279 of \lib\cronlib.php: call to notify_login_failures()
|
* line 61 of \admin\cli\cron.php: call to cron_run()
|
The reason of this error is that column name use is not allowed in the ORDER BY when using UNION
- has been marked as being related by
-
MDL-38215 Error on workshop using Oracle
-
- Closed
-