diff options
author | Varun Gupta <varunraiko1803@gmail.com> | 2018-04-30 13:05:01 +0530 |
---|---|---|
committer | Varun Gupta <varunraiko1803@gmail.com> | 2018-05-06 23:05:37 +0530 |
commit | 724ab9a1cb7b23ba93ca5df77f631b5c565f3059 (patch) | |
tree | 0b52669af7d518a3ca9796bc6b2e75ea0ecd8923 /mysql-test/main/derived_cond_pushdown.result | |
parent | 0bfd45f63419c45b68448cbd210a6e73e5c1ab34 (diff) | |
download | mariadb-git-724ab9a1cb7b23ba93ca5df77f631b5c565f3059.tar.gz |
MDEV-16057: Using optimization Splitting with Group BY we see an unnecessary attached condition
t1.pk IS NOT NULL where pk is a PRIMARY KEY
For equalites in the WHERE clause we create a keyuse array that contains the set of all equalities.
For each KEYUSE inside the keyuse array we have a field "null_rejecting"
which tells that the equality will not hold if either the left or right
hand side of the equality is NULL.
If the equality is NULL rejecting then we accordingly add a NOT NULL condition for the field present in
the item val(present in the KEYUSE struct) when we are doing ref access.
For the optimization of splitting with GROUP BY we always set the null_rejecting to TRUE and we are doing ref access on
the GROUP by field. This does create a problem when the equality is NOT NULL rejecting. This happens in this case as
in the equality we have the right hand side as t1.pk where pk is a PRIMARY KEY , hence it is NOT NULLABLE. So we should have
null rejecting set to FALSE for such a case.
Diffstat (limited to 'mysql-test/main/derived_cond_pushdown.result')
-rw-r--r-- | mysql-test/main/derived_cond_pushdown.result | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index 82f621c73a2..5a496d2bd4e 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -15071,7 +15071,6 @@ EXPLAIN "materialized": { "query_block": { "select_id": 2, - "outer_ref_condition": "t1.pk1 is not null", "table": { "table_name": "t2", "access_type": "eq_ref", |