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

Merge the latest trunk changes.

FossilOrigin-Name: 84da122dd6e70ed603fea781dca204ae2f668c53
This commit is contained in:
drh
2016-04-23 19:55:59 +00:00
10 changed files with 1111 additions and 210 deletions

View File

@@ -2360,7 +2360,7 @@ static void cacheEntryClear(Parse *pParse, struct yColCache *p){
}
p->iReg = 0;
pParse->nColCache--;
assert( cacheIsValid(pParse) );
assert( pParse->db->mallocFailed || cacheIsValid(pParse) );
}
@@ -2405,7 +2405,7 @@ void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){
p->tempReg = 0;
p->lru = pParse->iCacheCnt++;
pParse->nColCache++;
assert( cacheIsValid(pParse) );
assert( pParse->db->mallocFailed || cacheIsValid(pParse) );
return;
}
}

View File

@@ -5420,10 +5420,10 @@ static const char *unixTempFileDir(void){
if( zDir==0 ) continue;
if( osStat(zDir, &buf) ) continue;
if( !S_ISDIR(buf.st_mode) ) continue;
if( osAccess(zDir, 07) ) continue;
break;
if( osAccess(zDir, 03) ) continue;
return zDir;
}
return zDir;
return 0;
}
/*
@@ -5439,9 +5439,11 @@ static int unixGetTempname(int nBuf, char *zBuf){
** using the io-error infrastructure to test that SQLite handles this
** function failing.
*/
zBuf[0] = 0;
SimulateIOError( return SQLITE_IOERR );
zDir = unixTempFileDir();
if( zDir==0 ) return SQLITE_IOERR_GETTEMPPATH;
do{
u64 r;
sqlite3_randomness(sizeof(r), &r);