List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:November 18 2011 6:29pm
Subject:bzr push into mysql-trunk-wl5461 branch (chris.powers:3440 to 3442) WL#5461
View as plain text  
 3442 Christopher Powers	2011-11-18
      WL#5461 PERFORMANCE_SCHEMA MY.CNF Default Setup
      
      Resolve build warning

    modified:
      sql/mysqld.cc
 3441 Christopher Powers	2011-11-18
      WL#5461 PERFORMANCE_SCHEMA MY.CNF Default Setup
      
      For the performance_schema_instrument configuration option:
      - Simplify code for trimming trailing spaces
      - Improve gcov coverage by adding trailing space to option value

    modified:
      mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt
      sql/mysqld.cc
 3440 Marc Alff	2011-11-18
      Fixed more code review comments

    modified:
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/t/start_server_off.test
      sql/mysqld.cc
      storage/perfschema/pfs_events_stages.cc
      storage/perfschema/pfs_events_statements.cc
      storage/perfschema/pfs_events_waits.cc
      storage/perfschema/table_setup_instruments.cc
=== modified file 'mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt'
--- a/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt	2011-11-17 21:44:20 +0000
+++ b/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt	2011-11-18 18:13:39 +0000
@@ -1,6 +1,6 @@
 --log-error=0
 --loose-performance-schema-instrument='%=ON'
---loose-performance-schema-instrument='wait/synch/mutex/sql/% = OFF'
+--loose-performance-schema-instrument='wait/synch/mutex/sql/% = OFF '
 --loose-performance-schema-instrument='wait/synch/mutex/sql/LOCK% = ON'
 --loose-performance-schema-instrument='wait/synch/mutex/sql/LOCK_thread_count  = OFF'
 --loose-performance-schema-instrument=' wait/synch/mutex/sql/LOCK_user_conn    = COUNTED'

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-11-18 16:49:29 +0000
+++ b/sql/mysqld.cc	2011-11-18 18:28:29 +0000
@@ -7879,7 +7879,7 @@ mysqld_get_one_option(int optid,
       name++;
 
     /* Trim trailing spaces and slashes from instrument name */
-    while(p > argument && (my_isspace(mysqld_charset, p[-1]) || p[-1] == '/'))
+    while (p > argument && (my_isspace(mysqld_charset, p[-1]) || p[-1] == '/'))
       p--;
     *p= 0;
 
@@ -7891,14 +7891,13 @@ mysqld_get_one_option(int optid,
       return 0;
     }
 
-    /* Trim leading and trailing spaces from option value */
+    /* Trim leading spaces from option value */
     while (*val && my_isspace(mysqld_charset, *val))
       val++;
-    p= val + strlen(val);
 
-    while(p > val && my_isspace(mysqld_charset, p[-1]))
-      p--;
-    *p= 0;
+    /* Trim trailing spaces from option value */
+    if ((p= my_strchr(mysqld_charset, val, val+strlen(val), ' ')) != NULL)
+      *p= 0;
 
     if (!*val)
     {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5461 branch (chris.powers:3440 to 3442) WL#5461Christopher Powers21 Nov