Server IP : 185.86.78.101 / Your IP : 216.73.216.124 Web Server : Apache System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 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 : OFF Directory : /www/server/mysql/mysql-test/t/ |
Upload File : |
# ==== Purpose ==== # # Verify that replication clients (mysqld replication slave or # mysqlbinlog --stop-never) set the required client attributes. # # ==== Implementation ==== # # Start the client, then SELECT from performance_schema.session_connect_attrs. # # ==== References ==== # # BUG#16555723: REPLICATION CONNECTION SHOULD SET PROGRAM_NAME ATTRIBUTE # Uses /dev/null --source include/not_windows.inc --source include/master-slave.inc --echo ==== Case 1: slave connection ==== # Get thread id of dump thread. --let $thread_id= `SELECT PROCESSLIST_ID FROM performance_schema.threads WHERE PROCESSLIST_COMMAND = 'Binlog Dump'` # Show connection attributes --replace_result $thread_id <thread_id> eval SELECT ATTR_NAME, ATTR_VALUE FROM performance_schema.session_connect_attrs WHERE PROCESSLIST_ID = $thread_id AND ATTR_NAME IN ('program_name', '_client_replication_channel_name', '_client_role'); --echo ==== Case 2: mysqlbinlog connection ==== # Stop slave so as not to mix client attrs from slave with client # attrs from mysqlbinlog. --source include/rpl_connection_slave.inc --source include/stop_slave.inc --source include/rpl_connection_master.inc --source include/stop_dump_threads.inc --echo # Start mysqlbinlog --let BINLOG_FILE= query_get_value(SHOW MASTER STATUS, File, 1) perl; my $mysqlbinlog= $ENV{'MYSQL_BINLOG'}; my $port= $ENV{'MASTER_MYPORT'}; my $binlog_file= $ENV{'BINLOG_FILE'}; system("$mysqlbinlog --stop-never --read-from-remote-server --user=root --host=127.0.0.1 --port=$port $binlog_file > /dev/null &"); EOF # Wait for master threads to start --let $wait_condition= SELECT COUNT(*) > 0 FROM performance_schema.threads WHERE PROCESSLIST_COMMAND LIKE 'Binlog Dump' AND PROCESSLIST_STATE LIKE '%Master has sent%'; --source include/wait_condition.inc # Get thread id of dump thread. --let $thread_id= `SELECT PROCESSLIST_ID FROM performance_schema.threads WHERE PROCESSLIST_COMMAND = 'Binlog Dump'` # Show connection attributes --replace_result $thread_id <thread_id> eval SELECT ATTR_NAME, ATTR_VALUE FROM performance_schema.session_connect_attrs WHERE PROCESSLIST_ID = $thread_id AND ATTR_NAME IN ('program_name', '_client_replication_channel_name', '_client_role'); # Clean up. This will cause mysqlbinlog to exit. --replace_result $thread_id <thread_id> eval KILL $thread_id; --let $rpl_only_running_threads= 1 --source include/rpl_end.inc