After some tinkering around on one of my test database servers with this
sequence table design; I see what you mean.
Defining the table with store_id and seq_id columns allows me to UPDATE
table SET seq_id=LAST_INSERT_ID(seq_id+1) WHERE store_id=N and will block
any further updates on store_id=N t
Others may correct me if I'm wrong, but if you want to maintain your own auto
increment without duplicates like that, then you need to serialize inserts to
your table. Which means either doing an explicit table lock by the process
that's inserting, or using innodb with transactions in the SERIA