summaryrefslogtreecommitdiff
path: root/storage/innobase/include/ut0new.h
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/ut0new.h
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/ut0new.h')
-rw-r--r--storage/innobase/include/ut0new.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/storage/innobase/include/ut0new.h b/storage/innobase/include/ut0new.h
index c9e9dcf05f7..6f3c06cf978 100644
--- a/storage/innobase/include/ut0new.h
+++ b/storage/innobase/include/ut0new.h
@@ -227,6 +227,11 @@ struct ut_new_pfx_t {
allocated block and its users are responsible for maintaining it
and passing it later to ut_allocator::deallocate_large(). */
size_t m_size;
+#if SIZEOF_VOIDP == 4
+ /** Pad the header size to a multiple of 64 bits on 32-bit systems,
+ so that the payload will be aligned to 64 bits. */
+ size_t pad;
+#endif
};
/** Allocator class for allocating memory from inside std::* containers. */
@@ -335,6 +340,10 @@ public:
size_t total_bytes = n_elements * sizeof(T);
#ifdef UNIV_PFS_MEMORY
+ /* The header size must not ruin the 64-bit alignment
+ on 32-bit systems. Some allocated structures use
+ 64-bit fields. */
+ ut_ad((sizeof(ut_new_pfx_t) & 7) == 0);
total_bytes += sizeof(ut_new_pfx_t);
#endif /* UNIV_PFS_MEMORY */
@@ -398,7 +407,7 @@ public:
free(pfx);
#else
- free(ptr);
+ // free(ptr);
#endif /* UNIV_PFS_MEMORY */
}