1include/master-slave.inc
2[connection master]
3create table t1 (
4a int not null primary key,
5b text not null
6) engine=ndb;
7insert into t1 values(1, repeat('abc',10));
8insert into t1 values(2, repeat('def',200));
9insert into t1 values(3, repeat('ghi',3000));
10select 'M', a, sha1(b) from t1
11order by a;
12M	a	sha1(b)
13M	1	8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d
14M	2	0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa
15M	3	75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e
16select 'S', a, sha1(b) from t1
17order by a;
18S	a	sha1(b)
19S	1	8a6c4cf7cf97e66c487c3e3b717e9ae13623d07d
20S	2	0ccd08c0fa6ad6a4382b27b1d36586d6ceb4fffa
21S	3	75e7b3299e0b776aeac2a4d1542d5b3c0ba2e05e
22update t1 set b = repeat('xyz',3000) where a = 1;
23delete from t1 where a = 2;
24update t1 set b = concat(b,'xyz') where a = 3;
25select 'M', a, sha1(b) from t1
26order by a;
27M	a	sha1(b)
28M	1	00fb68a43c526c2b7e3466ddcf2b3e39277d0fe1
29M	3	e731e68ab2482967619b62a69a5d03dfcbb9ce16
30select 'S', a, sha1(b) from t1
31order by a;
32S	a	sha1(b)
33S	1	00fb68a43c526c2b7e3466ddcf2b3e39277d0fe1
34S	3	e731e68ab2482967619b62a69a5d03dfcbb9ce16
35drop table t1;
36create table t1 (
37a int not null primary key,
38b text not null,
39c int,
40d longblob,
41e tinyblob
42) engine=ndbcluster;
43insert into t1 values (
440, repeat(@s2,454), 100, repeat(@s2,345), NULL);
45insert into t1 values (
461, repeat(@s0,504), NULL, repeat(@s1,732), repeat(@s1,1));
47insert into t1 values (
482, '', 102, '', repeat(@s2,1));
49insert into t1 values (
503, repeat(@s0,545), 103, repeat(@s2,788), repeat(@s0,1));
51insert into t1 values (
524, repeat(@s1,38), 104, repeat(@s0,260), repeat(@s0,1));
53insert into t1 values (
545, repeat(@s2,12), 105, repeat(@s2,40), repeat(@s1,1));
55insert into t1 values (
566, repeat(@s1,242), 106, NULL, repeat(@s1,1));
57insert into t1 values (
587, repeat(@s1,30), 107, repeat(@s0,161), '');
59insert into t1 values (
608, repeat(@s1,719), 108, repeat(@s2,104), NULL);
61insert into t1 values (
629, repeat(@s2,427), NULL, NULL, NULL);
63select 'M', a, sha1(b), c, sha1(d), sha1(e)
64from t1 order by a;
65M	a	sha1(b)	c	sha1(d)	sha1(e)
66M	0	9538f61e649383c0d1054de2a2f0171188129f33	100	2b6515f29c20b8e9e17cc597527e516c0de8d612	NULL
67M	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	f23e7439d9a73c3954979b85a7ef6ef35faf4e9d	abfe8ae5212b22d023aa6de84beeb1344ac5668a
68M	2	da39a3ee5e6b4b0d3255bfef95601890afd80709	102	da39a3ee5e6b4b0d3255bfef95601890afd80709	33deebe47470a40e960834bffa4cdc66790845a6
69M	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	278629ad080c3c4377978c006c2e54d0992e43cc	700915801f853603510aeb67b331866d996fdbda
70M	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	5084b602c7203e0e9590a163415ac605da17ac32	700915801f853603510aeb67b331866d996fdbda
71M	5	0f9653f0c7a69cd1c617792d546582e974a7a24d	105	566588a04ff26d05160d61c83435292bfda2978e	abfe8ae5212b22d023aa6de84beeb1344ac5668a
72M	6	a37e8b0ff4fc13a42be02cdecb36186436959bae	106	NULL	abfe8ae5212b22d023aa6de84beeb1344ac5668a
73M	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8	da39a3ee5e6b4b0d3255bfef95601890afd80709
74M	8	e139adcb7b2974ee7ff227fd405709e5cb7c896c	108	ba8073b0e1a281d4111bd2d82c7722b01574c00b	NULL
75M	9	1fc5168fe4be566b17b658d94e7813f0b5032cdb	NULL	NULL	NULL
76select 'S', a, sha1(b), c, sha1(d), sha1(e)
77from t1 order by a;
78S	a	sha1(b)	c	sha1(d)	sha1(e)
79S	0	9538f61e649383c0d1054de2a2f0171188129f33	100	2b6515f29c20b8e9e17cc597527e516c0de8d612	NULL
80S	1	dcb9a12ca86e718ff2564be041b7c1b3ff5ea559	NULL	f23e7439d9a73c3954979b85a7ef6ef35faf4e9d	abfe8ae5212b22d023aa6de84beeb1344ac5668a
81S	2	da39a3ee5e6b4b0d3255bfef95601890afd80709	102	da39a3ee5e6b4b0d3255bfef95601890afd80709	33deebe47470a40e960834bffa4cdc66790845a6
82S	3	ec8e06d9ac4695d6a898b519ba840590263a9bff	103	278629ad080c3c4377978c006c2e54d0992e43cc	700915801f853603510aeb67b331866d996fdbda
83S	4	0392fa8c425d293c79291f0f34779d1101d13fcb	104	5084b602c7203e0e9590a163415ac605da17ac32	700915801f853603510aeb67b331866d996fdbda
84S	5	0f9653f0c7a69cd1c617792d546582e974a7a24d	105	566588a04ff26d05160d61c83435292bfda2978e	abfe8ae5212b22d023aa6de84beeb1344ac5668a
85S	6	a37e8b0ff4fc13a42be02cdecb36186436959bae	106	NULL	abfe8ae5212b22d023aa6de84beeb1344ac5668a
86S	7	a6bae0cfe6b45ff8c3c12d2ce577a1cd3931190f	107	39ee712b4b9e47f2cf3ba7c9790b2bf0d8f378e8	da39a3ee5e6b4b0d3255bfef95601890afd80709
87S	8	e139adcb7b2974ee7ff227fd405709e5cb7c896c	108	ba8073b0e1a281d4111bd2d82c7722b01574c00b	NULL
88S	9	1fc5168fe4be566b17b658d94e7813f0b5032cdb	NULL	NULL	NULL
89drop table t1;
90CREATE TABLE IF NOT EXISTS t1 (
91db VARBINARY(63) NOT NULL,
92name VARBINARY(63) NOT NULL,
93slock BINARY(32) NOT NULL,
94query BLOB NOT NULL,
95node_id INT UNSIGNED NOT NULL,
96epoch BIGINT UNSIGNED NOT NULL,
97id INT UNSIGNED NOT NULL,
98version INT UNSIGNED NOT NULL,
99type INT UNSIGNED NOT NULL,
100PRIMARY KEY USING HASH (db,name))
101ENGINE=NDB;
102insert into t1 values ('test','t1',
103'abc',repeat(@s0,10),  11,12,13,14,15);
104insert into t1 values ('test','t2',
105'def',repeat(@s1,100), 21,22,23,24,25);
106insert into t1 values ('test','t3',
107'ghi',repeat(@s2,1000),31,32,33,34,35);
108insert into t1 values ('testtttttttttt','t1',
109'abc',repeat(@s0,10),  11,12,13,14,15);
110insert into t1 values ('testttttttttttt','t1',
111'def',repeat(@s1,100), 21,22,23,24,25);
112insert into t1 values ('testtttttttttttt','t1',
113'ghi',repeat(@s2,1000),31,32,33,34,35);
114insert into t1 values ('t','t11111111111',
115'abc',repeat(@s0,10),  11,12,13,14,15);
116insert into t1 values ('t','t111111111111',
117'def',repeat(@s1,100), 21,22,23,24,25);
118insert into t1 values ('t','t1111111111111',
119'ghi',repeat(@s2,1000),31,32,33,34,35);
120select 'M', db, name, sha1(query), node_id, epoch, id, version, type
121from t1 order by db, name;
122M	db	name	sha1(query)	node_id	epoch	id	version	type
123M	t	t11111111111	8fc937d303ee7e4795c0b964d4066cedd6d74cfd	11	12	13	14	15
124M	t	t111111111111	a5229e9f8977bc99afc3b3627c56f083e97e01bd	21	22	23	24	25
125M	t	t1111111111111	0820e6ad3eeb06ea60e5e04d0bfe36f286b91098	31	32	33	34	35
126M	test	t1	8fc937d303ee7e4795c0b964d4066cedd6d74cfd	11	12	13	14	15
127M	test	t2	a5229e9f8977bc99afc3b3627c56f083e97e01bd	21	22	23	24	25
128M	test	t3	0820e6ad3eeb06ea60e5e04d0bfe36f286b91098	31	32	33	34	35
129M	testtttttttttt	t1	8fc937d303ee7e4795c0b964d4066cedd6d74cfd	11	12	13	14	15
130M	testttttttttttt	t1	a5229e9f8977bc99afc3b3627c56f083e97e01bd	21	22	23	24	25
131M	testtttttttttttt	t1	0820e6ad3eeb06ea60e5e04d0bfe36f286b91098	31	32	33	34	35
132select 'S', db, name, sha1(query), node_id, epoch, id, version, type
133from t1 order by db, name;
134S	db	name	sha1(query)	node_id	epoch	id	version	type
135S	t	t11111111111	8fc937d303ee7e4795c0b964d4066cedd6d74cfd	11	12	13	14	15
136S	t	t111111111111	a5229e9f8977bc99afc3b3627c56f083e97e01bd	21	22	23	24	25
137S	t	t1111111111111	0820e6ad3eeb06ea60e5e04d0bfe36f286b91098	31	32	33	34	35
138S	test	t1	8fc937d303ee7e4795c0b964d4066cedd6d74cfd	11	12	13	14	15
139S	test	t2	a5229e9f8977bc99afc3b3627c56f083e97e01bd	21	22	23	24	25
140S	test	t3	0820e6ad3eeb06ea60e5e04d0bfe36f286b91098	31	32	33	34	35
141S	testtttttttttt	t1	8fc937d303ee7e4795c0b964d4066cedd6d74cfd	11	12	13	14	15
142S	testttttttttttt	t1	a5229e9f8977bc99afc3b3627c56f083e97e01bd	21	22	23	24	25
143S	testtttttttttttt	t1	0820e6ad3eeb06ea60e5e04d0bfe36f286b91098	31	32	33	34	35
144drop table t1;
145include/rpl_end.inc
146