logo       

Re: ROLLBACK seems to be skipped on 0.08: msg#00125

Subject: Re: ROLLBACK seems to be skipped on 0.08
Darren Duncan wrote:
> At 10:43 AM +0200 10/20/07, Jesper Krogh wrote:
>> It was my impression that passing AutoCommit => 1 goes directly to the
>> $dbh (correct me if I'm wrong?)
>>
>> And that AutoCommit => 1 makes every UPDATE/INSERT/DELETE in the
>> database, to work as a single entity (correct me if I'm wrong here?)
> 
> Each individual SQL statement is conceptually supposed to be atomic,
> like it was an implicit transaction, regardless of the presense of any
> explicit transactions, so a failing single statement should never leave
> an inconsistent database.  In actuality, some DBMSs claim to do this
> (even MySQL?), and others not necessarily.  Explicit transactions are
> mainly to make a succession of multiple SQL statements collectively atomic.
> 
> But regardless, if there is a concern that an individual SQL statement
> isn't atomic, then autocommit should still equal 1, and an explicit
> transaction, eg with txn_do, should be wrapped around the single
> statement, in order to "make sure".

Ok.. maybe I didnt make it clear. The problem is that we "serialize"
object into several records (over 20 mostly) and this serialization
process should be done atomically, so I don't get any "half-objects" in
the database. It wasn't the individual record I was talking about.

This dataset is conceptually "inconsistent" to the application if this
happens. But the database is of course not aware of this.

txn_begin/commit and txn_do solves this.

Jesper
-- 
Jesper Krogh, jesper@xxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe