1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Increase the minimum SQLITE_LENGTH_LIMIT from 1 to 30 to avoid problems doing

simple things like converting strings into integers.  See also
[8fd5b8ec4ab9b555].

FossilOrigin-Name: 6aa01707af4bd96f0f173f9e87f2398be7e6f246f59baa117092849a626b2d61
This commit is contained in:
drh
2024-11-08 20:57:45 +00:00
parent 23cfa0138e
commit 4ddeccfc15
5 changed files with 20 additions and 12 deletions

View File

@@ -2925,8 +2925,8 @@ int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
if( newLimit>=0 ){ /* IMP: R-52476-28732 */
if( newLimit>aHardLimit[limitId] ){
newLimit = aHardLimit[limitId]; /* IMP: R-51463-25634 */
}else if( newLimit<1 && limitId==SQLITE_LIMIT_LENGTH ){
newLimit = 1;
}else if( newLimit<SQLITE_MIN_LENGTH && limitId==SQLITE_LIMIT_LENGTH ){
newLimit = SQLITE_MIN_LENGTH;
}
db->aLimit[limitId] = newLimit;
}