Debian Codegraph @

mysql-test/suite/ndb_rpl/r/ndb_rpl_blob_size.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 stop replica;
7 ## CREATE TABLE in master with custom Blob inline size
8 CREATE TABLE test.t1 (a int primary key,
9 b blob comment "NDB_COLUMN=BLOB_INLINE_SIZE=64",
10 bm mediumblob comment "NDB_COLUMN=BLOB_INLINE_SIZE=700",
11 bl longblob,
12 t text comment "NDB_COLUMN=BLOB_INLINE_SIZE=100",
13 tm mediumtext comment "NDB_COLUMN=BLOB_INLINE_SIZE=512",
14 tl longtext comment "NDB_COLUMN=BLOB_INLINE_SIZE=128")
15 engine=ndb;
16 ## Verify inline and partition sizes of test.t1 on master
17 SELECT inline_size, part_size FROM ndbinfo.blobs WHERE table_name = 't1';
18 inline_size part_size
19 64 2000
20 700 4000
21 256 13948
22 100 2000
23 512 4000
24 128 13948
25 reset master;
26 ## Create table in replica with other custom Blob inline size
27 CREATE TABLE test.t1 (a int primary key,
28 b blob comment "NDB_COLUMN=BLOB_INLINE_SIZE=96",
29 bm mediumblob comment "NDB_COLUMN=BLOB_INLINE_SIZE=456",
30 bl longblob comment "NDB_COLUMN=BLOB_INLINE_SIZE=766",
31 t text,
32 tm mediumtext comment "NDB_COLUMN=BLOB_INLINE_SIZE=255",
33 tl longtext comment "NDB_COLUMN=BLOB_INLINE_SIZE=255")
34 engine=ndb;
35 start replica;
36 ## Verify inline and partition sizes of test.t1 on replica
37 SELECT inline_size, part_size FROM ndbinfo.blobs WHERE table_name = 't1';
38 inline_size part_size
39 96 2000
40 456 4000
41 766 13948
42 256 2000
43 255 4000
44 255 13948
45 ## Connect to master and insert values on test.t1
46 INSERT INTO test.t1 VALUES
47 (
48 1,
49 repeat('J',60000),
50 repeat('J',60000),
51 repeat('J',60000),
52 repeat(_utf32 0x1F47E,15000),
53 repeat(_utf32 0x1F47E,60000),
54 repeat(_utf32 0x1F47E,60000)),
55 (
56 2,
57 repeat('K',60000),
58 repeat('K',60000),
59 repeat('K',60000),
60 repeat(_utf32 0x1F47D,15000),
61 repeat(_utf32 0x1F47D,60000),
62 repeat(_utf32 0x1F47D,60000)),
63 (
64 3,
65 repeat('L',60000),
66 repeat('L',60000),
67 repeat('L',60000),
68 repeat(_utf32 0x1F47C,15000),
69 repeat(_utf32 0x1F47C,60000),
70 repeat(_utf32 0x1F47C,60000));
71
72 ## Verify inserted values on master, sync and verify those on replica
73 SELECT a, sha1(b), sha1(bm), sha1(bl), sha1(t), sha1(tm), sha1(tl) FROM test.t1 ORDER BY a;
74 a sha1(b) sha1(bm) sha1(bl) sha1(t) sha1(tm) sha1(tl)
75 1 b0be713435a4afe8da1785f8d4c879a7af3a91a5 b0be713435a4afe8da1785f8d4c879a7af3a91a5 b0be713435a4afe8da1785f8d4c879a7af3a91a5 5adfaa7bc57d12afbafae28fbe2497f36e604ff9 83d131c719aaa6026ee3a3fcec2ad856ed1e1a67 83d131c719aaa6026ee3a3fcec2ad856ed1e1a67
76 2 d5950c0a4f54841607d278b9b85e6ece7f17b391 d5950c0a4f54841607d278b9b85e6ece7f17b391 d5950c0a4f54841607d278b9b85e6ece7f17b391 c8309b03b49ea221240972d3dbf6613c9f503283 2abc30b2daa3c61390c442518f34c4b63af579ad 2abc30b2daa3c61390c442518f34c4b63af579ad
77 3 bb83d65b3b7e04c81fc59390a6a2c26a04070b93 bb83d65b3b7e04c81fc59390a6a2c26a04070b93 bb83d65b3b7e04c81fc59390a6a2c26a04070b93 e8d860ea44ff946acbcd1dd18c462480472847d1 35f775de2d256b02670507c8e96f9c91d671afb8 35f775de2d256b02670507c8e96f9c91d671afb8
78 SELECT a, sha1(b), sha1(bm), sha1(bl), sha1(t), sha1(tm), sha1(tl) FROM test.t1 ORDER BY a;
79 a sha1(b) sha1(bm) sha1(bl) sha1(t) sha1(tm) sha1(tl)
80 1 b0be713435a4afe8da1785f8d4c879a7af3a91a5 b0be713435a4afe8da1785f8d4c879a7af3a91a5 b0be713435a4afe8da1785f8d4c879a7af3a91a5 5adfaa7bc57d12afbafae28fbe2497f36e604ff9 83d131c719aaa6026ee3a3fcec2ad856ed1e1a67 83d131c719aaa6026ee3a3fcec2ad856ed1e1a67
81 2 d5950c0a4f54841607d278b9b85e6ece7f17b391 d5950c0a4f54841607d278b9b85e6ece7f17b391 d5950c0a4f54841607d278b9b85e6ece7f17b391 c8309b03b49ea221240972d3dbf6613c9f503283 2abc30b2daa3c61390c442518f34c4b63af579ad 2abc30b2daa3c61390c442518f34c4b63af579ad
82 3 bb83d65b3b7e04c81fc59390a6a2c26a04070b93 bb83d65b3b7e04c81fc59390a6a2c26a04070b93 bb83d65b3b7e04c81fc59390a6a2c26a04070b93 e8d860ea44ff946acbcd1dd18c462480472847d1 35f775de2d256b02670507c8e96f9c91d671afb8 35f775de2d256b02670507c8e96f9c91d671afb8
83
84 ## Update values on master, verify, sync and verify those on replica
85 UPDATE test.t1 SET
86 b=left(b,59000),
87 bm=left(bm, 59000),
88 bl=left(bl, 59000),
89 t=left(t,14000),
90 tm=left(tm, 59000),
91 tl=left(tl, 59000);
92 SELECT a, sha1(b), sha1(bm), sha1(bl), sha1(t), sha1(tm), sha1(tl) FROM test.t1 order by a;
93 a sha1(b) sha1(bm) sha1(bl) sha1(t) sha1(tm) sha1(tl)
94 1 4d600b2f06d25c2aa8c0cdf97f4fa1f39587326a 4d600b2f06d25c2aa8c0cdf97f4fa1f39587326a 4d600b2f06d25c2aa8c0cdf97f4fa1f39587326a 559f4ebf66e0318b821c3914a9df199bab6546d8 bf88664d7e8cf9785ef0c3de6f913dadd38cc7c5 bf88664d7e8cf9785ef0c3de6f913dadd38cc7c5
95 2 db9d4b27baffbdee7dad91a7633a228c653e2af5 db9d4b27baffbdee7dad91a7633a228c653e2af5 db9d4b27baffbdee7dad91a7633a228c653e2af5 ebac5ad15b4941997be96ef1a6883aefd4ebc07b 45d1660acc8a8884d8ceff3a6a4594b50a5446a3 45d1660acc8a8884d8ceff3a6a4594b50a5446a3
96 3 571d9ab7a0546b52048b1f2b7c34864fe37ae97e 571d9ab7a0546b52048b1f2b7c34864fe37ae97e 571d9ab7a0546b52048b1f2b7c34864fe37ae97e d9dbf90c93dce56f023a0d73060989b63f5c4e8b 9825358fe11f44b2b7b096d0c637a1f1dd727b52 9825358fe11f44b2b7b096d0c637a1f1dd727b52
97 SELECT a, sha1(b), sha1(bm), sha1(bl), sha1(t), sha1(tm), sha1(tl) FROM test.t1 order by a;
98 a sha1(b) sha1(bm) sha1(bl) sha1(t) sha1(tm) sha1(tl)
99 1 4d600b2f06d25c2aa8c0cdf97f4fa1f39587326a 4d600b2f06d25c2aa8c0cdf97f4fa1f39587326a 4d600b2f06d25c2aa8c0cdf97f4fa1f39587326a 559f4ebf66e0318b821c3914a9df199bab6546d8 bf88664d7e8cf9785ef0c3de6f913dadd38cc7c5 bf88664d7e8cf9785ef0c3de6f913dadd38cc7c5
100 2 db9d4b27baffbdee7dad91a7633a228c653e2af5 db9d4b27baffbdee7dad91a7633a228c653e2af5 db9d4b27baffbdee7dad91a7633a228c653e2af5 ebac5ad15b4941997be96ef1a6883aefd4ebc07b 45d1660acc8a8884d8ceff3a6a4594b50a5446a3 45d1660acc8a8884d8ceff3a6a4594b50a5446a3
101 3 571d9ab7a0546b52048b1f2b7c34864fe37ae97e 571d9ab7a0546b52048b1f2b7c34864fe37ae97e 571d9ab7a0546b52048b1f2b7c34864fe37ae97e d9dbf90c93dce56f023a0d73060989b63f5c4e8b 9825358fe11f44b2b7b096d0c637a1f1dd727b52 9825358fe11f44b2b7b096d0c637a1f1dd727b52
102
103 ## Delete on master, sync and verify deletion on replica
104 DELETE FROM test.t1;
105 SELECT a, sha1(b), sha1(bm), sha1(bl), sha1(t), sha1(tm), sha1(tl) FROM test.t1 order by a;
106 a sha1(b) sha1(bm) sha1(bl) sha1(t) sha1(tm) sha1(tl)
107 DROP TABLE test.t1;
108 include/rpl_end.inc