File: rpl_colSize.result

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