• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
PK Generation in MySQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PK Generation in MySQL


  • Subject: PK Generation in MySQL
  • From: "Randy Wigginton" <email@hidden>
  • Date: Thu, 18 May 2006 13:50:08 -0400

This seems like a surprisingly obvious bug, so I figured I’d better ask what I’m doing wrong.

 

I have some code that writes records to a MySQL DB.  The PK is a simple INT, and the field is the only one the record locks on.  Everything works fine in a single thread… but when I start a second thread writing to the table, sooner or later one thread gets a “duplicate entry ‘187451’ for key 1.”

 

Do I need to do something special for MySQL to get PK generation working correctly?

 

 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: PK Generation in MySQL
      • From: Robert Walker <email@hidden>
  • Prev by Date: Re: Setting a Default toOne Relationship
  • Next by Date: Re: Setting a Default toOne Relationship
  • Previous by thread: Re: Setting a Default toOne Relationship
  • Next by thread: Re: PK Generation in MySQL
  • Index(es):
    • Date
    • Thread