fixed another trigger recursion when updating a cache record

function touchCache() in lib/clicompatbase.inc.php updated e.g. cache_desc.last_modified
in the same statement with an access to caches table. As the cacheDescAfterUpdate trigger
updates caches.listing_last_modified, the read & write access to caches table collided.

function touchCache() is obsolete, as touching on status change is done by triggers
for all depending tables (via SQL function sp_touch_cache).
This commit is contained in:
following
2013-03-22 09:53:49 +01:00
parent 9661614ea0
commit 252019f52d
6 changed files with 10 additions and 17 deletions
+6
View File
@@ -192,6 +192,12 @@
UPDATE `caches` SET `last_modified`=NOW() WHERE `cache_id`=nCacheId;
END IF;
/* This is a hack for the XML interface which delivers cache-related records
* like descriptions and pictures only depending on their last_modified date.
* Data may not have been deliverd or stored somewhere depending on the cache
* status, so when status changes, all has to be sent (again) via XML.
*/
UPDATE `cache_desc` SET `last_modified`=NOW() WHERE `cache_id`=nCacheId;
UPDATE `cache_logs` SET `last_modified`=NOW() WHERE `cache_id`=nCacheId;
UPDATE `coordinates` SET `last_modified`=NOW() WHERE `cache_id`=nCacheId AND `type`=1;