summaryrefslogtreecommitdiff
path: root/storage/innobase/dict/dict0crea.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2016-12-16 16:36:54 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2016-12-16 16:36:54 +0200
commitd0ae4686fd9faab728082cb6ce063bf5eaa0773c (patch)
tree4df9f65921166cea2c1e4486e59acf68ab721020 /storage/innobase/dict/dict0crea.cc
parentce55094f4fee3c0ff2c58ac4dd3ef2c16c5e20c3 (diff)
downloadmariadb-git-bb-10.2-mdev-11585.tar.gz
MDEV-11585 Hard-code the shared InnoDB temporary tablespace ID at -1bb-10.2-mdev-11585
MySQL 5.7 supports only one shared temporary tablespace. MariaDB 10.2 does not support any other shared InnoDB tablespaces than the two predefined tablespaces: the persistent InnoDB system tablespace (default file name ibdata1) and the temporary tablespace (default file name ibtmp1). InnoDB is unnecessarily allocating a tablespace ID for the predefined temporary tablespace on every startup, and it is in several places testing whether a tablespace ID matches this dynamically generated ID. We should use a compile-time constant to reduce code size and to avoid unnecessary updates to the DICT_HDR page at every startup. Using a hard-coded tablespace ID will should make it easier to remove the TEMPORARY flag from FSP_SPACE_FLAGS in MDEV-11202.
Diffstat (limited to 'storage/innobase/dict/dict0crea.cc')
-rw-r--r--storage/innobase/dict/dict0crea.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc
index 2d891854c03..cfea64d51c2 100644
--- a/storage/innobase/dict/dict0crea.cc
+++ b/storage/innobase/dict/dict0crea.cc
@@ -571,8 +571,7 @@ dict_build_tablespace_for_table(
supports Redundant and Compact */
ut_ad(dict_tf_get_rec_format(table->flags)
!= REC_FORMAT_COMPRESSED);
- table->space = static_cast<uint32_t>(
- srv_tmp_space.space_id());
+ table->space = SRV_TMP_SPACE_ID;
} else {
/* Create in the system tablespace. */
ut_ad(table->space == srv_sys_space.space_id());