From 5467c9fbb5dede1caacde4e4eed10e1da76b472f Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 8 May 2015 16:10:05 -0700 Subject: [PATCH] CRM-16251 - CRM_Contact_BAO_GroupContactCache - Respect transactions The use of "DROP TABLE" will force-commit any pending transactions, even if the table is temporary. To avoid a force-commit, one must explicitly say "DROP TEMPORARY TABLE". --- CRM/Contact/BAO/GroupContactCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/GroupContactCache.php b/CRM/Contact/BAO/GroupContactCache.php index 6f49d40169..7267bd80e2 100644 --- a/CRM/Contact/BAO/GroupContactCache.php +++ b/CRM/Contact/BAO/GroupContactCache.php @@ -543,7 +543,7 @@ WHERE civicrm_group_contact.status = 'Added' "INSERT IGNORE INTO civicrm_group_contact_cache (contact_id, group_id) SELECT DISTINCT $idName, group_id FROM $tempTable "); - CRM_Core_DAO::executeQuery(" DROP TABLE $tempTable"); + CRM_Core_DAO::executeQuery(" DROP TEMPORARY TABLE $tempTable"); } self::updateCacheTime($groupIDs, $processed); -- 2.25.1