Debian Codegraph @

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

raw
1 #
2 # WL#12571
3 #
4 # Test validates that changes that are to be replayed with an
5 # invoker that has a large hostname (>60 and <256) are replicated.
6 #
7
8 --source include/set_privilege_checks_user_as_system_user.inc
9 --let $rpl_privilege_checks_user_grant_option = 1
10 --source include/master-slave.inc
11 --source include/have_binlog_format_row.inc
12 --source include/have_debug.inc
13
14 --disable_query_log
15
16 # Setup
17
18 --let $debug_type= GLOBAL
19 --let $long_hostname=`SELECT REPEAT('a', 255)`
20
21 --eval CREATE USER 'luis'@'localhost' IDENTIFIED BY 'haha'
22
23 CREATE TABLE t1(counter INT);
24 --source include/sync_slave_sql_with_master.inc
25 --source include/rpl_connection_master.inc
26
27 --let $debug_point=+d,wl12571_long_invoker_host
28 --source include/add_debug_point.inc
29 GRANT SELECT, INSERT ON test.t1 TO 'luis'@'localhost';
30 --source include/remove_debug_point.inc
31
32 --source include/rpl_connection_master.inc
33 --source include/sync_slave_sql_with_master.inc
34
35 --let $grantor_hostname= `SELECT SUBSTRING_INDEX(Grantor, '@', -1) FROM mysql.tables_priv WHERE User='luis'`
36 --let $assert_cond= "$grantor_hostname" = "$long_hostname"
37 --let $assert_text= Assert that the grantor has a long hostname on the slave
38 --source include/assert.inc
39
40 --let $diff_tables= master:test.t1,slave:test.t1
41 --source include/diff_tables.inc
42
43 --source include/rpl_connection_master.inc
44 DROP USER 'luis'@'localhost';
45 DROP TABLE t1;
46
47 # clean up
48
49 --enable_query_log
50
51 --source include/rpl_end.inc
52