diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result index e829104b86a..6bd3c2fd77e 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result @@ -2,10 +2,12 @@ call mtr.add_suppression("Plugin 'file_key_management' init function returned er call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed.*"); call mtr.add_suppression("Plugin 'file_key_management' registration.*failed"); call mtr.add_suppression("InnoDB: Block in space_id .* in file test/.* encrypted"); -call mtr.add_suppression("InnoDB: However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match."); +call mtr.add_suppression("InnoDB: However key management plugin or used key_id .* is not found or used encryption algorithm or method does not match."); call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop this table or install correct key management plugin and key file."); call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem."); call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*"); +call mtr.add_suppression("mysqld: File .*"); +call mtr.add_suppression("InnoDB: Tablespace id 6 is encrypted but encryption service or used key_id .* is not available. Can't continue opening tablespace."); # Start server with keys2.txt SET GLOBAL innodb_file_format = `Barracuda`; diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test index 316f21c7453..0787587e31a 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test @@ -16,11 +16,12 @@ call mtr.add_suppression("Plugin 'file_key_management' init function returned er call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed.*"); call mtr.add_suppression("Plugin 'file_key_management' registration.*failed"); call mtr.add_suppression("InnoDB: Block in space_id .* in file test/.* encrypted"); -call mtr.add_suppression("InnoDB: However key management plugin or used key_id 1 is not found or used encryption algorithm or method does not match."); +call mtr.add_suppression("InnoDB: However key management plugin or used key_id .* is not found or used encryption algorithm or method does not match."); call mtr.add_suppression("InnoDB: Marking tablespace as missing. You may drop this table or install correct key management plugin and key file."); call mtr.add_suppression(".*InnoDB: Cannot open table test/.* from the internal data dictionary of InnoDB though the .frm file for the table exists. See .* for how you can resolve the problem."); call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*"); - +call mtr.add_suppression("mysqld: File .*"); +call mtr.add_suppression("InnoDB: Tablespace id 6 is encrypted but encryption service or used key_id .* is not available. Can't continue opening tablespace."); --echo --echo # Start server with keys2.txt -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index a49669230a9..514f9bec647 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -20092,32 +20092,6 @@ ib_warn_row_too_big(const dict_table_t* table) , prefix ? DICT_MAX_FIXED_COL_LEN : 0); } -/********************************************************************//** -Helper function to push warnings from InnoDB internals to SQL-layer. */ -UNIV_INTERN -void -ib_push_warning( - trx_t* trx, /*!< in: trx */ - ulint error, /*!< in: error code to push as warning */ - const char *format,/*!< in: warning message */ - ...) -{ - va_list args; - THD *thd = (THD *)trx->mysql_thd; - char *buf; -#define MAX_BUF_SIZE 4*1024 - - va_start(args, format); - buf = (char *)my_malloc(MAX_BUF_SIZE, MYF(MY_WME)); - vsprintf(buf,format, args); - - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - convert_error_code_to_mysql((dberr_t)error, 0, thd), - buf); - my_free(buf); - va_end(args); -} - /*************************************************************//** Check for a valid value of innobase_compression_algorithm. @return 0 for valid innodb_compression_algorithm. */ diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc index 68446cc85ef..f19737aa123 100644 --- a/storage/innobase/ut/ut0ut.cc +++ b/storage/innobase/ut/ut0ut.cc @@ -824,6 +824,8 @@ ut_strerr( return("Too many words in a FTS phrase or proximity search"); case DB_TOO_BIG_FOR_REDO: return("BLOB record length is greater than 10%% of redo log"); + case DB_ENCRYPTED_DECRYPT_FAILED: + return("Table is encrypted but decrypt failed."); /* do not add default: in order to produce a warning if new code is added to the enum but not added here */ diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index f868d727328..227509a24cc 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -21282,32 +21282,6 @@ ib_warn_row_too_big(const dict_table_t* table) , prefix ? DICT_MAX_FIXED_COL_LEN : 0); } -/********************************************************************//** -Helper function to push warnings from InnoDB internals to SQL-layer. */ -UNIV_INTERN -void -ib_push_warning( - trx_t* trx, /*!< in: trx */ - ulint error, /*!< in: error code to push as warning */ - const char *format,/*!< in: warning message */ - ...) -{ - va_list args; - THD *thd = (THD *)trx->mysql_thd; - char *buf; -#define MAX_BUF_SIZE 4*1024 - - va_start(args, format); - buf = (char *)my_malloc(MAX_BUF_SIZE, MYF(MY_WME)); - vsprintf(buf,format, args); - - push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, - convert_error_code_to_mysql((dberr_t)error, 0, thd), - buf); - my_free(buf); - va_end(args); -} - /*************************************************************//** Check for a valid value of innobase_compression_algorithm. @return 0 for valid innodb_compression_algorithm. */ diff --git a/storage/xtradb/ut/ut0ut.cc b/storage/xtradb/ut/ut0ut.cc index 121cbdb7bc0..96f2c537deb 100644 --- a/storage/xtradb/ut/ut0ut.cc +++ b/storage/xtradb/ut/ut0ut.cc @@ -827,6 +827,8 @@ ut_strerr( return("Too many words in a FTS phrase or proximity search"); case DB_TOO_BIG_FOR_REDO: return("BLOB record length is greater than 10%% of redo log"); + case DB_ENCRYPTED_DECRYPT_FAILED: + return("Table is encrypted but decrypt failed."); /* do not add default: in order to produce a warning if new code is added to the enum but not added here */