auto increments get old values after deleting records in mysql -
in mysql table tabrespond
have field rn
primary field , set auto_increment
.
my 1 php process 1 continue add records in table. , php process 2 read , delete records same table.
my php process 2 wants rn values in table must unique. (as set auto_increment should unique). process 1 add daily 40 50 records in table , same read , deleted process 2.
it worked fine days. 1 day shocked see next rn value come 345 (where last record read value of rn 765) means instead of next rn value 766, comes 345,346,347. values of rn taken process 2, required rn must unique.
how can solve problem rn auto-increment should not auto reset previous values.
Comments
Post a Comment