Hi Libing,
Nice work!
STATUS
------
Not approved!
REQUIRED CHANGES
----------------
RC1. user->password.str is always scrambled, so the 'if' part below
should be removed:
if (user->password.str[0] == '*')
log_query.append(STRING_WITH_LEN("PASSWORD "));
RC2. do not create view in 'mysql' database
RC3. more description of how the test works
RC4. improve the following:
let $users_list= user_list;
let $statement= RENAME USER \$$users_list;
as:
let $statement= RENAME USER \$users_list;
RC5. When run the following:
GRANT ALL PRIVILEGES ON *.* TO current_user identified by '12345';
it will be binlogged as:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost';
the identified part will be missing, I think this should be fixed.
RC6. Test GRANT/REVOKE with multiple users
REQUESTS
--------
R1. CREATE USER will be log with the password in plain text (it seems
all other statements will use the scrambled password), I think this
could be a potential security problem, please either fix this in this
bug or report a new bug about this.
R2. I think the changes to sql_yacc.yy can be simplified with:
=== modified file 'sql/sql_yacc.yy'
--- sql/sql_yacc.yy 2009-11-25 13:09:12 +0000
+++ sql/sql_yacc.yy 2009-12-11 07:40:27 +0000
@@ -1406,7 +1406,7 @@
opt_outer table_list table_name table_alias_ref_list table_alias_ref
opt_option opt_place
opt_attribute opt_attribute_list attribute column_list column_list_id
- opt_column_list grant_privileges grant_ident grant_list grant_option
+ opt_column_list grant_privileges grant_ident grant_users grant_list grant_option
object_privilege object_privilege_list user_list rename_list
clear_privileges flush_options flush_option
equal optional_braces
@@ -1530,7 +1530,11 @@
;
verb_clause:
- statement
+ remember_name statement remember_end
+ {
+ Lex->stmt_begin= $1;
+ Lex->stmt_end= $3;
+ }
| begin
;
@@ -12674,12 +12678,22 @@
;
grant_list:
+ {
+ Lex->stmt_user_begin= YYLIP->get_cpp_ptr();
+ }
+ grant_users remember_end
+ {
+ Lex->stmt_user_end= $3;
+ }
+ ;
+
+grant_users:
grant_user
{
if (Lex->users_list.push_back($1))
MYSQL_YYABORT;
}
- | grant_list ',' grant_user
+ | grant_users ',' grant_user
{
if (Lex->users_list.push_back($3))
MYSQL_YYABORT;
Please note that the stmt_user_begin will not include the space before
the users list, so you have to change acl_write_bin_log to append a ' '
before adding the users list.
SUGGESTIONS
-----------
S1. I think you can use 'bug48321%' instead of 'bug48321\__' to do the
match.
S2. Please use 'fakehost' instead of 'localhost' for all the user names.
S3. Please make the test result more readable.
S4. Please avoid lines that only changes white spaces.
Li-Bing.Song@stripped wrote:
> #At file:///home/anders/work/bzrwork/worktree5/mysql-5.1-bugteam/ based on
> revid:davi.arnaut@stripped
>
> 3202 Li-Bing.Song@stripped 2009-11-27
> Bug #48321 CURRENT_USER() incorrectly replicated for DROP/RENAME USER;
> REVOKE/GRANT; ALTER EVENT.
>
[snip]