mirror of
https://github.com/moodle/moodle.git
synced 2025-03-24 09:30:17 +01:00
While we already were detecting @ normalise_value() both BLOBs and CLOBs properly on insert and update statements (by introspectind the column specs), when a long TEXT is being passed as part of an arbitrary SQL, or within the conditions... it was being bound as VARCHAR, leading to problems if used in combination with DBMS_LOB functions. This patch just ensures that any TEXT > 4000 bytes not detected by normalise_value() will be, always, bound as CLOB, unconditionally. Covered with tests both covering its use with DBMS_LOB (the reported bug) and also in general raw statements.