summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
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
commit534b65a4007c9fd98cd9125c79cd1117038c5777 (patch)
treeab3b1d092c52084deb41573aec616072be7275fb /sql/item_func.cc
parent5674d55993144e1d92db45542d4dfcd06c1a3b0f (diff)
downloadmariadb-git-534b65a4007c9fd98cd9125c79cd1117038c5777.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
Diffstat (limited to 'sql/item_func.cc')
-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);
}