]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
The OsFile under Unix records a pointer back to the pager. This is intended
authordrh <drh@noemail.net>
Mon, 19 Jul 2004 22:08:09 +0000 (22:08 +0000)
committerdrh <drh@noemail.net>
Mon, 19 Jul 2004 22:08:09 +0000 (22:08 +0000)
to be used for an externalized locking patch. (CVS 1821)

FossilOrigin-Name: 511ee6392472d250b542961d1f715cc7453598e6

manifest
manifest.uuid
src/os_unix.c
src/os_unix.h
src/pager.c

index de11b561fca8be8597a62eb7af585236ada28d5f..5acf0c1d99e4653d963022e1a077479509a7b4b6 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Remove\sdebugging\scode\sthat\swas\saccidently\sleft\sin\sjoin4.test.\s(CVS\s1819)
-D 2004-07-19T19:28:44
+C The\sOsFile\sunder\sUnix\srecords\sa\spointer\sback\sto\sthe\spager.\s\sThis\sis\sintended\nto\sbe\sused\sfor\san\sexternalized\slocking\spatch.\s(CVS\s1821)
+D 2004-07-19T22:08:10
 F Makefile.in 77d1219b6563476711a7a962e865979a6f314eb0
 F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -47,11 +47,11 @@ F src/os_mac.c 3d31e26be1411acfb7961033098631b4f3486fdf
 F src/os_mac.h 51d2445f47e182ed32d3bd6937f81070c6fd9bd4
 F src/os_test.c 6bf10100de2ca199a91fe7ac6474561c8a7166ae
 F src/os_test.h 6a26a4978492e4bbdbf385554958418ff02db162
-F src/os_unix.c 7dca8d07ac1d6e2b589eda6d536a4d143160a0f3
-F src/os_unix.h c3ee271744327d156a9e016dff965adebadffdfb
+F src/os_unix.c 4d5cb2f992235b6f3962410cbdbebcc7639f2e09
+F src/os_unix.h f3097815e041e82e24d92505e1ff61ba24172d13
 F src/os_win.c 54181eb73cb4783c4241feca9eaa490768b39008
 F src/os_win.h babd4e912967c6b09088cfe38a45e8005a07ba44
-F src/pager.c 5f8cdc92ee9efb5a7849dc8b561b53122b700c78
+F src/pager.c 3fb0fa47da302a6de2a613f755d0b637932b27d4
 F src/pager.h 269b6cfc114dba0148203446e41dd19f9647dd53
 F src/parse.y 51c8e696276c409618e66a4ccf316fcff245506e
 F src/pragma.c 8326df8c400f573eb43004dfb8e53e5102acb3e4
@@ -237,7 +237,7 @@ F www/tclsqlite.tcl 19191cf2a1010eaeff74c51d83fd5f5a4d899075
 F www/vdbe.tcl 59288db1ac5c0616296b26dce071c36cb611dfe9
 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0
 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P 88e4bfa154e33c627ff2abb15cc55a100359d370
-R d88cd5107405fcfcebcca1125e7b6d70
+P e36e59f02eec166ef2c4e0991c97ceb536e3c3f3
+R 9b7606b53371bfe0452850bbb1777322
 U drh
-Z 3d0bae37423036f70ee3028a9a8cd74b
+Z 7cbb8827b91ca8a90175a2c38d4fff7e
index f06cc1c6f10aa9844c7d848e41ccecd305da6a99..bf9524ea4190abc1f7d194b27de4cdba5cbc2595 100644 (file)
@@ -1 +1 @@
-e36e59f02eec166ef2c4e0991c97ceb536e3c3f3
\ No newline at end of file
+511ee6392472d250b542961d1f715cc7453598e6
\ No newline at end of file
index 7bd9ded3fbadcebffd390ce827dbe5daa84cae2d..cd7e7244b27f761de63a376bf25a390e8235d873 100644 (file)
@@ -1073,7 +1073,6 @@ int sqlite3OsUnlock(OsFile *id, int locktype){
 */
 int sqlite3OsClose(OsFile *id){
   if( !id->isOpen ) return SQLITE_OK;
-  id->zFilename = 0;
   sqlite3OsUnlock(id, NO_LOCK);
   if( id->dirfd>=0 ) close(id->dirfd);
   id->dirfd = -1;
index 9e11e4c92987cf2b83398d60b729d4c967dc3f61..72f818befeec1165a4254ae7ddd410649c22701d 100644 (file)
 */
 typedef struct OsFile OsFile;
 struct OsFile {
+  struct Pager *pPager;     /* The pager that owns this OsFile.  Might be 0 */
   struct openCnt *pOpen;    /* Info about all open fd's on this inode */
   struct lockInfo *pLock;   /* Info about locks on this inode */
   int h;                    /* The file descriptor */
-  const char *zFilename;    /* Name passed to open() */
   unsigned char locktype;   /* The type of lock held on this fd */
   unsigned char isOpen;     /* True if needs to be closed */
   int dirfd;                /* File descriptor for the directory */
index b7a83ffb9576054e87dc5f660cc8344db4fff0da..2361d9fe585ec9c6611761a686a98f0e6eb62c2e 100644 (file)
@@ -18,7 +18,7 @@
 ** file simultaneously, or one process from reading the database while
 ** another is writing.
 **
-** @(#) $Id: pager.c,v 1.149 2004/06/30 11:54:07 danielk1977 Exp $
+** @(#) $Id: pager.c,v 1.150 2004/07/19 22:08:10 drh Exp $
 */
 #include "os.h"         /* Must be first to enable large file support */
 #include "sqliteInt.h"
@@ -1468,6 +1468,7 @@ int sqlite3pager_open(
   sqliteFree(zFullPathname);
   strcpy(&pPager->zJournal[nameLen], "-journal");
   pPager->fd = fd;
+  pPager->fd.pPager = pPager;
   pPager->journalOpen = 0;
   pPager->useJournal = useJournal && !memDb;
   pPager->stmtOpen = 0;