Share Mode Locking Problem...
Posted in 1997
I'm new to the Informix world, so pardon any mistaken assumptions I may
have (that's my disclaimer)...
I wish to run a process which updates a bunch of rows in a table, makes a
calculation, and then rollback all the changes in the end (think what-if
scenarios). At the same time as playing out the scenario, I need for
other users to be able to have read access to the old (already
committed) data.
So, I issue the following:
begin work;
lock table table in share mode;
update table
set colb = ####
where cola = "this";
Then, without comitting/rolling back the above, in another session, I
issue:
select * from table
order by cola;
Instead of getting the old values for each row, I get:
243: Could not position within a table (informix.test_update).
107: ISAM error: record is locked.
My isolation and transaction modes are set to their defaults (non-ansi
databases).
Informix is Online 7.2 for IRIX.
Anyone have any clues as to why this basic locking strategy is failing?
Thanks,
Chad