Private GIT

Skip to content
Snippets Groups Projects
Commit bc8f3125 authored by Miha's avatar Miha
Browse files

Fix for #3325

parent a3413bf8
Branches
No related tags found
No related merge requests found
......@@ -363,6 +363,9 @@ abstract class DB {
// Run Anchor query then the recursive query until there are no more results
$level = 1;
do {
// reset args for recursive query
$anchor_args = $level==1 ? $anchor_args : [];
$query = "INSERT INTO cte_0 ".($level++==1 ? $anchor_query : $recursive_query).";" .
"TRUNCATE TABLE cte_last;" .
"INSERT IGNORE INTO cte_last SELECT * FROM cte_0;" .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment