From 79753ea8cbb1606eb85ce91c2130f496f4d5f87d Mon Sep 17 00:00:00 2001 From: Sebastien Robin <seb@nexedi.com> Date: Mon, 11 Jun 2007 08:16:00 +0000 Subject: [PATCH] we must use replace instead of insert in order to solve duplicate key problems git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14754 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/CachePlugins/SQLCache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/ERP5Type/CachePlugins/SQLCache.py b/product/ERP5Type/CachePlugins/SQLCache.py index d8875bedb4..05672dbf28 100644 --- a/product/ERP5Type/CachePlugins/SQLCache.py +++ b/product/ERP5Type/CachePlugins/SQLCache.py @@ -63,7 +63,7 @@ class SQLCache(BaseCache): UNIQUE(cache_id, scope)) ''' - insert_key_sql = '''INSERT INTO %s (cache_id, value, scope, stored_at, cache_duration, calculation_time) + insert_key_sql = '''REPLACE INTO %s (cache_id, value, scope, stored_at, cache_duration, calculation_time) VALUES("%s", "%s", "%s", %s, %s, %s) ''' -- 2.30.9