summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.h
diff options
context:
space:
mode:
authorgshchepa/uchum@gshchepa.loc <>2007-04-20 15:14:09 +0500
committergshchepa/uchum@gshchepa.loc <>2007-04-20 15:14:09 +0500
commitf5a229b3d1dee09db8c8bd1999c6cc6c066123d5 (patch)
tree6383a76b0ed8fd01a6c60da7807976b0f22d3f6f /sql/item_cmpfunc.h
parentcf18d38c839e4ed7e67183458a04e0893699ff02 (diff)
downloadmariadb-git-f5a229b3d1dee09db8c8bd1999c6cc6c066123d5.tar.gz
Bug#27704: incorrect comparison of rows with NULL components
Support for NULL components was incomplete for row comparison, fixed. Added support for abort_on_null at compare_row() like in 5.x
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r--sql/item_cmpfunc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 132e019b4a3..7dbbdc7a63b 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -206,10 +206,11 @@ class Item_bool_func2 :public Item_int_func
protected:
Arg_comparator cmp;
String tmp_value1,tmp_value2;
+ bool abort_on_null;
public:
Item_bool_func2(Item *a,Item *b)
- :Item_int_func(a,b), cmp(tmp_arg, tmp_arg+1) {}
+ :Item_int_func(a,b), cmp(tmp_arg, tmp_arg+1), abort_on_null(FALSE) {}
void fix_length_and_dec();
void set_cmp_func()
{
@@ -222,6 +223,7 @@ public:
bool is_null() { return test(args[0]->is_null() || args[1]->is_null()); }
bool is_bool_func() { return 1; }
CHARSET_INFO *compare_collation() { return cmp.cmp_collation.collation; }
+ void top_level_item() { abort_on_null= TRUE; }
friend class Arg_comparator;
};