Back out the new device capability.  The determination of whether or not a
file has moved is now done strictly using a file-control.

FossilOrigin-Name: 9c59f5af7ac4908583fab85d37241f200c40f02d
diff --git a/manifest b/manifest
index adb35d7..af17b57 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Actually\slook\sat\si-node\snumbers\sto\sdetermine\swhether\sor\snot\sthe\sdatabase\nfile\shas\smoved.
-D 2013-12-07T12:29:22.514
+C Back\sout\sthe\snew\sdevice\scapability.\s\sThe\sdetermination\sof\swhether\sor\snot\sa\nfile\shas\smoved\sis\snow\sdone\sstrictly\susing\sa\sfile-control.
+D 2013-12-07T16:45:05.762
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in e1a9b4258bbde53f5636f4e238c65b7e11459e2b
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -206,8 +206,8 @@
 F src/os.h 4a46270a64e9193af4a0aaa3bc2c66dc07c29b3f
 F src/os_common.h 92815ed65f805560b66166e3583470ff94478f04
 F src/os_unix.c 60a7b3b23e6fcf83a50d1e320b280b551724e11f
-F src/os_win.c f149798adb6f32db835b2c9f9fac83d86015e004
-F src/pager.c 6aa7d8eca75cac90f90f4c2619fb6c47153756e6
+F src/os_win.c 4323dd0bac4f7a7037fc4cf87fb4692d17f0b108
+F src/pager.c d27dc8aaeac16c90eb0c859c074683bfc4533c41
 F src/pager.h f094af9f6ececfaa8a1e93876905a4f34233fb0c
 F src/parse.y acee1a9958539e21263362b194594c5255ad2fca
 F src/pcache.c f8043b433a57aba85384a531e3937a804432a346
@@ -221,7 +221,7 @@
 F src/rowset.c 64655f1a627c9c212d9ab497899e7424a34222e0
 F src/select.c d41381d80a22d3a83352aeca274cccf264ac277a
 F src/shell.c 936a72ff784efff3832cce274a96ed0b036e6758
-F src/sqlite.h.in eea3f417059c203f450ec64acbb19e6201063c0c
+F src/sqlite.h.in 125dc0b76f0116f1cd6f13536db52ba981e1c5bd
 F src/sqlite3.rc 11094cc6a157a028b301a9f06b3d03089ea37c3e
 F src/sqlite3ext.h 886f5a34de171002ad46fae8c36a7d8051c190fc
 F src/sqliteInt.h f3a5d663fe9c6c0b2ee7fc2e20a6204eaea5bc7c
@@ -1146,7 +1146,7 @@
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 7789f801d720db5394117e764675cd4bbe6b2da1
-R 3bce36f2564839cff6784053e8b7c283
+P 2b1884dc14f9a04a04eebb3245fbe0daaff399eb
+R 4150eee10eaa0b472e8e9f4c3fd71eac
 U drh
-Z 80f483ee05b71fc1e6bab9b86a396c28
+Z f90de22ca9080d17b19aebd5c1cb9da5
diff --git a/manifest.uuid b/manifest.uuid
index b80938c..d9c23f5 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-2b1884dc14f9a04a04eebb3245fbe0daaff399eb
\ No newline at end of file
+9c59f5af7ac4908583fab85d37241f200c40f02d
\ No newline at end of file
diff --git a/src/os_win.c b/src/os_win.c
index 56b546f..22052a3 100644
--- a/src/os_win.c
+++ b/src/os_win.c
@@ -3192,7 +3192,6 @@
 static int winDeviceCharacteristics(sqlite3_file *id){
   winFile *p = (winFile*)id;
   return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN |
-         SQLITE_IOCAP_UNMOVABLE_WHEN_OPEN |
          ((p->ctrlFlags & WINFILE_PSOW)?SQLITE_IOCAP_POWERSAFE_OVERWRITE:0);
 }
 
diff --git a/src/pager.c b/src/pager.c
index 297b7bd..3138035 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -4803,19 +4803,21 @@
 ** code from sqlite3OsAccess()) if the database has gone missing.
 */
 static int databaseIsUnmoved(Pager *pPager){
-  const int fixedFlags = SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN |
-                         SQLITE_IOCAP_UNMOVABLE_WHEN_OPEN;
-  int dc;
   int bHasMoved = 0;
   int rc;
 
   if( pPager->tempFile ) return SQLITE_OK;
   if( pPager->dbSize==0 ) return SQLITE_OK;
   assert( pPager->zFilename && pPager->zFilename[0] );
-  dc = sqlite3OsDeviceCharacteristics(pPager->fd);
-  if( (dc&fixedFlags)==fixedFlags ) return SQLITE_OK;
   rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_HAS_MOVED, &bHasMoved);
-  if( rc==SQLITE_OK && bHasMoved ) rc = SQLITE_READONLY_DBMOVED;
+  if( rc==SQLITE_NOTFOUND ){
+    /* If the HAS_MOVED file-control is unimplemented, assume that the file
+    ** has not been moved.  That is the historical behavior of SQLite: prior to
+    ** version 3.8.3, it never checked */
+    rc = SQLITE_OK;
+  }else if( rc==SQLITE_OK && bHasMoved ){
+    rc = SQLITE_READONLY_DBMOVED;
+  }
   return rc;
 }
 
diff --git a/src/sqlite.h.in b/src/sqlite.h.in
index fb6fa46..1ad181e 100644
--- a/src/sqlite.h.in
+++ b/src/sqlite.h.in
@@ -555,8 +555,7 @@
 ** file that were written at the application level might have changed
 ** and that adjacent bytes, even bytes within the same sector are
 ** guaranteed to be unchanged.  The SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
-** and SQLITE_IOCAP_UNMOVABLE_WHEN_OPEN flags indicate that a file 
-** cannot be deleted or renamed when open, respectively.
+** flag indicate that a file cannot be deleted when open.
 */
 #define SQLITE_IOCAP_ATOMIC                 0x00000001
 #define SQLITE_IOCAP_ATOMIC512              0x00000002
@@ -571,7 +570,6 @@
 #define SQLITE_IOCAP_SEQUENTIAL             0x00000400
 #define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN  0x00000800
 #define SQLITE_IOCAP_POWERSAFE_OVERWRITE    0x00001000
-#define SQLITE_IOCAP_UNMOVABLE_WHEN_OPEN    0x00002000
 
 /*
 ** CAPI3REF: File Locking Levels