From 5ca82ff71baa9d749c98ef68e8f8814cf7afcf5d Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Fri, 21 Mar 2014 18:48:57 +0100 Subject: [1.7.x] Fixed #23089 -- Fixed transaction handling in two management commands. Previously, when createcachetable and flush operated on non-default databases, they weren't atomic. Backport of 753a22a635 from master --- tests/cache/tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/cache') diff --git a/tests/cache/tests.py b/tests/cache/tests.py index 2c541a304d..21a92c3b46 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -989,9 +989,11 @@ class CreateCacheTableForDBCacheTests(TestCase): # cache table should be created on 'other' # Queries: # 1: check table doesn't already exist - # 2: create the table - # 3: create the index - with self.assertNumQueries(3, using='other'): + # 2: create savepoint + # 3: create the table + # 4: create the index + # 5: release savepoint + with self.assertNumQueries(5, using='other'): management.call_command('createcachetable', database='other', verbosity=0, interactive=False) -- cgit v1.3