| 1 |
# START : WITHOUT KEYRING PLUGIN |
| 2 |
|
| 3 |
######### |
| 4 |
# SETUP # |
| 5 |
######### |
| 6 |
CREATE TABLESPACE encrypt_ts ADD DATAFILE 'encrypt_ts.ibd' ENGINE=InnoDB ENCRYPTION="N"; |
| 7 |
CREATE TABLE t1(c1 char(100)) ENGINE=InnoDB TABLESPACE encrypt_ts; |
| 8 |
set global innodb_buf_flush_list_now = 1; |
| 9 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 10 |
NAME ENCRYPTION |
| 11 |
encrypt_ts N |
| 12 |
SELECT * FROM t1 LIMIT 10; |
| 13 |
c1 |
| 14 |
SOME VALUES |
| 15 |
SOME VALUES |
| 16 |
SOME VALUES |
| 17 |
SOME VALUES |
| 18 |
SOME VALUES |
| 19 |
SOME VALUES |
| 20 |
SOME VALUES |
| 21 |
SOME VALUES |
| 22 |
SOME VALUES |
| 23 |
SOME VALUES |
| 24 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y'; |
| 25 |
ERROR HY000: Can't find master key from keyring, please check in the server log if a keyring is loaded and initialized successfully. |
| 26 |
#-------------------------- TEST 1 -------------------------------------# |
| 27 |
# RESTART 1 : WITH KEYRING PLUGIN |
| 28 |
######################################################################## |
| 29 |
# ALTER TABLESPACE : Unencrypted => Encrypted # |
| 30 |
######################################################################## |
| 31 |
# Set process to crash at page 10 |
| 32 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 33 |
# Encrypt the tablespace. It will cause crash. |
| 34 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y'; |
| 35 |
# RESTART 2 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 36 |
# to crash just before flushing page 0 at the end |
| 37 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 38 |
Got one of the listed errors |
| 39 |
# Search the pattern in error log |
| 40 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 41 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" not found |
| 42 |
# RESTART 3 : Normal. In this restart resume operation should finish successfully |
| 43 |
# Wait for Encryption processing to finish in background thread |
| 44 |
# Search the pattern in error log |
| 45 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 46 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" found |
| 47 |
SELECT * FROM t1 LIMIT 10; |
| 48 |
c1 |
| 49 |
SOME VALUES |
| 50 |
SOME VALUES |
| 51 |
SOME VALUES |
| 52 |
SOME VALUES |
| 53 |
SOME VALUES |
| 54 |
SOME VALUES |
| 55 |
SOME VALUES |
| 56 |
SOME VALUES |
| 57 |
SOME VALUES |
| 58 |
SOME VALUES |
| 59 |
######################################################################## |
| 60 |
# ALTER TABLESPACE : Encrypted => Unencrypted # |
| 61 |
######################################################################## |
| 62 |
# Set process to crash at page 10 |
| 63 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 64 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 65 |
NAME ENCRYPTION |
| 66 |
encrypt_ts Y |
| 67 |
# Unencrypt the tablespace. It will cause crash. |
| 68 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='N'; |
| 69 |
# RESTART 4 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 70 |
# to crash just before flushing page 0 at the end |
| 71 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 72 |
Got one of the listed errors |
| 73 |
# Search the pattern in error log |
| 74 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 75 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" not found |
| 76 |
# RESTART 5 : Normal. In this restart resume operation should finish successfully |
| 77 |
# Wait for Encryption processing to finish in background thread |
| 78 |
# Search the pattern in error log |
| 79 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 80 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" found |
| 81 |
# RESTART 6 : WITHOUT KEYRING PLUGIN |
| 82 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 83 |
NAME ENCRYPTION |
| 84 |
encrypt_ts N |
| 85 |
SELECT * FROM t1 LIMIT 10; |
| 86 |
c1 |
| 87 |
SOME VALUES |
| 88 |
SOME VALUES |
| 89 |
SOME VALUES |
| 90 |
SOME VALUES |
| 91 |
SOME VALUES |
| 92 |
SOME VALUES |
| 93 |
SOME VALUES |
| 94 |
SOME VALUES |
| 95 |
SOME VALUES |
| 96 |
SOME VALUES |
| 97 |
#-------------------------- TEST 2 -------------------------------------# |
| 98 |
# RESTART 7 : WITH KEYRING PLUGIN |
| 99 |
######################################################################## |
| 100 |
# ALTER TABLESPACE : Unencrypted => Encrypted # |
| 101 |
######################################################################## |
| 102 |
# Set process to crash at page 10 |
| 103 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 104 |
# Encrypt the tablespace. It will cause crash. |
| 105 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y'; |
| 106 |
# RESTART 8 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 107 |
# to crash just after flushing page 0 at the end |
| 108 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 109 |
Got one of the listed errors |
| 110 |
# Search the pattern in error log |
| 111 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 112 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" not found |
| 113 |
# RESTART 9 : Normal. In this restart resume operation should finish successfully |
| 114 |
# Wait for Encryption processing to finish in background thread |
| 115 |
# Search the pattern in error log |
| 116 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 117 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" found |
| 118 |
SELECT * FROM t1 LIMIT 10; |
| 119 |
c1 |
| 120 |
SOME VALUES |
| 121 |
SOME VALUES |
| 122 |
SOME VALUES |
| 123 |
SOME VALUES |
| 124 |
SOME VALUES |
| 125 |
SOME VALUES |
| 126 |
SOME VALUES |
| 127 |
SOME VALUES |
| 128 |
SOME VALUES |
| 129 |
SOME VALUES |
| 130 |
######################################################################## |
| 131 |
# ALTER TABLESPACE : Encrypted => Unencrypted # |
| 132 |
######################################################################## |
| 133 |
# Set process to crash at page 10 |
| 134 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 135 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 136 |
NAME ENCRYPTION |
| 137 |
encrypt_ts Y |
| 138 |
# Unencrypt the tablespace. It will cause crash. |
| 139 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='N'; |
| 140 |
# RESTART 10 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 141 |
# to crash just after flushing page 0 at the end |
| 142 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 143 |
Got one of the listed errors |
| 144 |
# Search the pattern in error log |
| 145 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 146 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" not found |
| 147 |
# RESTART 11 : Normal. In this restart resume operation should finish successfully |
| 148 |
# Wait for Encryption processing to finish in background thread |
| 149 |
# Search the pattern in error log |
| 150 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 151 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" found |
| 152 |
# RESTART 12 : WITHOUT KEYRING PLUGIN |
| 153 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 154 |
NAME ENCRYPTION |
| 155 |
encrypt_ts N |
| 156 |
SELECT * FROM t1 LIMIT 10; |
| 157 |
c1 |
| 158 |
SOME VALUES |
| 159 |
SOME VALUES |
| 160 |
SOME VALUES |
| 161 |
SOME VALUES |
| 162 |
SOME VALUES |
| 163 |
SOME VALUES |
| 164 |
SOME VALUES |
| 165 |
SOME VALUES |
| 166 |
SOME VALUES |
| 167 |
SOME VALUES |
| 168 |
#-------------------------- TEST 3 -------------------------------------# |
| 169 |
# RESTART 13 : WITH KEYRING PLUGIN |
| 170 |
######################################################################## |
| 171 |
# ALTER TABLESPACE : Unencrypted => Encrypted # |
| 172 |
######################################################################## |
| 173 |
# Set process to crash at page 10 |
| 174 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 175 |
# Encrypt the tablespace. It will cause crash. |
| 176 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y'; |
| 177 |
# RESTART 14 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 178 |
# to crash just before resetting_progress on page 0 |
| 179 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 180 |
Got one of the listed errors |
| 181 |
# Search the pattern in error log |
| 182 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 183 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" not found |
| 184 |
# RESTART 15 : Normal. In this restart resume operation should finish successfully |
| 185 |
# Wait for Encryption processing to finish in background thread |
| 186 |
# Search the pattern in error log |
| 187 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 188 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" found |
| 189 |
SELECT * FROM t1 LIMIT 10; |
| 190 |
c1 |
| 191 |
SOME VALUES |
| 192 |
SOME VALUES |
| 193 |
SOME VALUES |
| 194 |
SOME VALUES |
| 195 |
SOME VALUES |
| 196 |
SOME VALUES |
| 197 |
SOME VALUES |
| 198 |
SOME VALUES |
| 199 |
SOME VALUES |
| 200 |
SOME VALUES |
| 201 |
######################################################################## |
| 202 |
# ALTER TABLESPACE : Encrypted => Unencrypted # |
| 203 |
######################################################################## |
| 204 |
# Set process to crash at page 10 |
| 205 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 206 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 207 |
NAME ENCRYPTION |
| 208 |
encrypt_ts Y |
| 209 |
# Unencrypt the tablespace. It will cause crash. |
| 210 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='N'; |
| 211 |
# RESTART 16 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 212 |
# to crash just before resetting_progress on page 0 |
| 213 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 214 |
Got one of the listed errors |
| 215 |
# Search the pattern in error log |
| 216 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 217 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" not found |
| 218 |
# RESTART 17 : Normal. In this restart resume operation should finish successfully |
| 219 |
# Wait for Encryption processing to finish in background thread |
| 220 |
# Search the pattern in error log |
| 221 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 222 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" found |
| 223 |
# RESTART 18 : WITHOUT KEYRING PLUGIN |
| 224 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 225 |
NAME ENCRYPTION |
| 226 |
encrypt_ts N |
| 227 |
SELECT * FROM t1 LIMIT 10; |
| 228 |
c1 |
| 229 |
SOME VALUES |
| 230 |
SOME VALUES |
| 231 |
SOME VALUES |
| 232 |
SOME VALUES |
| 233 |
SOME VALUES |
| 234 |
SOME VALUES |
| 235 |
SOME VALUES |
| 236 |
SOME VALUES |
| 237 |
SOME VALUES |
| 238 |
SOME VALUES |
| 239 |
#-------------------------- TEST 4 -------------------------------------# |
| 240 |
# RESTART 19 : WITH KEYRING PLUGIN |
| 241 |
# Encrypt the tablespace. |
| 242 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y'; |
| 243 |
######################################################################## |
| 244 |
# ALTER TABLESPACE : Encrypted => Unencrypted # |
| 245 |
######################################################################## |
| 246 |
# Set process to crash at page 10 |
| 247 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 248 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 249 |
NAME ENCRYPTION |
| 250 |
encrypt_ts Y |
| 251 |
# Unencrypt the tablespace. It will cause crash. |
| 252 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='N'; |
| 253 |
# RESTART 20 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 254 |
# to crash just before updating flags |
| 255 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 256 |
Got one of the listed errors |
| 257 |
# Search the pattern in error log |
| 258 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 259 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" not found |
| 260 |
# RESTART 21 : Normal. In this restart resume operation should finish successfully |
| 261 |
# Wait for Encryption processing to finish in background thread |
| 262 |
# Search the pattern in error log |
| 263 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 264 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" found |
| 265 |
# RESTART 22 : WITHOUT KEYRING PLUGIN |
| 266 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 267 |
NAME ENCRYPTION |
| 268 |
encrypt_ts N |
| 269 |
SELECT * FROM t1 LIMIT 10; |
| 270 |
c1 |
| 271 |
SOME VALUES |
| 272 |
SOME VALUES |
| 273 |
SOME VALUES |
| 274 |
SOME VALUES |
| 275 |
SOME VALUES |
| 276 |
SOME VALUES |
| 277 |
SOME VALUES |
| 278 |
SOME VALUES |
| 279 |
SOME VALUES |
| 280 |
SOME VALUES |
| 281 |
#-------------------------- TEST 5 -------------------------------------# |
| 282 |
# RESTART 23 : WITH KEYRING PLUGIN |
| 283 |
######################################################################## |
| 284 |
# ALTER TABLESPACE : Unencrypted => Encrypted # |
| 285 |
######################################################################## |
| 286 |
# Set process to crash at page 10 |
| 287 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 288 |
# Encrypt the tablespace. It will cause crash. |
| 289 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y'; |
| 290 |
# RESTART 24 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 291 |
# to crash just before encryption processing is started |
| 292 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 293 |
Got one of the listed errors |
| 294 |
# Search the pattern in error log |
| 295 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 296 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" not found |
| 297 |
# RESTART 25 : Normal. In this restart resume operation should finish successfully |
| 298 |
# Wait for Encryption processing to finish in background thread |
| 299 |
# Search the pattern in error log |
| 300 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 301 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" found |
| 302 |
SELECT * FROM t1 LIMIT 10; |
| 303 |
c1 |
| 304 |
SOME VALUES |
| 305 |
SOME VALUES |
| 306 |
SOME VALUES |
| 307 |
SOME VALUES |
| 308 |
SOME VALUES |
| 309 |
SOME VALUES |
| 310 |
SOME VALUES |
| 311 |
SOME VALUES |
| 312 |
SOME VALUES |
| 313 |
SOME VALUES |
| 314 |
######################################################################## |
| 315 |
# ALTER TABLESPACE : Encrypted => Unencrypted # |
| 316 |
######################################################################## |
| 317 |
# Set process to crash at page 10 |
| 318 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 319 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 320 |
NAME ENCRYPTION |
| 321 |
encrypt_ts Y |
| 322 |
# Unencrypt the tablespace. It will cause crash. |
| 323 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='N'; |
| 324 |
# RESTART 26 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 325 |
# to crash just before encryption processing is started |
| 326 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 327 |
Got one of the listed errors |
| 328 |
# Search the pattern in error log |
| 329 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 330 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" not found |
| 331 |
# RESTART 27 : Normal. In this restart resume operation should finish successfully |
| 332 |
# Wait for Encryption processing to finish in background thread |
| 333 |
# Search the pattern in error log |
| 334 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 335 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" found |
| 336 |
# RESTART 28 : WITHOUT KEYRING PLUGIN |
| 337 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 338 |
NAME ENCRYPTION |
| 339 |
encrypt_ts N |
| 340 |
SELECT * FROM t1 LIMIT 10; |
| 341 |
c1 |
| 342 |
SOME VALUES |
| 343 |
SOME VALUES |
| 344 |
SOME VALUES |
| 345 |
SOME VALUES |
| 346 |
SOME VALUES |
| 347 |
SOME VALUES |
| 348 |
SOME VALUES |
| 349 |
SOME VALUES |
| 350 |
SOME VALUES |
| 351 |
SOME VALUES |
| 352 |
#-------------------------- TEST 6 -------------------------------------# |
| 353 |
# RESTART 29 : WITH KEYRING PLUGIN |
| 354 |
######################################################################## |
| 355 |
# ALTER TABLESPACE : Unencrypted => Encrypted # |
| 356 |
######################################################################## |
| 357 |
# Set process to crash at page 10 |
| 358 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 359 |
# Encrypt the tablespace. It will cause crash. |
| 360 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y'; |
| 361 |
# RESTART 30 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 362 |
# to crash just after encryption processing is finished |
| 363 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 364 |
Got one of the listed errors |
| 365 |
# Search the pattern in error log |
| 366 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 367 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" not found |
| 368 |
# RESTART 31 : Normal. In this restart resume operation should finish successfully |
| 369 |
# Wait for Encryption processing to finish in background thread |
| 370 |
# Search the pattern in error log |
| 371 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 372 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" found |
| 373 |
SELECT * FROM t1 LIMIT 10; |
| 374 |
c1 |
| 375 |
SOME VALUES |
| 376 |
SOME VALUES |
| 377 |
SOME VALUES |
| 378 |
SOME VALUES |
| 379 |
SOME VALUES |
| 380 |
SOME VALUES |
| 381 |
SOME VALUES |
| 382 |
SOME VALUES |
| 383 |
SOME VALUES |
| 384 |
SOME VALUES |
| 385 |
######################################################################## |
| 386 |
# ALTER TABLESPACE : Encrypted => Unencrypted # |
| 387 |
######################################################################## |
| 388 |
# Set process to crash at page 10 |
| 389 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 390 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 391 |
NAME ENCRYPTION |
| 392 |
encrypt_ts Y |
| 393 |
# Unencrypt the tablespace. It will cause crash. |
| 394 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='N'; |
| 395 |
# RESTART 32 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 396 |
# to crash just after encryption processing is finished |
| 397 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 398 |
Got one of the listed errors |
| 399 |
# Search the pattern in error log |
| 400 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 401 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" not found |
| 402 |
# RESTART 33 : Normal. In this restart resume operation should finish successfully |
| 403 |
# Wait for Encryption processing to finish in background thread |
| 404 |
# Search the pattern in error log |
| 405 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 406 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" found |
| 407 |
# RESTART 34 : WITHOUT KEYRING PLUGIN |
| 408 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 409 |
NAME ENCRYPTION |
| 410 |
encrypt_ts N |
| 411 |
SELECT * FROM t1 LIMIT 10; |
| 412 |
c1 |
| 413 |
SOME VALUES |
| 414 |
SOME VALUES |
| 415 |
SOME VALUES |
| 416 |
SOME VALUES |
| 417 |
SOME VALUES |
| 418 |
SOME VALUES |
| 419 |
SOME VALUES |
| 420 |
SOME VALUES |
| 421 |
SOME VALUES |
| 422 |
SOME VALUES |
| 423 |
#-------------------------- TEST 7 -------------------------------------# |
| 424 |
# RESTART 35 : WITH KEYRING PLUGIN |
| 425 |
######################################################################## |
| 426 |
# ALTER TABLESPACE : Unencrypted => Encrypted # |
| 427 |
######################################################################## |
| 428 |
# Set process to crash at page 10 |
| 429 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 430 |
# Encrypt the tablespace. It will cause crash. |
| 431 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='Y'; |
| 432 |
# RESTART 36 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 433 |
# to crash just after inserting DDL Log Entry |
| 434 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 435 |
Got one of the listed errors |
| 436 |
# Search the pattern in error log |
| 437 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 438 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" not found |
| 439 |
# RESTART 37 : Normal. In this restart resume operation should finish successfully |
| 440 |
# Wait for Encryption processing to finish in background thread |
| 441 |
# Search the pattern in error log |
| 442 |
Pattern "Resuming ENCRYPTION for tablespace encrypt_ts" found |
| 443 |
Pattern "Finished ENCRYPTION for tablespace encrypt_ts" found |
| 444 |
SELECT * FROM t1 LIMIT 10; |
| 445 |
c1 |
| 446 |
SOME VALUES |
| 447 |
SOME VALUES |
| 448 |
SOME VALUES |
| 449 |
SOME VALUES |
| 450 |
SOME VALUES |
| 451 |
SOME VALUES |
| 452 |
SOME VALUES |
| 453 |
SOME VALUES |
| 454 |
SOME VALUES |
| 455 |
SOME VALUES |
| 456 |
######################################################################## |
| 457 |
# ALTER TABLESPACE : Encrypted => Unencrypted # |
| 458 |
######################################################################## |
| 459 |
# Set process to crash at page 10 |
| 460 |
SET SESSION debug= '+d,alter_encrypt_tablespace_page_10'; |
| 461 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 462 |
NAME ENCRYPTION |
| 463 |
encrypt_ts Y |
| 464 |
# Unencrypt the tablespace. It will cause crash. |
| 465 |
ALTER TABLESPACE encrypt_ts ENCRYPTION='N'; |
| 466 |
# RESTART 38 : WITH KEYRING PLUGIN after crash and cause resume operation |
| 467 |
# to crash just after inserting DDL Log Entry |
| 468 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 469 |
Got one of the listed errors |
| 470 |
# Search the pattern in error log |
| 471 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 472 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" not found |
| 473 |
# RESTART 39 : Normal. In this restart resume operation should finish successfully |
| 474 |
# Wait for Encryption processing to finish in background thread |
| 475 |
# Search the pattern in error log |
| 476 |
Pattern "Resuming DECRYPTION for tablespace encrypt_ts" found |
| 477 |
Pattern "Finished DECRYPTION for tablespace encrypt_ts" found |
| 478 |
# RESTART 40 : WITHOUT KEYRING PLUGIN |
| 479 |
SELECT NAME, ENCRYPTION FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME='encrypt_ts'; |
| 480 |
NAME ENCRYPTION |
| 481 |
encrypt_ts N |
| 482 |
SELECT * FROM t1 LIMIT 10; |
| 483 |
c1 |
| 484 |
SOME VALUES |
| 485 |
SOME VALUES |
| 486 |
SOME VALUES |
| 487 |
SOME VALUES |
| 488 |
SOME VALUES |
| 489 |
SOME VALUES |
| 490 |
SOME VALUES |
| 491 |
SOME VALUES |
| 492 |
SOME VALUES |
| 493 |
SOME VALUES |
| 494 |
########### |
| 495 |
# Cleanup # |
| 496 |
########### |
| 497 |
DROP TABLE t1; |
| 498 |
DROP TABLESPACE encrypt_ts; |
| 499 |
# RESTART 41 : final |