diff options
author | drh <drh@noemail.net> | 2010-09-07 14:59:15 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2010-09-07 14:59:15 +0000 |
commit | 4e93f5bf90e33e05cf43c6961cb15d5ef1cc588c (patch) | |
tree | 1e21fdf6f1cd0213e44dfe403897e01af0b1e7a4 /src/sqlite.h.in | |
parent | 06ae6792712fdacfb0a813f6ee72f1e7e755134f (diff) | |
download | sqlite-4e93f5bf90e33e05cf43c6961cb15d5ef1cc588c.tar.gz sqlite-4e93f5bf90e33e05cf43c6961cb15d5ef1cc588c.zip |
Revised documentation for sqlite3_limit(). Added some evidence marks and
assert() statements to verify sqlite3_limit() behavior.
FossilOrigin-Name: 883b9b7441593200def05d8a482bc92d3dc0e96b
Diffstat (limited to 'src/sqlite.h.in')
-rw-r--r-- | src/sqlite.h.in | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 6edb8348c..3cbf47c6a 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -2395,17 +2395,22 @@ typedef struct sqlite3_stmt sqlite3_stmt; ** [database connection] whose limit is to be set or queried. The ** second parameter is one of the [limit categories] that define a ** class of constructs to be size limited. The third parameter is the -** new limit for that construct. The function returns the old limit.)^ +** new limit for that construct.)^ ** ** ^If the new limit is a negative number, the limit is unchanged. -** ^(For the limit category of SQLITE_LIMIT_XYZ there is a +** ^(For each limit category SQLITE_LIMIT_<i>NAME</i> there is a ** [limits | hard upper bound] -** set by a compile-time C preprocessor macro named -** [limits | SQLITE_MAX_XYZ]. +** set at compile-time by a C preprocessor macro called +** [limits | SQLITE_MAX_<i>NAME</i>]. ** (The "_LIMIT_" in the name is changed to "_MAX_".))^ ** ^Attempts to increase a limit above its hard upper bound are ** silently truncated to the hard upper bound. ** +** ^Regardless of whether or not the limit was changed, the +** [sqlite3_limit()] interface returns the prior value of the limit. +** ^Hence, to find the current value of a limit without changing it, +** simply invoke this interface with the third parameter set to -1. +** ** Run-time limits are intended for use in applications that manage ** both their own internal database and also databases that are controlled ** by untrusted external sources. An example application might be a @@ -2434,7 +2439,7 @@ int sqlite3_limit(sqlite3*, int id, int newVal); ** ** <dl> ** ^(<dt>SQLITE_LIMIT_LENGTH</dt> -** <dd>The maximum size of any string or BLOB or table row.<dd>)^ +** <dd>The maximum size of any string or BLOB or table row, in bytes.<dd>)^ ** ** ^(<dt>SQLITE_LIMIT_SQL_LENGTH</dt> ** <dd>The maximum length of an SQL statement, in bytes.</dd>)^ @@ -2465,8 +2470,7 @@ int sqlite3_limit(sqlite3*, int id, int newVal); ** [GLOB] operators.</dd>)^ ** ** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt> -** <dd>The maximum number of variables in an SQL statement that can -** be bound.</dd>)^ +** <dd>The maximum index number of any [parameter] in an SQL statement.)^ ** ** ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt> ** <dd>The maximum depth of recursion for triggers.</dd>)^ |