~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/r/rpl_colSize.result

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
stop slave;
 
2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
3
reset master;
 
4
reset slave;
 
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 
6
start slave;
 
7
DROP TABLE IF EXISTS t1;
 
8
**** Testing WL#3228 changes. ****
 
9
*** Create "wider" table on slave ***
 
10
STOP SLAVE;
 
11
RESET SLAVE;
 
12
CREATE TABLE t1 (
 
13
a float     (47),
 
14
b double    (143,9),
 
15
c decimal   (65,30),
 
16
d numeric   (4,0),
 
17
e bit       (32),
 
18
f char      (21),
 
19
g varchar   (1300),
 
20
h binary    (33),
 
21
j varbinary (200),
 
22
k enum      ('5','6','7', '8','9','0'),
 
23
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'),
 
24
m TINYBLOB,
 
25
n BLOB,
 
26
o MEDIUMBLOB,
 
27
p LONGBLOB,
 
28
q TINYTEXT,
 
29
r TEXT,
 
30
s MEDIUMTEXT,
 
31
t LONGTEXT
 
32
);
 
33
*** Create same table on master but with narrow columns ***
 
34
CREATE TABLE t1 (
 
35
a float     (44),
 
36
b double    (10,3),
 
37
c decimal   (10,2),
 
38
d numeric   (3,0),
 
39
e bit       (16),
 
40
f char      (10),
 
41
g varchar   (100),
 
42
h binary    (20),
 
43
j varbinary (20),
 
44
k enum      ('5','6','7'),
 
45
l set       ('1','2','3','4','5','6','7','8','9','0'),
 
46
m TINYBLOB,
 
47
n BLOB,
 
48
o MEDIUMBLOB,
 
49
p LONGBLOB,
 
50
q TINYTEXT,
 
51
r TEXT,
 
52
s MEDIUMTEXT,
 
53
t LONGTEXT
 
54
);
 
55
RESET MASTER;
 
56
*** Start replication ***
 
57
START SLAVE;
 
58
*** Insert data on master and display it. ***
 
59
INSERT INTO t1 () VALUES (
 
60
17.567, 
 
61
2.123, 
 
62
10.20, 
 
63
125,
 
64
hex(64),
 
65
'TEST',
 
66
'This is a test',
 
67
'binary data',
 
68
'more binary data',
 
69
'6',
 
70
'7',
 
71
"blob 1",
 
72
"blob  2",
 
73
"blob   3",
 
74
"blob    4",
 
75
"text 1",
 
76
"text  2",
 
77
"text   3",
 
78
"text    4");
 
79
SELECT * FROM t1 ORDER BY a;
 
80
a       b       c       d       e       f       g       h       j       k       l       m       n       o       p       q       r       s       t
 
81
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
 
82
*** Select data from slave to compare ***
 
83
SELECT * FROM t1 ORDER BY a;
 
84
a       b       c       d       e       f       g       h       j       k       l       m       n       o       p       q       r       s       t
 
85
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
 
86
DROP TABLE t1;
 
87
Create varchar table on master
 
88
CREATE TABLE t1 (
 
89
a VARCHAR(50),
 
90
b VARCHAR(100),
 
91
c VARCHAR(300),
 
92
d CHAR(5)
 
93
);
 
94
Alter varchar table on slave
 
95
ALTER TABLE t1 CHANGE COLUMN a a VARCHAR(100);
 
96
ALTER TABLE t1 CHANGE COLUMN b b VARCHAR(400);
 
97
ALTER TABLE t1 CHANGE COLUMN c c VARCHAR(500);
 
98
ALTER TABLE t1 CHANGE COLUMN d d CHAR(100);
 
99
Insert some values and select them on master
 
100
INSERT INTO t1 VALUES ("This is a test of col a.", 
 
101
"This is another test of col b.",
 
102
"This is a test of the large col c.",
 
103
"Col d");
 
104
SELECT * FROM t1;
 
105
a       b       c       d
 
106
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
 
107
SHOW CREATE TABLE t1;
 
108
Table   Create Table
 
109
t1      CREATE TABLE `t1` (
 
110
  `a` varchar(50) DEFAULT NULL,
 
111
  `b` varchar(100) DEFAULT NULL,
 
112
  `c` varchar(300) DEFAULT NULL,
 
113
  `d` char(5) DEFAULT NULL
 
114
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
115
Insert some values and select them on slave
 
116
SELECT * FROM t1;
 
117
a       b       c       d
 
118
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
 
119
SHOW CREATE TABLE t1;
 
120
Table   Create Table
 
121
t1      CREATE TABLE `t1` (
 
122
  `a` varchar(100) DEFAULT NULL,
 
123
  `b` varchar(400) DEFAULT NULL,
 
124
  `c` varchar(500) DEFAULT NULL,
 
125
  `d` char(100) DEFAULT NULL
 
126
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
127
DROP TABLE t1;
 
128
Create bit table on master
 
129
CREATE TABLE t1 (
 
130
a BIT(7),
 
131
b BIT(8),
 
132
c BIT(21),
 
133
d BIT(11),
 
134
e BIT(11)
 
135
);
 
136
Create bit table on slave
 
137
DROP TABLE t1;
 
138
CREATE TABLE t1 (
 
139
a BIT(16),
 
140
b BIT(22),
 
141
c BIT(54),
 
142
d BIT(25),
 
143
e BIT(13)
 
144
);
 
145
Insert some values and select them on master
 
146
INSERT INTO t1 VALUES (
 
147
b'1010101',
 
148
b'10101011',
 
149
b'101010110101010101111',
 
150
b'10101010101',
 
151
b'10101011111'
 
152
  );
 
153
SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
 
154
BIN(a)  BIN(b)  BIN(c)  BIN(d)  BIN(e)
 
155
1010101 10101011        101010110101010101111   10101010101     10101011111
 
156
SHOW CREATE TABLE t1;
 
157
Table   Create Table
 
158
t1      CREATE TABLE `t1` (
 
159
  `a` bit(7) DEFAULT NULL,
 
160
  `b` bit(8) DEFAULT NULL,
 
161
  `c` bit(21) DEFAULT NULL,
 
162
  `d` bit(11) DEFAULT NULL,
 
163
  `e` bit(11) DEFAULT NULL
 
164
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
165
Insert some values and select them on master
 
166
SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
 
167
BIN(a)  BIN(b)  BIN(c)  BIN(d)  BIN(e)
 
168
1010101 10101011        101010110101010101111   10101010101     10101011111
 
169
SHOW CREATE TABLE t1;
 
170
Table   Create Table
 
171
t1      CREATE TABLE `t1` (
 
172
  `a` bit(16) DEFAULT NULL,
 
173
  `b` bit(22) DEFAULT NULL,
 
174
  `c` bit(54) DEFAULT NULL,
 
175
  `d` bit(25) DEFAULT NULL,
 
176
  `e` bit(13) DEFAULT NULL
 
177
) ENGINE=MyISAM DEFAULT CHARSET=latin1
 
178
*** Cleanup  ***
 
179
DROP TABLE t1;