summaryrefslogtreecommitdiff
path: root/storage/xtradb
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2015-06-30 08:34:31 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2015-06-30 18:49:47 +0300
commitd1307bde651a02535405531aa9abd576b625311c (patch)
tree534190e79c41eb63c5cc6c5a11a29d71e1450175 /storage/xtradb
parent1a3321b6496dcdbac47efb48e7b66aa23fd8e0f7 (diff)
downloadmariadb-git-d1307bde651a02535405531aa9abd576b625311c.tar.gz
MDEV-8395: InnoDB: Assertion failure in file fil0pagecompress.cc line 539 (SIGFPE)
File block size might be 0 and used on modulo operator. Make sure that file block size is initialized to 512.
Diffstat (limited to 'storage/xtradb')
-rw-r--r--storage/xtradb/fil/fil0pagecompress.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/xtradb/fil/fil0pagecompress.cc b/storage/xtradb/fil/fil0pagecompress.cc
index e508d4733db..ff8541a40a5 100644
--- a/storage/xtradb/fil/fil0pagecompress.cc
+++ b/storage/xtradb/fil/fil0pagecompress.cc
@@ -355,12 +355,16 @@ fil_compress_page(
write_size+=header_len;
+ if (block_size <= 0) {
+ block_size = 512;
+ }
+
+ ut_ad(write_size > 0 && block_size > 0);
+
/* Actual write needs to be alligned on block size */
if (write_size % block_size) {
size_t tmp = write_size;
-#ifdef UNIV_DEBUG
- ut_a(block_size > 0);
-#endif
+
write_size = (size_t)ut_uint64_align_up((ib_uint64_t)write_size, block_size);
#ifdef UNIV_DEBUG
ut_a(write_size > 0 && ((write_size % block_size) == 0));