Commit 18cb4f0d authored by unknown's avatar unknown

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 a24d614a
......@@ -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,
......
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