Commit 5be43628 authored by unknown's avatar unknown

Fix Windows compile warnings, declarations of walk functions


sql/item_func.cc:
  Remove unused variable
sql/handler.cc:
  Fix warnings
sql/item_sum.cc:
  Restore C_MODE_START/END around count_distinct_walk
  Change second argument to dump_leaf_key to correct type
sql/item_sum.h:
  Change second argument to dump_leaf_key to correct type
parent 0b93a4f1
......@@ -836,9 +836,9 @@ int ha_recover(HASH *commit_list)
/* commit_list and tc_heuristic_recover cannot be set both */
DBUG_ASSERT(commit_list==0 || tc_heuristic_recover==0);
/* if either is set, total_ha_2pc must be set too */
DBUG_ASSERT(dry_run || total_ha_2pc>opt_bin_log);
DBUG_ASSERT(dry_run || total_ha_2pc>(ulong)opt_bin_log);
if (total_ha_2pc <= opt_bin_log)
if (total_ha_2pc <= (ulong)opt_bin_log)
DBUG_RETURN(0);
if (commit_list)
......
......@@ -4683,7 +4683,6 @@ Field *
Item_func_sp::tmp_table_field(TABLE *t_arg)
{
Field *res= 0;
enum_field_types ftype;
DBUG_ENTER("Item_func_sp::tmp_table_field");
if (m_sp)
......
......@@ -2158,12 +2158,16 @@ int composite_key_cmp(void* arg, byte* key1, byte* key2)
}
C_MODE_START
static int count_distinct_walk(void *elem, element_count count, void *arg)
{
(*((ulonglong*)arg))++;
return 0;
}
C_MODE_END
void Item_sum_count_distinct::cleanup()
{
......@@ -2658,7 +2662,7 @@ int group_concat_key_cmp_with_distinct_and_order(void* arg,byte* key1,
Append data from current leaf to item->result
*/
int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
int dump_leaf_key(byte* key, element_count count __attribute__((unused)),
Item_func_group_concat *item)
{
char buff[MAX_FIELD_WIDTH];
......
......@@ -851,7 +851,8 @@ class Item_func_group_concat : public Item_sum
friend int group_concat_key_cmp_with_distinct_and_order(void* arg,
byte* key1,
byte* key2);
friend int dump_leaf_key(byte* key, uint32 count __attribute__((unused)),
friend int dump_leaf_key(byte* key,
element_count count __attribute__((unused)),
Item_func_group_concat *group_concat_item);
public:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment