Add assertion to enforce check of an implicit invariant and add comment about

retry of autoinc read semantics. We always reread the table's autoinc counter
after attempting to initialize it i.e., we want to guarantee that a read of
autoinc valus that is returned to the caller is always covered by the
AUTOINC locking mechanism.
This commit is contained in:
sunny 2007-09-09 22:41:42 +00:00
parent 88867daed7
commit dacf7fdbea

View file

@ -7230,6 +7230,11 @@ ha_innobase::innobase_get_auto_increment(
{
ulint error;
ut_a(*value == 0);
/* Note: If the table is not initialized when we attempt the
read below. We initialize the table's auto-inc counter and
always do a reread of the AUTOINC value. */
do {
error = innobase_autoinc_lock();