Commit b8ff601e authored by unknown's avatar unknown
Browse files

Merge mysql.com:/usr/home/bar/mysql-5.0.b24158

into  mysql.com:/usr/home/bar/mysql-5.1.b20396


mysql-test/r/rpl_do_grant.result:
  Auto merged
mysql-test/t/rpl_do_grant.test:
  Auto merged
sql/sql_acl.cc:
  Auto merged
parents 55c10a09 6aa09b4c
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -20,6 +20,17 @@ set password for rpl_do_grant@localhost=password("does it work?");
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
password<>_binary''
1
update mysql.user set password='' where user='rpl_do_grant';
flush privileges;
select password<>'' from mysql.user where user='rpl_do_grant';
password<>''
0
set sql_mode='ANSI_QUOTES';
set password for rpl_do_grant@localhost=password('does it work?');
set sql_mode='';
select password<>'' from mysql.user where user='rpl_do_grant';
password<>''
1
delete from mysql.user where user=_binary'rpl_do_grant';
delete from mysql.db where user=_binary'rpl_do_grant';
flush privileges;
+16 −0
Original line number Diff line number Diff line
@@ -34,6 +34,22 @@ connection slave;
sync_with_master;
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';

#
# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
#
connection master;
update mysql.user set password='' where user='rpl_do_grant';
flush privileges;
select password<>'' from mysql.user where user='rpl_do_grant';
set sql_mode='ANSI_QUOTES';
set password for rpl_do_grant@localhost=password('does it work?');
set sql_mode='';
save_master_pos;
connection slave;
sync_with_master;
select password<>'' from mysql.user where user='rpl_do_grant';


# clear what we have done, to not influence other tests.
connection master;
delete from mysql.user where user=_binary'rpl_do_grant';
+1 −1
Original line number Diff line number Diff line
@@ -1630,7 +1630,7 @@ bool change_password(THD *thd, const char *host, const char *user,
  {
    query_length=
      my_sprintf(buff,
                 (buff,"SET PASSWORD FOR \"%-.120s\"@\"%-.120s\"=\"%-.120s\"",
                 (buff,"SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
                  acl_user->user ? acl_user->user : "",
                  acl_user->host.hostname ? acl_user->host.hostname : "",
                  new_password));