mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Fix some compiler warnings and small errors on code.
This commit is contained in:
parent
972a14b59a
commit
b5cdc5adcf
13 changed files with 44 additions and 28 deletions
|
@ -325,7 +325,7 @@ fil_decompress_page(
|
|||
if (err != (int)actual_size) {
|
||||
fprintf(stderr,
|
||||
"InnoDB: Corruption: Page is marked as compressed\n"
|
||||
"InnoDB: but decompression read only %d bytes.\n"
|
||||
"InnoDB: but decompression read only %ld bytes.\n"
|
||||
"InnoDB: size %lu len %lu\n",
|
||||
err, actual_size, len);
|
||||
fflush(stderr);
|
||||
|
@ -342,7 +342,7 @@ fil_decompress_page(
|
|||
if (err != LZO_E_OK || (olen == 0 || olen > UNIV_PAGE_SIZE)) {
|
||||
fprintf(stderr,
|
||||
"InnoDB: Corruption: Page is marked as compressed\n"
|
||||
"InnoDB: but decompression read only %d bytes.\n"
|
||||
"InnoDB: but decompression read only %ld bytes.\n"
|
||||
"InnoDB: size %lu len %lu\n",
|
||||
olen, actual_size, len);
|
||||
fflush(stderr);
|
||||
|
|
|
@ -17324,6 +17324,9 @@ ib_senderrf(
|
|||
case IB_LOG_LEVEL_FATAL:
|
||||
l = 0;
|
||||
break;
|
||||
default:
|
||||
l = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
my_printv_error(code, format, MYF(l), args);
|
||||
|
|
|
@ -133,9 +133,6 @@ extern fil_addr_t fil_addr_null;
|
|||
#define FIL_PAGE_COMPRESSED_SIZE 2 /*!< Number of bytes used to store
|
||||
actual payload data size on
|
||||
compressed pages. */
|
||||
#define FIL_PAGE_COMPRESSION_ZLIB 1 /*!< Compressin algorithm ZLIB. */
|
||||
#define FIL_PAGE_COMPRESSION_LZ4 2 /*!< Compressin algorithm LZ4. */
|
||||
|
||||
/* @} */
|
||||
/** File page trailer @{ */
|
||||
#define FIL_PAGE_END_LSN_OLD_CHKSUM 8 /*!< the low 4 bytes of this are used
|
||||
|
|
|
@ -22,12 +22,6 @@ this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "fsp0fsp.h"
|
||||
#include "fsp0pagecompress.h"
|
||||
|
||||
#define PAGE_UNCOMPRESSED 0
|
||||
#define PAGE_ZLIB_ALGORITHM 1
|
||||
#define PAGE_LZ4_ALGORITHM 2
|
||||
#define PAGE_LZO_ALGORITHM 3
|
||||
#define PAGE_ALGORITHM_LAST PAGE_LZO_ALGORITHM
|
||||
|
||||
/******************************************************************//**
|
||||
@file include/fil0pagecompress.h
|
||||
Helper functions for extracting/storing page compression and
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (C) 2013 SkySQL Ab. All Rights Reserved.
|
||||
Copyright (C) 2013, 2014 SkySQL Ab. All Rights Reserved.
|
||||
|
||||
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
|
||||
|
@ -27,6 +27,12 @@ Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
|
|||
#ifndef fsp0pagecompress_h
|
||||
#define fsp0pagecompress_h
|
||||
|
||||
#define PAGE_UNCOMPRESSED 0
|
||||
#define PAGE_ZLIB_ALGORITHM 1
|
||||
#define PAGE_LZ4_ALGORITHM 2
|
||||
#define PAGE_LZO_ALGORITHM 3
|
||||
#define PAGE_ALGORITHM_LAST PAGE_LZO_ALGORITHM
|
||||
|
||||
/**********************************************************************//**
|
||||
Reads the page compression level from the first page of a tablespace.
|
||||
@return page compression level, or 0 if uncompressed */
|
||||
|
|
|
@ -24,8 +24,6 @@ compression and atomic writes information to file space.
|
|||
Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
|
||||
***********************************************************************/
|
||||
|
||||
#include "fsp0fsp.h"
|
||||
|
||||
/********************************************************************//**
|
||||
Determine if the tablespace is page compressed from dict_table_t::flags.
|
||||
@return TRUE if page compressed, FALSE if not page compressed */
|
||||
|
@ -141,14 +139,21 @@ fil_get_compression_alg_name(
|
|||
ulint comp_alg) /*!<in: compression algorithm number */
|
||||
{
|
||||
switch(comp_alg) {
|
||||
case FIL_PAGE_COMPRESSION_ZLIB:
|
||||
case PAGE_UNCOMPRESSED:
|
||||
return ("uncompressed");
|
||||
break;
|
||||
case PAGE_ZLIB_ALGORITHM:
|
||||
return ("ZLIB");
|
||||
break;
|
||||
case FIL_PAGE_COMPRESSION_LZ4:
|
||||
case PAGE_LZ4_ALGORITHM:
|
||||
return ("LZ4");
|
||||
break;
|
||||
case PAGE_LZO_ALGORITHM:
|
||||
return ("LZO");
|
||||
break;
|
||||
default:
|
||||
return("UNKNOWN");
|
||||
ut_error;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,6 +152,7 @@ enum os_file_create_t {
|
|||
#define OS_FILE_AIO_INTERRUPTED 79
|
||||
#define OS_FILE_OPERATION_ABORTED 80
|
||||
#define OS_FILE_OPERATION_NOT_SUPPORTED 125
|
||||
#define OS_FILE_ERROR_MAX 200
|
||||
/* @} */
|
||||
|
||||
/** Types for aio operations @{ */
|
||||
|
|
|
@ -244,7 +244,9 @@ extern my_bool srv_use_native_aio;
|
|||
extern my_bool srv_use_trim;
|
||||
|
||||
/* Use posix fallocate */
|
||||
#ifdef HAVE_POSIX_FALLOCATE
|
||||
extern my_bool srv_use_posix_fallocate;
|
||||
#endif
|
||||
|
||||
/* Use atomic writes i.e disable doublewrite buffer */
|
||||
extern my_bool srv_use_atomic_writes;
|
||||
|
|
|
@ -18468,6 +18468,9 @@ ib_senderrf(
|
|||
case IB_LOG_LEVEL_FATAL:
|
||||
l = 0;
|
||||
break;
|
||||
default:
|
||||
l = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
my_printv_error(code, format, MYF(l), args);
|
||||
|
|
|
@ -22,12 +22,6 @@ this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "fsp0fsp.h"
|
||||
#include "fsp0pagecompress.h"
|
||||
|
||||
#define PAGE_UNCOMPRESSED 0
|
||||
#define PAGE_ZLIB_ALGORITHM 1
|
||||
#define PAGE_LZ4_ALGORITHM 2
|
||||
#define PAGE_LZO_ALGORITHM 3
|
||||
#define PAGE_ALGORITHM_LAST PAGE_LZO_ALGORITHM
|
||||
|
||||
/******************************************************************//**
|
||||
@file include/fil0pagecompress.h
|
||||
Helper functions for extracting/storing page compression and
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
|
||||
Copyright (C) 2013 SkySQL Ab. All Rights Reserved.
|
||||
Copyright (C) 2013, 2014 SkySQL Ab. All Rights Reserved.
|
||||
|
||||
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
|
||||
|
@ -27,6 +27,12 @@ Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
|
|||
#ifndef fsp0pagecompress_h
|
||||
#define fsp0pagecompress_h
|
||||
|
||||
#define PAGE_UNCOMPRESSED 0
|
||||
#define PAGE_ZLIB_ALGORITHM 1
|
||||
#define PAGE_LZ4_ALGORITHM 2
|
||||
#define PAGE_LZO_ALGORITHM 3
|
||||
#define PAGE_ALGORITHM_LAST PAGE_LZO_ALGORITHM
|
||||
|
||||
/**********************************************************************//**
|
||||
Reads the page compression level from the first page of a tablespace.
|
||||
@return page compression level, or 0 if uncompressed */
|
||||
|
|
|
@ -24,9 +24,6 @@ compression and atomic writes information to file space.
|
|||
Created 11/12/2013 Jan Lindström jan.lindstrom@skysql.com
|
||||
***********************************************************************/
|
||||
|
||||
#include "fsp0fsp.h"
|
||||
|
||||
|
||||
/********************************************************************//**
|
||||
Determine if the tablespace is page compressed from dict_table_t::flags.
|
||||
@return TRUE if page compressed, FALSE if not page compressed */
|
||||
|
@ -142,14 +139,21 @@ fil_get_compression_alg_name(
|
|||
ulint comp_alg) /*!<in: compression algorithm number */
|
||||
{
|
||||
switch(comp_alg) {
|
||||
case FIL_PAGE_COMPRESSION_ZLIB:
|
||||
case PAGE_UNCOMPRESSED:
|
||||
return ("uncompressed");
|
||||
break;
|
||||
case PAGE_ZLIB_ALGORITHM:
|
||||
return ("ZLIB");
|
||||
break;
|
||||
case FIL_PAGE_COMPRESSION_LZ4:
|
||||
case PAGE_LZ4_ALGORITHM:
|
||||
return ("LZ4");
|
||||
break;
|
||||
case PAGE_LZO_ALGORITHM:
|
||||
return ("LZO");
|
||||
break;
|
||||
default:
|
||||
return("UNKNOWN");
|
||||
ut_error;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -157,6 +157,7 @@ enum os_file_create_t {
|
|||
#define OS_FILE_AIO_INTERRUPTED 79
|
||||
#define OS_FILE_OPERATION_ABORTED 80
|
||||
#define OS_FILE_OPERATION_NOT_SUPPORTED 125
|
||||
#define OS_FILE_ERROR_MAX 200
|
||||
/* @} */
|
||||
|
||||
/** Types for aio operations @{ */
|
||||
|
|
Loading…
Reference in a new issue