MDL-75208 oracle: Amend a couple of queries to make Oracle happy
commitca7890f2fc14e1408d1ab4a1edd641d9edca49c6
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 13 Jul 2022 21:44:16 +0000 (13 23:44 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 19 Jul 2022 07:48:33 +0000 (19 09:48 +0200)
tree9c16db5b8e1dc41a6ac99d6c2c3c56bc9015951e
parentd9632ca8b28304d5188a8310480f0cd6bc06d9d8
MDL-75208 oracle: Amend a couple of queries to make Oracle happy

The changes introduced here are completely safe, just we stop
binding SITEID and, instead, embed it in the SQL.

Why? Because Oracle 21 has started to return non-sense results
when SITEID is bound.

After lots of tests, attempts, debugging... we have been unable
to find any logic to the need of this change and also, have been
unable to reproduce the problem with a standalone script that
pretty much runs the same queries that the ones changed here.

I'm sure that there is something, somewhere, but have failed
to find it, grrr.

Please read MDL-75208 and linked issues to find more information
about this problem, that is one of the biggest mysteries I've
seen recently. Maybe at the end there is a tiny detail that
explains it all, but it's really well hidden.
course/lib.php
lib/enrollib.php