diff options
Diffstat (limited to 'storage/xtradb/fil')
-rw-r--r-- | storage/xtradb/fil/fil0pagecompress.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/storage/xtradb/fil/fil0pagecompress.cc b/storage/xtradb/fil/fil0pagecompress.cc index 854b094ea81..71815ca0318 100644 --- a/storage/xtradb/fil/fil0pagecompress.cc +++ b/storage/xtradb/fil/fil0pagecompress.cc @@ -345,16 +345,19 @@ fil_compress_page( len, reinterpret_cast<uint8_t*>(out_buf + header_len), &out_pos, - (size_t)&write_size); + (size_t)write_size); - if (err != LZMA_OK || write_size > UNIV_PAGE_SIZE-header_len) { + if (err != LZMA_OK || out_pos > UNIV_PAGE_SIZE-header_len) { fprintf(stderr, "InnoDB: Warning: Compression failed for space %lu name %s len %lu err %d write_size %lu\n", - space_id, fil_space_name(space), len, err, write_size); + space_id, fil_space_name(space), len, err, out_pos); srv_stats.pages_page_compression_error.inc(); *out_len = len; return (buf); } + + write_size = out_pos; + break; } #endif /* HAVE_LZMA */ |