polardbxengine/mysql-test/suite/rpl/t/rpl_long_invoker_hostname.test

51 lines
1.3 KiB
Plaintext

#
# WL#12571
#
# Test validates that changes that are to be replayed with an
# invoker that has a large hostname (>60 and <256) are replicated.
#
--source include/master-slave.inc
--source include/have_binlog_format_row.inc
--source include/have_debug.inc
--disable_query_log
# Setup
--let $debug_type= GLOBAL
--let $long_hostname=`SELECT REPEAT('a', 255)`
--eval CREATE USER 'luis'@'localhost' IDENTIFIED BY 'haha'
CREATE TABLE t1(counter INT);
--source include/sync_slave_sql_with_master.inc
--source include/rpl_connection_master.inc
--let $debug_point=+d,wl12571_long_invoker_host
--source include/add_debug_point.inc
GRANT SELECT, INSERT ON test.t1 TO 'luis'@'localhost';
--source include/remove_debug_point.inc
--source include/rpl_connection_master.inc
--source include/sync_slave_sql_with_master.inc
--let $grantor_hostname= `SELECT SUBSTRING_INDEX(Grantor, '@', -1) FROM mysql.tables_priv WHERE User='luis'`
--let $assert_cond= "$grantor_hostname" = "$long_hostname"
--let $assert_text= Assert that the grantor has a long hostname on the slave
--source include/assert.inc
--let $diff_tables= master:test.t1,slave:test.t1
--source include/diff_tables.inc
--source include/rpl_connection_master.inc
DROP USER 'luis'@'localhost';
DROP TABLE t1;
# clean up
--enable_query_log
--source include/rpl_end.inc