Skip to content

Commit

Permalink
MDEV-22640 fixup: clang -Winconsistent-missing-override
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Jun 29, 2021
1 parent 98c7916 commit 3d15e3c
Showing 1 changed file with 29 additions and 31 deletions.
60 changes: 29 additions & 31 deletions sql/item_jsonfunc.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef ITEM_JSONFUNC_INCLUDED
#define ITEM_JSONFUNC_INCLUDED

/* Copyright (c) 2016, MariaDB
/* Copyright (c) 2016, 2021, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -123,8 +123,8 @@ class Item_json_func: public Item_str_func
:Item_str_func(thd, a, b) { }
Item_json_func(THD *thd, List<Item> &list)
:Item_str_func(thd, list) { }
bool is_json_type() { return true; }
void make_send_field(THD *thd, Send_field *tmp_field)
bool is_json_type() override { return true; }
void make_send_field(THD *thd, Send_field *tmp_field) override
{
Item_str_func::make_send_field(thd, tmp_field);
static const Lex_cstring fmt(STRING_WITH_LEN("json"));
Expand Down Expand Up @@ -544,12 +544,12 @@ class Item_func_json_arrayagg : public Item_func_group_concat
Overrides Item_func_group_concat::skip_nulls()
NULL-s should be added to the result as JSON null value.
*/
bool skip_nulls() const { return false; }
String *get_str_from_item(Item *i, String *tmp);
bool skip_nulls() const override { return false; }
String *get_str_from_item(Item *i, String *tmp) override;
String *get_str_from_field(Item *i, Field *f, String *tmp,
const uchar *key, size_t offset);
const uchar *key, size_t offset) override;
void cut_max_length(String *result,
uint old_length, uint max_length) const;
uint old_length, uint max_length) const override;
public:
String m_tmp_json; /* Used in get_str_from_*.. */
Item_func_json_arrayagg(THD *thd, Name_resolution_context *context_arg,
Expand All @@ -562,10 +562,10 @@ class Item_func_json_arrayagg : public Item_func_group_concat
}
Item_func_json_arrayagg(THD *thd, Item_func_json_arrayagg *item) :
Item_func_group_concat(thd, item) {}
bool is_json_type() { return true; }
bool is_json_type() override { return true; }

const char *func_name() const { return "json_arrayagg("; }
enum Sumfunctype sum_func() const {return JSON_ARRAYAGG_FUNC;}
const char *func_name() const override { return "json_arrayagg("; }
enum Sumfunctype sum_func() const override { return JSON_ARRAYAGG_FUNC; }

String* val_str(String *str) override;

Expand All @@ -587,40 +587,38 @@ class Item_func_json_objectagg : public Item_sum
}

Item_func_json_objectagg(THD *thd, Item_func_json_objectagg *item);
bool is_json_type() { return true; }
void cleanup();
bool is_json_type() override { return true; }
void cleanup() override;

enum Sumfunctype sum_func () const {return JSON_OBJECTAGG_FUNC;}
const char *func_name() const { return "json_objectagg"; }
const Type_handler *type_handler() const
enum Sumfunctype sum_func() const override {return JSON_OBJECTAGG_FUNC;}
const char *func_name() const override { return "json_objectagg"; }
const Type_handler *type_handler() const override
{
if (too_big_for_varchar())
return &type_handler_blob;
return &type_handler_varchar;
}
void clear();
bool add();
void reset_field() { DBUG_ASSERT(0); } // not used
void update_field() { DBUG_ASSERT(0); } // not used
bool fix_fields(THD *,Item **);

double val_real()
{ return 0.0; }
longlong val_int()
{ return 0; }
my_decimal *val_decimal(my_decimal *decimal_value)
void clear() override;
bool add() override;
void reset_field() override { DBUG_ASSERT(0); } // not used
void update_field() override { DBUG_ASSERT(0); } // not used
bool fix_fields(THD *,Item **) override;

double val_real() override { return 0.0; }
longlong val_int() override { return 0; }
my_decimal *val_decimal(my_decimal *decimal_value) override
{
my_decimal_set_zero(decimal_value);
return decimal_value;
}
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override
{
return get_date_from_string(thd, ltime, fuzzydate);
}
String* val_str(String* str);
Item *copy_or_same(THD* thd);
void no_rows_in_result() {}
Item *get_copy(THD *thd)
String* val_str(String* str) override;
Item *copy_or_same(THD* thd) override;
void no_rows_in_result() override {}
Item *get_copy(THD *thd) override
{ return get_item_copy<Item_func_json_objectagg>(thd, this); }
};

Expand Down

0 comments on commit 3d15e3c

Please sign in to comment.