summaryrefslogtreecommitdiff
path: root/storage/perfschema
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-02-28 18:42:49 +0100
committerSergei Golubchik <sergii@pisem.net>2013-02-28 18:42:49 +0100
commit8161c6772d144d6a4f08fc924ff6e6e403d1371d (patch)
tree3f1fe5f8048a163da4eadf0f86c1fd2a3007955d /storage/perfschema
parent154aac8eb002f5d167153e09f1d13570989521e0 (diff)
parent31c06437c970d4d0f4ec0301acac9c56e0ed29b5 (diff)
downloadmariadb-git-8161c6772d144d6a4f08fc924ff6e6e403d1371d.tar.gz
merge with mysql-5.5.30 minus few incorrect or not applicable changesets
Diffstat (limited to 'storage/perfschema')
-rw-r--r--storage/perfschema/pfs_events_waits.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/perfschema/pfs_events_waits.cc b/storage/perfschema/pfs_events_waits.cc
index b6cadf9e61c..a941f815dca 100644
--- a/storage/perfschema/pfs_events_waits.cc
+++ b/storage/perfschema/pfs_events_waits.cc
@@ -93,6 +93,9 @@ static inline void copy_events_waits(PFS_events_waits *dest,
*/
void insert_events_waits_history(PFS_thread *thread, PFS_events_waits *wait)
{
+ if (unlikely(events_waits_history_per_thread == 0))
+ return;
+
uint index= thread->m_waits_history_index;
/*
@@ -120,6 +123,9 @@ void insert_events_waits_history(PFS_thread *thread, PFS_events_waits *wait)
*/
void insert_events_waits_history_long(PFS_events_waits *wait)
{
+ if (unlikely(events_waits_history_long_size == 0))
+ return;
+
uint index= PFS_atomic::add_u32(&events_waits_history_long_index, 1);
index= index % events_waits_history_long_size;