List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:January 30 2010 7:24pm
Subject:bzr commit into mysql-5.5-next-mr branch (alik:2970)
View as plain text  
#At file:///mnt/raid/alik/MySQL/bzr/00.merges/mysql-next-mr-merge.3/ based on revid:alik@stripped

 2970 Alexander Nozdrin	2010-01-30 [merge]
      Manual merge from mysql-trunk-merge.
      Conflicts:
        - sql/events.cc
        - sql/mysql_priv.h
        - sql/repl_failsafe.cc
        - sql/sql_db.cc
        - sql/sql_parse.cc
        - sql/sql_show.cc

    modified:
      sql/events.cc
      sql/mysql_priv.h
      sql/sql_db.cc
      sql/sql_parse.cc
      sql/sql_show.cc
=== modified file 'sql/events.cc'
--- a/sql/events.cc	2010-01-27 21:10:37 +0000
+++ b/sql/events.cc	2010-01-30 19:24:33 +0000
@@ -768,8 +768,7 @@ Events::fill_schema_events(THD *thd, TAB
   if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS)
   {
     DBUG_ASSERT(thd->lex->select_lex.db);
-    if (!is_infoschema_db(thd->lex->select_lex.db,    // There is no events in I_S
-                          strlen(thd->lex->select_lex.db)) &&
+    if (!is_infoschema_db(thd->lex->select_lex.db) && // There is no events in I_S
         check_access(thd, EVENT_ACL, thd->lex->select_lex.db,
                      NULL, NULL, 0, 0))
       DBUG_RETURN(1);

=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2010-01-30 18:58:23 +0000
+++ b/sql/mysql_priv.h	2010-01-30 19:24:33 +0000
@@ -1446,6 +1446,12 @@ inline bool is_infoschema_db(const char 
                          INFORMATION_SCHEMA_NAME.str, name));
 }
 
+inline bool is_infoschema_db(const char *name)
+{
+  return !my_strcasecmp(system_charset_info,
+                        INFORMATION_SCHEMA_NAME.str, name);
+}
+
 void initialize_information_schema_acl();
 
 /* sql_handler.cc */

=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc	2010-01-27 21:10:37 +0000
+++ b/sql/sql_db.cc	2010-01-30 19:24:33 +0000
@@ -645,7 +645,7 @@ int mysql_create_db(THD *thd, char *db, 
   DBUG_ENTER("mysql_create_db");
 
   /* do not create 'information_schema' db */
-  if (is_infoschema_db(db, strlen(db)))
+  if (is_infoschema_db(db))
   {
     my_error(ER_DB_CREATE_EXISTS, MYF(0), db);
     DBUG_RETURN(-1);

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2010-01-27 21:24:35 +0000
+++ b/sql/sql_parse.cc	2010-01-30 19:24:33 +0000
@@ -1220,8 +1220,7 @@ bool dispatch_command(enum enum_server_c
     table_list.alias= table_list.table_name= conv_name.str;
     packet= arg_end + 1;
 
-    if (!my_strcasecmp(system_charset_info, table_list.db,
-                       INFORMATION_SCHEMA_NAME.str))
+    if (is_infoschema_db(table_list.db, table_list.db_length))
     {
       ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, table_list.alias);
       if (schema_table)
@@ -6279,8 +6278,7 @@ TABLE_LIST *st_select_lex::add_table_to_
   ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX);
   ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES);
   ptr->derived=	    table->sel;
-  if (!ptr->derived && !my_strcasecmp(system_charset_info, ptr->db,
-                                      INFORMATION_SCHEMA_NAME.str))
+  if (!ptr->derived && is_infoschema_db(ptr->db, ptr->db_length))
   {
     ST_SCHEMA_TABLE *schema_table;
     if (ptr->updating &&

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2010-01-27 21:10:37 +0000
+++ b/sql/sql_show.cc	2010-01-30 19:24:33 +0000
@@ -750,8 +750,7 @@ bool mysqld_show_create_db(THD *thd, cha
     DBUG_RETURN(TRUE);
   }
 #endif
-  if (!my_strcasecmp(system_charset_info, dbname,
-                     INFORMATION_SCHEMA_NAME.str))
+  if (is_infoschema_db(dbname))
   {
     dbname= INFORMATION_SCHEMA_NAME.str;
     create.default_table_charset= system_charset_info;
@@ -2686,8 +2685,8 @@ int make_db_list(THD *thd, List<LEX_STRI
   */
   if (lookup_field_vals->db_value.str)
   {
-    if (!my_strcasecmp(system_charset_info, INFORMATION_SCHEMA_NAME.str,
-                       lookup_field_vals->db_value.str))
+    if (is_infoschema_db(lookup_field_vals->db_value.str,
+                         lookup_field_vals->db_value.length))
     {
       *with_i_schema= 1;
       if (files->push_back(i_s_name_copy))


Attachment: [text/bzr-bundle] bzr/alik@sun.com-20100130192433-9fckdf4o5xc37flw.bundle
Thread
bzr commit into mysql-5.5-next-mr branch (alik:2970)Alexander Nozdrin30 Jan