Bug# 13847885 - PURGING STALLS WHEN PURGE_SYS->N_PAGES_HANDLED OVERFLOWS

Change the type of purge_sys_t::n_pages_handled and purge_sys_t::handle_limit
to ulonglong from ulint. On a 32 bit system doing ~700 deletes per second the
counters can overflow in ~3.5 months, if they are 32 bit.

Approved by Jimmy Yang over IM.
This commit is contained in:
Sunny Bains 2012-03-28 13:08:25 +11:00
parent 7c669c7c57
commit 65126ffa57
2 changed files with 4 additions and 4 deletions

View file

@ -120,9 +120,9 @@ struct trx_purge_struct{
read_view_t* view; /* The purge will not remove undo logs
which are >= this view (purge view) */
mutex_t mutex; /* Mutex protecting the fields below */
ulint n_pages_handled;/* Approximate number of undo log
ulonglong n_pages_handled;/* Approximate number of undo log
pages processed in purge */
ulint handle_limit; /* Target of how many pages to get
ulonglong handle_limit; /* Target of how many pages to get
processed in the current purge */
/*------------------------------*/
/* The following two fields form the 'purge pointer' which advances

View file

@ -1041,7 +1041,7 @@ trx_purge(void)
{
que_thr_t* thr;
/* que_thr_t* thr2; */
ulint old_pages_handled;
ulonglong old_pages_handled;
mutex_enter(&(purge_sys->mutex));
@ -1135,7 +1135,7 @@ trx_purge(void)
(ulong) purge_sys->n_pages_handled);
}
return(purge_sys->n_pages_handled - old_pages_handled);
return((ulint) (purge_sys->n_pages_handled - old_pages_handled));
}
/**********************************************************************