summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2013-01-28 14:41:54 +0530
committerVenkatesh Duggirala <venkatesh.duggirala@oracle.com>2013-01-28 14:41:54 +0530
commit7e0901b97fa087e4458f32ffd165103f31a1fef8 (patch)
treeab3b1d092c52084deb41573aec616072be7275fb /sql
parent26f662be1c12b6cfddc33a88b33d2986f3d0da0f (diff)
downloadmariadb-git-7e0901b97fa087e4458f32ffd165103f31a1fef8.tar.gz
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
Diffstat (limited to 'sql')
-rw-r--r--sql/item_func.cc4
1 files changed, 2 insertions, 2 deletions
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);
}