Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/tool/max-limits.c # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / tool / max-limits.c` 43 lines ยท 1773 bytes Raw Blame History 1 /* 2 ** Link this program against an SQLite library of unknown provenance in order 3 ** to display the compile-time maximum values for various settings. 4 */ 5 #include "sqlite3.h" 6 #include 7 8 static const struct { 9 int eCode; 10 char *zName; 11 } aLimit[] = { 12 { SQLITE_LIMIT_LENGTH, "SQLITE_MAX_LENGTH" }, 13 { SQLITE_LIMIT_SQL_LENGTH, "SQLITE_MAX_SQL_LENGTH" }, 14 { SQLITE_LIMIT_COLUMN, "SQLITE_MAX_COLUMN" }, 15 { SQLITE_LIMIT_EXPR_DEPTH, "SQLITE_MAX_EXPR_DEPTH" }, 16 { SQLITE_LIMIT_COMPOUND_SELECT, "SQLITE_MAX_COMPOUND_SELECT" }, 17 { SQLITE_LIMIT_VDBE_OP, "SQLITE_MAX_VDBE_OP" }, 18 { SQLITE_LIMIT_FUNCTION_ARG, "SQLITE_MAX_FUNCTION_ARG" }, 19 { SQLITE_LIMIT_ATTACHED, "SQLITE_MAX_ATTACHED" }, 20 { SQLITE_LIMIT_LIKE_PATTERN_LENGTH, "SQLITE_MAX_LIKE_PATTERN_LENGTH" }, 21 { SQLITE_LIMIT_VARIABLE_NUMBER, "SQLITE_MAX_VARIABLE_NUMBER" }, 22 { SQLITE_LIMIT_TRIGGER_DEPTH, "SQLITE_MAX_TRIGGER_DEPTH" }, 23 { SQLITE_LIMIT_WORKER_THREADS, "SQLITE_MAX_WORKER_THREADS" }, 24 { SQLITE_LIMIT_PARSER_DEPTH, "SQLITE_MAX_PARSER_DEPTH" }, 25 { SQLITE_LIMIT_SCHEMA, "SQLITE_MAX_SCHEMA" }, 26 }; 27 28 static int maxLimit(sqlite3 *db, int eCode){ 29 int iOrig = sqlite3_limit(db, eCode, 0x7fffffff); 30 return sqlite3_limit(db, eCode, iOrig); 31 } 32 33 int main(int argc, char **argv){ 34 sqlite3 *db; 35 int j, rc; 36 rc = sqlite3_open(":memory:", &db); 37 if( rc==SQLITE_OK ){ 38 for(j=0; j