From 740ce108a52120fe6b2933ce8f3e82d8cf12ae8c Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Thu, 22 Nov 2018 14:53:25 +0400 Subject: MDEV-17792 New class Timestamp and cleanups in Date, Datetime, Field for rounding --- sql/sql_show.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sql/sql_show.cc') diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 0ba06ab161a..a62603dbf1c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -6332,7 +6332,6 @@ bool store_schema_params(THD *thd, TABLE *table, TABLE *proc_table, bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table, const char *wild, bool full_access, const char *sp_user) { - MYSQL_TIME time; LEX *lex= thd->lex; CHARSET_INFO *cs= system_charset_info; const Sp_handler *sph; @@ -6420,14 +6419,11 @@ bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table, copy_field_as_string(table->field[22], proc_table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]); - bzero((char *)&time, sizeof(time)); - ((Field_timestamp *) proc_table->field[MYSQL_PROC_FIELD_CREATED])-> - get_time(&time); - table->field[23]->store_time(&time); - bzero((char *)&time, sizeof(time)); - ((Field_timestamp *) proc_table->field[MYSQL_PROC_FIELD_MODIFIED])-> - get_time(&time); - table->field[24]->store_time(&time); + proc_table->field[MYSQL_PROC_FIELD_CREATED]-> + save_in_field(table->field[23]); + proc_table->field[MYSQL_PROC_FIELD_MODIFIED]-> + save_in_field(table->field[24]); + copy_field_as_string(table->field[25], proc_table->field[MYSQL_PROC_FIELD_SQL_MODE]); copy_field_as_string(table->field[26], -- cgit v1.2.1