summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-11-22 14:53:25 +0400
committerAlexander Barkov <bar@mariadb.com>2018-11-22 14:53:25 +0400
commit740ce108a52120fe6b2933ce8f3e82d8cf12ae8c (patch)
tree5ffdf0c29f4749c7cfcf67c2899edf3b1bf23820 /sql/sql_show.cc
parent2ebb110c36b2671614af26f34b35ece58a9b9f6a (diff)
downloadmariadb-git-740ce108a52120fe6b2933ce8f3e82d8cf12ae8c.tar.gz
MDEV-17792 New class Timestamp and cleanups in Date, Datetime, Field for rounding
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc14
1 files changed, 5 insertions, 9 deletions
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],