summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2018-11-06 19:33:40 +0000
committerNikolaus Rath <Nikolaus@rath.org>2018-11-06 19:40:48 +0000
commit154d1947f2e60588907170f232edc0fcde9ae769 (patch)
tree7a4d8fb8a9a85781bfb4c48305293303f8de408d
parentb7128a05f30b72224e0d61046d045b1221934858 (diff)
Don't drop table while referenced by a view.
This does not work with the SQLite version in unstable. Gbp-Pq: Name 0004-Don-t-drop-table-while-referenced-by-a-view.patch
-rw-r--r--src/s3ql/fsck.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/s3ql/fsck.py b/src/s3ql/fsck.py
index a0a227a..b2c4a96 100644
--- a/src/s3ql/fsck.py
+++ b/src/s3ql/fsck.py
@@ -1315,8 +1315,8 @@ def renumber_inodes(db):
create_tables(db)
for table in ('names', 'blocks', 'objects'):
- db.execute('DROP TABLE %s' % table)
- db.execute('ALTER TABLE %s_old RENAME TO %s' % (table, table))
+ db.execute('INSERT INTO %s SELECT * FROM %s_old' % (table, table))
+ db.execute('DROP TABLE %s_old' % table)
log.info('..mapping..')
db.execute('CREATE TEMPORARY TABLE inode_map (rowid INTEGER PRIMARY KEY AUTOINCREMENT, id INTEGER UNIQUE)')