diff options
author | monty@hundin.mysql.fi <> | 2002-01-30 16:37:47 +0200 |
---|---|---|
committer | monty@hundin.mysql.fi <> | 2002-01-30 16:37:47 +0200 |
commit | 79796e989f13c98df32e13d404571b76b1ae6dab (patch) | |
tree | 3ca7f6fddbb9bdc0b635f243af69c6606924c3c2 /innobase/dict | |
parent | c396824b2a733651acbe5a23a40a0e59ce628678 (diff) | |
parent | 3457b6fde0ee4c08a45a2a1584522b260c444768 (diff) | |
download | mariadb-git-79796e989f13c98df32e13d404571b76b1ae6dab.tar.gz |
Merge from 3.23.48 tree
Diffstat (limited to 'innobase/dict')
-rw-r--r-- | innobase/dict/dict0dict.c | 32 | ||||
-rw-r--r-- | innobase/dict/dict0mem.c | 3 |
2 files changed, 35 insertions, 0 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index b5a826dde02..8311c508ccc 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) |