summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql')
-rw-r--r--sql/rpl_gtid.cc2
-rw-r--r--sql/sql_parse.cc4
-rw-r--r--sql/sql_truncate.cc4
-rw-r--r--sql/sql_yacc.yy4
4 files changed, 8 insertions, 6 deletions
diff --git a/sql/rpl_gtid.cc b/sql/rpl_gtid.cc
index a8f7641fce4..86de093b72a 100644
--- a/sql/rpl_gtid.cc
+++ b/sql/rpl_gtid.cc
@@ -1859,7 +1859,7 @@ rpl_binlog_state::drop_domain(DYNAMIC_ARRAY *ids,
push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
ER_BINLOG_CANT_DELETE_GTID_DOMAIN,
"The gtid domain being deleted ('%lu') is not in "
- "the current binlog state", *ptr_domain_id);
+ "the current binlog state", (unsigned long) *ptr_domain_id);
continue;
}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index f782c5c25e7..3e1f248b082 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7226,10 +7226,10 @@ bool check_stack_overrun(THD *thd, long margin,
#define MY_YACC_INIT 1000 // Start with big alloc
#define MY_YACC_MAX 32000 // Because of 'short'
-bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize)
+bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, size_t *yystacksize)
{
Yacc_state *state= & current_thd->m_parser_state->m_yacc;
- ulong old_info=0;
+ size_t old_info=0;
DBUG_ASSERT(state);
if ((uint) *yystacksize >= MY_YACC_MAX)
return 1;
diff --git a/sql/sql_truncate.cc b/sql/sql_truncate.cc
index 7d1f630b88c..e5165c5a855 100644
--- a/sql/sql_truncate.cc
+++ b/sql/sql_truncate.cc
@@ -426,8 +426,10 @@ bool Sql_cmd_truncate_table::truncate_table(THD *thd, TABLE_LIST *table_ref)
error= dd_recreate_table(thd, table_ref->db, table_ref->table_name);
if (thd->locked_tables_mode && thd->locked_tables_list.reopen_tables(thd, false))
+ {
thd->locked_tables_list.unlink_all_closed_tables(thd, NULL, 0);
-
+ error= 1;
+ }
/* No need to binlog a failed truncate-by-recreate. */
binlog_stmt= !error;
}
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index ec82c7f9f07..c9dbc6fa8cc 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -76,7 +76,7 @@ int yylex(void *yylval, void *yythd);
#define yyoverflow(A,B,C,D,E,F) \
{ \
- ulong val= *(F); \
+ size_t val= *(F); \
if (my_yyoverflow((B), (D), &val)) \
{ \
yyerror(thd, (char*) (A)); \
@@ -1024,7 +1024,7 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr)
}
%{
-bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
+bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize);
%}
%pure-parser /* We have threads */