mariadb_tzinfo_to_sql.result 7.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
connection node_2;
connection node_1;
#
# MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
#

# On node_1
connection node_1;
CREATE TABLE time_zone LIKE mysql.time_zone;
CREATE TABLE time_zone_name LIKE mysql.time_zone_name;
CREATE TABLE time_zone_transition LIKE mysql.time_zone_transition;
CREATE TABLE time_zone_transition_type LIKE mysql.time_zone_transition_type;
CREATE TABLE time_zone_leap_second LIKE mysql.time_zone_leap_second;
14 15
ALTER TABLE time_zone_name ENGINE=MyISAM;
ALTER TABLE time_zone_transition_type ENGINE=MyISAM;
16 17 18 19 20 21 22
SET @save_wsrep_mode=@@WSREP_MODE;
#
# Run on zoneinfo directory --skip-write-binlog
#

# Apply on node_1

Monty's avatar
Monty committed
23
Warnings:
24
Warning	4200	The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Monty's avatar
Monty committed
25
Warnings:
26
Warning	4200	The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
27 28 29
'binlog stationary as expected'
SELECT @wsrep_is_on,  @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@WSREP_ON, @@SQL_LOG_BIN;
@wsrep_is_on	@wsrep_cannot_replicate_tz	@save_wsrep_on	@save_sql_log_bin	@@WSREP_ON	@@SQL_LOG_BIN
30
1	0	1	1	1	1
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g
JOIN baseline b USING (VARIABLE_NAME)
ORDER BY g.VARIABLE_NAME;
VARIABLE_NAME	diff
COM_ALTER_TABLE	2
COM_BEGIN	0
COM_INSERT	6
COM_LOCK_TABLES	1
COM_TRUNCATE	4
SELECT COUNT(*) FROM time_zone;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_name;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_transition;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition_type;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_leap_second;
COUNT(*)
0

# On node_2 (not replicated)

connection node_2;
SELECT COUNT(*) FROM time_zone;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_name;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition_type;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_leap_second;
COUNT(*)
0

# Apply on node_1

connection node_1;
SET GLOBAL WSREP_MODE='REPLICATE_ARIA,REPLICATE_MYISAM';
Monty's avatar
Monty committed
80
Warnings:
81
Warning	4200	The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Monty's avatar
Monty committed
82
Warnings:
83
Warning	4200	The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
'binlog stationary as expected'
SELECT @wsrep_is_on,  @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@WSREP_ON, @@SQL_LOG_BIN;
@wsrep_is_on	@wsrep_cannot_replicate_tz	@save_wsrep_on	@save_sql_log_bin	@@WSREP_ON	@@SQL_LOG_BIN
1	0	1	1	1	1
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g
JOIN baseline b USING (VARIABLE_NAME)
ORDER BY g.VARIABLE_NAME;
VARIABLE_NAME	diff
COM_ALTER_TABLE	2
COM_BEGIN	0
COM_INSERT	6
COM_LOCK_TABLES	1
COM_TRUNCATE	4
SELECT COUNT(*) FROM time_zone;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_name;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_transition;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition_type;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_leap_second;
COUNT(*)
0

# On node_2 (not replicated)

connection node_2;
SELECT COUNT(*) FROM time_zone;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_name;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition_type;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_leap_second;
COUNT(*)
0
#
# Run on zoneinfo directory without --skip-write-binlog
#

# Apply on node_1

connection node_1;
Monty's avatar
Monty committed
139
Warnings:
140
Warning	4200	The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Monty's avatar
Monty committed
141
Warnings:
142
Warning	4200	The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
'binlog advanced as expected'
SELECT @wsrep_is_on,  @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@WSREP_ON, @@SQL_LOG_BIN;
@wsrep_is_on	@wsrep_cannot_replicate_tz	@save_wsrep_on	@save_sql_log_bin	@@WSREP_ON	@@SQL_LOG_BIN
1	0	1	1	1	1
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g
JOIN baseline b USING (VARIABLE_NAME)
ORDER BY g.VARIABLE_NAME;
VARIABLE_NAME	diff
COM_ALTER_TABLE	2
COM_BEGIN	0
COM_INSERT	6
COM_LOCK_TABLES	1
COM_TRUNCATE	4
SELECT COUNT(*) FROM time_zone;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_name;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_transition;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition_type;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_leap_second;
COUNT(*)
0

# On node_2 (replicated via ARIA)

connection node_2;
SELECT COUNT(*) FROM time_zone;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_name;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition_type;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_leap_second;
COUNT(*)
0
TRUNCATE TABLE time_zone;
TRUNCATE TABLE time_zone_name;
TRUNCATE TABLE time_zone_transition;
TRUNCATE TABLE time_zone_transition_type;
TRUNCATE TABLE time_zone_leap_second;

# Apply on node_1

connection node_1;
SET GLOBAL WSREP_MODE='';
Monty's avatar
Monty committed
201
Warnings:
202
Warning	4200	The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
Monty's avatar
Monty committed
203
Warnings:
204
Warning	4200	The variable '@@alter_algorithm' is ignored. It only exists for compatibility with old installations and will be removed in a future release
205 206 207 208 209 210 211 212 213
'binlog advanced as expected'
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@WSREP_ON, @@SQL_LOG_BIN;
@wsrep_is_on	@wsrep_cannot_replicate_tz	@save_wsrep_on	@save_sql_log_bin	@@WSREP_ON	@@SQL_LOG_BIN
1	1	1	1	1	1
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g
JOIN baseline b USING (VARIABLE_NAME)
ORDER BY g.VARIABLE_NAME;
VARIABLE_NAME	diff
214
COM_ALTER_TABLE	8
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
COM_BEGIN	1
COM_INSERT	6
COM_LOCK_TABLES	0
COM_TRUNCATE	4
SELECT COUNT(*) FROM time_zone;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_name;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_transition;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition_type;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_leap_second;
COUNT(*)
0
SELECT TABLE_NAME, ENGINE FROM information_schema.TABLES
WHERE
TABLE_SCHEMA = DATABASE()
AND TABLE_NAME LIKE 'time_zone%' ORDER BY TABLE_NAME;
TABLE_NAME	ENGINE
time_zone	Aria
time_zone_leap_second	Aria
time_zone_name	MyISAM
time_zone_transition	Aria
time_zone_transition_type	MyISAM

# On node_2 (replicated via InnoDB)

connection node_2;
SELECT COUNT(*) FROM time_zone;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_name;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_transition;
COUNT(*)
0
SELECT COUNT(*) FROM time_zone_transition_type;
COUNT(*)
2
SELECT COUNT(*) FROM time_zone_leap_second;
COUNT(*)
0
connection node_1;
SET GLOBAL WSREP_MODE=@save_wsrep_mode;
DROP TABLE baseline;
DROP TABLE time_zone;
DROP TABLE time_zone_name;
DROP TABLE time_zone_transition;
DROP TABLE time_zone_transition_type;
DROP TABLE time_zone_leap_second;
#
# End of 10.6 tests
#