From 4d7ea257b8cd102044ad32653674a6d454417ee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Mon, 4 Apr 2022 10:47:49 +0200 Subject: [PATCH] http_private: do less separate queries when calling stored procedure --- aquatic_http_private/src/workers/socket/db.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/aquatic_http_private/src/workers/socket/db.rs b/aquatic_http_private/src/workers/socket/db.rs index 6e7de4d..c66ba72 100644 --- a/aquatic_http_private/src/workers/socket/db.rs +++ b/aquatic_http_private/src/workers/socket/db.rs @@ -62,9 +62,15 @@ async fn call_announce_procedure( let mut t = pool.begin().await?; - t.execute("SET @p_announce_allowed = false;").await?; - t.execute("SET @p_failure_reason = NULL;").await?; - t.execute("SET @p_warning_message = NULL;").await?; + t.execute( + " + SET + @p_announce_allowed = false, + @p_failure_reason = NULL, + @p_warning_message = NULL; + ", + ) + .await?; let q = sqlx::query( "