| 1 |
# Test for checking disk sector size |
| 2 |
--source include/not_windows.inc |
| 3 |
|
| 4 |
--disable_query_log |
| 5 |
call mtr.add_suppression("\\[Error\\] .*MY-\\d+.* Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded."); |
| 6 |
call mtr.add_suppression("\\[Error\\] .*MY-\\d+.* Encryption can't find master key, please check the keyring plugin is loaded."); |
| 7 |
call mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* Function 'keyring_file' already exists"); |
| 8 |
call mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* Couldn't load plugin named 'keyring_file' with soname 'keyring_file.*'."); |
| 9 |
call mtr.add_suppression("Plugin keyring_file reported"); |
| 10 |
CALL mtr.add_suppression("\\[Warning\\] .*MY-\\d+.* Failed to set O_DIRECT on file.*"); |
| 11 |
|
| 12 |
# The below mtr suppression to avoid failure in solaris platform. |
| 13 |
CALL mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* Failed to set DIRECTIO_ON on file.*"); |
| 14 |
CALL mtr.add_suppression("\\[ERROR\\] .*MY-\\d+.* Failed to create check sector file*"); |
| 15 |
--enable_query_log |
| 16 |
|
| 17 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR |
| 18 |
eval SET @@global.keyring_file_data="$MYSQL_TMP_DIR/mysecret_keyring10"; |
| 19 |
|
| 20 |
# Confirm the flush method is O_DIRECT |
| 21 |
# And the sector size has been set in I/O system initialization. |
| 22 |
SHOW VARIABLES LIKE 'innodb_flush_method'; |
| 23 |
|
| 24 |
# Create an encrypted table, and it will use sector size to align the |
| 25 |
# write buffer. |
| 26 |
CREATE TABLE t1(c1 INT, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB; |
| 27 |
|
| 28 |
# Restart the server with keyring loaded |
| 29 |
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $KEYRING_PLUGIN_OPT --plugin-dir=KEYRING_PLUGIN_PATH $KEYRING_PLUGIN keyring_file.so |
| 30 |
--replace_regex /\.dll/.so/ |
| 31 |
--let $restart_parameters= restart:--early-plugin-load="keyring_file=$KEYRING_PLUGIN" --loose-keyring_file_data=$MYSQL_TMP_DIR/mysecret_keyring10 $KEYRING_PLUGIN_OPT |
| 32 |
--source include/restart_mysqld.inc |
| 33 |
|
| 34 |
SELECT * FROM t1 LIMIT 10; |
| 35 |
|
| 36 |
DROP TABLE t1; |
| 37 |
|
| 38 |
# Cleanup |
| 39 |
--remove_file $MYSQL_TMP_DIR/mydummy_key |
| 40 |
--remove_file $MYSQL_TMP_DIR/mysecret_keyring10 |
| 41 |
--let $restart_parameters= restart: |
| 42 |
--source include/restart_mysqld.inc |