Re: I thought single UPDATE statements were atomic

2003-06-06 Thread Paul DuBois
At 18:52 -0500 6/5/03, Mark Rages wrote: According to the docs, single update statements are atomic. That's correct. So why doesn't this work? mysql> create table t (num INT, UNIQUE (num)); Query OK, 0 rows affected (0.00 sec) mysql> insert into t values ('1'); Query OK, 1 row affected (0.00 sec)

Re: I thought single UPDATE statements were atomic

2003-06-06 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mark Rages wrote: > On Thu, Jun 05, 2003 at 09:06:43PM -0400, O'K Web Design wrote: > >>Hi >> >>You are not defining num so you are adding 1 to 0 to get 1 and you >>already have that record. Sounds like you need an autoincrement field. >>Mike > >

Re: I thought single UPDATE statements were atomic

2003-06-06 Thread Mark Rages
I do it? Regards, Mark [EMAIL PROTECTED] > > > - Original Message - > From: "Mark Rages" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: June 5, 2003 7:52 PM > Subject: I thought single UPDATE statements were atomic > > > > Ac

Re: I thought single UPDATE statements were atomic

2003-06-06 Thread O'K Web Design
ject: I thought single UPDATE statements were atomic > According to the docs, single update statements are atomic. > > So why doesn't this work? > > mysql> create table t (num INT, UNIQUE (num)); > Query OK, 0 rows affected (0.00 sec) > > mysql> insert

Re: I thought single UPDATE statements were atomic

2003-06-06 Thread Mark Matthews
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simpson, Ken wrote: > Mark, > > > >>I'm using InnoDB tables, which are reputed to be ACID compliant. >>Same problem. >> >>I guess I will follow your suggestion and just drop the UNIQUE >>constraint since it appears to be evaluated after each row is >

RE: I thought single UPDATE statements were atomic

2003-06-06 Thread Simpson, Ken
Mark, > I'm using InnoDB tables, which are reputed to be ACID compliant. > Same problem. > > I guess I will follow your suggestion and just drop the UNIQUE > constraint since it appears to be evaluated after each row is > UPDATEd and not after the UPDATE completes. > > I'll check out how Postg

Re: I thought single UPDATE statements were atomic

2003-06-06 Thread Mark Rages
On Fri, Jun 06, 2003 at 01:07:43PM +0200, Jon Haugsand wrote: > * Mark Rages > > According to the docs, single update statements are atomic. > > I would not say that your problem is with atomicity, but with > consistency. It is expected that a transaction oriented database > should follow the ACI

I thought single UPDATE statements were atomic

2003-06-06 Thread Mark Rages
According to the docs, single update statements are atomic. So why doesn't this work? mysql> create table t (num INT, UNIQUE (num)); Query OK, 0 rows affected (0.00 sec) mysql> insert into t values ('1'); Query OK, 1 row affected (0.00 sec) mysql> insert into t values ('2'); Query OK, 1 row aff

RE: I thought single UPDATE statements were atomic

2003-06-06 Thread Josh Smith
is syntax is wrong, how can I do it? Regards, Mark [EMAIL PROTECTED] > > > - Original Message - > From: "Mark Rages" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: June 5, 2003 7:52 PM > Subject: I thought single UPDATE statements we

Re: I thought single UPDATE statements were atomic

2003-06-06 Thread Jon Haugsand
* Mark Rages > According to the docs, single update statements are atomic. I would not say that your problem is with atomicity, but with consistency. It is expected that a transaction oriented database should follow the ACID properties, and with them, any consistency properties should not be eval

Re: I thought single UPDATE statements were atomic

2003-06-05 Thread Mark Rages
On Thu, Jun 05, 2003 at 09:09:36PM -0500, Paul DuBois wrote: > At 18:52 -0500 6/5/03, Mark Rages wrote: > >According to the docs, single update statements are atomic. > > That's correct. > > Consider what happens if MySQL tries to update the first record and > then the second, version what happen