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

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.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
CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
 
8
`nom` char(4) default NULL,
 
9
`prenom` char(4) default NULL,
 
10
PRIMARY KEY  (`nid`)) 
 
11
ENGINE=ndbcluster DEFAULT CHARSET=latin1;
 
12
INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
 
13
select * from t1 order by nid;
 
14
nid     nom     prenom
 
15
1       XYZ1    ABC1
 
16
select * from t1 order by nid;
 
17
nid     nom     prenom
 
18
1       XYZ1    ABC1
 
19
delete from t1;
 
20
INSERT INTO t1 VALUES(1,"XYZ2","ABC2");
 
21
select * from t1 order by nid;
 
22
nid     nom     prenom
 
23
1       XYZ2    ABC2
 
24
select * from t1 order by nid;
 
25
nid     nom     prenom
 
26
1       XYZ2    ABC2
 
27
delete from t1;
 
28
insert into t1 values(1,"AA", "AA");
 
29
insert into t1 values(2,"BB", "BB");
 
30
insert into t1 values(3,"CC", "CC");
 
31
insert into t1 values(4,"DD", "DD");
 
32
begin;
 
33
delete from t1 where nid = 1;
 
34
insert into t1 values (1,"A2", "A2");
 
35
update t1 set nom="B2" where nid = 2;
 
36
delete from t1 where nid = 2;
 
37
update t1 set nom = "D2" where nid = 4;
 
38
delete from t1 where nid = 4;
 
39
insert into t1 values (4, "D3", "D3");
 
40
update t1 set nom = "D4" where nid = 4;
 
41
insert into t1 values (5, "EE", "EE");
 
42
delete from t1 where nid = 5;
 
43
commit;
 
44
select * from t1 order by 1;
 
45
nid     nom     prenom
 
46
1       A2      A2
 
47
3       CC      CC
 
48
4       D4      D3
 
49
select * from t1 order by 1;
 
50
nid     nom     prenom
 
51
1       A2      A2
 
52
3       CC      CC
 
53
4       D4      D3
 
54
DROP table t1;
 
55
CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
 
56
`nom` char(4) default NULL,
 
57
`prenom` char(4) default NULL)
 
58
ENGINE=ndbcluster DEFAULT CHARSET=latin1;
 
59
INSERT INTO t1 VALUES(1,"XYZ1","ABC1"),(2,"AAA","BBB"),(3,"CCC","DDD");
 
60
select * from t1 order by nid;
 
61
nid     nom     prenom
 
62
1       XYZ1    ABC1
 
63
2       AAA     BBB
 
64
3       CCC     DDD
 
65
select * from t1 order by nid;
 
66
nid     nom     prenom
 
67
1       XYZ1    ABC1
 
68
2       AAA     BBB
 
69
3       CCC     DDD
 
70
delete from t1 where nid = 2;
 
71
INSERT INTO t1 VALUES(4,"EEE","FFF");
 
72
select * from t1 order by nid;
 
73
nid     nom     prenom
 
74
1       XYZ1    ABC1
 
75
3       CCC     DDD
 
76
4       EEE     FFF
 
77
select * from t1 order by nid;
 
78
nid     nom     prenom
 
79
1       XYZ1    ABC1
 
80
3       CCC     DDD
 
81
4       EEE     FFF
 
82
UPDATE t1 set nid=nid+1;
 
83
UPDATE t1 set nom="CCP" where nid = 4;
 
84
select * from t1 order by nid;
 
85
nid     nom     prenom
 
86
2       XYZ1    ABC1
 
87
4       CCP     DDD
 
88
5       EEE     FFF
 
89
select * from t1 order by nid;
 
90
nid     nom     prenom
 
91
2       XYZ1    ABC1
 
92
4       CCP     DDD
 
93
5       EEE     FFF
 
94
DROP table t1;
 
95
CREATE TABLE `t1` (
 
96
`prid` int(10) unsigned NOT NULL,
 
97
`id_type` enum('IMSI','SIP') NOT NULL,
 
98
`fkimssub` varchar(50) NOT NULL,
 
99
`user_id` varchar(20) DEFAULT NULL,
 
100
`password` varchar(20) DEFAULT NULL,
 
101
`ptg_nbr` varchar(20) DEFAULT NULL,
 
102
`old_tmsi` int(10) unsigned DEFAULT NULL,
 
103
`new_tmsi` int(10) unsigned DEFAULT NULL,
 
104
`dev_capability` int(10) unsigned DEFAULT NULL,
 
105
`dev_oid` bigint(20) unsigned DEFAULT NULL,
 
106
`lac_cell_id` bigint(20) unsigned DEFAULT NULL,
 
107
`ms_classmark1` int(10) unsigned DEFAULT NULL,
 
108
`cipher_key` int(10) unsigned DEFAULT NULL,
 
109
`priid_master` int(10) unsigned DEFAULT NULL,
 
110
PRIMARY KEY (`prid`),
 
111
UNIQUE KEY `fkimssub` (`fkimssub`,`ptg_nbr`) USING HASH
 
112
) ENGINE=ndbcluster DEFAULT CHARSET=latin1;
 
113
Warnings:
 
114
Warning 1121    Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan
 
115
INSERT INTO `t1` VALUES (183342,'IMSI','config3_sub_2Privates_3Publics_imssub_36668','user_id_73336','user_id_73336','73336',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(47617,'IMSI','config3_sub_2Privates_3Publics_imssub_9523','user_id_19046','user_id_19046','19046',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(200332,'IMSI','config3_sub_2Privates_3Publics_imssub_40066','user_id_80132','user_id_80132','80132',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(478882,'IMSI','config3_sub_2Privates_3Publics_imssub_95776','user_id_191552','user_id_191552','191552',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(490146,'IMSI','config3_sub_2Privates_3Publics_imssub_98029','user_id_196057','user_id_196057','196057',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(499301,'IMSI','config3_sub_2Privates_3Publics_imssub_99860','user_id_199719','user_id_199719','199719',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(506101,'IMSI','config3_sub_2Privates_3Publics_imssub_101220','user_id_202439','user_id_202439','202439',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(510142,'IMSI','config3_sub_2Privates_3Publics_imssub_102028','user_id_204056','user_id_204056','204056',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(515871,'IMSI','config3_sub_2Privates_3Publics_imssub_103174','user_id_206347','user_id_206347','206347',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(209842,'IMSI','config3_sub_2Privates_3Publics_imssub_41968','user_id_83936','user_id_83936','83936',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL),(365902,'IMSI','config3_sub_2Privates_3Publics_imssub_73180','user_id_146360','user_id_146360','146360',NULL,NULL,NULL,1010,NULL,NULL,NULL,NULL),(11892,'IMSI','config3_sub_2Privates_3Publics_imssub_2378','user_id_4756','user_id_4756','4756',NULL,NULL,NULL,123456789,NULL,NULL,NULL,NULL);
 
116
select count(*) from t1;
 
117
count(*)
 
118
12
 
119
select count(*) from t1;
 
120
count(*)
 
121
12
 
122
update t1 set dev_oid=dev_oid+1;
 
123
select count(*) from t1;
 
124
count(*)
 
125
12
 
126
select count(*) from t1;
 
127
count(*)
 
128
12
 
129
DROP table t1;
 
130
CREATE TABLE `t1` ( `nid` int(11) NOT NULL default '0',
 
131
`nom` char(4) default NULL,
 
132
`prenom` char(4) default NULL,
 
133
PRIMARY KEY USING HASH (`nid`)) 
 
134
ENGINE=ndbcluster DEFAULT CHARSET=latin1;
 
135
INSERT INTO t1 VALUES(1,"XYZ1","ABC1");
 
136
**** On Slave ****
 
137
BEGIN;
 
138
UPDATE t1 SET `nom`="LOCK" WHERE `nid`=1;
 
139
set GLOBAL slave_transaction_retries=1;
 
140
**** On Master ****
 
141
UPDATE t1 SET `nom`="DEAD" WHERE `nid`=1;
 
142
**** On Slave ****
 
143
SHOW SLAVE STATUS;;
 
144
Slave_IO_State  <Slave_IO_State>
 
145
Master_Host     127.0.0.1
 
146
Master_User     root
 
147
Master_Port     MASTER_PORT
 
148
Connect_Retry   1
 
149
Master_Log_File master-bin.000001
 
150
Read_Master_Log_Pos     <Read_Master_Log_Pos>
 
151
Relay_Log_File  <Relay_Log_File>
 
152
Relay_Log_Pos   <Relay_Log_Pos>
 
153
Relay_Master_Log_File   master-bin.000001
 
154
Slave_IO_Running        Yes
 
155
Slave_SQL_Running       No
 
156
Replicate_Do_DB 
 
157
Replicate_Ignore_DB     
 
158
Replicate_Do_Table      
 
159
Replicate_Ignore_Table  <Replicate_Ignore_Table>
 
160
Replicate_Wild_Do_Table 
 
161
Replicate_Wild_Ignore_Table     
 
162
Last_Errno      <Last_Errno>
 
163
Last_Error      <Last_Error>
 
164
Skip_Counter    0
 
165
Exec_Master_Log_Pos     <Exec_Master_Log_Pos>
 
166
Relay_Log_Space <Relay_Log_Space>
 
167
Until_Condition None
 
168
Until_Log_File  
 
169
Until_Log_Pos   0
 
170
Master_SSL_Allowed      No
 
171
Master_SSL_CA_File      
 
172
Master_SSL_CA_Path      
 
173
Master_SSL_Cert 
 
174
Master_SSL_Cipher       
 
175
Master_SSL_Key  
 
176
Seconds_Behind_Master   <Seconds_Behind_Master>
 
177
Master_SSL_Verify_Server_Cert   No
 
178
Last_IO_Errno   <Last_IO_Errno>
 
179
Last_IO_Error   <Last_IO_Error>
 
180
Last_SQL_Errno  <Last_SQL_Errno>
 
181
Last_SQL_Error  <Last_SQL_Error>
 
182
set GLOBAL slave_transaction_retries=10;
 
183
include/start_slave.inc
 
184
select * from t1 order by nid;
 
185
nid     nom     prenom
 
186
1       LOCK    ABC1
 
187
COMMIT;
 
188
select * from t1 order by nid;
 
189
nid     nom     prenom
 
190
1       DEAD    ABC1
 
191
DROP TABLE t1;
 
192
CREATE TABLE t1 (c1 INT KEY) ENGINE=NDB;
 
193
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
 
194
ALTER TABLE t1 ADD c2 INT;
 
195
SELECT * FROM t1 ORDER BY c1;
 
196
c1      c2
 
197
1       NULL
 
198
2       NULL
 
199
3       NULL
 
200
4       NULL
 
201
5       NULL
 
202
6       NULL
 
203
7       NULL
 
204
8       NULL
 
205
9       NULL
 
206
10      NULL
 
207
ALTER TABLE t1 CHANGE c2 c2 TEXT CHARACTER SET utf8;
 
208
ALTER TABLE t1 CHANGE c2 c2 BLOB;
 
209
SELECT * FROM t1 ORDER BY c1 LIMIT 5;
 
210
c1      c2
 
211
1       NULL
 
212
2       NULL
 
213
3       NULL
 
214
4       NULL
 
215
5       NULL
 
216
TRUNCATE t1;
 
217
SELECT count(*) FROM t1;
 
218
count(*)
 
219
0
 
220
INSERT INTO t1 VALUES (101,NULL),(102,NULL),(103,NULL),(104,NULL),(105,NULL),(106,NULL),(107,NULL),(108,NULL),(109,NULL),(1010,NULL);
 
221
SELECT count(*) FROM t1;
 
222
count(*)
 
223
10
 
224
SELECT c1 FROM t1 ORDER BY c1 LIMIT 5;
 
225
c1
 
226
101
 
227
102
 
228
103
 
229
104
 
230
105
 
231
DROP TABLE t1;