diff options
author | unknown <monty@hundin.mysql.fi> | 2002-01-30 16:37:47 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-01-30 16:37:47 +0200 |
commit | 85278245af45fc301dc7940bec9a3434003285a6 (patch) | |
tree | 3ca7f6fddbb9bdc0b635f243af69c6606924c3c2 /innobase/dict | |
parent | 9369764f2226e0e8cb9724bcdac256f45330ba67 (diff) | |
parent | 8a56717c4ce14aa7e36e04a8dc880dcc1311ea28 (diff) | |
download | mariadb-git-85278245af45fc301dc7940bec9a3434003285a6.tar.gz |
Merge from 3.23.48 tree
BitKeeper/etc/logging_ok:
auto-union
Docs/manual.texi:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/include/srv0srv.h:
Auto merged
innobase/mem/mem0dbg.c:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/que/que0que.c:
Auto merged
innobase/rem/rem0rec.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/srv/srv0start.c:
Auto merged
innobase/sync/sync0arr.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/trx/trx0undo.c:
Auto merged
myisam/mi_check.c:
Auto merged
mysql-test/t/join.test:
Auto merged
mysys/hash.c:
Auto merged
scripts/mysql_config.sh:
Auto merged
sql/ha_innodb.h:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/sql_acl.cc:
Auto merged
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) |