List:Commits« Previous MessageNext Message »
From:Dmitry Shulga Date:September 27 2010 10:34am
Subject:bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3498) Bug#36742
View as plain text  
#At file:///Users/shulga/projects/mysql/5.1-bugteam-bug36742/ based on revid:davi.arnaut@stripped

 3498 Dmitry Shulga	2010-09-27
      Fixed bug#36742 - GRANT hostname case handling inconsistent.
     @ sql/mysql_priv.h
        It was added declaration for host_to_lowercase.
     @ sql/sql_parse.cc
        It was added standalone procedure host_to_lowercase.
     @ sql/sql_yacc.yy
        It was added convertation of host name part of username to lowercase.

    modified:
      sql/mysql_priv.h
      sql/sql_parse.cc
      sql/sql_yacc.yy
=== modified file 'sql/mysql_priv.h'
--- a/sql/mysql_priv.h	2010-07-29 03:00:57 +0000
+++ b/sql/mysql_priv.h	2010-09-27 10:33:53 +0000
@@ -781,6 +781,7 @@ bool check_string_char_length(LEX_STRING
                               uint max_char_length, CHARSET_INFO *cs,
                               bool no_error);
 bool check_host_name(LEX_STRING *str);
+void host_to_lowercase(char *host);
 
 bool parse_sql(THD *thd,
                Parser_state *parser_state,

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2010-08-18 04:56:06 +0000
+++ b/sql/sql_parse.cc	2010-09-27 10:33:53 +0000
@@ -7807,6 +7807,12 @@ bool check_string_char_length(LEX_STRING
 }
 
 
+void host_to_lowercase(char *host)
+{
+  my_casedn_str(files_charset_info, host);
+}
+
+
 /*
   Check if path does not contain mysql data home directory
   SYNOPSIS

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2010-08-30 22:16:38 +0000
+++ b/sql/sql_yacc.yy	2010-09-27 10:33:53 +0000
@@ -11567,6 +11567,7 @@ user:
                                          system_charset_info, 0) ||
                 check_host_name(&$$->host))
               MYSQL_YYABORT;
+            host_to_lowercase($$->host.str);
           }
         | CURRENT_USER optional_braces
           {


Attachment: [text/bzr-bundle] bzr/dmitry.shulga@sun.com-20100927103353-23bdp6jwd1hxm2h2.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3498) Bug#36742Dmitry Shulga27 Sep
  • Re: bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3498)Bug#36742Davi Arnaut27 Sep