summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2002-01-28 22:18:49 +0200
committerunknown <heikki@donna.mysql.fi>2002-01-28 22:18:49 +0200
commitac540e96a915c30034a4fc03ef65b60b8392f664 (patch)
treeaa7f771761883b28925048ff5e37e2eb85d77c00 /innobase/dict
parent2aa572433b9ce47a511958ce263c8400c2e81ac3 (diff)
downloadmariadb-git-ac540e96a915c30034a4fc03ef65b60b8392f664.tar.gz
Many files:
Merge InnoDB-.48 sql/ha_innobase.cc: Merge InnoDB-.48 innobase/include/dict0dict.h: Merge InnoDB-.48 innobase/include/dict0mem.h: Merge InnoDB-.48 innobase/include/mem0dbg.h: Merge InnoDB-.48 innobase/include/mem0mem.h: Merge InnoDB-.48 innobase/include/que0que.h: Merge InnoDB-.48 innobase/include/row0mysql.h: Merge InnoDB-.48 innobase/include/srv0srv.h: Merge InnoDB-.48 innobase/include/trx0sys.h: Merge InnoDB-.48 innobase/include/trx0trx.h: Merge InnoDB-.48 innobase/include/mem0mem.ic: Merge InnoDB-.48 innobase/dict/dict0dict.c: Merge InnoDB-.48 innobase/dict/dict0mem.c: Merge InnoDB-.48 innobase/log/log0recv.c: Merge InnoDB-.48 innobase/mem/mem0dbg.c: Merge InnoDB-.48 innobase/mem/mem0mem.c: Merge InnoDB-.48 innobase/pars/lexyy.c: Merge InnoDB-.48 innobase/que/que0que.c: Merge InnoDB-.48 innobase/rem/rem0rec.c: Merge InnoDB-.48 innobase/row/row0mysql.c: Merge InnoDB-.48 innobase/row/row0sel.c: Merge InnoDB-.48 innobase/srv/srv0srv.c: Merge InnoDB-.48 innobase/sync/sync0arr.c: Merge InnoDB-.48 innobase/trx/trx0sys.c: Merge InnoDB-.48 innobase/trx/trx0trx.c: Merge InnoDB-.48 innobase/trx/trx0undo.c: Merge InnoDB-.48
Diffstat (limited to 'innobase/dict')
-rw-r--r--innobase/dict/dict0dict.c32
-rw-r--r--innobase/dict/dict0mem.c3
2 files changed, 35 insertions, 0 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 9e32be9e02d..95f9b54c914 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -196,6 +196,38 @@ dict_mutex_exit_for_mysql(void)
}
/************************************************************************
+Increments the count of open MySQL handles to a table. */
+
+void
+dict_table_increment_handle_count(
+/*==============================*/
+ dict_table_t* table) /* in: table */
+{
+ mutex_enter(&(dict_sys->mutex));
+
+ table->n_mysql_handles_opened++;
+
+ mutex_exit(&(dict_sys->mutex));
+}
+
+/************************************************************************
+Decrements the count of open MySQL handles to a table. */
+
+void
+dict_table_decrement_handle_count(
+/*==============================*/
+ dict_table_t* table) /* in: table */
+{
+ mutex_enter(&(dict_sys->mutex));
+
+ ut_a(table->n_mysql_handles_opened > 0);
+
+ table->n_mysql_handles_opened--;
+
+ mutex_exit(&(dict_sys->mutex));
+}
+
+/************************************************************************
Gets the nth column of a table. */
dict_col_t*
diff --git a/innobase/dict/dict0mem.c b/innobase/dict/dict0mem.c
index 019d6ef334f..1f9a44aca35 100644
--- a/innobase/dict/dict0mem.c
+++ b/innobase/dict/dict0mem.c
@@ -59,6 +59,9 @@ dict_mem_table_create(
table->n_def = 0;
table->n_cols = n_cols + DATA_N_SYS_COLS;
table->mem_fix = 0;
+
+ table->n_mysql_handles_opened = 0;
+
table->cached = FALSE;
table->cols = mem_heap_alloc(heap, (n_cols + DATA_N_SYS_COLS)