staudenmeir/laravel-adjacency-list

General error: 3636 Recursive query aborted after 1001 iterations. Try increasing @@cte_max_recursion_depth to a larger value

Closed this issue · 2 comments

General error: 3636 Recursive query aborted after 1001 iterations. Try increasing @@cte_max_recursion_depth to a larger value

Mysql 8.0.34

Please tell me why is this?

SQLSTATE[HY000]: General error: 3636 Recursive query aborted after 10001 iterations. Try increasing @@cte_max_recursion_depth to a larger value. (Connection: mysql, SQL: with recursive laravel_cte as ((select , 1 as depth, cast(id as char(65535)) as path from users where users.parent_id = 1 and users.parent_id is not null) union all (select users., depth + 1 as depth, concat(path, ., users.id) from users inner join laravel_cte on laravel_cte.id = users.parent_id)) select * from laravel_cte where laravel_cte.deleted_at is null)

Sorry. One element referred to itself. The question is closed