Commit 0ebe1273 authored by Sunny Bains's avatar Sunny Bains

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.
parent e990b8da
......@@ -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
......
......@@ -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));
}
/**********************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment