From abc3889f1cf0514615007e44cef6672ed8813ff6 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 28 Sep 2020 10:51:18 +0200 Subject: [PATCH] cleanup: rename Protocol::store() to Protocol::store_datetime() to match the naming pattern of all other Protocol::store_xxx() methods --- sql/field.cc | 8 ++++---- sql/protocol.cc | 6 +++--- sql/protocol.h | 8 ++++---- sql/sql_show.cc | 2 +- sql/sql_type.cc | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sql/field.cc b/sql/field.cc index 561e3f9c985..37d16d33212 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -5459,7 +5459,7 @@ bool Field_timestamp0::send(Protocol *protocol) { MYSQL_TIME ltime; Field_timestamp0::get_date(<ime, date_mode_t(0)); - return protocol->store(<ime, 0); + return protocol->store_datetime(<ime, 0); } @@ -5619,7 +5619,7 @@ bool Field_timestamp_with_dec::send(Protocol *protocol) { MYSQL_TIME ltime; Field_timestamp::get_date(<ime, date_mode_t(0)); - return protocol->store(<ime, dec); + return protocol->store_datetime(<ime, dec); } @@ -6906,7 +6906,7 @@ bool Field_datetime0::send(Protocol *protocol) { MYSQL_TIME tm; Field_datetime0::get_date(&tm, date_mode_t(0)); - return protocol->store(&tm, 0); + return protocol->store_datetime(&tm, 0); } @@ -7034,7 +7034,7 @@ bool Field_datetime_with_dec::send(Protocol *protocol) { MYSQL_TIME ltime; get_date(<ime, date_mode_t(0)); - return protocol->store(<ime, dec); + return protocol->store_datetime(<ime, dec); } diff --git a/sql/protocol.cc b/sql/protocol.cc index 70b526b581f..c0a5f2327a0 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -1589,7 +1589,7 @@ bool Protocol_text::store(Field *field) } -bool Protocol_text::store(MYSQL_TIME *tm, int decimals) +bool Protocol_text::store_datetime(MYSQL_TIME *tm, int decimals) { #ifndef DBUG_OFF DBUG_ASSERT(valid_handler(field_pos, PROTOCOL_SEND_DATETIME)); @@ -1807,7 +1807,7 @@ bool Protocol_binary::store(Field *field) } -bool Protocol_binary::store(MYSQL_TIME *tm, int decimals) +bool Protocol_binary::store_datetime(MYSQL_TIME *tm, int decimals) { char buff[12],*pos; uint length; @@ -1841,7 +1841,7 @@ bool Protocol_binary::store_date(MYSQL_TIME *tm) { tm->hour= tm->minute= tm->second=0; tm->second_part= 0; - return Protocol_binary::store(tm, 0); + return Protocol_binary::store_datetime(tm, 0); } diff --git a/sql/protocol.h b/sql/protocol.h index 1beb1175a11..0a309ee75be 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -138,7 +138,7 @@ public: CHARSET_INFO *fromcs, CHARSET_INFO *tocs)=0; virtual bool store_float(float from, uint32 decimals)=0; virtual bool store_double(double from, uint32 decimals)=0; - virtual bool store(MYSQL_TIME *time, int decimals)=0; + virtual bool store_datetime(MYSQL_TIME *time, int decimals)=0; virtual bool store_date(MYSQL_TIME *time)=0; virtual bool store_time(MYSQL_TIME *time, int decimals)=0; virtual bool store(Field *field)=0; @@ -217,7 +217,7 @@ public: bool store_decimal(const my_decimal *) override; bool store_str(const char *from, size_t length, CHARSET_INFO *fromcs, CHARSET_INFO *tocs) override; - bool store(MYSQL_TIME *time, int decimals) override; + bool store_datetime(MYSQL_TIME *time, int decimals) override; bool store_date(MYSQL_TIME *time) override; bool store_time(MYSQL_TIME *time, int decimals) override; bool store_float(float nr, uint32 decimals) override; @@ -265,7 +265,7 @@ public: bool store_decimal(const my_decimal *) override; bool store_str(const char *from, size_t length, CHARSET_INFO *fromcs, CHARSET_INFO *tocs) override; - bool store(MYSQL_TIME *time, int decimals) override; + bool store_datetime(MYSQL_TIME *time, int decimals) override; bool store_date(MYSQL_TIME *time) override; bool store_time(MYSQL_TIME *time, int decimals) override; bool store_float(float nr, uint32 decimals) override; @@ -316,7 +316,7 @@ public: { return false; } - bool store(MYSQL_TIME *, int) override { return false; } + bool store_datetime(MYSQL_TIME *, int) override { return false; } bool store_date(MYSQL_TIME *) override { return false; } bool store_time(MYSQL_TIME *, int) override { return false; } bool store_float(float, uint32) override { return false; } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 53c5f6d741d..e2ffc3c5da9 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -9840,7 +9840,7 @@ static bool show_create_trigger_impl(THD *thd, Trigger *trigger) thd->variables.time_zone->gmt_sec_to_TIME(×tamp, (my_time_t)(trigger->create_time/100)); timestamp.second_part= (trigger->create_time % 100) * 10000; - p->store(×tamp, 2); + p->store_datetime(×tamp, 2); } else p->store_null(); diff --git a/sql/sql_type.cc b/sql/sql_type.cc index 0700dcea9d4..36f9c278702 100644 --- a/sql/sql_type.cc +++ b/sql/sql_type.cc @@ -7522,7 +7522,7 @@ bool Type_handler::Item_send_timestamp(Item *item, if (native.is_null()) return protocol->store_null(); native.to_TIME(protocol->thd, &buf->value.m_time); - return protocol->store(&buf->value.m_time, item->decimals); + return protocol->store_datetime(&buf->value.m_time, item->decimals); } @@ -7532,7 +7532,7 @@ bool Type_handler:: item->get_date(protocol->thd, &buf->value.m_time, Datetime::Options(protocol->thd)); if (!item->null_value) - return protocol->store(&buf->value.m_time, item->decimals); + return protocol->store_datetime(&buf->value.m_time, item->decimals); return protocol->store_null(); }