Commit fc0c652c authored by unknown's avatar unknown
Browse files

BUG#10466 Datatype "timestamp" displays "YYYYMMDDHHMMSS" irrespective of display sizes.

  - Use buffer for printing error message 


sql/sql_parse.cc:
  Use buffer for string
parent d2b52d19
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -5464,9 +5464,9 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
       In other words, for declarations such as TIMESTAMP(2), TIMESTAMP(4),
       and so on, the display width is ignored.
    */
    String str;
    str.append("TIMESTAMP");
    str.append("(");
    char buff[32];
    String str(buff,(uint32) sizeof(buff), system_charset_info);
    str.append("TIMESTAMP(");
    str.append(length);
    str.append(")");
    push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_WARN,