Change the ANALYZE command so that it no longer tried to delete unused

sqlite_stat2 and sqlite_stat3 tables.  Change the DROP TABLE command so
that it is able to drop those tables.

FossilOrigin-Name: 589f3f5652e3674d3203f8bd32784a46b5ed530c
This commit is contained in:
drh
2011-10-07 23:52:25 +00:00
parent 9734e6e1f4
commit 08ccfaa1b1
6 changed files with 23 additions and 84 deletions
+12
View File
@@ -260,6 +260,18 @@ do_test table-5.2 {
catchsql {DROP TABLE IF EXISTS sqlite_master}
} {1 {table sqlite_master may not be dropped}}
# Dropping sqlite_statN tables is OK.
#
do_test table-5.2.1 {
db eval {
ANALYZE;
DROP TABLE IF EXISTS sqlite_stat1;
DROP TABLE IF EXISTS sqlite_stat2;
DROP TABLE IF EXISTS sqlite_stat3;
SELECT name FROM sqlite_master WHERE name GLOB 'sqlite_stat*';
}
} {}
# Make sure an EXPLAIN does not really create a new table
#
do_test table-5.3 {