List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:October 15 2009 4:57pm
Subject:bzr commit into mysql-6.0-backup branch (charles.bell:2877) Bug#47690
View as plain text  
#At file:///Users/cbell/source/bzr/mysql-6.0-bug-47690/ based on revid:hema@stripped

 2877 Chuck Bell	2009-10-15
      BUG#47690 : Service interface skip of 'PERFORMANCE_SCHEMA' database incomplete
      
      The si_objects code is partially coded to ignore the PERFORMANCE_SCHEMA 
      database on backup. This database should be treated like the 
      INFORMATION_SCHEMA and mysql database such that it is excluded 
      from the list of databases included in the backup image and
      for all access checks.
      
      This patch adds the 'performance_schema' clause to all of the where 
      clauses where missing.
      
      Note: A test case cannot be constructed until the performance 
      schema code is pushed. This patch will ensure backup will not fail 
      when that work is complete.
     @ sql/si_objects.cc
        Added 'performance_schema' to all internal database name
        checks.

    modified:
      sql/si_objects.cc
=== modified file 'sql/si_objects.cc'
--- a/sql/si_objects.cc	2009-09-10 13:46:13 +0000
+++ b/sql/si_objects.cc	2009-10-15 14:57:16 +0000
@@ -1708,8 +1708,8 @@ create<View_base_view_iterator>(THD *thd
   @param[out] out_stream  Output stream.
 
   @note this method will return an error if the db_name is either
-  mysql or information_schema as these are not objects that
-  should be recreated using this interface.
+  mysql or information_schema or performance_schema as these are not objects 
+  that should be recreated using this interface.
 
   @returns Error status.
     @retval FALSE on success.
@@ -2378,8 +2378,8 @@ Grant_obj::Grant_obj(LEX_STRING name)
   @param[out] out_stream  Output stream.
 
   @note this method will return an error if the db_name is either
-  mysql or information_schema as these are not objects that
-  should be recreated using this interface.
+  mysql or information_schema or performance_schema as these are not objects 
+  that should be recreated using this interface.
 
   @returns Error status.
     @retval FALSE on success.
@@ -2495,7 +2495,8 @@ Obj_iterator *get_databases(THD *thd)
                       "SELECT schema_name "
                       "FROM INFORMATION_SCHEMA.SCHEMATA "
                       "WHERE LCASE(schema_name) != 'mysql' AND "
-                      "LCASE(schema_name) != 'information_schema'") };
+                      "LCASE(schema_name) != 'information_schema' AND "
+                      "LCASE(schema_name) != 'performance_schema'")};
 
   return create_row_set_iterator<Database_iterator>(thd, &query);
 }
@@ -2507,8 +2508,8 @@ Obj_iterator *get_databases(THD *thd)
   Return a count of databases.
 
   This method returns the number of databases excluding the internal
-  databases 'mysql' and 'information_schema'.
-
+  databases 'mysql', 'information_schema', and 'performance_schema'.
+ 
   @Note This method executes based on the current context of the THD
         and thus returns a value based on the accessibility of objects
         by the user context.
@@ -2526,7 +2527,8 @@ uint get_num_dbs(THD *thd)
   s_stream << 
     "SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA " <<
     "WHERE LCASE(schema_name) != 'mysql' AND " <<
-    "LCASE(schema_name) != 'information_schema'";
+    "LCASE(schema_name) != 'information_schema' AND " <<
+    "LCASE(schema_name) != 'performance_schema'";
 
   if (run_service_interface_sql(thd, &ed_connection, s_stream.lex_string()))
     /* Query failed with an error */


Attachment: [text/bzr-bundle] bzr/charles.bell@sun.com-20091015145716-8h1m57u6lz3y2b3f.bundle
Thread
bzr commit into mysql-6.0-backup branch (charles.bell:2877) Bug#47690Chuck Bell15 Oct
  • Re: bzr commit into mysql-6.0-backup branch (charles.bell:2877)Bug#47690Rafal Somla16 Oct