diff options
author | drh <> | 2021-12-06 15:40:24 +0000 |
---|---|---|
committer | drh <> | 2021-12-06 15:40:24 +0000 |
commit | f6a4ef144e0746bb2bde64e3a9914addb4ce7e5c (patch) | |
tree | 7964aad6b64953bc8f6d15e18781637e4b9c60ff /src | |
parent | 38ed1ceb5a15cde81e2aa9c697382f7fd52cbdb2 (diff) | |
download | sqlite-f6a4ef144e0746bb2bde64e3a9914addb4ce7e5c.tar.gz sqlite-f6a4ef144e0746bb2bde64e3a9914addb4ce7e5c.zip |
Do not allow SQLITE_LIMIT_LENGTH to be set lower than 1 as an
SQLITE_LIMIT_LENGTH of 0 causes lots of unnecessary problems for
users of the sqlite3_str object.
FossilOrigin-Name: 8fd5b8ec4ab9b5554d27f25a4638d56e347eab78b60900f24b15a815d3731330
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index ce53496bc..804719f17 100644 --- a/src/main.c +++ b/src/main.c @@ -2857,6 +2857,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; } db->aLimit[limitId] = newLimit; } |