Adding test for pragma key on attach

This commit is contained in:
Nick Parker 2013-08-30 08:26:18 -05:00
parent 1ba0e0e418
commit 480250aa82
1 changed files with 20 additions and 0 deletions

View File

@ -2043,4 +2043,24 @@ do_test migrate-2-0-le-database-to-3x-format {
db close
file delete -force test.db
do_test key-database-by-name {
sqlite_orig db test.db
execsql {
attach database 'new.db' as new;
pragma new.key = 'foo';
create table new.t1(a,b);
insert into new.t1(a,b) values('foo', 'bar');
detach database new;
}
db close
sqlite_orig db new.db
execsql {
pragma key = 'foo';
select * from t1;
}
} {foo bar}
db close
file delete -force new.db
finish_test