summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index fe4616f64d7..b2ed2df0f45 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1583,6 +1583,13 @@ int Arg_comparator::compare_row()
bool was_null= 0;
(*a)->bring_value();
(*b)->bring_value();
+
+ if ((*a)->null_value || (*b)->null_value)
+ {
+ owner->null_value= 1;
+ return -1;
+ }
+
uint n= (*a)->cols();
for (uint i= 0; i<n; i++)
{