Commit eddbae42 authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

MDEV-11712: ArmHF EXPLAIN JSON garbage longlong values printed

Make sure printing with snprintf uses the correct typed parameters.
parent 7b44c31b
...@@ -10600,7 +10600,7 @@ Create_field::Create_field(THD *thd, Field *old_field, Field *orig_field) ...@@ -10600,7 +10600,7 @@ Create_field::Create_field(THD *thd, Field *old_field, Field *orig_field)
if (length != 4) if (length != 4)
{ {
char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1]; char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1];
my_snprintf(buff, sizeof(buff), "YEAR(%lu)", length); my_snprintf(buff, sizeof(buff), "YEAR(%llu)", length);
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE, push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
ER_WARN_DEPRECATED_SYNTAX, ER_WARN_DEPRECATED_SYNTAX,
ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX), ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),
......
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