From: Marc Alff Date: September 15 2010 8:46pm Subject: bzr commit into mysql-trunk-bugfixing branch (marc.alff:3267) List-Archive: http://lists.mysql.com/commits/118332 Message-Id: <20100915204649.2BF0545E80@linux-su11.site> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9010549821867679402==" --===============9010549821867679402== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #At file:///home/malff/BZR_TREE/mysql-trunk-bugfixing-merge/ based on revid:olav.sandstaa@stripped 3267 Marc Alff 2010-09-15 [merge] Merge mysql-5.5-bugfixing --> mysql-trunk-bugfixing added: mysql-test/suite/perfschema/r/checksum.result mysql-test/suite/perfschema/t/checksum.test modified: storage/perfschema/table_events_waits.cc storage/perfschema/table_events_waits.h === added file 'mysql-test/suite/perfschema/r/checksum.result' --- a/mysql-test/suite/perfschema/r/checksum.result 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/r/checksum.result 2010-09-15 18:20:48 +0000 @@ -0,0 +1,34 @@ +checksum table performance_schema.COND_INSTANCES; +checksum table performance_schema.EVENTS_WAITS_CURRENT; +checksum table performance_schema.EVENTS_WAITS_HISTORY; +checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME; +checksum table performance_schema.FILE_INSTANCES; +checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME; +checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE; +checksum table performance_schema.MUTEX_INSTANCES; +checksum table performance_schema.PERFORMANCE_TIMERS; +checksum table performance_schema.RWLOCK_INSTANCES; +checksum table performance_schema.SETUP_CONSUMERS; +checksum table performance_schema.SETUP_INSTRUMENTS; +checksum table performance_schema.SETUP_TIMERS; +checksum table performance_schema.THREADS; +checksum table performance_schema.COND_INSTANCES extended; +checksum table performance_schema.EVENTS_WAITS_CURRENT extended; +checksum table performance_schema.EVENTS_WAITS_HISTORY extended; +checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME extended; +checksum table performance_schema.FILE_INSTANCES extended; +checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME extended; +checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE extended; +checksum table performance_schema.MUTEX_INSTANCES extended; +checksum table performance_schema.PERFORMANCE_TIMERS extended; +checksum table performance_schema.RWLOCK_INSTANCES extended; +checksum table performance_schema.SETUP_CONSUMERS extended; +checksum table performance_schema.SETUP_INSTRUMENTS extended; +checksum table performance_schema.SETUP_TIMERS extended; +checksum table performance_schema.THREADS extended; === added file 'mysql-test/suite/perfschema/t/checksum.test' --- a/mysql-test/suite/perfschema/t/checksum.test 1970-01-01 00:00:00 +0000 +++ b/mysql-test/suite/perfschema/t/checksum.test 2010-09-15 18:20:48 +0000 @@ -0,0 +1,64 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */ + +# Tests for PERFORMANCE_SCHEMA + +--source include/not_embedded.inc +--source include/have_perfschema.inc + +# +# The checksum value itself is random (data is volatile), +# just testing that this does not crash +# +--disable_result_log + +checksum table performance_schema.COND_INSTANCES; +checksum table performance_schema.EVENTS_WAITS_CURRENT; +checksum table performance_schema.EVENTS_WAITS_HISTORY; +checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME; +checksum table performance_schema.FILE_INSTANCES; +checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME; +checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE; +checksum table performance_schema.MUTEX_INSTANCES; +checksum table performance_schema.PERFORMANCE_TIMERS; +checksum table performance_schema.RWLOCK_INSTANCES; +checksum table performance_schema.SETUP_CONSUMERS; +checksum table performance_schema.SETUP_INSTRUMENTS; +checksum table performance_schema.SETUP_TIMERS; +checksum table performance_schema.THREADS; + +checksum table performance_schema.COND_INSTANCES extended; +checksum table performance_schema.EVENTS_WAITS_CURRENT extended; +checksum table performance_schema.EVENTS_WAITS_HISTORY extended; +checksum table performance_schema.EVENTS_WAITS_HISTORY_LONG extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_INSTANCE extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME extended; +checksum table performance_schema.EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME extended; +checksum table performance_schema.FILE_INSTANCES extended; +checksum table performance_schema.FILE_SUMMARY_BY_EVENT_NAME extended; +checksum table performance_schema.FILE_SUMMARY_BY_INSTANCE extended; +checksum table performance_schema.MUTEX_INSTANCES extended; +checksum table performance_schema.PERFORMANCE_TIMERS extended; +checksum table performance_schema.RWLOCK_INSTANCES extended; +checksum table performance_schema.SETUP_CONSUMERS extended; +checksum table performance_schema.SETUP_INSTRUMENTS extended; +checksum table performance_schema.SETUP_TIMERS extended; +checksum table performance_schema.THREADS extended; + +--enable_result_log + === modified file 'storage/perfschema/table_events_waits.cc' --- a/storage/perfschema/table_events_waits.cc 2010-08-12 10:21:22 +0000 +++ b/storage/perfschema/table_events_waits.cc 2010-09-15 20:46:26 +0000 @@ -187,7 +187,7 @@ void table_events_waits_common::clear_ob */ void table_events_waits_common::make_row(bool thread_own_wait, PFS_thread *pfs_thread, - PFS_events_waits *wait) + volatile PFS_events_waits *wait) { pfs_lock lock; PFS_thread *safe_thread; @@ -260,21 +260,27 @@ void table_events_waits_common::make_row m_row.m_object_type= "TEMPORARY TABLE"; m_row.m_object_type_length= 15; } - memcpy(m_row.m_object_schema, wait->m_schema_name, - wait->m_schema_name_length); m_row.m_object_schema_length= wait->m_schema_name_length; - memcpy(m_row.m_object_name, wait->m_object_name, - wait->m_object_name_length); + if (unlikely((m_row.m_object_schema_length == 0) || + (m_row.m_object_schema_length > sizeof(m_row.m_object_schema)))) + return; + memcpy(m_row.m_object_schema, wait->m_schema_name, m_row.m_object_schema_length); m_row.m_object_name_length= wait->m_object_name_length; + if (unlikely((m_row.m_object_name_length == 0) || + (m_row.m_object_name_length > sizeof(m_row.m_object_name)))) + return; + memcpy(m_row.m_object_name, wait->m_object_name, m_row.m_object_name_length); safe_class= &global_table_class; break; case WAIT_CLASS_FILE: m_row.m_object_type= "FILE"; m_row.m_object_type_length= 4; m_row.m_object_schema_length= 0; - memcpy(m_row.m_object_name, wait->m_object_name, - wait->m_object_name_length); m_row.m_object_name_length= wait->m_object_name_length; + if (unlikely((m_row.m_object_name_length == 0) || + (m_row.m_object_name_length > sizeof(m_row.m_object_name)))) + return; + memcpy(m_row.m_object_name, wait->m_object_name, m_row.m_object_name_length); safe_class= sanitize_file_class((PFS_file_class*) wait->m_class); break; case NO_WAIT_CLASS: === modified file 'storage/perfschema/table_events_waits.h' --- a/storage/perfschema/table_events_waits.h 2010-07-23 17:08:41 +0000 +++ b/storage/perfschema/table_events_waits.h 2010-09-15 20:46:26 +0000 @@ -139,7 +139,7 @@ protected: void clear_object_columns(); void make_row(bool thread_own_wait, PFS_thread *pfs_thread, - PFS_events_waits *wait); + volatile PFS_events_waits *wait); /** Current row. */ row_events_waits m_row; --===============9010549821867679402== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/marc.alff@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: marc.alff@stripped # target_branch: file:///home/malff/BZR_TREE/mysql-trunk-bugfixing-\ # merge/ # testament_sha1: 25254d1f832ec0528f5105c318a39fe6826c0c86 # timestamp: 2010-09-15 14:46:49 -0600 # source_branch: file:///home/malff/BZR_TREE/mysql-5.5-bugfixing/ # base_revision_id: olav.sandstaa@stripped\ # 6jwundfyb0o9ouxm # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWc+uFGwAB9HfgFAWWnf//3/v 3+C////0YA6nUu3Nu+87MCiFRUaiAALaqIUa2bbYLZtmzNErhkgjQmk2jKbU02SZqZGgAADRiADQ 0ElAI00JpgJNMip5iKflTaaj0I9R5Rk0ADaQimDKTRoaAAA0AaAAAAAABIkTU9BATUxMynppT1PF NkT9IynlD0gA0ep6g0OAYRhNMQwCAZADCNMmTCMBDQKkiAiYBGiaKeVPwIp5GptqTCabSMARtAhL xAydslGBIMMonoowB+NCoBiq3pQHBB+CmlKWotoDjKV6Sklg5rzsuZ6kBbf5EWy4kIsCYKC5sSLx TtmSRCHPKCx8Tk8TTlfOe+96AAISLbTgGfjkIuoX3qUUrRPysD765bxIIaCUEfErR7x6xv6BfyZ6 4xg0GcwwQ2NtC3Lyv+IuDY/VoraMubcQ21Y1iLdkjWUi5l1YOOc5RGq6rVaPW3E3KkUxa40bcLcV XfhhJu6cVA+M9oU7E1iS5ozLFtAG5zviIshal2Bgr/RqiYK7ssICQ/mo7EuDabbCSE5MmIT+yEjV zOQFFVUyYFGUgDnjAEgzHrPuFMYMFj4qp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