From 8ea52764eadccd32454500781b5e1c6b487b6a06 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kisseberth" Date: Thu, 9 May 2024 12:08:52 -0700 Subject: [PATCH] [NCN-440] Add deterministic declaration to stored function --- .../migrations/Migration20231222155500CreateHashStoredProc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/components/com_newsletter/migrations/Migration20231222155500CreateHashStoredProc.php b/core/components/com_newsletter/migrations/Migration20231222155500CreateHashStoredProc.php index 47770c14fe..e561de113c 100644 --- a/core/components/com_newsletter/migrations/Migration20231222155500CreateHashStoredProc.php +++ b/core/components/com_newsletter/migrations/Migration20231222155500CreateHashStoredProc.php @@ -20,6 +20,8 @@ public function up() $createSP = "CREATE FUNCTION hash_access_code (campaign_id INT(11), user_name VARCHAR(150)) ". "RETURNS CHAR(64) ". + "DETERMINISTIC ". + "READS SQL DATA ". "BEGIN ". " SET @cs = (SELECT secret FROM `$campaign` WHERE id=campaign_id); ". " SET @hs = (SELECT `value` FROM `$config` WHERE `key`='secret' AND `scope`='hub'); ".