1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Allow ATTACH and DETACH to occur inside of a transaction.

FossilOrigin-Name: ac1fd6beb6c804af5faf1e06a51177a8316007ff9e718c398bd7a24d2ecc4ed3
This commit is contained in:
drh
2017-07-26 18:26:44 +00:00
parent 61ffb2cda6
commit cf201488a5
5 changed files with 22 additions and 28 deletions

View File

@ -616,12 +616,16 @@ ifcapable auth {
# First make sure it is not possible to attach or detach a database while
# a savepoint is open (it is not possible if any transaction is open).
#
# UPDATE 2017-07-26: It is not possible to ATTACH and DETACH within a
# a transaction.
#
do_test savepoint-10.1.1 {
catchsql {
SAVEPOINT one;
ATTACH 'test2.db' AS aux;
DETACH aux;
}
} {1 {cannot ATTACH database within transaction}}
} {0 {}}
do_test savepoint-10.1.2 {
execsql {
RELEASE one;
@ -630,8 +634,9 @@ do_test savepoint-10.1.2 {
catchsql {
SAVEPOINT one;
DETACH aux;
ATTACH 'test2.db' AS aux;
}
} {1 {cannot DETACH database within transaction}}
} {0 {}}
do_test savepoint-10.1.3 {
execsql {
RELEASE one;