Skip to content

Commit e0bf863

Browse files
author
Allen Lai
committed
Bug #27713517 GRAMMER: PLEASE CONFIRM THE KEYFILE IS MATCH
Fixed grammar and typo in the error messages, and update all related test cases.
1 parent d0d46be commit e0bf863

13 files changed

+23
-74
lines changed

mysql-test/suite/innodb/r/table_encrypt_1.result

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
call mtr.add_suppression("\\[Error\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
2-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to find tablespace for table `\.\.*`\.`\.\.*` in the cache.");
3-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 2 in a file operation.");
4-
call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified.");
5-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Could not find a valid tablespace file for");
6-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded.");
7-
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace .* because it could not be opened");
8-
call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
91
CREATE TABLE t1(c1 INT, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB;
102
ERROR HY000: Can't find master key from keyring, please check in the server log if a keyring plugin is loaded and initialized successfully.
113
CREATE TABLE t1(c1 INT, c2 char(20)) ENGINE = InnoDB;

mysql-test/suite/innodb/r/table_encrypt_2.result

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
call mtr.add_suppression("\\[Error\\] InnoDB: Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
2-
call mtr.add_suppression("\\[Error\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
3-
call mtr.add_suppression("\\[ERROR\\] Function 'keyring_file' already exists");
4-
call mtr.add_suppression("\\[ERROR\\] Couldn't load plugin named 'keyring_file' with soname 'keyring_file.*'.");
5-
call mtr.add_suppression("Plugin keyring_file reported");
61
SET @@global.keyring_file_data="MYSQL_TMP_DIR/keyring";
72
CREATE TABLE t1(c1 int) ENGINE=InnoDB ENCRYPTION="Y";
83
DROP TABLE t1;

mysql-test/suite/innodb/r/table_encrypt_3.result

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
2-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
3-
call mtr.add_suppression("InnoDB: The error means that another program is using InnoDB's files");
4-
call mtr.add_suppression("InnoDB: The error means that another program is using InnoDB's files");
5-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 32 in a file operation.");
61
# Create encrypt table before loading keyring plugin
72
SET GLOBAL innodb_file_per_table = 1;
83
SELECT @@innodb_file_per_table;

mysql-test/suite/innodb/r/table_encrypt_5.result

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
2-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded");
3-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
4-
call mtr.add_suppression("InnoDB: Operating system error number");
5-
call mtr.add_suppression("The error means the system cannot find the path specified");
6-
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them");
7-
call mtr.add_suppression("Could not find a valid tablespace file");
8-
call mtr.add_suppression("InnoDB: Ignoring tablespace");
9-
call mtr.add_suppression("InnoDB: Failed to find tablespace for table");
10-
call mtr.add_suppression("InnoDB: Cannot open table tde_db/t_encrypt.* from the internal data dictionary of InnoDB though the .frm file for the table exists");
11-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Table tde_db/t_encrypt.* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist");
12-
call mtr.add_suppression("\\[Warning\\] InnoDB: Please refer to .* for how to resolve the issue");
13-
call mtr.add_suppression("Error while loading keyring content. The keyring might be malformed");
14-
call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'Could not create keyring directory");
15-
call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'keyring_file initialization failure.");
16-
call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File .*keyring' not found .*");
171
# Starting server with keyring plugin
182
# restart: --early-plugin-load=keyring_file=keyring_file.so --loose-keyring_file_data=MYSQL_TMP_DIR/mysecret_keyring --plugin-dir=KEYRING_PLUGIN_PATH
193
DROP DATABASE IF EXISTS tde_db;

mysql-test/suite/innodb/r/table_encrypt_kill.result

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
2-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded");
3-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
4-
call mtr.add_suppression("does not exist in the InnoDB internal data dictionary though MySQL is trying to drop it");
5-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
6-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded");
7-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
8-
call mtr.add_suppression("InnoDB: Operating system error number");
9-
call mtr.add_suppression("The error means the system cannot find the path specified");
10-
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them");
11-
call mtr.add_suppression("Could not find a valid tablespace file");
12-
call mtr.add_suppression("InnoDB: Ignoring tablespace");
13-
call mtr.add_suppression("InnoDB: Failed to find tablespace for table");
14-
call mtr.add_suppression("InnoDB: Cannot open table tde_db/t_encrypt.* from the internal data dictionary of InnoDB though the .frm file for the table exists");
15-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Table tde_db/t_encrypt.* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist");
16-
call mtr.add_suppression("\\[Warning\\] InnoDB: Please refer to .* for how to resolve the issue");
17-
call mtr.add_suppression("Cannot create keyring directory");
18-
call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'Could not create keyring directory");
191
# Starting server with keyring plugin
202
# restart: --early-plugin-load=keyring_file=keyring_file.so --loose-keyring_file_data=MYSQL_TMP_DIR/mysecret_keyring --plugin-dir=KEYRING_PLUGIN_PATH
213
DROP DATABASE IF EXISTS tde_db;

mysql-test/suite/innodb/t/table_encrypt_1.test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@
1010

1111
# Create a table with encryption, should fail since keyring is not
1212
# loaded
13+
--disable_query_log
1314
call mtr.add_suppression("\\[Error\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
1415
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to find tablespace for table `\.\.*`\.`\.\.*` in the cache.");
1516
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 2 in a file operation.");
1617
call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot find the path specified.");
1718
call mtr.add_suppression("\\[ERROR\\] InnoDB: Could not find a valid tablespace file for");
18-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded.");
19+
call mtr.add_suppression("ibd can't be decrypted");
1920
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace .* because it could not be opened");
2021
call mtr.add_suppression("\\[ERROR\\] InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them.");
22+
--enable_query_log
23+
2124
--error ER_CANNOT_FIND_KEY_IN_KEYRING
2225
CREATE TABLE t1(c1 INT, c2 char(20)) ENCRYPTION="Y" ENGINE = InnoDB;
2326

mysql-test/suite/innodb/t/table_encrypt_2.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
--source include/have_innodb.inc
66
--source include/not_embedded.inc
77

8-
call mtr.add_suppression("\\[Error\\] InnoDB: Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
8+
--disable_query_log
99
call mtr.add_suppression("\\[Error\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
1010
call mtr.add_suppression("\\[ERROR\\] Function 'keyring_file' already exists");
1111
call mtr.add_suppression("\\[ERROR\\] Couldn't load plugin named 'keyring_file' with soname 'keyring_file.*'.");
1212
call mtr.add_suppression("Plugin keyring_file reported");
13+
--enable_query_log
1314

1415
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
1516
eval SET @@global.keyring_file_data="$MYSQL_TMP_DIR/keyring";

mysql-test/suite/innodb/t/table_encrypt_3.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
--source include/not_embedded.inc
77
--source include/have_innodb_max_16k.inc
88

9+
--disable_query_log
910
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
10-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
11-
call mtr.add_suppression("InnoDB: The error means that another program is using InnoDB's files");
1211
call mtr.add_suppression("InnoDB: The error means that another program is using InnoDB's files");
1312
call mtr.add_suppression("\\[ERROR\\] InnoDB: Operating system error number 32 in a file operation.");
13+
--enable_query_log
14+
1415
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
1516

1617
#------------------------------------------------------------------------------

mysql-test/suite/innodb/t/table_encrypt_5.test

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
--source include/not_embedded.inc
1919

2020
# Suppress warnings
21+
--disable_query_log
2122
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
22-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded");
23-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
23+
call mtr.add_suppression("ibd can't be decrypted");
2424
call mtr.add_suppression("InnoDB: Operating system error number");
2525
call mtr.add_suppression("The error means the system cannot find the path specified");
2626
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them");
@@ -34,6 +34,7 @@ call mtr.add_suppression("Error while loading keyring content. The keyring might
3434
call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'Could not create keyring directory");
3535
call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'keyring_file initialization failure.");
3636
call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'File .*keyring' not found .*");
37+
--enable_query_log
3738

3839
let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
3940

mysql-test/suite/innodb/t/table_encrypt_debug.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919

2020
--disable_query_log
2121
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
22-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded");
23-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
22+
call mtr.add_suppression("ibd can't be decrypted");
2423
call mtr.add_suppression("does not exist in the InnoDB internal data dictionary though MySQL is trying to drop it");
2524
call mtr.add_suppression("Cannot open table tde_db/.* from the internal data dictionary of InnoDB");
2625
call mtr.add_suppression("\\[Warning\\] InnoDB: Tablespace for table `tde_db`.`t1` is set as discarded");

mysql-test/suite/innodb/t/table_encrypt_kill.test

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@
1515
--source include/not_crashrep.inc
1616

1717
#suppress warning
18+
--disable_query_log
1819
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
19-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded");
20-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
20+
call mtr.add_suppression("ibd can't be decrypted");
2121
call mtr.add_suppression("does not exist in the InnoDB internal data dictionary though MySQL is trying to drop it");
22-
23-
call mtr.add_suppression("\\[ERROR\\] InnoDB: Encryption can't find master key, please check the keyring plugin is loaded.");
24-
call mtr.add_suppression("ibd can't be decrypted , please confirm the keyfile is match and keyring plugin is loaded");
25-
call mtr.add_suppression("Can't generate new master key for tablespace encryption, please check the keyring plugin is loaded.");
2622
call mtr.add_suppression("InnoDB: Operating system error number");
2723
call mtr.add_suppression("The error means the system cannot find the path specified");
2824
call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that you must create directories yourself, InnoDB does not create them");
@@ -34,6 +30,7 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Table tde_db/t_encrypt.* in the In
3430
call mtr.add_suppression("\\[Warning\\] InnoDB: Please refer to .* for how to resolve the issue");
3531
call mtr.add_suppression("Cannot create keyring directory");
3632
call mtr.add_suppression("\\[ERROR\\] Plugin keyring_file reported: 'Could not create keyring directory");
33+
--enable_query_log
3734

3835

3936

storage/innobase/fsp/fsp0file.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 2013, 2016, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -647,10 +647,9 @@ Datafile::validate_first_page(lsn_t* flush_lsn,
647647
ib::error()
648648
<< "Encryption information in"
649649
<< " datafile: " << m_filepath
650-
<< " can't be decrypted"
651-
<< " , please confirm the keyfile"
652-
<< " is match and keyring plugin"
653-
<< " is loaded.";
650+
<< " can't be decrypted,"
651+
<< " please check if a keyring plugin"
652+
<< " is loaded and initialized successfully.";
654653

655654
m_is_valid = false;
656655
free_first_page();

storage/innobase/fsp/fsp0fsp.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*****************************************************************************
22
3-
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
3+
Copyright (c) 1995, 2018, Oracle and/or its affiliates. All Rights Reserved.
44
55
This program is free software; you can redistribute it and/or modify it under
66
the terms of the GNU General Public License as published by the Free Software
@@ -1282,8 +1282,8 @@ fsp_header_decode_encryption_info(
12821282
crc1 = mach_read_from_4(ptr);
12831283
crc2 = ut_crc32(key_info, ENCRYPTION_KEY_LEN * 2);
12841284
if (crc1 != crc2) {
1285-
ib::error() << "Failed to decrpt encryption information,"
1286-
<< " please check key file is not changed!";
1285+
ib::error() << "Failed to decrypt encryption information,"
1286+
<< " please confirm the master key was not changed.";
12871287
my_free(master_key);
12881288
return(false);
12891289
}

0 commit comments

Comments
 (0)