MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:cbell Date:January 31 2008 3:15pm
Subject:bk commit into 6.0 tree (cbell:1.2761) BUG#33172
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of cbell. When cbell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-01-31 10:15:32-05:00, cbell@mysql_cab_desk. +3 -0
  BUG#33172 : Backup operation too slow?
  
  This patch includes changes made based on reviews:
  
  1) open_schema_table signature corrected
  2) documentation gaff fixed

  sql/backup/kernel.cc@stripped, 2008-01-31 10:15:25-05:00, cbell@mysql_cab_desk. +1 -1
    BUG#33172 : Backup operation too slow?
    
    Minor refactoring to correct signature of open_schema_table. 

  sql/si_objects.cc@stripped, 2008-01-31 10:15:24-05:00, cbell@mysql_cab_desk. +23 -11
    BUG#33172 : Backup operation too slow?
    
    Minor refactoring to include comments and correct signature
    of open_schema_table. 

  sql/si_objects.h@stripped, 2008-01-31 10:15:25-05:00, cbell@mysql_cab_desk. +4 -13
    BUG#33172 : Backup operation too slow?
    
    Minor refactoring to include comments and correct signature
    and documentation of open_schema_table. 

diff -Nrup a/sql/backup/kernel.cc b/sql/backup/kernel.cc
--- a/sql/backup/kernel.cc	2008-01-31 08:51:35 -05:00
+++ b/sql/backup/kernel.cc	2008-01-31 10:15:25 -05:00
@@ -1817,7 +1817,7 @@ TABLE* get_schema_table(THD *thd, ST_SCH
   old_map= tmp_use_all_columns(t, t->read_set);
 
   st->fill_table(thd, &arg, 
-    obs::create_db_select_condition(thd, t, thd->lex->db_list));
+    obs::create_db_select_condition(thd, t, &thd->lex->db_list));
 
   tmp_restore_column_map(t->read_set, old_map);
 
diff -Nrup a/sql/si_objects.cc b/sql/si_objects.cc
--- a/sql/si_objects.cc	2008-01-31 08:51:35 -05:00
+++ b/sql/si_objects.cc	2008-01-31 10:15:24 -05:00
@@ -270,8 +270,13 @@ bool drop_object(THD *thd, const char *o
   Open given table in @c INFORMATION_SCHEMA database.
 
   This is a private helper function to the implementation.
+
+  @param[in] thd  Thread context
+  @param[in] st   Schema table enum
+
+  @retval TABLE* The schema table
 */
-TABLE* open_schema_table(THD *thd, ST_SCHEMA_TABLE *st, List<LEX_STRING> db_list)
+TABLE* open_schema_table(THD *thd, ST_SCHEMA_TABLE *st, List<LEX_STRING> *db_list)
 {
   TABLE *t;
   TABLE_LIST arg;
@@ -303,8 +308,7 @@ TABLE* open_schema_table(THD *thd, ST_SC
 
   old_map= tmp_use_all_columns(t, t->read_set);
 
-  st->fill_table(thd, &arg, 
-    obs::create_db_select_condition(thd, t, db_list));
+  st->fill_table(thd, &arg, obs::create_db_select_condition(thd, t, db_list));
 
   tmp_restore_column_map(t->read_set, old_map);
 
@@ -377,24 +381,32 @@ void delete_table_name_key(void *data)
 
 namespace obs {
   
-/*
-  Creates a WHERE clause for information schema table lookups of the
-  for FROM INFORMATION_SCHEMA.X WHERE <db_col> IN ('a','b','c').
+/**
+  Build a where clause for list of databases.
+
+  This method is used to help improve the efficiency of queries against
+  information schema tables. It builds a condition tree of the form
+  db_col IN ('a','b','c') where a,b,c are database names.
+
+  @param[in] thd      Thread context.
+  @param[in] t        The table to operate on.
+  @param[in] db_list  The list of databases in form List<LEX_STRING>
+
+  @returns NULL if no databases in list or pointer to COND tree.
 */
 COND *create_db_select_condition(THD *thd, 
                                  TABLE *t,
-                                 List<LEX_STRING> db_list)
+                                 List<LEX_STRING> *db_list)
 {
   List<Item> in_db_list;
-  List< ::LEX_STRING> &dbs= db_list;
-  List_iterator< ::LEX_STRING> it(dbs);
+  List_iterator< ::LEX_STRING> it(*db_list);
   ::LEX_STRING *db;
   DBUG_ENTER("Obj::create_select_condition()");
   
   /*
     If no list of databases, just return NULL
   */
-  if (!db_list.elements)
+  if (!db_list->elements)
     DBUG_RETURN(NULL);
 
   /*
@@ -950,7 +962,7 @@ bool InformationSchemaIterator::prepare_
   enum_schema_tables is_table_idx,
   List<LEX_STRING> db_list)
 {
-  *is_table= open_schema_table(thd, get_schema_table(is_table_idx), db_list);
+  *is_table= open_schema_table(thd, get_schema_table(is_table_idx), &db_list);
 
   if (!*is_table)
     return TRUE;
diff -Nrup a/sql/si_objects.h b/sql/si_objects.h
--- a/sql/si_objects.h	2008-01-30 10:29:54 -05:00
+++ b/sql/si_objects.h	2008-01-31 10:15:25 -05:00
@@ -506,22 +506,13 @@ void ddl_blocker_exception_on(THD *thd);
 */
 void ddl_blocker_exception_off(THD *thd);
 
-/**
-  Build a where clause for list of databases.
-
-  This method is used to help improve the efficiency of queries against
-  information schema tables. It builds a condition tree of the form
-  db_col IN ('a','b','c') where a,b,c are database names.
-
-  @param[in] thd      Thread context.
-  @param[in] t        The table to operate on.
-  @param[in] db_list  The list of databases in form List<LEX_STRING>
-
-  @returns NULL if no databases in list or pointer to COND tree.
+/*
+  Creates a WHERE clause for information schema table lookups of the
+  for FROM INFORMATION_SCHEMA.X WHERE <db_col> IN ('a','b','c').
 */
 COND *create_db_select_condition(THD *thd, 
                                  TABLE *t,
-                                 List<LEX_STRING> db_list);
+                                 List<LEX_STRING> *db_list);
 
 } // obs namespace
 

Thread
bk commit into 6.0 tree (cbell:1.2761) BUG#33172cbell31 Jan