コード例 #1
0
ファイル: trx0i_s.c プロジェクト: pombredanne/mysql-1
/*******************************************************************//**
Update the transactions cache if it has not been read for some time.
Called from handler/i_s.cc.
@return	0 - fetched, 1 - not */
UNIV_INTERN
int
trx_i_s_possibly_fetch_data_into_cache(
/*===================================*/
	trx_i_s_cache_t*	cache)	/*!< in/out: cache */
{
	if (!can_cache_be_updated(cache)) {

		return(1);
	}

	/* We are going to access trx->query in all transactions */
	innobase_mysql_prepare_print_arbitrary_thd();

	/* We need to read trx_sys and record/table lock queues */
	mutex_enter(&kernel_mutex);

	fetch_data_into_cache(cache);

	mutex_exit(&kernel_mutex);

	innobase_mysql_end_print_arbitrary_thd();

	return(0);
}
コード例 #2
0
ファイル: trx0i_s.c プロジェクト: H0bby/GCS-SQL
/*******************************************************************//**
Update the transactions cache if it has not been read for some time.
Called from handler/i_s.cc.
@return	0 - fetched, 1 - not */
UNIV_INTERN
int
trx_i_s_possibly_fetch_data_into_cache(
/*===================================*/
	trx_i_s_cache_t*	cache)	/*!< in/out: cache */
{
	if (!can_cache_be_updated(cache)) {

		return(1);
	}

	/* We need to read trx_sys and record/table lock queues */
	mutex_enter(&kernel_mutex);

	fetch_data_into_cache(cache);

	mutex_exit(&kernel_mutex);

	return(0);
}