summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authorunknown <heikki@work.mysql.com>2002-09-04 19:01:39 +0200
committerunknown <heikki@work.mysql.com>2002-09-04 19:01:39 +0200
commit519c1185b32530b1657b21eb0e7a47df87b72785 (patch)
treeaae201ad56b7fbba9a7471ac8a81bd3d0f6257c6 /innobase/dict
parent385319b2cfad4edcd926f5bd5163c7921ca832e3 (diff)
downloadmariadb-git-519c1185b32530b1657b21eb0e7a47df87b72785.tar.gz
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
Diffstat (limited to 'innobase/dict')
-rw-r--r--innobase/dict/dict0dict.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 7bf85557cde..8204a50613e 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -323,6 +323,32 @@ dict_table_autoinc_decrement(
}
/************************************************************************
+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! */