summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authorheikki@work.mysql.com <>2002-09-04 18:53:48 +0200
committerheikki@work.mysql.com <>2002-09-04 18:53:48 +0200
commita16f3360aa48d2b5e1a90525599e91ab5f84695e (patch)
treeef3cb267c01475b0d1b8c2385ecee59dcd84b7f4 /innobase/dict
parent516cc0bd61e033c7068fa10a24cac4c71bc2490a (diff)
downloadmariadb-git-a16f3360aa48d2b5e1a90525599e91ab5f84695e.tar.gz
btr0btr.c Add more documentation about B-tree latching
ha_innodb.cc Remove gaps in auto-inc in multi-row inserts, more space for foreign key listings in SHOW TABLE STATUS, move resetting of active_trx to amore logical place dict0dict.h Remove gaps from auto-inc sequence if errors in multi-row insert dict0dict.c Remove gaps from auto-inc sequence if errors in multi-row insert
Diffstat (limited to 'innobase/dict')
-rw-r--r--innobase/dict/dict0dict.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 85199b90a5a..7bf85557cde 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -308,29 +308,18 @@ dict_table_autoinc_get(
}
/************************************************************************
-Reads the autoinc counter value, 0 if not yet initialized. Does not
-increment the counter. */
+Decrements the autoinc counter value by 1. */
-ib_longlong
-dict_table_autoinc_read(
-/*====================*/
- /* out: value of the counter */
+void
+dict_table_autoinc_decrement(
+/*=========================*/
dict_table_t* table) /* in: table */
{
- ib_longlong value;
-
mutex_enter(&(table->autoinc_mutex));
- if (!table->autoinc_inited) {
-
- value = 0;
- } else {
- value = table->autoinc;
- }
+ table->autoinc = table->autoinc - 1;
mutex_exit(&(table->autoinc_mutex));
-
- return(value);
}
/************************************************************************