Commit abc3889f authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: rename Protocol::store() to Protocol::store_datetime()

to match the naming pattern of all other Protocol::store_xxx() methods
parent 59b51e6a
......@@ -5459,7 +5459,7 @@ bool Field_timestamp0::send(Protocol *protocol)
{
MYSQL_TIME ltime;
Field_timestamp0::get_date(&ltime, date_mode_t(0));
return protocol->store(&ltime, 0);
return protocol->store_datetime(&ltime, 0);
}
......@@ -5619,7 +5619,7 @@ bool Field_timestamp_with_dec::send(Protocol *protocol)
{
MYSQL_TIME ltime;
Field_timestamp::get_date(&ltime, date_mode_t(0));
return protocol->store(&ltime, dec);
return protocol->store_datetime(&ltime, 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(&ltime, date_mode_t(0));
return protocol->store(&ltime, dec);
return protocol->store_datetime(&ltime, dec);
}
......
......@@ -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);
}
......
......@@ -138,7 +138,7 @@ class Protocol
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 @@ class Protocol_text :public Protocol
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 @@ class Protocol_binary final :public Protocol
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 @@ class Protocol_discard final : public Protocol
{
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; }
......
......@@ -9840,7 +9840,7 @@ static bool show_create_trigger_impl(THD *thd, Trigger *trigger)
thd->variables.time_zone->gmt_sec_to_TIME(&timestamp,
(my_time_t)(trigger->create_time/100));
timestamp.second_part= (trigger->create_time % 100) * 10000;
p->store(&timestamp, 2);
p->store_datetime(&timestamp, 2);
}
else
p->store_null();
......
......@@ -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();
}
......
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