403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.70.143.219
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/mysql-test/suite/group_replication/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/group_replication/t/gr_lower_case_table_names.test
################################################################################
## This test proves that group replication does not start on server when it's
## lower_case_table_names does not match with the group.
##
## Test:
## 0.  This test requires 2 members.
## 1.  Verify lower_case_table_names cannot be set while server is
##     running and start GR on server-1.
## 2.  Store variables of server-2 for restart.
## 3.  Test GR start on server when lower_case_table_names matches.
## 3A. Test GR start with command when lower_case_table_names matches.
## 3B. Test GR start on boot when lower_case_table_names matches.
## 4.  Test GR does not start on server when lower_case_table_names
##     does not match.
## 4A. Test GR does not start on boot when lower_case_table_names
##     does not match.
## 4B. Test GR does not start with command when lower_case_table_names
##     does not match.
## 5.  Cleanup.
################################################################################

--source include/big_test.inc
--source ../inc/have_group_replication_plugin.inc
--let $rpl_skip_group_replication_start= 1
--source ../inc/group_replication.inc
--source include/force_restart.inc

--let $allow_rpl_inited=1

--echo
--echo ## 1.  Verify lower_case_table_names cannot be set while server is
--echo ##     running and start GR on server-1.
--echo
--let $rpl_connection_name= server1
--source include/rpl_connection.inc

## Verify lower_case_table_names cannot be set while server is running.
## This make sures we do not need to test variable changes while GR is running.
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
SET GLOBAL lower_case_table_names= 1;

--source ../inc/start_and_bootstrap_group_replication.inc

--echo
--echo ## 2.  Store variables of server-2 for restart.
--echo
--let $rpl_connection_name= server2
--source include/rpl_connection.inc

--let $_group_replication_local_address= `SELECT @@GLOBAL.group_replication_local_address`
--let $_group_replication_group_seeds= `SELECT @@GLOBAL.group_replication_group_seeds`

set session sql_log_bin=0;
call mtr.add_suppression("The member is configured with a lower_case_table_names option value .*");
call mtr.add_suppression("lower_case_table_names was set to 2, .*");
set session sql_log_bin=1;

--echo
--echo ## 3A. Test GR start with command when lower_case_table_names matches.
--echo
--source include/start_group_replication.inc

--let $assert_text= 'Assert server-1 and server-2 are ONLINE'
--let $assert_cond= "[SELECT COUNT(*) from performance_schema.replication_group_members WHERE MEMBER_STATE=\"ONLINE\"]" = 2
--source include/assert.inc

--echo
--echo ## 3B. Test GR start on boot when lower_case_table_names matches.
--echo
--let $_group_replication_group_whitelist= `SELECT @@GLOBAL.group_replication_ip_whitelist`
--let $restart_parameters=restart:--group_replication_start_on_boot=1 --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_group_name=$group_replication_group_name --lower_case_table_names=1 --group_replication_ip_whitelist=$_group_replication_group_whitelist
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS $_group_replication_group_whitelist GROUP_REPLICATION_GROUP_WHITELIST
--source include/restart_mysqld.inc

#Needed as we are not using rpl_restart_server.inc
--let $rpl_server_number= 2
--source include/rpl_reconnect.inc

--let $wait_condition= SELECT COUNT(*) = 2 FROM performance_schema.replication_group_members WHERE MEMBER_STATE="ONLINE"
--source include/wait_condition.inc

--echo
--echo ## 4A. Test GR does not start on boot when lower_case_table_names
--echo ##     does not match.
--echo

--let $restart_parameters=restart:--group_replication_start_on_boot=1 --group_replication_local_address=$_group_replication_local_address --group_replication_group_seeds=$_group_replication_group_seeds --group_replication_group_name=$group_replication_group_name --lower_case_table_names=2 --group_replication_ip_whitelist=$_group_replication_group_whitelist
--replace_result $group_replication_group_name GROUP_REPLICATION_GROUP_NAME $_group_replication_local_address GROUP_REPLICATION_LOCAL_ADDRESS $_group_replication_group_seeds GROUP_REPLICATION_GROUP_SEEDS $_group_replication_group_whitelist GROUP_REPLICATION_GROUP_WHITELIST
--source include/restart_mysqld.inc

#Needed as we are not using rpl_restart_server.inc
--let $rpl_server_number= 2
--source include/rpl_reconnect.inc

--let $wait_condition= SELECT COUNT(*) = 1 FROM performance_schema.replication_group_members WHERE MEMBER_STATE="OFFLINE"
--source include/wait_condition.inc

--echo
--echo ## 4B. Test GR does not start with command when lower_case_table_names
--echo ##     does not match.
--echo

--error ER_GROUP_REPLICATION_CONFIGURATION
START GROUP_REPLICATION;

--let $assert_only_after = CURRENT_TEST: group_replication.gr_lower_case_table_names
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err
--let $assert_text = Found the expected error about lower_case_table_names
--let $assert_select = The member is configured with a lower_case_table_names option value
--let $assert_count = 2
--source include/assert_grep.inc

--let $assert_text= 'Assert server-2 is OFFLINE'
--let $assert_cond= "[SELECT COUNT(*) from performance_schema.replication_group_members WHERE MEMBER_STATE=\"OFFLINE\"]" = 1
--source include/assert.inc

--echo
--echo ## 5.  Cleanup.
--echo

--source ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit