[MCOL-3769] Impossible WHERE and HAVING conditions are skiped by SH. Replaced by MCOL-3787. Created: 2020-02-10 Updated: 2020-04-01 Resolved: 2020-03-25 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | MDB Plugin |
| Affects Version/s: | 1.4.2 |
| Fix Version/s: | 1.4.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Roman | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 2020-2, 2020-5 | ||||||||
| Description |
|
Below is the reproduction, now in 3787. The commit made for this ticket does not fix the issue, only cleans up some code. ********************************************************************
create_SH checks whether HAVING or WHERE has impossible conditions returning if there are such. After JOIN::optimize() had been removed from create_SH thus both select_lex->having_value, select_lex->cond_value always are in COND_UNDEF. This disables the check.
|
| Comments |
| Comment by Roman [ 2020-02-12 ] | ||||||
|
The problems aren't so severe b/c CS processes impossible conditions. I've refactored create_SH() for this issue though removing needless impossible conditions check and adding meaningful error message in case if SH fails to process the query that has unsupported features. | ||||||
| Comment by Roman [ 2020-02-12 ] | ||||||
|
Plz review. | ||||||
| Comment by Patrick LeBlanc (Inactive) [ 2020-02-18 ] | ||||||
|
Found a problem with the latest fix, the default sql_mode, and insert-select among other things. | ||||||
| Comment by Patrick LeBlanc (Inactive) [ 2020-02-18 ] | ||||||
|
Warnings were being promoted to errors by the STRICT_TRANS_TABLES option in sql_mode. Apparently the warnings are all effectively 'expect low performance', which shouldn't be a warning anyway. I commented the warnings out. | ||||||
| Comment by Daniel Lee (Inactive) [ 2020-02-19 ] | ||||||
|
The original change is for code refactoring only. Reproduced the issue in a BB night build 2020/20/18 MariaDB [mytest]> insert into orders1 select * from orders; MariaDB [mytest]> show warnings;
--------
-------- MariaDB [mytest]> set sql_mode=STRICT_TRANS_TABLES; MariaDB [mytest]> insert into orders1 select * from orders; verified fix in source Merge pull request #1055 from pleblanc1976/develop-1.4 Fixed a problem with the fix for MariaDB [mytest]> insert into orders1 select * from orders; MariaDB [mytest]> set sql_mode=STRICT_TRANS_TABLES; MariaDB [mytest]> insert into orders1 select * from orders; | ||||||
| Comment by Roman [ 2020-03-07 ] | ||||||
|
Reopen this as the fix breaks the logic behind the original commit for the issue. Also pleblanc asked me to port this feature into develop. | ||||||
| Comment by Roman [ 2020-03-07 ] | ||||||
|
I'll first repeat the orignal comment here: The original problem with impossible WHERE and HAVING aren't so severe b/c CS processes impossible conditions. CS still returns record for queries that both contains aggregation functions and impossible conditions and this will be addressed by | ||||||
| Comment by Roman [ 2020-03-07 ] | ||||||
|
4 QA: There are not dedicated tests to check this issue so I would suggest to check whether it affects regr/test001 or not. | ||||||
| Comment by Roman [ 2020-03-16 ] | ||||||
|
Please review. | ||||||
| Comment by Patrick LeBlanc (Inactive) [ 2020-03-17 ] | ||||||
|
It looks good to me, but I don't know this code very well. Gagan can take the lead on this one. BTW, buildbot is broken again, so we'll have to be extra careful to not break anything. Roman, if you haven't already done so, be sure to run at least test001 or 101 before and after this change to verify it doesn't break something. | ||||||
| Comment by Roman [ 2020-03-18 ] | ||||||
|
Very unfortunatelly nobody does. I tested it against HEAD of develop/-1.4 last week and there was no failures introduced. | ||||||
| Comment by Gagan Goel (Inactive) [ 2020-03-18 ] | ||||||
|
For QA, this is a code refactor, so no dedicated tests for this ticket. Please ensure it doesn't introduce new regressions in test001. | ||||||
| Comment by Daniel Lee (Inactive) [ 2020-03-25 ] | ||||||
|
Build verified: 1.4.4-1 source /root/ColumnStore/buildColumnstoreFromGithubSource/server MENT-401: Include Aria and S3 index length limit increase in ES 10.4 Cherry-picked from: 98ea611940fd492fc5f883625f2afcbbab312795 /root/ColumnStore/buildColumnstoreFromGithubSource/server/engine Merge pull request #1099 from pleblanc1976/mcol-2022-1.4 Mcol 2022 1.4 Verified that the report issue still exist and it is being tracked by Ran regression test001 autopilot. |