Loading ...
Sorry, an error occurred while loading the content.
 

Re: [metabase-dev] in_transaction property

Expand Messages
  • Manuel Lemos
    Hello, ... As you may imagine, there is no dummy code in Metabase, even though you may be not aware of what it is for. auto_commit and in_transaction represent
    Message 1 of 2 , Nov 1, 2003
      Hello,

      On 10/31/2003 08:20 AM, Lukas Smith wrote:
      > I am just wondering what the purpose of the in_transaction property is.
      > It seems like it is just the opposite of the auto_commit property.
      >
      > Is that observation correct?
      > Is there then really a need for it?

      As you may imagine, there is no dummy code in Metabase, even though you
      may be not aware of what it is for.

      auto_commit and in_transaction represent different things. auto_commit
      off means that when the next query is executed it will be part of a
      transaction that may have or not already started.

      in_transaction on means that a transaction already started. It is use by
      Metabase shutdown function to rollback unfinished transactions.

      This is very important, especially if you use persistent connections, as
      if you do not make sure that all transactions are finished by the time
      you exit your script, next time the same process is used to run another
      script and reuses the persistent connection, it will be in a middle of a
      unfinished transaction that may be completely unrelated with the ned
      script. That could cause serious application havoc.

      --

      Regards,
      Manuel Lemos

      Free ready to use OOP components written in PHP
      http://www.phpclasses.org/
    Your message has been successfully submitted and would be delivered to recipients shortly.