compiler warnings

This commit is contained in:
Sergei Golubchik 2017-04-20 22:43:58 +02:00
parent f21dcd9933
commit c0e24cd0e8
5 changed files with 14 additions and 10 deletions

View File

@ -1395,7 +1395,6 @@ write_xtrabackup_info(MYSQL *connection)
char buf_start_time[100]; char buf_start_time[100];
char buf_end_time[100]; char buf_end_time[100];
tm tm; tm tm;
my_bool null = TRUE;
ostringstream oss; ostringstream oss;
const char *xb_stream_name[] = {"file", "tar", "xbstream"}; const char *xb_stream_name[] = {"file", "tar", "xbstream"};

View File

@ -18,11 +18,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*******************************************************/ *******************************************************/
#include <zlib.h>
#include <stdint.h>
#include <string.h>
#include "crc_glue.h" #include "crc_glue.h"
#include "crc-intel-pclmul.h" #include "crc-intel-pclmul.h"
#include <stdint.h>
#include <string.h>
#include <zlib.h>
#if __GNUC__ >= 4 && defined(__x86_64__) #if __GNUC__ >= 4 && defined(__x86_64__)
static int pclmul_enabled = 0; static int pclmul_enabled = 0;

View File

@ -24,6 +24,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#include "common.h" #include "common.h"
#include "datasink.h" #include "datasink.h"
#if ARCHIVE_VERSION_NUMBER < 3000000
#define archive_write_add_filter_none(X) archive_write_set_compression_none(X)
#define archive_write_free(X) archive_write_finish(X)
#endif
typedef struct { typedef struct {
struct archive *archive; struct archive *archive;
ds_file_t *dest_file; ds_file_t *dest_file;
@ -114,14 +119,14 @@ archive_init(const char *root __attribute__((unused)))
archive_ctxt->archive = a; archive_ctxt->archive = a;
archive_ctxt->dest_file = NULL; archive_ctxt->dest_file = NULL;
if (archive_write_set_compression_none(a) != ARCHIVE_OK || if(archive_write_add_filter_none(a) != ARCHIVE_OK ||
archive_write_set_format_pax_restricted(a) != ARCHIVE_OK || archive_write_set_format_pax_restricted(a) != ARCHIVE_OK ||
/* disable internal buffering so we don't have to flush the /* disable internal buffering so we don't have to flush the
output in xtrabackup */ output in xtrabackup */
archive_write_set_bytes_per_block(a, 0) != ARCHIVE_OK) { archive_write_set_bytes_per_block(a, 0) != ARCHIVE_OK) {
msg("failed to set libarchive archive options: %s\n", msg("failed to set libarchive archive options: %s\n",
archive_error_string(a)); archive_error_string(a));
archive_write_finish(a); archive_write_free(a);
goto err; goto err;
} }
@ -262,7 +267,7 @@ archive_deinit(ds_ctxt_t *ctxt)
if (archive_write_close(a) != ARCHIVE_OK) { if (archive_write_close(a) != ARCHIVE_OK) {
msg("archive_write_close() failed.\n"); msg("archive_write_close() failed.\n");
} }
archive_write_finish(a); archive_write_free(a);
if (archive_ctxt->dest_file) { if (archive_ctxt->dest_file) {
ds_close(archive_ctxt->dest_file); ds_close(archive_ctxt->dest_file);

View File

@ -6514,7 +6514,7 @@ skip_check:
Unfinished transactions are not rolled back during log applying Unfinished transactions are not rolled back during log applying
as they can be finished at the firther files applyings. as they can be finished at the firther files applyings.
*/ */
srv_apply_log_only = xtrabackup_apply_log_only = true; xtrabackup_apply_log_only = srv_apply_log_only = true;
if (!xtrabackup_arch_search_files(min_flushed_lsn)) { if (!xtrabackup_arch_search_files(min_flushed_lsn)) {
goto error_cleanup; goto error_cleanup;

View File

@ -17401,11 +17401,11 @@ innodb_log_archive_update(
if (in_val) { if (in_val) {
/* turn archiving on */ /* turn archiving on */
srv_log_archive_on = innobase_log_archive = 1; innobase_log_archive = srv_log_archive_on = 1;
log_archive_archivelog(); log_archive_archivelog();
} else { } else {
/* turn archivng off */ /* turn archivng off */
srv_log_archive_on = innobase_log_archive = 0; innobase_log_archive = srv_log_archive_on = 0;
log_archive_noarchivelog(); log_archive_noarchivelog();
} }
} }