Debian Codegraph @

mysql-test/suite/rpl/r/rpl_invisible_indexes_row.result

raw
1 #
2 # Bug#30072179: USING INVISIBLE INDEX WHEN SLAVE APPLY EVENT
3 #
4 include/master-slave.inc
5 Warnings:
6 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
7 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
8 [connection master]
9 [Connection Master]
10 SET sql_log_bin = OFF;
11 CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL, C INT, PRIMARY KEY (a));
12 SET sql_log_bin = ON;
13 [Connection Slave]
14 CREATE TABLE t1 (
15 a INT NOT NULL,
16 b INT NOT NULL,
17 c INT,
18 PRIMARY KEY (b),
19 UNIQUE KEY(a) INVISIBLE
20 );
21 [Connection Master]
22 INSERT INTO t1 VALUES (1, 1, 1), (2, 2, 2), (3, 3, 3);
23 UPDATE t1 SET c = 100 WHERE a = 1;
24 include/sync_slave_sql_with_master.inc
25 [Connection Slave]
26 # Should not have used the a index to syncronize the row.
27 SELECT 1 AS not_using_index FROM performance_schema.global_status
28 WHERE variable_name = 'Replica_rows_last_search_algorithm_used'
29 AND variable_value <> 'INDEX_SCAN';
30 not_using_index
31 1
32 # Make sure it indeed synchronized. This _will_ use the index.
33 SELECT * FROM t1;
34 a b c
35 1 1 100
36 2 2 2
37 3 3 3
38 [Connection Master]
39 DROP TABLE t1;
40 include/sync_slave_sql_with_master.inc
41 include/rpl_end.inc