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

  - Use buffer for printing error message 
parent 6282d89b
...@@ -5464,9 +5464,9 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, ...@@ -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), In other words, for declarations such as TIMESTAMP(2), TIMESTAMP(4),
and so on, the display width is ignored. and so on, the display width is ignored.
*/ */
String str; char buff[32];
str.append("TIMESTAMP"); String str(buff,(uint32) sizeof(buff), system_charset_info);
str.append("("); str.append("TIMESTAMP(");
str.append(length); str.append(length);
str.append(")"); str.append(")");
push_warning_printf(thd,MYSQL_ERROR::WARN_LEVEL_WARN, 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