-
Bug
-
Resolution: Fixed
-
Blocker
-
3.9
-
MOODLE_39_STABLE
-
MOODLE_39_STABLE
-
MDL-69026-master -
We've seen a few behat fails for Oracle. I've already fixed most of them but this one remains (I hadn't seen it before).
Example failure:
https://ci.moodle.org/job/S.03.05%20-%20Behat%20-%20Chrome%20+%20Oracle/487/
Scenario:
Course participants can be filtered.Multiple filters applied (None filterset match type)
|
Error Message
And I should see "Student 3" in the "participants" "table": "Student 3" text was not found in the "participants" element (Behat\Mink\Exception\ExpectationException)
|
A stacktrace is included in the fail:
Error reading from database
|
File: /lib/dml/moodle_database.php
|
Line: 486
|
Stack trace:
|
ORA-00936: missing expression
|
SELECT COUNT(u.id)
|
FROM (SELECT DISTINCT udistinct.id
|
FROM b1user udistinct
|
JOIN b1user_enrolments ue ON ue.userid = udistinct.id
|
JOIN b1enrol e ON e.id = ue.enrolid
|
AND e.courseid = :o_courseid1
|
WHERE udistinct.deleted = 0
|
) targetusers
|
JOIN b1user u ON u.id = targetusers.id
|
LEFT JOIN (SELECT DISTINCT eu_u.id
|
FROM b1user eu_u
|
JOIN b1user_enrolments ejs_ue ON ejs_ue.userid = eu_u.id
|
JOIN b1enrol ejs_e ON ejs_e.id = ejs_ue.enrolid
|
AND ejs_e.courseid = :o_ejs_courseid
|
WHERE eu_u.deleted = 0 AND (((NOT (ejs_ue.status = :o_ejs_0active
|
AND ejs_e.status = :o_ejs_0enabled
|
AND ejs_ue.timestart < :o_ejs_0now1
|
AND (ejs_ue.timeend = 0
|
OR ejs_ue.timeend > :o_ejs_0now2)))))) ef ON ef.id = u.id
|
LEFT JOIN b1user_lastaccess ul ON (ul.userid = u.id AND ul.courseid = :o_courseid2)
|
LEFT JOIN b1context ctx ON (ctx.instanceid = u.id AND ctx.contextlevel = :o_contextlevel)
|
WHERE NOT ef.id IS NOT NULL AND NOT ((u.id IN (
|
SELECT userid
|
FROM b1role_assignments
|
WHERE roleid = :o_roleids18
|
AND contextid IN (:o_relatedctx15,:o_relatedctx16,:o_relatedctx17))
|
)) AND NOT NOT (LOWER( MOODLELIB.UNDO_MEGA_HACK(MOODLELIB.TRICONCAT(u.firstname, '*OCISP*', u.lastname)) ) LIKE LOWER(:o_search01) ESCAPE '\' OR (email IS NOT NULL AND LOWER(email) LIKE LOWER(:o_search02) ESCAPE '\') OR ((idnumber IS NOT NULL AND LOWER(idnumber) LIKE LOWER(:o_search03) ESCAPE '\') AND u.id = :o_userid02) OR (middlename IS NOT NULL AND LOWER(middlename) LIKE LOWER(:o_search04) ESCAPE '\') OR (alternatename IS NOT NULL AND LOWER(alternatename) LIKE LOWER(:o_search05) ESCAPE '\') OR (firstnamephonetic IS NOT NULL AND LOWER(firstnamephonetic) LIKE LOWER(:o_search06) ESCAPE '\') OR (lastnamephonetic IS NOT NULL AND LOWER(lastnamephonetic) LIKE LOWER(:o_search07) ESCAPE '\'))
|
[array (
|
'o_courseid1' => '2',
|
'o_ejs_courseid' => '2',
|
'o_ejs_0active' => 0,
|
'o_ejs_0enabled' => 0,
|
'o_ejs_0now1' => 1591915600.0,
|
'o_ejs_0now2' => 1591915600.0,
|
'o_courseid2' => '2',
|
'o_contextlevel' => 30,
|
'o_roleids18' => 3,
|
'o_relatedctx15' => '51',
|
'o_relatedctx16' => '3',
|
'o_relatedctx17' => '1',
|
'o_search01' => '%3@%',
|
'o_search02' => '%3@%',
|
'o_search03' => '%3@%',
|
'o_userid02' => '8',
|
'o_search04' => '%3@%',
|
'o_search05' => '%3@%',
|
'o_search06' => '%3@%',
|
'o_search07' => '%3@%',
|
)]
|
Error code: dmlreadexception
|
* line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
|
* line 277 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
|
* line 1154 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
|
* line 1624 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_records_sql()
|
* line 1084 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->get_record_sql()
|
* line 1697 of /lib/dml/moodle_database.php: call to oci_native_moodle_database->get_record_sql()
|
* line 1907 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
|
* line 148 of /user/classes/table/participants_search.php: call to moodle_database->count_records_sql()
|
* line 407 of /user/classes/table/participants.php: call to core_user\table\participants_search->get_total_participants_count()
|
* line 2024 of /lib/tablelib.php: call to core_user\table\participants->query_db()
|
* line 210 of /user/classes/table/participants.php: call to table_sql->out()
|
* line 262 of /lib/table/classes/external/dynamic/get.php: call to core_user\table\participants->out()
|
* line 255 of /lib/externallib.php: call to core_table\external\dynamic\get::execute()
|
* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()
|