You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query succeeded with 255 conditions
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
If there are more than 256 conditions, stack overflow occurs. This happens only debug mode, related to #1434 (comment).
Expected behavior
Work without overflows..
Additional context
I guess 2 approaches to this problem.
Approach#1
Parameters are received as reference or without using box pointers in some functions, such as select_to_plan and plan_selection. This maybe can make Stack grow faster.
Describe the bug
While using multiple conditions are used, a stack overflow error occurs.
In particular, when used with tokio, more limitations arise because the default stack size is 2MiB.
To Reproduce
I referred to reproduce code from issue #1434 provided by @mcassels.
SELECT * FROM table WHERE <condition0> OR <condition1> OR ...
Output
query succeeded with 255 conditions thread 'main' has overflowed its stack fatal runtime error: stack overflow
If there are more than 256 conditions, stack overflow occurs. This happens only
debug mode
, related to #1434 (comment).Expected behavior
Work without overflows..
Additional context
I guess 2 approaches to this problem.
Approach#1
Parameters are received as reference or without using box pointers in some functions, such as select_to_plan and plan_selection. This maybe can make Stack grow faster.
And I found some stack allocation with enumeration.
https://www.reddit.com/r/rust/comments/zbla3j/how_does_enums_work_where_are_they_allocated/
Approach#2
Using Address Sanitizer with the above example, error occurred in fmt::Display. But, I'm not sure exactly where it happened.
This would be related to rust issue: rust-lang/rust#45838 .
The text was updated successfully, but these errors were encountered: