[MDEV-2494] LP:715759 - Wrong result with in_to_exists=on in maria-5.3-mwl89 Created: 2011-02-09 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Timour Katchaounov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
Repeatable in both maria-5.3 and maria-5.3-mwl89 The following query returns 1 row even though the IN predicate should evaluate to FALSE since there are no rows to be returned by the IN subquery, since there are no rows that satisfy the ON clause of the subquery. test case: CREATE TABLE t1 ( f2 int(11), f3 int(11), f5 varchar(1)) ; explain: id select_type table type possible_keys key key_len ref rows Extra |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2011-02-15 ] |
|
Re: Wrong result with in_to_exists=on |
| Comment by Timour Katchaounov (Inactive) [ 2011-02-22 ] |
|
Re: Wrong result with in_to_exists=on
CREATE TABLE t1 (a1 int, a2 int) ; CREATE TABLE t2 (b1 int, b2 int) ; SET SESSION optimizer_switch = 'in_to_exists=on,materialization=off,semijoin=off'; SELECT * FROM t1 |
| Comment by Timour Katchaounov (Inactive) [ 2011-02-23 ] |
|
Re: Wrong result with in_to_exists=on When calling Item_in_subselect::inject_in_to_exists_cond(), This Item_equal represents the equality "b1 = b2" in the Later, the call to substitute_for_best_equal_field(): substitutes the WHERE clause with the constant "1" (Item_int(1)), which TODO: |
| Comment by Timour Katchaounov (Inactive) [ 2011-05-04 ] |
|
Re: Wrong result with in_to_exists=on in maria-5.3-mwl89 |
| Comment by Timour Katchaounov (Inactive) [ 2011-05-04 ] |
|
Re: Wrong result with in_to_exists=on in maria-5.3-mwl89 |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 715759 |