Server IP : 172.67.216.182 / Your IP : 172.71.81.234 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/rpl/t/ |
Upload File : |
# Test that GRANT is not replicated to the slave # when --replicate-wild-ignore-table=mysql.% # In BUG#980, this test would _randomly_ fail. --source include/not_group_replication_plugin.inc source include/master-slave.inc; # do not be influenced by other tests. connection master; delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; save_master_pos; connection slave; sync_with_master; # as these DELETE were not replicated, we need to do them manually on the # slave. delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; # test non-replication of GRANT connection master; set @orig_sql_mode= @@sql_mode; set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER','')); grant select on *.* to rpl_ignore_grant@localhost; set sql_mode= @orig_sql_mode; grant drop on test.* to rpl_ignore_grant@localhost; show grants for rpl_ignore_grant@localhost; save_master_pos; connection slave; sync_with_master; --error 1141 #("no such grant for user") show grants for rpl_ignore_grant@localhost; # check it another way select count(*) from mysql.user where user=_binary'rpl_ignore_grant'; select count(*) from mysql.db where user=_binary'rpl_ignore_grant'; # test non-replication of SET PASSWORD # first force creation of the user on slave (because as the user does not exist # on slave, the SET PASSWORD may be replicated but silently do nothing; this is # not what we want; we want it to be not-replicated). set @orig_sql_mode= @@sql_mode; set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER','')); grant select on *.* to rpl_ignore_grant@localhost; set sql_mode= @orig_sql_mode; connection master; set password for rpl_ignore_grant@localhost="does it work?"; save_master_pos; connection slave; sync_with_master; select authentication_string<>_binary'' from mysql.user where user=_binary'rpl_ignore_grant'; # clear what we have done, to not influence other tests. connection master; delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; save_master_pos; connection slave; sync_with_master; delete from mysql.user where user=_binary'rpl_ignore_grant'; delete from mysql.db where user=_binary'rpl_ignore_grant'; flush privileges; # End of 4.1 tests --source include/rpl_end.inc