1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add very simple tcl tests for the lsm1 extension.

FossilOrigin-Name: 5e0a97930b08fff1c3a29f5c8b2962b856e3302209228c0e71b9f1a1bd2a4be3
This commit is contained in:
dan
2017-07-14 11:40:48 +00:00
parent 17ca22616b
commit 4b8035e69b
6 changed files with 107 additions and 11 deletions

View File

@ -595,6 +595,7 @@ int lsm1Update(
){
lsm1_vtab *p = (lsm1_vtab*)pVTab;
const void *pKey;
void *pFree = 0;
int nKey;
int eType;
int rc = LSM_OK;
@ -629,6 +630,7 @@ int lsm1Update(
(unsigned char**)&pKey,&nKey,
pSpace,sizeof(pSpace));
if( rc ) return rc;
if( pKey!=(const void*)pSpace ) pFree = (void*)pKey;
}
if( sqlite3_value_type(argv[2+LSM1_COLUMN_BLOBVALUE])==SQLITE_BLOB ){
pVal = sqlite3_value_blob(argv[2+LSM1_COLUMN_BLOBVALUE]);
@ -683,7 +685,7 @@ int lsm1Update(
}
}
}
if( pKey!=(const void*)pSpace ) sqlite3_free((void*)pKey);
sqlite3_free(pFree);
return rc==LSM_OK ? SQLITE_OK : SQLITE_ERROR;
}