| Bug #34752 | ERROR 1062 (23000): Duplicate entry '0' for key 'PRIMARY' | ||
|---|---|---|---|
| Submitted: | 21 Feb 2008 23:12 | Modified: | 21 Feb 2008 23:34 |
| Reporter: | Alexey Panfilov | Email Updates: | |
| Status: | Can't repeat | Impact on me: | |
| Category: | MySQL Server | Severity: | S1 (Critical) |
| Version: | 5.1.22-rc-community | OS: | Windows |
| Assigned to: | CPU Architecture: | Any | |
[21 Feb 2008 23:12]
Alexey Panfilov
[21 Feb 2008 23:34]
MySQL Verification Team
Thank you for the bug report. I wasn't able to repeat with current released
version:
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.23-rc-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use test
Database changed
mysql> create table a (
-> v int
-> );
Query OK, 0 rows affected (0.16 sec)
mysql>
mysql> create table b (
-> i int primary key auto_increment,
-> v int
-> );
Query OK, 0 rows affected (0.08 sec)
mysql>
mysql> delimiter |
mysql>
mysql> create trigger t_ad_a after delete on a for each row begin
-> insert into b (v) values (1);
-> insert into b (v) values (2);
-> end|
Query OK, 0 rows affected (0.05 sec)
mysql>
mysql> delimiter ;
mysql>
mysql> insert into a values (1);
Query OK, 1 row affected (0.06 sec)
mysql> insert into a values (2);
Query OK, 1 row affected (0.03 sec)
mysql> delete from a;
Query OK, 2 rows affected (0.06 sec)
mysql> insert into a values (3);
Query OK, 1 row affected (0.02 sec)
mysql> insert into a values (4);
Query OK, 1 row affected (0.03 sec)
mysql> delete from a;
Query OK, 2 rows affected (0.03 sec)
mysql>
