Debian Codegraph @

mysql-test/suite/ndb_rpl/r/ndb_rpl_2myisam.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 set ndb_table_temporary=0;
7 set @@global.replica_exec_mode= 'IDEMPOTENT';
8 CREATE TABLE mysql.ndb_apply_status
9 ( server_id INT UNSIGNED NOT NULL,
10 epoch BIGINT UNSIGNED NOT NULL,
11 log_name VARBINARY(255) NOT NULL,
12 start_pos BIGINT UNSIGNED NOT NULL,
13 end_pos BIGINT UNSIGNED NOT NULL,
14 PRIMARY KEY USING HASH (server_id)) ENGINE=MYISAM
15 CHARACTER SET latin1;
16 set new=on;
17 Warnings:
18 Warning 1287 '@@new' is deprecated and will be removed in a future release.
19 set default_storage_engine=ndbcluster;
20 supports_native_partitioning: 0
21 --- Start test 1 Basic testing ---
22 --- Create Table Section ---
23 CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255),
24 bc CHAR(255), d DECIMAL(10,4) DEFAULT 0,
25 f FLOAT DEFAULT 0, total BIGINT UNSIGNED,
26 y YEAR, t DATE,PRIMARY KEY(id));
27 --- Show table on master ---
28 SHOW CREATE TABLE t1;
29 Table Create Table
30 t1 CREATE TABLE `t1` (
31 `id` mediumint NOT NULL,
32 `b1` bit(8) DEFAULT NULL,
33 `vc` varchar(255) DEFAULT NULL,
34 `bc` char(255) DEFAULT NULL,
35 `d` decimal(10,4) DEFAULT '0.0000',
36 `f` float DEFAULT '0',
37 `total` bigint unsigned DEFAULT NULL,
38 `y` year DEFAULT NULL,
39 `t` date DEFAULT NULL,
40 PRIMARY KEY (`id`)
41 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
42 --- Show table on slave ---
43 SHOW CREATE TABLE t1;
44 Table Create Table
45 t1 CREATE TABLE `t1` (
46 `id` mediumint NOT NULL,
47 `b1` bit(8) DEFAULT NULL,
48 `vc` varchar(255) DEFAULT NULL,
49 `bc` char(255) DEFAULT NULL,
50 `d` decimal(10,4) DEFAULT '0.0000',
51 `f` float DEFAULT '0',
52 `total` bigint unsigned DEFAULT NULL,
53 `y` year DEFAULT NULL,
54 `t` date DEFAULT NULL,
55 PRIMARY KEY (`id`)
56 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
57 --- Perform basic operation on master ---
58 --- and ensure replicated correctly ---
59 "--- Insert into t1 --" as "";
60 --- Select from t1 on master ---
61 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
62 id hex(b1) vc bc d f total y t
63 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
64 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
65 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
66 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
67 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
68 --- Select from t1 on slave ---
69 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
70 id hex(b1) vc bc d f total y t
71 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
72 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
73 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
74 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
75 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
76 --- Update t1 on master --
77 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
78 --- Check the update on master ---
79 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
80 id hex(b1) vc bc d f total y t
81 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
82 --- Check Update on slave ---
83 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
84 id hex(b1) vc bc d f total y t
85 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
86 --- Remove a record from t1 on master ---
87 DELETE FROM t1 WHERE id = 42;
88 --- Show current count on master for t1 ---
89 SELECT COUNT(*) FROM t1;
90 COUNT(*)
91 4
92 --- Show current count on slave for t1 ---
93 SELECT COUNT(*) FROM t1;
94 COUNT(*)
95 4
96 DELETE FROM t1;
97 --- Check that simple Alter statements are replicated correctly --
98 ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total);
99 ALTER TABLE t1 MODIFY vc TEXT;
100 --- Show the new improved table on the master ---
101 SHOW CREATE TABLE t1;
102 Table Create Table
103 t1 CREATE TABLE `t1` (
104 `id` mediumint NOT NULL,
105 `b1` bit(8) DEFAULT NULL,
106 `vc` text,
107 `bc` char(255) DEFAULT NULL,
108 `d` decimal(10,4) DEFAULT '0.0000',
109 `f` float DEFAULT '0',
110 `total` bigint unsigned NOT NULL,
111 `y` year DEFAULT NULL,
112 `t` date DEFAULT NULL,
113 PRIMARY KEY (`id`,`total`)
114 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
115 --- Make sure that our tables on slave are still same engine ---
116 --- and that the alter statements replicated correctly ---
117 SHOW CREATE TABLE t1;
118 Table Create Table
119 t1 CREATE TABLE `t1` (
120 `id` mediumint NOT NULL,
121 `b1` bit(8) DEFAULT NULL,
122 `vc` text,
123 `bc` char(255) DEFAULT NULL,
124 `d` decimal(10,4) DEFAULT '0.0000',
125 `f` float DEFAULT '0',
126 `total` bigint unsigned NOT NULL,
127 `y` year DEFAULT NULL,
128 `t` date DEFAULT NULL,
129 PRIMARY KEY (`id`,`total`)
130 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
131 --- Perform basic operation on master ---
132 --- and ensure replicated correctly ---
133 "--- Insert into t1 --" as "";
134 --- Select from t1 on master ---
135 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
136 id hex(b1) vc bc d f total y t
137 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
138 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
139 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
140 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
141 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
142 --- Select from t1 on slave ---
143 select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id;
144 id hex(b1) vc bc d f total y t
145 2 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1965-11-14
146 4 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1985-11-14
147 42 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1905-11-14
148 142 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 1995-11-14
149 412 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2005-11-14
150 --- Update t1 on master --
151 UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412;
152 --- Check the update on master ---
153 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
154 id hex(b1) vc bc d f total y t
155 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
156 --- Check Update on slave ---
157 SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412;
158 id hex(b1) vc bc d f total y t
159 412 0 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22
160 --- Remove a record from t1 on master ---
161 DELETE FROM t1 WHERE id = 42;
162 --- Show current count on master for t1 ---
163 SELECT COUNT(*) FROM t1;
164 COUNT(*)
165 4
166 --- Show current count on slave for t1 ---
167 SELECT COUNT(*) FROM t1;
168 COUNT(*)
169 4
170 DELETE FROM t1;
171 --- End test 1 Basic testing ---
172 --- Do Cleanup --
173 DROP TABLE IF EXISTS t1;
174 set @@global.replica_exec_mode= 'STRICT';
175 drop table mysql.ndb_apply_status;
176 include/rpl_end.inc