-C When\scomparing\stwo\sexpressions\sdo\snot\sapply\saffinity\sto\seither\soperand.\nTicket\s#805.\s(CVS\s1810)
-D 2004-07-19T00:39:45
+C A\sfailed\sATTACH\sleaves\sthe\sdatabase\sin\sa\sconsistent\sstate.\s\sTicket\s#811.\s(CVS\s1811)
+D 2004-07-19T00:56:24
F Makefile.in 77d1219b6563476711a7a962e865979a6f314eb0
F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F sqlite.1 83f4a9d37bdf2b7ef079a82d54eaf2e3509ee6ea
F sqlite.pc.in 30552343140c53304c2a658c080fbe810cd09ca2
F sqlite3.def 7610bb4092dcfa7db8fe6d9a92d3e51adce23566
-F src/attach.c 132498271187144919de139673ad648b8e82c77e
+F src/attach.c 5e37aaac0907edad5da8ba785b94f04fbb4003d7
F src/auth.c 60db23b98bb94c8b0178180faaf49dc116674217
F src/btree.c 3ed3c19e43bb243f502ee614f6ad0a52e53362a7
F src/btree.h 934d0ad30b5b419e9291a11da878be349df2277e
F test/all.test 3b692eb43583b52c99c344b2fa8934512d179016
F test/attach.test 3acdffccbf5f78b07746771b9490758718e28856
F test/attach2.test 3cd1d4a69e0ec307d0b68a44a96c9c8e1e253d65
-F test/attach3.test c4cc0b806783ce3d860af6b80c947f93ffb14270
+F test/attach3.test 6d060986ff004ebb89e1876a331d96c6bb62269e
F test/auth.test 23d1dbf2235635409fee36535a344edc7494aea2
F test/bigfile.test 62722ac4b420dfbcdceb137b8634e2cf2865fe27
F test/bigrow.test 8ab252dba108f12ad64e337b0f2ff31a807ac578
F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P d7e9772c74a2b9377f17149cc1baa3b2d0dfbfb8
-R 1a3746fc881442647db9802248e453ac
+P 88a4e400f916d7af088b39a9653d6452b3666577
+R cdef2dd9c388fa0028ff26d9fe9c7297
U drh
-Z bcf75b34b3779312497eba95531e13ee
+Z 8c1cc1ba67e40d5ecd6969fb8fd7151c
*************************************************************************
** This file contains code used to implement the ATTACH and DETACH commands.
**
-** $Id: attach.c,v 1.21 2004/06/30 09:49:23 danielk1977 Exp $
+** $Id: attach.c,v 1.22 2004/07/19 00:56:24 drh Exp $
*/
#include "sqliteInt.h"
#endif
sqliteFree(zFile);
db->flags &= ~SQLITE_Initialized;
- if( pParse->nErr ) return;
- if( rc==SQLITE_OK ){
+ if( pParse->nErr==0 && rc==SQLITE_OK ){
rc = sqlite3ReadSchema(pParse);
}
if( rc ){
# 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 $
#
}
} {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
-
-
-
-