summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkevg <claprix@yandex.ru>2016-11-24 17:36:02 +0300
committerkevg <claprix@yandex.ru>2016-11-24 17:36:02 +0300
commit780db8e25239e5423cfab50c04c60b79ebc0224b (patch)
tree2c73735c76607093d466a143627efdd8b4fbc2ca
parentf4d6f26a4fae3f0cfcc6e77667c7697c4e024189 (diff)
downloadmariadb-git-780db8e25239e5423cfab50c04c60b79ebc0224b.tar.gz
fix build and some warnings
-rw-r--r--extra/comp_err.c4
-rw-r--r--extra/yassl/include/openssl/crypto.h2
-rw-r--r--mysys/thr_lock.c12
-rw-r--r--sql/log.cc2
-rw-r--r--sql/log_event_old.cc9
-rw-r--r--sql/net_serv.cc2
-rw-r--r--sql/partition_info.cc2
-rw-r--r--sql/records.cc2
-rw-r--r--sql/slave.cc8
-rw-r--r--sql/sql_audit.cc6
-rw-r--r--sql/sql_class.cc2
-rw-r--r--sql/sql_signal.cc14
-rw-r--r--sql/sql_trigger.cc16
-rw-r--r--sql/table.cc4
-rw-r--r--sql/unireg.cc1
-rw-r--r--sql/wsrep_mysqld.cc4
-rw-r--r--sql/wsrep_sst.cc2
-rw-r--r--storage/connect/ha_connect.cc6
-rw-r--r--storage/connect/inihandl.c2
-rw-r--r--storage/federated/ha_federated.cc1
-rw-r--r--storage/federatedx/federatedx_io.cc2
-rw-r--r--storage/federatedx/ha_federatedx.cc1
-rw-r--r--storage/innobase/dict/dict0defrag_bg.cc4
-rw-r--r--storage/innobase/dict/dict0stats_bg.cc4
-rw-r--r--storage/innobase/include/dict0mem.h10
-rw-r--r--storage/innobase/include/fsp0fsp.h2
-rw-r--r--storage/innobase/include/fsp0types.h6
-rw-r--r--storage/innobase/row/row0sel.cc2
-rw-r--r--storage/xtradb/handler/ha_innodb.cc2
-rw-r--r--storage/xtradb/include/dict0mem.h6
-rw-r--r--storage/xtradb/include/fsp0fsp.h8
-rw-r--r--strings/ctype-ucs2.c11
-rw-r--r--strings/ctype-utf8.c29
33 files changed, 43 insertions, 145 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c
index a5530305317..cf6262f66e2 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -172,8 +172,8 @@ int main(int argc, char *argv[])
MY_INIT(argv[0]);
{
uint max_error, error_count;
- struct errors *error_head;
- struct languages *lang_head;
+ struct errors *error_head= NULL;
+ struct languages *lang_head= NULL;
DBUG_ENTER("main");
charsets_dir= DEFAULT_CHARSET_DIR;
diff --git a/extra/yassl/include/openssl/crypto.h b/extra/yassl/include/openssl/crypto.h
index 103fcbb0e30..ac1e7ebc8eb 100644
--- a/extra/yassl/include/openssl/crypto.h
+++ b/extra/yassl/include/openssl/crypto.h
@@ -19,7 +19,7 @@
/* crypto.h for openSSL */
-#ifndef ysSSL_crypto_h__
+#ifndef yaSSL_crypto_h__
#define yaSSL_crypto_h__
#ifdef YASSL_PREFIX
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index e8c4ed9c614..a77db04acef 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -498,18 +498,6 @@ has_old_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner)
return 0;
}
-static inline my_bool have_specific_lock(THR_LOCK_DATA *data,
- enum thr_lock_type type)
-{
- for ( ; data ; data=data->next)
- {
- if (data->type == type)
- return 1;
- }
- return 0;
-}
-
-
static void wake_up_waiters(THR_LOCK *lock);
diff --git a/sql/log.cc b/sql/log.cc
index 4d903154d98..9f43e363e50 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1307,7 +1307,7 @@ bool LOGGER::slow_log_print(THD *thd, const char *query, uint query_length,
/* fill in user_host value: the format is "%s[%s] @ %s [%s]" */
user_host_len= (strxnmov(user_host_buff, MAX_USER_HOST_SIZE,
- sctx->priv_user ? sctx->priv_user : "", "[",
+ sctx->priv_user, "[",
sctx->user ? sctx->user : (thd->slave_thread ? "SQL_SLAVE" : ""), "] @ ",
sctx->host ? sctx->host : "", " [",
sctx->ip ? sctx->ip : "", "]", NullS) -
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc
index 0502f20d2b1..552221ee68a 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -1582,11 +1582,10 @@ int Old_rows_log_event::do_apply_event(rpl_group_info *rgi)
break;
default:
- rli->report(ERROR_LEVEL, thd->net.last_errno, NULL,
+ rli->report(ERROR_LEVEL, thd->net.last_errno, NULL,
"Error in %s event: row application failed. %s",
- get_type_str(),
- thd->net.last_error ? thd->net.last_error : "");
- thd->is_slave_error= 1;
+ get_type_str(), thd->net.last_error);
+ thd->is_slave_error = 1;
break;
}
@@ -1625,7 +1624,7 @@ int Old_rows_log_event::do_apply_event(rpl_group_info *rgi)
"on table %s.%s. %s",
get_type_str(), table->s->db.str,
table->s->table_name.str,
- thd->net.last_error ? thd->net.last_error : "");
+ thd->net.last_error);
/*
If one day we honour --skip-slave-errors in row-based replication, and
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 581bc12b35b..70111f1b5d6 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -60,8 +60,10 @@
#define EXTRA_DEBUG_fflush fflush
#else
static void inline EXTRA_DEBUG_fprintf(...) {}
+#ifndef MYSQL_SERVER
static int inline EXTRA_DEBUG_fflush(...) { return 0; }
#endif
+#endif
#ifdef MYSQL_SERVER
#define MYSQL_SERVER_my_error my_error
#else
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 273c0afb9ac..6eac6dba68b 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -40,8 +40,6 @@ partition_info *partition_info::get_clone(THD *thd)
MEM_ROOT *mem_root= thd->mem_root;
DBUG_ENTER("partition_info::get_clone");
- if (!this)
- DBUG_RETURN(NULL);
List_iterator<partition_element> part_it(partitions);
partition_element *part;
partition_info *clone= new (mem_root) partition_info();
diff --git a/sql/records.cc b/sql/records.cc
index e7a4ab836c0..b8abb489ba7 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -69,7 +69,7 @@ static int rr_index_desc(READ_RECORD *info);
bool init_read_record_idx(READ_RECORD *info, THD *thd, TABLE *table,
bool print_error, uint idx, bool reverse)
{
- int error;
+ int error= 0;
DBUG_ENTER("init_read_record_idx");
empty_record(table);
diff --git a/sql/slave.cc b/sql/slave.cc
index f59a9142c8d..77fde743184 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -6043,10 +6043,8 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
TODO: handling `when' for SHOW SLAVE STATUS' snds behind
*/
- if ((memcmp(mi->master_log_name, hb.get_log_ident(), hb.get_ident_len())
- && mi->master_log_name != NULL)
- || mi->master_log_pos > hb.log_pos)
- {
+ if (memcmp(mi->master_log_name, hb.get_log_ident(), hb.get_ident_len()) ||
+ mi->master_log_pos > hb.log_pos) {
/* missed events of heartbeat from the past */
error= ER_SLAVE_HEARTBEAT_FAILURE;
error_msg.append(STRING_WITH_LEN("heartbeat is not compatible with local info;"));
@@ -6643,7 +6641,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir_ptr);
/* we disallow empty users */
- if (mi->user == NULL || mi->user[0] == 0)
+ if (mi->user[0] == 0)
{
mi->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, NULL,
ER_THD(thd, ER_SLAVE_FATAL_ERROR),
diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc
index 118b843e1a4..8a523ebbf4b 100644
--- a/sql/sql_audit.cc
+++ b/sql/sql_audit.cc
@@ -250,10 +250,8 @@ void mysql_audit_finalize()
int initialize_audit_plugin(st_plugin_int *plugin)
{
st_mysql_audit *data= (st_mysql_audit*) plugin->plugin->info;
-
- if (!data->class_mask || !data->event_notify ||
- !data->class_mask[0])
- {
+
+ if (!data->event_notify || !data->class_mask[0]) {
sql_print_error("Plugin '%s' has invalid data.",
plugin->name.str);
return 1;
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 8fabc8f593e..3eeeda56f4b 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -2093,7 +2093,7 @@ bool THD::notify_shared_lock(MDL_context_owner *ctx_in_use,
if (!thd_table->needs_reopen())
{
signalled|= mysql_lock_abort_for_thread(this, thd_table);
- if (this && WSREP(this) && wsrep_thd_is_BF(this, FALSE))
+ if (WSREP(this) && wsrep_thd_is_BF(this, FALSE))
{
WSREP_DEBUG("remove_table_from_cache: %llu",
(unsigned long long) this->real_id);
diff --git a/sql/sql_signal.cc b/sql/sql_signal.cc
index 5f4862f173c..1b7edbee54a 100644
--- a/sql/sql_signal.cc
+++ b/sql/sql_signal.cc
@@ -63,20 +63,6 @@ const LEX_STRING Diag_condition_item_names[]=
{ C_STRING_WITH_LEN("TRIGGER_SCHEMA") }
};
-const LEX_STRING Diag_statement_item_names[]=
-{
- { C_STRING_WITH_LEN("NUMBER") },
- { C_STRING_WITH_LEN("MORE") },
- { C_STRING_WITH_LEN("COMMAND_FUNCTION") },
- { C_STRING_WITH_LEN("COMMAND_FUNCTION_CODE") },
- { C_STRING_WITH_LEN("DYNAMIC_FUNCTION") },
- { C_STRING_WITH_LEN("DYNAMIC_FUNCTION_CODE") },
- { C_STRING_WITH_LEN("ROW_COUNT") },
- { C_STRING_WITH_LEN("TRANSACTIONS_COMMITTED") },
- { C_STRING_WITH_LEN("TRANSACTIONS_ROLLED_BACK") },
- { C_STRING_WITH_LEN("TRANSACTION_ACTIVE") }
-};
-
Set_signal_information::Set_signal_information(
const Set_signal_information& set)
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 7dbc8513418..b5a90d28dd0 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -257,20 +257,6 @@ static File_option trigname_file_parameters[]=
};
-const LEX_STRING trg_action_time_type_names[]=
-{
- { C_STRING_WITH_LEN("BEFORE") },
- { C_STRING_WITH_LEN("AFTER") }
-};
-
-const LEX_STRING trg_event_type_names[]=
-{
- { C_STRING_WITH_LEN("INSERT") },
- { C_STRING_WITH_LEN("UPDATE") },
- { C_STRING_WITH_LEN("DELETE") }
-};
-
-
class Handle_old_incorrect_sql_modes_hook: public Unknown_key_hook
{
private:
@@ -1993,7 +1979,7 @@ bool Trigger::change_on_table_name(void* param_arg)
if (sql_create_definition_file(NULL, &trigname_file, &trigname_file_type,
(uchar*)&trigname, trigname_file_parameters))
- return this;
+ return true;
/* Remove stale .TRN file in case of database upgrade */
if (param->old_db_name)
diff --git a/sql/table.cc b/sql/table.cc
index 4c68bcb468a..9177d1e38f6 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -2233,7 +2233,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
DBUG_ASSERT(!reg_field->vcol_info);
reg_field->vcol_info= vcol_info;
share->virtual_fields++;
- share->virtual_stored_fields++; // For insert/load data
+ share->virtual_stored_fields= true; // For insert/load data
break;
case 2: // Default expression
vcol_info->stored_in_db= 1;
@@ -5026,8 +5026,6 @@ void TABLE_LIST::cleanup_items()
VIEW_CHECK_SKIP FAILED, but continue
*/
-const LEX_STRING view_check_name= { C_STRING_WITH_LEN("WITH CHECK OPTION") };
-
int TABLE_LIST::view_check_option(THD *thd, bool ignore_failure)
{
diff --git a/sql/unireg.cc b/sql/unireg.cc
index d3a9b832aaf..2d83ca54edb 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -865,7 +865,6 @@ static bool pack_fields(uchar **buff_arg, List<Create_field> &create_fields,
recpos= field->offset+1 + (uint) data_offset;
int3store(buff+5,recpos);
int2store(buff+8,field->pack_flag);
- DBUG_ASSERT(field->unireg_check < 256);
buff[10]= (uchar) field->unireg_check;
buff[12]= (uchar) field->interval_id;
buff[13]= (uchar) field->sql_type;
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 8c58ceddcd1..68ce59c0665 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -1779,11 +1779,11 @@ bool wsrep_grant_mdl_exception(MDL_context *requestor_ctx,
/* Print some debug information. */
if (wsrep_debug)
{
- if ((request_thd->lex->sql_command == SQLCOM_DROP_TABLE))
+ if (request_thd->lex->sql_command == SQLCOM_DROP_TABLE)
{
WSREP_DEBUG("DROP caused BF abort");
}
- else if ((granted_thd->wsrep_query_state == QUERY_COMMITTING))
+ else if (granted_thd->wsrep_query_state == QUERY_COMMITTING)
{
WSREP_DEBUG("MDL granted, but committing thd abort scheduled");
}
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 50f54fddc95..d35514344eb 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -184,8 +184,6 @@ bool wsrep_sst_donor_update (sys_var *self, THD* thd, enum_var_type type)
return 0;
}
-static wsrep_uuid_t cluster_uuid = WSREP_UUID_UNDEFINED;
-
bool wsrep_before_SE()
{
return (wsrep_provider != NULL
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index 5fe75fd0f59..a2ba6ffad13 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -1190,7 +1190,7 @@ char *ha_connect::GetRealString(const char *s)
{
char *sv;
- if (IsPartitioned() && s && partname && *partname) {
+ if (IsPartitioned() && s && *partname) {
sv= (char*)PlugSubAlloc(xp->g, NULL, 0);
sprintf(sv, s, partname);
PlugSubAlloc(xp->g, NULL, strlen(sv) + 1);
@@ -2868,7 +2868,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
strncat(body, res->ptr(), res->length());
if (res->length() < 19)
- strcat(body, "1970-01-01 00:00:00" + res->length());
+ strcat(body, &"1970-01-01 00:00:00"[res->length()]);
strcat(body, "'}");
break;
@@ -2897,7 +2897,7 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond)
strncat(body, res->ptr(), res->length());
if (res->length() < 19)
- strcat(body, "1970-01-01 00:00:00" + res->length());
+ strcat(body, &"1970-01-01 00:00:00"[res->length()]);
strcat(body, "'}");
break;
diff --git a/storage/connect/inihandl.c b/storage/connect/inihandl.c
index 46102557b20..896431b855f 100644
--- a/storage/connect/inihandl.c
+++ b/storage/connect/inihandl.c
@@ -193,7 +193,7 @@ static void PROFILE_Save( FILE *file, PROFILESECTION *section )
}
for (key = section->key; key; key = key->next)
- if (key->name && key->name[0]) {
+ if (key->name[0]) {
fprintf(file, "%s", SVP(key->name));
if (key->value)
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 2334848a50b..038415cc188 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -407,7 +407,6 @@ static const int bulk_padding= 64; // bytes "overhead" in packet
/* Variables used when chopping off trailing characters */
static const uint sizeof_trailing_comma= sizeof(", ") - 1;
-static const uint sizeof_trailing_closeparen= sizeof(") ") - 1;
static const uint sizeof_trailing_and= sizeof(" AND ") - 1;
static const uint sizeof_trailing_where= sizeof(" WHERE ") - 1;
diff --git a/storage/federatedx/federatedx_io.cc b/storage/federatedx/federatedx_io.cc
index 1e0348e3bf8..5baec617cda 100644
--- a/storage/federatedx/federatedx_io.cc
+++ b/storage/federatedx/federatedx_io.cc
@@ -54,8 +54,6 @@ static const io_schemes_st federated_io_schemes[] =
{ "null", instantiate_io_null } /* must be last element */
};
-const uint federated_io_schemes_count= array_elements(federated_io_schemes);
-
federatedx_io::federatedx_io(FEDERATEDX_SERVER *aserver)
: server(aserver), owner_ptr(0), txn_next(0), idle_next(0),
active(FALSE), busy(FALSE), readonly(TRUE)
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index cc12673f86f..a4da84ddaf3 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -337,7 +337,6 @@ static const int bulk_padding= 64; // bytes "overhead" in packet
/* Variables used when chopping off trailing characters */
static const uint sizeof_trailing_comma= sizeof(", ") - 1;
-static const uint sizeof_trailing_closeparen= sizeof(") ") - 1;
static const uint sizeof_trailing_and= sizeof(" AND ") - 1;
static const uint sizeof_trailing_where= sizeof(" WHERE ") - 1;
diff --git a/storage/innobase/dict/dict0defrag_bg.cc b/storage/innobase/dict/dict0defrag_bg.cc
index 82aa3abcde6..3f3eefc6acf 100644
--- a/storage/innobase/dict/dict0defrag_bg.cc
+++ b/storage/innobase/dict/dict0defrag_bg.cc
@@ -43,10 +43,6 @@ static ib_mutex_t defrag_pool_mutex;
static mysql_pfs_key_t defrag_pool_mutex_key;
#endif
-/** The number of tables that can be added to "defrag_pool" before
-it is enlarged */
-static const ulint DEFRAG_POOL_INITIAL_SLOTS = 128;
-
/** Indices whose defrag stats need to be saved to persistent storage.*/
struct defrag_pool_item_t {
table_id_t table_id;
diff --git a/storage/innobase/dict/dict0stats_bg.cc b/storage/innobase/dict/dict0stats_bg.cc
index dbc8e90bed6..9d04cee4165 100644
--- a/storage/innobase/dict/dict0stats_bg.cc
+++ b/storage/innobase/dict/dict0stats_bg.cc
@@ -63,10 +63,6 @@ static os_event_t dict_stats_disabled_event;
/** This mutex protects the "recalc_pool" variable. */
static ib_mutex_t recalc_pool_mutex;
-/** The number of tables that can be added to "recalc_pool" before
-it is enlarged */
-static const ulint RECALC_POOL_INITIAL_SLOTS = 128;
-
/** Allocator type, used by std::vector */
typedef ut_allocator<table_id_t>
recalc_pool_allocator_t;
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index 4fac0648bcb..c009732aac7 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -235,23 +235,23 @@ DEFAULT=0, ON = 1, OFF = 2
<< DICT_TF_POS_SHARED_SPACE)
/** Bit mask of the PAGE_COMPRESSION field */
#define DICT_TF_MASK_PAGE_COMPRESSION \
- ((~(~0 << DICT_TF_WIDTH_PAGE_COMPRESSION)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION)) \
<< DICT_TF_POS_PAGE_COMPRESSION)
/** Bit mask of the PAGE_COMPRESSION_LEVEL field */
#define DICT_TF_MASK_PAGE_COMPRESSION_LEVEL \
- ((~(~0 << DICT_TF_WIDTH_PAGE_COMPRESSION_LEVEL)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION_LEVEL)) \
<< DICT_TF_POS_PAGE_COMPRESSION_LEVEL)
/** Bit mask of the ATOMIC_WRITES field */
#define DICT_TF_MASK_ATOMIC_WRITES \
- ((~(~0 << DICT_TF_WIDTH_ATOMIC_WRITES)) \
+ ((~(~0U << DICT_TF_WIDTH_ATOMIC_WRITES)) \
<< DICT_TF_POS_ATOMIC_WRITES)
/** Bit mask of the PAGE_ENCRYPTION field */
#define DICT_TF_MASK_PAGE_ENCRYPTION \
- ((~(~0 << DICT_TF_WIDTH_PAGE_ENCRYPTION)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_ENCRYPTION)) \
<< DICT_TF_POS_PAGE_ENCRYPTION)
/** Bit mask of the PAGE_ENCRYPTION_KEY field */
#define DICT_TF_MASK_PAGE_ENCRYPTION_KEY \
- ((~(~0 << DICT_TF_WIDTH_PAGE_ENCRYPTION_KEY)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_ENCRYPTION_KEY)) \
<< DICT_TF_POS_PAGE_ENCRYPTION_KEY)
/** Return the value of the COMPACT field */
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index 3709c4a4f24..17ccb113e91 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -48,7 +48,7 @@ Created 12/18/1995 Heikki Tuuri
+ FSP_FLAGS_WIDTH_PAGE_SSIZE)
/** Bit mask of the DATA_DIR field */
#define FSP_FLAGS_MASK_DATA_DIR_ORACLE \
- ((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \
<< FSP_FLAGS_POS_DATA_DIR_ORACLE)
#define FSP_FLAGS_HAS_DATA_DIR_ORACLE(flags) \
diff --git a/storage/innobase/include/fsp0types.h b/storage/innobase/include/fsp0types.h
index 73fd6341d94..5acd7777004 100644
--- a/storage/innobase/include/fsp0types.h
+++ b/storage/innobase/include/fsp0types.h
@@ -348,15 +348,15 @@ is a tablespace with encryption. */
<< FSP_FLAGS_POS_ENCRYPTION)
/** Bit mask of the PAGE_COMPRESSION field */
#define FSP_FLAGS_MASK_PAGE_COMPRESSION \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
<< FSP_FLAGS_POS_PAGE_COMPRESSION)
/** Bit mask of the PAGE_COMPRESSION_LEVEL field */
#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \
<< FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL)
/** Bit mask of the ATOMIC_WRITES field */
#define FSP_FLAGS_MASK_ATOMIC_WRITES \
- ((~(~0 << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \
<< FSP_FLAGS_POS_ATOMIC_WRITES)
/** Return the value of the POST_ANTELOPE field */
diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc
index 9a94eb99cd3..3f5a307f562 100644
--- a/storage/innobase/row/row0sel.cc
+++ b/storage/innobase/row/row0sel.cc
@@ -209,7 +209,7 @@ row_sel_sec_rec_is_for_clust_rec(
const dict_field_t* ifield;
const dict_col_t* col;
ulint clust_pos = 0;
- ulint clust_len;
+ ulint clust_len = 0;
ulint len;
bool is_virtual;
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc
index bd02e97b739..4ba67529a64 100644
--- a/storage/xtradb/handler/ha_innodb.cc
+++ b/storage/xtradb/handler/ha_innodb.cc
@@ -642,7 +642,7 @@ ha_create_table_option innodb_table_option_list[]=
{
/* With this option user can enable page compression feature for the
table */
- HA_TOPTION_BOOL("PAGE_COMPRESSED", page_compressed, compression_default),
+ HA_TOPTION_BOOL("PAGE_COMPRESSED", page_compressed, 0),
/* With this option user can set zip compression level for page
compression for this table*/
HA_TOPTION_NUMBER("PAGE_COMPRESSION_LEVEL", page_compression_level, 0, 1, 9, 1),
diff --git a/storage/xtradb/include/dict0mem.h b/storage/xtradb/include/dict0mem.h
index 24219ac8799..aa5e4795ec9 100644
--- a/storage/xtradb/include/dict0mem.h
+++ b/storage/xtradb/include/dict0mem.h
@@ -215,15 +215,15 @@ DEFAULT=0, ON = 1, OFF = 2
<< DICT_TF_POS_DATA_DIR)
/** Bit mask of the PAGE_COMPRESSION field */
#define DICT_TF_MASK_PAGE_COMPRESSION \
- ((~(~0 << DICT_TF_WIDTH_PAGE_COMPRESSION)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION)) \
<< DICT_TF_POS_PAGE_COMPRESSION)
/** Bit mask of the PAGE_COMPRESSION_LEVEL field */
#define DICT_TF_MASK_PAGE_COMPRESSION_LEVEL \
- ((~(~0 << DICT_TF_WIDTH_PAGE_COMPRESSION_LEVEL)) \
+ ((~(~0U << DICT_TF_WIDTH_PAGE_COMPRESSION_LEVEL)) \
<< DICT_TF_POS_PAGE_COMPRESSION_LEVEL)
/** Bit mask of the ATOMIC_WRITES field */
#define DICT_TF_MASK_ATOMIC_WRITES \
- ((~(~0 << DICT_TF_WIDTH_ATOMIC_WRITES)) \
+ ((~(~0U << DICT_TF_WIDTH_ATOMIC_WRITES)) \
<< DICT_TF_POS_ATOMIC_WRITES)
/** Bit mask of the PAGE_ENCRYPTION field */
#define DICT_TF_MASK_PAGE_ENCRYPTION \
diff --git a/storage/xtradb/include/fsp0fsp.h b/storage/xtradb/include/fsp0fsp.h
index 9212328f724..e515cc39052 100644
--- a/storage/xtradb/include/fsp0fsp.h
+++ b/storage/xtradb/include/fsp0fsp.h
@@ -128,19 +128,19 @@ dictionary */
<< FSP_FLAGS_POS_DATA_DIR)
/** Bit mask of the DATA_DIR field */
#define FSP_FLAGS_MASK_DATA_DIR_ORACLE \
- ((~(~0 << FSP_FLAGS_WIDTH_DATA_DIR)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_DATA_DIR)) \
<< FSP_FLAGS_POS_DATA_DIR_ORACLE)
/** Bit mask of the PAGE_COMPRESSION field */
#define FSP_FLAGS_MASK_PAGE_COMPRESSION \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION)) \
<< FSP_FLAGS_POS_PAGE_COMPRESSION)
/** Bit mask of the PAGE_COMPRESSION_LEVEL field */
#define FSP_FLAGS_MASK_PAGE_COMPRESSION_LEVEL \
- ((~(~0 << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_PAGE_COMPRESSION_LEVEL)) \
<< FSP_FLAGS_POS_PAGE_COMPRESSION_LEVEL)
/** Bit mask of the ATOMIC_WRITES field */
#define FSP_FLAGS_MASK_ATOMIC_WRITES \
- ((~(~0 << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \
+ ((~(~0U << FSP_FLAGS_WIDTH_ATOMIC_WRITES)) \
<< FSP_FLAGS_POS_ATOMIC_WRITES)
/** Return the value of the POST_ANTELOPE field */
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 1c9dfe7324b..2b5a58d4e0d 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -53,17 +53,6 @@ static unsigned long lfactor[9]=
#ifdef HAVE_CHARSET_mb2_or_mb4
-static inline int
-my_bincmp(const uchar *s, const uchar *se,
- const uchar *t, const uchar *te)
-{
- int slen= (int) (se - s), tlen= (int) (te - t);
- int len= MY_MIN(slen, tlen);
- int cmp= memcmp(s, t, len);
- return cmp ? cmp : slen - tlen;
-}
-
-
static size_t
my_caseup_str_mb2_or_mb4(CHARSET_INFO * cs __attribute__((unused)),
char * s __attribute__((unused)))
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index ac262b81eb1..1e02e2c0f22 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -4980,16 +4980,6 @@ static const uchar to_upper_utf8[] = {
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255
};
-static inline int bincmp(const uchar *s, const uchar *se,
- const uchar *t, const uchar *te)
-{
- int slen= (int) (se-s), tlen= (int) (te-t);
- int len=MY_MIN(slen,tlen);
- int cmp= memcmp(s,t,len);
- return cmp ? cmp : slen-tlen;
-}
-
-
static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)
{
@@ -5151,14 +5141,6 @@ my_toupper_utf8mb3(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
}
-static inline void
-my_tosort_utf8mb3(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
-{
- MY_UNICASE_CHARACTER *page;
- if ((page= uni_plane->page[(*wc >> 8) & 0xFF]))
- *wc= page[*wc & 0xFF].sort;
-}
-
static size_t my_caseup_utf8(CHARSET_INFO *cs, char *src, size_t srclen,
char *dst, size_t dstlen)
{
@@ -7392,17 +7374,6 @@ static uchar to_upper_utf8mb4[]=
};
-static inline int
-bincmp_utf8mb4(const uchar *s, const uchar *se,
- const uchar *t, const uchar *te)
-{
- int slen= (int) (se - s), tlen= (int) (te - t);
- int len= MY_MIN(slen, tlen);
- int cmp= memcmp(s, t, len);
- return cmp ? cmp : slen - tlen;
-}
-
-
static int
my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s, const uchar *e)