Exemplo n.º 1
0
/********************************************************************//**
Does a truncate if the purge array is empty. NOTE that when this function is
called, the caller must not have any latches on undo log pages! */
UNIV_INLINE
void
trx_purge_truncate_if_arr_empty(void)
/*=================================*/
{
    static ulint	count;

    if (!(++count % TRX_SYS_N_RSEGS) && purge_sys->arr->n_used == 0) {

        trx_purge_truncate_history();
    }
}
Exemplo n.º 2
0
/********************************************************************//**
Does a truncate if the purge array is empty. NOTE that when this function is
called, the caller must not have any latches on undo log pages!
@return	TRUE if array empty */
UNIV_INLINE
ibool
trx_purge_truncate_if_arr_empty(void)
/*=================================*/
{
	ut_ad(mutex_own(&(purge_sys->mutex)));

	if (purge_sys->arr->n_used == 0) {
		ut_d(purge_sys->done_trx_no = purge_sys->purge_trx_no);

		trx_purge_truncate_history();

		return(TRUE);
	}

	return(FALSE);
}
Exemplo n.º 3
0
/************************************************************************
Does a truncate if the purge array is empty. NOTE that when this function is
called, the caller must not have any latches on undo log pages! */
UNIV_INLINE
ibool
trx_purge_truncate_if_arr_empty(void)
/*=================================*/
			/* out: TRUE if array empty */
{
	ut_ad(mutex_own(&(purge_sys->mutex)));

	if (purge_sys->arr->n_used == 0) {

		trx_purge_truncate_history();

		return(TRUE);
	}

	return(FALSE);
}
Exemplo n.º 4
0
/********************************************************************//**
Does a truncate if the purge array is empty. NOTE that when this function is
called, the caller must not have any latches on undo log pages! */
UNIV_INLINE
void
trx_purge_truncate_if_arr_empty(void)
/*=================================*/
{
	static ulint	count;

#ifdef UNIV_DEBUG
	if (purge_sys->arr->n_used == 0) {
		purge_sys->done_trx_no = purge_sys->purge_trx_no;
	}
#endif /* UNIV_DEBUG */

	if (!(++count % TRX_SYS_N_RSEGS) && purge_sys->arr->n_used == 0) {

		trx_purge_truncate_history();
	}
}