summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorunknown <igor@olga.mysql.com>2006-07-06 11:11:49 -0700
committerunknown <igor@olga.mysql.com>2006-07-06 11:11:49 -0700
commitcf7627bce09928d66129280b7903f6ab42fe2983 (patch)
tree5577fc29c2080a5650acd6e76b3af7d33d569576 /sql/item_strfunc.h
parent52a1639b0eb669363cfa311b5ce24aa83076a426 (diff)
downloadmariadb-git-cf7627bce09928d66129280b7903f6ab42fe2983.tar.gz
Fixed bug #18243.
The implementation of the method Item_func_reverse::val_str for the REVERSE function modified the argument of the function. This led to wrong results for expressions that contained REVERSE(ref) if ref occurred somewhere else in the expressions. mysql-test/r/func_str.result: Added a test case for bug #18243. mysql-test/t/func_str.test: Added a test case for bug #18243. sql/item_strfunc.cc: Fixed bug #18243. The implementation of the method Item_func_reverse::val_str for the REVERSE function modified the argument of the function. This led to wrong results for expressions that contained REVERSE(ref) if ref occurred somewhere else in the expressions. The implementation of Item_func_reverse::val_str has been changed to make the argument intact. sql/item_strfunc.h: Fixed bug #18243. Added tmp_value to the Item_func_reverse class to store the result of the function. It erroneously replaced the argument before this fix.
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index 89bab4a909c..f800c17182b 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -100,6 +100,7 @@ public:
class Item_func_reverse :public Item_str_func
{
+ String tmp_value;
public:
Item_func_reverse(Item *a) :Item_str_func(a) {}
String *val_str(String *);