]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Move test logic for SQLITE_FCNTL_PRAGMA out of os_unix.c and into test_vfs.c. file-control-pragma
authordrh <drh@noemail.net>
Wed, 22 Feb 2012 20:08:49 +0000 (20:08 +0000)
committerdrh <drh@noemail.net>
Wed, 22 Feb 2012 20:08:49 +0000 (20:08 +0000)
FossilOrigin-Name: c81fc40b2b584820ac7d1c3848ebeb7225d4eeeb

manifest
manifest.uuid
src/os_unix.c
src/test_vfs.c
test/attach.test
test/pragma.test

index dddb378ea9a57eb99cc0de7aa6e7da66c9d6bcc8..8c2bdd225f39a55967d342e270e465d8d65e81f6 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C If\sthe\sSQLITE_FCNTL_PRAGMA\sfile-control\sreturns\sanything\sother\sthan\nSQLTIE_NOTFOUND\sand\sSQLITE_OK,\sthen\streat\sthe\sresult\sas\san\serror.
-D 2012-02-22T19:56:17.256
+C Move\stest\slogic\sfor\sSQLITE_FCNTL_PRAGMA\sout\sof\sos_unix.c\sand\sinto\stest_vfs.c.
+D 2012-02-22T20:08:49.412
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 3f79a373e57c3b92dabf76f40b065e719d31ac34
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -166,7 +166,7 @@ F src/os.c e1acdc09ff3ac2412945cca9766e2dcf4675f31c
 F src/os.h 59beba555b65a450bd1d804220532971d4299f60
 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
 F src/os_os2.c 4a75888ba3dfc820ad5e8177025972d74d7f2440
-F src/os_unix.c 49e10d7d5783df93684b3c232f03394ad7171ee3
+F src/os_unix.c 0e3d2942d228d0366fb80a3640f35caf413b66d1
 F src/os_win.c 5ac061ae1326a71500cee578ed0fd9113b4f6a37
 F src/pager.c 2d892f7b901a8867a33bc21742086165a3a99af8
 F src/pager.h a435da8421dc7844b7f9c7f37b636c160c50208a
@@ -230,7 +230,7 @@ F src/test_superlock.c 2b97936ca127d13962c3605dbc9a4ef269c424cd
 F src/test_syscall.c a992d8c80ea91fbf21fb2dd570db40e77dd7e6ae
 F src/test_tclvar.c f4dc67d5f780707210d6bb0eb6016a431c04c7fa
 F src/test_thread.c e286f2173563f2a1747c24bcda6b9d030bf4f4e4
-F src/test_vfs.c 37d523ce239e853a302933327ccbc8c73c4572c1
+F src/test_vfs.c 73f46bd9b5183ebcb77da22773886b81157cdc3d
 F src/test_vfstrace.c f20a32a5fd46feb59a93d2cf650f1ff92da3872b
 F src/test_wholenumber.c 6129adfbe7c7444f2e60cc785927f3aa74e12290
 F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
@@ -275,7 +275,7 @@ F test/async2.test c0a9bd20816d7d6a2ceca7b8c03d3d69c28ffb8b
 F test/async3.test d73a062002376d7edc1fe3edff493edbec1fc2f7
 F test/async4.test 1787e3952128aa10238bf39945126de7ca23685a
 F test/async5.test 0dd8701bd588bf6e70c2557a22ae3f22b2567b4c
-F test/attach.test 80762134ca101a79dbe3dda5285d7897639057a7
+F test/attach.test 8511625fa8c7dabbcbc48fc491c0b07bae65fb0e
 F test/attach2.test e54436ed956d3d88bdee61221da59bf3935a0966
 F test/attach3.test d89ccfe4fe6e2b5e368d480fcdfe4b496c54cf4e
 F test/attach4.test 53bf502f17647c6d6c5add46dda6bac8b6f4665c
@@ -635,7 +635,7 @@ F test/pagesize.test 1dd51367e752e742f58e861e65ed7390603827a0
 F test/pcache.test 065aa286e722ab24f2e51792c1f093bf60656b16
 F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025
 F test/permutations.test fa6f0e5f13fe0b1d3f7a7613179b7f7b20028184
-F test/pragma.test 01abcc2e43d080db8df0f9517233937c20892bd1
+F test/pragma.test f6111ded4d56b79436a60a757d62f3c96a9cf3f5
 F test/pragma2.test 3a55f82b954242c642f8342b17dffc8b47472947
 F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552
 F test/progress.test 5b075c3c790c7b2a61419bc199db87aaf48b8301
@@ -990,7 +990,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
 F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
-P 9a1da91850b6074e5f9d18382f517eb868cad63c
-R 38bcf4842421c21898ae536d39030b7a
+P 5643618108a8aafba67ed4004039b862bb5e5da8
+R 6e8e292599506d27fedbb78f0e61a658
 U drh
-Z 347350cb546f31164cbf5b1b4da5c224
+Z b333c9e71d55e82ea7cb2edfc422542b
index fb958af86368a9df85287d9935aabf71f52db6d1..adc52f659cd78cecd2aa90334ec8816a2de621ea 100644 (file)
@@ -1 +1 @@
-5643618108a8aafba67ed4004039b862bb5e5da8
\ No newline at end of file
+c81fc40b2b584820ac7d1c3848ebeb7225d4eeeb
\ No newline at end of file
index f747d8a877e7187fcacbe18741fad70cf94d8e45..48c130935e983fe74c8a1f4325fdb55bb95fa91b 100644 (file)
@@ -3587,16 +3587,6 @@ static int unixFileControl(sqlite3_file *id, int op, void *pArg){
       *(char**)pArg = sqlite3_mprintf("%s", pFile->pVfs->zName);
       return SQLITE_OK;
     }
-    case SQLITE_FCNTL_PRAGMA: {
-      char **azArg = (char**)pArg;
-#ifdef SQLITE_TEST
-      if( sqlite3_stricmp(azArg[1], "filename")==0 ){
-        azArg[0] = sqlite3_mprintf("%s", pFile->zPath);
-        return SQLITE_OK;
-      }
-#endif
-      break;
-    }
 #ifndef NDEBUG
     /* The pager calls this method to signal that it has done
     ** a rollback and that the database is therefore unchanged and
index c18d0f6daed4333c21356f6588febb84d0c68592..bab67798cc0e6157faefbde25cc9374eb1b89d1a 100644 (file)
@@ -496,6 +496,10 @@ static int tvfsFileControl(sqlite3_file *pFile, int op, void *pArg){
       }
       return rc;
     }
+    if( sqlite3_stricmp(argv[1], "filename")==0 ){
+      argv[0] = sqlite3_mprintf("%s", p->zFilename);
+      return SQLITE_OK;
+    }
   }
   return sqlite3OsFileControl(p->pReal, op, pArg);
 }
index 78358980fcc10400c3df41eb5a8d59cdd1944146..008eee65f6720f76ff76805a1f15410975820961 100644 (file)
@@ -272,17 +272,6 @@ ifcapable schema_pragmas {
 } ;# ifcapable schema_pragmas
 
 
-if {[regexp unix [file_control_vfsname db]]} {
-  ifcapable debug {
-    do_test attach-1.30.1 {
-      file tail [db eval {PRAGMA main.filename}]
-    } {test.db}
-    do_test attach-1.30.2 {
-      db eval {PRAGMA temp.filename}
-    } {}
-  }
-}
-
 ifcapable {trigger} {  # Only do the following tests if triggers are enabled
 do_test attach-2.1 {
   execsql {
index fb1034f10af76f99148860efe39e6929bed31e78..00be9b8f6a74e541aa62100aa3be7933834df9df 100644 (file)
@@ -1506,6 +1506,9 @@ do_test pragma-19.3 {
 do_test pragma-19.4 {
   catchsql {PRAGMA error=7}
 } {1 {out of memory}}
+do_test pragma-19.5 {
+  file tail [execsql {PRAGMA filename}]
+} {test.db}
 
 
 finish_test