diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-03-18 14:20:06 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-03-18 14:20:06 +0400 |
commit | 7d0c354f5c354b45f9d9dadf2ff5ea02ba0b1071 (patch) | |
tree | f78a9c086879b1c4b068d2fb2fd99863beb51141 /sql/item_sum.cc | |
parent | b13ce223a886a0d3a28b243d5fee39ec608d5192 (diff) | |
parent | 6c5cfbbf3399887baff489f089641385c112c9a0 (diff) | |
download | mariadb-git-7d0c354f5c354b45f9d9dadf2ff5ea02ba0b1071.tar.gz |
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r-- | sql/item_sum.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index bef95d6e21b..2059d1ac613 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -2201,10 +2201,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; @@ -2218,7 +2218,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); @@ -2289,7 +2289,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; } @@ -3102,7 +3102,7 @@ int dump_leaf_key(void* key_arg, element_count count __attribute__((unused)), { Item_func_group_concat *item= (Item_func_group_concat *) item_arg; TABLE *table= item->table; - uint max_length= table->in_use->variables.group_concat_max_len; + uint max_length= (uint)table->in_use->variables.group_concat_max_len; String tmp((char *)table->record[1], table->s->reclength, default_charset_info); String tmp2; @@ -3473,9 +3473,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(), |