Commit 66ef5b0d authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

Bug#14238406 NEW COMPILATION WARNINGS WITH GCC 4.7 (-WERROR=NARROWING)

Manual merge from mysql-5.1 to mysql-5.5
parents 4661d954 1ede2dd8
/* /*
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -1162,7 +1162,7 @@ static struct my_option my_long_options[] = ...@@ -1162,7 +1162,7 @@ static struct my_option my_long_options[] =
"Stop reading the binlog at position N. Applies to the last binlog " "Stop reading the binlog at position N. Applies to the last binlog "
"passed on the command line.", "passed on the command line.",
&stop_position, &stop_position, 0, GET_ULL, &stop_position, &stop_position, 0, GET_ULL,
REQUIRED_ARG, (ulonglong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE, REQUIRED_ARG, (longlong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE,
(ulonglong)(~(my_off_t)0), 0, 0, 0}, (ulonglong)(~(my_off_t)0), 0, 0, 0},
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \ {"to-last-log", 't', "Requires -R. Will not stop at the end of the \
requested binlog but rather continue printing until the end of the last \ requested binlog but rather continue printing until the end of the last \
......
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. /* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -4823,7 +4823,7 @@ typedef struct ...@@ -4823,7 +4823,7 @@ typedef struct
static st_error global_error_names[] = static st_error global_error_names[] =
{ {
{ "<No error>", -1, "" }, { "<No error>", -1U, "" },
#include <mysqld_ername.h> #include <mysqld_ername.h>
{ 0, 0, 0 } { 0, 0, 0 }
}; };
......
/* /*
Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -79,7 +79,7 @@ struct my_option ...@@ -79,7 +79,7 @@ struct my_option
enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG */ enum get_opt_arg_type arg_type; /**< e.g. REQUIRED_ARG or OPT_ARG */
longlong def_value; /**< Default value */ longlong def_value; /**< Default value */
longlong min_value; /**< Min allowed value (for numbers) */ longlong min_value; /**< Min allowed value (for numbers) */
longlong max_value; /**< Max allowed value (for numbers) */ ulonglong max_value; /**< Max allowed value (for numbers) */
longlong sub_size; /**< Unused */ longlong sub_size; /**< Unused */
long block_size; /**< Value should be a mult. of this (for numbers) */ long block_size; /**< Value should be a mult. of this (for numbers) */
void *app_type; /**< To be used by an application */ void *app_type; /**< To be used by an application */
......
...@@ -26,5 +26,5 @@ const unsigned long Trace::kTraceDetail = 0x0010; ...@@ -26,5 +26,5 @@ const unsigned long Trace::kTraceDetail = 0x0010;
const unsigned long Trace::kTraceNetWait = 0x0020; const unsigned long Trace::kTraceNetWait = 0x0020;
const unsigned long Trace::kTraceFunction = 0x0040; const unsigned long Trace::kTraceFunction = 0x0040;
const char ReplSemiSyncBase::kSyncHeader[2] = const unsigned char ReplSemiSyncBase::kSyncHeader[2] =
{ReplSemiSyncBase::kPacketMagicNum, 0}; {ReplSemiSyncBase::kPacketMagicNum, 0};
...@@ -71,7 +71,7 @@ class Trace { ...@@ -71,7 +71,7 @@ class Trace {
class ReplSemiSyncBase class ReplSemiSyncBase
:public Trace { :public Trace {
public: public:
static const char kSyncHeader[2]; /* three byte packet header */ static const unsigned char kSyncHeader[2]; /* three byte packet header */
/* Constants in network packet header. */ /* Constants in network packet header. */
static const unsigned char kPacketMagicNum; static const unsigned char kPacketMagicNum;
......
...@@ -180,7 +180,7 @@ static MYSQL_SYSVAR_ULONG(timeout, rpl_semi_sync_master_timeout, ...@@ -180,7 +180,7 @@ static MYSQL_SYSVAR_ULONG(timeout, rpl_semi_sync_master_timeout,
"The timeout value (in ms) for semi-synchronous replication in the master", "The timeout value (in ms) for semi-synchronous replication in the master",
NULL, // check NULL, // check
fix_rpl_semi_sync_master_timeout, // update fix_rpl_semi_sync_master_timeout, // update
10000, 0, ~0L, 1); 10000, 0, ~0UL, 1);
static MYSQL_SYSVAR_BOOL(wait_no_slave, rpl_semi_sync_master_wait_no_slave, static MYSQL_SYSVAR_BOOL(wait_no_slave, rpl_semi_sync_master_wait_no_slave,
PLUGIN_VAR_OPCMDARG, PLUGIN_VAR_OPCMDARG,
...@@ -194,7 +194,7 @@ static MYSQL_SYSVAR_ULONG(trace_level, rpl_semi_sync_master_trace_level, ...@@ -194,7 +194,7 @@ static MYSQL_SYSVAR_ULONG(trace_level, rpl_semi_sync_master_trace_level,
"The tracing level for semi-sync replication.", "The tracing level for semi-sync replication.",
NULL, // check NULL, // check
&fix_rpl_semi_sync_master_trace_level, // update &fix_rpl_semi_sync_master_trace_level, // update
32, 0, ~0L, 1); 32, 0, ~0UL, 1);
static SYS_VAR* semi_sync_master_system_vars[]= { static SYS_VAR* semi_sync_master_system_vars[]= {
MYSQL_SYSVAR(enabled), MYSQL_SYSVAR(enabled),
......
...@@ -161,7 +161,7 @@ static MYSQL_SYSVAR_ULONG(trace_level, rpl_semi_sync_slave_trace_level, ...@@ -161,7 +161,7 @@ static MYSQL_SYSVAR_ULONG(trace_level, rpl_semi_sync_slave_trace_level,
"The tracing level for semi-sync replication.", "The tracing level for semi-sync replication.",
NULL, // check NULL, // check
&fix_rpl_semi_sync_trace_level, // update &fix_rpl_semi_sync_trace_level, // update
32, 0, ~0L, 1); 32, 0, ~0UL, 1);
static SYS_VAR* semi_sync_slave_system_vars[]= { static SYS_VAR* semi_sync_slave_system_vars[]= {
MYSQL_SYSVAR(enabled), MYSQL_SYSVAR(enabled),
......
/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. /* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -353,8 +353,8 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG ...@@ -353,8 +353,8 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
int new_file_impl(bool need_lock); int new_file_impl(bool need_lock);
public: public:
MYSQL_LOG::generate_name; using MYSQL_LOG::generate_name;
MYSQL_LOG::is_open; using MYSQL_LOG::is_open;
/* This is relay log */ /* This is relay log */
bool is_relay_log; bool is_relay_log;
......
...@@ -714,7 +714,7 @@ bool plugin_is_ready(const LEX_STRING *name, int type) ...@@ -714,7 +714,7 @@ bool plugin_is_ready(const LEX_STRING *name, int type)
} }
SHOW_COMP_OPTION plugin_status(const char *name, int len, size_t type) SHOW_COMP_OPTION plugin_status(const char *name, size_t len, int type)
{ {
LEX_STRING plugin_name= { (char *) name, len }; LEX_STRING plugin_name= { (char *) name, len };
return plugin_status(&plugin_name, type); return plugin_status(&plugin_name, type);
......
/* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. /* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -154,7 +154,7 @@ extern bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name); ...@@ -154,7 +154,7 @@ extern bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name);
extern bool plugin_register_builtin(struct st_mysql_plugin *plugin); extern bool plugin_register_builtin(struct st_mysql_plugin *plugin);
extern void plugin_thdvar_init(THD *thd); extern void plugin_thdvar_init(THD *thd);
extern void plugin_thdvar_cleanup(THD *thd); extern void plugin_thdvar_cleanup(THD *thd);
extern SHOW_COMP_OPTION plugin_status(const char *name, int len, size_t type); extern SHOW_COMP_OPTION plugin_status(const char *name, size_t len, int type);
extern bool check_valid_path(const char *path, size_t length); extern bool check_valid_path(const char *path, size_t length);
typedef my_bool (plugin_foreach_func)(THD *thd, typedef my_bool (plugin_foreach_func)(THD *thd,
......
/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. /* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
...@@ -83,8 +83,8 @@ ST_FIELD_INFO query_profile_statistics_info[]= ...@@ -83,8 +83,8 @@ ST_FIELD_INFO query_profile_statistics_info[]=
int make_profile_table_for_show(THD *thd, ST_SCHEMA_TABLE *schema_table) int make_profile_table_for_show(THD *thd, ST_SCHEMA_TABLE *schema_table)
{ {
int profile_options = thd->lex->profile_options; uint profile_options = thd->lex->profile_options;
int fields_include_condition_truth_values[]= { uint fields_include_condition_truth_values[]= {
FALSE, /* Query_id */ FALSE, /* Query_id */
FALSE, /* Seq */ FALSE, /* Seq */
TRUE, /* Status */ TRUE, /* Status */
......
...@@ -11337,7 +11337,7 @@ static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite, ...@@ -11337,7 +11337,7 @@ static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
static MYSQL_SYSVAR_ULONG(io_capacity, srv_io_capacity, static MYSQL_SYSVAR_ULONG(io_capacity, srv_io_capacity,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Number of IOPs the server can do. Tunes the background IO rate", "Number of IOPs the server can do. Tunes the background IO rate",
NULL, NULL, 200, 100, ~0L, 0); NULL, NULL, 200, 100, ~0UL, 0);
static MYSQL_SYSVAR_ULONG(purge_batch_size, srv_purge_batch_size, static MYSQL_SYSVAR_ULONG(purge_batch_size, srv_purge_batch_size,
PLUGIN_VAR_OPCMDARG, PLUGIN_VAR_OPCMDARG,
...@@ -11454,7 +11454,7 @@ static MYSQL_SYSVAR_BOOL(adaptive_flushing, srv_adaptive_flushing, ...@@ -11454,7 +11454,7 @@ static MYSQL_SYSVAR_BOOL(adaptive_flushing, srv_adaptive_flushing,
static MYSQL_SYSVAR_ULONG(max_purge_lag, srv_max_purge_lag, static MYSQL_SYSVAR_ULONG(max_purge_lag, srv_max_purge_lag,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Desired maximum length of the purge queue (0 = no limit)", "Desired maximum length of the purge queue (0 = no limit)",
NULL, NULL, 0, 0, ~0L, 0); NULL, NULL, 0, 0, ~0UL, 0);
static MYSQL_SYSVAR_BOOL(rollback_on_timeout, innobase_rollback_on_timeout, static MYSQL_SYSVAR_BOOL(rollback_on_timeout, innobase_rollback_on_timeout,
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
...@@ -11516,7 +11516,7 @@ static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency, ...@@ -11516,7 +11516,7 @@ static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency,
static MYSQL_SYSVAR_ULONG(concurrency_tickets, srv_n_free_tickets_to_enter, static MYSQL_SYSVAR_ULONG(concurrency_tickets, srv_n_free_tickets_to_enter,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket", "Number of times a thread is allowed to enter InnoDB within the same SQL query after it has once got the ticket",
NULL, NULL, 500L, 1L, ~0L, 0); NULL, NULL, 500L, 1L, ~0UL, 0);
static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads, static MYSQL_SYSVAR_LONG(file_io_threads, innobase_file_io_threads,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR,
...@@ -11578,12 +11578,12 @@ static MYSQL_SYSVAR_LONG(open_files, innobase_open_files, ...@@ -11578,12 +11578,12 @@ static MYSQL_SYSVAR_LONG(open_files, innobase_open_files,
static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds, static MYSQL_SYSVAR_ULONG(sync_spin_loops, srv_n_spin_wait_rounds,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Count of spin-loop rounds in InnoDB mutexes (30 by default)", "Count of spin-loop rounds in InnoDB mutexes (30 by default)",
NULL, NULL, 30L, 0L, ~0L, 0); NULL, NULL, 30L, 0L, ~0UL, 0);
static MYSQL_SYSVAR_ULONG(spin_wait_delay, srv_spin_wait_delay, static MYSQL_SYSVAR_ULONG(spin_wait_delay, srv_spin_wait_delay,
PLUGIN_VAR_OPCMDARG, PLUGIN_VAR_OPCMDARG,
"Maximum delay between polling for a spin lock (6 by default)", "Maximum delay between polling for a spin lock (6 by default)",
NULL, NULL, 6L, 0L, ~0L, 0); NULL, NULL, 6L, 0L, ~0UL, 0);
static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency, static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
...@@ -11593,7 +11593,7 @@ static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency, ...@@ -11593,7 +11593,7 @@ static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
static MYSQL_SYSVAR_ULONG(thread_sleep_delay, srv_thread_sleep_delay, static MYSQL_SYSVAR_ULONG(thread_sleep_delay, srv_thread_sleep_delay,
PLUGIN_VAR_RQCMDARG, PLUGIN_VAR_RQCMDARG,
"Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep", "Time of innodb thread sleeping before joining InnoDB queue (usec). Value 0 disable a sleep",
NULL, NULL, 10000L, 0L, ~0L, 0); NULL, NULL, 10000L, 0L, ~0UL, 0);
static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path, static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment