21 #include "my_global.h"
33 ulong events_statements_history_long_size= 0;
54 events_statements_history_long_size= events_statements_history_long_sizing;
58 if (events_statements_history_long_size == 0)
61 events_statements_history_long_array=
65 return (events_statements_history_long_array ? 0 : 1);
71 pfs_free(events_statements_history_long_array);
72 events_statements_history_long_array= NULL;
120 if (unlikely(events_statements_history_long_size == 0))
123 DBUG_ASSERT(events_statements_history_long_array != NULL);
127 index= index % events_statements_history_long_size;
132 copy_events_statements(&events_statements_history_long_array[index], statement);
141 for ( ; pfs_thread < pfs_thread_last; pfs_thread++)
146 for ( ; pfs_stmt < pfs_stmt_last; pfs_stmt++)
157 for ( ; pfs_thread < pfs_thread_last; pfs_thread++)
164 for ( ; pfs < pfs_last; pfs++)
177 for ( ; pfs < pfs_last; pfs++)
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_statements(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_statements(user, host);
225 PFS_user *pfs_last= user_array + user_max;
227 for ( ; pfs < pfs_last; pfs++)
230 pfs->aggregate_statements();
238 PFS_host *pfs_last= host_array + host_max;
240 for ( ; pfs < pfs_last; pfs++)
243 pfs->aggregate_statements();
253 for ( ; stat < stat_last; stat++)