diff options
author | unknown <timour/tkatchaounov@lapi.mysql.com> | 2007-12-08 23:05:00 +0200 |
---|---|---|
committer | unknown <timour/tkatchaounov@lapi.mysql.com> | 2007-12-08 23:05:00 +0200 |
commit | b3d8ff4ebd16c418dbce2731a5553c3ae6a47a7f (patch) | |
tree | 729cf003842fa8ee81b6ec60cbe058751fbbf9a3 /mysql-test/t/range.test | |
parent | bfe58b71f26cd791c5f196d843cb00f9752f8349 (diff) | |
download | mariadb-git-b3d8ff4ebd16c418dbce2731a5553c3ae6a47a7f.tar.gz |
Fix for BUG#32694 "NOT NULL table field in a subquery produces invalid results"
The problem was that when convert_constant_item is called for subqueries,
this happens when we already started executing the top-level query, and
the field argument of convert_constant_item pointed to a valid table row.
In turn convert_constant_item used the field buffer to compute the value
of its item argument. This copied the item's value into the field,
and made equalities with outer references always true.
The fix saves/restores the original field's value when it belongs to an
outer table.
mysql-test/r/type_datetime.result:
Test for BUG#32694.
mysql-test/t/type_datetime.test:
Test for BUG#32694.
sql/item_cmpfunc.cc:
- Changed convert_constant_item() so that it doesn't destroy the contents
of its field argument when the field originates from table in an outer
query.
Diffstat (limited to 'mysql-test/t/range.test')
0 files changed, 0 insertions, 0 deletions