469,601 Members | 2,329 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,601 developers. It's quick & easy.

v4 error on insert with duplicate entries

It appears to me that MySQL version 4 returns an error messge when doing an
Insert that results in duplicate entries. Version 3 did NOT return an
error - it dropped the duplicate entries and ran to completion. Version 4
seems to STOP when it encounters a duplicate entry, so that the records
before the duplicate are inserted and the records after the duplicate are
not inserted.

3.22.27.1 - previous ver MySQL that did not return error
4.0.16.0 - current ver MySQL that returns error.
Running on Red Hat Linux 7.3

Is there a way to change this behavior to the way it was handled in version
3? Are there configuration settings on MySQL that control this?
--
Gary
To reply, remove the XXX from garyXXXlund
Jul 19 '05 #1
1 2647
I found the answer.

"Prior to MySQL 4.0.1, INSERT . . . SELECT implicitly operates in IGNORE
mode. As of MySQL 4.0.1, you should specify IGNORE explicitly to ignore
records that would cause duplicate-key violations."
"Gary Lundquest" <ga*********@io.com> wrote in message
news:q6*************@newssvr22.news.prodigy.com...
It appears to me that MySQL version 4 returns an error messge when doing an Insert that results in duplicate entries. Version 3 did NOT return an
error - it dropped the duplicate entries and ran to completion. Version 4
seems to STOP when it encounters a duplicate entry, so that the records
before the duplicate are inserted and the records after the duplicate are
not inserted.

3.22.27.1 - previous ver MySQL that did not return error
4.0.16.0 - current ver MySQL that returns error.
Running on Red Hat Linux 7.3

Is there a way to change this behavior to the way it was handled in version 3? Are there configuration settings on MySQL that control this?
--
Gary
To reply, remove the XXX from garyXXXlund

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by jason | last post: by
reply views Thread by Gary Lundquest | last post: by
1 post views Thread by Gary Lundquest | last post: by
18 posts views Thread by Elroyskimms | last post: by
1 post views Thread by Muhammad Usman | last post: by
8 posts views Thread by nano2k | last post: by
1 post views Thread by JJ | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.