summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorJan Lindström <jplindst@mariadb.org>2014-05-22 16:31:31 +0300
committerJan Lindström <jplindst@mariadb.org>2014-05-22 16:31:31 +0300
commitb5cdc5adcfbb0d4380604187192cd089dd3e11b1 (patch)
treed082125d0fd5a34737ac4c534040f5be6920eea2 /storage
parent972a14b59a0ec12b01c9a7f5c8867294fd4f40db (diff)
downloadmariadb-git-b5cdc5adcfbb0d4380604187192cd089dd3e11b1.tar.gz
Fix some compiler warnings and small errors on code.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/fil/fil0pagecompress.cc4
-rw-r--r--storage/innobase/handler/ha_innodb.cc3
-rw-r--r--storage/innobase/include/fil0fil.h3
-rw-r--r--storage/innobase/include/fil0pagecompress.h6
-rw-r--r--storage/innobase/include/fsp0pagecompress.h8
-rw-r--r--storage/innobase/include/fsp0pagecompress.ic13
-rw-r--r--storage/innobase/include/os0file.h1
-rw-r--r--storage/innobase/include/srv0srv.h2
-rw-r--r--storage/xtradb/handler/ha_innodb.cc3
-rw-r--r--storage/xtradb/include/fil0pagecompress.h6
-rw-r--r--storage/xtradb/include/fsp0pagecompress.h8
-rw-r--r--storage/xtradb/include/fsp0pagecompress.ic14
-rw-r--r--storage/xtradb/include/os0file.h1
13 files changed, 44 insertions, 28 deletions
diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc
index ce7063bc688..a062f914b80 100644
--- a/storage/innobase/fil/fil0pagecompress.cc
+++ b/storage/innobase/fil/fil0pagecompress.cc
@@ -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);
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 84a38473b88..67b81710422 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -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);
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index 71b09f21d67..a1422f3d11b 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -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
diff --git a/storage/innobase/include/fil0pagecompress.h b/storage/innobase/include/fil0pagecompress.h
index 0cc5aeb4678..74f6e45f4fb 100644
--- a/storage/innobase/include/fil0pagecompress.h
+++ b/storage/innobase/include/fil0pagecompress.h
@@ -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
diff --git a/storage/innobase/include/fsp0pagecompress.h b/storage/innobase/include/fsp0pagecompress.h
index 4913f1d6b29..f2cd38481f6 100644
--- a/storage/innobase/include/fsp0pagecompress.h
+++ b/storage/innobase/include/fsp0pagecompress.h
@@ -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 */
diff --git a/storage/innobase/include/fsp0pagecompress.ic b/storage/innobase/include/fsp0pagecompress.ic
index 10f9d30d1f8..65ad90cdfc4 100644
--- a/storage/innobase/include/fsp0pagecompress.ic
+++ b/storage/innobase/include/fsp0pagecompress.ic
@@ -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;
}
}
diff --git a/storage/innobase/include/os0file.h b/storage/innobase/include/os0file.h
index 2f22aa73508..938e15683e9 100644
--- a/storage/innobase/include/os0file.h
+++ b/storage/innobase/include/os0file.h
@@ -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 @{ */
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index cfa94242200..26fcf40eb97 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -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;
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index 9785b41b725..f08a9607d7d 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -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);
diff --git a/storage/xtradb/include/fil0pagecompress.h b/storage/xtradb/include/fil0pagecompress.h
index 0cc5aeb4678..74f6e45f4fb 100644
--- a/storage/xtradb/include/fil0pagecompress.h
+++ b/storage/xtradb/include/fil0pagecompress.h
@@ -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
diff --git a/storage/xtradb/include/fsp0pagecompress.h b/storage/xtradb/include/fsp0pagecompress.h
index 4913f1d6b29..f2cd38481f6 100644
--- a/storage/xtradb/include/fsp0pagecompress.h
+++ b/storage/xtradb/include/fsp0pagecompress.h
@@ -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 */
diff --git a/storage/xtradb/include/fsp0pagecompress.ic b/storage/xtradb/include/fsp0pagecompress.ic
index 873f6cd401d..a72c4a1df90 100644
--- a/storage/xtradb/include/fsp0pagecompress.ic
+++ b/storage/xtradb/include/fsp0pagecompress.ic
@@ -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;
}
}
diff --git a/storage/xtradb/include/os0file.h b/storage/xtradb/include/os0file.h
index 4d83d5da525..836d12d878e 100644
--- a/storage/xtradb/include/os0file.h
+++ b/storage/xtradb/include/os0file.h
@@ -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 @{ */