21 #include "my_global.h"
33 ulong events_waits_history_long_size= 0;
58 events_waits_history_long_size= events_waits_history_long_sizing;
62 if (events_waits_history_long_size == 0)
65 events_waits_history_long_array=
69 return (events_waits_history_long_array ? 0 : 1);
75 pfs_free(events_waits_history_long_array);
76 events_waits_history_long_array= NULL;
122 if (unlikely(events_waits_history_long_size == 0))
127 index= index % events_waits_history_long_size;
132 copy_events_waits(&events_waits_history_long_array[index], wait);
141 for ( ; pfs_thread < pfs_thread_last; pfs_thread++)
146 for ( ; pfs_wait < pfs_wait_last; pfs_wait++)
157 for ( ; pfs_thread < pfs_thread_last; pfs_thread++)
164 for ( ; wait < wait_last; wait++)
177 for ( ; wait < wait_last; wait++)
190 for ( ; thread < thread_last; thread++)
194 account= sanitize_account(thread->m_account);
195 user= sanitize_user(thread->m_user);
196 host= sanitize_host(thread->m_host);
197 aggregate_thread_waits(thread, account, user, host);
206 PFS_account *pfs_last= account_array + account_max;
210 for ( ; pfs < pfs_last; pfs++)
214 user= sanitize_user(pfs->m_user);
215 host= sanitize_host(pfs->m_host);
216 pfs->aggregate_waits(user, host);
225 PFS_user *pfs_last= user_array + user_max;
227 for ( ; pfs < pfs_last; pfs++)
230 pfs->aggregate_waits();
238 PFS_host *pfs_last= host_array + host_max;
240 for ( ; pfs < pfs_last; pfs++)
243 pfs->aggregate_waits();
247 void reset_table_waits_by_table()
252 for ( ; pfs < pfs_last; pfs++)
259 void reset_table_io_waits_by_table()
264 for ( ; pfs < pfs_last; pfs++)
271 void reset_table_lock_waits_by_table()
276 for ( ; pfs < pfs_last; pfs++)
279 pfs->aggregate_lock();
283 void reset_table_waits_by_table_handle()
288 for ( ; pfs < pfs_last; pfs++)
295 void reset_table_io_waits_by_table_handle()
300 for ( ; pfs < pfs_last; pfs++)
307 void reset_table_lock_waits_by_table_handle()
312 for ( ; pfs < pfs_last; pfs++)