summaryrefslogtreecommitdiffstats
path: root/kexi/3rdparty/kexisql/src/btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/3rdparty/kexisql/src/btree.c')
-rw-r--r--kexi/3rdparty/kexisql/src/btree.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/kexi/3rdparty/kexisql/src/btree.c b/kexi/3rdparty/kexisql/src/btree.c
index 02e01249f..862f2742a 100644
--- a/kexi/3rdparty/kexisql/src/btree.c
+++ b/kexi/3rdparty/kexisql/src/btree.c
@@ -3169,7 +3169,7 @@ struct IntegrityCk {
/*
** Append a message to the error message string.
*/
-static void checkAppendMsg(IntegrityCk *pCheck, char *zMsg1, char *zMsg2){
+static void chectdeAppendMsg(IntegrityCk *pCheck, char *zMsg1, char *zMsg2){
if( pCheck->zErrMsg ){
char *zOld = pCheck->zErrMsg;
pCheck->zErrMsg = 0;
@@ -3193,13 +3193,13 @@ static int checkRef(IntegrityCk *pCheck, int iPage, char *zContext){
if( iPage>pCheck->nPage || iPage<0 ){
char zBuf[100];
sprintf(zBuf, "invalid page number %d", iPage);
- checkAppendMsg(pCheck, zContext, zBuf);
+ chectdeAppendMsg(pCheck, zContext, zBuf);
return 1;
}
if( pCheck->anRef[iPage]==1 ){
char zBuf[100];
sprintf(zBuf, "2nd reference to page %d", iPage);
- checkAppendMsg(pCheck, zContext, zBuf);
+ chectdeAppendMsg(pCheck, zContext, zBuf);
return 1;
}
return (pCheck->anRef[iPage]++)>1;
@@ -3222,13 +3222,13 @@ static void checkList(
OverflowPage *pOvfl;
if( iPage<1 ){
sprintf(zMsg, "%d pages missing from overflow list", N+1);
- checkAppendMsg(pCheck, zContext, zMsg);
+ chectdeAppendMsg(pCheck, zContext, zMsg);
break;
}
if( checkRef(pCheck, iPage, zContext) ) break;
if( sqlitepager_get(pCheck->pPager, (Pgno)iPage, (void**)&pOvfl) ){
sprintf(zMsg, "failed to get page %d", iPage);
- checkAppendMsg(pCheck, zContext, zMsg);
+ chectdeAppendMsg(pCheck, zContext, zMsg);
break;
}
if( isFreeList ){
@@ -3307,12 +3307,12 @@ static int checkTreePage(
sprintf(zContext, "On tree page %d: ", iPage);
if( (rc = sqlitepager_get(pCheck->pPager, (Pgno)iPage, (void**)&pPage))!=0 ){
sprintf(zMsg, "unable to get the page. error code=%d", rc);
- checkAppendMsg(pCheck, zContext, zMsg);
+ chectdeAppendMsg(pCheck, zContext, zMsg);
return 0;
}
if( (rc = initPage(pBt, pPage, (Pgno)iPage, pParent))!=0 ){
sprintf(zMsg, "initPage() returns error code %d", rc);
- checkAppendMsg(pCheck, zContext, zMsg);
+ chectdeAppendMsg(pCheck, zContext, zMsg);
sqlitepager_unref(pPage);
return 0;
}
@@ -3349,7 +3349,7 @@ static int checkTreePage(
zKey2 = sqliteMallocRaw( nKey2+1 );
getPayload(&cur, 0, nKey2, zKey2);
if( zKey1 && keyCompare(zKey1, nKey1, zKey2, nKey2)>=0 ){
- checkAppendMsg(pCheck, zContext, "Key is out of order");
+ chectdeAppendMsg(pCheck, zContext, "Key is out of order");
}
/* Check sanity of left child page.
@@ -3357,7 +3357,7 @@ static int checkTreePage(
pgno = SWAB32(pBt, pCell->h.leftChild);
d2 = checkTreePage(pCheck, pgno, pPage, zContext, zKey1,nKey1,zKey2,nKey2);
if( i>0 && d2!=depth ){
- checkAppendMsg(pCheck, zContext, "Child page depth differs");
+ chectdeAppendMsg(pCheck, zContext, "Child page depth differs");
}
depth = d2;
sqliteFree(zKey1);
@@ -3388,11 +3388,11 @@ static int checkTreePage(
for(i=0; i<SQLITE_USABLE_SIZE; i++){
if( hit[i]==0 ){
sprintf(zMsg, "Unused space at byte %d of page %d", i, iPage);
- checkAppendMsg(pCheck, zMsg, 0);
+ chectdeAppendMsg(pCheck, zMsg, 0);
break;
}else if( hit[i]>1 ){
sprintf(zMsg, "Multiple uses for byte %d of page %d", i, iPage);
- checkAppendMsg(pCheck, zMsg, 0);
+ chectdeAppendMsg(pCheck, zMsg, 0);
break;
}
}
@@ -3403,7 +3403,7 @@ static int checkTreePage(
if( pParent && pParent->nCell>2 && pPage->nFree>3*SQLITE_USABLE_SIZE/4 ){
sprintf(zMsg, "free space (%d) greater than max (%d)", pPage->nFree,
SQLITE_USABLE_SIZE/3);
- checkAppendMsg(pCheck, zContext, zMsg);
+ chectdeAppendMsg(pCheck, zContext, zMsg);
}
#endif
@@ -3460,7 +3460,7 @@ char *fileBtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){
if( sCheck.anRef[i]==0 ){
char zBuf[100];
sprintf(zBuf, "Page %d is never used", i);
- checkAppendMsg(&sCheck, zBuf, 0);
+ chectdeAppendMsg(&sCheck, zBuf, 0);
}
}
@@ -3473,7 +3473,7 @@ char *fileBtreeIntegrityCheck(Btree *pBt, int *aRoot, int nRoot){
"Outstanding page count goes from %d to %d during this analysis",
nRef, *sqlitepager_stats(pBt->pPager)
);
- checkAppendMsg(&sCheck, zBuf, 0);
+ chectdeAppendMsg(&sCheck, zBuf, 0);
}
/* Clean up and report errors.