[MCOL-1349] Selecting VIEW throws 1815. Internal error when the VIEW definition contains nested and non nested LEFT JOINS and On clause filter on the nested JOIN Created: 2018-04-19  Updated: 2018-05-22  Resolved: 2018-05-22

Status: Closed
Project: MariaDB ColumnStore
Component/s: MariaDB Server
Affects Version/s: 1.1.3
Fix Version/s: 1.1.5

Type: Bug Priority: Major
Reporter: Mihaly Hazag Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

Server version: 10.2.13-MariaDB-log Columnstore 1.1.3-1


Attachments: File AX_1815_internal_error_reproduce.sql    
Sprint: 2018-09, 2018-10, 2018-11

 Description   

“Error Code: 1815. Internal error: On clause filter involving a table not directly involved in the outer join is currently not supported.”. If you use it in a simple SELECT (but not in view) it works.

Please see the attached AX_1815_internal_error_reproduce.sql to reproduce the bug and for the further comments.



 Comments   
Comment by Andrew Hutchings (Inactive) [ 2018-05-01 ]

Many thanks for this excellent reproducible case.

For my own notes: This could be related to MCOL-1070 but in a different job step.

Comment by Andrew Hutchings (Inactive) [ 2018-05-02 ]

The issue appears to be due to buildOuterStep() being executed before the view's outer join list which is causing some odd side-effects.

Comment by Andrew Hutchings (Inactive) [ 2018-05-02 ]

Outer joins in views were being processed twice. Patch brings back the code to stop that happening.

For QA: see attached SQL file.

Comment by Mihaly Hazag [ 2018-05-03 ]

thank you for fixing it

Comment by Daniel Lee (Inactive) [ 2018-05-22 ]

Build 1.1.5-1 source

[root@localhost ~]# cat mariadb-columnstore-1.1.5-1-centos7.x86_64.bin.tar.gz.txt
/root/columnstore/mariadb-columnstore-server
commit 0c983bff02172849a174dde46b62d76aa66485f8
Merge: 6b8a674 d5e6d89
Author: benthompson15 <ben.thompson@mariadb.com>
Date: Thu Apr 26 16:16:51 2018 -0500

Merge pull request #112 from mariadb-corporation/davidhilldallas-patch-3

update to 1.1.5

/root/columnstore/mariadb-columnstore-server/mariadb-columnstore-engine
commit 1ea5198e0e9ecc2a8d13e6b44bf6c632f8561199
Merge: 4533116 59858aa
Author: Andrew Hutchings <andrew@linuxjedi.co.uk>
Date: Fri May 18 12:37:47 2018 +0100

Merge pull request #475 from drrtuy/MCOL-1415

MCOL-1415

Reproduced issue in 1.1.4-1 and verified fix.

MariaDB [test_ax]> select * from test_ax.view_test;
-----------------------------------------------------------+

id id4 category id2 snapshot_date id3 from_date to_date

-----------------------------------------------------------+

1 1 cat-1 1 2018-05-22 1 2018-05-21 2018-05-24

-----------------------------------------------------------+
1 row in set (0.03 sec)

Generated at Thu Feb 08 02:28:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.