From 7e0901b97fa087e4458f32ffd165103f31a1fef8 Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Mon, 28 Jan 2013 14:41:54 +0530 Subject: Bug#16084594 USER_VAR ITEM IN 'LOAD FILE QUERY' WAS NOT PROPERLY QUOTED IN BINLOG FILE Problem: In load data file query, User variables are allowed inside "Into_list" and "Set_list". These user variables used inside these two lists are not properly guarded with backticks while server is writting into binlog. Hence user variable names like a` cannot be used in this context. Fix: Properly quote these variables while writting into binlog mysql-test/r/func_compress.result: changing result file mysql-test/r/variables.result: changing result file mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: changing result file sql/item_func.cc: Quote the user variable items --- sql/item_func.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/item_func.cc b/sql/item_func.cc index 21efaf83aa8..6cf78a38ded 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4725,7 +4725,7 @@ enum Item_result Item_func_get_user_var::result_type() const void Item_func_get_user_var::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("(@")); - str->append(name.str,name.length); + append_identifier(current_thd, str, name.str, name.length); str->append(')'); } @@ -4826,7 +4826,7 @@ my_decimal* Item_user_var_as_out_param::val_decimal(my_decimal *decimal_buffer) void Item_user_var_as_out_param::print(String *str, enum_query_type query_type) { str->append('@'); - str->append(name.str,name.length); + append_identifier(current_thd, str, name.str, name.length); } -- cgit v1.2.1