diff options
author | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-09-09 16:48:06 +0400 |
---|---|---|
committer | Alexey Kopytov <Alexey.Kopytov@Sun.com> | 2010-09-09 16:48:06 +0400 |
commit | 3ce925bfe7b15428abd9ef8534da9f1f369969f0 (patch) | |
tree | 7de606941c1bb9a49cc8ff9491c72147b48f72c9 /sql | |
parent | 4f4d03a416f2a440d946bcdbc59cfaa99dd97aa4 (diff) | |
parent | 453107bc561338e0764443561a11d05dbe6486ee (diff) | |
download | mariadb-git-3ce925bfe7b15428abd9ef8534da9f1f369969f0.tar.gz |
Automerge.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_cmpfunc.cc | 7 | ||||
-rw-r--r-- | sql/item_subselect.cc | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 605d12742f8..6987dd9e053 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++) { diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index d0c933df845..adce24e7799 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -566,7 +566,10 @@ bool Item_singlerow_subselect::null_inside() void Item_singlerow_subselect::bring_value() { - exec(); + if (!exec() && assigned()) + null_value= 0; + else + reset(); } double Item_singlerow_subselect::val_real() |