From f5c0a346389e7dc5252cd43e57f28effa2ba59b4 Mon Sep 17 00:00:00 2001 From: scardinius Date: Thu, 30 Jan 2020 10:10:04 +0100 Subject: [PATCH] dev/core#1564 Fix category name for a/b test temporary table --- CRM/Mailing/BAO/Recipients.php | 2 +- CRM/Utils/SQL/TempTable.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Mailing/BAO/Recipients.php b/CRM/Mailing/BAO/Recipients.php index 5c60de45d1..14820ed84c 100644 --- a/CRM/Mailing/BAO/Recipients.php +++ b/CRM/Mailing/BAO/Recipients.php @@ -100,7 +100,7 @@ WHERE r.mailing_id = %1 $limitString = "LIMIT 0, $totalLimit"; } $temporaryTable = CRM_Utils_SQL_TempTable::build() - ->setCategory('srcmailing' . $sourceMailingId) + ->setCategory('sr' . $sourceMailingId) ->setMemory() ->createWithColumns("mailing_recipient_id int unsigned, id int PRIMARY KEY AUTO_INCREMENT, INDEX(mailing_recipient_id)"); $temporaryTableName = $temporaryTable->getName(); diff --git a/CRM/Utils/SQL/TempTable.php b/CRM/Utils/SQL/TempTable.php index 6ca62379c6..0681978495 100644 --- a/CRM/Utils/SQL/TempTable.php +++ b/CRM/Utils/SQL/TempTable.php @@ -252,7 +252,7 @@ class CRM_Utils_SQL_TempTable { */ public function setCategory($category) { if ($category && !preg_match(self::CATEGORY_REGEXP, $category) || strlen($category) > self::CATEGORY_LENGTH) { - throw new \RuntimeException("Malformed temp table category"); + throw new \RuntimeException("Malformed temp table category $category"); } $this->category = $category; return $this; -- 2.25.1