mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
Fix a compilation error
This commit is contained in:
parent
996c7d5cb5
commit
200ef51344
6 changed files with 84 additions and 114 deletions
|
@ -171,12 +171,15 @@ fil_compress_page(
|
|||
/* If error we leave the actual page as it was */
|
||||
|
||||
#ifndef UNIV_PAGECOMPRESS_DEBUG
|
||||
if (space->printed_compression_failure == false) {
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
#endif
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu rt %d write %lu.",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
space->printed_compression_failure = true;
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, write_size);
|
||||
#ifndef UNIV_PAGECOMPRESS_DEBUG
|
||||
}
|
||||
#endif
|
||||
|
@ -192,11 +195,14 @@ fil_compress_page(
|
|||
buf, len, out_buf+header_len, &write_size, lzo_mem);
|
||||
|
||||
if (err != LZO_E_OK || write_size > UNIV_PAGE_SIZE-header_len) {
|
||||
if (space->printed_compression_failure == false) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu err %d write_size %lu.",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, write_size);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
@ -221,11 +227,14 @@ fil_compress_page(
|
|||
(size_t)write_size);
|
||||
|
||||
if (err != LZMA_OK || out_pos > UNIV_PAGE_SIZE-header_len) {
|
||||
if (space->printed_compression_failure == false) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu err %d write_size %lu",
|
||||
space_id, fil_space_name(space), len, err, out_pos);
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, out_pos);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
@ -252,11 +261,14 @@ fil_compress_page(
|
|||
0);
|
||||
|
||||
if (err != BZ_OK || write_size > UNIV_PAGE_SIZE-header_len) {
|
||||
if (space->printed_compression_failure == false) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu err %d write_size %lu.",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, write_size);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
@ -279,11 +291,14 @@ fil_compress_page(
|
|||
(size_t*)&write_size);
|
||||
|
||||
if (cstatus != SNAPPY_OK || write_size > UNIV_PAGE_SIZE-header_len) {
|
||||
if (space->printed_compression_failure == false) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu err %d write_size %lu.",
|
||||
space_id, fil_space_name(space), len, (int)cstatus, write_size);
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
(int)cstatus, write_size);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
@ -302,13 +317,13 @@ fil_compress_page(
|
|||
/* If error we leave the actual page as it was */
|
||||
|
||||
if (space && !space->printed_compression_failure) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space "
|
||||
ULINTPF " name %s len " ULINTPF
|
||||
" rt %d write " ULINTPF ".",
|
||||
space->id, space->name, len, err,
|
||||
write_size);
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" rt %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, write_size);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved.
|
||||
Copyright (c) 2013, 2017, 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
|
||||
|
@ -1366,14 +1366,6 @@ fil_user_tablespace_restore_page(
|
|||
ulint page_no); /* in: page_no to obtain from double
|
||||
write buffer */
|
||||
|
||||
/*******************************************************************//**
|
||||
Return space flags */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
fil_space_flags(
|
||||
/*===========*/
|
||||
fil_space_t* space); /*!< in: space */
|
||||
|
||||
/*******************************************************************//**
|
||||
Returns a pointer to the file_space_t that is in the memory cache
|
||||
associated with a space id.
|
||||
|
|
|
@ -26,28 +26,6 @@ Created 31/03/2015 Jan Lindström
|
|||
#ifndef fil0fil_ic
|
||||
#define fil0fil_ic
|
||||
|
||||
/*******************************************************************//**
|
||||
Return space name */
|
||||
UNIV_INLINE
|
||||
char*
|
||||
fil_space_name(
|
||||
/*===========*/
|
||||
fil_space_t* space) /*!< in: space */
|
||||
{
|
||||
return (space->name);
|
||||
}
|
||||
|
||||
/*******************************************************************//**
|
||||
Return space flags */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
fil_space_flags(
|
||||
/*===========*/
|
||||
fil_space_t* space) /*!< in: space */
|
||||
{
|
||||
return (space->flags);
|
||||
}
|
||||
|
||||
/*******************************************************************//**
|
||||
Return page type name */
|
||||
UNIV_INLINE
|
||||
|
|
|
@ -171,12 +171,15 @@ fil_compress_page(
|
|||
/* If error we leave the actual page as it was */
|
||||
|
||||
#ifndef UNIV_PAGECOMPRESS_DEBUG
|
||||
if (space->printed_compression_failure == false) {
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
#endif
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu rt %d write %lu.",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
space->printed_compression_failure = true;
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, write_size);
|
||||
#ifndef UNIV_PAGECOMPRESS_DEBUG
|
||||
}
|
||||
#endif
|
||||
|
@ -192,11 +195,14 @@ fil_compress_page(
|
|||
buf, len, out_buf+header_len, &write_size, lzo_mem);
|
||||
|
||||
if (err != LZO_E_OK || write_size > UNIV_PAGE_SIZE-header_len) {
|
||||
if (space->printed_compression_failure == false) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu err %d write_size %lu.",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, write_size);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
@ -221,11 +227,14 @@ fil_compress_page(
|
|||
(size_t)write_size);
|
||||
|
||||
if (err != LZMA_OK || out_pos > UNIV_PAGE_SIZE-header_len) {
|
||||
if (space->printed_compression_failure == false) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu err %d write_size %lu",
|
||||
space_id, fil_space_name(space), len, err, out_pos);
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, out_pos);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
@ -252,11 +261,14 @@ fil_compress_page(
|
|||
0);
|
||||
|
||||
if (err != BZ_OK || write_size > UNIV_PAGE_SIZE-header_len) {
|
||||
if (space->printed_compression_failure == false) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu err %d write_size %lu.",
|
||||
space_id, fil_space_name(space), len, err, write_size);
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, write_size);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
@ -279,11 +291,14 @@ fil_compress_page(
|
|||
(size_t*)&write_size);
|
||||
|
||||
if (cstatus != SNAPPY_OK || write_size > UNIV_PAGE_SIZE-header_len) {
|
||||
if (space->printed_compression_failure == false) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space %lu name %s len %lu err %d write_size %lu.",
|
||||
space_id, fil_space_name(space), len, (int)cstatus, write_size);
|
||||
if (space && !space->printed_compression_failure) {
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" err %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
(int)cstatus, write_size);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
@ -302,13 +317,13 @@ fil_compress_page(
|
|||
/* If error we leave the actual page as it was */
|
||||
|
||||
if (space && !space->printed_compression_failure) {
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space "
|
||||
ULINTPF " name %s len " ULINTPF
|
||||
" rt %d write " ULINTPF ".",
|
||||
space->id, space->name, len, err,
|
||||
write_size);
|
||||
space->printed_compression_failure = true;
|
||||
ib_logf(IB_LOG_LEVEL_WARN,
|
||||
"Compression failed for space " ULINTPF
|
||||
" name %s len " ULINTPF
|
||||
" rt %d write_size " ULINTPF ".",
|
||||
space->id, space->name, len,
|
||||
err, write_size);
|
||||
}
|
||||
|
||||
srv_stats.pages_page_compression_error.inc();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2013, 2017, MariaDB Corporation. All Rights Reserved.
|
||||
Copyright (c) 2013, 2017, 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
|
||||
|
@ -1460,14 +1460,6 @@ fil_get_next_space_safe(
|
|||
|
||||
#endif /* UNIV_INNOCHECKSUM */
|
||||
|
||||
/*******************************************************************//**
|
||||
Return space flags */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
fil_space_flags(
|
||||
/*===========*/
|
||||
fil_space_t* space); /*!< in: space */
|
||||
|
||||
/****************************************************************//**
|
||||
Does error handling when a file operation fails.
|
||||
@return TRUE if we should retry the operation */
|
||||
|
|
|
@ -26,28 +26,6 @@ Created 31/03/2015 Jan Lindström
|
|||
#ifndef fil0fil_ic
|
||||
#define fil0fil_ic
|
||||
|
||||
/*******************************************************************//**
|
||||
Return space name */
|
||||
UNIV_INLINE
|
||||
char*
|
||||
fil_space_name(
|
||||
/*===========*/
|
||||
fil_space_t* space) /*!< in: space */
|
||||
{
|
||||
return (space->name);
|
||||
}
|
||||
|
||||
/*******************************************************************//**
|
||||
Return space flags */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
fil_space_flags(
|
||||
/*===========*/
|
||||
fil_space_t* space) /*!< in: space */
|
||||
{
|
||||
return (space->flags);
|
||||
}
|
||||
|
||||
/*******************************************************************//**
|
||||
Return page type name */
|
||||
UNIV_INLINE
|
||||
|
|
Loading…
Reference in a new issue