-
Sub-task
-
Resolution: Fixed
-
Major
-
2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.3
-
Oracle DB
-
Oracle
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
MDL-30370_master -
-
Easy
-
When searching forum posts In Oracle it crashes with ORA-00918: column ambiguously defined
* 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 1093 of \lib\dml\oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
|
* line 2056 of \mod\forum\lib.php: call to oci_native_moodle_database->get_records_sql()
|
* line 145 of \mod\forum\search.php: call to forum_search_posts()
|
The reason is that in /mod/forum/lib.php there is a 'select *' query with a subquery that uses twice the same column name (email):
$searchsql = "SELECT p.*,
|
d.forum,
|
u.firstname,
|
u.lastname,
|
u.email,
|
u.picture,
|
u.imagealt,
|
u.email
|
FROM $fromsql
|
WHERE $selectsql
|
ORDER BY p.modified DESC";
|