mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 15:54:37 +01:00
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:
parent
88867daed7
commit
dacf7fdbea
1 changed files with 5 additions and 0 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue