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

Merge enhancments from wal2, which also merges trunk enhancements.

FossilOrigin-Name: 08dcb4593d32b240b585b3fb72fec835c8ad94d9e9c00253e70bbb1b4fc28c94
This commit is contained in:
drh
2019-07-08 21:25:24 +00:00
92 changed files with 4929 additions and 2352 deletions

View File

@@ -1631,7 +1631,9 @@ int sqlite3session_diff(
}
sqlite3_free((char*)azCol);
if( bMismatch ){
*pzErrMsg = sqlite3_mprintf("table schemas do not match");
if( pzErrMsg ){
*pzErrMsg = sqlite3_mprintf("table schemas do not match");
}
rc = SQLITE_SCHEMA;
}
if( bHasPk==0 ){
@@ -1837,7 +1839,7 @@ int sqlite3session_attach(
** set *pRc to SQLITE_NOMEM and return non-zero.
*/
static int sessionBufferGrow(SessionBuffer *p, size_t nByte, int *pRc){
if( *pRc==SQLITE_OK && p->nAlloc-p->nBuf<nByte ){
if( *pRc==SQLITE_OK && (size_t)(p->nAlloc-p->nBuf)<nByte ){
u8 *aNew;
i64 nNew = p->nAlloc ? p->nAlloc : 128;
do {