aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2004-07-19 22:08:09 +0000
committerdrh <drh@noemail.net>2004-07-19 22:08:09 +0000
commitd5b447d9ac9bd1249f81daf9feb28d5ecee7f3c4 (patch)
tree5662b3cce92cc2ebfec1bee1bb03920b4cc504d4
parent8d7e24f1d3f66f997ea87f4776c238e6fd15ea8c (diff)
downloadsqlite-d5b447d9ac9bd1249f81daf9feb28d5ecee7f3c4.tar.gz
sqlite-d5b447d9ac9bd1249f81daf9feb28d5ecee7f3c4.zip
The OsFile under Unix records a pointer back to the pager. This is intended
to be used for an externalized locking patch. (CVS 1821) FossilOrigin-Name: 511ee6392472d250b542961d1f715cc7453598e6
-rw-r--r--manifest16
-rw-r--r--manifest.uuid2
-rw-r--r--src/os_unix.c1
-rw-r--r--src/os_unix.h2
-rw-r--r--src/pager.c3
5 files changed, 12 insertions, 12 deletions
diff --git a/manifest b/manifest
index de11b561f..5acf0c1d9 100644
--- 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
diff --git a/manifest.uuid b/manifest.uuid
index f06cc1c6f..bf9524ea4 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-e36e59f02eec166ef2c4e0991c97ceb536e3c3f3 \ No newline at end of file
+511ee6392472d250b542961d1f715cc7453598e6 \ No newline at end of file
diff --git a/src/os_unix.c b/src/os_unix.c
index 7bd9ded3f..cd7e7244b 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -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;
diff --git a/src/os_unix.h b/src/os_unix.h
index 9e11e4c92..72f818bef 100644
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -62,10 +62,10 @@
*/
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 */
diff --git a/src/pager.c b/src/pager.c
index b7a83ffb9..2361d9fe5 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -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;