summaryrefslogtreecommitdiffstats
path: root/third_party/sqlite/system-sqlite.patch
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-05 16:17:40 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-05 16:17:40 +0000
commit986f4f740717ba72f9afe0dbf66906de27573365 (patch)
treee698c4e1ea86cb9fdf77330bea34a1ba8952a640 /third_party/sqlite/system-sqlite.patch
parent15dba1a65b73ae38b6a79f9dedd8fb820007404a (diff)
downloadchromium_src-986f4f740717ba72f9afe0dbf66906de27573365.zip
chromium_src-986f4f740717ba72f9afe0dbf66906de27573365.tar.gz
chromium_src-986f4f740717ba72f9afe0dbf66906de27573365.tar.bz2
Linux: backport SQLite's http://sqlite.org/src/ci/9109128cb5
This is a fix needed for experiments with using unpatched sqlite. BUG=22208 Review URL: http://codereview.chromium.org/7575027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/sqlite/system-sqlite.patch')
-rw-r--r--third_party/sqlite/system-sqlite.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/third_party/sqlite/system-sqlite.patch b/third_party/sqlite/system-sqlite.patch
new file mode 100644
index 0000000..f61f019
--- /dev/null
+++ b/third_party/sqlite/system-sqlite.patch
@@ -0,0 +1,48 @@
+This is a backport of http://sqlite.org/src/ci/9109128cb5,
+which is needed for experiments with using unpatched sqlite.
+If you hit a merge conflict on this file it is most likely
+that you've upgraded to version of sqlite that includes this patch.
+Index: src/os_unix.c
+===================================================================
+--- src/os_unix.c
++++ src/os_unix.c
+@@ -4787,11 +4787,11 @@
+ ** ignored and -1 is returned. The caller will try to open a new file
+ ** descriptor on the same path, fail, and return an error to SQLite.
+ **
+ ** Even if a subsequent open() call does succeed, the consequences of
+ ** not searching for a resusable file descriptor are not dire. */
+- if( 0==stat(zPath, &sStat) ){
++ if( 0==osStat(zPath, &sStat) ){
+ unixInodeInfo *pInode;
+
+ unixEnterMutex();
+ pInode = inodeList;
+ while( pInode && (pInode->fileId.dev!=sStat.st_dev
+@@ -4863,11 +4863,11 @@
+ while( nDb>0 && zPath[nDb]!='-' ) nDb--;
+ if( nDb==0 ) return SQLITE_OK;
+ memcpy(zDb, zPath, nDb);
+ zDb[nDb] = '\0';
+
+- if( 0==stat(zDb, &sStat) ){
++ if( 0==osStat(zDb, &sStat) ){
+ *pMode = sStat.st_mode & 0777;
+ }else{
+ rc = SQLITE_IOERR_FSTAT;
+ }
+ }else if( flags & SQLITE_OPEN_DELETEONCLOSE ){
+@@ -5208,11 +5208,11 @@
+ assert(!"Invalid flags argument");
+ }
+ *pResOut = (osAccess(zPath, amode)==0);
+ if( flags==SQLITE_ACCESS_EXISTS && *pResOut ){
+ struct stat buf;
+- if( 0==stat(zPath, &buf) && buf.st_size==0 ){
++ if( 0==osStat(zPath, &buf) && buf.st_size==0 ){
+ *pResOut = 0;
+ }
+ }
+ return SQLITE_OK;
+ }
+