1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

A failed ATTACH leaves the database in a consistent state. Ticket #811. (CVS 1811)

FossilOrigin-Name: c22f9feb1bb00d1d54a8a87b557195573463fda9
This commit is contained in:
drh
2004-07-19 00:56:23 +00:00
parent 5f6a87b3dd
commit 755b6ba9f0
4 changed files with 29 additions and 16 deletions

View File

@ -12,7 +12,7 @@
# focus of this script is testing the ATTACH and DETACH commands
# and schema changes to attached databases.
#
# $Id: attach3.test,v 1.8 2004/06/19 02:22:11 danielk1977 Exp $
# $Id: attach3.test,v 1.9 2004/07/19 00:56:24 drh Exp $
#
@ -219,9 +219,23 @@ do_test attach3-10.0 {
}
} {1 {table sqlite_master may not be modified}}
# Failure to attach leaves us in a workable state.
# Ticket #811
#
do_test attach3-11.0 {
catchsql {
ATTACH DATABASE '/nodir/nofile.x' AS notadb;
}
} {1 {unable to open database: /nodir/nofile.x}}
do_test attach3-11.1 {
catchsql {
ATTACH DATABASE ':memory:' AS notadb;
}
} {0 {}}
do_test attach3-11.2 {
catchsql {
DETACH DATABASE notadb;
}
} {0 {}}
finish_test