Bug 47644

GemConnect

2.3, 2.2.3, 2.2.2, 2.2, 2.1.1, 2.1, 2.0

All Platforms

2.4

Reading BLOBS/CLOBS requires SQL "SELECT ... FOR UPDATE"

When a GsOracleConnection is configured to return GsOracleBLOB/CLOB objects (lobLimit > 0), the SQL SELECT statement used in the #openCursorOn: call to retrieve them has to include the suffix "FOR UPDATE", even if the application won't be writing the BLOB/CLOB. For example:

stream := myConnection openCursorOn: 'select clob_column from mytable for update'.


Failure to do so will result in the Oracle error:

ORA-22292: Cannot open a LOB in read-write mode without a transaction.

Workaround

Include "FOR UPDATE" in the SQL SELECT statement used for retrieving the BLOB/CLOB.


                

Last updated: 7/2/18