1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Add an OS method for making copies of file descriptors. This fixes the

crash tests. (CVS 2786)

FossilOrigin-Name: 57a674fc71512f11393b8eb595961ec9465ba4e1
This commit is contained in:
drh
2005-11-26 03:43:23 +00:00
parent 9c06c95309
commit 18839217da
7 changed files with 39 additions and 13 deletions

View File

@@ -18,7 +18,7 @@
** file simultaneously, or one process from reading the database while
** another is writing.
**
** @(#) $Id: pager.c,v 1.218 2005/11/26 00:25:03 drh Exp $
** @(#) $Id: pager.c,v 1.219 2005/11/26 03:43:23 drh Exp $
*/
#ifndef SQLITE_OMIT_DISKIO
#include "sqliteInt.h"
@@ -1659,7 +1659,7 @@ int sqlite3pager_open(
strcpy(pPager->zJournal, zFullPathname);
sqliteFree(zFullPathname);
strcpy(&pPager->zJournal[nameLen], "-journal");
pPager->fd = fd;
sqlite3Io.xCopyOsFile(&pPager->fd,&fd);
pPager->journalOpen = 0;
pPager->useJournal = useJournal && !memDb;
pPager->noReadlock = noReadlock && readOnly;