Loading innobase/dict/dict0dict.c +32 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,38 @@ dict_mutex_exit_for_mysql(void) mutex_exit(&(dict_sys->mutex)); } /************************************************************************ 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. */ Loading innobase/dict/dict0mem.c +3 −0 Original line number Diff line number Diff line Loading @@ -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) Loading innobase/include/dict0dict.h +14 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,20 @@ Created 1/8/1996 Heikki Tuuri #include "ut0byte.h" #include "trx0types.h" /************************************************************************ Increments the count of open MySQL handles to a table. */ void dict_table_increment_handle_count( /*==============================*/ dict_table_t* table); /* in: table */ /************************************************************************ Decrements the count of open MySQL handles to a table. */ void dict_table_decrement_handle_count( /*==============================*/ dict_table_t* table); /* in: table */ /************************************************************************** Inits the data dictionary module. */ Loading innobase/include/dict0mem.h +6 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,12 @@ struct dict_table_struct{ ulint mem_fix;/* count of how many times the table and its indexes has been fixed in memory; currently NOT used */ ulint n_mysql_handles_opened; /* count of how many handles MySQL has opened to this table; dropping of the table is NOT allowed until this count gets to zero; MySQL does NOT itself check the number of open handles at drop */ ibool cached; /* TRUE if the table object has been added to the dictionary cache */ lock_t* auto_inc_lock;/* a buffer for an auto-inc lock Loading innobase/include/dyn0dyn.h +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ typedef dyn_block_t dyn_array_t; /* Initial 'payload' size in bytes in a dynamic array block */ #define DYN_ARRAY_DATA_SIZE 1024 #define DYN_ARRAY_DATA_SIZE 512 /************************************************************************* Initializes a dynamic array. */ Loading Loading
innobase/dict/dict0dict.c +32 −0 Original line number Diff line number Diff line Loading @@ -195,6 +195,38 @@ dict_mutex_exit_for_mysql(void) mutex_exit(&(dict_sys->mutex)); } /************************************************************************ 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. */ Loading
innobase/dict/dict0mem.c +3 −0 Original line number Diff line number Diff line Loading @@ -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) Loading
innobase/include/dict0dict.h +14 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,20 @@ Created 1/8/1996 Heikki Tuuri #include "ut0byte.h" #include "trx0types.h" /************************************************************************ Increments the count of open MySQL handles to a table. */ void dict_table_increment_handle_count( /*==============================*/ dict_table_t* table); /* in: table */ /************************************************************************ Decrements the count of open MySQL handles to a table. */ void dict_table_decrement_handle_count( /*==============================*/ dict_table_t* table); /* in: table */ /************************************************************************** Inits the data dictionary module. */ Loading
innobase/include/dict0mem.h +6 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,12 @@ struct dict_table_struct{ ulint mem_fix;/* count of how many times the table and its indexes has been fixed in memory; currently NOT used */ ulint n_mysql_handles_opened; /* count of how many handles MySQL has opened to this table; dropping of the table is NOT allowed until this count gets to zero; MySQL does NOT itself check the number of open handles at drop */ ibool cached; /* TRUE if the table object has been added to the dictionary cache */ lock_t* auto_inc_lock;/* a buffer for an auto-inc lock Loading
innobase/include/dyn0dyn.h +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ typedef dyn_block_t dyn_array_t; /* Initial 'payload' size in bytes in a dynamic array block */ #define DYN_ARRAY_DATA_SIZE 1024 #define DYN_ARRAY_DATA_SIZE 512 /************************************************************************* Initializes a dynamic array. */ Loading