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

Fix the max_page_count pragma so that it will not set to a value smaller

than the current database size, as the documentation requires.  Also,
remove all occurances of atoi() from the core.

FossilOrigin-Name: 2031974b606ef713b5f34522b2221470d98687c5
This commit is contained in:
drh
2010-11-23 18:59:27 +00:00
parent 15eac4e48a
commit 60ac3f426c
8 changed files with 81 additions and 49 deletions

View File

@@ -541,6 +541,16 @@ int sqlite3GetInt32(const char *zNum, int *pValue){
return 1;
}
/*
** Return a 32-bit integer value extracted from a string. If the
** string is not an integer, just return 0.
*/
int sqlite3Atoi(const char *z){
int x = 0;
if( z ) sqlite3GetInt32(z, &x);
return x;
}
/*
** The variable-length integer encoding is as follows:
**