| 1 |
# |
| 2 |
# The server allows ENCRYPTION='Y' clause for even the |
| 3 |
# storage engine that does not support tablespace encryption. |
| 4 |
# Infact we see that the storage engine would silently ignore |
| 5 |
# 'Y' and the SQL server stores the flag in data dictionary. |
| 6 |
# |
| 7 |
# This gives wrong information about the NDB table to the user. |
| 8 |
# This test makes sure that SQL server rejects encryption |
| 9 |
# request for storage engines that does not support tablespace |
| 10 |
# encryption. We allow 'N' and '' which both mean that |
| 11 |
# tablespace is not encrypted. |
| 12 |
# |
| 13 |
--source include/have_ndb.inc |
| 14 |
CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undo1.dat' ENGINE=NDB; |
| 15 |
# Create tablespace using the logfile group |
| 16 |
CREATE TABLESPACE ts1 |
| 17 |
ADD DATAFILE 'ts1_datafile.dat' |
| 18 |
USE LOGFILE GROUP lg1 |
| 19 |
ENGINE=NDB ENCRYPTION='n'; |
| 20 |
ALTER TABLESPACE ts1 DROP DATAFILE 'ts1_datafile.dat'; |
| 21 |
DROP TABLESPACE ts1; |
| 22 |
|
| 23 |
CREATE TABLESPACE ts1 |
| 24 |
ADD DATAFILE 'ts1_datafile.dat' |
| 25 |
USE LOGFILE GROUP lg1 |
| 26 |
ENGINE=NDB ENCRYPTION='N'; |
| 27 |
ALTER TABLESPACE ts1 DROP DATAFILE 'ts1_datafile.dat'; |
| 28 |
DROP TABLESPACE ts1; |
| 29 |
|
| 30 |
CREATE TABLESPACE ts1 |
| 31 |
ADD DATAFILE 'ts1_datafile.dat' |
| 32 |
USE LOGFILE GROUP lg1 |
| 33 |
ENGINE=NDB ENCRYPTION=''; |
| 34 |
ALTER TABLESPACE ts1 DROP DATAFILE 'ts1_datafile.dat'; |
| 35 |
DROP TABLESPACE ts1; |
| 36 |
|
| 37 |
--error ER_CHECK_NOT_IMPLEMENTED |
| 38 |
CREATE TABLESPACE ts1 |
| 39 |
ADD DATAFILE 'ts1_datafile.dat' |
| 40 |
USE LOGFILE GROUP lg1 |
| 41 |
ENGINE=NDB ENCRYPTION='Y'; |
| 42 |
|
| 43 |
--error ER_CHECK_NOT_IMPLEMENTED |
| 44 |
CREATE TABLESPACE ts1 |
| 45 |
ADD DATAFILE 'ts1_datafile.dat' |
| 46 |
USE LOGFILE GROUP lg1 |
| 47 |
ENGINE=NDB ENCRYPTION='R'; |
| 48 |
|
| 49 |
DROP LOGFILE GROUP lg1 ENGINE=NDB; |