Bug #16304 insert into made twice
Submitted: 9 Jan 2006 16:17 Modified: 12 Jan 2006 7:43
Reporter: Eliyahu Peter Kornfeld Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.1.18 OS:Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any

[9 Jan 2006 16:17] Eliyahu Peter Kornfeld
Description:
I have 64654 row in text file in 'inset into format' like these lines:

insert into accents (book_id, word_id, version_id, letter_id, accent_value) values (1,1,null,4,1430);
insert into accents (book_id, word_id, version_id, letter_id, accent_value) values (1,10,null,1,1448);
insert into accents (book_id, word_id, version_id, letter_id, accent_value) values (1,10,null,3,1433);

When I run them in a script window inside the MySQL QB I got every line twice - except the first.

How to repeat:
Open MySQL QB.
Create a DB.
Create tabel named 'accents'
Add the five fileds (all of them are integers with NULL default value).
Open a new script window and run the three lines abouve.
[10 Jan 2006 5:51] Valeriy Kravchuk
Thank you for a problem report. Please, send the SHOW CREATE TABLE accents results, just to be sure. What version of MySQL server are you working with?
[10 Jan 2006 6:41] Eliyahu Peter Kornfeld
this is the create command used to the table

CREATE TABLE `accents` (
  `book_id` int(11) default NULL,
  `word_id` int(11) default NULL,
  `version_id` int(11) default NULL,
  `letter_id` int(11) default NULL,
  `accent_value` int(11) default NULL,
  KEY `IX_accents` (`book_id`,`word_id`,`version_id`,`letter_id`)
) ENGINE=MyISAM

i am using MySQL 5.0.18-nt over tcp/ip

I also think that the problem exist only if I have large number of insert commands in the script window (I run on a table with 15 rows only and it went ok)
[11 Jan 2006 6:57] Josh Danziger
I experienced what I think is the same problem.  I ran a large INSERT script (the direct output of a mysqldump command; 6,413 lines) using the query browser.

For every INSERT statement, an error appeared "Duplicate entry '..whatever..' for key 1".  I did not notice any duplicate data because of my unique indices, but I suspect that each INSERT was being executed twice.
[12 Jan 2006 7:43] Valeriy Kravchuk
Looks like a duplicate of bug #16369, already verified. At least, they may have the same reason, and the fix for bug #16369 should help to solve this problem too.