READ ONLY cursors now see data at time of OPEN [CR 466135]

As of Sybase IQ 12.7 ESD #4, applications that use cursors declared FOR READ ONLY may notice a change in which version of the data is visible to a cursor. Read only cursors now see the version of table(s) on which the cursor is declared when the cursor is opened. Prior to this change, cursors declared FOR READ ONLY saw the version of table(s) at the time of the first FETCH.

For example,

CREATE TABLE t1 ( c1 INT );
INSERT t1 VALUES ( 1 );

DECLARE t1_cursor CURSOR FOR SELECT * FROM t1
FOR READ ONLY;
OPEN t1_cursor;

INSERT t1 VALUES ( 2 );

FETCH T1_CURSOR;

When the cursor is fetched, only one row may be fetched from the table. (There is only one row in the table, when the cursor is opened.)

Prior to this change, the cursor could fetch two rows from the table.