summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysqldump.c2
-rw-r--r--dbug/dbug.c3
-rw-r--r--plugin/semisync/semisync_master.cc3
-rw-r--r--sql/opt_range.cc3
-rw-r--r--sql/sql_table.cc9
-rw-r--r--storage/innobase/handler/ha_innodb.cc2
-rw-r--r--storage/maria/ma_delete.c2
-rw-r--r--storage/maria/ma_write.c2
8 files changed, 14 insertions, 12 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 3adbc897c50..32ac3a1ac59 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -4784,7 +4784,7 @@ static int add_slave_statements(void)
static int do_show_slave_status(MYSQL *mysql_con)
{
- MYSQL_RES *slave;
+ MYSQL_RES *slave= 0;
const char *comment_prefix=
(opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : "";
if (mysql_query_with_error_report(mysql_con, &slave, "SHOW SLAVE STATUS"))
diff --git a/dbug/dbug.c b/dbug/dbug.c
index af0a937ff07..b285b32fa17 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -284,9 +284,6 @@ static int DoTrace(CODE_STATE *cs);
/* Test to see if file is writable */
#if defined(HAVE_ACCESS)
static BOOLEAN Writable(const char *pathname);
- /* Change file owner and group */
-static void ChangeOwner(CODE_STATE *cs, char *pathname);
- /* Allocate memory for runtime support */
#endif
static void DoPrefix(CODE_STATE *cs, uint line);
diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc
index 8573c4dcbde..d1b982468d2 100644
--- a/plugin/semisync/semisync_master.cc
+++ b/plugin/semisync/semisync_master.cc
@@ -1049,10 +1049,11 @@ int ReplSemiSyncMaster::readSlaveReply(NET *net, uint32 server_id,
ulong log_file_len = 0;
ulong packet_len;
int result = -1;
-
struct timespec start_ts;
ulong trc_level = trace_level_;
+ LINT_INIT_STRUCT(start_ts);
+
function_enter(kWho);
assert((unsigned char)event_buf[1] == kPacketMagicNum);
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index da328063e56..add46d148cf 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -2001,7 +2001,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
{
handler *save_file= file, *org_file;
my_bool org_key_read;
- THD *thd;
+ THD *thd= head->in_use;
DBUG_ENTER("QUICK_RANGE_SELECT::init_ror_merged_scan");
in_ror_merged_scan= 1;
@@ -2023,7 +2023,6 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
DBUG_RETURN(0);
}
- thd= head->in_use;
if (!(file= head->file->clone(head->s->normalized_path.str, thd->mem_root)))
{
/*
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index eb4ded0c502..77735853c68 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1960,8 +1960,9 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists,
static uint32 comment_length(THD *thd, uint32 comment_pos,
const char **comment_start)
{
- const char *query= thd->query();
- const char *query_end= query + thd->query_length();
+ /* We use uchar * here to make array indexing portable */
+ const uchar *query= (uchar*) thd->query();
+ const uchar *query_end= (uchar*) query + thd->query_length();
const uchar *const state_map= thd->charset()->state_map;
for (; query < query_end; query++)
@@ -1975,12 +1976,12 @@ static uint32 comment_length(THD *thd, uint32 comment_pos,
state_map[*query] != MY_LEX_LONG_COMMENT || query[1] != '*')
return 0;
- *comment_start= query;
+ *comment_start= (char*) query;
for (query+= 3; query < query_end; query++)
{
if (query[-1] == '*' && query[0] == '/')
- return query - *comment_start + 1;
+ return (char*) query - *comment_start + 1;
}
return 0;
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 32295c5314f..0ef6f0209f7 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -11703,7 +11703,7 @@ static MYSQL_SYSVAR_ULONG(read_ahead_threshold, srv_read_ahead_threshold,
"trigger a readahead.",
NULL, NULL, 56, 0, 64, 0);
-#ifdef UNIV_DEBUG
+#ifdef UNIV_DEBUG_never
static MYSQL_SYSVAR_UINT(trx_rseg_n_slots_debug, trx_rseg_n_slots_debug,
PLUGIN_VAR_RQCMDARG,
"Debug flags for InnoDB to limit TRX_RSEG_N_SLOTS for trx_rsegf_undo_find_free()",
diff --git a/storage/maria/ma_delete.c b/storage/maria/ma_delete.c
index 069d73b553c..5b8d0e01677 100644
--- a/storage/maria/ma_delete.c
+++ b/storage/maria/ma_delete.c
@@ -163,6 +163,8 @@ my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key)
MARIA_KEY org_key;
DBUG_ENTER("_ma_ck_delete");
+ LINT_INIT_STRUCT(org_key);
+
save_key_data= key->data;
if (share->now_transactional)
{
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c
index 74c1a106df2..f1649083105 100644
--- a/storage/maria/ma_write.c
+++ b/storage/maria/ma_write.c
@@ -478,6 +478,8 @@ static my_bool _ma_ck_write_btree_with_log(MARIA_HA *info, MARIA_KEY *key,
my_bool transactional= share->now_transactional;
DBUG_ENTER("_ma_ck_write_btree_with_log");
+ LINT_INIT_STRUCT(org_key);
+
if (transactional)
{
/* Save original value as the key may change */