List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:September 27 2010 10:46am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (Dmitry.Shulga:3498)
Bug#36742
View as plain text  
Hi Dmitry,

On 9/27/10 7:34 AM, Dmitry Shulga wrote:
> #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.

[..]

>
> === 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);
> +}
> +
> +

Functions can go into sql_yacc.yy if necessary.

>   /*
>     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);

This does not really need a function. Something like:

	/* Convert hostname part of username to lowercase. */
	my_casedn_str(files_charset_info, $$->host.str);

should be enough. We usually try hard to avoid exposing any new global 
functions.

Regards,

Davi
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