diff options
author | Igor Babaev <igor@askmonty.org> | 2010-12-24 15:30:23 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2010-12-24 15:30:23 -0800 |
commit | efbb3c6c90279f2bed8dda9c48dbaaf8b09a8cae (patch) | |
tree | 810a57db5c728ce6174626cb58404765d8e2a0d6 /mysql-test/r/subselect.result | |
parent | 46c7fb2722d3e0088c2a05acd202e4ebb48b44c0 (diff) | |
download | mariadb-git-efbb3c6c90279f2bed8dda9c48dbaaf8b09a8cae.tar.gz |
Fixed LP bug #639935 (bug #58727).
When the optimizer creates items out of other items it does
not have to call the fix_fields method. Usually in these
cases it calls quick_fix_field() that just marks the
created item as fixed. If the created item is an Item_func
object then calling quick_fix_field() works fine if the
arguments of the created functional item are already fixed.
Otherwise some unfixed nodes remain in the item tree and
it triggers an assertion failure whenever the item is
evaluated.
Fixed the problem by making the method quick_fix_field
virtual and providing an implementation for the class
Item_func objects that recursively calls the method
for unfixed arguments of any functional item.
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r-- | mysql-test/r/subselect.result | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 6d8cb7f5b9a..6710b8fc941 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4749,4 +4749,15 @@ sum(a) sub 1 3 deallocate prepare stmt1; drop table t1,t2; +# +# Bug LP#693935/#58727: Assertion failure with +# a single row subquery returning more than one row +# +create table t1 (a char(1) charset utf8); +insert into t1 values ('a'), ('b'); +create table t2 (a binary(1)); +insert into t2 values ('x'), ('y'); +select * from t2 where a=(select a from t1) and a='x'; +ERROR 21000: Subquery returns more than 1 row +drop table t1,t2; End of 5.1 tests |