1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-10 01:02:56 +03:00

Add out-of-range tests on the first parameter to sqlite3_limit().

Add the ability to record tests that have been skipped due to
configuration limitations. (CVS 5009)

FossilOrigin-Name: b7ffc6f0f33b14430ab84a6c60110bc07514f056
This commit is contained in:
drh
2008-04-15 02:36:33 +00:00
parent 110af53360
commit 521cc8494e
7 changed files with 57 additions and 18 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.431 2008/04/03 16:28:25 danielk1977 Exp $
** $Id: main.c,v 1.432 2008/04/15 02:36:34 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1006,7 +1006,7 @@ static const int aHardLimit[] = {
*/
int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
int oldLimit;
if( limitId<0 || limitId>SQLITE_N_LIMIT ){
if( limitId<0 || limitId>=SQLITE_N_LIMIT ){
return -1;
}
oldLimit = db->aLimit[limitId];