Commit ea3990c7 authored by unknown's avatar unknown

dict0dict.h Put back code inadvertently removed in previous bk commit

dict0dict.c	Put back code inadvertently removed in previous bk commit


innobase/dict/dict0dict.c:
  Put back code inadvertently removed in previous bk commit
innobase/include/dict0dict.h:
  Put back code inadvertently removed in previous bk commit
parent 2fc75c68
...@@ -322,6 +322,32 @@ dict_table_autoinc_decrement( ...@@ -322,6 +322,32 @@ dict_table_autoinc_decrement(
mutex_exit(&(table->autoinc_mutex)); mutex_exit(&(table->autoinc_mutex));
} }
/************************************************************************
Reads the next autoinc value (== autoinc counter value), 0 if not yet
initialized. */
ib_longlong
dict_table_autoinc_read(
/*====================*/
/* out: value for a new row, or 0 */
dict_table_t* table) /* in: table */
{
ib_longlong value;
mutex_enter(&(table->autoinc_mutex));
if (!table->autoinc_inited) {
value = 0;
} else {
value = table->autoinc;
}
mutex_exit(&(table->autoinc_mutex));
return(value);
}
/************************************************************************ /************************************************************************
Peeks the autoinc counter value, 0 if not yet initialized. Does not Peeks the autoinc counter value, 0 if not yet initialized. Does not
increment the counter. The read not protected by any mutex! */ increment the counter. The read not protected by any mutex! */
......
...@@ -121,6 +121,15 @@ dict_table_autoinc_decrement( ...@@ -121,6 +121,15 @@ dict_table_autoinc_decrement(
/*=========================*/ /*=========================*/
dict_table_t* table); /* in: table */ dict_table_t* table); /* in: table */
/************************************************************************ /************************************************************************
Reads the next autoinc value (== autoinc counter value), 0 if not yet
initialized. */
ib_longlong
dict_table_autoinc_read(
/*====================*/
/* out: value for a new row, or 0 */
dict_table_t* table); /* in: table */
/************************************************************************
Peeks the autoinc counter value, 0 if not yet initialized. Does not Peeks the autoinc counter value, 0 if not yet initialized. Does not
increment the counter. The read not protected by any mutex! */ increment the counter. The read not protected by any mutex! */
......
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