Hi!
On Feb 05, Daniel R. Anderson wrote:
> I got the following error on a perl script:
>
> "Duplicate entry '273' for key 1"
>
> I googled for it and found a thread telling me to DROP the table and re
> CREATE it. So I did, and my script is working fine. My question: why
> did this happen, why did dropping and recreating work, and what can I do
> in the future if this happens and I've got things in my database I don't
> want to DROP?
The error means:
CREATE TABLE test (a int primary key);
insert test values (273);
insert test values (273);
If you got it for any other reason (which seems to be the case, as
DROP+recreate helped) the answers would be:
"why did this happen" - because you hit a bug (probably)
"what can I do in the future if this happens" - submit a bugreport,
including a repeatable test case on http:/bugs.mysql.com.
This way you can make sure it won't happen for the third time :)
Regards,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer
/_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]