diff options
author | Daniel Burrows <dburrows@debian.org> | 2009-08-17 07:23:15 -0700 |
---|---|---|
committer | Daniel Burrows <dburrows@debian.org> | 2009-08-17 07:23:15 -0700 |
commit | ab6e86b77fdfebf87097abe0d6f35ae33a2cff23 (patch) | |
tree | 3b103b9b783f6f7b7678c24d08c9e820597150f4 | |
parent | d5ab6fab71c01b08bef01c77d2e77a7c8011d91e (diff) | |
download | aptitude-ab6e86b77fdfebf87097abe0d6f35ae33a2cff23.tar.gz |
Fix the select statement that calculates a new cache ID.
-rw-r--r-- | src/generic/util/file_cache.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/generic/util/file_cache.cc b/src/generic/util/file_cache.cc index 86da79af..72ce6048 100644 --- a/src/generic/util/file_cache.cc +++ b/src/generic/util/file_cache.cc @@ -539,7 +539,7 @@ insert into globals(TotalBlobSize) values(0); \ // put calls), and trying to avoid it seems // like it would cause a lot of trouble. sqlite::db::statement_proxy update_last_use_statement = - store->get_cached_statement("update cache set CacheId = max(select CacheId from cache) + 1 where CacheId = ?"); + store->get_cached_statement("update cache set CacheId = (select max(CacheId) from cache) + 1 where CacheId = ?"); update_last_use_statement->bind_int64(0, oldCacheId); update_last_use_statement->exec(); } |