1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-25 18:38:00 +03:00
Files
mariadb/mysql-test/r
Alexey Kopytov 453107bc56 Bug #54190: Comparison to row subquery produces incorrect
result

Row subqueries producing no rows were not handled as UNKNOWN
values in row comparison expressions.

That was a result of the following two problems:

1. Item_singlerow_subselect did not mark the resulting row
value as NULL/UNKNOWN when no rows were produced.

2. Arg_comparator::compare_row() did not take into account that
a whole argument may be NULL rather than just individual scalar
values.

Before bug#34384 was fixed, the above problems were hidden
because an uninitialized (i.e. without any stored value) cached
object would appear as NULL for scalar values in a row subquery
returning an empty result. After the fix
Arg_comparator::compare_row() would try to evaluate
uninitialized cached objects.

Fixed by removing the aforementioned problems.


mysql-test/r/row.result:
  Added a test case for bug #54190.
mysql-test/r/subselect.result:
  Updated the result for a test relying on wrong behavior.
mysql-test/t/row.test:
  Added a test case for bug #54190.
sql/item_cmpfunc.cc:
  If either of the argument rows is NULL, return NULL as the
  result of comparison.
sql/item_subselect.cc:
  Adjust null_value for Item_singlerow_subselect depending on
  whether a row has been produced by the row subquery.
2010-09-09 16:46:13 +04:00
..
2010-02-25 23:13:11 +04:00
2010-03-09 16:09:32 +01:00
2010-06-01 11:54:06 +04:00
2010-04-27 00:46:52 +04:00
2009-12-17 12:06:36 -08:00
2009-11-06 17:54:19 +03:00
2010-01-29 16:54:27 +02:00
2009-12-10 17:38:01 +02:00
2010-03-12 11:52:38 +01:00
2010-03-12 11:52:38 +01:00
2009-10-27 14:09:36 +04:00
2010-04-30 15:27:17 +04:00
2009-11-27 18:10:28 +02:00
2009-12-22 14:38:33 +04:00
2010-06-04 17:10:22 +03:00