dev/core#1564 Fix category name for a/b test temporary table
authorscardinius <scardinius@chords.pl>
Thu, 30 Jan 2020 09:10:04 +0000 (10:10 +0100)
committerscardinius <scardinius@chords.pl>
Tue, 4 Feb 2020 08:46:42 +0000 (09:46 +0100)
CRM/Mailing/BAO/Recipients.php
CRM/Utils/SQL/TempTable.php

index 5c60de45d170065ef82fd3b058e08d7485bdd41d..14820ed84cf19e35450e17770867f781be48d62c 100644 (file)
@@ -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();
index 6ca62379c66540acf0bb9d534f105f873fc61be4..0681978495b7a2cbd94d8bff009208afe2a693d0 100644 (file)
@@ -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;