21 #include "my_global.h" 
   33 ulong events_stages_history_long_size= 0;
 
   54   events_stages_history_long_size= events_stages_history_long_sizing;
 
   58   if (events_stages_history_long_size == 0)
 
   61   events_stages_history_long_array=
 
   65   return (events_stages_history_long_array ? 0 : 1);
 
   71   pfs_free(events_stages_history_long_array);
 
   72   events_stages_history_long_array= NULL;
 
  120   if (unlikely(events_stages_history_long_size == 0))
 
  123   DBUG_ASSERT(events_stages_history_long_array != NULL);
 
  127   index= index % events_stages_history_long_size;
 
  132   copy_events_stages(&events_stages_history_long_array[index], stage);
 
  141   for ( ; pfs_thread < pfs_thread_last; pfs_thread++)
 
  143     pfs_thread->m_stage_current.
m_class= NULL;
 
  153   for ( ; pfs_thread < pfs_thread_last; pfs_thread++)
 
  160     for ( ; pfs < pfs_last; pfs++)
 
  173   for ( ; pfs < pfs_last; pfs++)
 
  186   for ( ; thread < thread_last; thread++)
 
  190       account= sanitize_account(thread->m_account);
 
  191       user= sanitize_user(thread->m_user);
 
  192       host= sanitize_host(thread->m_host);
 
  193       aggregate_thread_stages(thread, account, user, host);
 
  202   PFS_account *pfs_last= account_array + account_max;
 
  206   for ( ; pfs < pfs_last; pfs++)
 
  210       user= sanitize_user(pfs->m_user);
 
  211       host= sanitize_host(pfs->m_host);
 
  212       pfs->aggregate_stages(user, host);
 
  221   PFS_user *pfs_last= user_array + user_max;
 
  223   for ( ; pfs < pfs_last; pfs++)
 
  226       pfs->aggregate_stages();
 
  234   PFS_host *pfs_last= host_array + host_max;
 
  236   for ( ; pfs < pfs_last; pfs++)
 
  239       pfs->aggregate_stages();
 
  249   for ( ; stat < stat_last; stat++)