Re: Rollback
Posted in 1997
>From: David Williams <djw@smooth1.demon.co.uk> >Date: Wed, 5 Feb 1997 19:40:03 +0000 >X-Informix-List-Id: <news.33514> > >In article <5d8v1v$21s@cssun.mathcs.emory.edu>, Jonathan Leffler ><johnl@informix.com> writes >>(Yes, it does mean that OnLine internally supports savepoints within a >>transaction, and yes, it would be darned useful if we could get our hands >>on savepoints too.) > > There are some error messages which mention savepoints :- > > Version 5.0/Version 7.0 > > -220 Cannot being savepoint (Internal error) > -248 Cannot commit savepoint (Internal error) > -278 Cannot rollback savepoint (Internal error) > > How are they used? I'm not sure. Each statement in OnLine is always atomic; it either succeeds (and possibly changes the database state) or it fails (and does not change the database state). One way this could be implemented is as: begin savepoint; do statement; if (ok) then commit savepoint else rollback savepoint; The only way you'd ever see those error messages is if something went drastically wrong inside the engine (or someone's stored procedure maliciously returned the error through a RAISE statement). At the user level, there is no way to use savepoints. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>