diff options
author | Jan Lindström <jan.lindstrom@skysql.com> | 2014-12-04 12:40:19 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@skysql.com> | 2014-12-04 12:40:19 +0200 |
commit | 0fe39b6856a108bca2e0767df94d9a429d5f8203 (patch) | |
tree | 51adbc9a3f16439d8a2363e9a1db1d1c77327ee1 /storage | |
parent | 8360e1a5b5e44debcc7aeaa10331278eb6273176 (diff) | |
download | mariadb-git-0fe39b6856a108bca2e0767df94d9a429d5f8203.tar.gz |
MDEV-7262: innodb.innodb-mdev7046 and innodb-page_compression* fail on BuildBot
If persistent trim is not used some OS require that we write full page.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/fil/fil0pagecompress.cc | 6 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0pagecompress.cc | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc index c74740ac9e1..77b9da8b060 100644 --- a/storage/innobase/fil/fil0pagecompress.cc +++ b/storage/innobase/fil/fil0pagecompress.cc @@ -477,6 +477,12 @@ fil_compress_page( srv_stats.page_compression_saved.add((len - write_size)); srv_stats.pages_page_compressed.inc(); + /* If we do not persistently trim rest of page, we need to write it + all */ + if (!srv_use_trim) { + write_size = len; + } + *out_len = write_size; return(out_buf); diff --git a/storage/xtradb/fil/fil0pagecompress.cc b/storage/xtradb/fil/fil0pagecompress.cc index b1d5412b9f1..c1d476126c6 100644 --- a/storage/xtradb/fil/fil0pagecompress.cc +++ b/storage/xtradb/fil/fil0pagecompress.cc @@ -474,6 +474,12 @@ fil_compress_page( srv_stats.page_compression_saved.add((len - write_size)); srv_stats.pages_page_compressed.inc(); + /* If we do not persistently trim rest of page, we need to write it + all */ + if (!srv_use_trim) { + write_size = len; + } + *out_len = write_size; return(out_buf); |