MDEV-11712: ArmHF EXPLAIN JSON garbage longlong values printed

Make sure printing with snprintf uses the correct typed parameters.
This commit is contained in:
Vicențiu Ciorbaru 2017-01-16 12:49:22 +02:00
parent 7b44c31be8
commit eddbae422b

View file

@ -10600,7 +10600,7 @@ Create_field::Create_field(THD *thd, Field *old_field, Field *orig_field)
if (length != 4)
{
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,
ER_WARN_DEPRECATED_SYNTAX,
ER_THD(thd, ER_WARN_DEPRECATED_SYNTAX),