summaryrefslogtreecommitdiff
path: root/storage/innobase/include/fsp0fsp.ic
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2016-09-06 09:43:16 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2016-09-08 15:49:03 +0300
commitfec844aca88e1c6b9c36bb0b811e92d9d023ffb9 (patch)
tree3e8602113e591b163bf23fffe95c8908cac88ea3 /storage/innobase/include/fsp0fsp.ic
parent2e814d4702d71a04388386a9f591d14a35980bfe (diff)
downloadmariadb-git-fec844aca88e1c6b9c36bb0b811e92d9d023ffb9.tar.gz
Merge InnoDB 5.7 from mysql-5.7.14.
Contains also: MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan) Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan) enable tests that were fixed in MDEV-10549 MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan) fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables
Diffstat (limited to 'storage/innobase/include/fsp0fsp.ic')
-rw-r--r--storage/innobase/include/fsp0fsp.ic27
1 files changed, 23 insertions, 4 deletions
diff --git a/storage/innobase/include/fsp0fsp.ic b/storage/innobase/include/fsp0fsp.ic
index e204ac3c69f..475dd238728 100644
--- a/storage/innobase/include/fsp0fsp.ic
+++ b/storage/innobase/include/fsp0fsp.ic
@@ -1,7 +1,7 @@
/*****************************************************************************
-Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2013, SkySQL Ab. All Rights Reserved.
+Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2013, 2016, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -181,10 +181,11 @@ fsp_flags_set_page_size(
@param[in] has_data_dir This tablespace is in a remote location.
@param[in] is_shared This tablespace can be shared by many tables.
@param[in] is_temporary This tablespace is temporary.
+@param[in] is_encrypted This tablespace is encrypted.
@param[in] page_compressed Table uses page compression
@param[in] page_compression_level Page compression level
@param[in] atomic_writes Table uses atomic writes
-@return tablespace flags after initialization */
+@@return tablespace flags after initialization */
UNIV_INLINE
ulint
fsp_flags_init(
@@ -195,7 +196,8 @@ fsp_flags_init(
bool is_temporary,
bool page_compression,
ulint page_compression_level,
- ulint atomic_writes)
+ ulint atomic_writes,
+ bool is_encrypted)
{
ut_ad(page_size.physical() <= page_size.logical());
ut_ad(!page_size.is_compressed() || atomic_blobs);
@@ -229,6 +231,10 @@ fsp_flags_init(
flags |= FSP_FLAGS_MASK_TEMPORARY;
}
+ if (is_encrypted) {
+ flags |= FSP_FLAGS_MASK_ENCRYPTION;
+ }
+
/* In addition, tablespace flags also contain if the page
compression is used for this table. */
if (page_compression) {
@@ -247,6 +253,8 @@ fsp_flags_init(
flags |= FSP_FLAGS_SET_ATOMIC_WRITES(flags, atomic_writes);
}
+ ut_ad(fsp_flags_is_valid(flags));
+
return(flags);
}
@@ -329,4 +337,15 @@ xdes_calc_descriptor_page(
return(ut_2pow_round(offset, page_size.physical()));
}
+
+/** Calculates the descriptor array size.
+@param[in] page_size page size
+@return size of descriptor array */
+UNIV_INLINE
+ulint
+xdes_arr_size(
+ const page_size_t& page_size)
+{
+ return(page_size.physical()/FSP_EXTENT_SIZE);
+}
#endif /* !UNIV_INNOCHECKSUM */