MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Steve Hay Date:July 12 2002 2:48pm
Subject:Re: Bug with AUTO_INCREMENT
View as plain text  
Victoria Reznichenko wrote:

>Wednesday, July 10, 2002, 11:12:48 AM, you wrote:
>SH> The bug can be reproduced as follows:
>SH> Create the following simple database containing just one BDB table:
>SH>     CREATE TABLE foo (
>SH>        num INT,
>SH>        str VARCHAR(10),
>SH>        PRIMARY KEY (id)
>SH>     ) TYPE=BDB;
>SH> Now start two "mysql.exe" sessions running with the "-f" flag to ignore 
>SH> errors.
>SH> Set each one into "no auto-commit" mode with:
>SH> and then feed each of them the following two lines 50,000 times each:
>SH>     INSERT INTO foo (num, str) VALUES (1, 'a');
>SH>     COMMIT;
>SH> When I inspect the output collected in these log files I find, not 
>SH> unexpectedly, that there are many "deadlock" errors (which I'm quite 
>SH> comfortable with, and can handle in my real software by simply retrying 
>SH> the transaction), but that there are also a few of the following error:
>SH>     Duplicate entry '1' for key 1
>SH> Surely this is a bug isn't it?
>Steve, I tested your example with PHP script, but I didn't get any
>Duplicate entry error ...
>(I tested with BDB tables and SET AUTOCOMMIT=0).

What was the PHP script that you tested it with?

Perhaps I could try the same PHP script myself and see what I get.

I've also found that my test fails on some machines and works on others; 
sometimes it runs on a lot further than 50,000 iterations on some 
machines before it fails.

My desktop machine is a WinNT4 PIII 667MHz.  What sort of machine have 
you tried on?

- Steve

Bug with AUTO_INCREMENTSteve Hay10 Jul
  • Re: Bug with AUTO_INCREMENTRichard Fox10 Jul
  • Re: Bug with AUTO_INCREMENTSteve Hay10 Jul
    • Re: Bug with AUTO_INCREMENTThomas Spahni10 Jul
  • Re: Bug with AUTO_INCREMENTVictoria Reznichenko12 Jul
  • Re: Bug with AUTO_INCREMENTSteve Hay12 Jul
Re: Bug with AUTO_INCREMENTSteve Hay10 Jul
Re: Bug with AUTO_INCREMENTMark Matthews10 Jul
Re: Bug with AUTO_INCREMENTSteve Hay12 Jul