From a2393ff22e2ffc12f23fcd224e8dd07fba65c1d9 Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 7 Jan 2018 23:53:42 +0200 Subject: [PATCH] Fixed wrong arguments to printf --- sql/log_event.cc | 3 ++- sql/sql_yacc.yy | 6 +++--- sql/sql_yacc_ora.yy | 2 +- sql/table.cc | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index edfe0197f30..04db8cf9431 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -13500,7 +13500,8 @@ void issue_long_find_row_warning(Log_event_type type, "of time (%lld seconds). This is due to the fact that it is %s " "while looking up records to be processed. Consider adding a " "primary key (or unique key) to the table to improve " - "performance.", evt_type, table_name, delta, scan_type); + "performance.", + evt_type, table_name, (long) delta, scan_type); } } } diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index bd2e9019241..00de8eb0655 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2740,7 +2740,7 @@ sf_tail_not_aggregate: { if (Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR) { - my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0), "")); + my_yyabort_error((ER_NOT_AGGREGATE_FUNCTION, MYF(0))); } Lex->sphead->set_chistics_agg_type(NOT_AGGREGATE); } @@ -2750,7 +2750,7 @@ sf_tail_aggregate: { if (!(Lex->sphead->m_flags & sp_head::HAS_AGGREGATE_INSTR)) { - my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0), "")); + my_yyabort_error((ER_INVALID_AGGREGATE_FUNCTION, MYF(0))); } Lex->sphead->set_chistics_agg_type(GROUP_AGGREGATE); } @@ -14101,7 +14101,7 @@ opt_format_json: else if (!my_strcasecmp(system_charset_info, $3.str, "TRADITIONAL")) DBUG_ASSERT(Lex->explain_json==false); else - my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), "JSON", + my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), "EXPLAIN", $3.str)); } ; diff --git a/sql/sql_yacc_ora.yy b/sql/sql_yacc_ora.yy index a9593937464..6b019a8c889 100644 --- a/sql/sql_yacc_ora.yy +++ b/sql/sql_yacc_ora.yy @@ -13555,7 +13555,7 @@ opt_format_json: else if (!my_strcasecmp(system_charset_info, $3.str, "TRADITIONAL")) DBUG_ASSERT(Lex->explain_json==false); else - my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), "JSON", + my_yyabort_error((ER_UNKNOWN_EXPLAIN_FORMAT, MYF(0), "EXPLAIN", $3.str)); } ; diff --git a/sql/table.cc b/sql/table.cc index 6b29ea73d17..9c4a774ddf8 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1850,7 +1850,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write, char tmp[10]; if (!csname || csname[0] =='?') { - my_snprintf(tmp, sizeof(tmp), "#%d", cs_new); + my_snprintf(tmp, sizeof(tmp), "#%u", cs_new); csname= tmp; } my_printf_error(ER_UNKNOWN_COLLATION,