1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Make sure the page_count and quick_check pragmas work properly even when

their names are capitalized.  Fixes a problem reported on the mailing list.

FossilOrigin-Name: 150592b4b4d86372e70332d4f69e41a04c4c54c3
This commit is contained in:
drh
2011-10-13 14:41:22 +00:00
parent beaba6282b
commit 5d16a9a6c6
4 changed files with 22 additions and 10 deletions

View File

@@ -467,7 +467,7 @@ void sqlite3Pragma(
if( sqlite3ReadSchema(pParse) ) goto pragma_out;
sqlite3CodeVerifySchema(pParse, iDb);
iReg = ++pParse->nMem;
if( zLeft[0]=='p' ){
if( (zLeft[0]&0xf)==0 ){
sqlite3VdbeAddOp2(v, OP_Pagecount, iDb, iReg);
}else{
sqlite3VdbeAddOp3(v, OP_MaxPgcnt, iDb, iReg, sqlite3Atoi(zRight));
@@ -1080,7 +1080,7 @@ void sqlite3Pragma(
{ OP_ResultRow, 3, 1, 0},
};
int isQuick = (zLeft[0]=='q');
int isQuick = ((zLeft[0]&0xf)==1);
/* Initialize the VDBE program */
if( sqlite3ReadSchema(pParse) ) goto pragma_out;