Would attaching a database mid-transaction, then making changes in
the newly-attached database, make it impossible to create the correct
master journal file for the overall transaction?  Just a curious shot in
the dark.

   -Tom 

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, January 08, 2007 10:43 AM
> To: [email protected]
> Subject: Re: [sqlite] attach in transaction
> 
> [EMAIL PROTECTED] wrote:
> >  
> > Can someone tell me why attach cannot be called within transaction? 
> 
> I do not recall.
> 
> Clearly a DETACH will not work inside a transaction if the
> table being detached has been accessed or modified within that
> transaction.  But ATTACH could work, I would think.
> 
> Perhaps we disallowed ATTACH so that people would not expect
> an automatic DETACH if the transaction rolls back?
> 
> The prohibition against running ATTACH within transaction
> first appeared in version 3.0.1.  Presumably in version 3.0.0
> you could ATTACH within a transaction.
> 
> If you want to experiement, you can comment out the check
> for begin within a transaction in the attach.c source file,
> recompile, try doing various attaches within transactions,
> and see what bad things happen.  This might give us a clue
> as to why it is restricted.  Usually we do not prohibit
> things without good reason, I just do not recall what that
> reason is.  Perhaps the original reason no longer applies....
> 
> --
> D. Richard Hipp  <[EMAIL PROTECTED]>
> 
> 
> --------------------------------------------------------------
> ---------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> --------------------------------------------------------------
> ---------------
> 
> 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to