[MDEV-3472] LP:623300 - Query with join_cache_level = 6 returns extra rows in maria-5.3-dsmrr-cpk Created: 2010-08-24 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: | Sergei Petrunia |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query: SELECT table2 .`col_int_nokey`, table1 .`col_int_nokey` FROM CC table1 JOIN C table2 ON table2 .`pk` = table1 .`col_int_nokey` WHERE table1 .`pk` ; returns one row where table1 .`col_int_nokey` is NULL even though the ON condition should not match such rows. maria-5.3 is not affected. |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2010-08-24 ] |
|
Re: Query with join_cache_level = 6 returns extra rows in maria-5.3-dsmrr-cpk --source include/have_innodb.inc CREATE TABLE `CC` ( INSERT INTO `CC` VALUES (10,7); SET SESSION join_cache_level = 0; SELECT table2 .`col_int_nokey` SET SESSION join_cache_level = 6; SELECT table2 .`col_int_nokey` |
| Comment by Sergei Petrunia [ 2010-09-15 ] |
|
Re: Query with join_cache_level = 6 returns extra rows in maria-5.3-dsmrr-cpk |
| Comment by Sergei Petrunia [ 2010-09-15 ] |
|
Re: Query with join_cache_level = 6 returns extra rows in maria-5.3-dsmrr-cpk |
| Comment by Sergei Petrunia [ 2010-09-15 ] |
|
Re: Query with join_cache_level = 6 returns extra rows in maria-5.3-dsmrr-cpk This feature works basically as follows: if we have a ref or eq_ref access on "t1.key=t0.col", then we will add "t0.col IS NOT NULL" to t0's part of WHERE condition. If t0 has no other condition, then everything is ok we execute with added IS NOT NULL (although that is not visible in EXPLAIN) There are two things to fix there 2. BKA code should have means to deal with "t.not_null_key=nullable_value" problem. (It can't rely on early NULLs filtering because it doesn't work for e.g. outer joins, while BKA does process outer joins) |
| Comment by Sergei Petrunia [ 2010-12-02 ] |
|
Re: Query with join_cache_level = 6 returns extra rows in maria-5.3-dsmrr-cpk |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-13 ] |
|
Launchpad bug id: 623300 |