Commit dacf7fdb authored by sunny's avatar sunny

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.
parent 88867dae
...@@ -7230,6 +7230,11 @@ ha_innobase::innobase_get_auto_increment( ...@@ -7230,6 +7230,11 @@ ha_innobase::innobase_get_auto_increment(
{ {
ulint error; 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 { do {
error = innobase_autoinc_lock(); error = innobase_autoinc_lock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment