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 affected (0.00 sec)
mysql> select * from t;
+------+
| num |
+------+
| 1 |
| 2 |
+------+
2 rows in set (0.00 sec)
mysql> update t set num=num+1;
ERROR 1062: Duplicate entry '2' for key 1
mysql>
Help!
Regards,
Mark
[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]