[MDEV-3729] LP:609121 - RQG: wrong result on aggregate + NOT IN + HAVING and partial_match_table_scan=on Created: 2010-07-23 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 | ||
| Reporter: | Philip Stoev (Inactive) | Assignee: | Timour Katchaounov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query: SELECT SUM( `col_varchar_key` ) field1 returns NULL when partial_match_table_scan is ON (and some other optimizations are disabled) even though the HAVING predicate explicitly excludes NULL as the correct answer. Test case: CREATE TABLE `BB` ( INSERT INTO `BB` VALUES (8,NULL,NULL); CREATE TABLE `B` ( INSERT INTO `B` VALUES (7,'f','f'); SET @@optimizer_switch='partial_match_rowid_merge=off,partial_match_table_scan=on,subquery_cache=off,semijoin=off'; |
| Comments |
| Comment by Timour Katchaounov (Inactive) [ 2010-10-25 ] |
|
Re: RQG: wrong result on aggregate + NOT IN + HAVING and partial_match_table_scan=on create table t1 (c1 int); SET @@optimizer_switch='subquery_cache=off,semijoin=off'; SELECT SUM(c1) c1_sum FROM t1 WHERE c1 IN (SELECT c2 FROM t2); |
| Comment by Timour Katchaounov (Inactive) [ 2010-10-25 ] |
|
Re: RQG: wrong result on aggregate + NOT IN + HAVING and partial_match_table_scan=on |
| Comment by Rasmus Johansson (Inactive) [ 2010-10-27 ] |
|
Launchpad bug id: 609121 |