Kenneth:
Thanks, I see your point, but that was just an example, put an "insert" or
"delete" command instead of the "create table", and that row would be
"inserted" or "deleted" without executing a rollback due to the SQL error.
I haven't tested though. But perhaps, as you said, the create table makes
its own transaction, but that shouldn't bother the rest of statements
included in the explicit "outer transaction". Should it?

I might be missing something but any number of statements surrounded by a
begin/commit should all be done or undone.


----- Original Message ----- 
From: "kenneth long" <[EMAIL PROTECTED]>
To: "Miguel_Angel_Latorre_Díaz" <[EMAIL PROTECTED]>
Sent: Friday, June 25, 2004 7:31 PM
Subject: Re: [sqlite] Bug or it makes sense?


> Miguel,
>
> I suspect that similar to most SQL languages the
> "Create" statements are their own transactions and
> perform an automatic commit.. Thats the way Oracle
> performs as do many others.
>
>
>
> --- Miguel_Angel_Latorre_Díaz
> <[EMAIL PROTECTED]> wrote:
> > Ok. But if one just does (also tried with the .read
> > metacommand):
> > sqlite3_exec (db, "begin; create table foo (value1
> > integer, value2 integer);
> > just an error; commit;", rest of params...)
> >
> > should it do the same?
> > To me, the "begin; ..." is a whole multi statement
> > which should be done
> > whitin a transaction because of the "begin". So, all
> > or nothing, but I get a
> > mixture.
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
> http://promotions.yahoo.com/new_mail
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to