Commit 6adc34bd authored by serg@serg.mysql.com's avatar serg@serg.mysql.com
Browse files

Merge work:/home/bk/mysql into serg.mysql.com:/usr/home/serg/Abk/mysql

parents ec0f506a 8a7ecfb9
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
@@ -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. */

+3 −0
Original line number Diff line number Diff line
@@ -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)
+14 −0
Original line number Diff line number Diff line
@@ -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. */

+6 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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