drop report temp tables on db clean up.
authoreileen <eileen@fuzion.co.nz>
Tue, 16 Apr 2013 20:55:57 +0000 (08:55 +1200)
committereileen <eileen@fuzion.co.nz>
Tue, 16 Apr 2013 20:56:53 +0000 (08:56 +1200)
This helps where TEMPORARY tables are a bit limiting due to their join restrictions or the desire to retain them for when the data doesn't go stale that quickly

CRM/Core/Config.php

index 3356f009743c654929c3ef5e4671ce633b8f552d..cfda390e50130e61973839169b44b265613c27c6 100644 (file)
@@ -728,9 +728,12 @@ class CRM_Core_Config extends CRM_Core_Config_Variables {
 SELECT TABLE_NAME as tableName
 FROM   INFORMATION_SCHEMA.TABLES
 WHERE  TABLE_SCHEMA = %1
-AND    ( TABLE_NAME LIKE 'civicrm_import_job_%'
-OR       TABLE_NAME LIKE 'civicrm_export_temp%'
-OR       TABLE_NAME LIKE 'civicrm_task_action_temp%' )
+AND
+  ( TABLE_NAME LIKE 'civicrm_import_job_%'
+  OR       TABLE_NAME LIKE 'civicrm_export_temp%'
+  OR       TABLE_NAME LIKE 'civicrm_task_action_temp%'
+  OR       TABLE_NAME LIKE 'civicrm_report_temp%'
+  )
 ";
 
     $params = array(1 => array($dao->database(), 'String'));