1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Do not allow shadow tables to be dropped in defensive mode.

FossilOrigin-Name: 70390bbca49e706649ca5b7c031f0baf416fc38798c17e5f3b73746b3e66e3b5
This commit is contained in:
drh
2019-11-16 12:04:38 +00:00
parent 47bcc34271
commit d0c51d1a04
4 changed files with 33 additions and 15 deletions

View File

@@ -542,19 +542,23 @@ ifcapable fts3 {
CREATE VIRTUAL TABLE y1 USING fts3;
}
do_catchsql_test 16.1 {
do_catchsql_test 16.10 {
INSERT INTO y1_segments VALUES(1, X'1234567890');
} {1 {table y1_segments may not be modified}}
do_catchsql_test 16.2 {
do_catchsql_test 16.20 {
ALTER TABLE y1_segments RENAME TO abc;
} {1 {table y1_segments may not be altered}}
do_execsql_test 16.3 {
do_catchsql_test 16.21 {
DROP TABLE y1_segments;
} {1 {table y1_segments may not be dropped}}
do_execsql_test 16.30 {
ALTER TABLE y1 RENAME TO z1;
}
do_execsql_test 16.4 {
do_execsql_test 16.40 {
SELECT * FROM z1_segments;
}
}