| 1 |
# ---------------------------------------------------------------------- |
| 2 |
# Setup |
| 3 |
# Creating local configuration file for keyring component: component_keyring_file |
| 4 |
# Creating manifest file for current MySQL server instance |
| 5 |
# Re-starting mysql server with manifest file |
| 6 |
# ---------------------------------------------------------------------- |
| 7 |
# |
| 8 |
# Bug#30787535 : FULLTEXT INDEX TABLES CREATED IN ENCRYPTED SCHEMA ARE NOT ENCRYPTED |
| 9 |
# |
| 10 |
######### |
| 11 |
# SETUP # |
| 12 |
######### |
| 13 |
|
| 14 |
######################################################################### |
| 15 |
# 1 : WITH KEYRING |
| 16 |
######################################################################### |
| 17 |
# Create a new 'unencrypted' table |
| 18 |
CREATE TABLE t1 (id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, |
| 19 |
C1 TEXT(500), |
| 20 |
C2 VARCHAR(200), |
| 21 |
C3 VARCHAR(200)) ENCRYPTION='N' ENGINE=InnoDB; |
| 22 |
set global innodb_buf_flush_list_now = 1; |
| 23 |
# --------------------------------------------------------------- |
| 24 |
# Test 1 : t1 un-encrypted, FTS tables should also be unencrypted |
| 25 |
# --------------------------------------------------------------- |
| 26 |
# Check that tablespace file is not encrypted |
| 27 |
# Print result |
| 28 |
table space is Unencrypted. |
| 29 |
CREATE FULLTEXT INDEX idx ON t1(C1); |
| 30 |
Warnings: |
| 31 |
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID |
| 32 |
set global innodb_buf_flush_list_now = 1; |
| 33 |
# Check that FTS tablespaces file is not encrypted |
| 34 |
# Print result |
| 35 |
table space is Unencrypted. |
| 36 |
# --------------------------------------------------------------- |
| 37 |
# Test 1 : t1 encrypted, FTS tables should also be unencrypted |
| 38 |
# --------------------------------------------------------------- |
| 39 |
ALTER TABLE t1 ENCRYPTION='Y'; |
| 40 |
# Check that tablespace file is encrypted now |
| 41 |
# Print result |
| 42 |
table space is Encrypted. |
| 43 |
# Check that FTS tablespace file is encrypted now |
| 44 |
# Print result |
| 45 |
table space is Encrypted. |
| 46 |
########### |
| 47 |
# CLEANUP # |
| 48 |
########### |
| 49 |
DROP TABLE test.t1; |
| 50 |
# ---------------------------------------------------------------------- |
| 51 |
# Teardown |
| 52 |
# Removing manifest file for current MySQL server instance |
| 53 |
# Removing local keyring file for keyring component: component_keyring_file |
| 54 |
# Removing local configuration file for keyring component: component_keyring_file |
| 55 |
# Restarting server without the manifest file |
| 56 |
# ---------------------------------------------------------------------- |