Debian Codegraph @

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

raw
1 include/master-slave.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 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.
5 [connection master]
6
7 #1. Create table on master with index
8 [connection master]
9 CREATE TABLE t1 (a int PRIMARY KEY, b char(10), FULLTEXT KEY (b));
10 INSERT INTO t1 VALUES (1,'abc'), (2, 'def'), (3,'ghi');
11 include/assert.inc [There should be a index named b on table t1.]
12 include/rpl_sync.inc
13 [connection slave]
14 include/assert.inc [There should be a index named b on table t1.]
15
16 #2. Rename the index using ALTER TABLE..RENAME INDEX command.
17 [connection master]
18 ALTER TABLE t1 RENAME index b to idx;
19
20 #3. Check that index is renamed sucessfully on both the servers.
21 include/assert.inc [There should not be a index named b on table t1.]
22 include/assert.inc [There should be a index named idx on table t1.]
23 include/rpl_sync.inc
24 [connection slave]
25 include/assert.inc [There should not be a index named b on table t1.]
26 include/assert.inc [There should be a index named idx on table t1.]
27 [connection master]
28 UPDATE t1 SET b='mysql' WHERE b='abc';
29 include/rpl_sync.inc
30 include/diff_tables.inc [master:t1, slave:t1]
31
32 #4. Clean-up
33 DROP TABLE t1;
34 include/rpl_sync.inc
35
36 #1. Create table on master with index
37 [connection master]
38 CREATE TABLE t1 (a int PRIMARY KEY, b GEOMETRY NOT NULL SRID 0);
39 CREATE SPATIAL INDEX b ON t1 (b);
40 INSERT INTO t1 VALUES (1, ST_GEOMFROMText('POINT(1 1)')),
41 (2, ST_GEOMFROMTEXT('POLYGON((1 2,5 4,9 9,1 9,1 2))')),
42 (3, ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)'));
43 include/assert.inc [There should be a index named b on table t1.]
44 include/rpl_sync.inc
45 [connection slave]
46 include/assert.inc [There should be a index named b on table t1.]
47
48 #2. Rename the index using ALTER TABLE..RENAME INDEX command.
49 [connection master]
50 ALTER TABLE t1 RENAME index b to idx;
51
52 #3. Check that index is renamed sucessfully on both the servers.
53 include/assert.inc [There should not be a index named b on table t1.]
54 include/assert.inc [There should be a index named idx on table t1.]
55 include/rpl_sync.inc
56 [connection slave]
57 include/assert.inc [There should not be a index named b on table t1.]
58 include/assert.inc [There should be a index named idx on table t1.]
59 [connection master]
60 UPDATE t1 SET b=ST_GEOMFROMText('POINT(5 5)') WHERE b=ST_GEOMFROMTEXT('LINESTRING(0 0,10 10)');
61 include/rpl_sync.inc
62 include/diff_tables.inc [master:t1, slave:t1]
63
64 #4. Clean-up
65 DROP TABLE t1;
66 include/rpl_sync.inc
67
68 #1. Create table on master with index
69 [connection master]
70 CREATE TABLE t1 ( a INT PRIMARY KEY, b int, KEY (b));
71 INSERT INTO t1 VALUES (1,10),(2,20),(3,30);
72 include/assert.inc [There should be a index named b on table t1.]
73 include/rpl_sync.inc
74 [connection slave]
75 include/assert.inc [There should be a index named b on table t1.]
76
77 #2. Rename the index using ALTER TABLE..RENAME INDEX command.
78 [connection master]
79 ALTER TABLE t1 RENAME index b to idx;
80
81 #3. Check that index is renamed sucessfully on both the servers.
82 include/assert.inc [There should not be a index named b on table t1.]
83 include/assert.inc [There should be a index named idx on table t1.]
84 include/rpl_sync.inc
85 [connection slave]
86 include/assert.inc [There should not be a index named b on table t1.]
87 include/assert.inc [There should be a index named idx on table t1.]
88 [connection master]
89 UPDATE t1 SET b=11 WHERE b=10;
90 include/rpl_sync.inc
91 include/diff_tables.inc [master:t1, slave:t1]
92
93 #4. Clean-up
94 DROP TABLE t1;
95 include/rpl_sync.inc
96 include/rpl_end.inc