[Zope] mysql auto_increment adding numbers on its own

Chris McDonough chrism@zope.com
Tue, 02 Oct 2001 21:22:31 -0400


Guess:  Do you see a ConflictError in the STUPID_LOG_FILE at around the 
same time that the bogus orders are added?

Ron Bickers wrote:
> I have a ZSQL Method that uses MySQL's auto_increment and LAST_INSERT_ID()
> features to return the next order number.  After my Python Script runs the
> zsql method to obtain the number, it proceeds to encrypt the order and
> updates the newly added MySQL record to include the encrypted text.
> 
> This normally works okay, but somewhat regularly, and for no apparent
> reason, I end up with anywhere from 1 to 3 records in a row with
> auto_incremented numbers, but are null where there is normally the encrypted
> order.  The orders are also e-mailed, and there has never been a case where
> an order was e-mailed and not inserted into the database, so it seems that
> *something* is causing MySQL to insert records on its own even when no order
> is being placed.
> 
> Any ideas on why and/or how to prevent this?
> 
> _______________________
> 
> Ron Bickers
> Logic Etc, Inc.
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
> 


-- 
Chris McDonough                    Zope Corporation
http://www.zope.org             http://www.zope.com
"Killing hundreds of birds with thousands of stones"