diff options
-rw-r--r-- | mysys/stacktrace.c | 11 | ||||
-rw-r--r-- | sql/item_sum.cc | 12 | ||||
-rw-r--r-- | sql/sql_plugin.cc | 6 | ||||
-rw-r--r-- | sql/sql_select.cc | 4 | ||||
-rw-r--r-- | sql/sys_vars.cc | 2 | ||||
-rw-r--r-- | storage/innobase/btr/btr0scrub.cc | 2 | ||||
-rw-r--r-- | storage/sequence/sequence.cc | 6 |
7 files changed, 27 insertions, 16 deletions
diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c index e22fb4162ec..841a52944df 100644 --- a/mysys/stacktrace.c +++ b/mysys/stacktrace.c @@ -483,7 +483,18 @@ void my_write_core(int sig) #else /* __WIN__*/ +#ifdef _MSC_VER +/* Silence warning in OS header dbghelp.h */ +#pragma warning(push) +#pragma warning(disable : 4091) +#endif + #include <dbghelp.h> + +#ifdef _MSC_VER +#pragma warning(pop) +#endif + #include <tlhelp32.h> #include <my_sys.h> #if _MSC_VER diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 3ac861d61ff..cb2d3e839b8 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -2218,10 +2218,10 @@ bool Item_sum_bit::remove_as_window(ulonglong value) if (!bit_counters[i]) { // Don't attempt to remove values that were never added. - DBUG_ASSERT((value & (1 << i)) == 0); + DBUG_ASSERT((value & (1ULL << i)) == 0); continue; } - bit_counters[i]-= (value & (1 << i)) ? 1 : 0; + bit_counters[i]-= (value & (1ULL << i)) ? 1 : 0; } // Prevent overflow; @@ -2235,7 +2235,7 @@ bool Item_sum_bit::add_as_window(ulonglong value) DBUG_ASSERT(as_window_function); for (int i= 0; i < NUM_BIT_COUNTERS; i++) { - bit_counters[i]+= (value & (1 << i)) ? 1 : 0; + bit_counters[i]+= (value & (1ULL << i)) ? 1 : 0; } // Prevent overflow; num_values_added = std::max(num_values_added, num_values_added + 1); @@ -2306,7 +2306,7 @@ void Item_sum_and::set_bits_from_counters() { // We've only added values of 1 for this bit. if (bit_counters[i] == num_values_added) - value|= (1 << i); + value|= (1ULL << i); } bits= value & reset_bits; } @@ -3490,9 +3490,9 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref) result.set_charset(collation.collation); result_field= 0; null_value= 1; - max_length= thd->variables.group_concat_max_len + max_length= (uint32)(thd->variables.group_concat_max_len / collation.collation->mbminlen - * collation.collation->mbmaxlen; + * collation.collation->mbmaxlen); uint32 offset; if (separator->needs_conversion(separator->length(), separator->charset(), diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index aea83f41527..31d59ea47ef 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -3302,14 +3302,14 @@ uchar* sys_var_pluginvar::real_value_ptr(THD *thd, enum_var_type type) { switch (plugin_var->flags & PLUGIN_VAR_TYPEMASK) { case PLUGIN_VAR_BOOL: - thd->sys_var_tmp.my_bool_value= option.def_value; + thd->sys_var_tmp.my_bool_value= (my_bool)option.def_value; return (uchar*) &thd->sys_var_tmp.my_bool_value; case PLUGIN_VAR_INT: - thd->sys_var_tmp.int_value= option.def_value; + thd->sys_var_tmp.int_value= (int)option.def_value; return (uchar*) &thd->sys_var_tmp.int_value; case PLUGIN_VAR_LONG: case PLUGIN_VAR_ENUM: - thd->sys_var_tmp.long_value= option.def_value; + thd->sys_var_tmp.long_value= (long)option.def_value; return (uchar*) &thd->sys_var_tmp.long_value; case PLUGIN_VAR_LONGLONG: case PLUGIN_VAR_SET: diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 802e0d27e88..5633881f53e 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -6017,7 +6017,7 @@ double matching_candidates_in_table(JOIN_TAB *s, bool with_found_constraint, { TABLE *table= s->table; double sel= table->cond_selectivity; - double table_records= table->stat_records(); + double table_records= (double)table->stat_records(); dbl_records= table_records * sel; return dbl_records; } @@ -6043,7 +6043,7 @@ double matching_candidates_in_table(JOIN_TAB *s, bool with_found_constraint, if (s->table->quick_condition_rows != s->found_records) records= s->table->quick_condition_rows; - dbl_records= records; + dbl_records= (double)records; return dbl_records; } diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 9a9e920c6dd..d6b1c76ea00 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -5206,7 +5206,7 @@ int default_regex_flags_pcre(const THD *thd) int i, res; for (i= res= 0; default_regex_flags_to_pcre[i]; i++) { - if (src & (1 << i)) + if (src & (1ULL << i)) res|= default_regex_flags_to_pcre[i]; } return res; diff --git a/storage/innobase/btr/btr0scrub.cc b/storage/innobase/btr/btr0scrub.cc index e2670521cf3..c30227ef085 100644 --- a/storage/innobase/btr/btr0scrub.cc +++ b/storage/innobase/btr/btr0scrub.cc @@ -143,7 +143,7 @@ btr_scrub_lock_dict_func(ulint space, bool lock_to_close_table, "WARNING: %s:%u waited %lu seconds for" " dict_sys lock, space: %lu" " lock_to_close_table: %u\n", - file, line, now - start, space, + file, line, (unsigned long)(now - start), space, lock_to_close_table); last = now; diff --git a/storage/sequence/sequence.cc b/storage/sequence/sequence.cc index 8d9465f08c5..599374c6f8c 100644 --- a/storage/sequence/sequence.cc +++ b/storage/sequence/sequence.cc @@ -95,9 +95,9 @@ public: ha_rows records_in_range(uint inx, key_range *min_key, key_range *max_key); - double scan_time() { return nvalues(); } - double read_time(uint index, uint ranges, ha_rows rows) { return rows; } - double keyread_time(uint index, uint ranges, ha_rows rows) { return rows; } + double scan_time() { return (double)nvalues(); } + double read_time(uint index, uint ranges, ha_rows rows) { return (double)rows; } + double keyread_time(uint index, uint ranges, ha_rows rows) { return (double)rows; } private: void set(uchar *buf); |