Debian Codegraph @

mysql-test/suite/rpl/r/rpl_colSize.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 DROP TABLE IF EXISTS t1;
7 **** Testing WL#3228 changes. ****
8 *** Create "wider" table on slave ***
9 include/sync_slave_sql_with_master.inc
10 STOP SLAVE;
11 Warnings:
12 Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
13 include/wait_for_slave_to_stop.inc
14 RESET SLAVE;
15 Warnings:
16 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
17 RESET MASTER;
18 SET @saved_replica_type_conversions = @@replica_type_conversions;
19 SET GLOBAL REPLICA_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
20 CREATE TABLE t1 (
21 a float (47),
22 b double (143,9),
23 c decimal (65,30),
24 d numeric (4,0),
25 e bit (32),
26 f char (21),
27 g varchar (1300),
28 h binary (33),
29 j varbinary (200),
30 k enum ('5','6','7', '8','9','0'),
31 l set ('1','2','3','4','5','6','7','8','9','0','11','12','13','14','15','16','17','18','19','21','22','23','24','25','26','27','28','29'),
32 m TINYBLOB,
33 n BLOB,
34 o MEDIUMBLOB,
35 p LONGBLOB,
36 q TINYTEXT,
37 r TEXT,
38 s MEDIUMTEXT,
39 t LONGTEXT
40 );
41 Warnings:
42 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
43 *** Create same table on master but with narrow columns ***
44 CREATE TABLE t1 (
45 a float (44),
46 b double (10,3),
47 c decimal (10,2),
48 d numeric (3,0),
49 e bit (16),
50 f char (10),
51 g varchar (100),
52 h binary (20),
53 j varbinary (20),
54 k enum ('5','6','7'),
55 l set ('1','2','3','4','5','6','7','8','9','0'),
56 m TINYBLOB,
57 n BLOB,
58 o MEDIUMBLOB,
59 p LONGBLOB,
60 q TINYTEXT,
61 r TEXT,
62 s MEDIUMTEXT,
63 t LONGTEXT
64 );
65 Warnings:
66 Warning 1681 Specifying number of digits for floating point data types is deprecated and will be removed in a future release.
67 RESET MASTER;
68 *** Start replication ***
69 START SLAVE;
70 Warnings:
71 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
72 include/wait_for_slave_to_start.inc
73 *** Insert data on master and display it. ***
74 INSERT INTO t1 () VALUES (
75 17.567,
76 2.123,
77 10.20,
78 125,
79 hex(64),
80 'TEST',
81 'This is a test',
82 'binary data',
83 'more binary data',
84 '6',
85 '7',
86 "blob 1",
87 "blob 2",
88 "blob 3",
89 "blob 4",
90 "text 1",
91 "text 2",
92 "text 3",
93 "text 4");
94 SELECT * FROM t1 ORDER BY a;
95 a b c d e f g h j k l m n o p q r s t
96 17.567 2.123 10.20 125 # TEST This is a test # more binary data 6 7 blob 1 blob 2 blob 3 blob 4 text 1 text 2 text 3 text 4
97 *** Select data from slave to compare ***
98 include/sync_slave_sql_with_master.inc
99 SELECT * FROM t1 ORDER BY a;
100 a b c d e f g h j k l m n o p q r s t
101 17.567 2.123000000 10.200000000000000000000000000000 125 # TEST This is a test # more binary data 6 7 blob 1 blob 2 blob 3 blob 4 text 1 text 2 text 3 text 4
102 DROP TABLE t1;
103 Create varchar table on master
104 CREATE TABLE t1 (
105 a VARCHAR(50),
106 b VARCHAR(100),
107 c VARCHAR(300),
108 d CHAR(5)
109 );
110 include/sync_slave_sql_with_master.inc
111 Alter varchar table on slave
112 ALTER TABLE t1 CHANGE COLUMN a a VARCHAR(100);
113 ALTER TABLE t1 CHANGE COLUMN b b VARCHAR(400);
114 ALTER TABLE t1 CHANGE COLUMN c c VARCHAR(500);
115 ALTER TABLE t1 CHANGE COLUMN d d CHAR(100);
116 Insert some values and select them on master
117 INSERT INTO t1 VALUES ("This is a test of col a.",
118 "This is another test of col b.",
119 "This is a test of the large col c.",
120 "Col d");
121 SELECT * FROM t1;
122 a b c d
123 This is a test of col a. This is another test of col b. This is a test of the large col c. Col d
124 SHOW CREATE TABLE t1;
125 Table Create Table
126 t1 CREATE TABLE `t1` (
127 `a` varchar(50) DEFAULT NULL,
128 `b` varchar(100) DEFAULT NULL,
129 `c` varchar(300) DEFAULT NULL,
130 `d` char(5) DEFAULT NULL
131 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
132 include/sync_slave_sql_with_master.inc
133 Insert some values and select them on slave
134 SELECT * FROM t1;
135 a b c d
136 This is a test of col a. This is another test of col b. This is a test of the large col c. Col d
137 SHOW CREATE TABLE t1;
138 Table Create Table
139 t1 CREATE TABLE `t1` (
140 `a` varchar(100) DEFAULT NULL,
141 `b` varchar(400) DEFAULT NULL,
142 `c` varchar(500) DEFAULT NULL,
143 `d` char(100) DEFAULT NULL
144 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
145 DROP TABLE t1;
146 Create bit table on master
147 CREATE TABLE t1 (
148 a BIT(7),
149 b BIT(8),
150 c BIT(21),
151 d BIT(11),
152 e BIT(11)
153 );
154 Create bit table on slave
155 include/sync_slave_sql_with_master.inc
156 DROP TABLE t1;
157 CREATE TABLE t1 (
158 a BIT(16),
159 b BIT(22),
160 c BIT(54),
161 d BIT(25),
162 e BIT(13)
163 );
164 Insert some values and select them on master
165 INSERT INTO t1 VALUES (
166 b'1010101',
167 b'10101011',
168 b'101010110101010101111',
169 b'10101010101',
170 b'10101011111'
171 );
172 SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
173 BIN(a) BIN(b) BIN(c) BIN(d) BIN(e)
174 1010101 10101011 101010110101010101111 10101010101 10101011111
175 SHOW CREATE TABLE t1;
176 Table Create Table
177 t1 CREATE TABLE `t1` (
178 `a` bit(7) DEFAULT NULL,
179 `b` bit(8) DEFAULT NULL,
180 `c` bit(21) DEFAULT NULL,
181 `d` bit(11) DEFAULT NULL,
182 `e` bit(11) DEFAULT NULL
183 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
184 include/sync_slave_sql_with_master.inc
185 Insert some values and select them on master
186 SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
187 BIN(a) BIN(b) BIN(c) BIN(d) BIN(e)
188 1010101 10101011 101010110101010101111 10101010101 10101011111
189 SHOW CREATE TABLE t1;
190 Table Create Table
191 t1 CREATE TABLE `t1` (
192 `a` bit(16) DEFAULT NULL,
193 `b` bit(22) DEFAULT NULL,
194 `c` bit(54) DEFAULT NULL,
195 `d` bit(25) DEFAULT NULL,
196 `e` bit(13) DEFAULT NULL
197 ) ENGINE=ENGINE DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
198 CREATE TABLE t2(i INTEGER);
199 CREATE TRIGGER t1_tr BEFORE INSERT ON t1 FOR EACH ROW
200 BEGIN
201 INSERT INTO t2 VALUES(1);
202 END $$
203 INSERT INTO t1 VALUES (
204 b'1010101',
205 b'10101011',
206 b'101010110101010101111',
207 b'10101010101',
208 b'10101011111'
209 );
210 include/sync_slave_sql_with_master.inc
211 *** Cleanup ***
212 DROP TABLE t1;
213 DROP TABLE t2;
214 include/sync_slave_sql_with_master.inc
215 SET GLOBAL REPLICA_TYPE_CONVERSIONS = @saved_replica_type_conversions;
216 include/rpl_end.inc