summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/build_depends.cmake6
-rw-r--r--sql/opt_subselect.h15
-rw-r--r--sql/sql_explain.cc1
-rw-r--r--sql/sql_select.h2
-rw-r--r--sql/sql_statistics.cc7
-rw-r--r--sql/sql_table.cc3
-rw-r--r--sql/wsrep_thd.cc1
-rw-r--r--storage/innobase/fil/fil0crypt.cc2
-rw-r--r--storage/innobase/row/row0mysql.cc4
-rw-r--r--storage/maria/ma_ft_nlq_search.c2
-rw-r--r--storage/myisam/ft_nlq_search.c2
11 files changed, 25 insertions, 20 deletions
diff --git a/cmake/build_depends.cmake b/cmake/build_depends.cmake
index 333df580200..5adaee33740 100644
--- a/cmake/build_depends.cmake
+++ b/cmake/build_depends.cmake
@@ -39,6 +39,8 @@ IF(RPM)
SET(BUILD_DEPS ${BUILD_DEPS} ${${V}_DEP})
ENDIF()
ENDFOREACH()
- LIST(REMOVE_DUPLICATES BUILD_DEPS)
- STRING(REPLACE ";" " " CPACK_RPM_BUILDREQUIRES "${BUILD_DEPS}")
+ IF (BUILD_DEPS)
+ LIST(REMOVE_DUPLICATES BUILD_DEPS)
+ STRING(REPLACE ";" " " CPACK_RPM_BUILDREQUIRES "${BUILD_DEPS}")
+ ENDIF()
ENDIF(RPM)
diff --git a/sql/opt_subselect.h b/sql/opt_subselect.h
index 94ae9a35246..2b9031b1b81 100644
--- a/sql/opt_subselect.h
+++ b/sql/opt_subselect.h
@@ -93,15 +93,14 @@ public:
Loose_scan_opt():
try_loosescan(FALSE),
bound_sj_equalities(0),
- quick_uses_applicable_index(FALSE)
+ quick_uses_applicable_index(0),
+ quick_max_loose_keypart(0),
+ best_loose_scan_key(0),
+ best_loose_scan_cost(0),
+ best_loose_scan_records(0),
+ best_loose_scan_start_key(NULL),
+ best_max_loose_keypart(0)
{
- /* Protected by quick_uses_applicable_index */
- LINT_INIT(quick_max_loose_keypart);
- /* The following are protected by best_loose_scan_cost!= DBL_MAX */
- LINT_INIT(best_loose_scan_key);
- LINT_INIT(best_loose_scan_records);
- LINT_INIT(best_max_loose_keypart);
- LINT_INIT(best_loose_scan_start_key);
}
void init(JOIN *join, JOIN_TAB *s, table_map remaining_tables)
diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc
index ca538752627..8ded81788a2 100644
--- a/sql/sql_explain.cc
+++ b/sql/sql_explain.cc
@@ -444,6 +444,7 @@ uint Explain_union::make_union_table_name(char *buf)
break;
default:
DBUG_ASSERT(0);
+ type= {NULL, 0};
}
memcpy(buf, type.str, (len= (uint)type.length));
diff --git a/sql/sql_select.h b/sql/sql_select.h
index dd823a7d7df..efb0c474c89 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -866,7 +866,7 @@ public:
void set_empty()
{
sjm_scan_need_tables= 0;
- LINT_INIT_STRUCT(sjm_scan_last_inner);
+ sjm_scan_last_inner= 0;
is_used= FALSE;
}
void set_from_prev(struct st_position *prev);
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 5b8c1b63b6f..9242e3b423a 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -1808,16 +1808,13 @@ public:
bool is_partial_fields_present;
Index_prefix_calc(THD *thd, TABLE *table, KEY *key_info)
- : index_table(table), index_info(key_info)
+ : index_table(table), index_info(key_info), prefixes(0), empty(true),
+ calc_state(NULL), is_single_comp_pk(false), is_partial_fields_present(false)
{
uint i;
Prefix_calc_state *state;
uint key_parts= table->actual_n_key_parts(key_info);
- empty= TRUE;
- prefixes= 0;
- LINT_INIT_STRUCT(calc_state);
- is_partial_fields_present= is_single_comp_pk= FALSE;
uint pk= table->s->primary_key;
if ((uint) (table->key_info - key_info) == pk &&
table->key_info[pk].user_defined_key_parts == 1)
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 1543a445d7b..55e84cbfeb5 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -10863,10 +10863,9 @@ bool Sql_cmd_create_table_like::execute(THD *thd)
{
DBUG_ENTER("Sql_cmd_create_table::execute");
LEX *lex= thd->lex;
- TABLE_LIST *all_tables= lex->query_tables;
SELECT_LEX *select_lex= &lex->select_lex;
TABLE_LIST *first_table= select_lex->table_list.first;
- DBUG_ASSERT(first_table == all_tables && first_table != 0);
+ DBUG_ASSERT(first_table == lex->query_tables && first_table != 0);
bool link_to_local;
TABLE_LIST *create_table= first_table;
TABLE_LIST *select_tables= lex->create_last_non_select_table->next_global;
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc
index a45828beab3..32fecda1eaa 100644
--- a/sql/wsrep_thd.cc
+++ b/sql/wsrep_thd.cc
@@ -432,6 +432,7 @@ static bool create_wsrep_THD(wsrep_thread_args* args)
break;
default:
assert(0);
+ key= 0;
break;
}
#endif
diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc
index 5df38391e3d..35b70501002 100644
--- a/storage/innobase/fil/fil0crypt.cc
+++ b/storage/innobase/fil/fil0crypt.cc
@@ -2268,9 +2268,11 @@ static void fil_crypt_rotation_list_fill()
/* Protect the tablespace while we may
release fil_system.mutex. */
space->n_pending_ops++;
+#ifndef DBUG_OFF
fil_space_t* s= fil_system.read_page0(
space->id);
ut_ad(!s || s == space);
+#endif
space->n_pending_ops--;
if (!space->size) {
/* Page 0 was not loaded.
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index aed2f87349d..43808f157d5 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -1418,11 +1418,13 @@ row_insert_for_mysql(
&blob_heap);
if (ins_mode != ROW_INS_NORMAL) {
+#ifndef DBUG_OFF
ut_ad(table->vers_start != table->vers_end);
const mysql_row_templ_t* t
= prebuilt->get_template_by_col(table->vers_end);
ut_ad(t);
ut_ad(t->mysql_col_len == 8);
+#endif
if (ins_mode == ROW_INS_HISTORICAL) {
set_tuple_col_8(node->row, table->vers_end, trx->id,
@@ -1430,9 +1432,11 @@ row_insert_for_mysql(
} else /* ROW_INS_VERSIONED */ {
set_tuple_col_8(node->row, table->vers_end, TRX_ID_MAX,
node->vers_end_buf);
+#ifndef DBUG_OFF
t = prebuilt->get_template_by_col(table->vers_start);
ut_ad(t);
ut_ad(t->mysql_col_len == 8);
+#endif
set_tuple_col_8(node->row, table->vers_start, trx->id,
node->vers_start_buf);
}
diff --git a/storage/maria/ma_ft_nlq_search.c b/storage/maria/ma_ft_nlq_search.c
index 7becf1d7136..f7aa3afec9a 100644
--- a/storage/maria/ma_ft_nlq_search.c
+++ b/storage/maria/ma_ft_nlq_search.c
@@ -79,13 +79,13 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
MARIA_KEY key;
float tmp_weight;
DBUG_ENTER("walk_and_match");
- LINT_INIT_STRUCT(subkeys);
word->weight=LWS_FOR_QUERY;
_ma_ft_make_key(info, &key, aio->keynr, keybuff, word, 0);
key.data_length-= HA_FT_WLEN;
doc_cnt=0;
+ subkeys.i= 0;
if (share->lock_key_trees)
mysql_rwlock_rdlock(&share->keyinfo[aio->keynr].root_lock);
diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c
index 6c36c327d81..3e433b71761 100644
--- a/storage/myisam/ft_nlq_search.c
+++ b/storage/myisam/ft_nlq_search.c
@@ -77,13 +77,13 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
uint extra= HA_FT_WLEN + info->s->rec_reflength;
float tmp_weight;
DBUG_ENTER("walk_and_match");
- LINT_INIT_STRUCT(subkeys);
word->weight=LWS_FOR_QUERY;
keylen=_ft_make_key(info,aio->keynr,keybuff,word,0);
keylen-=HA_FT_WLEN;
doc_cnt=0;
+ subkeys.i= 0;
if (share->concurrent_insert)
mysql_rwlock_rdlock(&share->key_root_lock[aio->keynr]);