List:Commits« Previous MessageNext Message »
From:Marc Alff Date:December 2 2010 4:39pm
Subject:bzr commit into mysql-trunk-bugfixing branch (marc.alff:3410) WL#4816
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-trunk-bugfixing-merge/ based on revid:marc.alff@stripped

 3410 Marc Alff	2010-12-02
      Merge cleanup, reconciled:
      - WL#4816 PERFORMANCE SCHEMA SUMMARIES
      - performance schema bug fixes
      within mysql-trunk-bugfixing

    added:
      mysql-test/suite/perfschema/t/thread_cache-master.opt
    modified:
      mysql-test/suite/perfschema/t/thread_cache.test
      storage/perfschema/pfs_instr.cc
      storage/perfschema/table_setup_objects.cc
=== added file 'mysql-test/suite/perfschema/t/thread_cache-master.opt'
--- a/mysql-test/suite/perfschema/t/thread_cache-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/thread_cache-master.opt	2010-12-02 16:38:55 +0000
@@ -0,0 +1 @@
+--loose-performance_schema_max_thread_class=200

=== modified file 'mysql-test/suite/perfschema/t/thread_cache.test'
--- a/mysql-test/suite/perfschema/t/thread_cache.test	2010-12-01 18:46:51 +0000
+++ b/mysql-test/suite/perfschema/t/thread_cache.test	2010-12-02 16:38:55 +0000
@@ -18,6 +18,12 @@
 --source include/not_embedded.inc
 --source include/have_perfschema.inc
 
+#
+# Important note:
+# this test is extremely sensitive to how threads are running inside the server,
+# so it has it's own -master.opt file, to enforce it runs alone in mysqld
+#
+
 # Setup
 
 flush status;
@@ -58,6 +64,10 @@ select @thread_id_increment;
 
 --connection default
 
+# Debug
+# select * from performance_schema.threads
+#   where name like "thread/sql/one_connection";
+
 # Wait for the disconnect con2 to complete
 let $wait_condition=
   select count(*) = 2 from performance_schema.threads
@@ -76,6 +86,10 @@ let $con3_THREAD_ID=`select thread_id fr
 
 --connection default
 
+# Debug
+# select * from performance_schema.threads
+#   where name like "thread/sql/one_connection";
+
 # Wait for the disconnect con1 and con3 to complete
 let $wait_condition=
   select count(*) = 1 from performance_schema.threads
@@ -122,6 +136,10 @@ select @thread_id_increment;
 
 --connection default
 
+# Debug
+# select * from performance_schema.threads
+#   where name like "thread/sql/one_connection";
+
 # Wait for the disconnect con2 to complete
 let $wait_condition=
   select count(*) = 2 from performance_schema.threads
@@ -140,6 +158,10 @@ let $con3_THREAD_ID=`select thread_id fr
 
 --connection default
 
+# Debug
+# select * from performance_schema.threads
+#   where name like "thread/sql/one_connection";
+
 # Wait for the disconnect con1 and con3 to complete
 let $wait_condition=
   select count(*) = 1 from performance_schema.threads

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2010-12-02 15:05:07 +0000
+++ b/storage/perfschema/pfs_instr.cc	2010-12-02 16:38:55 +0000
@@ -686,26 +686,17 @@ PFS_thread* create_thread(PFS_thread_cla
 
 PFS_mutex *sanitize_mutex(PFS_mutex *unsafe)
 {
-  if ((&mutex_array[0] <= unsafe) &&
-      (unsafe < &mutex_array[mutex_max]))
-    return unsafe;
-  return NULL;
+  SANITIZE_ARRAY_BODY(PFS_mutex, mutex_array, mutex_max, unsafe);
 }
 
 PFS_rwlock *sanitize_rwlock(PFS_rwlock *unsafe)
 {
-  if ((&rwlock_array[0] <= unsafe) &&
-      (unsafe < &rwlock_array[rwlock_max]))
-    return unsafe;
-  return NULL;
+  SANITIZE_ARRAY_BODY(PFS_rwlock, rwlock_array, rwlock_max, unsafe);
 }
 
 PFS_cond *sanitize_cond(PFS_cond *unsafe)
 {
-  if ((&cond_array[0] <= unsafe) &&
-      (unsafe < &cond_array[cond_max]))
-    return unsafe;
-  return NULL;
+  SANITIZE_ARRAY_BODY(PFS_cond, cond_array, cond_max, unsafe);
 }
 
 /**
@@ -744,10 +735,7 @@ const char *sanitize_file_name(const cha
 
 PFS_file *sanitize_file(PFS_file *unsafe)
 {
-  if ((&file_array[0] <= unsafe) &&
-      (unsafe < &file_array[file_max]))
-    return unsafe;
-  return NULL;
+  SANITIZE_ARRAY_BODY(PFS_file, file_array, file_max, unsafe);
 }
 
 /**

=== modified file 'storage/perfschema/table_setup_objects.cc'
--- a/storage/perfschema/table_setup_objects.cc	2010-11-15 07:40:07 +0000
+++ b/storage/perfschema/table_setup_objects.cc	2010-12-02 16:38:55 +0000
@@ -297,7 +297,6 @@ int table_setup_objects::update_row_valu
       case 0: /* OBJECT_TYPE */
       case 1: /* OBJECT_SCHEMA */
       case 2: /* OBJECT_NAME */
-        my_error(ER_WRONG_PERFSCHEMA_USAGE, MYF(0));
         return HA_ERR_WRONG_COMMAND;
 #if 0
       case 3: /* ENABLED */


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20101202163855-l2butojui8w863t0.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (marc.alff:3410) WL#4816Marc Alff2 Dec