Hi Li-Bing,
Thanks for the prompt review.
On 02/09/2011 02:04 PM, anders wrote:
> Hi Luis,
> Nice work, I am OK with the patch.
> I have a suggestion on the code.
>
> [snip]
>>
>>
>> - if (passwd&& user->password.str)
>> + if (ident&& user->plugin.str&&
> (user->plugin.length> 0))
>> + {
>> + str->append(STRING_WITH_LEN(" IDENTIFIED WITH "));
>> + str->append(user->plugin.str, user->plugin.length);
>> +
>> + if (user->auth.str&& (user->auth.length> 0))
>> + {
>> + str->append(STRING_WITH_LEN(" AS '"));
>> + str->append(user->auth.str, user->auth.length);
>> + str->append('\'');
>> + }
>> + }
>> + else if (ident&& user->password.str)
>> {
>> str->append(STRING_WITH_LEN(" IDENTIFIED BY PASSWORD '"));
>> str->append(user->password.str, user->password.length);
>>
> I think it is better to make above code into one block.
> eg.
> if (ident)
> {
> if (user->plugin.str ...)
> {
> ...
> }
> else if (user->password.str)
> {
> ...
> }
> }
>
Duh! :)
Thank you!
Regards,
Luís