summaryrefslogtreecommitdiff
path: root/storage/xtradb/fil/fil0fil.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-06-15 12:41:02 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2017-06-15 12:41:02 +0300
commit58f87a41bd8de7370cc05c41977fadc685826c9e (patch)
tree05efedf2233c3f0a14d126ef9ffcaeb24f375712 /storage/xtradb/fil/fil0fil.cc
parent88b961816e90c57b0f6f166e6c7650a1ae540751 (diff)
downloadmariadb-git-58f87a41bd8de7370cc05c41977fadc685826c9e.tar.gz
Remove some fields from dict_table_t
dict_table_t::thd: Remove. This was only used by btr_root_block_get() for reporting decryption failures, and it was only assigned by ha_innobase::open(), and never cleared. This could mean that if a connection is closed, the pointer would become stale, and the server could crash while trying to report the error. It could also mean that an error is being reported to the wrong client. It is better to use current_thd in this case, even though it could mean that if the code is invoked from an InnoDB background operation, there would be no connection to which to send the error message. Remove dict_table_t::crypt_data and dict_table_t::page_0_read. These fields were never read. fil_open_single_table_tablespace(): Remove the parameter "table".
Diffstat (limited to 'storage/xtradb/fil/fil0fil.cc')
-rw-r--r--storage/xtradb/fil/fil0fil.cc18
1 files changed, 1 insertions, 17 deletions
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index 12048bc479f..fdd09a6034e 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -4229,8 +4229,7 @@ fil_open_single_table_tablespace(
ulint flags, /*!< in: expected FSP_SPACE_FLAGS */
const char* tablename, /*!< in: table name in the
databasename/tablename format */
- const char* path_in, /*!< in: tablespace filepath */
- dict_table_t* table) /*!< in: table */
+ const char* path_in) /*!< in: table */
{
dberr_t err = DB_SUCCESS;
bool dict_filepath_same_as_default = false;
@@ -4339,11 +4338,6 @@ fil_open_single_table_tablespace(
def.file, false, &def.flags, &def.id,
NULL, &def.crypt_data);
- if (table) {
- table->crypt_data = def.crypt_data;
- table->page_0_read = true;
- }
-
def.valid = !def.check_msg && def.id == id
&& fsp_flags_match(flags, def.flags);
@@ -4363,11 +4357,6 @@ fil_open_single_table_tablespace(
remote.file, false, &remote.flags, &remote.id,
NULL, &remote.crypt_data);
- if (table) {
- table->crypt_data = remote.crypt_data;
- table->page_0_read = true;
- }
-
/* Validate this single-table-tablespace with SYS_TABLES. */
remote.valid = !remote.check_msg && remote.id == id
&& fsp_flags_match(flags, remote.flags);
@@ -4389,11 +4378,6 @@ fil_open_single_table_tablespace(
dict.file, false, &dict.flags, &dict.id,
NULL, &dict.crypt_data);
- if (table) {
- table->crypt_data = dict.crypt_data;
- table->page_0_read = true;
- }
-
/* Validate this single-table-tablespace with SYS_TABLES. */
dict.valid = !dict.check_msg && dict.id == id
&& fsp_flags_match(flags, dict.flags);