-
-
Notifications
You must be signed in to change notification settings - Fork 642
Open
Description
I am resubmitting this issue from the archived cancan project: Deep conditions nesting on sqlite => stack overflow
Steps to reproduce
https://gist.github.com/NikolaiKircher/5f31bf2b0f9bf969597ce5e6e3f6551f
=> ActiveRecord::StatementInvalid: SQLite3::SQLException: parser stack overflow
Actual behaviour
CanCan constructs sql like so
... where cond0 OR (
cond1 OR (
cond2 ...
)
)
this useless deep nesting on sqlite3 results in a Parser Stack Overflow error.
Expected behaviour
A better SQL would be:
... where cond0 OR cond1 OR cond2 ...
System configuration
Rails version:
6.1.7
Ruby version:
3.0.4
CanCanCan version
3.4.0
Metadata
Metadata
Assignees
Labels
No labels