mirror of
https://github.com/MariaDB/server.git
synced 2025-03-02 01:03:12 +01:00

Problem: ``SET PASSWORD FOR foo@localhost'' was written into binary log using double quites: ``SET PASSWORD FOR "foo"@"localhost"...''. If sql_mode was set to ANSI_QUOTES, parser on slave considered "foo" and "localhost" as identifiers instead of strigns constants, so it failed to parse, generated syntax error and slave then stopped. Fix: changing binary log entries to use single quotes: ``SET PASSWORD FOR 'foo'@'localhost'...'' not to depend on ANSI_QUOTES.
37 lines
1.3 KiB
Text
37 lines
1.3 KiB
Text
stop slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
reset master;
|
|
reset slave;
|
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
|
start slave;
|
|
delete from mysql.user where user=_binary'rpl_do_grant';
|
|
delete from mysql.db where user=_binary'rpl_do_grant';
|
|
flush privileges;
|
|
delete from mysql.user where user=_binary'rpl_ignore_grant';
|
|
delete from mysql.db where user=_binary'rpl_ignore_grant';
|
|
flush privileges;
|
|
grant select on *.* to rpl_do_grant@localhost;
|
|
grant drop on test.* to rpl_do_grant@localhost;
|
|
show grants for rpl_do_grant@localhost;
|
|
Grants for rpl_do_grant@localhost
|
|
GRANT SELECT ON *.* TO 'rpl_do_grant'@'localhost'
|
|
GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost'
|
|
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;
|
|
flush privileges;
|