Subject RE: [firebird-support] Re: Stored Procedures Memory Usage
Author Alan McDonald
> You are right, I am new to firebird. Here is the part of code which
> called frequently. As far as I know, this the hard commit. Tell me if
> there is anything wrong in it.
>
>
> EXEC SQL
> SET DATABASE DB='/opt/firebird/data/ssg.gdb';
>
> connect_db(&dbconn)
> DB=dbconn.conn;
> sigsetjmp(env,1);
> EXEC SQL
> SET TRANSACTION USING DB;
> EXEC SQL
> UPDATE session SET bytesin=:ses->bytesin, bytesout=:ses-
> >bytesout, lastupd='NOW', trfratein=:ratein,trfrateout=:rateout
> WHERE sesno=:ses->session_id AND
> state='A';
>
> if (db_error
> (SQLCODE,&gds__trans,isc_status,"accountupdate.execute",env,&retry))
> goto return_error;
>
> EXEC SQL
> COMMIT;
> pr_error
> (SQLCODE,&gds__trans,isc_status,"accountupdate.end");
> disconnect_db(&dbconn);
> return retval;
>

so if there's an error you return to return_error without rolling back the
transaction?
Am I reading it correctly?
Alan