Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Art S. Kagel — — source: Usenet: comp.databases.informix
rotor wrote:
OUch, sorry you say -106 not -131. This is because of the open CURSOR WITH
HOLD which prevents the index build from acquiring an exclusive lock on the
table. Close the cursor or get rid of the WITH HOLD clause so it closes on
the ROLLBACK. Don't know why it would work differently in 7.x than 9.x.
Come to thik about it I don't know why it's not erroring out at the
ROLLBACK. How can you rollback the creation of a temp table when there is
an open WITH HOLD cursor querying that table? It should get an error on the
rollback in either server.
Art S. Kagel
> Hi community!
> Explain please difference. ESQL/C fragment:
>
> $EXECUTE IMMEDIATE "BEGIN WORK";
> $EXECUTE IMMEDIATE "CREATE TEMP TABLE lvo ( i INT, f char( 16 ) )
> WITH NO LOG";
> $EXECUTE IMMEDIATE "INSERT INTO lvo VALUES ( 1, 'A' )";
> $DECLARE sel CURSOR WITH HOLD FOR SELECT f INTO :f FROM lvo;
> $OPEN sel;
> $FETCH sel;
> $EXECUTE IMMEDIATE "ROLLBACK";
> $EXECUTE IMMEDIATE "BEGIN WORK";
> $EXECUTE IMMEDIATE "CREATE TEMP TABLE lvo ( id INT ) WITH NO LOG";
> $EXECUTE IMMEDIATE "CREATE INDEX lvo ON lvo( id )";
>
> This fragment works on 7.x without any problems. But on 9.x the last
> statement fails with sql error -242 (isam -106). Please response who
> knows why the difference exists and which server has bug.
>
> Regards,
> rotor.
>
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.