From c3db35cbeb18ebcdfb319e1ba8fe31db6c817ae7 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Sun, 11 Dec 2022 23:55:31 +0000 Subject: [PATCH] Prevent recursive queries inside futures Closes #1513 --- lib/src/sql/statements/select.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/sql/statements/select.rs b/lib/src/sql/statements/select.rs index 67fba065..d86e9e96 100644 --- a/lib/src/sql/statements/select.rs +++ b/lib/src/sql/statements/select.rs @@ -83,8 +83,8 @@ impl SelectStatement { opt.check(Level::No)?; // Create a new iterator let mut i = Iterator::new(); - // Ensure futures are processed - let opt = &opt.futures(true); + // Ensure futures are stored + let opt = &opt.futures(false); // Loop over the select targets for w in self.what.0.iter() { let v = w.compute(ctx, opt, txn, doc).await?;