List:General Discussion« Previous MessageNext Message »
From:Octavian Rasnita Date:December 13 2005 3:13pm
Subject:bug in MySQL 5?
View as plain text  
Hi,

I have tried:

mysql> create table z(id int unsigned not null primary key, first_name
varchar(20), last_name varchar(20));
Query OK, 0 rows affected (0.06 sec)
mysql> insert into z values(1, 'John', 'Smith'), (2, 'George',
'Washington');
Query OK, 2 rows affected (0.00 sec)
Records: 2  Duplicates: 0  Warnings: 0
mysql> select * from z;
+----+------------+------------+
| id | first_name | last_name  |
+----+------------+------------+
|  1 | John       | Smith      |
|  2 | George     | Washington |
+----+------------+------------+
2 rows in set (0.00 sec)
mysql> replace into z values(1, 'Michael', 'Rifle');
Query OK, 2 rows affected (0.00 sec)
mysql> select * from z;
+----+------------+------------+
| id | first_name | last_name  |
+----+------------+------------+
|  1 | Michael    | Rifle      |
|  2 | George     | Washington |
+----+------------+------------+
2 rows in set (0.00 sec)
mysql>

Is there a bug that MySQL says "Query OK, 2 rows affected (0.00 sec)"
although only a single row was modified (as it should)?

I am using the version 5.0.15-nt.

Thanks.

Teddy

Thread
bug in MySQL 5?Octavian Rasnita13 Dec
  • Re: bug in MySQL 5?Gleb Paharenko13 Dec
  • Re: bug in MySQL 5?Octavian Rasnita13 Dec
    • Re: bug in MySQL 5?Michael Stassen14 Dec