Loading innobase/dict/dict0dict.c +26 −0 Original line number Diff line number Diff line Loading @@ -322,6 +322,32 @@ dict_table_autoinc_decrement( 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 increment the counter. The read not protected by any mutex! */ Loading innobase/include/dict0dict.h +9 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,15 @@ dict_table_autoinc_decrement( /*=========================*/ 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 increment the counter. The read not protected by any mutex! */ Loading Loading
innobase/dict/dict0dict.c +26 −0 Original line number Diff line number Diff line Loading @@ -322,6 +322,32 @@ dict_table_autoinc_decrement( 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 increment the counter. The read not protected by any mutex! */ Loading
innobase/include/dict0dict.h +9 −0 Original line number Diff line number Diff line Loading @@ -121,6 +121,15 @@ dict_table_autoinc_decrement( /*=========================*/ 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 increment the counter. The read not protected by any mutex! */ Loading