By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 1,847 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

v4 error on insert with duplicate entries

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.