diff options
author | 2022-03-07 11:08:26 +0100 | |
---|---|---|
committer | 2022-03-07 11:08:26 +0100 | |
commit | 07727753b96d209406783e5e539725bcdafebdc7 (patch) | |
tree | b32f11cbc304d633ed0acd8f84b4c11e909bb5f3 /vendor/modernc.org/sqlite/lib/sqlite_linux_386.go | |
parent | [documentation] Creates Docker documentation and docker-compose.yaml (#416) (diff) | |
download | gotosocial-07727753b96d209406783e5e539725bcdafebdc7.tar.xz |
[feature] Clean up/uncache remote media (#407)
* Add whereNotEmptyAndNotNull
* Add GetRemoteOlderThanDays
* Add GetRemoteOlderThanDays
* Add PruneRemote to Manager interface
* Start implementing PruneRemote
* add new attachment + status to tests
* fix up and test GetRemoteOlderThan
* fix bad import
* PruneRemote: return number pruned
* add Cached column to mediaattachment
* update + test pruneRemote
* update mediaTest
* use Cached column
* upstep bun to latest version
* embed structs in mediaAttachment
* migrate mediaAttachment to new format
* don't default cached to true
* select only remote media
* update db dependencies
* step bun back to last working version
* update pruneRemote to use Cached field
* fix storage path of test attachments
* add recache logic to manager
* fix trimmed aspect ratio
* test prune and recache
* return errwithcode
* tidy up different paths for emoji vs attachment
* fix incorrect thumbnail type being stored
* expose TransportController to media processor
* implement tee-ing recached content
* add thoughts of dog to test fedi attachments
* test get remote files
* add comment on PruneRemote
* add postData cleanup to recache
* test thumbnail fetching
* add incredible diagram
* go mod tidy
* buffer pipes for recache streaming
* test for client stops reading after 1kb
* add media-remote-cache-days to config
* add cron package
* wrap logrus so it's available to cron
* start and stop cron jobs gracefully
Diffstat (limited to 'vendor/modernc.org/sqlite/lib/sqlite_linux_386.go')
-rw-r--r-- | vendor/modernc.org/sqlite/lib/sqlite_linux_386.go | 18979 |
1 files changed, 9638 insertions, 9341 deletions
diff --git a/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go b/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go index dc8e35a65..c20de698a 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_linux_386.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3370000/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_PRIVATE= -export-defines "" -export-enums "" -export-externs X -export-fields F -export-typedefs "" -ignore-unsupported-alignment -pkgname sqlite3 -o lib/sqlite_linux_386.go -trace-translation-units testdata/sqlite-amalgamation-3370200/sqlite3.c -DNDEBUG -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_CORE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_GEOPOLY -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_ENABLE_OFFSET_SQL_FUNC -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_RBU -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_SNAPSHOT -DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_SOUNDEX -DSQLITE_THREADSAFE=1 -DSQLITE_OS_UNIX=1', DO NOT EDIT. package sqlite3 @@ -1748,6 +1748,7 @@ const ( SQLITE_ENABLE_GEOPOLY = 1 SQLITE_ENABLE_JSON1 = 1 SQLITE_ENABLE_LOCKING_STYLE = 0 + SQLITE_ENABLE_MATH_FUNCTIONS = 1 SQLITE_ENABLE_MEMORY_MANAGEMENT = 1 SQLITE_ENABLE_OFFSET_SQL_FUNC = 1 SQLITE_ENABLE_PREUPDATE_HOOK = 1 @@ -2130,7 +2131,7 @@ const ( SQLITE_SHM_UNLOCK = 1 SQLITE_SORTER_PMASZ = 250 SQLITE_SOUNDEX = 1 - SQLITE_SOURCE_ID = "2021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a" + SQLITE_SOURCE_ID = "2022-01-06 13:25:41 872ba256cbf61d9290b571c0e6d82a20c224ca3ad82971edc46b29818d5d17a0" SQLITE_SO_ASC = 0 SQLITE_SO_DESC = 1 SQLITE_SO_UNDEFINED = -1 @@ -2235,8 +2236,8 @@ const ( SQLITE_UTF8 = 1 SQLITE_VDBEINT_H = 0 SQLITE_VDBE_H = 0 - SQLITE_VERSION = "3.37.0" - SQLITE_VERSION_NUMBER = 3037000 + SQLITE_VERSION = "3.37.2" + SQLITE_VERSION_NUMBER = 3037002 SQLITE_VTABRISK_High = 2 SQLITE_VTABRISK_Low = 0 SQLITE_VTABRISK_Normal = 1 @@ -3712,7 +3713,7 @@ type X__float128 = float64 /* <builtin>:47:21 */ // ***************************************************************************** // // This file is an amalgamation of many separate C source files from SQLite -// version 3.37.0. By combining all the individual C code files into this +// version 3.37.2. By combining all the individual C code files into this // single large file, the entire code can be compiled as a single translation // unit. This allows many compilers to do optimizations that would not be // possible if the files were compiled separately. Performance improvements @@ -4062,7 +4063,7 @@ type Va_list = X__gnuc_va_list /* stdarg.h:99:24 */ // of the hash might be different from [SQLITE_SOURCE_ID].)^ // // See also: [sqlite_version()] and [sqlite_source_id()]. -var Xsqlite3_version = *(*[7]int8)(unsafe.Pointer(ts /* "3.37.0" */)) /* sqlite3.c:491:23 */ +var Xsqlite3_version = *(*[7]int8)(unsafe.Pointer(ts)) /* sqlite3.c:491:23 */ // CAPI3REF: Database Connection Handle // KEYWORDS: {database connection} {database connections} @@ -10169,6 +10170,8 @@ type Parse1 = struct { FpAinc uintptr FpToplevel uintptr FpTriggerTab uintptr + FpTriggerPrg uintptr + FpCleanup uintptr Fu1 struct{ FaddrCrTab int32 } FnQueryLoop U32 Foldmask U32 @@ -10197,9 +10200,7 @@ type Parse1 = struct { FzAuthContext uintptr FsArg Token FapVtabLock uintptr - FpTriggerPrg uintptr FpWith uintptr - FpCleanup uintptr FpRename uintptr } /* sqlite3.c:578:9 */ @@ -11585,64 +11586,63 @@ type RenameCtx1 = struct { // This array looks large, but in a typical installation actually uses // only a handful of compile-time options, so most times this array is usually // rather short and uses little memory space. -var sqlite3azCompileOpt = [51]uintptr{ - - // BEGIN CODE GENERATED BY tool/mkctime.tcl - ts + 7, /* "ATOMIC_INTRINSIC..." */ - ts + 27, /* "COMPILER=gcc-10...." */ - ts + 56, /* "DEFAULT_AUTOVACU..." */ - ts + 75, /* "DEFAULT_CACHE_SI..." */ - ts + 100, /* "DEFAULT_FILE_FOR..." */ - ts + 122, /* "DEFAULT_JOURNAL_..." */ - ts + 152, /* "DEFAULT_MMAP_SIZ..." */ - ts + 172, /* "DEFAULT_PAGE_SIZ..." */ - ts + 195, /* "DEFAULT_PCACHE_I..." */ - ts + 220, /* "DEFAULT_RECURSIV..." */ - ts + 247, /* "DEFAULT_SECTOR_S..." */ - ts + 272, /* "DEFAULT_SYNCHRON..." */ - ts + 294, /* "DEFAULT_WAL_AUTO..." */ - ts + 326, /* "DEFAULT_WAL_SYNC..." */ - ts + 352, /* "DEFAULT_WORKER_T..." */ - ts + 377, /* "ENABLE_COLUMN_ME..." */ - ts + 400, /* "ENABLE_FTS5" */ - ts + 412, /* "ENABLE_GEOPOLY" */ - ts + 427, /* "ENABLE_JSON1" */ - ts + 440, /* "ENABLE_MEMORY_MA..." */ - ts + 465, /* "ENABLE_OFFSET_SQ..." */ - ts + 488, /* "ENABLE_PREUPDATE..." */ - ts + 510, /* "ENABLE_RBU" */ - ts + 521, /* "ENABLE_RTREE" */ - ts + 534, /* "ENABLE_SESSION" */ - ts + 549, /* "ENABLE_SNAPSHOT" */ - ts + 565, /* "ENABLE_STAT4" */ - ts + 578, /* "ENABLE_UNLOCK_NO..." */ - ts + 599, /* "LIKE_DOESNT_MATC..." */ - ts + 623, /* "MALLOC_SOFT_LIMI..." */ - ts + 646, /* "MAX_ATTACHED=10" */ - ts + 662, /* "MAX_COLUMN=2000" */ - ts + 678, /* "MAX_COMPOUND_SEL..." */ - ts + 702, /* "MAX_DEFAULT_PAGE..." */ - ts + 729, /* "MAX_EXPR_DEPTH=1..." */ - ts + 749, /* "MAX_FUNCTION_ARG..." */ - ts + 770, /* "MAX_LENGTH=10000..." */ - ts + 792, /* "MAX_LIKE_PATTERN..." */ - ts + 822, /* "MAX_MMAP_SIZE=0x..." */ - ts + 847, /* "MAX_PAGE_COUNT=1..." */ - ts + 873, /* "MAX_PAGE_SIZE=65..." */ - ts + 893, /* "MAX_SQL_LENGTH=1..." */ - ts + 919, /* "MAX_TRIGGER_DEPT..." */ - ts + 942, /* "MAX_VARIABLE_NUM..." */ - ts + 968, /* "MAX_VDBE_OP=2500..." */ - ts + 990, /* "MAX_WORKER_THREA..." */ - ts + 1011, /* "MUTEX_NOOP" */ - ts + 1022, /* "SOUNDEX" */ - ts + 1030, /* "SYSTEM_MALLOC" */ - ts + 1044, /* "TEMP_STORE=1" */ - ts + 1057, /* "THREADSAFE=1" */ - // END CODE GENERATED BY tool/mkctime.tcl -} /* sqlite3.c:20514:19 */ - -func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21246:27: */ +var sqlite3azCompileOpt = [52]uintptr{ + + ts + 7, + ts + 27, + ts + 56, + ts + 75, + ts + 100, + ts + 122, + ts + 152, + ts + 172, + ts + 195, + ts + 220, + ts + 247, + ts + 272, + ts + 294, + ts + 326, + ts + 352, + ts + 377, + ts + 400, + ts + 412, + ts + 427, + ts + 440, + ts + 462, + ts + 487, + ts + 510, + ts + 532, + ts + 543, + ts + 556, + ts + 571, + ts + 587, + ts + 600, + ts + 621, + ts + 645, + ts + 668, + ts + 684, + ts + 700, + ts + 724, + ts + 751, + ts + 771, + ts + 792, + ts + 814, + ts + 844, + ts + 869, + ts + 895, + ts + 915, + ts + 941, + ts + 964, + ts + 990, + ts + 1012, + ts + 1033, + ts + 1044, + ts + 1052, + ts + 1066, + ts + 1079, +} /* sqlite3.c:20516:19 */ + +func Xsqlite3CompileOptions(tls *libc.TLS, pnOpt uintptr) uintptr { /* sqlite3.c:21248:27: */ *(*int32)(unsafe.Pointer(pnOpt)) = int32(uint32(unsafe.Sizeof(sqlite3azCompileOpt)) / uint32(unsafe.Sizeof(uintptr(0)))) return uintptr(uintptr(unsafe.Pointer(&sqlite3azCompileOpt))) } @@ -11709,10 +11709,10 @@ var Xsqlite3UpperToLower = [274]uint8{ uint8(1), uint8(0), uint8(0), uint8(1), uint8(1), uint8(0), // aLTb[]: Use when compare(A,B) less than zero uint8(0), uint8(1), uint8(0), uint8(1), uint8(0), uint8(1), // aEQb[]: Use when compare(A,B) equals zero uint8(1), uint8(0), uint8(1), uint8(0), uint8(0), uint8(1), // aGTb[]: Use when compare(A,B) greater than zero -} /* sqlite3.c:21278:36 */ -var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21340:36 */ -var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21341:36 */ -var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21342:36 */ +} /* sqlite3.c:21280:36 */ +var Xsqlite3aLTb uintptr = 0 /* sqlite3.c:21342:36 */ +var Xsqlite3aEQb uintptr = 0 /* sqlite3.c:21343:36 */ +var Xsqlite3aGTb uintptr = 0 /* sqlite3.c:21344:36 */ // The following 256 byte lookup table is used to support SQLites built-in // equivalents to the following standard library functions: @@ -11776,7 +11776,7 @@ var Xsqlite3CtypeMap = [256]uint8{ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // e8..ef ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f0..f7 ........ uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), uint8(0x40), // f8..ff ........ -} /* sqlite3.c:21372:36 */ +} /* sqlite3.c:21374:36 */ // EVIDENCE-OF: R-02982-34736 In order to maintain full backwards // compatibility for legacy applications, the URI filename capability is @@ -11836,12 +11836,12 @@ var Xsqlite3Config = Sqlite3Config{ FmxMemdbSize: int64(SQLITE_MEMDB_DEFAULT_MAXSIZE), // bLocaltimeFault FiOnceResetThreshold: 0x7ffffffe, // iOnceResetThreshold FszSorterRef: U32(SQLITE_DEFAULT_SORTERREF_SIZE), // iPrngSeed -} /* sqlite3.c:21492:48 */ +} /* sqlite3.c:21494:48 */ // Hash table for global functions - functions common to all // database connections. After initialization, this table is // read-only. -var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21553:28: */ +var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21555:28: */ // The value of the "pending" byte must be 0x40000000 (1 byte past the // 1-gibabyte boundary) in a compatible database. SQLite never uses @@ -11859,21 +11859,21 @@ var Xsqlite3BuiltinFunctions FuncDefHash /* sqlite3.c:21553:28: */ // 0x40000000 results in an incompatible database file format! // Changing the pending byte during operation will result in undefined // and incorrect behavior. -var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21594:20 */ +var Xsqlite3PendingByte int32 = 0x40000000 /* sqlite3.c:21596:20 */ // Tracing flags set by SQLITE_TESTCTRL_TRACEFLAGS. -var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21600:20 */ -var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21601:20 */ +var Xsqlite3SelectTrace U32 = U32(0) /* sqlite3.c:21602:20 */ +var Xsqlite3WhereTrace U32 = U32(0) /* sqlite3.c:21603:20 */ // #include "opcodes.h" // Properties of opcodes. The OPFLG_INITIALIZER macro is // created by mkopcodeh.awk during compilation. Data is obtained // from the comments following the "case OP_xxxx:" statements in // the vdbe.c file. -var Xsqlite3OpcodeProperty = [182]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10) /* 80 */, uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00) /* 88 */, uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 136 */, uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00) /* 144 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10) /* 176 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} /* sqlite3.c:21610:36 */ +var Xsqlite3OpcodeProperty = [182]uint8{ /* 0 */ uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x00), uint8(0x10) /* 8 */, uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x03) /* 16 */, uint8(0x01), uint8(0x01), uint8(0x03), uint8(0x12), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x09) /* 24 */, uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x09), uint8(0x09), uint8(0x09), uint8(0x09) /* 32 */, uint8(0x09), uint8(0x09), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x01) /* 40 */, uint8(0x01), uint8(0x01), uint8(0x01), uint8(0x26), uint8(0x26), uint8(0x23), uint8(0x0b), uint8(0x01) /* 48 */, uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x03), uint8(0x0b), uint8(0x0b), uint8(0x0b), uint8(0x0b) /* 56 */, uint8(0x0b), uint8(0x0b), uint8(0x01), uint8(0x03), uint8(0x03), uint8(0x01), uint8(0x01), uint8(0x01) /* 64 */, uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x08), uint8(0x00), uint8(0x10), uint8(0x10) /* 72 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x10) /* 80 */, uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x02), uint8(0x02), uint8(0x02), uint8(0x00) /* 88 */, uint8(0x00), uint8(0x12), uint8(0x1e), uint8(0x20), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 96 */, uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x26), uint8(0x26) /* 104 */, uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26), uint8(0x26) /* 112 */, uint8(0x00), uint8(0x12), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00) /* 120 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10), uint8(0x00), uint8(0x00) /* 128 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00) /* 136 */, uint8(0x04), uint8(0x04), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x10), uint8(0x00) /* 144 */, uint8(0x00), uint8(0x10), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 152 */, uint8(0x10), uint8(0x00), uint8(0x06), uint8(0x10), uint8(0x00), uint8(0x04), uint8(0x1a), uint8(0x00) /* 160 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00) /* 168 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x10), uint8(0x10) /* 176 */, uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00), uint8(0x00)} /* sqlite3.c:21612:36 */ // Name of the default collating sequence -var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1070 /* "BINARY" */)) /* sqlite3.c:21615:27 */ +var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1092)) /* sqlite3.c:21617:27 */ // Standard typenames. These names must match the COLTYPE_* definitions. // Adjust the SQLITE_N_STDTYPE value if adding or removing entries. @@ -11889,7 +11889,7 @@ var Xsqlite3StrBINARY = *(*[7]int8)(unsafe.Pointer(ts + 1070 /* "BINARY" */)) /* // sqlite3StdTypeMap[] The type value (as returned from // sqlite3_column_type() or sqlite3_value_type()) // for each entry in sqlite3StdType[]. -var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21633:36 */ +var Xsqlite3StdTypeLen = [6]uint8{uint8(3), uint8(4), uint8(3), uint8(7), uint8(4), uint8(4)} /* sqlite3.c:21635:36 */ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_NUMERIC), int8(SQLITE_AFF_BLOB), @@ -11897,7 +11897,7 @@ var Xsqlite3StdTypeAffinity = [6]int8{ int8(SQLITE_AFF_INTEGER), int8(SQLITE_AFF_REAL), int8(SQLITE_AFF_TEXT), -} /* sqlite3.c:21634:27 */ +} /* sqlite3.c:21636:27 */ var Xsqlite3StdTypeMap = [6]int8{ int8(0), int8(SQLITE_BLOB), @@ -11905,15 +11905,15 @@ var Xsqlite3StdTypeMap = [6]int8{ int8(SQLITE_INTEGER), int8(SQLITE_FLOAT), int8(SQLITE_TEXT), -} /* sqlite3.c:21642:27 */ +} /* sqlite3.c:21644:27 */ var Xsqlite3StdType = [6]uintptr{ - ts + 1077, /* "ANY" */ - ts + 1081, /* "BLOB" */ - ts + 1086, /* "INT" */ - ts + 1090, /* "INTEGER" */ - ts + 1098, /* "REAL" */ - ts + 1103, /* "TEXT" */ -} /* sqlite3.c:21650:27 */ + ts + 1099, + ts + 1103, + ts + 1108, + ts + 1112, + ts + 1120, + ts + 1125, +} /* sqlite3.c:21652:27 */ //************* End of global.c ********************************************* //************* Begin file status.c ***************************************** @@ -11958,10 +11958,10 @@ var Xsqlite3StdType = [6]uintptr{ // SQL is translated into a sequence of instructions to be // executed by a virtual machine. Each instruction is an instance // of the following structure. -type Op = VdbeOp1 /* sqlite3.c:21724:23 */ +type Op = VdbeOp1 /* sqlite3.c:21726:23 */ // Boolean values -type Bool = uint32 /* sqlite3.c:21729:18 */ +type Bool = uint32 /* sqlite3.c:21731:18 */ // Opaque type used by code in vdbesort.c type VdbeSorter1 = struct { @@ -11984,10 +11984,10 @@ type VdbeSorter1 = struct { FtypeMask U8 F__ccgo_pad1 [3]byte FaTask [1]SortSubtask -} /* sqlite3.c:21732:9 */ +} /* sqlite3.c:21734:9 */ // Opaque type used by code in vdbesort.c -type VdbeSorter = VdbeSorter1 /* sqlite3.c:21732:27 */ +type VdbeSorter = VdbeSorter1 /* sqlite3.c:21734:27 */ // Elements of the linked list at Vdbe.pAuxData type AuxData1 = struct { @@ -11999,7 +11999,7 @@ type AuxData1 = struct { } /* sqlite3.c:578:9 */ // Elements of the linked list at Vdbe.pAuxData -type AuxData = AuxData1 /* sqlite3.c:21735:24 */ +type AuxData = AuxData1 /* sqlite3.c:21737:24 */ // Types of VDBE cursors @@ -12051,7 +12051,7 @@ type VdbeCursor1 = struct { // * A sorter // * A virtual table // * A one-row "pseudotable" stored in a single register -type VdbeCursor = VdbeCursor1 /* sqlite3.c:21753:27 */ +type VdbeCursor = VdbeCursor1 /* sqlite3.c:21755:27 */ // A value for VdbeCursor.cacheStatus that means the cache is always invalid. @@ -12116,7 +12116,7 @@ type VdbeFrame1 = struct { // // The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is // set to NULL if the currently executing frame is the main program. -type VdbeFrame = VdbeFrame1 /* sqlite3.c:21840:26 */ +type VdbeFrame = VdbeFrame1 /* sqlite3.c:21842:26 */ // Magic number for sanity checking on VdbeFrame objects @@ -12130,7 +12130,7 @@ type MemValue = struct{ Fr float64 } /* sqlite3.c:578:9 */ // A bitfield type for use inside of structures. Always follow with :N where // N is the number of bits. -type Bft = uint32 /* sqlite3.c:22023:18 */ // Bit Field Type +type Bft = uint32 /* sqlite3.c:22025:18 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. @@ -12142,13 +12142,13 @@ type ScanStatus1 = struct { FnEst LogEst F__ccgo_pad1 [2]byte FzName uintptr -} /* sqlite3.c:22028:9 */ +} /* sqlite3.c:22030:9 */ // Bit Field Type // The ScanStatus object holds a single value for the // sqlite3_stmt_scanstatus() interface. -type ScanStatus = ScanStatus1 /* sqlite3.c:22028:27 */ +type ScanStatus = ScanStatus1 /* sqlite3.c:22030:27 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12159,7 +12159,7 @@ type ScanStatus = ScanStatus1 /* sqlite3.c:22028:27 */ type DblquoteStr1 = struct { FpNextStr uintptr Fz [8]int8 -} /* sqlite3.c:22045:9 */ +} /* sqlite3.c:22047:9 */ // The DblquoteStr object holds the text of a double-quoted // string for a prepared statement. A linked list of these objects @@ -12167,20 +12167,20 @@ type DblquoteStr1 = struct { // When computing a normalized SQL statement for an SQL statement, that // list is consulted for each double-quoted identifier to see if the // identifier should really be a string literal. -type DblquoteStr = DblquoteStr1 /* sqlite3.c:22045:28 */ +type DblquoteStr = DblquoteStr1 /* sqlite3.c:22047:28 */ //************* End of vdbeInt.h ******************************************** //************* Continuing where we left off in status.c ******************** // Variables in which to record status information. -type Sqlite3StatValueType = U32 /* sqlite3.c:22320:13 */ +type Sqlite3StatValueType = U32 /* sqlite3.c:22322:13 */ type sqlite3StatType = struct { FnowValue [10]Sqlite3StatValueType FmxValue [10]Sqlite3StatValueType -} /* sqlite3.c:22322:9 */ +} /* sqlite3.c:22324:9 */ -type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22322:32 */ -var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22326:3 */ +type Sqlite3StatType = sqlite3StatType /* sqlite3.c:22324:32 */ +var sqlite3Stat = sqlite3StatType{} /* sqlite3.c:22328:3 */ // Elements of sqlite3Stat[] are protected by either the memory allocator // mutex, or by the pcache1 mutex. The following array determines which. @@ -12195,7 +12195,7 @@ var statMutex = [10]int8{ int8(1), // SQLITE_STATUS_PAGECACHE_SIZE int8(0), // SQLITE_STATUS_SCRATCH_SIZE int8(0), // SQLITE_STATUS_MALLOC_COUNT -} /* sqlite3.c:22332:19 */ +} /* sqlite3.c:22334:19 */ // The "wsdStat" macro will resolve to the status information // state vector. If writable static data is unsupported on the target, @@ -12205,7 +12205,7 @@ var statMutex = [10]int8{ // Return the current value of a status parameter. The caller must // be holding the appropriate mutex. -func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22364:30: */ +func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:22366:30: */ return Sqlite3_int64(*(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4))) } @@ -12219,7 +12219,7 @@ func Xsqlite3StatusValue(tls *libc.TLS, op int32) Sqlite3_int64 { /* sqlite3.c:2 // // The StatusDown() routine lowers the current value by N. The highwater // mark is unchanged. N must be non-negative for StatusDown(). -func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22384:21: */ +func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22386:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) += Sqlite3StatValueType(N) if *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) > *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + 40 + uintptr(op)*4)) { @@ -12227,14 +12227,14 @@ func Xsqlite3StatusUp(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22384:21: } } -func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22395:21: */ +func Xsqlite3StatusDown(tls *libc.TLS, op int32, N int32) { /* sqlite3.c:22397:21: */ *(*Sqlite3StatValueType)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Stat)) + uintptr(op)*4)) -= Sqlite3StatValueType(N) } // Adjust the highwater mark if necessary. // The caller must hold the appropriate mutex. -func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22409:21: */ +func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22411:21: */ var newValue Sqlite3StatValueType newValue = Sqlite3StatValueType(X) @@ -12245,12 +12245,12 @@ func Xsqlite3StatusHighwater(tls *libc.TLS, op int32, X int32) { /* sqlite3.c:22 } // Query status information. -func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22429:16: */ +func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22431:16: */ var pMutex uintptr _ = pMutex if op < 0 || op >= int32(uint32(unsafe.Sizeof([10]Sqlite3StatValueType{}))/uint32(unsafe.Sizeof(Sqlite3StatValueType(0)))) { - return Xsqlite3MisuseError(tls, 22438) + return Xsqlite3MisuseError(tls, 22440) } if statMutex[op] != 0 { pMutex = Xsqlite3Pcache1Mutex(tls) @@ -12268,14 +12268,14 @@ func Xsqlite3_status64(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uin return SQLITE_OK } -func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22454:16: */ +func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22456:16: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Sqlite3_int64)(unsafe.Pointer(bp /* iCur */)) = int64(0) *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iHwtr */)) = int64(0) var rc int32 - rc = Xsqlite3_status64(tls, op, bp /* &iCur */, bp+8 /* &iHwtr */, resetFlag) + rc = Xsqlite3_status64(tls, op, bp, bp+8, resetFlag) if rc == 0 { *(*int32)(unsafe.Pointer(pCurrent)) = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp /* iCur */))) *(*int32)(unsafe.Pointer(pHighwater)) = int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iHwtr */))) @@ -12284,7 +12284,7 @@ func Xsqlite3_status(tls *libc.TLS, op int32, pCurrent uintptr, pHighwater uintp } // Return the number of LookasideSlot elements on the linked list -func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22471:12: */ +func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22473:12: */ var cnt U32 = U32(0) for p != 0 { p = (*LookasideSlot)(unsafe.Pointer(p)).FpNext @@ -12294,7 +12294,7 @@ func countLookasideSlots(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:22471:12: } // Count the number of slots of lookaside memory that are outstanding -func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22483:20: */ +func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 { /* sqlite3.c:22485:20: */ var nInit U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpInit) var nFree U32 = countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpFree) nInit = nInit + countLookasideSlots(tls, (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpSmallInit) @@ -12306,7 +12306,7 @@ func Xsqlite3LookasideUsed(tls *libc.TLS, db uintptr, pHighwater uintptr) int32 } // Query status information for a single database connection -func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22497:16: */ +func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, pHighwater uintptr, resetFlag int32) int32 { /* sqlite3.c:22499:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -12465,7 +12465,7 @@ func Xsqlite3_db_status(tls *libc.TLS, db uintptr, op int32, pCurrent uintptr, p for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpBt != 0 { var pPager uintptr = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpBt) - Xsqlite3PagerCacheStat(tls, pPager, op, resetFlag, bp+8 /* &nRet */) + Xsqlite3PagerCacheStat(tls, pPager, op, resetFlag, bp+8) } } *(*int32)(unsafe.Pointer(pHighwater)) = 0 // IMP: R-42420-56072 @@ -12888,14 +12888,14 @@ type DateTime1 = struct { FtzSet int8 FisError int8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:22757:9 */ +} /* sqlite3.c:22759:9 */ // The MSVC CRT on Windows CE may not have a localtime() function. // So declare a substitute. The substitute function itself is // defined in "os_win.c". // A structure for holding a single date and time. -type DateTime = DateTime1 /* sqlite3.c:22757:25 */ +type DateTime = DateTime1 /* sqlite3.c:22759:25 */ // Convert zDate into one or more integers according to the conversion // specifier zFormat. @@ -12922,7 +12922,7 @@ type DateTime = DateTime1 /* sqlite3.c:22757:25 */ // the 2-digit day which is the last integer in the set. // // The function returns the number of successful conversions. -func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:22801:12: */ +func getDigits(tls *libc.TLS, zDate uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:22803:12: */ var ap Va_list _ = ap var cnt int32 @@ -12979,7 +12979,7 @@ end_getDigits: return cnt } -var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:22804:20 */ +var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqlite3.c:22806:20 */ // Parse a timezone extension on the end of a date-time. // The extension is of the form: @@ -12995,7 +12995,7 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // return non-zero. // // A missing specifier is not considered an error. -func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22855:12: */ +func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22857:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -13043,7 +13043,7 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+1108, libc.VaList(bp, bp+16, bp+20)) != 2) { + if !(getDigits(tls, zDate, ts+1130, libc.VaList(bp, bp+16, bp+20)) != 2) { goto __9 } return 1 @@ -13069,7 +13069,7 @@ __11: // fractional seconds FFFF can be one or more digits. // // Return 1 if there is a parsing error and 0 on success. -func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22891:12: */ +func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22893:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13080,13 +13080,13 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 // var s int32 at bp+32, 4 var ms float64 = 0.0 - if getDigits(tls, zDate, ts+1116, libc.VaList(bp, bp+24, bp+28)) != 2 { + if getDigits(tls, zDate, ts+1138, libc.VaList(bp, bp+24, bp+28)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+1124, libc.VaList(bp+16, bp+32)) != 1 { + if getDigits(tls, zDate, ts+1146, libc.VaList(bp+16, bp+32)) != 1 { return 1 } zDate += uintptr(2) @@ -13122,7 +13122,7 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 } // Put the DateTime object into its error state. -func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:22931:13: */ +func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:22933:13: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(DateTime{}))) (*DateTime)(unsafe.Pointer(p)).FisError = int8(1) } @@ -13131,7 +13131,7 @@ func datetimeError(tls *libc.TLS, p uintptr) { /* sqlite3.c:22931:13: */ // that the YYYY-MM-DD is according to the Gregorian calendar. // // Reference: Meeus page 61 -func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22942:13: */ +func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22944:13: */ var Y int32 var M int32 var D int32 @@ -13187,7 +13187,7 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22942:13: */ // Write the result into the DateTime structure and return 0 // on success and 1 if the input string is not a well-formed // date. -func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22992:12: */ +func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22994:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -13205,7 +13205,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c } else { neg = 0 } - if getDigits(tls, zDate, ts+1128, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { + if getDigits(tls, zDate, ts+1150, libc.VaList(bp, bp+24, bp+28, bp+32)) != 3 { return 1 } zDate += uintptr(10) @@ -13238,7 +13238,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c // Set the time to the current time reported by the VFS. // // Return the number of errors. -func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23029:12: */ +func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* sqlite3.c:23031:12: */ (*DateTime)(unsafe.Pointer(p)).FiJD = Xsqlite3StmtCurrentTime(tls, context) if (*DateTime)(unsafe.Pointer(p)).FiJD > int64(0) { (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(1) @@ -13253,7 +13253,7 @@ func setDateTimeToCurrent(tls *libc.TLS, context uintptr, p uintptr) int32 { /* // or the number of seconds since 1970. If the value if r is within // range of a julian day number, install it as such and set validJD. // If the value is a valid unix timestamp, put it in p->s and set p->rawS. -func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23045:13: */ +func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23047:13: */ (*DateTime)(unsafe.Pointer(p)).Fs = r (*DateTime)(unsafe.Pointer(p)).FrawS = int8(1) if r >= 0.0 && r < 5373484.5 { @@ -13276,7 +13276,7 @@ func setRawDateNumber(tls *libc.TLS, p uintptr, r float64) { /* sqlite3.c:23045: // (":SS.FFF") is option. The year and date can be omitted as long // as there is a time string. The time string can be omitted as long // as there is a year and date. -func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23070:12: */ +func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) int32 { /* sqlite3.c:23072:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -13286,7 +13286,7 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i return 0 } else if parseHhMmSs(tls, zDate, p) == 0 { return 0 - } else if Xsqlite3StrICmp(tls, zDate, ts+1140) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { + } else if Xsqlite3StrICmp(tls, zDate, ts+1162) == 0 && Xsqlite3NotPureFunc(tls, context) != 0 { return setDateTimeToCurrent(tls, context, p) } else if Xsqlite3AtoF(tls, zDate, bp, Xsqlite3Strlen30(tls, zDate), uint8(SQLITE_UTF8)) > 0 { setRawDateNumber(tls, p, *(*float64)(unsafe.Pointer(bp /* r */))) @@ -13305,12 +13305,12 @@ func parseDateOrTime(tls *libc.TLS, context uintptr, zDate uintptr, p uintptr) i // Return TRUE if the given julian day number is within range. // // The input is the JulianDay times 86400000. -func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23103:12: */ +func validJulianDay(tls *libc.TLS, iJD Sqlite3_int64) int32 { /* sqlite3.c:23105:12: */ return libc.Bool32(iJD >= int64(0) && iJD <= I64(int64(0x1a640))<<32|int64(0x1072fdff)) } // Compute the Year, Month, and Day from the julian day number. -func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23110:13: */ +func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23112:13: */ var Z int32 var A int32 var B int32 @@ -13355,7 +13355,7 @@ func computeYMD(tls *libc.TLS, p uintptr) { /* sqlite3.c:23110:13: */ } // Compute the Hour, Minute, and Seconds from the julian day number. -func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23139:13: */ +func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23141:13: */ var s int32 if (*DateTime)(unsafe.Pointer(p)).FvalidHMS != 0 { return @@ -13374,13 +13374,13 @@ func computeHMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23139:13: */ } // Compute both YMD and HMS -func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23158:13: */ +func computeYMD_HMS(tls *libc.TLS, p uintptr) { /* sqlite3.c:23160:13: */ computeYMD(tls, p) computeHMS(tls, p) } // Clear the YMD and HMS and the TZ -func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23166:13: */ +func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23168:13: */ (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) @@ -13408,7 +13408,7 @@ func clearYMD_HMS_TZ(tls *libc.TLS, p uintptr) { /* sqlite3.c:23166:13: */ // EVIDENCE-OF: R-62172-00036 In this implementation, the standard C // library function localtime_r() is used to assist in the calculation of // local time. -func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23204:12: */ +func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:23206:12: */ var rc int32 var pX uintptr var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -13431,7 +13431,7 @@ func osLocaltime(tls *libc.TLS, t uintptr, pTm uintptr) int32 { /* sqlite3.c:232 // // Or, if an error does occur, set *pRc to SQLITE_ERROR. The returned value // is undefined in this case. -func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite3_int64 { /* sqlite3.c:23243:22: */ +func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite3_int64 { /* sqlite3.c:23245:22: */ bp := tls.Alloc(144) defer tls.Free(144) @@ -13444,10 +13444,10 @@ func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite // var sLocal tm at bp, 44 // Initialize the contents of sLocal to avoid a compiler warning. - libc.Xmemset(tls, bp /* &sLocal */, 0, uint32(unsafe.Sizeof(tm{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(tm{}))) *(*DateTime)(unsafe.Pointer(bp + 44 /* x */)) = *(*DateTime)(unsafe.Pointer(p)) - computeYMD_HMS(tls, bp+44 /* &x */) + computeYMD_HMS(tls, bp+44) if (*DateTime)(unsafe.Pointer(bp+44)).FY < 1971 || (*DateTime)(unsafe.Pointer(bp+44)).FY >= 2038 { // EVIDENCE-OF: R-55269-29598 The localtime_r() C function normally only // works for years between 1970 and 2037. For dates outside this range, @@ -13465,10 +13465,10 @@ func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite } (*DateTime)(unsafe.Pointer(bp + 44 /* &x */)).Ftz = 0 (*DateTime)(unsafe.Pointer(bp + 44 /* &x */)).FvalidJD = int8(0) - computeJD(tls, bp+44 /* &x */) + computeJD(tls, bp+44) *(*Time_t)(unsafe.Pointer(bp + 92 /* t */)) = Time_t((*DateTime)(unsafe.Pointer(bp+44)).FiJD/int64(1000) - int64(21086676)*int64(10000)) if osLocaltime(tls, bp+92, bp) != 0 { - Xsqlite3_result_error(tls, pCtx, ts+1144 /* "local time unava..." */, -1) + Xsqlite3_result_error(tls, pCtx, ts+1166, -1) *(*int32)(unsafe.Pointer(pRc)) = SQLITE_ERROR return int64(0) } @@ -13484,7 +13484,7 @@ func localtimeOffset(tls *libc.TLS, p uintptr, pCtx uintptr, pRc uintptr) Sqlite (*DateTime)(unsafe.Pointer(bp + 96 /* &y */)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(bp + 96 /* &y */)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(bp + 96 /* &y */)).FisError = int8(0) - computeJD(tls, bp+96 /* &y */) + computeJD(tls, bp+96) *(*int32)(unsafe.Pointer(pRc)) = SQLITE_OK return (*DateTime)(unsafe.Pointer(bp+96)).FiJD - (*DateTime)(unsafe.Pointer(bp+44)).FiJD } @@ -13503,13 +13503,13 @@ var aXformType = [6]struct { FrLimit float64 FrXform float64 }{ - {FnName: U8(6), FzName: ts + 1167 /* "second" */, FrLimit: 464269060800.0, FrXform: 1000.0}, - {FnName: U8(6), FzName: ts + 1174 /* "minute" */, FrLimit: 7737817680.0, FrXform: 60000.0}, - {FnName: U8(4), FzName: ts + 1181 /* "hour" */, FrLimit: 128963628.0, FrXform: 3600000.0}, - {FnName: U8(3), FzName: ts + 1186 /* "day" */, FrLimit: 5373485.0, FrXform: 86400000.0}, - {FeType: U8(1), FnName: U8(5), FzName: ts + 1190 /* "month" */, FrLimit: 176546.0, FrXform: 2592000000.0}, - {FeType: U8(2), FnName: U8(4), FzName: ts + 1196 /* "year" */, FrLimit: 14713.0, FrXform: 31536000000.0}, -} /* sqlite3.c:23314:3 */ + {FnName: U8(6), FzName: ts + 1189 /* "second" */, FrLimit: 464269060800.0, FrXform: 1000.0}, + {FnName: U8(6), FzName: ts + 1196 /* "minute" */, FrLimit: 7737817680.0, FrXform: 60000.0}, + {FnName: U8(4), FzName: ts + 1203 /* "hour" */, FrLimit: 128963628.0, FrXform: 3600000.0}, + {FnName: U8(3), FzName: ts + 1208 /* "day" */, FrLimit: 5373485.0, FrXform: 86400000.0}, + {FeType: U8(1), FnName: U8(5), FzName: ts + 1212 /* "month" */, FrLimit: 176546.0, FrXform: 2592000000.0}, + {FeType: U8(2), FnName: U8(4), FzName: ts + 1218 /* "year" */, FrLimit: 14713.0, FrXform: 31536000000.0}, +} /* sqlite3.c:23316:3 */ // Process a modifier to a date-time stamp. The modifiers are // as follows: @@ -13533,7 +13533,7 @@ var aXformType = [6]struct { // is in a system call (i.e. localtime()), then an error message is written // to context pCtx. If the error is an unrecognized modifier, no error is // written to pCtx. -func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) int32 { /* sqlite3.c:23347:12: */ +func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) int32 { /* sqlite3.c:23349:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -13547,7 +13547,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i // // Assuming the current time value is UTC (a.k.a. GMT), shift it to // show local time. - if Xsqlite3_stricmp(tls, z, ts+1201) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + if Xsqlite3_stricmp(tls, z, ts+1223) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { computeJD(tls, p) *(*Sqlite3_int64)(unsafe.Pointer(p)) += localtimeOffset(tls, p, pCtx, bp) clearYMD_HMS_TZ(tls, p) @@ -13561,7 +13561,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i // // Treat the current value of p->s as the number of // seconds since 1970. Convert to a real julian day number. - if Xsqlite3_stricmp(tls, z, ts+1211) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { + if Xsqlite3_stricmp(tls, z, ts+1233) == 0 && (*DateTime)(unsafe.Pointer(p)).FrawS != 0 { *(*float64)(unsafe.Pointer(bp + 4 /* r */)) = (*DateTime)(unsafe.Pointer(p)).Fs*1000.0 + 210866760000000.0 if *(*float64)(unsafe.Pointer(bp + 4)) >= 0.0 && *(*float64)(unsafe.Pointer(bp + 4)) < 464269060800000.0 { clearYMD_HMS_TZ(tls, p) @@ -13570,11 +13570,11 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) *(*int32)(unsafe.Pointer(bp /* rc */)) = 0 } - } else if Xsqlite3_stricmp(tls, z, ts+1221) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1243) == 0 && Xsqlite3NotPureFunc(tls, pCtx) != 0 { if int32((*DateTime)(unsafe.Pointer(p)).FtzSet) == 0 { var c1 Sqlite3_int64 computeJD(tls, p) - c1 = localtimeOffset(tls, p, pCtx, bp /* &rc */) + c1 = localtimeOffset(tls, p, pCtx, bp) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { *(*Sqlite3_int64)(unsafe.Pointer(p)) -= c1 clearYMD_HMS_TZ(tls, p) @@ -13595,7 +13595,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i // Move the date to the same time on the next occurrence of // weekday N where 0==Sunday, 1==Monday, and so forth. If the // date is already on the appropriate weekday, this is a no-op. - if Xsqlite3_strnicmp(tls, z, ts+1225, 8) == 0 && + if Xsqlite3_strnicmp(tls, z, ts+1247, 8) == 0 && Xsqlite3AtoF(tls, z+8, bp+4, Xsqlite3Strlen30(tls, z+8), uint8(SQLITE_UTF8)) > 0 && float64(libc.AssignInt32(&n, int32(*(*float64)(unsafe.Pointer(bp + 4))))) == *(*float64)(unsafe.Pointer(bp + 4)) && n >= 0 && *(*float64)(unsafe.Pointer(bp + 4)) < float64(7) { var Z Sqlite3_int64 @@ -13620,7 +13620,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i // // Move the date backwards to the beginning of the current day, // or month or year. - if Xsqlite3_strnicmp(tls, z, ts+1234, 9) != 0 { + if Xsqlite3_strnicmp(tls, z, ts+1256, 9) != 0 { break } if !(int32((*DateTime)(unsafe.Pointer(p)).FvalidJD) != 0) && !(int32((*DateTime)(unsafe.Pointer(p)).FvalidYMD) != 0) && !(int32((*DateTime)(unsafe.Pointer(p)).FvalidHMS) != 0) { @@ -13634,14 +13634,14 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidTZ = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) - if Xsqlite3_stricmp(tls, z, ts+1190) == 0 { + if Xsqlite3_stricmp(tls, z, ts+1212) == 0 { (*DateTime)(unsafe.Pointer(p)).FD = 1 *(*int32)(unsafe.Pointer(bp /* rc */)) = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1196) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1218) == 0 { (*DateTime)(unsafe.Pointer(p)).FM = 1 (*DateTime)(unsafe.Pointer(p)).FD = 1 *(*int32)(unsafe.Pointer(bp /* rc */)) = 0 - } else if Xsqlite3_stricmp(tls, z, ts+1186) == 0 { + } else if Xsqlite3_stricmp(tls, z, ts+1208) == 0 { *(*int32)(unsafe.Pointer(bp /* rc */)) = 0 } break @@ -13691,11 +13691,11 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z2)))])&0x04 != 0) { z2++ } - libc.Xmemset(tls, bp+12 /* &tx */, 0, uint32(unsafe.Sizeof(DateTime{}))) + libc.Xmemset(tls, bp+12, 0, uint32(unsafe.Sizeof(DateTime{}))) if parseHhMmSs(tls, z2, bp+12) != 0 { break } - computeJD(tls, bp+12 /* &tx */) + computeJD(tls, bp+12) *(*Sqlite3_int64)(unsafe.Pointer(bp + 12)) -= int64(43200000) day = (*DateTime)(unsafe.Pointer(bp+12)).FiJD / int64(86400000) *(*Sqlite3_int64)(unsafe.Pointer(bp + 12)) -= day * int64(86400000) @@ -13796,7 +13796,7 @@ func parseModifier(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, p uintptr) i // // If there are zero parameters (if even argv[0] is undefined) // then assume a default value of "now" for argv[0]. -func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23564:12: */ +func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) int32 { /* sqlite3.c:23566:12: */ var i int32 var n int32 var z uintptr @@ -13837,14 +13837,14 @@ func isDate(tls *libc.TLS, context uintptr, argc int32, argv uintptr, p uintptr) // julianday( TIMESTRING, MOD, MOD, ...) // // Return the julian day number of the date specified in the arguments -func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23608:13: */ +func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23610:13: */ bp := tls.Alloc(48) defer tls.Free(48) // var x DateTime at bp, 48 if isDate(tls, context, argc, argv, bp) == 0 { - computeJD(tls, bp /* &x */) + computeJD(tls, bp) Xsqlite3_result_double(tls, context, float64((*DateTime)(unsafe.Pointer(bp)).FiJD)/86400000.0) } } @@ -13852,7 +13852,7 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // datetime( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD HH:MM:SS -func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23625:13: */ +func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23627:13: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -13861,17 +13861,17 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* if isDate(tls, context, argc, argv, bp+48) == 0 { // var zBuf [100]int8 at bp+96, 100 - computeYMD_HMS(tls, bp+48 /* &x */) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+96 /* &zBuf[0] */, ts+1244, /* "%04d-%02d-%02d %..." */ + computeYMD_HMS(tls, bp+48) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+96, ts+1266, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FD, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fm, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+48)).Fs))) - Xsqlite3_result_text(tls, context, bp+96 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, context, bp+96, -1, libc.UintptrFromInt32(-1)) } } // time( TIMESTRING, MOD, MOD, ...) // // Return HH:MM:SS -func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23645:13: */ +func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23647:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -13880,16 +13880,16 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql if isDate(tls, context, argc, argv, bp+24) == 0 { // var zBuf [100]int8 at bp+72, 100 - computeHMS(tls, bp+24 /* &x */) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+1274 /* "%02d:%02d:%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fm, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fs))) - Xsqlite3_result_text(tls, context, bp+72 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) + computeHMS(tls, bp+24) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72, ts+1296, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fm, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fs))) + Xsqlite3_result_text(tls, context, bp+72, -1, libc.UintptrFromInt32(-1)) } } // date( TIMESTRING, MOD, MOD, ...) // // Return YYYY-MM-DD -func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23664:13: */ +func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23666:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -13898,9 +13898,9 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql if isDate(tls, context, argc, argv, bp+24) == 0 { // var zBuf [100]int8 at bp+72, 100 - computeYMD(tls, bp+24 /* &x */) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+1289 /* "%04d-%02d-%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FD)) - Xsqlite3_result_text(tls, context, bp+72 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) + computeYMD(tls, bp+24) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72, ts+1311, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FD)) + Xsqlite3_result_text(tls, context, bp+72, -1, libc.UintptrFromInt32(-1)) } } @@ -13921,7 +13921,7 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %W week of year 00-53 // %Y year 0000-9999 // %% % -func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23697:13: */ +func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23699:13: */ bp := tls.Alloc(208) defer tls.Free(208) @@ -13941,23 +13941,23 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* return } db = Xsqlite3_context_db_handle(tls, context) - Xsqlite3StrAccumInit(tls, bp+136 /* &sRes */, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 112))) + Xsqlite3StrAccumInit(tls, bp+136, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 112))) - computeJD(tls, bp+88 /* &x */) - computeYMD_HMS(tls, bp+88 /* &x */) + computeJD(tls, bp+88) + computeYMD_HMS(tls, bp+88) for i = libc.AssignUint32(&j, Size_t(0)); *(*int8)(unsafe.Pointer(zFmt + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) != '%' { continue } if j < i { - Xsqlite3_str_append(tls, bp+136 /* &sRes */, zFmt+uintptr(j), int32(i-j)) + Xsqlite3_str_append(tls, bp+136, zFmt+uintptr(j), int32(i-j)) } i++ j = i + Size_t(1) switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': { - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1304 /* "%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FD)) + Xsqlite3_str_appendf(tls, bp+136, ts+1326, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FD)) break } @@ -13967,13 +13967,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* if s > 59.999 { s = 59.999 } - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1309 /* "%06.3f" */, libc.VaList(bp+8, s)) + Xsqlite3_str_appendf(tls, bp+136, ts+1331, libc.VaList(bp+8, s)) break } case 'H': { - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1304 /* "%02d" */, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fh)) + Xsqlite3_str_appendf(tls, bp+136, ts+1326, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fh)) break } @@ -13986,86 +13986,86 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* (*DateTime)(unsafe.Pointer(bp + 160 /* &y */)).FvalidJD = int8(0) (*DateTime)(unsafe.Pointer(bp + 160 /* &y */)).FM = 1 (*DateTime)(unsafe.Pointer(bp + 160 /* &y */)).FD = 1 - computeJD(tls, bp+160 /* &y */) + computeJD(tls, bp+160) nDay = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD - (*DateTime)(unsafe.Pointer(bp+160)).FiJD + int64(43200000)) / int64(86400000)) if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 // 0=Monday, 1=Tuesday, ... 6=Sunday wd = int32(((*DateTime)(unsafe.Pointer(bp+88)).FiJD + int64(43200000)) / int64(86400000) % int64(7)) - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1304 /* "%02d" */, libc.VaList(bp+24, (nDay+7-wd)/7)) + Xsqlite3_str_appendf(tls, bp+136, ts+1326, libc.VaList(bp+24, (nDay+7-wd)/7)) } else { - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1316 /* "%03d" */, libc.VaList(bp+32, nDay+1)) + Xsqlite3_str_appendf(tls, bp+136, ts+1338, libc.VaList(bp+32, nDay+1)) } break } case 'J': { - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1321 /* "%.16g" */, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) + Xsqlite3_str_appendf(tls, bp+136, ts+1343, libc.VaList(bp+40, float64((*DateTime)(unsafe.Pointer(bp+88)).FiJD)/86400000.0)) break } case 'm': { - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1304 /* "%02d" */, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FM)) + Xsqlite3_str_appendf(tls, bp+136, ts+1326, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FM)) break } case 'M': { - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1304 /* "%02d" */, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fm)) + Xsqlite3_str_appendf(tls, bp+136, ts+1326, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fm)) break } case 's': { var iS I64 = (*DateTime)(unsafe.Pointer(bp+88)).FiJD/int64(1000) - int64(21086676)*int64(10000) - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1327 /* "%lld" */, libc.VaList(bp+64, iS)) + Xsqlite3_str_appendf(tls, bp+136, ts+1349, libc.VaList(bp+64, iS)) break } case 'S': { - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1304 /* "%02d" */, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fs))) + Xsqlite3_str_appendf(tls, bp+136, ts+1326, libc.VaList(bp+72, libc.Int32FromFloat64((*DateTime)(unsafe.Pointer(bp+88 /* &x */)).Fs))) break } case 'w': { - Xsqlite3_str_appendchar(tls, bp+136 /* &sRes */, 1, + Xsqlite3_str_appendchar(tls, bp+136, 1, int8(int32(int8(((*DateTime)(unsafe.Pointer(bp+88)).FiJD+int64(129600000))/int64(86400000)%int64(7)))+'0')) break } case 'Y': { - Xsqlite3_str_appendf(tls, bp+136 /* &sRes */, ts+1332 /* "%04d" */, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FY)) + Xsqlite3_str_appendf(tls, bp+136, ts+1354, libc.VaList(bp+80, (*DateTime)(unsafe.Pointer(bp+88 /* &x */)).FY)) break } case '%': { - Xsqlite3_str_appendchar(tls, bp+136 /* &sRes */, 1, int8('%')) + Xsqlite3_str_appendchar(tls, bp+136, 1, int8('%')) break } default: { - Xsqlite3_str_reset(tls, bp+136 /* &sRes */) + Xsqlite3_str_reset(tls, bp+136) return } } } if j < i { - Xsqlite3_str_append(tls, bp+136 /* &sRes */, zFmt+uintptr(j), int32(i-j)) + Xsqlite3_str_append(tls, bp+136, zFmt+uintptr(j), int32(i-j)) } - Xsqlite3ResultStrAccum(tls, context, bp+136 /* &sRes */) + Xsqlite3ResultStrAccum(tls, context, bp+136) } // current_time() // // This function returns the same value as time('now'). -func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23804:13: */ +func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23806:13: */ _ = NotUsed _ = NotUsed2 timeFunc(tls, context, 0, uintptr(0)) @@ -14074,7 +14074,7 @@ func ctimeFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_date() // // This function returns the same value as date('now'). -func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23818:13: */ +func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23820:13: */ _ = NotUsed _ = NotUsed2 dateFunc(tls, context, 0, uintptr(0)) @@ -14083,7 +14083,7 @@ func cdateFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // current_timestamp() // // This function returns the same value as datetime('now'). -func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23832:13: */ +func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:23834:13: */ _ = NotUsed _ = NotUsed2 datetimeFunc(tls, context, 0, uintptr(0)) @@ -14092,19 +14092,19 @@ func ctimestampFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uint // This function registered all of the above C functions as SQL // functions. This should be the only routine in this file with // external linkage. -func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:23892:21: */ +func Xsqlite3RegisterDateTimeFunctions(tls *libc.TLS) { /* sqlite3.c:23894:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aDateTimeFuncs)), int32(uint32(unsafe.Sizeof(aDateTimeFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } var aDateTimeFuncs = [8]FuncDef{ - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1337 /* "julianday" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1347 /* "date" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1352 /* "time" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1357 /* "datetime" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1366 /* "strftime" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1375 /* "current_time" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1388 /* "current_timestam..." */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1406 /* "current_date" */}} /* sqlite3.c:23893:18 */ + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1359}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1369}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1374}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1379}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FpUserData: 0, FxSFunc: 0, FzName: ts + 1388}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1397}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1410}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 1428}} /* sqlite3.c:23895:18 */ //************* End of date.c *********************************************** //************* Begin file os.c ********************************************* @@ -14156,7 +14156,7 @@ var aDateTimeFuncs = [8]FuncDef{ // of the sqlite3_file object. This is mostly just syntactic sugar. All // of this would be completely automatic if SQLite were coded using // C++ instead of plain old C. -func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23995:21: */ +func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23997:21: */ if (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr) int32 @@ -14165,27 +14165,27 @@ func Xsqlite3OsClose(tls *libc.TLS, pId uintptr) { /* sqlite3.c:23995:21: */ } } -func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24001:20: */ +func Xsqlite3OsRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24003:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxRead})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24005:20: */ +func Xsqlite3OsWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset I64) int32 { /* sqlite3.c:24007:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxWrite})).f(tls, id, pBuf, amt, offset) } -func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24009:20: */ +func Xsqlite3OsTruncate(tls *libc.TLS, id uintptr, size I64) int32 { /* sqlite3.c:24011:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxTruncate})).f(tls, id, size) } -func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24012:20: */ +func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:24014:20: */ if flags != 0 { return (*struct { @@ -14195,27 +14195,27 @@ func Xsqlite3OsSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c return SQLITE_OK } -func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24016:20: */ +func Xsqlite3OsFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:24018:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileSize})).f(tls, id, pSize) } -func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24020:20: */ +func Xsqlite3OsLock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24022:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxLock})).f(tls, id, lockType) } -func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24024:20: */ +func Xsqlite3OsUnlock(tls *libc.TLS, id uintptr, lockType int32) int32 { /* sqlite3.c:24026:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnlock})).f(tls, id, lockType) } -func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24027:20: */ +func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:24029:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -14228,7 +14228,7 @@ func Xsqlite3OsCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int // really care if the VFS receives and understands the information since it // is only a hint and can be safely ignored. The sqlite3OsFileControlHint() // routine has no return value since the return value would be meaningless. -func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24040:20: */ +func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:24042:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return SQLITE_NOTFOUND } @@ -14237,7 +14237,7 @@ func Xsqlite3OsFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) in })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFileControl})).f(tls, id, op, pArg) } -func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24068:21: */ +func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr) { /* sqlite3.c:24070:21: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != 0 { (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14245,7 +14245,7 @@ func Xsqlite3OsFileControlHint(tls *libc.TLS, id uintptr, op int32, pArg uintptr } } -func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24072:20: */ +func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24074:20: */ var xSectorSize uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxSectorSize return func() int32 { if xSectorSize != 0 { @@ -14257,7 +14257,7 @@ func Xsqlite3OsSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24072: }() } -func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24076:20: */ +func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:24078:20: */ if (*Sqlite3_file)(unsafe.Pointer(id)).FpMethods == uintptr(0) { return 0 } @@ -14266,23 +14266,23 @@ func Xsqlite3OsDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxDeviceCharacteristics})).f(tls, id) } -func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24081:20: */ +func Xsqlite3OsShmLock(tls *libc.TLS, id uintptr, offset int32, n int32, flags int32) int32 { /* sqlite3.c:24083:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmLock})).f(tls, id, offset, n, flags) } -func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24084:21: */ +func Xsqlite3OsShmBarrier(tls *libc.TLS, id uintptr) { /* sqlite3.c:24086:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmBarrier})).f(tls, id) } -func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24087:20: */ +func Xsqlite3OsShmUnmap(tls *libc.TLS, id uintptr, deleteFlag int32) int32 { /* sqlite3.c:24089:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxShmUnmap})).f(tls, id, deleteFlag) } -func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24090:20: */ +func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:24092:20: */ return (*struct { f func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32 @@ -14290,14 +14290,14 @@ func Xsqlite3OsShmMap(tls *libc.TLS, id uintptr, iPage int32, pgsz int32, bExten } // The real implementation of xFetch and xUnfetch -func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24104:20: */ +func Xsqlite3OsFetch(tls *libc.TLS, id uintptr, iOff I64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:24106:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxFetch})).f(tls, id, iOff, iAmt, pp) } -func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24108:20: */ +func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:24110:20: */ return (*struct { f func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods)).FxUnfetch})).f(tls, id, iOff, p) @@ -14305,7 +14305,7 @@ func Xsqlite3OsUnfetch(tls *libc.TLS, id uintptr, iOff I64, p uintptr) int32 { / // The next group of routines are convenience wrappers around the // VFS methods. -func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24126:20: */ +func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pFlagsOut uintptr) int32 { /* sqlite3.c:24128:20: */ var rc int32 // 0x87f7f is a mask of SQLITE_OPEN_ flags that are valid to be passed @@ -14319,7 +14319,7 @@ func Xsqlite3OsOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, f return rc } -func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24143:20: */ +func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:24145:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDelete != uintptr(0) { return (*struct { @@ -14329,14 +14329,14 @@ func Xsqlite3OsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) return SQLITE_OK } -func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24148:20: */ +func Xsqlite3OsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:24150:20: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxAccess})).f(tls, pVfs, zPath, flags, pResOut) } -func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24157:20: */ +func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* sqlite3.c:24159:20: */ *(*int8)(unsafe.Pointer(zPathOut)) = int8(0) return (*struct { @@ -14344,7 +14344,7 @@ func Xsqlite3OsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nPathOut })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxFullPathname})).f(tls, pVfs, zPath, nPathOut, zPathOut) } -func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24168:21: */ +func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:24170:21: */ // tag-20210611-1 return (*struct { @@ -14352,25 +14352,25 @@ func Xsqlite3OsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* s })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlOpen})).f(tls, pVfs, zPath) } -func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24173:21: */ +func Xsqlite3OsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) { /* sqlite3.c:24175:21: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlError})).f(tls, pVfs, nByte, zBufOut) } -func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24176:21: */ +func Xsqlite3OsDlSym(tls *libc.TLS, pVfs uintptr, pHdle uintptr, zSym uintptr) uintptr { /* sqlite3.c:24178:21: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlSym})).f(tls, pVfs, pHdle, zSym) } -func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24179:21: */ +func Xsqlite3OsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:24181:21: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxDlClose})).f(tls, pVfs, pHandle) } -func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24183:20: */ +func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:24185:20: */ if Xsqlite3Config.FiPrngSeed != 0 { libc.Xmemset(tls, zBufOut, 0, uint32(nByte)) if nByte > int32(unsafe.Sizeof(uint32(0))) { @@ -14387,13 +14387,13 @@ func Xsqlite3OsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uint } -func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24194:20: */ +func Xsqlite3OsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:24196:20: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSleep})).f(tls, pVfs, nMicro) } -func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24197:20: */ +func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24199:20: */ if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxGetLastError != 0 { return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -14402,7 +14402,7 @@ func Xsqlite3OsGetLastError(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24 return 0 } -func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24200:20: */ +func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:24202:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14427,7 +14427,7 @@ func Xsqlite3OsCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) i return rc } -func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24218:20: */ +func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:24220:20: */ var rc int32 var pFile uintptr pFile = Xsqlite3MallocZero(tls, uint64((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) @@ -14447,7 +14447,7 @@ func Xsqlite3OsOpenMalloc(tls *libc.TLS, pVfs uintptr, zFile uintptr, ppFile uin return rc } -func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24243:21: */ +func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24245:21: */ Xsqlite3OsClose(tls, pFile) Xsqlite3_free(tls, pFile) @@ -14457,7 +14457,7 @@ func Xsqlite3OsCloseFree(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:24243:21: // sqlite3_os_init(). The purpose of the wrapper is to provide the // ability to simulate a malloc failure, so that the handling of an // error in sqlite3_os_init() by the upper layers can be tested. -func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24255:20: */ +func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24257:20: */ var p uintptr = Xsqlite3_malloc(tls, 10) if p == uintptr(0) { return SQLITE_NOMEM @@ -14467,11 +14467,11 @@ func Xsqlite3OsInit(tls *libc.TLS) int32 { /* sqlite3.c:24255:20: */ } // The list of all registered VFS implementations. -var vfsList uintptr = uintptr(0) /* sqlite3.c:24265:20 */ +var vfsList uintptr = uintptr(0) /* sqlite3.c:24267:20 */ // Locate a VFS by name. If no name is given, simply return the // first VFS on the list. -func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24272:24: */ +func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24274:24: */ var pVfs uintptr = uintptr(0) var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) @@ -14493,7 +14493,7 @@ func Xsqlite3_vfs_find(tls *libc.TLS, zVfs uintptr) uintptr { /* sqlite3.c:24272 } // Unlink a VFS from the linked list -func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24296:13: */ +func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24298:13: */ if pVfs == uintptr(0) { // No-op @@ -14513,7 +14513,7 @@ func vfsUnlink(tls *libc.TLS, pVfs uintptr) { /* sqlite3.c:24296:13: */ // Register a VFS with the system. It is harmless to register the same // VFS multiple times. The new VFS becomes the default if makeDflt is // true. -func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24318:16: */ +func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { /* sqlite3.c:24320:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14536,7 +14536,7 @@ func Xsqlite3_vfs_register(tls *libc.TLS, pVfs uintptr, makeDflt int32) int32 { } // Unregister a VFS so that it is no longer accessible. -func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24346:16: */ +func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:24348:16: */ var mutex uintptr var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -14581,7 +14581,7 @@ func Xsqlite3_vfs_unregister(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:2 type BenignMallocHooks1 = struct { FxBenignBegin uintptr FxBenignEnd uintptr -} /* sqlite3.c:24394:9 */ +} /* sqlite3.c:24396:9 */ //************* End of os.c ************************************************* //************* Begin file fault.c ****************************************** @@ -14612,8 +14612,8 @@ type BenignMallocHooks1 = struct { // #include "sqliteInt.h" // Global variables. -type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24394:34 */ -var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24398:3 */ +type BenignMallocHooks = BenignMallocHooks1 /* sqlite3.c:24396:34 */ +var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24400:3 */ // The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks // structure. If writable static data is unsupported on the target, @@ -14623,7 +14623,7 @@ var sqlite3Hooks = BenignMallocHooks1{} /* sqlite3.c:24398:3 */ // Register hooks to call when sqlite3BeginBenignMalloc() and // sqlite3EndBenignMalloc() are called, respectively. -func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24420:21: */ +func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd uintptr) { /* sqlite3.c:24422:21: */ sqlite3Hooks.FxBenignBegin = xBenignBegin sqlite3Hooks.FxBenignEnd = xBenignEnd @@ -14632,14 +14632,14 @@ func Xsqlite3BenignMallocHooks(tls *libc.TLS, xBenignBegin uintptr, xBenignEnd u // This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that // subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc() // indicates that subsequent malloc failures are non-benign. -func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24434:21: */ +func Xsqlite3BeginBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24436:21: */ if sqlite3Hooks.FxBenignBegin != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignBegin})).f(tls) } } -func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24440:21: */ +func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24442:21: */ if sqlite3Hooks.FxBenignEnd != 0 { (*struct{ f func(*libc.TLS) })(unsafe.Pointer(&struct{ uintptr }{sqlite3Hooks.FxBenignEnd})).f(tls) @@ -14737,7 +14737,7 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:24440:21: */ // For this low-level routine, we are guaranteed that nByte>0 because // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. -func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:24640:13: */ +func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:24642:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14749,7 +14749,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:24640:1 p += 8 } else { - Xsqlite3_log(tls, SQLITE_NOMEM, ts+1419 /* "failed to alloca..." */, libc.VaList(bp, nByte)) + Xsqlite3_log(tls, SQLITE_NOMEM, ts+1441, libc.VaList(bp, nByte)) } return p } @@ -14760,7 +14760,7 @@ func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:24640:1 // For this low-level routine, we already know that pPrior!=0 since // cases where pPrior==0 will have been intecepted and dealt with // by higher-level routines. -func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:24674:13: */ +func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:24676:13: */ var p uintptr = pPrior p -= 8 @@ -14769,7 +14769,7 @@ func sqlite3MemFree(tls *libc.TLS, pPrior uintptr) { /* sqlite3.c:24674:13: */ // Report the allocated size of a prior return from xMalloc() // or xRealloc(). -func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:24689:12: */ +func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:24691:12: */ var p uintptr p = pPrior @@ -14785,7 +14785,7 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:24689:12 // redirected to xMalloc. Similarly, we know that nByte>0 because // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. -func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:24712:13: */ +func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:24714:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -14800,25 +14800,25 @@ func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* } else { Xsqlite3_log(tls, SQLITE_NOMEM, - ts+1457, /* "failed memory re..." */ + ts+1479, libc.VaList(bp, sqlite3MemSize(tls, pPrior), nByte)) } return p } // Round up a request size to the next valid allocation size. -func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:24744:12: */ +func sqlite3MemRoundup(tls *libc.TLS, n int32) int32 { /* sqlite3.c:24746:12: */ return (n + 7) & libc.CplInt32(7) } // Initialize this module. -func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:24751:12: */ +func sqlite3MemInit(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:24753:12: */ _ = NotUsed return SQLITE_OK } // Deinitialize this module. -func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:24778:13: */ +func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:24780:13: */ _ = NotUsed return } @@ -14827,7 +14827,7 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:24778:13: // // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. -func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:24789:21: */ +func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:24791:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -14842,7 +14842,7 @@ var defaultMethods = Sqlite3_mem_methods{ FxRoundup: 0, FxInit: 0, FxShutdown: 0, -} /* sqlite3.c:24790:36 */ +} /* sqlite3.c:24792:36 */ //************* End of mem1.c *********************************************** //************* Begin file mem2.c ******************************************* @@ -14976,7 +14976,7 @@ var defaultMethods = Sqlite3_mem_methods{ // #include "sqliteInt.h" // Initialize the mutex system. -func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26825:20: */ +func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26827:20: */ var rc int32 = SQLITE_OK if !(int32(Xsqlite3Config.Fmutex.FxMutexAlloc) != 0) { // If the xMutexAlloc method has not been set, then the user did not @@ -15010,7 +15010,7 @@ func Xsqlite3MutexInit(tls *libc.TLS) int32 { /* sqlite3.c:26825:20: */ // Shutdown the mutex system. This call frees resources allocated by // sqlite3MutexInit(). -func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26871:20: */ +func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26873:20: */ var rc int32 = SQLITE_OK if Xsqlite3Config.Fmutex.FxMutexEnd != 0 { rc = (*struct{ f func(*libc.TLS) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnd})).f(tls) @@ -15020,7 +15020,7 @@ func Xsqlite3MutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:26871:20: */ } // Retrieve a pointer to a static mutex or allocate a new dynamic one. -func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26887:26: */ +func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26889:26: */ if id <= SQLITE_MUTEX_RECURSIVE && Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15033,7 +15033,7 @@ func Xsqlite3_mutex_alloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26887: })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexAlloc})).f(tls, id) } -func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26896:30: */ +func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26898:30: */ if !(int32(Xsqlite3Config.FbCoreMutex) != 0) { return uintptr(0) } @@ -15044,7 +15044,7 @@ func Xsqlite3MutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:26896:30 } // Free a dynamic mutex. -func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:26908:17: */ +func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:26910:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexFree})).f(tls, p) @@ -15053,7 +15053,7 @@ func Xsqlite3_mutex_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:26908:17: */ // Obtain the mutex p. If some other thread already has the mutex, block // until it can be obtained. -func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26919:17: */ +func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26921:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexEnter})).f(tls, p) @@ -15062,7 +15062,7 @@ func Xsqlite3_mutex_enter(tls *libc.TLS, p uintptr) { /* sqlite3.c:26919:17: */ // Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another // thread holds the mutex and it cannot be obtained, return SQLITE_BUSY. -func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26930:16: */ +func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26932:16: */ var rc int32 = SQLITE_OK if p != 0 { @@ -15077,7 +15077,7 @@ func Xsqlite3_mutex_try(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:26930:16: // entered by the same thread. The behavior is undefined if the mutex // is not currently entered. If a NULL pointer is passed as an argument // this function is a no-op. -func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26945:17: */ +func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26947:17: */ if p != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fmutex.FxMutexLeave})).f(tls, p) @@ -15116,40 +15116,40 @@ func Xsqlite3_mutex_leave(tls *libc.TLS, p uintptr) { /* sqlite3.c:26945:17: */ // Stub routines for all mutex methods. // // This routines provide no mutual exclusion or error checking. -func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27008:12: */ +func noopMutexInit(tls *libc.TLS) int32 { /* sqlite3.c:27010:12: */ return SQLITE_OK } -func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27009:12: */ +func noopMutexEnd(tls *libc.TLS) int32 { /* sqlite3.c:27011:12: */ return SQLITE_OK } -func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27010:22: */ +func noopMutexAlloc(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:27012:22: */ _ = id return uintptr(8) } -func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27014:13: */ +func noopMutexFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:27016:13: */ _ = p return } -func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27015:13: */ +func noopMutexEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:27017:13: */ _ = p return } -func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27016:12: */ +func noopMutexTry(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:27018:12: */ _ = p return SQLITE_OK } -func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27020:13: */ +func noopMutexLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:27022:13: */ _ = p return } -func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27022:44: */ +func Xsqlite3NoopMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27024:44: */ return uintptr(unsafe.Pointer(&sMutex)) } @@ -15162,11 +15162,11 @@ var sMutex = Sqlite3_mutex_methods{ FxMutexEnter: 0, FxMutexTry: 0, FxMutexLeave: 0, -} /* sqlite3.c:27023:38 */ +} /* sqlite3.c:27025:38 */ // If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation // is used regardless of the run-time threadsafety setting. -func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27181:44: */ +func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27183:44: */ return Xsqlite3NoopMutex(tls) } @@ -15229,7 +15229,7 @@ func Xsqlite3DefaultMutex(tls *libc.TLS) uintptr { /* sqlite3.c:27181:44: */ // Attempt to release up to n bytes of non-essential memory currently // held by SQLite. An example of non-essential memory is memory used to // cache database pages that are not currently in use. -func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28102:16: */ +func Xsqlite3_release_memory(tls *libc.TLS, n int32) int32 { /* sqlite3.c:28104:16: */ return Xsqlite3PcacheReleaseMemory(tls, n) } @@ -15241,22 +15241,22 @@ type Mem0Global = struct { FalarmThreshold Sqlite3_int64 FhardLimit Sqlite3_int64 FnearlyFull int32 -} /* sqlite3.c:28124:19 */ +} /* sqlite3.c:28126:19 */ // Default value of the hard heap limit. 0 means "no limit". // State information local to the memory allocation subsystem. -var mem0 = Mem0Global{} /* sqlite3.c:28134:3 */ +var mem0 = Mem0Global{} /* sqlite3.c:28136:3 */ // Return the memory allocator mutex. sqlite3_status() needs it. -func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28141:30: */ +func Xsqlite3MallocMutex(tls *libc.TLS) uintptr { /* sqlite3.c:28143:30: */ return mem0.Fmutex } // Deprecated external interface. It used to set an alarm callback // that was invoked when memory usage grew too large. Now it is a // no-op. -func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28151:16: */ +func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThreshold Sqlite3_int64) int32 { /* sqlite3.c:28153:16: */ _ = xCallback _ = pArg _ = iThreshold @@ -15272,7 +15272,7 @@ func Xsqlite3_memory_alarm(tls *libc.TLS, xCallback uintptr, pArg uintptr, iThre // // If the hard heap limit is enabled, then the soft heap limit cannot // be disabled nor raised above the hard heap limit. -func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28174:26: */ +func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28176:26: */ var priorLimit Sqlite3_int64 var excess Sqlite3_int64 var nUsed Sqlite3_int64 @@ -15300,7 +15300,7 @@ func Xsqlite3_soft_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { return priorLimit } -func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28199:17: */ +func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28201:17: */ if n < 0 { n = 0 } @@ -15317,7 +15317,7 @@ func Xsqlite3_soft_heap_limit(tls *libc.TLS, n int32) { /* sqlite3.c:28199:17: * // Setting the hard heap limit will also activate the soft heap limit // and constrain the soft heap limit to be no more than the hard heap // limit. -func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28216:26: */ +func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:28218:26: */ var priorLimit Sqlite3_int64 var rc int32 = Xsqlite3_initialize(tls) if rc != 0 { @@ -15336,7 +15336,7 @@ func Xsqlite3_hard_heap_limit64(tls *libc.TLS, n Sqlite3_int64) Sqlite3_int64 { } // Initialize the memory allocation subsystem. -func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28238:20: */ +func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28240:20: */ var rc int32 if Xsqlite3Config.Fm.FxMalloc == uintptr(0) { Xsqlite3MemSetDefault(tls) @@ -15359,12 +15359,12 @@ func Xsqlite3MallocInit(tls *libc.TLS) int32 { /* sqlite3.c:28238:20: */ // Return true if the heap is currently under memory pressure - in other // words if the amount of heap used is close to the limit set by // sqlite3_soft_heap_limit(). -func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28259:20: */ +func Xsqlite3HeapNearlyFull(tls *libc.TLS) int32 { /* sqlite3.c:28261:20: */ return libc.AtomicLoadNInt32(uintptr(unsafe.Pointer(&mem0))+20, 0) } // Deinitialize the memory allocation subsystem. -func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28266:21: */ +func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28268:21: */ if Xsqlite3Config.Fm.FxShutdown != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxShutdown})).f(tls, Xsqlite3Config.Fm.FpAppData) } @@ -15372,7 +15372,7 @@ func Xsqlite3MallocEnd(tls *libc.TLS) { /* sqlite3.c:28266:21: */ } // Return the amount of memory currently checked out. -func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28276:26: */ +func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28278:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15380,14 +15380,14 @@ func Xsqlite3_memory_used(tls *libc.TLS) Sqlite3_int64 { /* sqlite3.c:28276:26: // var mx Sqlite3_int64 at bp+8, 8 - Xsqlite3_status64(tls, SQLITE_STATUS_MEMORY_USED, bp /* &res */, bp+8 /* &mx */, 0) + Xsqlite3_status64(tls, SQLITE_STATUS_MEMORY_USED, bp, bp+8, 0) return *(*Sqlite3_int64)(unsafe.Pointer(bp /* res */)) } // Return the maximum amount of memory that has ever been // checked out since either the beginning of this process // or since the most recent reset. -func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28287:26: */ +func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { /* sqlite3.c:28289:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -15395,12 +15395,12 @@ func Xsqlite3_memory_highwater(tls *libc.TLS, resetFlag int32) Sqlite3_int64 { / // var mx Sqlite3_int64 at bp+8, 8 - Xsqlite3_status64(tls, SQLITE_STATUS_MEMORY_USED, bp /* &res */, bp+8 /* &mx */, resetFlag) + Xsqlite3_status64(tls, SQLITE_STATUS_MEMORY_USED, bp, bp+8, resetFlag) return *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* mx */)) } // Trigger the alarm -func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28296:13: */ +func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28298:13: */ if mem0.FalarmThreshold <= int64(0) { return } @@ -15411,7 +15411,7 @@ func sqlite3MallocAlarm(tls *libc.TLS, nByte int32) { /* sqlite3.c:28296:13: */ // Do a memory allocation with statistics and alarms. Assume the // lock is already held. -func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28307:13: */ +func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28309:13: */ var p uintptr var nFull int32 @@ -15458,7 +15458,7 @@ func mallocWithAlarm(tls *libc.TLS, n int32, pp uintptr) { /* sqlite3.c:28307:13 // Allocate memory. This routine is like sqlite3_malloc() except that it // assumes the memory subsystem has already been initialized. -func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28356:21: */ +func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28358:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -15473,7 +15473,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28356:21: */ *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) } else if Xsqlite3Config.FbMemstat != 0 { Xsqlite3_mutex_enter(tls, mem0.Fmutex) - mallocWithAlarm(tls, int32(n), bp /* &p */) + mallocWithAlarm(tls, int32(n), bp) Xsqlite3_mutex_leave(tls, mem0.Fmutex) } else { *(*uintptr)(unsafe.Pointer(bp /* p */)) = (*struct { @@ -15487,7 +15487,7 @@ func Xsqlite3Malloc(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28356:21: */ // This version of the memory allocation is for use by the application. // First make sure the memory subsystem is initialized, then do the // allocation. -func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28381:17: */ +func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28383:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15497,7 +15497,7 @@ func Xsqlite3_malloc(tls *libc.TLS, n int32) uintptr { /* sqlite3.c:28381:17: */ return Xsqlite3Malloc(tls, uint64(n)) } -func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28387:17: */ +func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:28389:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15505,27 +15505,27 @@ func Xsqlite3_malloc64(tls *libc.TLS, n Sqlite3_uint64) uintptr { /* sqlite3.c:2 } // TRUE if p is a lookaside memory allocation from db -func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28398:12: */ +func isLookaside(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28400:12: */ return libc.Bool32(Uptr(p) >= Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpStart) && Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd)) } // Return the size of a memory allocation previously obtained from // sqlite3Malloc() or sqlite3_malloc(). -func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28409:20: */ +func Xsqlite3MallocSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:28411:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28413:12: */ +func lookasideMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28415:12: */ if p < (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpMiddle { return int32((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FszTrue) } return LOOKASIDE_SMALL } -func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28420:20: */ +func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:28422:20: */ if db != 0 { if Uptr(p) < Uptr((*Sqlite3)(unsafe.Pointer(db)).Flookaside.FpEnd) { @@ -15544,7 +15544,7 @@ func Xsqlite3DbMallocSize(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fm.FxSize})).f(tls, p) } -func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28449:27: */ +func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:28451:27: */ if p != 0 { return uint64((*struct { @@ -15555,7 +15555,7 @@ func Xsqlite3_msize(tls *libc.TLS, p uintptr) Sqlite3_uint64 { /* sqlite3.c:2844 } // Free memory previously obtained from sqlite3Malloc(). -func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28458:17: */ +func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28460:17: */ if p == uintptr(0) { return } // IMP: R-49053-54554 @@ -15573,14 +15573,14 @@ func Xsqlite3_free(tls *libc.TLS, p uintptr) { /* sqlite3.c:28458:17: */ // Add the size of memory allocation "p" to the count in // *db->pnBytesFreed. -func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28477:29: */ +func measureAllocationSize(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28479:29: */ *(*int32)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed)) += Xsqlite3DbMallocSize(tls, db, p) } // Free memory that might be associated with a particular database // connection. Calling sqlite3DbFree(D,X) for X==0 is a harmless no-op. // The sqlite3DbFreeNN(D,X) version requires that X be non-NULL. -func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28486:21: */ +func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28488:21: */ if db != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed != 0 { @@ -15606,7 +15606,7 @@ func Xsqlite3DbFreeNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28486 Xsqlite3_free(tls, p) } -func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28523:21: */ +func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28525:21: */ if p != 0 { Xsqlite3DbFreeNN(tls, db, p) @@ -15614,7 +15614,7 @@ func Xsqlite3DbFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:28523:2 } // Change the size of an existing memory allocation -func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:28531:21: */ +func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlite3.c:28533:21: */ var nOld int32 var nNew int32 var nDiff int32 @@ -15675,7 +15675,7 @@ func Xsqlite3Realloc(tls *libc.TLS, pOld uintptr, nBytes U64) uintptr { /* sqlit // The public interface to sqlite3Realloc. Make sure that the memory // subsystem is initialized prior to invoking sqliteRealloc. -func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:28590:17: */ +func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3.c:28592:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15685,7 +15685,7 @@ func Xsqlite3_realloc(tls *libc.TLS, pOld uintptr, n int32) uintptr { /* sqlite3 return Xsqlite3Realloc(tls, pOld, uint64(n)) } -func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:28597:17: */ +func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { /* sqlite3.c:28599:17: */ if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } @@ -15693,7 +15693,7 @@ func Xsqlite3_realloc64(tls *libc.TLS, pOld uintptr, n Sqlite3_uint64) uintptr { } // Allocate and zero memory. -func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28608:21: */ +func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28610:21: */ var p uintptr = Xsqlite3Malloc(tls, n) if p != 0 { libc.Xmemset(tls, p, 0, Size_t(n)) @@ -15703,7 +15703,7 @@ func Xsqlite3MallocZero(tls *libc.TLS, n U64) uintptr { /* sqlite3.c:28608:21: * // Allocate and zero memory. If the allocation fails, make // the mallocFailed flag in the connection pointer. -func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28620:21: */ +func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28622:21: */ var p uintptr p = Xsqlite3DbMallocRaw(tls, db, n) @@ -15715,7 +15715,7 @@ func Xsqlite3DbMallocZero(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3 // Finish the work of sqlite3DbMallocRawNN for the unusual and // slower case when the allocation cannot be fulfilled using lookaside. -func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28632:29: */ +func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28634:29: */ var p uintptr p = Xsqlite3Malloc(tls, n) @@ -15746,7 +15746,7 @@ func dbMallocRawFinish(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c: // // The sqlite3MallocRawNN() variant guarantees that the "db" parameter is // not a NULL pointer. -func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28664:21: */ +func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28666:21: */ var p uintptr if db != 0 { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -15756,7 +15756,7 @@ func Xsqlite3DbMallocRaw(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3. return p } -func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28671:21: */ +func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite3.c:28673:21: */ var pBuf uintptr if n > U64((*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz) { @@ -15794,7 +15794,7 @@ func Xsqlite3DbMallocRawNN(tls *libc.TLS, db uintptr, n U64) uintptr { /* sqlite // Resize the block of memory pointed to by p to n bytes. If the // resize fails, set the mallocFailed flag in the connection object. -func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28727:21: */ +func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28729:21: */ if p == uintptr(0) { return Xsqlite3DbMallocRawNN(tls, db, n) @@ -15814,7 +15814,7 @@ func Xsqlite3DbRealloc(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* return dbReallocFinish(tls, db, p, n) } -func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28743:29: */ +func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28745:29: */ var pNew uintptr = uintptr(0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -15838,7 +15838,7 @@ func dbReallocFinish(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* s // Attempt to reallocate p. If the reallocation fails, then free p // and set the mallocFailed flag in the database connection. -func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28773:21: */ +func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintptr { /* sqlite3.c:28775:21: */ var pNew uintptr pNew = Xsqlite3DbRealloc(tls, db, p, n) if !(pNew != 0) { @@ -15852,7 +15852,7 @@ func Xsqlite3DbReallocOrFree(tls *libc.TLS, db uintptr, p uintptr, n U64) uintpt // is because when memory debugging is turned on, these two functions are // called via macros that record the current file and line number in the // ThreadData structure. -func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:28789:21: */ +func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3.c:28791:21: */ var zNew uintptr var n Size_t if z == uintptr(0) { @@ -15866,7 +15866,7 @@ func Xsqlite3DbStrDup(tls *libc.TLS, db uintptr, z uintptr) uintptr { /* sqlite3 return zNew } -func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28802:21: */ +func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* sqlite3.c:28804:21: */ var zNew uintptr if z != 0 { @@ -15884,7 +15884,7 @@ func Xsqlite3DbStrNDup(tls *libc.TLS, db uintptr, z uintptr, n U64) uintptr { /* // The text between zStart and zEnd represents a phrase within a larger // SQL statement. Make a copy of this phrase in space obtained form // sqlite3DbMalloc(). Omit leading and trailing whitespace. -func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:28820:21: */ +func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:28822:21: */ var n int32 for int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zStart)))])&0x01 != 0 { zStart++ @@ -15897,7 +15897,7 @@ func Xsqlite3DbSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) } // Free any prior content in *pz and replace it with a copy of zNew. -func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:28831:21: */ +func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* sqlite3.c:28833:21: */ Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(pz))) *(*uintptr)(unsafe.Pointer(pz)) = Xsqlite3DbStrDup(tls, db, zNew) } @@ -15906,7 +15906,7 @@ func Xsqlite3SetString(tls *libc.TLS, pz uintptr, db uintptr, zNew uintptr) { /* // has happened. This routine will set db->mallocFailed, and also // temporarily disable the lookaside memory allocator and interrupt // any running VDBEs. -func Xsqlite3OomFault(tls *libc.TLS, db uintptr) { /* sqlite3.c:28842:21: */ +func Xsqlite3OomFault(tls *libc.TLS, db uintptr) { /* sqlite3.c:28844:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).FbBenignMalloc) == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(1) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 0 { @@ -15925,7 +15925,7 @@ func Xsqlite3OomFault(tls *libc.TLS, db uintptr) { /* sqlite3.c:28842:21: */ // // The memory allocator is not restarted if there are running // VDBEs. -func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:28862:21: */ +func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:28864:21: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 { (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed = U8(0) libc.AtomicStoreNInt32(db+300, int32(0), 0) @@ -15941,7 +15941,7 @@ func Xsqlite3OomClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:28862:21: */ } // Take actions at the end of an API call to deal with error codes. -func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28874:28: */ +func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28876:28: */ if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || rc == SQLITE_IOERR|int32(12)<<8 { Xsqlite3OomClear(tls, db) Xsqlite3Error(tls, db, SQLITE_NOMEM) @@ -15960,7 +15960,7 @@ func apiHandleError(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28 // // If an OOM as occurred, then the connection error-code (the value // returned by sqlite3_errcode()) is set to SQLITE_NOMEM. -func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28895:20: */ +func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:28897:20: */ // If the db handle must hold the connection handle mutex here. // Otherwise the read (and possible write) of db->mallocFailed // is unsafe, as is the call to sqlite3Error(). @@ -15989,7 +15989,7 @@ func Xsqlite3ApiExit(tls *libc.TLS, db uintptr, rc int32) int32 { /* sqlite3.c:2 // The rest are extensions, not normally found in printf() // An "etByte" is an 8-bit unsigned value. -type EtByte = uint8 /* sqlite3.c:28953:23 */ +type EtByte = uint8 /* sqlite3.c:28955:23 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure @@ -16000,18 +16000,18 @@ type et_info = struct { Ftype EtByte Fcharset EtByte Fprefix EtByte -} /* sqlite3.c:28959:9 */ +} /* sqlite3.c:28961:9 */ // Each builtin conversion character (ex: the 'd' in "%d") is described // by an instance of the following structure -type Et_info = et_info /* sqlite3.c:28966:3 */ +type Et_info = et_info /* sqlite3.c:28968:3 */ // Allowed values for et_info.flags // The following table is searched linearly, so it is good to put the // most frequently used conversion types first. -var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1493 /* "0123456789ABCDEF..." */)) /* sqlite3.c:28979:19 */ -var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1526 /* "-x0\x00X0" */)) /* sqlite3.c:28980:19 */ +var aDigits = *(*[33]int8)(unsafe.Pointer(ts + 1515)) /* sqlite3.c:28981:19 */ +var aPrefix = *(*[7]int8)(unsafe.Pointer(ts + 1548)) /* sqlite3.c:28982:19 */ var fmtinfo = [23]Et_info{ {Ffmttype: int8('d'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtDECIMAL)}, {Ffmttype: int8('s'), Fflags: EtByte(4), Ftype: EtByte(EtSTRING)}, @@ -16038,7 +16038,7 @@ var fmtinfo = [23]Et_info{ {Ffmttype: int8('T'), Ftype: EtByte(EtTOKEN)}, {Ffmttype: int8('S'), Ftype: EtByte(EtSRCITEM)}, {Ffmttype: int8('r'), Fbase: EtByte(10), Fflags: EtByte(1), Ftype: EtByte(EtORDINAL)}, -} /* sqlite3.c:28981:22 */ +} /* sqlite3.c:28983:22 */ // Notes: // @@ -16049,7 +16049,7 @@ var fmtinfo = [23]Et_info{ var arRound = [10]float64{ 5.0e-01, 5.0e-02, 5.0e-03, 5.0e-04, 5.0e-05, 5.0e-06, 5.0e-07, 5.0e-08, 5.0e-09, 5.0e-10, -} /* sqlite3.c:29018:21 */ +} /* sqlite3.c:29020:21 */ // If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point // conversions will work. @@ -16064,7 +16064,7 @@ var arRound = [10]float64{ // The counter *cnt is incremented each time. After counter exceeds // 16 (the number of significant digits in a 64-bit float) '0' is // always returned. -func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29041:13: */ +func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29043:13: */ var digit int32 var d float64 if *(*int32)(unsafe.Pointer(cnt)) <= 0 { @@ -16079,7 +16079,7 @@ func et_getdigit(tls *libc.TLS, val uintptr, cnt uintptr) int8 { /* sqlite3.c:29 } // Set the StrAccum object to an error mode. -func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29057:21: */ +func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3.c:29059:21: */ (*StrAccum)(unsafe.Pointer(p)).FaccError = eError if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc != 0 { @@ -16091,21 +16091,21 @@ func Xsqlite3StrAccumSetError(tls *libc.TLS, p uintptr, eError U8) { /* sqlite3. } // Extra argument values from a PrintfArguments object -func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29067:22: */ +func getIntArg(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:29069:22: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return int64(0) } return Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*4))) } -func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29071:15: */ +func getDoubleArg(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:29073:15: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return 0.0 } return Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer((*PrintfArguments)(unsafe.Pointer(p)).FapArg + uintptr(libc.PostIncInt32(&(*PrintfArguments)(unsafe.Pointer(p)).FnUsed, 1))*4))) } -func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29075:13: */ +func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29077:13: */ if (*PrintfArguments)(unsafe.Pointer(p)).FnArg <= (*PrintfArguments)(unsafe.Pointer(p)).FnUsed { return uintptr(0) } @@ -16119,7 +16119,7 @@ func getTextArg(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29075:13: */ // Do the size check before the memory allocation to prevent rogue // SQL from requesting large allocations using the precision or width // field of the printf() function. -func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29089:13: */ +func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* sqlite3.c:29091:13: */ var z uintptr if (*Sqlite3_str)(unsafe.Pointer(pAccum)).FaccError != 0 { return uintptr(0) @@ -16141,7 +16141,7 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Hard limit on the precision of floating-point conversions. // Render a string given by "fmt" into the StrAccum object. -func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29122:17: */ +func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:29124:17: */ bp := tls.Alloc(108) defer tls.Free(108) @@ -16265,7 +16265,7 @@ __6: if !(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PreIncUintptr(&fmt, 1))))) == 0) { goto __11 } - Xsqlite3_str_append(tls, pAccum, ts+1533 /* "%" */, 1) + Xsqlite3_str_append(tls, pAccum, ts+1555, 1) goto __5 __11: ; @@ -16832,7 +16832,7 @@ __124: goto __125 } *(*float64)(unsafe.Pointer(bp + 88 /* rx */)) = *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) - libc.Xmemcpy(tls, bp+80 /* &u */, bp+88 /* &rx */, uint32(unsafe.Sizeof(Sqlite3_uint64(0)))) + libc.Xmemcpy(tls, bp+80, bp+88, uint32(unsafe.Sizeof(Sqlite3_uint64(0)))) ex = -1023 + int32(*(*Sqlite3_uint64)(unsafe.Pointer(bp + 80))>>52&uint64(0x7ff)) if !(precision+ex/3 < 15) { goto __126 @@ -16848,7 +16848,7 @@ __125: if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 96))) != 0) { goto __127 } - bufpt = ts + 1535 /* "NaN" */ + bufpt = ts + 1557 /* "NaN" */ length = 3 goto __58 __127: @@ -16907,8 +16907,8 @@ __138: goto __139 } bufpt = bp + 8 /* &buf[0] */ - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = prefix - libc.Xmemcpy(tls, bp+8+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1539 /* "Inf" */, uint32(4)) + *(*int8)(unsafe.Pointer(bp + 8)) = prefix + libc.Xmemcpy(tls, bp+8+uintptr(libc.Bool32(int32(prefix) != 0)), ts+1561, uint32(4)) length = 3 + libc.Bool32(int32(prefix) != 0) goto __58 __139: @@ -17006,7 +17006,7 @@ __153: if !(e2 >= 0) { goto __155 } - *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96 /* &realvalue */, bp+104 /* &nsd */) + *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96, bp+104) goto __154 __154: e2-- @@ -17045,7 +17045,7 @@ __160: if !(libc.PostDecInt32(&precision, 1) > 0) { goto __161 } - *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96 /* &realvalue */, bp+104 /* &nsd */) + *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96, bp+104) goto __160 __161: ; @@ -17154,7 +17154,7 @@ __178: length = libc.AssignInt32(&width, 0) goto __58 __67: - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8('%') + *(*int8)(unsafe.Pointer(bp + 8)) = int8('%') bufpt = bp + 8 /* &buf[0] */ length = 1 goto __58 @@ -17167,7 +17167,7 @@ __68: if !(bufpt != 0) { goto __181 } - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1)))))) + *(*int8)(unsafe.Pointer(bp + 8)) = int8(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1)))))) if !(c&0xc0 == 0xc0) { goto __183 } @@ -17175,7 +17175,7 @@ __184: if !(length < 4 && int32(*(*int8)(unsafe.Pointer(bufpt)))&0xc0 == 0x80) { goto __185 } - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + uintptr(libc.PostIncInt32(&length, 1)))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) + *(*int8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&length, 1)))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) goto __184 __185: ; @@ -17183,7 +17183,7 @@ __183: ; goto __182 __181: - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8(0) + *(*int8)(unsafe.Pointer(bp + 8)) = int8(0) __182: ; goto __180 @@ -17192,31 +17192,31 @@ __179: if !(ch < uint32(0x00080)) { goto __186 } - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8(ch & uint32(0xff)) + *(*int8)(unsafe.Pointer(bp + 8)) = int8(ch & uint32(0xff)) length = 1 goto __187 __186: if !(ch < uint32(0x00800)) { goto __188 } - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8(0xc0 + int32(U8(ch>>6&uint32(0x1f)))) - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) + *(*int8)(unsafe.Pointer(bp + 8)) = int8(0xc0 + int32(U8(ch>>6&uint32(0x1f)))) + *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) length = 2 goto __189 __188: if !(ch < uint32(0x10000)) { goto __190 } - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8(0xe0 + int32(U8(ch>>12&uint32(0x0f)))) - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = int8(0x80 + int32(U8(ch>>6&uint32(0x3f)))) - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 2)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) + *(*int8)(unsafe.Pointer(bp + 8)) = int8(0xe0 + int32(U8(ch>>12&uint32(0x0f)))) + *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(0x80 + int32(U8(ch>>6&uint32(0x3f)))) + *(*int8)(unsafe.Pointer(bp + 8 + 2)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) length = 3 goto __191 __190: - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8(0xf0 + int32(U8(ch>>18&uint32(0x07)))) - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = int8(0x80 + int32(U8(ch>>12&uint32(0x3f)))) - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 2)) = int8(0x80 + int32(U8(ch>>6&uint32(0x3f)))) - *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 3)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) + *(*int8)(unsafe.Pointer(bp + 8)) = int8(0xf0 + int32(U8(ch>>18&uint32(0x07)))) + *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(0x80 + int32(U8(ch>>12&uint32(0x3f)))) + *(*int8)(unsafe.Pointer(bp + 8 + 2)) = int8(0x80 + int32(U8(ch>>6&uint32(0x3f)))) + *(*int8)(unsafe.Pointer(bp + 8 + 3)) = int8(0x80 + int32(U8(ch&uint32(0x3f)))) length = 4 __191: ; @@ -17241,7 +17241,7 @@ __194: if !(libc.PostDecInt32(&precision, 1) > 1) { goto __195 } - Xsqlite3_str_append(tls, pAccum, bp+8 /* &buf[0] */, length) + Xsqlite3_str_append(tls, pAccum, bp+8, length) goto __194 __195: ; @@ -17265,7 +17265,7 @@ __197: if !(bufpt == uintptr(0)) { goto __198 } - bufpt = ts + 1543 /* "" */ + bufpt = ts + 1565 /* "" */ goto __199 __198: if !(int32(xtype) == EtDYNSTRING) { @@ -17394,9 +17394,9 @@ __219: } escarg = func() uintptr { if int32(xtype) == EtSQLESCAPE2 { - return ts + 1544 + return ts + 1566 } - return ts + 1549 + return ts + 1571 }() __220: ; @@ -17531,7 +17531,7 @@ __240: goto __244 } Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) - Xsqlite3_str_append(tls, pAccum, ts+1556 /* "." */, 1) + Xsqlite3_str_append(tls, pAccum, ts+1578, 1) __244: ; Xsqlite3_str_appendall(tls, pAccum, (*SrcItem)(unsafe.Pointer(pItem)).FzName) @@ -17546,7 +17546,7 @@ __245: if !((*SrcItem)(unsafe.Pointer(pItem)).FpSelect != 0) { goto __247 } - Xsqlite3_str_appendf(tls, pAccum, ts+1558 /* "SUBQUERY %u" */, libc.VaList(bp, (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselId)) + Xsqlite3_str_appendf(tls, pAccum, ts+1580, libc.VaList(bp, (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpSelect)).FselId)) __247: ; __246: @@ -17609,7 +17609,7 @@ __5: // End for loop over the format string } -var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1570 /* "thstndrd" */)) /* sqlite3.c:29385:29 */ +var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1592)) /* sqlite3.c:29387:29 */ // End of function @@ -17618,7 +17618,7 @@ var zOrd = *(*[9]int8)(unsafe.Pointer(ts + 1570 /* "thstndrd" */)) /* sqlite3.c: // // Return the number of bytes of text that StrAccum is able to accept // after the attempted enlargement. The value returned might be zero. -func sqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:29828:12: */ +func sqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite3.c:29830:12: */ var zNew uintptr // Only called if really needed if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { @@ -17672,7 +17672,7 @@ func sqlite3StrAccumEnlarge(tls *libc.TLS, p uintptr, N int32) int32 { /* sqlite } // Append N copies of character c to the given string buffer. -func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:29878:17: */ +func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sqlite3.c:29880:17: */ if I64((*Sqlite3_str)(unsafe.Pointer(p)).FnChar)+I64(N) >= I64((*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc) && libc.AssignInt32(&N, sqlite3StrAccumEnlarge(tls, p, N)) <= 0 { return @@ -17688,7 +17688,7 @@ func Xsqlite3_str_appendchar(tls *libc.TLS, p uintptr, N int32, c int8) { /* sql // This is a helper routine to sqlite3_str_append() that does special-case // work (enlarging the buffer) using tail recursion, so that the // sqlite3_str_append() routine can use fast calling semantics. -func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:29894:29: */ +func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:29896:29: */ N = sqlite3StrAccumEnlarge(tls, p, N) if N > 0 { libc.Xmemcpy(tls, (*StrAccum)(unsafe.Pointer(p)).FzText+uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar), z, uint32(N)) @@ -17698,7 +17698,7 @@ func enlargeAndAppend(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3 // Append N bytes of text from z to the StrAccum object. Increase the // size of the memory allocation for StrAccum if necessary. -func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:29906:17: */ +func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqlite3.c:29908:17: */ if (*Sqlite3_str)(unsafe.Pointer(p)).FnChar+U32(N) >= (*Sqlite3_str)(unsafe.Pointer(p)).FnAlloc { enlargeAndAppend(tls, p, z, N) @@ -17710,14 +17710,14 @@ func Xsqlite3_str_append(tls *libc.TLS, p uintptr, z uintptr, N int32) { /* sqli } // Append the complete text of zero-terminated string z[] to the p string. -func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:29923:17: */ +func Xsqlite3_str_appendall(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:29925:17: */ Xsqlite3_str_append(tls, p, z, Xsqlite3Strlen30(tls, z)) } // Finish off a string by making sure it is zero-terminated. // Return a pointer to the resulting string. Return a NULL // pointer if any kind of error was encountered. -func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29933:29: */ +func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29935:29: */ var zText uintptr zText = Xsqlite3DbMallocRaw(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, uint64((*StrAccum)(unsafe.Pointer(p)).FnChar+U32(1))) @@ -17731,7 +17731,7 @@ func strAccumFinishRealloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:2993 return zText } -func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29946:21: */ +func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29948:21: */ if (*StrAccum)(unsafe.Pointer(p)).FzText != 0 { *(*int8)(unsafe.Pointer((*StrAccum)(unsafe.Pointer(p)).FzText + uintptr((*StrAccum)(unsafe.Pointer(p)).FnChar))) = int8(0) if (*StrAccum)(unsafe.Pointer(p)).FmxAlloc > U32(0) && !(int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0) { @@ -17743,14 +17743,14 @@ func Xsqlite3StrAccumFinish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:299 // Use the content of the StrAccum passed as the second argument // as the result of an SQL function. -func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:29960:21: */ +func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3.c:29962:21: */ if (*StrAccum)(unsafe.Pointer(p)).FaccError != 0 { Xsqlite3_result_error_code(tls, pCtx, int32((*StrAccum)(unsafe.Pointer(p)).FaccError)) Xsqlite3_str_reset(tls, p) } else if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3_result_text(tls, pCtx, (*StrAccum)(unsafe.Pointer(p)).FzText, int32((*StrAccum)(unsafe.Pointer(p)).FnChar), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault}))) } else { - Xsqlite3_result_text(tls, pCtx, ts+1543 /* "" */, 0, uintptr(0)) + Xsqlite3_result_text(tls, pCtx, ts+1565, 0, uintptr(0)) Xsqlite3_str_reset(tls, p) } } @@ -17759,10 +17759,10 @@ func Xsqlite3ResultStrAccum(tls *libc.TLS, pCtx uintptr, p uintptr) { /* sqlite3 // sqlite3_malloc() fails to provide space for a real one. This // sqlite3_str object accepts no new text and always returns // an SQLITE_NOMEM error. -var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:29978:20 */ +var sqlite3OomStr = Sqlite3_str{FaccError: U8(SQLITE_NOMEM)} /* sqlite3.c:29980:20 */ // Finalize a string created using sqlite3_str_new(). -func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29984:17: */ +func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29986:17: */ var z uintptr if p != uintptr(0) && p != uintptr(unsafe.Pointer(&sqlite3OomStr)) { z = Xsqlite3StrAccumFinish(tls, p) @@ -17774,7 +17774,7 @@ func Xsqlite3_str_finish(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:29984: } // Return any error code associated with p -func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29996:16: */ +func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29998:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FaccError) } @@ -17782,7 +17782,7 @@ func Xsqlite3_str_errcode(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:29996:1 } // Return the current length of p in bytes -func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30001:16: */ +func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30003:16: */ if p != 0 { return int32((*Sqlite3_str)(unsafe.Pointer(p)).FnChar) } @@ -17790,7 +17790,7 @@ func Xsqlite3_str_length(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:30001:16 } // Return the current value for p -func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30006:17: */ +func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30008:17: */ if p == uintptr(0) || (*Sqlite3_str)(unsafe.Pointer(p)).FnChar == U32(0) { return uintptr(0) } @@ -17799,7 +17799,7 @@ func Xsqlite3_str_value(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:30006:1 } // Reset an StrAccum string. Reclaim all malloced memory. -func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30015:17: */ +func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30017:17: */ if int32((*StrAccum)(unsafe.Pointer(p)).FprintfFlags)&SQLITE_PRINTF_MALLOCED != 0 { Xsqlite3DbFree(tls, (*StrAccum)(unsafe.Pointer(p)).Fdb, (*StrAccum)(unsafe.Pointer(p)).FzText) *(*U8)(unsafe.Pointer(p + 21)) &= libc.Uint8FromInt32(libc.CplInt32(SQLITE_PRINTF_MALLOCED)) @@ -17821,7 +17821,7 @@ func Xsqlite3_str_reset(tls *libc.TLS, p uintptr) { /* sqlite3.c:30015:17: */ // n then no memory allocations ever occur. // mx: Maximum number of bytes to accumulate. If mx==0 then no memory // allocations will ever occur. -func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30039:21: */ +func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n int32, mx int32) { /* sqlite3.c:30041:21: */ (*StrAccum)(unsafe.Pointer(p)).FzText = zBase (*StrAccum)(unsafe.Pointer(p)).Fdb = db (*StrAccum)(unsafe.Pointer(p)).FnAlloc = U32(n) @@ -17832,7 +17832,7 @@ func Xsqlite3StrAccumInit(tls *libc.TLS, p uintptr, db uintptr, zBase uintptr, n } // Allocate and initialize a new dynamic string object -func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30050:24: */ +func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30052:24: */ var p uintptr = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3_str{}))) if p != 0 { Xsqlite3StrAccumInit(tls, p, uintptr(0), uintptr(0), 0, @@ -17850,7 +17850,7 @@ func Xsqlite3_str_new(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:30050:24 // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30065:21: */ +func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30067:21: */ bp := tls.Alloc(94) defer tls.Free(94) @@ -17859,11 +17859,11 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // var acc StrAccum at bp, 24 - Xsqlite3StrAccumInit(tls, bp /* &acc */, db, bp+24 /* &zBase[0] */, int32(unsafe.Sizeof([70]int8{})), + Xsqlite3StrAccumInit(tls, bp, db, bp+24, int32(unsafe.Sizeof([70]int8{})), *(*int32)(unsafe.Pointer(db + 112))) (*StrAccum)(unsafe.Pointer(bp /* &acc */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_vappendf(tls, bp /* &acc */, zFormat, ap) - z = Xsqlite3StrAccumFinish(tls, bp /* &acc */) + Xsqlite3_str_vappendf(tls, bp, zFormat, ap) + z = Xsqlite3StrAccumFinish(tls, bp) if int32((*StrAccum)(unsafe.Pointer(bp)).FaccError) == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) } @@ -17872,7 +17872,7 @@ func Xsqlite3VMPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, ap Va_list) ui // Print into memory obtained from sqliteMalloc(). Use the internal // %-conversion extensions. -func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30085:21: */ +func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30087:21: */ var ap Va_list _ = ap var z uintptr @@ -17884,7 +17884,7 @@ func Xsqlite3MPrintf(tls *libc.TLS, db uintptr, zFormat uintptr, va uintptr) uin // Print into memory obtained from sqlite3_malloc(). Omit the internal // %-conversion extensions. -func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30098:17: */ +func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30100:17: */ bp := tls.Alloc(94) defer tls.Free(94) @@ -17896,15 +17896,15 @@ func Xsqlite3_vmprintf(tls *libc.TLS, zFormat uintptr, ap Va_list) uintptr { /* if Xsqlite3_initialize(tls) != 0 { return uintptr(0) } - Xsqlite3StrAccumInit(tls, bp /* &acc */, uintptr(0), bp+24 /* &zBase[0] */, int32(unsafe.Sizeof([70]int8{})), SQLITE_MAX_LENGTH) - Xsqlite3_str_vappendf(tls, bp /* &acc */, zFormat, ap) - z = Xsqlite3StrAccumFinish(tls, bp /* &acc */) + Xsqlite3StrAccumInit(tls, bp, uintptr(0), bp+24, int32(unsafe.Sizeof([70]int8{})), SQLITE_MAX_LENGTH) + Xsqlite3_str_vappendf(tls, bp, zFormat, ap) + z = Xsqlite3StrAccumFinish(tls, bp) return z } // Print into memory obtained from sqlite3_malloc()(). Omit the internal // %-conversion extensions. -func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30122:17: */ +func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30124:17: */ var ap Va_list _ = ap var z uintptr @@ -17928,7 +17928,7 @@ func Xsqlite3_mprintf(tls *libc.TLS, zFormat uintptr, va uintptr) uintptr { /* s // mistake. // // sqlite3_vsnprintf() is the varargs version. -func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30147:17: */ +func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, ap Va_list) uintptr { /* sqlite3.c:30149:17: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -17937,13 +17937,13 @@ func Xsqlite3_vsnprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, a if n <= 0 { return zBuf } - Xsqlite3StrAccumInit(tls, bp /* &acc */, uintptr(0), zBuf, n, 0) - Xsqlite3_str_vappendf(tls, bp /* &acc */, zFormat, ap) + Xsqlite3StrAccumInit(tls, bp, uintptr(0), zBuf, n, 0) + Xsqlite3_str_vappendf(tls, bp, zFormat, ap) *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp /* &acc */)).FnChar))) = int8(0) return zBuf } -func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30162:17: */ +func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va uintptr) uintptr { /* sqlite3.c:30164:17: */ var z uintptr var ap Va_list _ = ap @@ -17965,7 +17965,7 @@ func Xsqlite3_snprintf(tls *libc.TLS, n int32, zBuf uintptr, zFormat uintptr, va // certain format characters (%q) or for very large precisions or widths. // Care must be taken that any sqlite3_log() calls that occur while the // memory mutex is held do not use these mechanisms. -func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30185:13: */ +func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { /* sqlite3.c:30187:13: */ bp := tls.Alloc(234) defer tls.Free(234) @@ -17974,8 +17974,8 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { // var zMsg [210]int8 at bp+24, 210 // Complete log message - Xsqlite3StrAccumInit(tls, bp /* &acc */, uintptr(0), bp+24 /* &zMsg[0] */, int32(unsafe.Sizeof([210]int8{})), 0) - Xsqlite3_str_vappendf(tls, bp /* &acc */, zFormat, ap) + Xsqlite3StrAccumInit(tls, bp, uintptr(0), bp+24, int32(unsafe.Sizeof([210]int8{})), 0) + Xsqlite3_str_vappendf(tls, bp, zFormat, ap) (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.FxLog})).f(tls, Xsqlite3Config.FpLogArg, iErrCode, @@ -17983,7 +17983,7 @@ func renderLogMsg(tls *libc.TLS, iErrCode int32, zFormat uintptr, ap Va_list) { } // Format and write a message to the log if logging is enabled. -func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30198:17: */ +func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:30200:17: */ var ap Va_list _ = ap // Vararg list if Xsqlite3Config.FxLog != 0 { @@ -17995,7 +17995,7 @@ func Xsqlite3_log(tls *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { // variable-argument wrapper around sqlite3_str_vappendf(). The bFlags argument // can contain the bit SQLITE_PRINTF_INTERNAL enable internal formats. -func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30239:17: */ +func Xsqlite3_str_appendf(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:30241:17: */ var ap Va_list _ = ap ap = va @@ -18050,7 +18050,7 @@ type sqlite3PrngType = struct { Fi uint8 Fj uint8 Fs [256]uint8 -} /* sqlite3.c:31091:19 */ +} /* sqlite3.c:31093:19 */ //************* End of printf.c ********************************************* //************* Begin file treeview.c *************************************** @@ -18094,10 +18094,10 @@ type sqlite3PrngType = struct { // All threads share a single random number generator. // This structure is the current state of the generator. -var sqlite3Prng sqlite3PrngType /* sqlite3.c:31095:3: */ +var sqlite3Prng sqlite3PrngType /* sqlite3.c:31097:3: */ // Return N random bytes. -func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31100:17: */ +func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31102:17: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -18141,9 +18141,9 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 sqlite3Prng.Fj = uint8(0) sqlite3Prng.Fi = uint8(0) if pVfs == uintptr(0) { - libc.Xmemset(tls, bp /* &k[0] */, 0, uint32(unsafe.Sizeof([256]int8{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([256]int8{}))) } else { - Xsqlite3OsRandomness(tls, pVfs, 256, bp /* &k[0] */) + Xsqlite3OsRandomness(tls, pVfs, 256, bp) } for i = 0; i < 256; i++ { *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Prng)) + 3 + uintptr(i))) = U8(i) @@ -18176,16 +18176,16 @@ func Xsqlite3_randomness(tls *libc.TLS, N int32, pBuf uintptr) { /* sqlite3.c:31 // // The sqlite3_test_control() interface calls these routines to // control the PRNG. -var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31191:42: */ +var sqlite3SavedPrng sqlite3PrngType /* sqlite3.c:31193:42: */ -func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31192:21: */ +func Xsqlite3PrngSaveState(tls *libc.TLS) { /* sqlite3.c:31194:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3SavedPrng)), uintptr(unsafe.Pointer(&sqlite3Prng)), uint32(unsafe.Sizeof(sqlite3Prng))) } -func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31199:21: */ +func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31201:21: */ libc.Xmemcpy(tls, uintptr(unsafe.Pointer(&sqlite3Prng)), uintptr(unsafe.Pointer(&sqlite3SavedPrng)), @@ -18193,7 +18193,7 @@ func Xsqlite3PrngRestoreState(tls *libc.TLS) { /* sqlite3.c:31199:21: */ } // Create a new thread -func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31435:20: */ +func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:31437:20: */ var p uintptr *(*uintptr)(unsafe.Pointer(ppThread)) = uintptr(0) @@ -18215,7 +18215,7 @@ func Xsqlite3ThreadCreate(tls *libc.TLS, ppThread uintptr, xTask uintptr, pIn ui } // Get the results of the thread -func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:31459:20: */ +func Xsqlite3ThreadJoin(tls *libc.TLS, p uintptr, ppOut uintptr) int32 { /* sqlite3.c:31461:20: */ if p == uintptr(0) { return SQLITE_NOMEM @@ -18284,7 +18284,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ uint8(0x08), uint8(0x09), uint8(0x0a), uint8(0x0b), uint8(0x0c), uint8(0x0d), uint8(0x0e), uint8(0x0f), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x04), uint8(0x05), uint8(0x06), uint8(0x07), uint8(0x00), uint8(0x01), uint8(0x02), uint8(0x03), uint8(0x00), uint8(0x01), uint8(0x00), uint8(0x00), -} /* sqlite3.c:31538:28 */ +} /* sqlite3.c:31540:28 */ // Translate a single UTF-8 character. Return the unicode value. // @@ -18311,7 +18311,7 @@ var sqlite3Utf8Trans1 = [64]uint8{ // * This routine accepts over-length UTF8 encodings // for unicode values 0x80 and greater. It does not change over-length // encodings to 0xfffd as some systems recommend. -func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:31632:20: */ +func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:31634:20: */ var c uint32 // Same as READ_UTF8() above but without the zTerm parameter. @@ -18338,7 +18338,7 @@ func Xsqlite3Utf8Read(tls *libc.TLS, pz uintptr) U32 { /* sqlite3.c:31632:20: */ // This routine transforms the internal text encoding used by pMem to // desiredEnc. It is an error if the string is already of the desired // encoding, or if *pMem does not contain a string value. -func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:31668:36: */ +func Xsqlite3VdbeMemTranslate(tls *libc.TLS, pMem uintptr, desiredEnc U8) int32 { /* sqlite3.c:31670:36: */ var len Sqlite3_int64 // Maximum length of output string in bytes var zOut uintptr // Output buffer var zIn uintptr // Input iterator @@ -18663,7 +18663,7 @@ translate_out: // // The allocation (static, dynamic etc.) and encoding of the Mem may be // changed by this function. -func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:31863:20: */ +func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:31865:20: */ var rc int32 = SQLITE_OK var bom U8 = U8(0) @@ -18697,7 +18697,7 @@ func Xsqlite3VdbeMemHandleBom(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // the first 0x00 byte. If nByte is not less than zero, return the // number of unicode characters in the first nByte of pZ (or up to // the first 0x00, whichever comes first). -func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:31901:20: */ +func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sqlite3.c:31903:20: */ var r int32 = 0 var z uintptr = zIn var zTerm uintptr @@ -18729,18 +18729,18 @@ func Xsqlite3Utf8CharLen(tls *libc.TLS, zIn uintptr, nByte int32) int32 { /* sql // be freed by the calling function. // // NULL is returned if there is an allocation error. -func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:31955:21: */ +func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) uintptr { /* sqlite3.c:31957:21: */ bp := tls.Alloc(40) defer tls.Free(40) // var m Mem at bp, 40 - libc.Xmemset(tls, bp /* &m */, 0, uint32(unsafe.Sizeof(Mem{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp /* &m */)).Fdb = db - Xsqlite3VdbeMemSetStr(tls, bp /* &m */, z, int64(nByte), enc, uintptr(0)) - Xsqlite3VdbeChangeEncoding(tls, bp /* &m */, SQLITE_UTF8) + Xsqlite3VdbeMemSetStr(tls, bp, z, int64(nByte), enc, uintptr(0)) + Xsqlite3VdbeChangeEncoding(tls, bp, SQLITE_UTF8) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { - Xsqlite3VdbeMemRelease(tls, bp /* &m */) + Xsqlite3VdbeMemRelease(tls, bp) (*Mem)(unsafe.Pointer(bp /* &m */)).Fz = uintptr(0) } @@ -18750,7 +18750,7 @@ func Xsqlite3Utf16to8(tls *libc.TLS, db uintptr, z uintptr, nByte int32, enc U8) // zIn is a UTF-16 encoded unicode string at least nChar characters long. // Return the number of bytes in the first nChar unicode characters // in pZ. nChar must be non-negative. -func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:31976:20: */ +func Xsqlite3Utf16ByteLen(tls *libc.TLS, zIn uintptr, nChar int32) int32 { /* sqlite3.c:31978:20: */ var c int32 var z uintptr = zIn var n int32 = 0 @@ -19048,7 +19048,7 @@ type Double_t = float64 /* math.h:156:21 */ // sqlite3FaultSim() instance is being invoked. Each call to sqlite3FaultSim() // should have a unique code. To prevent legacy testing applications from // breaking, the codes should not be changed or reused. -func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32068:20: */ +func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32070:20: */ var xCallback uintptr = Xsqlite3Config.FxTestCallback if xCallback != 0 { return (*struct{ f func(*libc.TLS, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{xCallback})).f(tls, iTest) @@ -19060,7 +19060,7 @@ func Xsqlite3FaultSim(tls *libc.TLS, iTest int32) int32 { /* sqlite3.c:32068:20: // // Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN. // Otherwise, we have our own implementation that works on most systems. -func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32081:20: */ +func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32083:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -19068,7 +19068,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32081:20: */ var rc int32 // The value return // var y U64 at bp, 8 - libc.Xmemcpy(tls, bp /* &y */, bp+8 /* &x */, uint32(unsafe.Sizeof(U64(0)))) + libc.Xmemcpy(tls, bp, bp+8, uint32(unsafe.Sizeof(U64(0)))) rc = libc.Bool32(*(*U64)(unsafe.Pointer(bp))&(U64(uint64(0x7ff))<<52) == U64(uint64(0x7ff))<<52 && *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<52-uint64(1)) != uint64(0)) return rc @@ -19080,7 +19080,7 @@ func Xsqlite3IsNaN(tls *libc.TLS, x float64) int32 { /* sqlite3.c:32081:20: */ // The value returned will never be negative. Nor will it ever be greater // than the actual length of the string. For very long strings (greater // than 1GiB) the value returned might be less than the true string length. -func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32103:20: */ +func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32105:20: */ if z == uintptr(0) { return 0 } @@ -19092,7 +19092,7 @@ func Xsqlite3Strlen30(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32103:20: * // // The column type is an extra string stored after the zero-terminator on // the column name if and only if the COLFLAG_HASTYPE flag is set. -func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32115:21: */ +func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* sqlite3.c:32117:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { return (*Column)(unsafe.Pointer(pCol)).FzCnName + uintptr(libc.Xstrlen(tls, (*Column)(unsafe.Pointer(pCol)).FzCnName)) + uintptr(1) } else if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4)) != 0 { @@ -19107,7 +19107,7 @@ func Xsqlite3ColumnType(tls *libc.TLS, pCol uintptr, zDflt uintptr) uintptr { /* // Helper function for sqlite3Error() - called rarely. Broken out into // a separate routine to avoid unnecessary register saves on entry to // sqlite3Error(). -func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32131:30: */ +func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32133:30: */ if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { Xsqlite3ValueSetNull(tls, (*Sqlite3)(unsafe.Pointer(db)).FpErr) } @@ -19117,7 +19117,7 @@ func sqlite3ErrorFinish(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3. // Set the current error code to err_code and clear any prior error message. // Also set iSysErrno (by calling sqlite3System) if the err_code indicates // that would be appropriate. -func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32141:21: */ +func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:32143:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code if err_code != 0 || (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -19127,7 +19127,7 @@ func Xsqlite3Error(tls *libc.TLS, db uintptr, err_code int32) { /* sqlite3.c:321 // The equivalent of sqlite3Error(db, SQLITE_OK). Clear the error state // and error message. -func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32151:21: */ +func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32153:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FpErr != 0 { @@ -19137,7 +19137,7 @@ func Xsqlite3ErrorClear(tls *libc.TLS, db uintptr) { /* sqlite3.c:32151:21: */ // Load the sqlite3.iSysErrno field if that is an appropriate thing // to do based on the SQLite error code in rc. -func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32161:21: */ +func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:32163:21: */ if rc == SQLITE_IOERR|int32(12)<<8 { return } @@ -19166,7 +19166,7 @@ func Xsqlite3SystemError(tls *libc.TLS, db uintptr, rc int32) { /* sqlite3.c:321 // To clear the most recent error for sqlite handle "db", sqlite3Error // should be called with err_code set to SQLITE_OK and zFormat set // to NULL. -func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32190:21: */ +func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uintptr, va uintptr) { /* sqlite3.c:32192:21: */ (*Sqlite3)(unsafe.Pointer(db)).FerrCode = err_code Xsqlite3SystemError(tls, db, err_code) @@ -19198,7 +19198,7 @@ func Xsqlite3ErrorWithMsg(tls *libc.TLS, db uintptr, err_code int32, zFormat uin // stored by this function into the database handle using sqlite3Error(). // Functions sqlite3Error() or sqlite3ErrorWithMsg() should be used // during statement execution (sqlite3_step() etc.). -func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32223:21: */ +func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:32225:21: */ var zMsg uintptr var ap Va_list _ = ap @@ -19220,7 +19220,7 @@ func Xsqlite3ErrorMsg(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr // If database connection db is currently parsing SQL, then transfer // error code errCode to that parser if the parser has not already // encountered some other kind of error. -func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32246:20: */ +func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* sqlite3.c:32248:20: */ var pParse uintptr if db == uintptr(0) || libc.AssignUintptr(&pParse, (*Sqlite3)(unsafe.Pointer(db)).FpParse) == uintptr(0) { return errCode @@ -19245,7 +19245,7 @@ func Xsqlite3ErrorToParser(tls *libc.TLS, db uintptr, errCode int32) int32 { /* // 2002-02-14: This routine is extended to remove MS-Access style // brackets from around identifiers. For example: "[a-b-c]" becomes // "a-b-c". -func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32271:21: */ +func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32273:21: */ var quote int8 var i int32 var j int32 @@ -19277,7 +19277,7 @@ func Xsqlite3Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:32271:21: */ *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) } -func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32293:21: */ +func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32295:21: */ *(*U32)(unsafe.Pointer(p + 4)) |= func() uint32 { if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(p + 8))))) == '"' { @@ -19297,7 +19297,7 @@ func Xsqlite3DequoteExpr(tls *libc.TLS, p uintptr) { /* sqlite3.c:32293:21: */ // Remove the quotes if possible. This is a optimization. The overall // system should still return the correct answer even if this routine // is always a no-op. -func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32311:21: */ +func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32313:21: */ var i uint32 if (*Token)(unsafe.Pointer(p)).Fn < uint32(2) { return @@ -19315,7 +19315,7 @@ func Xsqlite3DequoteToken(tls *libc.TLS, p uintptr) { /* sqlite3.c:32311:21: */ } // Generate a Token object from a string -func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32325:21: */ +func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32327:21: */ (*Token)(unsafe.Pointer(p)).Fz = z (*Token)(unsafe.Pointer(p)).Fn = uint32(Xsqlite3Strlen30(tls, z)) } @@ -19330,7 +19330,7 @@ func Xsqlite3TokenInit(tls *libc.TLS, p uintptr, z uintptr) { /* sqlite3.c:32325 // the contents of two buffers containing UTF-8 strings in a // case-independent fashion, using the same definition of "case // independence" that SQLite uses internally when comparing identifiers. -func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32343:16: */ +func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32345:16: */ if zLeft == uintptr(0) { if zRight != 0 { return -1 @@ -19342,7 +19342,7 @@ func Xsqlite3_stricmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* s return Xsqlite3StrICmp(tls, zLeft, zRight) } -func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32351:20: */ +func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sqlite3.c:32353:20: */ var a uintptr var b uintptr var c int32 @@ -19368,7 +19368,7 @@ func Xsqlite3StrICmp(tls *libc.TLS, zLeft uintptr, zRight uintptr) int32 { /* sq return c } -func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32370:16: */ +func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) int32 { /* sqlite3.c:32372:16: */ var a uintptr var b uintptr if zLeft == uintptr(0) { @@ -19392,7 +19392,7 @@ func Xsqlite3_strnicmp(tls *libc.TLS, zLeft uintptr, zRight uintptr, N int32) in } // Compute an 8-bit hash on a string that is insensitive to case differences -func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32386:19: */ +func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32388:19: */ var h U8 = U8(0) if z == uintptr(0) { return U8(0) @@ -19408,7 +19408,7 @@ func Xsqlite3StrIHash(tls *libc.TLS, z uintptr) U8 { /* sqlite3.c:32386:19: */ // E==2 results in 100. E==50 results in 1.0e50. // // This routine only works for values of E between 1 and 341. -func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32402:24: */ +func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32404:24: */ var x float64 = 10.0 var r float64 = 1.0 for 1 != 0 { @@ -19451,7 +19451,7 @@ func sqlite3Pow10(tls *libc.TLS, E int32) float64 { /* sqlite3.c:32402:24: */ // If some prefix of the input string is a valid number, this routine // returns FALSE but it still converts the prefix and writes the result // into *pResult. -func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:32467:20: */ +func Xsqlite3AtoF(tls *libc.TLS, z uintptr, pResult uintptr, length int32, enc U8) int32 { /* sqlite3.c:32469:20: */ var incr int32 var zEnd uintptr // sign * significand * (10 ^ (esign * exponent)) @@ -19831,7 +19831,7 @@ __57: // Render an signed 64-bit integer as text. Store the result in zOut[]. // // The caller must ensure that zOut[] is at least 21 bytes in size. -func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:32666:21: */ +func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:32668:21: */ bp := tls.Alloc(22) defer tls.Free(22) @@ -19849,13 +19849,13 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3266 x = U64(v) } i = int32(uint32(unsafe.Sizeof([22]int8{})) - uint32(2)) - *(*int8)(unsafe.Pointer(bp /* &zTemp[0] */ + 21)) = int8(0) + *(*int8)(unsafe.Pointer(bp + 21)) = int8(0) for ok := true; ok; ok = x != 0 { - *(*int8)(unsafe.Pointer(bp /* &zTemp[0] */ + uintptr(libc.PostDecInt32(&i, 1)))) = int8(x%uint64(10) + uint64('0')) + *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostDecInt32(&i, 1)))) = int8(x%uint64(10) + uint64('0')) x = x / uint64(10) } if v < int64(0) { - *(*int8)(unsafe.Pointer(bp /* &zTemp[0] */ + uintptr(libc.PostDecInt32(&i, 1)))) = int8('-') + *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostDecInt32(&i, 1)))) = int8('-') } libc.Xmemcpy(tls, zOut, bp+uintptr(i+1), uint32(unsafe.Sizeof([22]int8{}))-uint32(1)-uint32(i)) } @@ -19872,11 +19872,11 @@ func Xsqlite3Int64ToText(tls *libc.TLS, v I64, zOut uintptr) { /* sqlite3.c:3266 // compare2pow63("9223372036854775800", 1) // // will return -8. -func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:32699:12: */ +func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c:32701:12: */ var c int32 = 0 var i int32 // 012345678901234567 - var pow63 uintptr = ts + 1579 /* "9223372036854775..." */ + var pow63 uintptr = ts + 1601 /* "9223372036854775..." */ for i = 0; c == 0 && i < 18; i++ { c = (int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i*incr)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10 } @@ -19901,7 +19901,7 @@ func compare2pow63(tls *libc.TLS, zNum uintptr, incr int32) int32 { /* sqlite3.c // length is the number of bytes in the string (bytes, not characters). // The string is not necessarily zero-terminated. The encoding is // given by enc. -func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:32732:20: */ +func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc U8) int32 { /* sqlite3.c:32734:20: */ var incr int32 var u U64 = uint64(0) var neg int32 = 0 // assume positive @@ -20023,7 +20023,7 @@ func Xsqlite3Atoi64(tls *libc.TLS, zNum uintptr, pNum uintptr, length int32, enc // 1 Excess text after the integer value // 2 Integer too large for a 64-bit signed integer or is malformed // 3 Special case of 9223372036854775808 -func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:32835:20: */ +func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sqlite3.c:32837:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20037,7 +20037,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq for k = i; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(k))))])&0x08 != 0; k++ { *(*U64)(unsafe.Pointer(bp /* u */)) = *(*U64)(unsafe.Pointer(bp))*uint64(16) + U64(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(z + uintptr(k)))))) } - libc.Xmemcpy(tls, pOut, bp /* &u */, uint32(8)) + libc.Xmemcpy(tls, pOut, bp, uint32(8)) if int32(*(*int8)(unsafe.Pointer(z + uintptr(k)))) == 0 && k-i <= 16 { return 0 } @@ -20056,7 +20056,7 @@ func Xsqlite3DecOrHexToI64(tls *libc.TLS, z uintptr, pOut uintptr) int32 { /* sq // Any non-numeric characters that following zNum are ignored. // This is different from sqlite3Atoi64() which requires the // input number to be zero-terminated. -func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:32865:20: */ +func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sqlite3.c:32867:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -20081,7 +20081,7 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq *(*U32)(unsafe.Pointer(bp /* u */)) = *(*U32)(unsafe.Pointer(bp))*U32(16) + U32(Xsqlite3HexToInt(tls, int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))))) } if *(*U32)(unsafe.Pointer(bp))&0x80000000 == U32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zNum + uintptr(i))))])&0x08 == 0 { - libc.Xmemcpy(tls, pValue, bp /* &u */, uint32(4)) + libc.Xmemcpy(tls, pValue, bp, uint32(4)) return 1 } else { return 0 @@ -20118,12 +20118,12 @@ func Xsqlite3GetInt32(tls *libc.TLS, zNum uintptr, pValue uintptr) int32 { /* sq // Return a 32-bit integer value extracted from a string. If the // string is not an integer, just return 0. -func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32924:20: */ +func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32926:20: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* x */)) = 0 - Xsqlite3GetInt32(tls, z, bp /* &x */) + Xsqlite3GetInt32(tls, z, bp) return *(*int32)(unsafe.Pointer(bp /* x */)) } @@ -20131,7 +20131,7 @@ func Xsqlite3Atoi(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:32924:20: */ // success and false if there is an error. // // Only decimal notation is accepted. -func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:32936:20: */ +func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3.c:32938:20: */ var v U64 = uint64(0) var i int32 for i = 0; int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x04 != 0; i++ { @@ -20174,7 +20174,7 @@ func Xsqlite3GetUInt32(tls *libc.TLS, z uintptr, pI uintptr) int32 { /* sqlite3. // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32977:28: */ +func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32979:28: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -20194,7 +20194,7 @@ func putVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:32977:28: } n = 0 for ok := true; ok; ok = v != uint64(0) { - *(*U8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(libc.PostIncInt32(&n, 1)))) = U8(v&uint64(0x7f) | uint64(0x80)) + *(*U8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&n, 1)))) = U8(v&uint64(0x7f) | uint64(0x80)) v >>= 7 } *(*U8)(unsafe.Pointer(bp)) &= U8(0x7f) @@ -20206,7 +20206,7 @@ __1: goto __3 } { - *(*uint8)(unsafe.Pointer(p + uintptr(i))) = *(*U8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(j))) + *(*uint8)(unsafe.Pointer(p + uintptr(i))) = *(*U8)(unsafe.Pointer(bp + uintptr(j))) } goto __2 @@ -20220,7 +20220,7 @@ __3: return n } -func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33001:20: */ +func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:33003:20: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -20243,7 +20243,7 @@ func Xsqlite3PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:330 // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33031:19: */ +func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33033:19: */ var a U32 var b U32 var s U32 @@ -20396,7 +20396,7 @@ func Xsqlite3GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33 // A MACRO version, getVarint32, is provided which inlines the // single-byte case. All code should use the MACRO version as // this function assumes the single-byte case has already been handled. -func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33192:19: */ +func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:33194:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -20448,7 +20448,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: var n U8 - n = Xsqlite3GetVarint(tls, p-uintptr(2), bp /* &v64 */) + n = Xsqlite3GetVarint(tls, p-uintptr(2), bp) if *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<32-uint64(1)) != *(*U64)(unsafe.Pointer(bp)) { *(*U32)(unsafe.Pointer(v)) = 0xffffffff @@ -20464,7 +20464,7 @@ func Xsqlite3GetVarint32(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c: // Return the number of bytes that will be needed to store the given // 64-bit integer. -func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33314:20: */ +func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33316:20: */ var i int32 for i = 1; libc.AssignShrUint64(&v, int(uint64(7))) != uint64(0); i++ { } @@ -20472,28 +20472,28 @@ func Xsqlite3VarintLen(tls *libc.TLS, v U64) int32 { /* sqlite3.c:33314:20: */ } // Read or write a four-byte big-endian integer value. -func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33324:20: */ +func Xsqlite3Get4byte(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:33326:20: */ bp := tls.Alloc(4) defer tls.Free(4) // var x U32 at bp, 4 - libc.Xmemcpy(tls, bp /* &x */, p, uint32(4)) + libc.Xmemcpy(tls, bp, p, uint32(4)) return libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(bp /* x */))) } -func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33342:21: */ +func Xsqlite3Put4byte(tls *libc.TLS, p uintptr, v U32) { /* sqlite3.c:33344:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp /* x */)) = libc.X__builtin_bswap32(tls, v) - libc.Xmemcpy(tls, p, bp /* &x */, uint32(4)) + libc.Xmemcpy(tls, p, bp, uint32(4)) } // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33366:19: */ +func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33368:19: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) @@ -20503,7 +20503,7 @@ func Xsqlite3HexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:33366:19: */ // value. Return a pointer to its binary value. Space to hold the // binary value has been obtained from malloc and must be freed by // the calling routine. -func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33384:21: */ +func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { /* sqlite3.c:33386:21: */ var zBlob uintptr var i int32 @@ -20521,12 +20521,12 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // Log an error that is an API call on a connection pointer that should // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". -func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33405:13: */ +func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33407:13: */ bp := tls.Alloc(8) defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+1598, /* "API call with %s..." */ + ts+1620, libc.VaList(bp, zType)) } @@ -20542,17 +20542,17 @@ func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33405:13: */ // use. sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to // open properly and is not fit for general use but which can be // used as an argument to sqlite3_errmsg() or sqlite3_close(). -func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33426:20: */ +func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33428:20: */ var eOpenState U8 if db == uintptr(0) { - logBadConnection(tls, ts+1544 /* "NULL" */) + logBadConnection(tls, ts+1566) return 0 } eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_OPEN { if Xsqlite3SafetyCheckSickOrOk(tls, db) != 0 { - logBadConnection(tls, ts+1643 /* "unopened" */) + logBadConnection(tls, ts+1665) } return 0 } else { @@ -20561,12 +20561,12 @@ func Xsqlite3SafetyCheckOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33426 return int32(0) } -func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33443:20: */ +func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:33445:20: */ var eOpenState U8 eOpenState = (*Sqlite3)(unsafe.Pointer(db)).FeOpenState if int32(eOpenState) != SQLITE_STATE_SICK && int32(eOpenState) != SQLITE_STATE_OPEN && int32(eOpenState) != SQLITE_STATE_BUSY { - logBadConnection(tls, ts+1652 /* "invalid" */) + logBadConnection(tls, ts+1674) return 0 } else { return 1 @@ -20578,21 +20578,21 @@ func Xsqlite3SafetyCheckSickOrOk(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c // the other 64-bit signed integer at *pA and store the result in *pA. // Return 0 on success. Or if the operation would have resulted in an // overflow, leave *pA unchanged and return 1. -func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33463:20: */ +func Xsqlite3AddInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33465:20: */ return libc.X__builtin_add_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } -func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33483:20: */ +func Xsqlite3SubInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33485:20: */ return libc.X__builtin_sub_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } -func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33498:20: */ +func Xsqlite3MulInt64(tls *libc.TLS, pA uintptr, iB I64) int32 { /* sqlite3.c:33500:20: */ return libc.X__builtin_mul_overflowInt64(tls, *(*I64)(unsafe.Pointer(pA)), iB, pA) } // Compute the absolute value of a 32-bit signed integer, of possible. Or // if the integer has a value of -2147483648, return +2147483647 -func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:33524:20: */ +func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:33526:20: */ if x >= 0 { return x } @@ -20606,7 +20606,7 @@ func Xsqlite3AbsInt32(tls *libc.TLS, x int32) int32 { /* sqlite3.c:33524:20: */ // not a simple "+" operator because LogEst is stored as a logarithmic // value. // -func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:33567:23: */ +func Xsqlite3LogEstAdd(tls *libc.TLS, a LogEst, b LogEst) LogEst { /* sqlite3.c:33569:23: */ if int32(a) >= int32(b) { if int32(a) > int32(b)+49 { return a @@ -20637,11 +20637,11 @@ var x = [32]uint8{ uint8(4), uint8(4), uint8(4), uint8(4), // 15-18 uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), uint8(3), // 19-24 uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), uint8(2), // 25-31 -} /* sqlite3.c:33568:30 */ +} /* sqlite3.c:33570:30 */ // Convert an integer into a LogEst. In other words, compute an // approximation for 10*log2(x). -func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:33594:23: */ +func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:33596:23: */ var y LogEst = int16(40) if x < uint64(8) { if x < uint64(2) { @@ -20659,11 +20659,11 @@ func Xsqlite3LogEst(tls *libc.TLS, x U64) LogEst { /* sqlite3.c:33594:23: */ return LogEst(int32(a[x&uint64(7)]) + int32(y) - 10) } -var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:33595:17 */ +var a = [8]LogEst{int16(0), int16(2), int16(3), int16(5), int16(6), int16(7), int16(8), int16(9)} /* sqlite3.c:33597:17 */ // Convert a double into a LogEst // In other words, compute an approximation for 10*log2(x). -func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:33618:23: */ +func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:33620:23: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp + 8)) = x @@ -20678,7 +20678,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:33 if *(*float64)(unsafe.Pointer(bp + 8)) <= float64(2000000000) { return Xsqlite3LogEst(tls, U64(*(*float64)(unsafe.Pointer(bp + 8 /* x */)))) } - libc.Xmemcpy(tls, bp /* &a */, bp+8 /* &x */, uint32(8)) + libc.Xmemcpy(tls, bp, bp+8, uint32(8)) e = LogEst(*(*U64)(unsafe.Pointer(bp))>>52 - uint64(1022)) return LogEst(int32(e) * 10) } @@ -20687,7 +20687,7 @@ func Xsqlite3LogEstFromDouble(tls *libc.TLS, x float64) LogEst { /* sqlite3.c:33 // // Note that this routine is only used when one or more of various // non-standard compile-time options is enabled. -func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:33639:20: */ +func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:33641:20: */ var n U64 n = U64(int32(x) % 10) x = int16(int32(x) / 10) @@ -20739,7 +20739,7 @@ func Xsqlite3LogEstToInt(tls *libc.TLS, x LogEst) U64 { /* sqlite3.c:33639:20: * // VList are taken. When that happens, nAlloc is set to zero as an // indication that the VList may never again be enlarged, since the // accompanying realloc() would invalidate the pointers. -func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:33693:22: */ +func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nName int32, iVal int32) uintptr { /* sqlite3.c:33695:22: */ var nInt int32 // number of sizeof(int) objects needed for zName var z uintptr // Pointer to where zName will be stored var i int32 // Index in pIn[] where zName is stored @@ -20778,7 +20778,7 @@ func Xsqlite3VListAdd(tls *libc.TLS, db uintptr, pIn uintptr, zName uintptr, nNa // Return a pointer to the name of a variable in the given VList that // has the value iVal. Or return a NULL if there is no such variable in // the list -func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:33731:27: */ +func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* sqlite3.c:33733:27: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -20797,7 +20797,7 @@ func Xsqlite3VListNumToName(tls *libc.TLS, pIn uintptr, iVal int32) uintptr { /* // Return the number of the variable named zName, if it is in VList. // or return 0 if there is no such variable. -func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:33747:20: */ +func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:33749:20: */ var i int32 var mx int32 if pIn == uintptr(0) { @@ -20836,7 +20836,7 @@ func Xsqlite3VListNameToNum(tls *libc.TLS, pIn uintptr, zName uintptr, nName int // fields of the Hash structure. // // "pNew" is a pointer to the hash table that is to be initialized. -func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:33784:21: */ +func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:33786:21: */ (*Hash)(unsafe.Pointer(pNew)).Ffirst = uintptr(0) (*Hash)(unsafe.Pointer(pNew)).Fcount = uint32(0) @@ -20847,7 +20847,7 @@ func Xsqlite3HashInit(tls *libc.TLS, pNew uintptr) { /* sqlite3.c:33784:21: */ // Remove all entries from a hash table. Reclaim all memory. // Call this routine to delete a hash table or to reset a hash table // to the empty state. -func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:33796:21: */ +func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:33798:21: */ var elem uintptr // For looping over all elements of the table elem = (*Hash)(unsafe.Pointer(pH)).Ffirst @@ -20864,7 +20864,7 @@ func Xsqlite3HashClear(tls *libc.TLS, pH uintptr) { /* sqlite3.c:33796:21: */ } // The hashing function. -func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:33816:21: */ +func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:33818:21: */ var h uint32 = uint32(0) var c uint8 for int32(libc.AssignUint8(&c, uint8(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&z, 1)))))) != 0 { //OPTIMIZATION-IF-TRUE @@ -20879,7 +20879,7 @@ func strHash(tls *libc.TLS, z uintptr) uint32 { /* sqlite3.c:33816:21: */ // Link pNew element into the hash table pH. If pEntry!=0 then also // insert pNew into the pEntry hash bucket. -func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:33833:13: */ +func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* sqlite3.c:33835:13: */ var pHead uintptr // First element already in pEntry if pEntry != 0 { if (*_ht)(unsafe.Pointer(pEntry)).Fcount != 0 { @@ -20916,7 +20916,7 @@ func insertElement(tls *libc.TLS, pH uintptr, pEntry uintptr, pNew uintptr) { /* // The hash table might fail to resize if sqlite3_malloc() fails or // if the new size is the same as the prior size. // Return TRUE if the resize occurs and false if not. -func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:33867:12: */ +func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:33869:12: */ var new_ht uintptr // The new hash table var elem uintptr var next_elem uintptr // For looping over existing elements @@ -20960,7 +20960,7 @@ func rehash(tls *libc.TLS, pH uintptr, new_size uint32) int32 { /* sqlite3.c:338 // hash table that matches the given key. If no element is found, // a pointer to a static null element with HashElem.data==0 is returned. // If pH is not NULL, then the hash for this key is written to *pH. -func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:33908:17: */ +func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) uintptr { /* sqlite3.c:33910:17: */ var elem uintptr // Used to loop thru the element list var count uint32 // Number of elements left to test var h uint32 @@ -20989,11 +20989,11 @@ func findElementWithHash(tls *libc.TLS, pH uintptr, pKey uintptr, pHash uintptr) return uintptr(unsafe.Pointer(&nullElement)) } -var nullElement = HashElem{} /* sqlite3.c:33916:19 */ +var nullElement = HashElem{} /* sqlite3.c:33918:19 */ // Remove a single entry from the hash table given a pointer to that // element and a hash on the element's key. -func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:33943:13: */ +func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { /* sqlite3.c:33945:13: */ var pEntry uintptr if (*HashElem)(unsafe.Pointer(elem)).Fprev != 0 { (*HashElem)(unsafe.Pointer((*HashElem)(unsafe.Pointer(elem)).Fprev)).Fnext = (*HashElem)(unsafe.Pointer(elem)).Fnext @@ -21022,7 +21022,7 @@ func removeElementGivenHash(tls *libc.TLS, pH uintptr, elem uintptr, h uint32) { // Attempt to locate an element of the hash table pH with a key // that matches pKey. Return the data for this element if it is // found, or NULL if there is no match. -func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:33978:21: */ +func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqlite3.c:33980:21: */ return (*HashElem)(unsafe.Pointer(findElementWithHash(tls, pH, pKey, uintptr(0)))).Fdata } @@ -21040,7 +21040,7 @@ func Xsqlite3HashFind(tls *libc.TLS, pH uintptr, pKey uintptr) uintptr { /* sqli // // If the "data" parameter to this function is NULL, then the // element corresponding to "key" is removed from the hash table. -func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:33998:21: */ +func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) uintptr { /* sqlite3.c:34000:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -21049,7 +21049,7 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u var elem uintptr // Used to loop thru the element list var new_elem uintptr // New element added to the pH - elem = findElementWithHash(tls, pH, pKey, bp /* &h */) + elem = findElementWithHash(tls, pH, pKey, bp) if (*HashElem)(unsafe.Pointer(elem)).Fdata != 0 { var old_data uintptr = (*HashElem)(unsafe.Pointer(elem)).Fdata if data == uintptr(0) { @@ -21089,194 +21089,194 @@ func Xsqlite3HashInsert(tls *libc.TLS, pH uintptr, pKey uintptr, data uintptr) u //************* Begin file opcodes.c **************************************** // Automatically generated. Do not edit // See the tool/mkopcodec.tcl script for details. -func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34044:27: */ +func Xsqlite3OpcodeName(tls *libc.TLS, i int32) uintptr { /* sqlite3.c:34046:27: */ return azName[i] } var azName = [182]uintptr{ - /* 0 */ ts + 1660, /* "Savepoint" */ - /* 1 */ ts + 1670, /* "AutoCommit" */ - /* 2 */ ts + 1681, /* "Transaction" */ - /* 3 */ ts + 1693, /* "SorterNext" */ - /* 4 */ ts + 1704, /* "Prev" */ - /* 5 */ ts + 1709, /* "Next" */ - /* 6 */ ts + 1714, /* "Checkpoint" */ - /* 7 */ ts + 1725, /* "JournalMode" */ - /* 8 */ ts + 1737, /* "Vacuum" */ - /* 9 */ ts + 1744, /* "VFilter" */ - /* 10 */ ts + 1752, /* "VUpdate" */ - /* 11 */ ts + 1760, /* "Goto" */ - /* 12 */ ts + 1765, /* "Gosub" */ - /* 13 */ ts + 1771, /* "InitCoroutine" */ - /* 14 */ ts + 1785, /* "Yield" */ - /* 15 */ ts + 1791, /* "MustBeInt" */ - /* 16 */ ts + 1801, /* "Jump" */ - /* 17 */ ts + 1806, /* "Once" */ - /* 18 */ ts + 1811, /* "If" */ - /* 19 */ ts + 1814, /* "Not" */ - /* 20 */ ts + 1818, /* "IfNot" */ - /* 21 */ ts + 1824, /* "IsNullOrType" */ - /* 22 */ ts + 1837, /* "IfNullRow" */ - /* 23 */ ts + 1847, /* "SeekLT" */ - /* 24 */ ts + 1854, /* "SeekLE" */ - /* 25 */ ts + 1861, /* "SeekGE" */ - /* 26 */ ts + 1868, /* "SeekGT" */ - /* 27 */ ts + 1875, /* "IfNotOpen" */ - /* 28 */ ts + 1885, /* "IfNoHope" */ - /* 29 */ ts + 1894, /* "NoConflict" */ - /* 30 */ ts + 1905, /* "NotFound" */ - /* 31 */ ts + 1914, /* "Found" */ - /* 32 */ ts + 1920, /* "SeekRowid" */ - /* 33 */ ts + 1930, /* "NotExists" */ - /* 34 */ ts + 1940, /* "Last" */ - /* 35 */ ts + 1945, /* "IfSmaller" */ - /* 36 */ ts + 1955, /* "SorterSort" */ - /* 37 */ ts + 1966, /* "Sort" */ - /* 38 */ ts + 1971, /* "Rewind" */ - /* 39 */ ts + 1978, /* "IdxLE" */ - /* 40 */ ts + 1984, /* "IdxGT" */ - /* 41 */ ts + 1990, /* "IdxLT" */ - /* 42 */ ts + 1996, /* "IdxGE" */ - /* 43 */ ts + 2002, /* "Or" */ - /* 44 */ ts + 2005, /* "And" */ - /* 45 */ ts + 2009, /* "RowSetRead" */ - /* 46 */ ts + 2020, /* "RowSetTest" */ - /* 47 */ ts + 2031, /* "Program" */ - /* 48 */ ts + 2039, /* "FkIfZero" */ - /* 49 */ ts + 2048, /* "IfPos" */ - /* 50 */ ts + 2054, /* "IsNull" */ - /* 51 */ ts + 2061, /* "NotNull" */ - /* 52 */ ts + 2069, /* "Ne" */ - /* 53 */ ts + 2072, /* "Eq" */ - /* 54 */ ts + 2075, /* "Gt" */ - /* 55 */ ts + 2078, /* "Le" */ - /* 56 */ ts + 2081, /* "Lt" */ - /* 57 */ ts + 2084, /* "Ge" */ - /* 58 */ ts + 2087, /* "ElseEq" */ - /* 59 */ ts + 2094, /* "IfNotZero" */ - /* 60 */ ts + 2104, /* "DecrJumpZero" */ - /* 61 */ ts + 2117, /* "IncrVacuum" */ - /* 62 */ ts + 2128, /* "VNext" */ - /* 63 */ ts + 2134, /* "Init" */ - /* 64 */ ts + 2139, /* "PureFunc" */ - /* 65 */ ts + 2148, /* "Function" */ - /* 66 */ ts + 2157, /* "Return" */ - /* 67 */ ts + 2164, /* "EndCoroutine" */ - /* 68 */ ts + 2177, /* "HaltIfNull" */ - /* 69 */ ts + 2188, /* "Halt" */ - /* 70 */ ts + 2193, /* "Integer" */ - /* 71 */ ts + 2201, /* "Int64" */ - /* 72 */ ts + 2207, /* "String" */ - /* 73 */ ts + 2214, /* "Null" */ - /* 74 */ ts + 2219, /* "SoftNull" */ - /* 75 */ ts + 2228, /* "Blob" */ - /* 76 */ ts + 2233, /* "Variable" */ - /* 77 */ ts + 2242, /* "Move" */ - /* 78 */ ts + 2247, /* "Copy" */ - /* 79 */ ts + 2252, /* "SCopy" */ - /* 80 */ ts + 2258, /* "IntCopy" */ - /* 81 */ ts + 2266, /* "ChngCntRow" */ - /* 82 */ ts + 2277, /* "ResultRow" */ - /* 83 */ ts + 2287, /* "CollSeq" */ - /* 84 */ ts + 2295, /* "AddImm" */ - /* 85 */ ts + 2302, /* "RealAffinity" */ - /* 86 */ ts + 2315, /* "Cast" */ - /* 87 */ ts + 2320, /* "Permutation" */ - /* 88 */ ts + 2332, /* "Compare" */ - /* 89 */ ts + 2340, /* "IsTrue" */ - /* 90 */ ts + 2347, /* "ZeroOrNull" */ - /* 91 */ ts + 2358, /* "Offset" */ - /* 92 */ ts + 2365, /* "Column" */ - /* 93 */ ts + 2372, /* "TypeCheck" */ - /* 94 */ ts + 2382, /* "Affinity" */ - /* 95 */ ts + 2391, /* "MakeRecord" */ - /* 96 */ ts + 2402, /* "Count" */ - /* 97 */ ts + 2408, /* "ReadCookie" */ - /* 98 */ ts + 2419, /* "SetCookie" */ - /* 99 */ ts + 2429, /* "ReopenIdx" */ - /* 100 */ ts + 2439, /* "OpenRead" */ - /* 101 */ ts + 2448, /* "OpenWrite" */ - /* 102 */ ts + 2458, /* "BitAnd" */ - /* 103 */ ts + 2465, /* "BitOr" */ - /* 104 */ ts + 2471, /* "ShiftLeft" */ - /* 105 */ ts + 2481, /* "ShiftRight" */ - /* 106 */ ts + 2492, /* "Add" */ - /* 107 */ ts + 2496, /* "Subtract" */ - /* 108 */ ts + 2505, /* "Multiply" */ - /* 109 */ ts + 2514, /* "Divide" */ - /* 110 */ ts + 2521, /* "Remainder" */ - /* 111 */ ts + 2531, /* "Concat" */ - /* 112 */ ts + 2538, /* "OpenDup" */ - /* 113 */ ts + 2546, /* "BitNot" */ - /* 114 */ ts + 2553, /* "OpenAutoindex" */ - /* 115 */ ts + 2567, /* "OpenEphemeral" */ - /* 116 */ ts + 2581, /* "String8" */ - /* 117 */ ts + 2589, /* "SorterOpen" */ - /* 118 */ ts + 2600, /* "SequenceTest" */ - /* 119 */ ts + 2613, /* "OpenPseudo" */ - /* 120 */ ts + 2624, /* "Close" */ - /* 121 */ ts + 2630, /* "ColumnsUsed" */ - /* 122 */ ts + 2642, /* "SeekScan" */ - /* 123 */ ts + 2651, /* "SeekHit" */ - /* 124 */ ts + 2659, /* "Sequence" */ - /* 125 */ ts + 2668, /* "NewRowid" */ - /* 126 */ ts + 2677, /* "Insert" */ - /* 127 */ ts + 2684, /* "RowCell" */ - /* 128 */ ts + 2692, /* "Delete" */ - /* 129 */ ts + 2699, /* "ResetCount" */ - /* 130 */ ts + 2710, /* "SorterCompare" */ - /* 131 */ ts + 2724, /* "SorterData" */ - /* 132 */ ts + 2735, /* "RowData" */ - /* 133 */ ts + 2743, /* "Rowid" */ - /* 134 */ ts + 2749, /* "NullRow" */ - /* 135 */ ts + 2757, /* "SeekEnd" */ - /* 136 */ ts + 2765, /* "IdxInsert" */ - /* 137 */ ts + 2775, /* "SorterInsert" */ - /* 138 */ ts + 2788, /* "IdxDelete" */ - /* 139 */ ts + 2798, /* "DeferredSeek" */ - /* 140 */ ts + 2811, /* "IdxRowid" */ - /* 141 */ ts + 2820, /* "FinishSeek" */ - /* 142 */ ts + 2831, /* "Destroy" */ - /* 143 */ ts + 2839, /* "Clear" */ - /* 144 */ ts + 2845, /* "ResetSorter" */ - /* 145 */ ts + 2857, /* "CreateBtree" */ - /* 146 */ ts + 2869, /* "SqlExec" */ - /* 147 */ ts + 2877, /* "ParseSchema" */ - /* 148 */ ts + 2889, /* "LoadAnalysis" */ - /* 149 */ ts + 2902, /* "DropTable" */ - /* 150 */ ts + 2912, /* "DropIndex" */ - /* 151 */ ts + 2922, /* "DropTrigger" */ - /* 152 */ ts + 2934, /* "Real" */ - /* 153 */ ts + 2939, /* "IntegrityCk" */ - /* 154 */ ts + 2951, /* "RowSetAdd" */ - /* 155 */ ts + 2961, /* "Param" */ - /* 156 */ ts + 2967, /* "FkCounter" */ - /* 157 */ ts + 2977, /* "MemMax" */ - /* 158 */ ts + 2984, /* "OffsetLimit" */ - /* 159 */ ts + 2996, /* "AggInverse" */ - /* 160 */ ts + 3007, /* "AggStep" */ - /* 161 */ ts + 3015, /* "AggStep1" */ - /* 162 */ ts + 3024, /* "AggValue" */ - /* 163 */ ts + 3033, /* "AggFinal" */ - /* 164 */ ts + 3042, /* "Expire" */ - /* 165 */ ts + 3049, /* "CursorLock" */ - /* 166 */ ts + 3060, /* "CursorUnlock" */ - /* 167 */ ts + 3073, /* "TableLock" */ - /* 168 */ ts + 3083, /* "VBegin" */ - /* 169 */ ts + 3090, /* "VCreate" */ - /* 170 */ ts + 3098, /* "VDestroy" */ - /* 171 */ ts + 3107, /* "VOpen" */ - /* 172 */ ts + 3113, /* "VColumn" */ - /* 173 */ ts + 3121, /* "VRename" */ - /* 174 */ ts + 3129, /* "Pagecount" */ - /* 175 */ ts + 3139, /* "MaxPgcnt" */ - /* 176 */ ts + 3148, /* "Trace" */ - /* 177 */ ts + 3154, /* "CursorHint" */ - /* 178 */ ts + 3165, /* "ReleaseReg" */ - /* 179 */ ts + 3176, /* "Noop" */ - /* 180 */ ts + 3181, /* "Explain" */ - /* 181 */ ts + 3189, /* "Abortable" */ -} /* sqlite3.c:34045:20 */ + ts + 1682, + ts + 1692, + ts + 1703, + ts + 1715, + ts + 1726, + ts + 1731, + ts + 1736, + ts + 1747, + ts + 1759, + ts + 1766, + ts + 1774, + ts + 1782, + ts + 1787, + ts + 1793, + ts + 1807, + ts + 1813, + ts + 1823, + ts + 1828, + ts + 1833, + ts + 1836, + ts + 1840, + ts + 1846, + ts + 1859, + ts + 1869, + ts + 1876, + ts + 1883, + ts + 1890, + ts + 1897, + ts + 1907, + ts + 1916, + ts + 1927, + ts + 1936, + ts + 1942, + ts + 1952, + ts + 1962, + ts + 1967, + ts + 1977, + ts + 1988, + ts + 1993, + ts + 2000, + ts + 2006, + ts + 2012, + ts + 2018, + ts + 2024, + ts + 2027, + ts + 2031, + ts + 2042, + ts + 2053, + ts + 2061, + ts + 2070, + ts + 2076, + ts + 2083, + ts + 2091, + ts + 2094, + ts + 2097, + ts + 2100, + ts + 2103, + ts + 2106, + ts + 2109, + ts + 2116, + ts + 2126, + ts + 2139, + ts + 2150, + ts + 2156, + ts + 2161, + ts + 2170, + ts + 2179, + ts + 2186, + ts + 2199, + ts + 2210, + ts + 2215, + ts + 2223, + ts + 2229, + ts + 2236, + ts + 2241, + ts + 2250, + ts + 2255, + ts + 2264, + ts + 2269, + ts + 2274, + ts + 2280, + ts + 2288, + ts + 2299, + ts + 2309, + ts + 2317, + ts + 2324, + ts + 2337, + ts + 2342, + ts + 2354, + ts + 2362, + ts + 2369, + ts + 2380, + ts + 2387, + ts + 2394, + ts + 2404, + ts + 2413, + ts + 2424, + ts + 2430, + ts + 2441, + ts + 2451, + ts + 2461, + ts + 2470, + ts + 2480, + ts + 2487, + ts + 2493, + ts + 2503, + ts + 2514, + ts + 2518, + ts + 2527, + ts + 2536, + ts + 2543, + ts + 2553, + ts + 2560, + ts + 2568, + ts + 2575, + ts + 2589, + ts + 2603, + ts + 2611, + ts + 2622, + ts + 2635, + ts + 2646, + ts + 2652, + ts + 2664, + ts + 2673, + ts + 2681, + ts + 2690, + ts + 2699, + ts + 2706, + ts + 2714, + ts + 2721, + ts + 2732, + ts + 2746, + ts + 2757, + ts + 2765, + ts + 2771, + ts + 2779, + ts + 2787, + ts + 2797, + ts + 2810, + ts + 2820, + ts + 2833, + ts + 2842, + ts + 2853, + ts + 2861, + ts + 2867, + ts + 2879, + ts + 2891, + ts + 2899, + ts + 2911, + ts + 2924, + ts + 2934, + ts + 2944, + ts + 2956, + ts + 2961, + ts + 2973, + ts + 2983, + ts + 2989, + ts + 2999, + ts + 3006, + ts + 3018, + ts + 3029, + ts + 3037, + ts + 3046, + ts + 3055, + ts + 3064, + ts + 3071, + ts + 3082, + ts + 3095, + ts + 3105, + ts + 3112, + ts + 3120, + ts + 3129, + ts + 3135, + ts + 3143, + ts + 3151, + ts + 3161, + ts + 3170, + ts + 3176, + ts + 3187, + ts + 3198, + ts + 3203, + ts + 3211, +} /* sqlite3.c:34047:20 */ //************* End of opcodes.c ******************************************** //************* Begin file os_unix.c **************************************** @@ -22857,7 +22857,7 @@ type unixShm = struct { FsharedMask U16 FexclMask U16 F__ccgo_pad1 [2]byte -} /* sqlite3.c:34431:9 */ +} /* sqlite3.c:34433:9 */ // Try to determine if gethostuuid() is available based on standard // macros. This might sometimes compute the wrong value for some @@ -22890,7 +22890,7 @@ type unixShm = struct { // a normal expected return code of SQLITE_BUSY or SQLITE_OK // Forward references -type UnixShm = unixShm /* sqlite3.c:34431:24 */ // Connection shared memory +type UnixShm = unixShm /* sqlite3.c:34433:24 */ // Connection shared memory type unixShmNode = struct { FpInode uintptr FpShmMutex uintptr @@ -22904,10 +22904,10 @@ type unixShmNode = struct { FnRef int32 FpFirst uintptr FaLock [8]int32 -} /* sqlite3.c:34431:9 */ +} /* sqlite3.c:34433:9 */ // Connection shared memory -type UnixShmNode = unixShmNode /* sqlite3.c:34432:28 */ // Shared memory instance +type UnixShmNode = unixShmNode /* sqlite3.c:34434:28 */ // Shared memory instance type unixInodeInfo = struct { FfileId struct { Fdev Dev_t @@ -22924,18 +22924,18 @@ type unixInodeInfo = struct { FpShmNode uintptr FpNext uintptr FpPrev uintptr -} /* sqlite3.c:34431:9 */ +} /* sqlite3.c:34433:9 */ // Shared memory instance -type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34433:30 */ // An i-node +type UnixInodeInfo = unixInodeInfo /* sqlite3.c:34435:30 */ // An i-node type UnixUnusedFd1 = struct { Ffd int32 Fflags int32 FpNext uintptr -} /* sqlite3.c:34431:9 */ +} /* sqlite3.c:34433:9 */ // An i-node -type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34434:29 */ +type UnixUnusedFd = UnixUnusedFd1 /* sqlite3.c:34436:29 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. @@ -22960,16 +22960,16 @@ type unixFile = struct { FpMapRegion uintptr FsectorSize int32 FdeviceCharacteristics int32 -} /* sqlite3.c:34452:9 */ +} /* sqlite3.c:34454:9 */ // The unixFile structure is subclass of sqlite3_file specific to the unix // VFS implementations. -type UnixFile = unixFile /* sqlite3.c:34452:25 */ +type UnixFile = unixFile /* sqlite3.c:34454:25 */ // This variable holds the process id (pid) from when the xRandomness() // method was called. If xOpen() is called from a different process id, // indicating that a fork() has occurred, the PRNG will be reset. -var randomnessPid Pid_t = 0 /* sqlite3.c:34513:14 */ +var randomnessPid Pid_t = 0 /* sqlite3.c:34515:14 */ // Allowed values for the unixFile.ctrlFlags bitmask: @@ -22994,7 +22994,7 @@ var randomnessPid Pid_t = 0 /* sqlite3.c:34513:14 */ // // The safest way to deal with the problem is to always use this wrapper // which always has the same well-defined interface. -func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:34604:12: */ +func posixOpen(tls *libc.TLS, zFile uintptr, flags int32, mode int32) int32 { /* sqlite3.c:34606:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -23009,82 +23009,82 @@ type unix_syscall = struct { FzName uintptr FpCurrent Sqlite3_syscall_ptr FpDefault Sqlite3_syscall_ptr -} /* sqlite3.c:34618:8 */ +} /* sqlite3.c:34620:8 */ // Many system calls are accessed through pointer-to-functions so that // they may be overridden at runtime to facilitate fault injection during // testing and sandboxing. The following array holds the names and pointers // to all overrideable system calls. var aSyscall = [29]unix_syscall{ - {FzName: ts + 3199 /* "open" */, FpCurrent: 0}, + {FzName: ts + 3221, FpCurrent: 0}, - {FzName: ts + 3204 /* "close" */, FpCurrent: 0}, + {FzName: ts + 3226, FpCurrent: 0}, - {FzName: ts + 3210 /* "access" */, FpCurrent: 0}, + {FzName: ts + 3232, FpCurrent: 0}, - {FzName: ts + 3217 /* "getcwd" */, FpCurrent: 0}, + {FzName: ts + 3239, FpCurrent: 0}, - {FzName: ts + 3224 /* "stat" */, FpCurrent: 0}, + {FzName: ts + 3246, FpCurrent: 0}, // The DJGPP compiler environment looks mostly like Unix, but it // lacks the fcntl() system call. So redefine fcntl() to be something // that always succeeds. This means that locking does not occur under // DJGPP. But it is DOS - what did you expect? - {FzName: ts + 3229 /* "fstat" */, FpCurrent: 0}, + {FzName: ts + 3251, FpCurrent: 0}, - {FzName: ts + 3235 /* "ftruncate" */, FpCurrent: 0}, + {FzName: ts + 3257, FpCurrent: 0}, - {FzName: ts + 3245 /* "fcntl" */, FpCurrent: 0}, + {FzName: ts + 3267, FpCurrent: 0}, - {FzName: ts + 3251 /* "read" */, FpCurrent: 0}, + {FzName: ts + 3273, FpCurrent: 0}, - {FzName: ts + 3256 /* "pread" */}, + {FzName: ts + 3278}, - {FzName: ts + 3262 /* "pread64" */}, + {FzName: ts + 3284}, - {FzName: ts + 3270 /* "write" */, FpCurrent: 0}, + {FzName: ts + 3292, FpCurrent: 0}, - {FzName: ts + 3276 /* "pwrite" */}, + {FzName: ts + 3298}, - {FzName: ts + 3283 /* "pwrite64" */}, + {FzName: ts + 3305}, - {FzName: ts + 3292 /* "fchmod" */, FpCurrent: 0}, + {FzName: ts + 3314, FpCurrent: 0}, - {FzName: ts + 3299 /* "fallocate" */}, + {FzName: ts + 3321}, - {FzName: ts + 3309 /* "unlink" */, FpCurrent: 0}, + {FzName: ts + 3331, FpCurrent: 0}, - {FzName: ts + 3316 /* "openDirectory" */, FpCurrent: 0}, + {FzName: ts + 3338, FpCurrent: 0}, - {FzName: ts + 3330 /* "mkdir" */, FpCurrent: 0}, + {FzName: ts + 3352, FpCurrent: 0}, - {FzName: ts + 3336 /* "rmdir" */, FpCurrent: 0}, + {FzName: ts + 3358, FpCurrent: 0}, - {FzName: ts + 3342 /* "fchown" */, FpCurrent: 0}, + {FzName: ts + 3364, FpCurrent: 0}, - {FzName: ts + 3349 /* "geteuid" */, FpCurrent: 0}, + {FzName: ts + 3371, FpCurrent: 0}, - {FzName: ts + 3357 /* "mmap" */, FpCurrent: 0}, + {FzName: ts + 3379, FpCurrent: 0}, - {FzName: ts + 3362 /* "munmap" */, FpCurrent: 0}, + {FzName: ts + 3384, FpCurrent: 0}, - {FzName: ts + 3369 /* "mremap" */, FpCurrent: 0}, + {FzName: ts + 3391, FpCurrent: 0}, - {FzName: ts + 3376 /* "getpagesize" */, FpCurrent: 0}, + {FzName: ts + 3398, FpCurrent: 0}, - {FzName: ts + 3388 /* "readlink" */, FpCurrent: 0}, + {FzName: ts + 3410, FpCurrent: 0}, - {FzName: ts + 3397 /* "lstat" */, FpCurrent: 0}, + {FzName: ts + 3419, FpCurrent: 0}, - {FzName: ts + 3403 /* "ioctl" */}, -} /* sqlite3.c:34622:3 */ + {FzName: ts + 3425}, +} /* sqlite3.c:34624:3 */ // End of the overrideable system calls // On some systems, calls to fchown() will trigger a message in a security // log if they come from non-root processes. So avoid calling fchown() if // we are not running as root. -func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:34792:12: */ +func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqlite3.c:34794:12: */ if (*(*func(*libc.TLS) Uid_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 21*12 + 4)))(tls) != 0 { return 0 } @@ -23095,7 +23095,7 @@ func robustFchown(tls *libc.TLS, fd int32, uid Uid_t, gid Gid_t) int32 { /* sqli // "unix" VFSes. Return SQLITE_OK opon successfully updating the // system call pointer, or SQLITE_NOTFOUND if there is no configurable // system call named zName. -func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:34806:12: */ +func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc Sqlite3_syscall_ptr) int32 { /* sqlite3.c:34808:12: */ var i uint32 var rc int32 = SQLITE_NOTFOUND @@ -23132,7 +23132,7 @@ func unixSetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr, pNewFunc // Return the value of a system call. Return NULL if zName is not a // recognized system call name. NULL is also returned if the system call // is currently undefined. -func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:34849:28: */ +func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_syscall_ptr { /* sqlite3.c:34851:28: */ var i uint32 _ = pNotUsed @@ -23148,7 +23148,7 @@ func unixGetSystemCall(tls *libc.TLS, pNotUsed uintptr, zName uintptr) Sqlite3_s // then return the name of the first system call. Return NULL if zName // is the last system call or if zName is not the name of a valid // system call. -func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:34868:19: */ +func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sqlite3.c:34870:19: */ var i int32 = -1 _ = p @@ -23186,7 +23186,7 @@ func unixNextSystemCall(tls *libc.TLS, p uintptr, zName uintptr) uintptr { /* sq // transaction crashes and leaves behind hot journals, then any // process that is able to write to the database will also be able to // recover the hot journals. -func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:34909:12: */ +func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3.c:34911:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -23210,9 +23210,9 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 } (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, fd) Xsqlite3_log(tls, SQLITE_WARNING, - ts+3409 /* "attempt to open ..." */, libc.VaList(bp, z, fd)) + ts+3431, libc.VaList(bp, z, fd)) fd = -1 - if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3452, O_RDONLY, int32(m)) < 0 { + if (*(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4)))(tls, ts+3474, O_RDONLY, int32(m)) < 0 { break } } @@ -23253,14 +23253,14 @@ func robust_open(tls *libc.TLS, z uintptr, f int32, m Mode_t) int32 { /* sqlite3 // OK: enter(unixBigLock) // OK: enter(pLockInfo) // ERROR: enter(pLockInfo), enter(unixBigLock) -var unixBigLock uintptr = uintptr(0) /* sqlite3.c:34971:22 */ +var unixBigLock uintptr = uintptr(0) /* sqlite3.c:34973:22 */ -func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:34972:13: */ +func unixEnterMutex(tls *libc.TLS) { /* sqlite3.c:34974:13: */ // Not a recursive mutex Xsqlite3_mutex_enter(tls, unixBigLock) } -func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34976:13: */ +func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34978:13: */ Xsqlite3_mutex_leave(tls, unixBigLock) } @@ -23270,7 +23270,7 @@ func unixLeaveMutex(tls *libc.TLS) { /* sqlite3.c:34976:13: */ // All calls to ftruncate() within this file should be made through // this wrapper. On the Android platform, bypassing the logic below // could lead to a corrupt database. -func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35072:12: */ +func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlite3.c:35074:12: */ var rc int32 for ok := true; ok; ok = rc < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { rc = (*(*func(*libc.TLS, int32, Off_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 6*12 + 4)))(tls, h, sz) @@ -23286,7 +23286,7 @@ func robust_ftruncate(tls *libc.TLS, h int32, sz Sqlite3_int64) int32 { /* sqlit // // Errors during initialization of locks, or file system support for locks, // should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately. -func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35097:12: */ +func sqliteErrorFromPosixError(tls *libc.TLS, posixError int32, sqliteIOErr int32) int32 { /* sqlite3.c:35099:12: */ switch posixError { case EACCES: @@ -23335,7 +23335,7 @@ type vxworksFileId = struct { FnRef int32 FnName int32 FzCanonicalName uintptr -} /* sqlite3.c:35139:1 */ +} /* sqlite3.c:35141:1 */ // ************** End of Unique File ID Utility Used By VxWorks **************** // @@ -23436,12 +23436,12 @@ type vxworksFileId = struct { type unixFileId = struct { Fdev Dev_t Fino U64 -} /* sqlite3.c:34431:9 */ +} /* sqlite3.c:34433:9 */ // A lists of all unixInodeInfo objects. // // Must hold unixBigLock in order to read or write this variable. -var inodeList uintptr = uintptr(0) /* sqlite3.c:35421:22 */ +var inodeList uintptr = uintptr(0) /* sqlite3.c:35423:22 */ // All unixInodeInfo objects @@ -23459,7 +23459,7 @@ var inodeList uintptr = uintptr(0) /* sqlite3.c:35421:22 */ // The two subsequent arguments should be the name of the OS function that // failed (e.g. "unlink", "open") and the associated file-system path, // if any. -func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35456:12: */ +func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:35458:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -23470,13 +23470,13 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // the strerror() function to obtain the human-readable error message // equivalent to errno. Otherwise, use strerror_r(). // This is a threadsafe build, but strerror_r() is not available. - zErr = ts + 1543 /* "" */ + zErr = ts + 1565 /* "" */ if zPath == uintptr(0) { - zPath = ts + 1543 /* "" */ + zPath = ts + 1565 /* "" */ } Xsqlite3_log(tls, errcode, - ts+3462, /* "os_unix.c:%d: (%..." */ + ts+3484, libc.VaList(bp, iLine, iErrno, zFunc, zPath, zErr)) return errcode @@ -23493,9 +23493,9 @@ func unixLogErrorAtLine(tls *libc.TLS, errcode int32, zFunc uintptr, zPath uintp // file descriptor might have already been reused by another thread. // So we don't even try to recover from an EINTR. Just log the error // and move on. -func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:35521:13: */ +func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqlite3.c:35523:13: */ if (*(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 1*12 + 4)))(tls, h) != 0 { - unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3204, /* "close" */ + unixLogErrorAtLine(tls, SQLITE_IOERR|int32(16)<<8, ts+3226, func() uintptr { if pFile != 0 { return (*UnixFile)(unsafe.Pointer(pFile)).FzPath @@ -23507,19 +23507,19 @@ func robust_close(tls *libc.TLS, pFile uintptr, h int32, lineno int32) { /* sqli // Set the pFile->lastErrno. Do this in a subroutine as that provides // a convenient place to set a breakpoint. -func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:35532:13: */ +func storeLastErrno(tls *libc.TLS, pFile uintptr, error int32) { /* sqlite3.c:35534:13: */ (*UnixFile)(unsafe.Pointer(pFile)).FlastErrno = error } // Close all file descriptors accumuated in the unixInodeInfo->pUnused list. -func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35539:13: */ +func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35541:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr var pNext uintptr for p = (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused; p != 0; p = pNext { pNext = (*UnixUnusedFd)(unsafe.Pointer(p)).FpNext - robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 35546) + robust_close(tls, pFile, (*UnixUnusedFd)(unsafe.Pointer(p)).Ffd, 35548) Xsqlite3_free(tls, p) } (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpUnused = uintptr(0) @@ -23529,7 +23529,7 @@ func closePendingFds(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35539:13: */ // // The global mutex must be held when this routine is called, but the mutex // on the inode being deleted must NOT be held. -func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35558:13: */ +func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35560:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode if pInode != 0 { @@ -23563,7 +23563,7 @@ func releaseInodeInfo(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35558:13: */ // The global mutex must held when calling this routine. // // Return an appropriate error code. -func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:35595:12: */ +func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sqlite3.c:35597:12: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -23584,7 +23584,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql return SQLITE_IOERR } - libc.Xmemset(tls, bp+96 /* &fileId */, 0, uint32(unsafe.Sizeof(unixFileId{}))) + libc.Xmemset(tls, bp+96, 0, uint32(unsafe.Sizeof(unixFileId{}))) (*unixFileId)(unsafe.Pointer(bp + 96 /* &fileId */)).Fdev = (*stat)(unsafe.Pointer(bp /* &statbuf */)).Fst_dev (*unixFileId)(unsafe.Pointer(bp + 96 /* &fileId */)).Fino = (*stat)(unsafe.Pointer(bp /* &statbuf */)).Fst_ino @@ -23598,7 +23598,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql return SQLITE_NOMEM } libc.Xmemset(tls, pInode, 0, uint32(unsafe.Sizeof(UnixInodeInfo{}))) - libc.Xmemcpy(tls, pInode, bp+96 /* &fileId */, uint32(unsafe.Sizeof(unixFileId{}))) + libc.Xmemcpy(tls, pInode, bp+96, uint32(unsafe.Sizeof(unixFileId{}))) if Xsqlite3Config.FbCoreMutex != 0 { (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex = Xsqlite3_mutex_alloc(tls, SQLITE_MUTEX_FAST) if (*UnixInodeInfo)(unsafe.Pointer(pInode)).FpLockMutex == uintptr(0) { @@ -23622,7 +23622,7 @@ func findInodeInfo(tls *libc.TLS, pFile uintptr, ppInode uintptr) int32 { /* sql } // Return TRUE if pFile has been renamed or unlinked since it was first opened. -func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:35687:12: */ +func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:35689:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -23639,7 +23639,7 @@ func fileHasMoved(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:35687:12: * // (3) The file has not been renamed or unlinked // // Issue sqlite3_log(SQLITE_WARNING,...) messages if anything is not right. -func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35708:13: */ +func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35710:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -23654,19 +23654,19 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35708:13: */ rc = (*(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 5*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, bp+32) if rc != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3493 /* "cannot fstat db ..." */, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3515, libc.VaList(bp, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink == X__nlink_t(0) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3517 /* "file unlinked wh..." */, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3539, libc.VaList(bp+8, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if (*stat)(unsafe.Pointer(bp+32)).Fst_nlink > X__nlink_t(1) { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3546 /* "multiple links t..." */, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3568, libc.VaList(bp+16, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } if fileHasMoved(tls, pFile) != 0 { - Xsqlite3_log(tls, SQLITE_WARNING, ts+3573 /* "file renamed whi..." */, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) + Xsqlite3_log(tls, SQLITE_WARNING, ts+3595, libc.VaList(bp+24, (*UnixFile)(unsafe.Pointer(pFile)).FzPath)) return } } @@ -23675,7 +23675,7 @@ func verifyDbFile(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:35708:13: */ // file by this or any other process. If such a lock is held, set *pResOut // to a non-zero value otherwise *pResOut is set to zero. The return value // is set to SQLITE_OK unless an I/O error occurs during lock checking. -func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:35741:12: */ +func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:35743:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -23741,7 +23741,7 @@ func unixCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { / // // Zero is returned if the call completes successfully, or -1 if a call // to fcntl() fails. In this case, errno is set appropriately (by fcntl()). -func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:35842:12: */ +func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite3.c:35844:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -23793,7 +23793,7 @@ func unixFileLock(tls *libc.TLS, pFile uintptr, pLock uintptr) int32 { /* sqlite // // This routine will only increase a lock. Use the sqlite3OsUnlock() // routine to lower a locking level. -func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:35892:12: */ +func unixLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:35894:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -24040,7 +24040,7 @@ end_lock: // Add the file descriptor used by file handle pFile to the corresponding // pUnused list. -func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36119:13: */ +func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36121:13: */ var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode var p uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpPreallocatedUnused @@ -24061,7 +24061,7 @@ func setPendingFd(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:36119:13: */ // set to a read lock, then the other part is simply unlocked. This works // around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to // remove the write lock on a region when a read lock is set. -func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36142:12: */ +func posixUnlock(tls *libc.TLS, id uintptr, eFileLock int32, handleNFSUnlock int32) int32 { /* sqlite3.c:36144:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -24195,7 +24195,7 @@ __12: // // If the locking level of the file descriptor is already at or below // the requested locking level, this routine is a no-op. -func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36302:12: */ +func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36304:12: */ return posixUnlock(tls, id, eFileLock, 0) } @@ -24208,11 +24208,11 @@ func unixUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c // It is *not* necessary to hold the mutex when this routine is called, // even on VxWorks. A mutex will be acquired on VxWorks by the // vxworksReleaseFileId() routine. -func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36324:12: */ +func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36326:12: */ var pFile uintptr = id unixUnmapfile(tls, pFile) if (*UnixFile)(unsafe.Pointer(pFile)).Fh >= 0 { - robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36330) + robust_close(tls, pFile, (*UnixFile)(unsafe.Pointer(pFile)).Fh, 36332) (*UnixFile)(unsafe.Pointer(pFile)).Fh = -1 } @@ -24222,7 +24222,7 @@ func closeUnixFile(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36324:12: */ } // Close a file. -func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36359:12: */ +func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36361:12: */ var rc int32 = SQLITE_OK var pFile uintptr = id var pInode uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FpInode @@ -24272,26 +24272,26 @@ func unixClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36359:12: */ // database connections are accessing the same database file at the same // time and one or more of those connections are writing. -func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36411:12: */ +func nolockCheckReservedLock(tls *libc.TLS, NotUsed uintptr, pResOut uintptr) int32 { /* sqlite3.c:36413:12: */ _ = NotUsed *(*int32)(unsafe.Pointer(pResOut)) = 0 return SQLITE_OK } -func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36416:12: */ +func nolockLock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36418:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } -func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36420:12: */ +func nolockUnlock(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32) int32 { /* sqlite3.c:36422:12: */ _ = NotUsed _ = NotUsed2 return SQLITE_OK } // Close the file. -func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36428:12: */ +func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36430:12: */ return closeUnixFile(tls, id) } @@ -24332,7 +24332,7 @@ func nolockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36428:12: */ // In dotfile locking, either a lock exists or it does not. So in this // variation of CheckReservedLock(), *pResOut is set to true if any lock // is held on the file and false if the file is unlocked. -func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36473:12: */ +func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 { /* sqlite3.c:36475:12: */ var rc int32 = SQLITE_OK var reserved int32 = 0 var pFile uintptr = id @@ -24368,7 +24368,7 @@ func dotlockCheckReservedLock(tls *libc.TLS, id uintptr, pResOut uintptr) int32 // // With dotfile locking, we really only support state (4): EXCLUSIVE. // But we track the other locking levels internally. -func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36514:12: */ +func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36516:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 = SQLITE_OK @@ -24410,7 +24410,7 @@ func dotlockLock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3. // the requested locking level, this routine is a no-op. // // When the locking level reaches NO_LOCK, delete the lock file. -func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36564:12: */ +func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite3.c:36566:12: */ var pFile uintptr = id var zLockFile uintptr = (*UnixFile)(unsafe.Pointer(pFile)).FlockingContext var rc int32 @@ -24445,7 +24445,7 @@ func dotlockUnlock(tls *libc.TLS, id uintptr, eFileLock int32) int32 { /* sqlite } // Close a file. Make sure the lock has been released before closing. -func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36607:12: */ +func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36609:12: */ var pFile uintptr = id dotlockUnlock(tls, id, NO_LOCK) @@ -24544,7 +24544,7 @@ func dotlockClose(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:36607:12: */ // // To avoid stomping the errno value on a failed read the lastErrno value // is set before returning. -func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:37521:12: */ +func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:37523:12: */ var got int32 var prior int32 = 0 var newOffset I64 @@ -24582,7 +24582,7 @@ func seekAndRead(tls *libc.TLS, id uintptr, offset Sqlite3_int64, pBuf uintptr, // Read data from a file into a buffer. Return SQLITE_OK if all // bytes were read successfully and SQLITE_IOERR if anything goes // wrong. -func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:37570:12: */ +func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:37572:12: */ var pFile uintptr = id var got int32 @@ -24637,7 +24637,7 @@ func unixRead(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3 // pBuf to it. If an error occurs, return -1 and set *piErrno. Otherwise, // return the actual number of bytes written (which may be less than // nBuf). -func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:37646:12: */ +func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, piErrno uintptr) int32 { /* sqlite3.c:37648:12: */ var rc int32 = 0 // Value returned by system call nBuf = nBuf & 0x1ffff @@ -24663,13 +24663,13 @@ func seekAndWriteFd(tls *libc.TLS, fd int32, iOff I64, pBuf uintptr, nBuf int32, // // To avoid stomping the errno value on a failed write the lastErrno value // is set before returning. -func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:37692:12: */ +func seekAndWrite(tls *libc.TLS, id uintptr, offset I64, pBuf uintptr, cnt int32) int32 { /* sqlite3.c:37694:12: */ return seekAndWriteFd(tls, (*UnixFile)(unsafe.Pointer(id)).Fh, offset, pBuf, cnt, id+20) } // Write data from a buffer into a file. Return SQLITE_OK on success // or some other error code on failure. -func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:37701:12: */ +func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite3_int64) int32 { /* sqlite3.c:37703:12: */ var pFile uintptr = id var wrote int32 = 0 @@ -24726,7 +24726,7 @@ func unixWrite(tls *libc.TLS, id uintptr, pBuf uintptr, amt int32, offset Sqlite // as far as SQLite is concerned, an fdatasync() is always adequate. // So, we always use fdatasync() if it is available, regardless of // the value of the dataOnly flag. -func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:37836:12: */ +func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { /* sqlite3.c:37838:12: */ var rc int32 // The following "ifdef/elif/else/" block has the same structure as @@ -24772,7 +24772,7 @@ func full_fsync(tls *libc.TLS, fd int32, fullSync int32, dataOnly int32) int32 { // // If SQLITE_OK is returned, the caller is responsible for closing // the file descriptor *pFd using close(). -func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:37932:12: */ +func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sqlite3.c:37934:12: */ bp := tls.Alloc(521) defer tls.Free(521) @@ -24780,18 +24780,18 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql var fd int32 = -1 // var zDirname [513]int8 at bp+8, 513 - Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8 /* &zDirname[0] */, ts+3601 /* "%s" */, libc.VaList(bp, zFilename)) - for ii = int32(libc.Xstrlen(tls, bp+8 /* &zDirname[0] */)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + uintptr(ii)))) != '/'; ii-- { + Xsqlite3_snprintf(tls, MAX_PATHNAME, bp+8, ts+3623, libc.VaList(bp, zFilename)) + for ii = int32(libc.Xstrlen(tls, bp+8)); ii > 0 && int32(*(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + uintptr(ii)))) != '/'; ii-- { } if ii > 0 { - *(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + uintptr(ii))) = int8(0) + *(*int8)(unsafe.Pointer(bp + 8 + uintptr(ii))) = int8(0) } else { if int32(*(*int8)(unsafe.Pointer(bp + 8))) != '/' { - *(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */)) = int8('.') + *(*int8)(unsafe.Pointer(bp + 8)) = int8('.') } - *(*int8)(unsafe.Pointer(bp + 8 /* &zDirname[0] */ + 1)) = int8(0) + *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(0) } - fd = robust_open(tls, bp+8 /* &zDirname[0] */, O_RDONLY|O_BINARY, uint32(0)) + fd = robust_open(tls, bp+8, O_RDONLY|O_BINARY, uint32(0)) if fd >= 0 { } @@ -24799,7 +24799,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql if fd >= 0 { return SQLITE_OK } - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 37951), ts+3316 /* "openDirectory" */, bp+8 /* &zDirname[0] */, 37951) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 37953), ts+3338, bp+8, 37953) } // Make sure all writes to a particular file are committed to disk. @@ -24815,7 +24815,7 @@ func openDirectory(tls *libc.TLS, zFilename uintptr, pFd uintptr) int32 { /* sql // SQLite to access the file will not know that the journal exists (because // the directory entry for the journal was never created) and the transaction // will not roll back - possibly leading to database corruption. -func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37969:12: */ +func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37971:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -24834,7 +24834,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37969 if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3604 /* "full_fsync" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 37992) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(4)<<8, ts+3626, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 37994) } // Also fsync the directory containing the file if the DIRSYNC flag @@ -24846,7 +24846,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37969 rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, bp) if rc == SQLITE_OK { full_fsync(tls, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 0, 0) - robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38006) + robust_close(tls, pFile, *(*int32)(unsafe.Pointer(bp /* dirfd */)), 38008) } else { rc = SQLITE_OK @@ -24857,7 +24857,7 @@ func unixSync(tls *libc.TLS, id uintptr, flags int32) int32 { /* sqlite3.c:37969 } // Truncate an open file to a specified size -func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38019:12: */ +func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:38021:12: */ var pFile uintptr = id var rc int32 @@ -24872,7 +24872,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:380 rc = robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) if rc != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3235 /* "ftruncate" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38037) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3257, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38039) } else { // If the file was just truncated to a size smaller than the currently @@ -24888,7 +24888,7 @@ func unixTruncate(tls *libc.TLS, id uintptr, nByte I64) int32 { /* sqlite3.c:380 } // Determine the current size of a file in bytes -func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38069:12: */ +func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c:38071:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -24919,7 +24919,7 @@ func unixFileSize(tls *libc.TLS, id uintptr, pSize uintptr) int32 { /* sqlite3.c // file-control operation. Enlarge the database to nBytes in size // (rounded up to the next chunk-size). If the database is already // nBytes or larger, this routine is a no-op. -func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38107:12: */ +func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c:38109:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -24951,7 +24951,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if iWrite >= nSize { iWrite = nSize - int64(1) } - nWrite = seekAndWrite(tls, pFile, iWrite, ts+1543 /* "" */, 1) + nWrite = seekAndWrite(tls, pFile, iWrite, ts+1565, 1) if nWrite != 1 { return SQLITE_IOERR | int32(3)<<8 } @@ -24964,7 +24964,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c if (*UnixFile)(unsafe.Pointer(pFile)).FszChunk <= 0 { if robust_ftruncate(tls, (*UnixFile)(unsafe.Pointer(pFile)).Fh, nByte) != 0 { storeLastErrno(tls, pFile, *(*int32)(unsafe.Pointer(libc.X__errno_location(tls)))) - return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3235 /* "ftruncate" */, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38158) + return unixLogErrorAtLine(tls, SQLITE_IOERR|int32(6)<<8, ts+3257, (*UnixFile)(unsafe.Pointer(pFile)).FzPath, 38160) } } @@ -24979,7 +24979,7 @@ func fcntlSizeHint(tls *libc.TLS, pFile uintptr, nByte I64) int32 { /* sqlite3.c // 1 or 0 depending on whether or not bit mask of pFile->ctrlFlags is set. // // If *pArg is 0 or 1, then clear or set the mask bit of pFile->ctrlFlags. -func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38176:13: */ +func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sqlite3.c:38178:13: */ if *(*int32)(unsafe.Pointer(pArg)) < 0 { *(*int32)(unsafe.Pointer(pArg)) = libc.Bool32(int32((*UnixFile)(unsafe.Pointer(pFile)).FctrlFlags)&int32(mask) != 0) } else if *(*int32)(unsafe.Pointer(pArg)) == 0 { @@ -24990,7 +24990,7 @@ func unixModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sq } // Information and control of an open file handle. -func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38195:12: */ +func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:38197:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -25038,7 +25038,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { } case SQLITE_FCNTL_VFSNAME: { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, (*Sqlite3_vfs)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpVfs)).FzName)) return SQLITE_OK } @@ -25101,7 +25101,7 @@ func unixFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { // // There are two versions of this function. One for QNX and one for all // other systems. -func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38330:13: */ +func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38332:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize == 0 { @@ -25122,7 +25122,7 @@ func setDeviceCharacteristics(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38330:1 // if two files are created in the same file-system directory (i.e. // a database and its journal file) that the sector size will be the // same for both. -func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38437:12: */ +func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38439:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FsectorSize @@ -25139,7 +25139,7 @@ func unixSectorSize(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38437:12: */ // of required I/O for journaling, since a lot of padding is eliminated. // Hence, while POWERSAFE_OVERWRITE is on by default, there is a file-control // available to turn it off and URI query parameter available to turn it off. -func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38456:12: */ +func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:38458:12: */ var pFd uintptr = id setDeviceCharacteristics(tls, pFd) return (*UnixFile)(unsafe.Pointer(pFd)).FdeviceCharacteristics @@ -25149,7 +25149,7 @@ func unixDeviceCharacteristics(tls *libc.TLS, id uintptr) int32 { /* sqlite3.c:3 // // This function should not be called directly by other code in this file. // Instead, it should be called via macro osGetpagesize(). -func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:38470:12: */ +func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:38472:12: */ return int32(libc.Xsysconf(tls, X_SC_PAGESIZE)) } @@ -25161,7 +25161,7 @@ func unixGetpagesize(tls *libc.TLS) int32 { /* sqlite3.c:38470:12: */ // such transactions, or 0 otherwise. If an error occurs, return an // SQLite error code. The final value of *piOut is undefined in this // case. -func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:38569:12: */ +func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 { /* sqlite3.c:38571:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -25171,7 +25171,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 var pShmNode uintptr = (*UnixShm)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFile)).FpShm)).FpShmNode // var f flock at bp+8, 24 - libc.Xmemset(tls, bp+8 /* &f */, 0, uint32(unsafe.Sizeof(flock{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(flock{}))) (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_type = int16(F_WRLCK) (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_whence = int16(SEEK_SET) (*flock)(unsafe.Pointer(bp + 8 /* &f */)).Fl_start = int64((22+SQLITE_SHM_NLOCK)*4 + 3) @@ -25193,7 +25193,7 @@ func unixFcntlExternalReader(tls *libc.TLS, pFile uintptr, piOut uintptr) int32 // // Locks block if the mask is exactly UNIX_SHM_C and are non-blocking // otherwise. -func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:38601:12: */ +func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, n int32) int32 { /* sqlite3.c:38603:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -25234,7 +25234,7 @@ func unixShmSystemLock(tls *libc.TLS, pFile uintptr, lockType int32, ofst int32, // Usually, this is 1. The exception seems to be systems that are configured // to use 64KB pages - in this case each mapping must cover at least two // shm regions. -func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:38686:12: */ +func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:38688:12: */ var shmsz int32 = 32 * 1024 // SHM region size var pgsz int32 = (*(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 25*12 + 4)))(tls) // System page size // Page size must be a power of 2 @@ -25248,7 +25248,7 @@ func unixShmRegionPerMap(tls *libc.TLS) int32 { /* sqlite3.c:38686:12: */ // // This is not a VFS shared-memory method; it is a utility function called // by VFS shared-memory methods. -func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38700:13: */ +func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38702:13: */ var p uintptr = (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pFd)).FpInode)).FpShmNode if p != 0 && (*UnixShmNode)(unsafe.Pointer(p)).FnRef == 0 { @@ -25265,7 +25265,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38700:13: */ } Xsqlite3_free(tls, (*UnixShmNode)(unsafe.Pointer(p)).FapRegion) if (*UnixShmNode)(unsafe.Pointer(p)).FhShm >= 0 { - robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 38717) + robust_close(tls, pFd, (*UnixShmNode)(unsafe.Pointer(p)).FhShm, 38719) (*UnixShmNode)(unsafe.Pointer(p)).FhShm = -1 } (*UnixInodeInfo)(unsafe.Pointer((*UnixShmNode)(unsafe.Pointer(p)).FpInode)).FpShmNode = uintptr(0) @@ -25280,7 +25280,7 @@ func unixShmPurge(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:38700:13: */ // If the DMS cannot be locked because this is a readonly_shm=1 // connection and no other process already holds a lock, return // SQLITE_READONLY_CANTINIT and set pShmNode->isUnlocked=1. -func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:38734:12: */ +func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 { /* sqlite3.c:38736:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -25324,7 +25324,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // help detect if a -shm file truncation is legitimate or is the work // or a rogue process. if rc == SQLITE_OK && robust_ftruncate(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(3)) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3235 /* "ftruncate" */, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 38774) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(18)<<8, ts+3257, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 38776) } } } else if int32((*flock)(unsafe.Pointer(bp+8)).Fl_type) == F_WRLCK { @@ -25371,7 +25371,7 @@ func unixLockSharedMemory(tls *libc.TLS, pDbFd uintptr, pShmNode uintptr) int32 // that no other processes are able to read or write the database. In // that case, we do not really need shared memory. No shared memory // file is created. The shared memory will be simulated with heap memory. -func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:38823:12: */ +func unixOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:38825:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -25430,7 +25430,7 @@ __4: ; libc.Xmemset(tls, pShmNode, 0, uint32(unsafe.Sizeof(unixShmNode{}))+uint32(nShmFilename)) zShm = libc.AssignPtrUintptr(pShmNode+8, pShmNode+1*68) - Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3615 /* "%s-shm" */, libc.VaList(bp, zBasePath)) + Xsqlite3_snprintf(tls, nShmFilename, zShm, ts+3637, libc.VaList(bp, zBasePath)) (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = -1 (*UnixInodeInfo)(unsafe.Pointer((*UnixFile)(unsafe.Pointer(pDbFd)).FpInode)).FpShmNode = pShmNode @@ -25452,7 +25452,7 @@ __5: if !(int32((*UnixInodeInfo)(unsafe.Pointer(pInode)).FbProcessLock) == 0) { goto __7 } - if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3622, 0)) { + if !(0 == Xsqlite3_uri_boolean(tls, (*UnixFile)(unsafe.Pointer(pDbFd)).FzPath, ts+3644, 0)) { goto __8 } (*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm = robust_open(tls, zShm, O_RDWR|O_CREAT|0400000, @@ -25467,7 +25467,7 @@ __8: if !((*unixShmNode)(unsafe.Pointer(pShmNode)).FhShm < 0) { goto __10 } - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38899), ts+3199 /* "open" */, zShm, 38899) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 38901), ts+3221, zShm, 38901) goto shm_open_err __10: ; @@ -25535,7 +25535,7 @@ shm_open_err: // this call as described above, then it is mapped into this processes // address space (if it is not already), *pp is set to point to the mapped // memory and SQLITE_OK returned. -func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:38965:12: */ +func unixShmMap(tls *libc.TLS, fd uintptr, iRegion int32, szRegion int32, bExtend int32, pp uintptr) int32 { /* sqlite3.c:38967:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -25634,11 +25634,11 @@ __11: goto __13 } *(*int32)(unsafe.Pointer(bp + 96 /* x */)) = 0 - if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1543, 1, bp+96) != 1) { + if !(seekAndWriteFd(tls, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FhShm, int64(iPg*pgsz+pgsz-1), ts+1565, 1, bp+96) != 1) { goto __14 } zFile = (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3270 /* "write" */, zFile, 39043) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(19)<<8, ts+3292, zFile, 39045) goto shmpage_out __14: ; @@ -25686,7 +25686,7 @@ __16: if !(pMem == libc.UintptrFromInt32(-1)) { goto __20 } - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3357 /* "mmap" */, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39070) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(21)<<8, ts+3379, (*UnixShmNode)(unsafe.Pointer(pShmNode)).FzFilename, 39072) goto shmpage_out __20: ; @@ -25744,7 +25744,7 @@ __27: return rc } -var pgsz int32 = 4096 /* sqlite3.c:39034:28 */ +var pgsz int32 = 4096 /* sqlite3.c:39036:28 */ // Check that the pShmNode->aLock[] array comports with the locking bitmasks // held by each client. Return true if it does, or false otherwise. This @@ -25758,7 +25758,7 @@ var pgsz int32 = 4096 /* sqlite3.c:39034:28 */ // different here than in posix. In xShmLock(), one can go from unlocked // to shared and back or from unlocked to exclusive and back. But one may // not go from shared to exclusive or from exclusive to shared. -func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39140:12: */ +func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:39142:12: */ var pDbFd uintptr = fd // Connection holding shared memory var p uintptr = (*UnixFile)(unsafe.Pointer(pDbFd)).FpShm // The shared memory being locked var pShmNode uintptr = (*UnixShm)(unsafe.Pointer(p)).FpShmNode // The underlying file iNode @@ -25865,7 +25865,7 @@ func unixShmLock(tls *libc.TLS, fd uintptr, ofst int32, n int32, flags int32) in // // All loads and stores begun before the barrier must complete before // any load or store begun after the barrier. -func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39272:13: */ +func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39274:13: */ _ = fd // compiler-defined memory barrier @@ -25878,7 +25878,7 @@ func unixShmBarrier(tls *libc.TLS, fd uintptr) { /* sqlite3.c:39272:13: */ // // If there is no shared memory associated with the connection then this // routine is a harmless no-op. -func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39291:12: */ +func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite3.c:39293:12: */ var p uintptr // The connection to be closed var pShmNode uintptr // The underlying shared-memory file var pp uintptr // For looping over sibling connections @@ -25921,7 +25921,7 @@ func unixShmUnmap(tls *libc.TLS, fd uintptr, deleteFlag int32) int32 { /* sqlite } // If it is currently memory mapped, unmap file pFd. -func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39348:13: */ +func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39350:13: */ if (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion != 0 { (*(*func(*libc.TLS, uintptr, Size_t) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 23*12 + 4)))(tls, (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion, uint32((*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual)) @@ -25944,8 +25944,8 @@ func unixUnmapfile(tls *libc.TLS, pFd uintptr) { /* sqlite3.c:39348:13: */ // the three variables above are zeroed. In this case SQLite should // continue accessing the database using the xRead() and xWrite() // methods. -func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39373:13: */ - var zErr uintptr = ts + 3357 /* "mmap" */ +func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39375:13: */ + var zErr uintptr = ts + 3379 /* "mmap" */ var h int32 = (*UnixFile)(unsafe.Pointer(pFd)).Fh // File descriptor open on db file var pOrig uintptr = (*UnixFile)(unsafe.Pointer(pFd)).FpMapRegion // Pointer to current file mapping var nOrig I64 = (*UnixFile)(unsafe.Pointer(pFd)).FmmapSizeActual // Size of pOrig region in bytes @@ -25962,7 +25962,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39373:13 } pNew = (*(*func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 24*12 + 4)))(tls, pOrig, uint32(nReuse), uint32(nNew), MREMAP_MAYMOVE, 0) - zErr = ts + 3369 /* "mremap" */ + zErr = ts + 3391 /* "mremap" */ // The attempt to extend the existing mapping failed. Free it. if pNew == libc.UintptrFromInt32(-1) || pNew == uintptr(0) { @@ -25978,7 +25978,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39373:13 if pNew == libc.UintptrFromInt32(-1) { pNew = uintptr(0) nNew = int64(0) - unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39438) + unixLogErrorAtLine(tls, SQLITE_OK, zErr, (*UnixFile)(unsafe.Pointer(pFd)).FzPath, 39440) // If the mmap() above failed, assume that all subsequent mmap() calls // will probably fail too. Fall back to using xRead/xWrite exclusively @@ -26003,7 +26003,7 @@ func unixRemapfile(tls *libc.TLS, pFd uintptr, nNew I64) { /* sqlite3.c:39373:13 // SQLITE_OK is returned if no error occurs (even if the mapping is not // recreated as a result of outstanding references) or an SQLite error // code otherwise. -func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:39465:12: */ +func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:39467:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26040,7 +26040,7 @@ func unixMapfile(tls *libc.TLS, pFd uintptr, nMap I64) int32 { /* sqlite3.c:3946 // // If this function does return a pointer, the caller must eventually // release the reference by calling unixUnfetch(). -func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:39502:12: */ +func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int32 { /* sqlite3.c:39504:12: */ var pFd uintptr = fd // The underlying database file *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -26067,7 +26067,7 @@ func unixFetch(tls *libc.TLS, fd uintptr, iOff I64, nAmt int32, pp uintptr) int3 // Or, if the third argument is NULL, then this function is being called // to inform the VFS layer that, according to POSIX, any existing mapping // may now be invalid and should be unmapped. -func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:39533:12: */ +func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqlite3.c:39535:12: */ var pFd uintptr = fd // The underlying database file _ = iOff @@ -26128,33 +26128,33 @@ func unixUnfetch(tls *libc.TLS, fd uintptr, iOff I64, p uintptr) int32 { /* sqli // Here are all of the sqlite3_io_methods objects for each of the // locking strategies. Functions that return pointers to these methods // are also created. -var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39635:1 */ +var posixIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xDeviceCapabilities */, FxShmMap: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39637:1 */ -func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39635:1: */ +func posixIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39637:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&posixIoMethods)) } -var posixIoFinder uintptr = 0 /* sqlite3.c:39635:1 */ -var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39645:1 */ +var posixIoFinder uintptr = 0 /* sqlite3.c:39637:1 */ +var nolockIoMethods = Sqlite3_io_methods{FiVersion: 3 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39647:1 */ -func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39645:1: */ +func nolockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39647:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&nolockIoMethods)) } -var nolockIoFinder uintptr = 0 /* sqlite3.c:39645:1 */ -var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39655:1 */ +var nolockIoFinder uintptr = 0 /* sqlite3.c:39647:1 */ +var dotlockIoMethods = Sqlite3_io_methods{FiVersion: 1 /* iVersion */, FxClose: 0 /* xClose */, FxRead: 0 /* xRead */, FxWrite: 0 /* xWrite */, FxTruncate: 0 /* xTruncate */, FxSync: 0 /* xSync */, FxFileSize: 0 /* xFileSize */, FxLock: 0 /* xLock */, FxUnlock: 0 /* xUnlock */, FxCheckReservedLock: 0 /* xCheckReservedLock */, FxFileControl: 0 /* xFileControl */, FxSectorSize: 0 /* xSectorSize */, FxDeviceCharacteristics: 0 /* xShmMap */, FxShmLock: 0 /* xShmLock */, FxShmBarrier: 0 /* xShmBarrier */, FxShmUnmap: 0 /* xShmUnmap */, FxFetch: 0 /* xFetch */, FxUnfetch: 0 /* xUnfetch */} /* sqlite3.c:39657:1 */ -func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39655:1: */ +func dotlockIoFinderImpl(tls *libc.TLS, z uintptr, p uintptr) uintptr { /* sqlite3.c:39657:1: */ _ = z _ = p return uintptr(unsafe.Pointer(&dotlockIoMethods)) } -var dotlockIoFinder uintptr = 0 /* sqlite3.c:39655:1 */ +var dotlockIoFinder uintptr = 0 /* sqlite3.c:39657:1 */ // The proxy locking method is a "super-method" in the sense that it // opens secondary file descriptors for the conch and lock files and @@ -26167,7 +26167,7 @@ var dotlockIoFinder uintptr = 0 /* sqlite3.c:39655:1 */ // nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set // An abstract type for a pointer to an IO method finder function: -type Finder_type = uintptr /* sqlite3.c:39850:34 */ +type Finder_type = uintptr /* sqlite3.c:39852:34 */ // *************************************************************************** // @@ -26177,7 +26177,7 @@ type Finder_type = uintptr /* sqlite3.c:39850:34 */ // sqlite3_vfs object. // Initialize the contents of the unixFile structure pointed to by pId. -func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:39863:12: */ +func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename uintptr, ctrlFlags int32) int32 { /* sqlite3.c:39865:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -26198,10 +26198,10 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename } return uintptr(0) }(), - ts+3635, SQLITE_POWERSAFE_OVERWRITE) != 0 { + ts+3657, SQLITE_POWERSAFE_OVERWRITE) != 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_PSOW) } - if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3640) == 0 { + if libc.Xstrcmp(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName, ts+3662) == 0 { *(*uint16)(unsafe.Pointer(pNew + 18)) |= uint16(UNIXFILE_EXCL) } @@ -26234,7 +26234,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename // If scenario (a) caused the error then things are not so safe. The // implicit assumption here is that if fstat() fails, things are in // such bad shape that dropping a lock or two doesn't matter much. - robust_close(tls, pNew, h, 39941) + robust_close(tls, pNew, h, 39943) h = -1 } unixLeaveMutex(tls) @@ -26249,7 +26249,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename if zLockFile == uintptr(0) { rc = SQLITE_NOMEM } else { - Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3650 /* "%s.lock" */, libc.VaList(bp, zFilename)) + Xsqlite3_snprintf(tls, nFilename, zLockFile, ts+3672, libc.VaList(bp, zFilename)) } (*UnixFile)(unsafe.Pointer(pNew)).FlockingContext = zLockFile } @@ -26257,7 +26257,7 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename storeLastErrno(tls, pNew, 0) if rc != SQLITE_OK { if h >= 0 { - robust_close(tls, pNew, h, 40026) + robust_close(tls, pNew, h, 40028) } } else { (*Sqlite3_file)(unsafe.Pointer(pId)).FpMethods = pLockingStyle @@ -26271,21 +26271,21 @@ func fillInUnixFile(tls *libc.TLS, pVfs uintptr, h int32, pId uintptr, zFilename var azTempDirs = [6]uintptr{ uintptr(0), uintptr(0), - ts + 3658, /* "/var/tmp" */ - ts + 3667, /* "/usr/tmp" */ - ts + 3676, /* "/tmp" */ - ts + 1556, /* "." */ -} /* sqlite3.c:40038:19 */ + ts + 3680, + ts + 3689, + ts + 3698, + ts + 1578, +} /* sqlite3.c:40040:19 */ // Initialize first two members of azTempDirs[] array. -func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40050:13: */ - azTempDirs[0] = libc.Xgetenv(tls, ts+3681 /* "SQLITE_TMPDIR" */) - azTempDirs[1] = libc.Xgetenv(tls, ts+3695 /* "TMPDIR" */) +func unixTempFileInit(tls *libc.TLS) { /* sqlite3.c:40052:13: */ + azTempDirs[0] = libc.Xgetenv(tls, ts+3703) + azTempDirs[1] = libc.Xgetenv(tls, ts+3717) } // Return the name of a directory in which to put temporary files. // If no suitable temporary file directory can be found, return NULL. -func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40059:19: */ +func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40061:19: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26312,7 +26312,7 @@ func unixTempFileDir(tls *libc.TLS) uintptr { /* sqlite3.c:40059:19: */ // Create a temporary file name in zBuf. zBuf must be allocated // by the calling process and must be big enough to hold at least // pVfs->mxPathname bytes. -func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40083:12: */ +func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40085:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -26330,10 +26330,10 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 } for ok := true; ok; ok = (*(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 2*12 + 4)))(tls, zBuf, 0) == 0 { - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24 /* &r */) + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U64(0))), bp+24) *(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2))) = int8(0) - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3702, /* "%s/etilqs_%llx%c" */ + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3724, libc.VaList(bp, zDir, *(*U64)(unsafe.Pointer(bp + 24 /* r */)), 0)) if int32(*(*int8)(unsafe.Pointer(zBuf + uintptr(nBuf-2)))) != 0 || libc.PostIncInt32(&iLimit, 1) > 10 { return SQLITE_ERROR @@ -26356,7 +26356,7 @@ func unixGetTempname(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqlite3 // // If a suitable file descriptor is found, then it is returned. If no // such file descriptor is located, -1 is returned. -func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40133:21: */ +func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqlite3.c:40135:21: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26407,7 +26407,7 @@ func findReusableFd(tls *libc.TLS, zPath uintptr, flags int32) uintptr { /* sqli } // Find the mode, uid and gid of file zFile. -func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40183:12: */ +func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40185:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26443,7 +26443,7 @@ func getFileMode(tls *libc.TLS, zFile uintptr, pMode uintptr, pUid uintptr, pGid // original filename is unavailable. But 8_3_NAMES is only used for // FAT filesystems and permissions do not matter there, so just use // the default permissions. In 8_3_NAMES mode, leave *pMode set to zero. -func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40222:12: */ +func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr, pUid uintptr, pGid uintptr) int32 { /* sqlite3.c:40224:12: */ bp := tls.Alloc(513) defer tls.Free(513) @@ -26478,10 +26478,10 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr } nDb-- } - libc.Xmemcpy(tls, bp /* &zDb[0] */, zPath, uint32(nDb)) - *(*int8)(unsafe.Pointer(bp /* &zDb[0] */ + uintptr(nDb))) = int8(0) + libc.Xmemcpy(tls, bp, zPath, uint32(nDb)) + *(*int8)(unsafe.Pointer(bp + uintptr(nDb))) = int8(0) - rc = getFileMode(tls, bp /* &zDb[0] */, pMode, pUid, pGid) + rc = getFileMode(tls, bp, pMode, pUid, pGid) } else if flags&SQLITE_OPEN_DELETEONCLOSE != 0 { *(*Mode_t)(unsafe.Pointer(pMode)) = Mode_t(0600) } else if flags&SQLITE_OPEN_URI != 0 { @@ -26489,7 +26489,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // filename, check for the "modeof" parameter. If present, interpret // its value as a filename and try to copy the mode, uid and gid from // that file. - var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3719 /* "modeof" */) + var z uintptr = Xsqlite3_uri_parameter(tls, zPath, ts+3741) if z != 0 { rc = getFileMode(tls, z, pMode, pUid, pGid) } @@ -26517,7 +26517,7 @@ func findCreateFileMode(tls *libc.TLS, zPath uintptr, flags int32, pMode uintptr // file handle closed. To achieve the same effect using this new // interface, add the DELETEONCLOSE flag to those specified above for // OpenExclusive(). -func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40299:12: */ +func unixOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:40301:12: */ bp := tls.Alloc(528) defer tls.Free(528) @@ -26625,7 +26625,7 @@ __2: } // If zName is NULL, the upper layer is requesting a temp file. - rc = unixGetTempname(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname, bp /* &zTmpname[0] */) + rc = unixGetTempname(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname, bp) if !(rc != SQLITE_OK) { goto __8 } @@ -26675,7 +26675,7 @@ __12: if !(fd < 0) { goto __13 } // Groupid for the file - rc = findCreateFileMode(tls, zName, flags, bp+516 /* &openMode */, bp+520 /* &uid */, bp+524 /* &gid */) + rc = findCreateFileMode(tls, zName, flags, bp+516, bp+520, bp+524) if !(rc != SQLITE_OK) { goto __14 } @@ -26715,7 +26715,7 @@ __15: if !(fd < 0) { goto __19 } - rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40455), ts+3199 /* "open" */, zName, 40455) + rc2 = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40457), ts+3221, zName, 40457) if !(rc == SQLITE_OK) { goto __20 } @@ -26815,7 +26815,7 @@ __30: // Delete the file at zPath. If the dirSync argument is true, fsync() // the directory after deleting the file. -func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:40578:12: */ +func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:40580:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -26826,7 +26826,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == ENOENT { rc = SQLITE_IOERR | int32(23)<<8 } else { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3309 /* "unlink" */, zPath, 40594) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(10)<<8, ts+3331, zPath, 40596) } return rc } @@ -26836,9 +26836,9 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 17*12 + 4)))(tls, zPath, bp) if rc == SQLITE_OK { if full_fsync(tls, *(*int32)(unsafe.Pointer(bp)), 0, 0) != 0 { - rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3726 /* "fsync" */, zPath, 40604) + rc = unixLogErrorAtLine(tls, SQLITE_IOERR|int32(5)<<8, ts+3748, zPath, 40606) } - robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 40606) + robust_close(tls, uintptr(0), *(*int32)(unsafe.Pointer(bp /* fd */)), 40608) } else { rc = SQLITE_OK @@ -26855,7 +26855,7 @@ func unixDelete(tls *libc.TLS, NotUsed uintptr, zPath uintptr, dirSync int32) in // SQLITE_ACCESS_READONLY: Return 1 if the file is readable. // // Otherwise return 0. -func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:40626:12: */ +func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:40628:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26877,7 +26877,7 @@ func unixAccess(tls *libc.TLS, NotUsed uintptr, zPath uintptr, flags int32, pRes // If the last component of the pathname in z[0]..z[j-1] is something // other than ".." then back it out and return true. If the last // component is empty or if it is ".." then return false. -func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:40655:12: */ +func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:40657:12: */ var j int32 = *(*int32)(unsafe.Pointer(pJ)) var i int32 if j <= 0 { @@ -26900,7 +26900,7 @@ func unixBackupDir(tls *libc.TLS, z uintptr, pJ uintptr) int32 { /* sqlite3.c:40 // // Remove all instances of /./ // Remove all isntances of /X/../ for any X -func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:40673:12: */ +func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int32 { /* sqlite3.c:40675:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -26911,7 +26911,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 if int32(*(*int8)(unsafe.Pointer(zPath))) != '/' { if (*(*func(*libc.TLS, uintptr, Size_t) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 3*12 + 4)))(tls, zOut, uint32(nOut-2)) == uintptr(0) { - return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40683), ts+3217 /* "getcwd" */, zPath, 40683) + return unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40685), ts+3239, zPath, 40685) } iOff = Xsqlite3Strlen30(tls, zOut) *(*int8)(unsafe.Pointer(zOut + uintptr(libc.PostIncInt32(&iOff, 1)))) = int8('/') @@ -26920,9 +26920,9 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // SQLite assumes that xFullPathname() nul-terminates the output buffer // even if it returns an error. *(*int8)(unsafe.Pointer(zOut + uintptr(iOff))) = int8(0) - return Xsqlite3CantopenError(tls, 40692) + return Xsqlite3CantopenError(tls, 40694) } - Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3601 /* "%s" */, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut-iOff, zOut+uintptr(iOff), ts+3623, libc.VaList(bp, zPath)) // Remove duplicate '/' characters. Except, two // at the beginning // of a pathname is allowed since this is important on windows. @@ -26971,7 +26971,7 @@ func mkFullPathname(tls *libc.TLS, zPath uintptr, zOut uintptr, nOut int32) int3 // zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes // (in this case, MAX_PATHNAME bytes). The full-path is written to // this buffer before returning. -func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:40742:12: */ +func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:40744:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -26997,7 +26997,7 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO if (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 27*12 + 4)))(tls, zIn, bp) != 0 { if *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) != ENOENT { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40775), ts+3397 /* "lstat" */, zIn, 40775) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40777), ts+3419, zIn, 40777) } } else { bLink = libc.Bool32((*stat)(unsafe.Pointer(bp)).Fst_mode&X__mode_t(0170000) == X__mode_t(0120000)) @@ -27011,20 +27011,20 @@ func unixFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zO rc = SQLITE_NOMEM } } else if nLink >= SQLITE_MAX_SYMLINKS { - rc = Xsqlite3CantopenError(tls, 40787) + rc = Xsqlite3CantopenError(tls, 40789) } if rc == SQLITE_OK { nByte = (*(*func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 26*12 + 4)))(tls, zIn, zDel, uint32(nOut-1)) if nByte < 0 { - rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40793), ts+3388 /* "readlink" */, zIn, 40793) + rc = unixLogErrorAtLine(tls, Xsqlite3CantopenError(tls, 40795), ts+3410, zIn, 40795) } else { if int32(*(*int8)(unsafe.Pointer(zDel))) != '/' { var n int32 for n = Xsqlite3Strlen30(tls, zIn); n > 0 && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(n-1)))) != '/'; n-- { } if nByte+n+1 > nOut { - rc = Xsqlite3CantopenError(tls, 40799) + rc = Xsqlite3CantopenError(tls, 40801) } else { libc.Xmemmove(tls, zDel+uintptr(n), zDel, uint32(nByte+1)) libc.Xmemcpy(tls, zDel, zIn, uint32(n)) @@ -27094,7 +27094,7 @@ type Dl_serinfo = struct { } } /* dlfcn.h:196:3 */ -func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:40834:13: */ +func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* sqlite3.c:40836:13: */ _ = NotUsed return libc.Xdlopen(tls, zFilename, RTLD_NOW|RTLD_GLOBAL) } @@ -27104,7 +27104,7 @@ func unixDlOpen(tls *libc.TLS, NotUsed uintptr, zFilename uintptr) uintptr { /* // message is available, it is written to zBufOut. If no error message // is available, zBufOut is left unmodified and SQLite uses a default // error message. -func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:40846:13: */ +func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { /* sqlite3.c:40848:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -27113,12 +27113,12 @@ func unixDlError(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBufOut uintptr) { unixEnterMutex(tls) zErr = libc.Xdlerror(tls) if zErr != 0 { - Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3601 /* "%s" */, libc.VaList(bp, zErr)) + Xsqlite3_snprintf(tls, nBuf, zBufOut, ts+3623, libc.VaList(bp, zErr)) } unixLeaveMutex(tls) } -func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:40856:13: */ +func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:40858:13: */ // GCC with -pedantic-errors says that C90 does not allow a void* to be // cast into a pointer to a function. And yet the library dlsym() routine // returns a void* which is really a pointer to a function. So how do we @@ -27144,13 +27144,13 @@ func unixDlSym(tls *libc.TLS, NotUsed uintptr, p uintptr, zSym uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, p, zSym) } -func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:40879:13: */ +func unixDlClose(tls *libc.TLS, NotUsed uintptr, pHandle uintptr) { /* sqlite3.c:40881:13: */ _ = NotUsed libc.Xdlclose(tls, pHandle) } // Write nBuf bytes of random data to the supplied buffer zBuf. -func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40893:12: */ +func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:40895:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -27172,12 +27172,12 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in { var fd int32 var got int32 - fd = robust_open(tls, ts+3732 /* "/dev/urandom" */, O_RDONLY, uint32(0)) + fd = robust_open(tls, ts+3754, O_RDONLY, uint32(0)) if fd < 0 { // var t Time_t at bp, 4 - libc.Xtime(tls, bp /* &t */) - libc.Xmemcpy(tls, zBuf, bp /* &t */, uint32(unsafe.Sizeof(Time_t(0)))) + libc.Xtime(tls, bp) + libc.Xmemcpy(tls, zBuf, bp, uint32(unsafe.Sizeof(Time_t(0)))) libc.Xmemcpy(tls, zBuf+4, uintptr(unsafe.Pointer(&randomnessPid)), uint32(unsafe.Sizeof(randomnessPid))) nBuf = int32(uint32(unsafe.Sizeof(Time_t(0))) + uint32(unsafe.Sizeof(randomnessPid))) @@ -27185,7 +27185,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in for ok := true; ok; ok = got < 0 && *(*int32)(unsafe.Pointer(libc.X__errno_location(tls))) == EINTR { got = (*(*func(*libc.TLS, int32, uintptr, Size_t) Ssize_t)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8*12 + 4)))(tls, fd, zBuf, uint32(nBuf)) } - robust_close(tls, uintptr(0), fd, 40924) + robust_close(tls, uintptr(0), fd, 40926) } } @@ -27198,7 +27198,7 @@ func unixRandomness(tls *libc.TLS, NotUsed uintptr, nBuf int32, zBuf uintptr) in // requested from the underlying operating system, a number which // might be greater than or equal to the argument, but not less // than the argument. -func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:40940:12: */ +func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sqlite3.c:40942:12: */ if microseconds >= 1000000 { libc.Xsleep(tls, uint32(microseconds/1000000)) } @@ -27221,33 +27221,33 @@ func unixSleep(tls *libc.TLS, NotUsed uintptr, microseconds int32) int32 { /* sq // // On success, return SQLITE_OK. Return SQLITE_ERROR if the time and date // cannot be found. -func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:40981:12: */ +func unixCurrentTimeInt64(tls *libc.TLS, NotUsed uintptr, piNow uintptr) int32 { /* sqlite3.c:40983:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK // var sNow timeval at bp, 8 - libc.Xgettimeofday(tls, bp /* &sNow */, uintptr(0)) // Cannot fail given valid arguments + libc.Xgettimeofday(tls, bp, uintptr(0)) // Cannot fail given valid arguments *(*Sqlite3_int64)(unsafe.Pointer(piNow)) = unixEpoch + int64(1000)*Sqlite3_int64((*timeval)(unsafe.Pointer(bp)).Ftv_sec) + Sqlite3_int64((*timeval)(unsafe.Pointer(bp)).Ftv_usec/1000) _ = NotUsed return rc } -var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:40982:30 */ +var unixEpoch Sqlite3_int64 = int64(24405875) * int64(8640000) /* sqlite3.c:40984:30 */ // Find the current time (in Universal Coordinated Time). Write the // current time and date as a Julian Day number into *prNow and // return 0. Return 1 if the time and date cannot be found. -func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41013:12: */ +func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* sqlite3.c:41015:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */)) = int64(0) var rc int32 _ = NotUsed - rc = unixCurrentTimeInt64(tls, uintptr(0), bp /* &i */) + rc = unixCurrentTimeInt64(tls, uintptr(0), bp) *(*float64)(unsafe.Pointer(prNow)) = float64(*(*Sqlite3_int64)(unsafe.Pointer(bp))) / 86400000.0 return rc } @@ -27256,7 +27256,7 @@ func unixCurrentTime(tls *libc.TLS, NotUsed uintptr, prNow uintptr) int32 { /* s // low-level error message when operating-system problems come up // during SQLite operation. Only the integer return code is currently // used. -func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41031:12: */ +func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 uintptr) int32 { /* sqlite3.c:41033:12: */ _ = NotUsed _ = NotUsed2 _ = NotUsed3 @@ -27438,7 +27438,7 @@ func unixGetLastError(tls *libc.TLS, NotUsed uintptr, NotUsed2 int32, NotUsed3 u // single thread. The memory allocation and mutex subsystems have not // necessarily been initialized when this routine is called, and so they // should not be used. -func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42236:16: */ +func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42238:16: */ var i uint32 // Loop counter // Double-check that the aSyscall[] array has been constructed @@ -27472,18 +27472,18 @@ func Xsqlite3_os_init(tls *libc.TLS) int32 { /* sqlite3.c:42236:16: */ } var aVfs = [4]Sqlite3_vfs{ - {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3745 /* "unix" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, - {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3750 /* "unix-none" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, - {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3760 /* "unix-dotfile" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, - {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3640 /* "unix-excl" */ /* zName */, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, -} /* sqlite3.c:42289:22 */ + {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3767, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, + {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3772, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, + {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3782, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, + {FiVersion: 3 /* iVersion */, FszOsFile: int32(unsafe.Sizeof(UnixFile{})) /* szOsFile */, FmxPathname: MAX_PATHNAME /* pNext */, FzName: ts + 3662, FpAppData: 0 /* pAppData */, FxOpen: 0 /* xOpen */, FxDelete: 0 /* xDelete */, FxAccess: 0 /* xAccess */, FxFullPathname: 0 /* xFullPathname */, FxDlOpen: 0 /* xDlOpen */, FxDlError: 0 /* xDlError */, FxDlSym: 0 /* xDlSym */, FxDlClose: 0 /* xDlClose */, FxRandomness: 0 /* xRandomness */, FxSleep: 0 /* xSleep */, FxCurrentTime: 0 /* xCurrentTime */, FxGetLastError: 0 /* xGetLastError */, FxCurrentTimeInt64: 0 /* xCurrentTimeInt64 */, FxSetSystemCall: 0 /* xSetSystemCall */, FxGetSystemCall: 0 /* xGetSystemCall */, FxNextSystemCall: 0 /* xNextSystemCall */}, +} /* sqlite3.c:42291:22 */ // Shutdown the operating system interface. // // Some operating systems might need to do some cleanup in this routine, // to release dynamically allocated objects. But not on unix. // This routine is a no-op for unix. -func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42358:16: */ +func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42360:16: */ unixBigLock = uintptr(0) return SQLITE_OK } @@ -27525,14 +27525,14 @@ func Xsqlite3_os_end(tls *libc.TLS) int32 { /* sqlite3.c:42358:16: */ // #include "sqliteInt.h" // Forward declaration of objects used by this utility -type MemVfs = sqlite3_vfs /* sqlite3.c:48548:28 */ +type MemVfs = sqlite3_vfs /* sqlite3.c:48550:28 */ type MemFile1 = struct { Fbase Sqlite3_file FpStore uintptr FeLock int32 -} /* sqlite3.c:48549:9 */ +} /* sqlite3.c:48551:9 */ -type MemFile = MemFile1 /* sqlite3.c:48549:24 */ +type MemFile = MemFile1 /* sqlite3.c:48551:24 */ type MemStore1 = struct { Fsz Sqlite3_int64 FszAlloc Sqlite3_int64 @@ -27545,9 +27545,9 @@ type MemStore1 = struct { FnWrLock int32 FnRef int32 FzFName uintptr -} /* sqlite3.c:48549:9 */ +} /* sqlite3.c:48551:9 */ -type MemStore = MemStore1 /* sqlite3.c:48550:25 */ +type MemStore = MemStore1 /* sqlite3.c:48552:25 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. @@ -27556,30 +27556,30 @@ type MemStore = MemStore1 /* sqlite3.c:48550:25 */ type MemFS = struct { FnMemStore int32 FapMemStore uintptr -} /* sqlite3.c:48620:8 */ +} /* sqlite3.c:48622:8 */ // File-scope variables for holding the memdb files that are accessible // to multiple database connections in separate threads. // // Must hold SQLITE_MUTEX_STATIC_VFS1 to access any part of this object. -var memdb_g MemFS /* sqlite3.c:48623:3: */ +var memdb_g MemFS /* sqlite3.c:48625:3: */ var memdb_vfs = Sqlite3_vfs{ - FiVersion: 2, // szOsFile (set when registered) - FmxPathname: 1024, // pNext - FzName: ts + 3773, /* "memdb" */ // pAppData (set when registered) - FxOpen: 0, /* memdbDelete, */ // xDelete - FxAccess: 0, // xAccess - FxFullPathname: 0, // xFullPathname - FxDlOpen: 0, // xDlOpen - FxDlError: 0, // xDlError - FxDlSym: 0, // xDlSym - FxDlClose: 0, // xDlClose - FxRandomness: 0, // xRandomness - FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime - FxGetLastError: 0, // xGetLastError - FxCurrentTimeInt64: 0, // xNextSystemCall -} /* sqlite3.c:48659:20 */ + FiVersion: 2, // szOsFile (set when registered) + FmxPathname: 1024, // pNext + FzName: ts + 3795, + FxOpen: 0, /* memdbDelete, */ // xDelete + FxAccess: 0, // xAccess + FxFullPathname: 0, // xFullPathname + FxDlOpen: 0, // xDlOpen + FxDlError: 0, // xDlError + FxDlSym: 0, // xDlSym + FxDlClose: 0, // xDlClose + FxRandomness: 0, // xRandomness + FxSleep: 0, /* memdbCurrentTime, */ // xCurrentTime + FxGetLastError: 0, // xGetLastError + FxCurrentTimeInt64: 0, // xNextSystemCall +} /* sqlite3.c:48661:20 */ var memdb_io_methods = Sqlite3_io_methods{ FiVersion: 3, // iVersion @@ -27595,21 +27595,21 @@ var memdb_io_methods = Sqlite3_io_methods{ FxDeviceCharacteristics: 0, // xShmUnmap FxFetch: 0, // xFetch FxUnfetch: 0, // xUnfetch -} /* sqlite3.c:48684:33 */ +} /* sqlite3.c:48686:33 */ // Enter/leave the mutex on a MemStore -func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:48717:13: */ +func memdbEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:48719:13: */ Xsqlite3_mutex_enter(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } -func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:48720:13: */ +func memdbLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:48722:13: */ Xsqlite3_mutex_leave(tls, (*MemStore)(unsafe.Pointer(p)).FpMutex) } // Close an memdb-file. // Free the underlying MemStore object when its refcount drops to zero // or less. -func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:48732:12: */ +func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:48734:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore if (*MemStore)(unsafe.Pointer(p)).FzFName != 0 { var i int32 @@ -27647,7 +27647,7 @@ func memdbClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:48732:12: */ } // Read data from an memdb-file. -func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:48774:12: */ +func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:48776:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz { @@ -27664,7 +27664,7 @@ func memdbRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sql } // Try to enlarge the memory allocation to hold at least sz bytes -func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:48796:12: */ +func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqlite3.c:48798:12: */ var pNew uintptr if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) == uint32(0) || (*MemStore)(unsafe.Pointer(p)).FnMmap > 0 { return SQLITE_FULL @@ -27686,7 +27686,7 @@ func memdbEnlarge(tls *libc.TLS, p uintptr, newSz Sqlite3_int64) int32 { /* sqli } // Write data to an memdb-file. -func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:48816:12: */ +func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:48818:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_READONLY) != 0 { @@ -27717,7 +27717,7 @@ func memdbWrite(tls *libc.TLS, pFile uintptr, z uintptr, iAmt int32, iOfst Sqlit // In rollback mode (which is always the case for memdb, as it does not // support WAL mode) the truncate() method is only used to reduce // the size of a file, never to increase the size. -func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:48853:12: */ +func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:48855:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_OK memdbEnter(tls, p) @@ -27732,14 +27732,14 @@ func memdbTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* s } // Sync an memdb-file. -func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:48870:12: */ +func memdbSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:48872:12: */ _ = pFile _ = flags return SQLITE_OK } // Return the current file-size of an memdb-file. -func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:48879:12: */ +func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:48881:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemStore)(unsafe.Pointer(p)).Fsz @@ -27748,7 +27748,7 @@ func memdbFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlit } // Lock an memdb-file. -func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:48890:12: */ +func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:48892:12: */ var pThis uintptr = pFile var p uintptr = (*MemFile)(unsafe.Pointer(pThis)).FpStore var rc int32 = SQLITE_OK @@ -27792,7 +27792,7 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 } // File control method. For custom operations on an memdb-file. -func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:48944:12: */ +func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:48946:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -27800,7 +27800,7 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 var rc int32 = SQLITE_NOTFOUND memdbEnter(tls, p) if op == SQLITE_FCNTL_VFSNAME { - *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3779 /* "memdb(%p,%lld)" */, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) + *(*uintptr)(unsafe.Pointer(pArg)) = Xsqlite3_mprintf(tls, ts+3801, libc.VaList(bp, (*MemStore)(unsafe.Pointer(p)).FaData, (*MemStore)(unsafe.Pointer(p)).Fsz)) rc = SQLITE_OK } if op == SQLITE_FCNTL_SIZE_LIMIT { @@ -27821,13 +27821,13 @@ func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int3 } // Return the device characteristic flags supported by an memdb-file. -func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:48981:12: */ +func memdbDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:48983:12: */ _ = pFile return SQLITE_IOCAP_ATOMIC | SQLITE_IOCAP_POWERSAFE_OVERWRITE | SQLITE_IOCAP_SAFE_APPEND | SQLITE_IOCAP_SEQUENTIAL } // Fetch a page of a memory-mapped file -func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:48990:12: */ +func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, pp uintptr) int32 { /* sqlite3.c:48992:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore memdbEnter(tls, p) if iOfst+Sqlite3_int64(iAmt) > (*MemStore)(unsafe.Pointer(p)).Fsz || (*MemStore)(unsafe.Pointer(p)).FmFlags&uint32(SQLITE_DESERIALIZE_RESIZEABLE) != uint32(0) { @@ -27841,7 +27841,7 @@ func memdbFetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, iAmt int32, p } // Release a memory-mapped page -func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49009:12: */ +func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintptr) int32 { /* sqlite3.c:49011:12: */ var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore _ = iOfst _ = pPage @@ -27852,7 +27852,7 @@ func memdbUnfetch(tls *libc.TLS, pFile uintptr, iOfst Sqlite3_int64, pPage uintp } // Open an mem file handle. -func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49022:12: */ +func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:49024:12: */ var pFile uintptr = pFd var p uintptr = uintptr(0) var szName int32 @@ -27927,7 +27927,7 @@ func memdbOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFd uintptr, flags in // is available, or false otherwise. // // With memdb, no files ever exist on disk. So always return false. -func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49119:12: */ +func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:49121:12: */ _ = pVfs _ = zPath _ = flags @@ -27938,17 +27938,17 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. -func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49137:12: */ +func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49139:12: */ bp := tls.Alloc(8) defer tls.Free(8) _ = pVfs - Xsqlite3_snprintf(tls, nOut, zOut, ts+3601 /* "%s" */, libc.VaList(bp, zPath)) + Xsqlite3_snprintf(tls, nOut, zOut, ts+3623, libc.VaList(bp, zPath)) return SQLITE_OK } // Open the dynamic library located at zPath and return a handle. -func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49151:13: */ +func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:49153:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlOpen})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, zPath) @@ -27957,21 +27957,21 @@ func memdbDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49160:13: */ +func memdbDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:49162:13: */ (*struct { f func(*libc.TLS, uintptr, int32, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zErrMsg) } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49167:13: */ +func memdbDlSym(tls *libc.TLS, pVfs uintptr, p uintptr, zSym uintptr) uintptr { /* sqlite3.c:49169:13: */ return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlSym})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p, zSym) } // Close the dynamic library handle pHandle. -func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49174:13: */ +func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:49176:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxDlClose})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, pHandle) @@ -27979,7 +27979,7 @@ func memdbDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:4 // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49182:12: */ +func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:49184:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxRandomness})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nByte, zBufOut) @@ -27987,19 +27987,19 @@ func memdbRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49190:12: */ +func memdbSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:49192:12: */ return (*struct { f func(*libc.TLS, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxSleep})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, nMicro) } -func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49203:12: */ +func memdbGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:49205:12: */ return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxGetLastError})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, a, b) } -func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49206:12: */ +func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sqlite3.c:49208:12: */ return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData)).FxCurrentTimeInt64})).f(tls, (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData, p) @@ -28007,13 +28007,13 @@ func memdbCurrentTimeInt64(tls *libc.TLS, pVfs uintptr, p uintptr) int32 { /* sq // Translate a database connection pointer and schema name into a // MemFile pointer. -func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49214:16: */ +func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* sqlite3.c:49216:16: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) var pStore uintptr - var rc int32 = Xsqlite3_file_control(tls, db, zSchema, SQLITE_FCNTL_FILE_POINTER, bp /* &p */) + var rc int32 = Xsqlite3_file_control(tls, db, zSchema, SQLITE_FCNTL_FILE_POINTER, bp) if rc != 0 { return uintptr(0) } @@ -28030,7 +28030,7 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* } // Return the serialization of a database -func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49230:26: */ +func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49232:26: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -28076,9 +28076,9 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp return uintptr(0) } szPage = Xsqlite3BtreeGetPageSize(tls, pBt) - zSql = Xsqlite3_mprintf(tls, ts+3794 /* "PRAGMA \"%w\".page..." */, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3816, libc.VaList(bp, zSchema)) if zSql != 0 { - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) } else { rc = SQLITE_NOMEM } @@ -28105,7 +28105,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp for pgno = 1; pgno <= nPage; pgno++ { *(*uintptr)(unsafe.Pointer(bp + 12 /* pPage */)) = uintptr(0) var pTo uintptr = pOut + uintptr(Sqlite3_int64(szPage)*Sqlite3_int64(pgno-1)) - rc = Xsqlite3PagerGet(tls, pPager, uint32(pgno), bp+12 /* &pPage */, 0) + rc = Xsqlite3PagerGet(tls, pPager, uint32(pgno), bp+12, 0) if rc == SQLITE_OK { libc.Xmemcpy(tls, pTo, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pPage */))), uint32(szPage)) } else { @@ -28121,7 +28121,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } // Convert zSchema to a MemDB and initialize its content. -func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49311:16: */ +func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49313:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -28150,14 +28150,14 @@ __1: goto end_deserialize __2: ; - zSql = Xsqlite3_mprintf(tls, ts+3817 /* "ATTACH x AS %Q" */, libc.VaList(bp, zSchema)) + zSql = Xsqlite3_mprintf(tls, ts+3839, libc.VaList(bp, zSchema)) if !(zSql == uintptr(0)) { goto __3 } rc = SQLITE_NOMEM goto __4 __3: - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8, uintptr(0)) Xsqlite3_free(tls, zSql) __4: ; @@ -28216,7 +28216,7 @@ __10: // This routine is called when the extension is loaded. // Register the new VFS. -func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49387:20: */ +func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49389:20: */ var pLower uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) var sz uint32 if pLower == uintptr(0) { @@ -28238,7 +28238,7 @@ func Xsqlite3MemdbInit(tls *libc.TLS) int32 { /* sqlite3.c:49387:20: */ // Create a new bitmap object able to handle bits between 0 and iSize, // inclusive. Return a pointer to the new object. Return NULL if // malloc fails. -func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:49519:23: */ +func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:49521:23: */ var p uintptr p = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Bitvec{}))) @@ -28251,7 +28251,7 @@ func Xsqlite3BitvecCreate(tls *libc.TLS, iSize U32) uintptr { /* sqlite3.c:49519 // Check to see if the i-th bit is set. Return true or false. // If p is NULL (if the bitmap has not been created) or if // i is out of range, then return false. -func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49534:20: */ +func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49536:20: */ i-- if i >= (*Bitvec)(unsafe.Pointer(p)).FiSize { @@ -28280,7 +28280,7 @@ func Xsqlite3BitvecTestNotNull(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlit return int32(0) } -func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49557:20: */ +func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49559:20: */ return libc.Bool32(p != uintptr(0) && Xsqlite3BitvecTestNotNull(tls, p, i) != 0) } @@ -28294,7 +28294,7 @@ func Xsqlite3BitvecTest(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49 // The calling function must ensure that p is a valid Bitvec object // and that the value for "i" is within range of the Bitvec object. // Otherwise the behavior is undefined. -func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49573:20: */ +func Xsqlite3BitvecSet(tls *libc.TLS, p uintptr, i U32) int32 { /* sqlite3.c:49575:20: */ var h U32 var bin U32 var j uint32 @@ -28431,7 +28431,7 @@ bitvec_set_end: // // pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage // that BitvecClear can use to rebuilt its hash table. -func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:49644:21: */ +func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sqlite3.c:49646:21: */ if p == uintptr(0) { return } @@ -28470,7 +28470,7 @@ func Xsqlite3BitvecClear(tls *libc.TLS, p uintptr, i U32, pBuf uintptr) { /* sql } // Destroy a bitmap object. Reclaim all memory used. -func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:49681:21: */ +func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:49683:21: */ if p == uintptr(0) { return } @@ -28485,7 +28485,7 @@ func Xsqlite3BitvecDestroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:49681:21: */ // Return the value of the iSize parameter specified when Bitvec *p // was created. -func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:49696:20: */ +func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:49698:20: */ return (*Bitvec)(unsafe.Pointer(p)).FiSize } @@ -28522,7 +28522,7 @@ func Xsqlite3BitvecSize(tls *libc.TLS, p uintptr) U32 { /* sqlite3.c:49696:20: * // an error is returned. If they are the same, zero is returned. // // If a memory allocation error occurs, return -1. -func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:49741:20: */ +func Xsqlite3BitvecBuiltinTest(tls *libc.TLS, sz int32, aOp uintptr) int32 { /* sqlite3.c:49743:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -28588,7 +28588,7 @@ __8: __9: __10: nx = 2 - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp /* &i */) + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp) goto __4 __4: @@ -28685,7 +28685,7 @@ bitvec_end: // argument determines what operation to do. The 0x01 bit means first // remove pPage from the dirty list. The 0x02 means add pPage back to // the dirty list. Doing both moves pPage to the front of the dirty list. -func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:49976:13: */ +func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqlite3.c:49978:13: */ var p uintptr = (*PgHdr)(unsafe.Pointer(pPage)).FpCache if int32(addRemove)&PCACHE_DIRTYLIST_REMOVE != 0 { @@ -28747,7 +28747,7 @@ func pcacheManageDirtyList(tls *libc.TLS, pPage uintptr, addRemove U8) { /* sqli // Wrapper around the pluggable caches xUnpin method. If the cache is // being used for an in-memory database, this function is a no-op. -func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50046:13: */ +func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50048:13: */ if (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FbPurgeable != 0 { (*struct { @@ -28759,7 +28759,7 @@ func pcacheUnpin(tls *libc.TLS, p uintptr) { /* sqlite3.c:50046:13: */ // Compute the number of pages of cache requested. p->szCache is the // cache size requested by the "PRAGMA cache_size" statement. -func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50058:12: */ +func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50060:12: */ if (*PCache)(unsafe.Pointer(p)).FszCache >= 0 { // IMPLEMENTATION-OF: R-42059-47211 If the argument N is positive then the // suggested cache size is set to N. @@ -28784,7 +28784,7 @@ func numberOfCachePages(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50058:12: // // Initialize and shutdown the page cache subsystem. Neither of these // functions are threadsafe. -func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50080:20: */ +func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50082:20: */ if Xsqlite3Config.Fpcache2.FxInit == uintptr(0) { // IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the // built-in default page cache is used instead of the application defined @@ -28797,7 +28797,7 @@ func Xsqlite3PcacheInitialize(tls *libc.TLS) int32 { /* sqlite3.c:50080:20: */ })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxInit})).f(tls, Xsqlite3Config.Fpcache2.FpArg) } -func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50090:21: */ +func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50092:21: */ if Xsqlite3Config.Fpcache2.FxShutdown != 0 { // IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShutdown})).f(tls, Xsqlite3Config.Fpcache2.FpArg) @@ -28805,7 +28805,7 @@ func Xsqlite3PcacheShutdown(tls *libc.TLS) { /* sqlite3.c:50090:21: */ } // Return the size in bytes of a PCache object. -func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50100:20: */ +func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50102:20: */ return int32(unsafe.Sizeof(PCache{})) } @@ -28819,7 +28819,7 @@ func Xsqlite3PcacheSize(tls *libc.TLS) int32 { /* sqlite3.c:50100:20: */ // but remaining content will be uninitialized. Though it is opaque // to this module, the extra space really ends up being the MemPage // structure in the pager. -func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50114:20: */ +func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32, xStress uintptr, pStress uintptr, p uintptr) int32 { /* sqlite3.c:50116:20: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(PCache{}))) (*PCache)(unsafe.Pointer(p)).FszPage = 1 (*PCache)(unsafe.Pointer(p)).FszExtra = szExtra @@ -28836,7 +28836,7 @@ func Xsqlite3PcacheOpen(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable i // Change the page size for PCache object. The caller must ensure that there // are no outstanding page references when this function is called. -func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50140:20: */ +func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int32 { /* sqlite3.c:50142:20: */ if (*PCache)(unsafe.Pointer(pCache)).FszPage != 0 { var pNew uintptr @@ -28883,7 +28883,7 @@ func Xsqlite3PcacheSetPageSize(tls *libc.TLS, pCache uintptr, szPage int32) int3 // they can both (usually) operate without having to push values to // the stack on entry and pop them back off on exit, which saves a // lot of pushing and popping. -func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50184:36: */ +func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag int32) uintptr { /* sqlite3.c:50186:36: */ var eCreate int32 var pRes uintptr @@ -28911,7 +28911,7 @@ func Xsqlite3PcacheFetch(tls *libc.TLS, pCache uintptr, pgno Pgno, createFlag in // an OOM error. // // This routine should be invoked only after sqlite3PcacheFetch() fails. -func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50225:20: */ +func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage uintptr) int32 { /* sqlite3.c:50227:20: */ var pPg uintptr if int32((*PCache)(unsafe.Pointer(pCache)).FeCreate) == 2 { return 0 @@ -28962,7 +28962,7 @@ func Xsqlite3PcacheFetchStress(tls *libc.TLS, pCache uintptr, pgno Pgno, ppPage // This routine is broken out into a separate function since it // requires extra stack manipulation that can be avoided in the common // case. -func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50281:30: */ +func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50283:30: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -28982,7 +28982,7 @@ func pcacheFetchFinishWithInit(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // sqlite3PcacheFetch() into an initialized PgHdr object. This routine // must be called after sqlite3PcacheFetch() in order to get a usable // result. -func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50307:22: */ +func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage uintptr) uintptr { /* sqlite3.c:50309:22: */ var pPgHdr uintptr pPgHdr = (*Sqlite3_pcache_page)(unsafe.Pointer(pPage)).FpExtra @@ -28998,7 +28998,7 @@ func Xsqlite3PcacheFetchFinish(tls *libc.TLS, pCache uintptr, pgno Pgno, pPage u // Decrement the reference count on a page. If the page is clean and the // reference count drops to 0, then it is made eligible for recycling. -func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50330:37: */ +func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50332:37: */ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum-- if int32(libc.PreDecInt16(&(*PgHdr)(unsafe.Pointer(p)).FnRef, 1)) == 0 { @@ -29011,7 +29011,7 @@ func Xsqlite3PcacheRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:50330:37: */ } // Increase the reference count of a supplied page by 1. -func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50345:21: */ +func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50347:21: */ (*PgHdr)(unsafe.Pointer(p)).FnRef++ (*PCache)(unsafe.Pointer((*PgHdr)(unsafe.Pointer(p)).FpCache)).FnRefSum++ @@ -29020,7 +29020,7 @@ func Xsqlite3PcacheRef(tls *libc.TLS, p uintptr) { /* sqlite3.c:50345:21: */ // Drop a page from the cache. There must be exactly one reference to the // page. This function deletes that reference, so after it returns the // page pointed to by p is invalid. -func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50357:21: */ +func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50359:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&PGHDR_DIRTY != 0 { pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) @@ -29033,7 +29033,7 @@ func Xsqlite3PcacheDrop(tls *libc.TLS, p uintptr) { /* sqlite3.c:50357:21: */ // Make sure the page is marked as dirty. If it isn't dirty already, // make it so. -func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50371:21: */ +func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50373:21: */ if int32((*PgHdr)(unsafe.Pointer(p)).Fflags)&(PGHDR_CLEAN|PGHDR_DONT_WRITE) != 0 { //OPTIMIZATION-IF-FALSE *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DONT_WRITE)) @@ -29048,7 +29048,7 @@ func Xsqlite3PcacheMakeDirty(tls *libc.TLS, p uintptr) { /* sqlite3.c:50371:21: // Make sure the page is marked as clean. If it isn't clean already, // make it so. -func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50390:21: */ +func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50392:21: */ pcacheManageDirtyList(tls, p, uint8(PCACHE_DIRTYLIST_REMOVE)) *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_DIRTY | PGHDR_NEED_SYNC | PGHDR_WRITEABLE)) @@ -29060,7 +29060,7 @@ func Xsqlite3PcacheMakeClean(tls *libc.TLS, p uintptr) { /* sqlite3.c:50390:21: } // Make every page in the cache clean. -func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50407:21: */ +func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50409:21: */ var p uintptr for libc.AssignUintptr(&p, (*PCache)(unsafe.Pointer(pCache)).FpDirty) != uintptr(0) { @@ -29069,7 +29069,7 @@ func Xsqlite3PcacheCleanAll(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50407: } // Clear the PGHDR_NEED_SYNC and PGHDR_WRITEABLE flag from all dirty pages. -func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50418:21: */ +func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50420:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { @@ -29079,7 +29079,7 @@ func Xsqlite3PcacheClearWritable(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:5 } // Clear the PGHDR_NEED_SYNC flag from all dirty pages. -func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50430:21: */ +func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50432:21: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { *(*U16)(unsafe.Pointer(p + 28)) &= libc.Uint16FromInt32(libc.CplInt32(PGHDR_NEED_SYNC)) @@ -29088,7 +29088,7 @@ func Xsqlite3PcacheClearSyncFlags(tls *libc.TLS, pCache uintptr) { /* sqlite3.c: } // Change the page number of page p to newPgno. -func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50441:21: */ +func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:50443:21: */ var pCache uintptr = (*PgHdr)(unsafe.Pointer(p)).FpCache (*struct { @@ -29107,7 +29107,7 @@ func Xsqlite3PcacheMove(tls *libc.TLS, p uintptr, newPgno Pgno) { /* sqlite3.c:5 // If there is a reference to page 1 and the pgno parameter passed to this // function is 0, then the data area associated with page 1 is zeroed, but // the page object is not dropped. -func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:50463:21: */ +func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlite3.c:50465:21: */ if (*PCache)(unsafe.Pointer(pCache)).FpCache != 0 { var p uintptr var pNext uintptr @@ -29141,19 +29141,19 @@ func Xsqlite3PcacheTruncate(tls *libc.TLS, pCache uintptr, pgno Pgno) { /* sqlit } // Close a cache. -func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50496:21: */ +func Xsqlite3PcacheClose(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50498:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxDestroy})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Discard the contents of the cache. -func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50505:21: */ +func Xsqlite3PcacheClear(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50507:21: */ Xsqlite3PcacheTruncate(tls, pCache, uint32(0)) } // Merge two lists of pages connected by pDirty and in pgno order. // Do not bother fixing the pDirtyPrev pointers. -func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:50513:14: */ +func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:50515:14: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -29192,7 +29192,7 @@ func pcacheMergeDirtyList(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sq // there cannot be more than 31 buckets required by the merge sorter. // One extra bucket is added to catch overflow in case something // ever changes to make the previous sentence incorrect. -func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:50550:14: */ +func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:50552:14: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -29200,42 +29200,42 @@ func pcacheSortDirtyList(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:5055 var p uintptr var i int32 - libc.Xmemset(tls, bp /* &a[0] */, 0, uint32(unsafe.Sizeof([32]uintptr{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([32]uintptr{}))) for pIn != 0 { p = pIn pIn = (*PgHdr)(unsafe.Pointer(p)).FpDirty (*PgHdr)(unsafe.Pointer(p)).FpDirty = uintptr(0) for i = 0; i < N_SORT_BUCKET-1; i++ { if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)) = p + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = p break } else { - p = pcacheMergeDirtyList(tls, *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)), p) - *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)) = uintptr(0) + p = pcacheMergeDirtyList(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)), p) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = uintptr(0) } } if i == N_SORT_BUCKET-1 { // To get here, there need to be 2^(N_SORT_BUCKET) elements in // the input list. But that is impossible. - *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)) = pcacheMergeDirtyList(tls, *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)), p) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = pcacheMergeDirtyList(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)), p) } } - p = *(*uintptr)(unsafe.Pointer(bp /* &a[0] */)) + p = *(*uintptr)(unsafe.Pointer(bp)) for i = 1; i < N_SORT_BUCKET; i++ { if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) == uintptr(0) { continue } if p != 0 { - p = pcacheMergeDirtyList(tls, p, *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4))) + p = pcacheMergeDirtyList(tls, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4))) } else { - p = *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)) + p = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) } } return p } // Return a list of all dirty pages in the cache, sorted by page number. -func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:50585:22: */ +func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3.c:50587:22: */ var p uintptr for p = (*PCache)(unsafe.Pointer(pCache)).FpDirty; p != 0; p = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext { (*PgHdr)(unsafe.Pointer(p)).FpDirty = (*PgHdr)(unsafe.Pointer(p)).FpDirtyNext @@ -29247,17 +29247,17 @@ func Xsqlite3PcacheDirtyList(tls *libc.TLS, pCache uintptr) uintptr { /* sqlite3 // // This is not the total number of pages referenced, but the sum of the // reference count for all pages. -func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50599:20: */ +func Xsqlite3PcacheRefCount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50601:20: */ return (*PCache)(unsafe.Pointer(pCache)).FnRefSum } // Return the number of references to the page supplied as an argument. -func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50606:20: */ +func Xsqlite3PcachePageRefcount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:50608:20: */ return int32((*PgHdr)(unsafe.Pointer(p)).FnRef) } // Return the total number of pages in the cache. -func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50613:20: */ +func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50615:20: */ return (*struct { f func(*libc.TLS, uintptr) int32 @@ -29265,7 +29265,7 @@ func Xsqlite3PcachePagecount(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c } // Set the suggested cache-size value. -func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:50630:21: */ +func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { /* sqlite3.c:50632:21: */ (*PCache)(unsafe.Pointer(pCache)).FszCache = mxPage (*struct { @@ -29277,7 +29277,7 @@ func Xsqlite3PcacheSetCachesize(tls *libc.TLS, pCache uintptr, mxPage int32) { / // Set the suggested cache-spill value. Make no changes if if the // argument is zero. Return the effective cache-spill size, which will // be the larger of the szSpill and szCache. -func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:50642:20: */ +func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:50644:20: */ var res int32 if mxPage != 0 { @@ -29294,20 +29294,20 @@ func Xsqlite3PcacheSetSpillsize(tls *libc.TLS, p uintptr, mxPage int32) int32 { } // Free up as much memory as possible from the page cache. -func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50659:21: */ +func Xsqlite3PcacheShrink(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:50661:21: */ (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{Xsqlite3Config.Fpcache2.FxShrink})).f(tls, (*PCache)(unsafe.Pointer(pCache)).FpCache) } // Return the size of the header added by this middleware layer // in the page-cache hierarchy. -func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:50668:20: */ +func Xsqlite3HeaderSizePcache(tls *libc.TLS) int32 { /* sqlite3.c:50670:20: */ return int32((uint32(unsafe.Sizeof(PgHdr{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return the number of dirty pages currently in the cache, as a percentage // of the configured cache size. -func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50674:20: */ +func Xsqlite3PCachePercentDirty(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50676:20: */ var pDirty uintptr var nDirty int32 = 0 var nCache int32 = numberOfCachePages(tls, pCache) @@ -29422,7 +29422,7 @@ type PCache11 = struct { FapHash uintptr FpFree uintptr FpBulk uintptr -} /* sqlite3.c:50791:9 */ +} /* sqlite3.c:50793:9 */ //************* End of pcache.c ********************************************* //************* Begin file pcache1.c **************************************** @@ -29508,7 +29508,7 @@ type PCache11 = struct { // common workloads. // #include "sqliteInt.h" -type PCache1 = PCache11 /* sqlite3.c:50791:24 */ +type PCache1 = PCache11 /* sqlite3.c:50793:24 */ type PgHdr11 = struct { Fpage Sqlite3_pcache_page FiKey uint32 @@ -29518,12 +29518,12 @@ type PgHdr11 = struct { FpCache uintptr FpLruNext uintptr FpLruPrev uintptr -} /* sqlite3.c:50791:9 */ +} /* sqlite3.c:50793:9 */ -type PgHdr1 = PgHdr11 /* sqlite3.c:50792:23 */ -type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:50793:9 */ +type PgHdr1 = PgHdr11 /* sqlite3.c:50794:23 */ +type PgFreeslot1 = struct{ FpNext uintptr } /* sqlite3.c:50795:9 */ -type PgFreeslot = PgFreeslot1 /* sqlite3.c:50793:27 */ +type PgFreeslot = PgFreeslot1 /* sqlite3.c:50795:27 */ type PGroup1 = struct { Fmutex uintptr FnMaxPage uint32 @@ -29531,9 +29531,9 @@ type PGroup1 = struct { FmxPinned uint32 FnPurgeable uint32 Flru PgHdr1 -} /* sqlite3.c:50791:9 */ +} /* sqlite3.c:50793:9 */ -type PGroup = PGroup1 /* sqlite3.c:50794:23 */ +type PGroup = PGroup1 /* sqlite3.c:50796:23 */ // Global data used by this cache. type PCacheGlobal = struct { @@ -29550,10 +29550,10 @@ type PCacheGlobal = struct { FpFree uintptr FnFreeSlot int32 FbUnderPressure int32 -} /* sqlite3.c:50911:19 */ +} /* sqlite3.c:50913:19 */ // Global data used by this cache. -var pcache1_g PCacheGlobal /* sqlite3.c:50935:3: */ +var pcache1_g PCacheGlobal /* sqlite3.c:50937:3: */ // All code in this file should access the global structure above via the // alias "pcache1". This ensures that the WSD emulation is used when @@ -29571,7 +29571,7 @@ var pcache1_g PCacheGlobal /* sqlite3.c:50935:3: */ // // This routine is called from sqlite3_initialize() and so it is guaranteed // to be serialized already. There is no need for further mutexing. -func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:50970:21: */ +func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { /* sqlite3.c:50972:21: */ if pcache1_g.FisInit != 0 { var p uintptr if pBuf == uintptr(0) { @@ -29604,7 +29604,7 @@ func Xsqlite3PCacheBufferSetup(tls *libc.TLS, pBuf uintptr, sz int32, n int32) { // Try to initialize the pCache->pFree and pCache->pBulk fields. Return // true if pCache->pFree ends up containing one or more free pages. -func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50996:12: */ +func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50998:12: */ var szBulk I64 var zBulk uintptr if pcache1_g.FnInitPage == 0 { @@ -29649,7 +29649,7 @@ func pcache1InitBulk(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:50996:1 // // Multiple threads can run this routine at the same time. Global variables // in pcache1 need to be protected via mutex. -func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51039:13: */ +func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51041:13: */ var p uintptr = uintptr(0) if nByte <= pcache1_g.FszSlot { @@ -29682,7 +29682,7 @@ func pcache1Alloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:51039:13: * } // Free an allocated buffer obtained from pcache1Alloc(). -func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51077:13: */ +func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51079:13: */ if p == uintptr(0) { return } @@ -29712,7 +29712,7 @@ func pcache1Free(tls *libc.TLS, p uintptr) { /* sqlite3.c:51077:13: */ } // Return the size of a pcache allocation -func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51110:12: */ +func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51112:12: */ if p >= pcache1_g.FpStart && p < pcache1_g.FpEnd { return pcache1_g.FszSlot } else { @@ -29726,7 +29726,7 @@ func pcache1MemSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51110:12: */ } // Allocate a new page object initially associated with cache pCache. -func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51127:15: */ +func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr { /* sqlite3.c:51129:15: */ var p uintptr = uintptr(0) var pPg uintptr @@ -29764,7 +29764,7 @@ func pcache1AllocPage(tls *libc.TLS, pCache uintptr, benignMalloc int32) uintptr } // Free a page object allocated by pcache1AllocPage(). -func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51179:13: */ +func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51181:13: */ var pCache uintptr pCache = (*PgHdr1)(unsafe.Pointer(p)).FpCache @@ -29781,13 +29781,13 @@ func pcache1FreePage(tls *libc.TLS, p uintptr) { /* sqlite3.c:51179:13: */ // Malloc function used by SQLite to obtain space from the buffer configured // using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer // exists, this function falls back to sqlite3Malloc(). -func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51201:21: */ +func Xsqlite3PageMalloc(tls *libc.TLS, sz int32) uintptr { /* sqlite3.c:51203:21: */ // These allocations are never very large return pcache1Alloc(tls, sz) } // Free an allocated buffer obtained from sqlite3PageMalloc(). -func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51209:21: */ +func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51211:21: */ pcache1Free(tls, p) } @@ -29805,7 +29805,7 @@ func Xsqlite3PageFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:51209:21: */ // under memory pressure, then again it is desirable to avoid // allocating a new page cache entry in order to avoid stressing // the heap even further. -func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51230:12: */ +func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite3.c:51232:12: */ if pcache1_g.FnSlot != 0 && (*PCache1)(unsafe.Pointer(pCache)).FszPage+(*PCache1)(unsafe.Pointer(pCache)).FszExtra <= pcache1_g.FszSlot { return pcache1_g.FbUnderPressure } else { @@ -29821,7 +29821,7 @@ func pcache1UnderMemoryPressure(tls *libc.TLS, pCache uintptr) int32 { /* sqlite // as the first argument. // // The PCache mutex must be held when this function is called. -func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51247:13: */ +func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51249:13: */ var apNew uintptr var nNew uint32 var i uint32 @@ -29862,7 +29862,7 @@ func pcache1ResizeHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:51247:13: */ // LRU list, then this function is a no-op. // // The PGroup mutex must be held when this function is called. -func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51288:15: */ +func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51290:15: */ (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev)).FpLruNext = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext (*PgHdr1)(unsafe.Pointer((*PgHdr1)(unsafe.Pointer(pPage)).FpLruNext)).FpLruPrev = (*PgHdr1)(unsafe.Pointer(pPage)).FpLruPrev @@ -29879,7 +29879,7 @@ func pcache1PinPage(tls *libc.TLS, pPage uintptr) uintptr { /* sqlite3.c:51288:1 // Also free the page if freePage is true. // // The PGroup mutex must be held when this function is called. -func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51313:13: */ +func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sqlite3.c:51315:13: */ var h uint32 var pCache uintptr = (*PgHdr1)(unsafe.Pointer(pPage)).FpCache var pp uintptr @@ -29897,7 +29897,7 @@ func pcache1RemoveFromHash(tls *libc.TLS, pPage uintptr, freeFlag int32) { /* sq // If there are currently more than nMaxPage pages allocated, try // to recycle pages to reduce the number allocated to nMaxPage. -func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51331:13: */ +func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51333:13: */ var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var p uintptr @@ -29918,7 +29918,7 @@ func pcache1EnforceMaxPage(tls *libc.TLS, pCache uintptr) { /* sqlite3.c:51331:1 // criteria are unpinned before they are discarded. // // The PCache mutex must be held when this function is called. -func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51356:13: */ +func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sqlite3.c:51358:13: */ var h uint32 var iStop uint32 @@ -29966,7 +29966,7 @@ func pcache1TruncateUnsafe(tls *libc.TLS, pCache uintptr, iLimit uint32) { /* sq //******* sqlite3_pcache Methods ********************************************* // Implementation of the sqlite3_pcache.xInit method. -func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51407:12: */ +func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51409:12: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint32(unsafe.Sizeof(pcache1_g))) @@ -30004,7 +30004,7 @@ func pcache1Init(tls *libc.TLS, NotUsed uintptr) int32 { /* sqlite3.c:51407:12: // Implementation of the sqlite3_pcache.xShutdown method. // Note that the static mutex allocated in xInit does // not need to be freed. -func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51460:13: */ +func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51462:13: */ _ = NotUsed libc.Xmemset(tls, uintptr(unsafe.Pointer(&pcache1_g)), 0, uint32(unsafe.Sizeof(pcache1_g))) @@ -30013,7 +30013,7 @@ func pcache1Shutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:51460:13: */ // Implementation of the sqlite3_pcache.xCreate method. // // Allocate a new cache. -func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:51474:23: */ +func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) uintptr { /* sqlite3.c:51476:23: */ var pCache uintptr // The newly created page cache var pGroup uintptr // The group the new page cache will belong to var sz int32 // Bytes of memory required to allocate the new cache @@ -30063,7 +30063,7 @@ func pcache1Create(tls *libc.TLS, szPage int32, szExtra int32, bPurgeable int32) // Implementation of the sqlite3_pcache.xCachesize method. // // Configure the cache_size limit for a cache. -func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:51524:13: */ +func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:51526:13: */ var pCache uintptr = p var n U32 @@ -30086,7 +30086,7 @@ func pcache1Cachesize(tls *libc.TLS, p uintptr, nMax int32) { /* sqlite3.c:51524 // Implementation of the sqlite3_pcache.xShrink method. // // Free up as much memory as possible. -func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:51549:13: */ +func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:51551:13: */ var pCache uintptr = p if (*PCache1)(unsafe.Pointer(pCache)).FbPurgeable != 0 { var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30101,7 +30101,7 @@ func pcache1Shrink(tls *libc.TLS, p uintptr) { /* sqlite3.c:51549:13: */ } // Implementation of the sqlite3_pcache.xPagecount method. -func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51566:12: */ +func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51568:12: */ var n int32 var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) @@ -30116,7 +30116,7 @@ func pcache1Pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:51566:12: * // This steps are broken out into a separate procedure because they are // usually not needed, and by avoiding the stack initialization required // for these steps, the main pcache1Fetch() procedure can run faster. -func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51584:31: */ +func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51586:31: */ var nPinned uint32 var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup var pPage uintptr = uintptr(0) @@ -30234,7 +30234,7 @@ func pcache1FetchStage2(tls *libc.TLS, pCache uintptr, iKey uint32, createFlag i // the general case. pcache1FetchNoMutex() is a faster implementation for // the common case where pGroup->mutex is NULL. The pcache1Fetch() wrapper // invokes the appropriate routine. -func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51712:15: */ +func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51714:15: */ var pCache uintptr = p var pPage uintptr = uintptr(0) @@ -30263,7 +30263,7 @@ func pcache1FetchNoMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32 return uintptr(0) } -func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51742:15: */ +func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51744:15: */ var pCache uintptr = p var pPage uintptr @@ -30274,7 +30274,7 @@ func pcache1FetchWithMutex(tls *libc.TLS, p uintptr, iKey uint32, createFlag int return pPage } -func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51757:28: */ +func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintptr { /* sqlite3.c:51759:28: */ var pCache uintptr = p if (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex != 0 { @@ -30288,7 +30288,7 @@ func pcache1Fetch(tls *libc.TLS, p uintptr, iKey uint32, createFlag int32) uintp // Implementation of the sqlite3_pcache.xUnpin method. // // Mark a page as unpinned (eligible for asynchronous recycling). -func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:51788:13: */ +func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { /* sqlite3.c:51790:13: */ var pCache uintptr = p var pPage uintptr = pPg var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30313,7 +30313,7 @@ func pcache1Unpin(tls *libc.TLS, p uintptr, pPg uintptr, reuseUnlikely int32) { } // Implementation of the sqlite3_pcache.xRekey method. -func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:51823:13: */ +func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint32) { /* sqlite3.c:51825:13: */ var pCache uintptr = p var pPage uintptr = pPg var pp uintptr @@ -30344,7 +30344,7 @@ func pcache1Rekey(tls *libc.TLS, p uintptr, pPg uintptr, iOld uint32, iNew uint3 // Discard all unpinned pages in the cache with a page number equal to // or greater than parameter iLimit. Any pinned pages with a page number // equal to or greater than iLimit are implicitly unpinned. -func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:51863:13: */ +func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:51865:13: */ var pCache uintptr = p Xsqlite3_mutex_enter(tls, (*PGroup)(unsafe.Pointer((*PCache1)(unsafe.Pointer(pCache)).FpGroup)).Fmutex) if iLimit <= (*PCache1)(unsafe.Pointer(pCache)).FiMaxKey { @@ -30357,7 +30357,7 @@ func pcache1Truncate(tls *libc.TLS, p uintptr, iLimit uint32) { /* sqlite3.c:518 // Implementation of the sqlite3_pcache.xDestroy method. // // Destroy a cache allocated using pcache1Create(). -func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:51878:13: */ +func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:51880:13: */ var pCache uintptr = p var pGroup uintptr = (*PCache1)(unsafe.Pointer(pCache)).FpGroup @@ -30380,7 +30380,7 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:51878:13: */ // This function is called during initialization (sqlite3_initialize()) to // install the default pluggable cache module, assuming the user has not // already provided an alternative. -func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:51901:21: */ +func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:51903:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30400,16 +30400,16 @@ var defaultMethods1 = Sqlite3_pcache_methods2{ FxTruncate: 0, // xTruncate FxDestroy: 0, // xDestroy FxShrink: 0, // xShrink -} /* sqlite3.c:51902:40 */ +} /* sqlite3.c:51904:40 */ // Return the size of the header on each page of this PCACHE implementation. -func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:51923:20: */ +func Xsqlite3HeaderSizePcache1(tls *libc.TLS) int32 { /* sqlite3.c:51925:20: */ return int32((uint32(unsafe.Sizeof(PgHdr1{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return the global mutex used by this PCACHE implementation. The // sqlite3_status() routine needs access to this mutex. -func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:51929:30: */ +func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:51931:30: */ return pcache1_g.Fmutex } @@ -30420,7 +30420,7 @@ func Xsqlite3Pcache1Mutex(tls *libc.TLS) uintptr { /* sqlite3.c:51929:30: */ // nReq is the number of bytes of memory required. Once this much has // been released, the function returns. The return value is the total number // of bytes of memory released. -func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:51943:20: */ +func Xsqlite3PcacheReleaseMemory(tls *libc.TLS, nReq int32) int32 { /* sqlite3.c:51945:20: */ var nFree int32 = 0 if Xsqlite3Config.FpPage == uintptr(0) { @@ -30537,7 +30537,7 @@ type RowSetChunk = struct { // Allocate a RowSet object. Return NULL if a memory allocation // error occurs. -func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52123:23: */ +func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52125:23: */ var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(RowSet{}))) if p != 0 { var N int32 = Xsqlite3DbMallocSize(tls, db, p) @@ -30557,7 +30557,7 @@ func Xsqlite3RowSetInit(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:52123: // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52145:21: */ +func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52147:21: */ var p uintptr = pArg var pChunk uintptr var pNextChunk uintptr @@ -30576,7 +30576,7 @@ func Xsqlite3RowSetClear(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52145:21: * // Deallocate all chunks from a RowSet. This frees all memory that // the RowSet has allocated over its lifetime. This routine is // the destructor for the RowSet. -func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52165:21: */ +func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52167:21: */ Xsqlite3RowSetClear(tls, pArg) Xsqlite3DbFree(tls, (*RowSet)(unsafe.Pointer(pArg)).Fdb, pArg) } @@ -30587,7 +30587,7 @@ func Xsqlite3RowSetDelete(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:52165:21: // // In an OOM situation, the RowSet.db->mallocFailed flag is set and this // routine returns NULL. -func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52178:27: */ +func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52180:27: */ if int32((*RowSet)(unsafe.Pointer(p)).FnFresh) == 0 { //OPTIMIZATION-IF-FALSE // We could allocate a fresh RowSetEntry each time one is needed, but it @@ -30610,7 +30610,7 @@ func rowSetEntryAlloc(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:52178:27: // // The mallocFailed flag of the database connection is set if a // memory allocation fails. -func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52203:21: */ +func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52205:21: */ var pEntry uintptr // The new entry var pLast uintptr // The last prior entry @@ -30640,7 +30640,7 @@ func Xsqlite3RowSetInsert(tls *libc.TLS, p uintptr, rowid I64) { /* sqlite3.c:52 // // The input lists are connected via pRight pointers and are // assumed to each already be in sorted order. -func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52234:27: */ +func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite3.c:52236:27: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -30675,7 +30675,7 @@ func rowSetEntryMerge(tls *libc.TLS, pA uintptr, pB uintptr) uintptr { /* sqlite // Sort all elements on the list of RowSetEntry objects into order of // increasing v. -func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52269:27: */ +func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52271:27: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -30683,26 +30683,26 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52269:27 var pNext uintptr // var aBucket [40]uintptr at bp, 160 - libc.Xmemset(tls, bp /* &aBucket[0] */, 0, uint32(unsafe.Sizeof([40]uintptr{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([40]uintptr{}))) for pIn != 0 { pNext = (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight (*RowSetEntry)(unsafe.Pointer(pIn)).FpRight = uintptr(0) for i = uint32(0); *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */ + uintptr(i)*4)) != 0; i++ { - pIn = rowSetEntryMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */ + uintptr(i)*4)), pIn) - *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */ + uintptr(i)*4)) = uintptr(0) + pIn = rowSetEntryMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)), pIn) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */ + uintptr(i)*4)) = pIn + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = pIn pIn = pNext } - pIn = *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */)) + pIn = *(*uintptr)(unsafe.Pointer(bp)) for i = uint32(1); i < uint32(unsafe.Sizeof([40]uintptr{}))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) == uintptr(0) { continue } if pIn != 0 { - pIn = rowSetEntryMerge(tls, pIn, *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */ + uintptr(i)*4))) + pIn = rowSetEntryMerge(tls, pIn, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4))) } else { - pIn = *(*uintptr)(unsafe.Pointer(bp /* &aBucket[0] */ + uintptr(i)*4)) + pIn = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) } } return pIn @@ -30711,14 +30711,14 @@ func rowSetEntrySort(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:52269:27 // The input, pIn, is a binary tree (or subtree) of RowSetEntry objects. // Convert this tree into a linked list connected by the pRight pointers // and return pointers to the first and last elements of the new list. -func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52298:13: */ +func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintptr) { /* sqlite3.c:52300:13: */ bp := tls.Alloc(4) defer tls.Free(4) if (*RowSetEntry)(unsafe.Pointer(pIn)).FpLeft != 0 { // var p uintptr at bp, 4 - rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pIn)).FpLeft, ppFirst, bp /* &p */) + rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pIn)).FpLeft, ppFirst, bp) (*RowSetEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).FpRight = pIn } else { *(*uintptr)(unsafe.Pointer(ppFirst)) = pIn @@ -30742,7 +30742,7 @@ func rowSetTreeToList(tls *libc.TLS, pIn uintptr, ppFirst uintptr, ppLast uintpt // and leave *ppList set to NULL. // // Return a pointer to the root of the constructed binary tree. -func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52333:27: */ +func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* sqlite3.c:52335:27: */ var p uintptr // Root of the new tree var pLeft uintptr // Left subtree if *(*uintptr)(unsafe.Pointer(ppList)) == uintptr(0) { //OPTIMIZATION-IF-TRUE @@ -30773,7 +30773,7 @@ func rowSetNDeepTree(tls *libc.TLS, ppList uintptr, iDepth int32) uintptr { /* s // Convert a sorted list of elements into a binary tree. Make the tree // as deep as it needs to be in order to contain the entire list. -func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52369:27: */ +func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52371:27: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -30790,7 +30790,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52369 p = *(*uintptr)(unsafe.Pointer(bp /* pList */)) *(*uintptr)(unsafe.Pointer(bp /* pList */)) = (*RowSetEntry)(unsafe.Pointer(p)).FpRight (*RowSetEntry)(unsafe.Pointer(p)).FpLeft = pLeft - (*RowSetEntry)(unsafe.Pointer(p)).FpRight = rowSetNDeepTree(tls, bp /* &pList */, iDepth) + (*RowSetEntry)(unsafe.Pointer(p)).FpRight = rowSetNDeepTree(tls, bp, iDepth) } return p } @@ -30806,7 +30806,7 @@ func rowSetListToTree(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:52369 // been used. Older versions of RowSet allowed that, but as the // capability was not used by the code generator, it was removed // for code economy. -func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52401:20: */ +func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sqlite3.c:52403:20: */ // Cannot be used with sqlite3RowSetText() @@ -30839,7 +30839,7 @@ func Xsqlite3RowSetNext(tls *libc.TLS, p uintptr, pRowid uintptr) int32 { /* sql // If this is the first test of a new batch and if there exist entries // on pRowSet->pEntry, then sort those entries into the forest at // pRowSet->pForest so that they can be tested. -func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52435:20: */ +func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sqlite3_int64) int32 { /* sqlite3.c:52437:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -30868,7 +30868,7 @@ func Xsqlite3RowSetTest(tls *libc.TLS, pRowSet uintptr, iBatch int32, iRowid Sql // var pTail uintptr at bp+4, 4 - rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft, bp /* &pAux */, bp+4 /* &pTail */) + rowSetTreeToList(tls, (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft, bp, bp+4) (*RowSetEntry)(unsafe.Pointer(pTree)).FpLeft = uintptr(0) p = rowSetEntryMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* pAux */)), p) } @@ -31022,7 +31022,7 @@ type Wal1 = struct { // Connection to a write-ahead log (WAL) file. // There is one object of this type for each pager. -type Wal = Wal1 /* sqlite3.c:52577:20 */ +type Wal = Wal1 /* sqlite3.c:52579:20 */ //************* End of wal.h ************************************************ //************* Continuing where we left off in pager.c ********************* @@ -31790,7 +31790,7 @@ type PagerSavepoint1 = struct { // immediately following the last journal record written into the main // journal before the journal-header. This is required during savepoint // rollback (see pagerPlaybackSavepoint()). -type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53088:31 */ +type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53090:31 */ // Indexes for use with Pager.aStat[]. The Pager.aStat[] array contains // the values accessed by passing SQLITE_DBSTATUS_CACHE_HIT, CACHE_MISS @@ -31823,11 +31823,11 @@ type PagerSavepoint = PagerSavepoint1 /* sqlite3.c:53088:31 */ // is different for every journal, we minimize that risk. var aJournalMagic = [8]uint8{ uint8(0xd9), uint8(0xd5), uint8(0x05), uint8(0xf9), uint8(0x20), uint8(0xa1), uint8(0x63), uint8(0xd7), -} /* sqlite3.c:53410:28 */ +} /* sqlite3.c:53412:28 */ // Set the Pager.xGet method for the appropriate routine used to fetch // content from the pager. -func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53703:13: */ +func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53705:13: */ if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { (*Pager)(unsafe.Pointer(pPager)).FxGet = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 @@ -31850,7 +31850,7 @@ func setGetterMethod(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:53703:13: */ // * The page-number is less than or equal to PagerSavepoint.nOrig, and // * The bit corresponding to the page-number is not set in // PagerSavepoint.pInSavepoint. -func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:53724:12: */ +func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:53726:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var p uintptr var pgno Pgno = (*PgHdr)(unsafe.Pointer(pPg)).Fpgno @@ -31872,15 +31872,15 @@ func subjRequiresPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:53724:12: // error code is something goes wrong. // // All values are stored on disk as big-endian. -func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:53757:12: */ +func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* sqlite3.c:53759:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var ac [4]uint8 at bp, 4 - var rc int32 = Xsqlite3OsRead(tls, fd, bp /* &ac[0] */, int32(unsafe.Sizeof([4]uint8{})), offset) + var rc int32 = Xsqlite3OsRead(tls, fd, bp, int32(unsafe.Sizeof([4]uint8{})), offset) if rc == SQLITE_OK { - *(*U32)(unsafe.Pointer(pRes)) = Xsqlite3Get4byte(tls, bp /* &ac[0] */) + *(*U32)(unsafe.Pointer(pRes)) = Xsqlite3Get4byte(tls, bp) } return rc } @@ -31889,14 +31889,14 @@ func read32bits(tls *libc.TLS, fd uintptr, offset I64, pRes uintptr) int32 { /* // Write a 32-bit integer into the given file descriptor. Return SQLITE_OK // on success or an error code is something goes wrong. -func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:53776:12: */ +func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqlite3.c:53778:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var ac [4]int8 at bp, 4 - Xsqlite3Put4byte(tls, bp /* ac */, val) - return Xsqlite3OsWrite(tls, fd, bp /* &ac[0] */, 4, offset) + Xsqlite3Put4byte(tls, bp, val) + return Xsqlite3OsWrite(tls, fd, bp, 4, offset) } // Unlock the database file to level eLock, which must be either NO_LOCK @@ -31906,7 +31906,7 @@ func write32bits(tls *libc.TLS, fd uintptr, offset I64, val U32) int32 { /* sqli // Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is // called, do not modify it. See the comment above the #define of // UNKNOWN_LOCK for an explanation of this. -func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:53791:12: */ +func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:53793:12: */ var rc int32 = SQLITE_OK if (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { @@ -31933,7 +31933,7 @@ func pagerUnlockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite // called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. // See the comment above the #define of UNKNOWN_LOCK for an explanation // of this. -func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:53819:12: */ +func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3.c:53821:12: */ var rc int32 = SQLITE_OK if int32((*Pager)(unsafe.Pointer(pPager)).FeLock) < eLock || int32((*Pager)(unsafe.Pointer(pPager)).FeLock) == EXCLUSIVE_LOCK+1 { @@ -31967,7 +31967,7 @@ func pagerLockDb(tls *libc.TLS, pPager uintptr, eLock int32) int32 { /* sqlite3. // returned in this case. // // If neither optimization can be used, 0 is returned. -func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:53852:12: */ +func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:53854:12: */ _ = pPager @@ -32001,7 +32001,7 @@ func jrnlBufferSize(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:53852:12 // // If an error occurs while reading from the journal file, an SQLite // error code is returned. -func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:53957:12: */ +func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) int32 { /* sqlite3.c:53959:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -32060,7 +32060,7 @@ func readSuperJournal(tls *libc.TLS, pJrnl uintptr, zSuper uintptr, nSuper U32) // 100 512 // 2000 2048 // -func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54013:12: */ +func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54015:12: */ var offset I64 = int64(0) var c I64 = (*Pager)(unsafe.Pointer(pPager)).FjournalOff if c != 0 { @@ -32089,7 +32089,7 @@ func journalHdrOffset(tls *libc.TLS, pPager uintptr) I64 { /* sqlite3.c:54013:12 // // If an IO error occurs, abandon processing and return the IO error code. // Otherwise, return SQLITE_OK. -func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54046:12: */ +func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* sqlite3.c:54048:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32115,7 +32115,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* if rc == SQLITE_OK && iLimit > int64(0) { // var sz I64 at bp, 8 - rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp /* &sz */) + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) > iLimit { rc = Xsqlite3OsTruncate(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, iLimit) } @@ -32124,7 +32124,7 @@ func zeroJournalHdr(tls *libc.TLS, pPager uintptr, doTruncate int32) int32 { /* return rc } -var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54057:25 */ +var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54059:25 */ // The journal file must be open when this routine is called. A journal // header (JOURNAL_HDR_SZ bytes) is written into the journal file at the @@ -32139,7 +32139,7 @@ var zeroHdr = [28]int8{0: int8(0)} /* sqlite3.c:54057:25 */ // - 4 bytes: Database page size. // // Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space. -func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54096:12: */ +func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54098:12: */ var rc int32 = SQLITE_OK // Return code var zHeader uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace // Temporary space used to build header var nHeader U32 = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Size of buffer pointed to by zHeader @@ -32249,7 +32249,7 @@ func writeJournalHdr(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:54096:1 // If the journal header file appears to be corrupted, SQLITE_DONE is // returned and *pNRec and *PDbSize are undefined. If JOURNAL_HDR_SZ bytes // cannot be read from the journal file an error code is returned. -func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54214:12: */ +func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, pNRec uintptr, pDbSize uintptr) int32 { /* sqlite3.c:54216:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -32274,7 +32274,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // SQLITE_DONE. If an IO error occurs, return an error code. Otherwise, // proceed. if isHot != 0 || iHdrOff != (*Pager)(unsafe.Pointer(pPager)).FjournalHdr { - rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp /* &aMagic[0] */, int32(unsafe.Sizeof([8]uint8{})), iHdrOff) + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp, int32(unsafe.Sizeof([8]uint8{})), iHdrOff) if rc != 0 { return rc } @@ -32328,7 +32328,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // Update the page-size to match the value read from the journal. // Use a testcase() macro to make sure that malloc failure within // PagerSetPagesize() is tested. - rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+12 /* &iPageSize */, -1) + rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+12, -1) // Update the assumed sector-size to match the value used by // the process that created this journal. If this journal was @@ -32359,7 +32359,7 @@ func readJournalHdr(tls *libc.TLS, pPager uintptr, isHot int32, journalSize I64, // // If zSuper is a NULL pointer (occurs for a single database transaction), // this call is a no-op. -func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54339:12: */ +func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:54341:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -32419,21 +32419,21 @@ func writeSuperJournal(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* } // Discard the entire contents of the in-memory page-cache. -func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54407:13: */ +func pager_reset(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54409:13: */ (*Pager)(unsafe.Pointer(pPager)).FiDataVersion++ Xsqlite3BackupRestart(tls, (*Pager)(unsafe.Pointer(pPager)).FpBackup) Xsqlite3PcacheClear(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } // Return the pPager->iDataVersion value -func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54416:20: */ +func Xsqlite3PagerDataVersion(tls *libc.TLS, pPager uintptr) U32 { /* sqlite3.c:54418:20: */ return (*Pager)(unsafe.Pointer(pPager)).FiDataVersion } // Free all structures in the Pager.aSavepoint[] array and set both // Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal // if it is open and the pager is not in exclusive mode. -func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54425:13: */ +func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54427:13: */ var ii int32 // Iterator for looping through Pager.aSavepoint for ii = 0; ii < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint; ii++ { Xsqlite3BitvecDestroy(tls, (*PagerSavepoint)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).FaSavepoint+uintptr(ii)*48)).FpInSavepoint) @@ -32450,7 +32450,7 @@ func releaseAllSavepoints(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54425:13 // Set the bit number pgno in the PagerSavepoint.pInSavepoint // bitvecs of all open savepoints. Return SQLITE_OK if successful // or SQLITE_NOMEM if a malloc failure occurs. -func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54444:12: */ +func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* sqlite3.c:54446:12: */ var ii int32 // Loop counter var rc int32 = SQLITE_OK // Result code @@ -32479,7 +32479,7 @@ func addToSavepointBitvecs(tls *libc.TLS, pPager uintptr, pgno Pgno) int32 { /* // or not, any journal file left in the file-system will be treated // as a hot-journal and rolled back the next time a read-transaction // is opened (by this or by any other connection). -func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54476:13: */ +func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54478:13: */ Xsqlite3BitvecDestroy(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal) (*Pager)(unsafe.Pointer(pPager)).FpInJournal = uintptr(0) @@ -32571,7 +32571,7 @@ func pager_unlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54476:13: */ // the persistent error occurred, then the rollback journal may need // to be replayed to restore the contents of the database file (as if // it were a hot-journal). -func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:54573:12: */ +func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:54575:12: */ var rc2 int32 = rc & 0xff if rc2 == SQLITE_FULL || rc2 == SQLITE_IOERR { @@ -32596,7 +32596,7 @@ func pager_error(tls *libc.TLS, pPager uintptr, rc int32) int32 { /* sqlite3.c:5 // file has been created already (via a spill on pagerStress()) and // when the number of dirty pages in memory exceeds 25% of the total // cache size. -func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:54607:12: */ +func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* sqlite3.c:54609:12: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { return 1 } @@ -32660,7 +32660,7 @@ func pagerFlushOnCommit(tls *libc.TLS, pPager uintptr, bCommit int32) int32 { /* // unlock operation fails as well, then the first error code related // to the first error encountered (the journal finalization one) is // returned. -func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:54667:12: */ +func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommit int32) int32 { /* sqlite3.c:54669:12: */ var rc int32 = SQLITE_OK // Error code from journal finalization operation var rc2 int32 = SQLITE_OK // Error code from db file unlock operation @@ -32787,7 +32787,7 @@ func pager_end_transaction(tls *libc.TLS, pPager uintptr, hasSuper int32, bCommi // malloc error occurs during a rollback, then this will itself cause // the pager to enter the ERROR state. Which will be cleared by the // call to pager_unlock(), as described above. -func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54814:13: */ +func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54816:13: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_ERROR && int32((*Pager)(unsafe.Pointer(pPager)).FeState) != PAGER_OPEN { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_LOCKED { @@ -32819,7 +32819,7 @@ func pagerUnlockAndRollback(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:54814: // It is much less likely that the two ends of the journal record will be // correct and the middle be corrupt. Thus, this "checksum" scheme, // though fast and simple, catches the mostly likely kind of corruption. -func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:54848:12: */ +func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3.c:54850:12: */ var cksum U32 = (*Pager)(unsafe.Pointer(pPager)).FcksumInit // Checksum value to return var i int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize - int64(200)) // Loop counter for i > 0 { @@ -32864,7 +32864,7 @@ func pager_cksum(tls *libc.TLS, pPager uintptr, aData uintptr) U32 { /* sqlite3. // If this is a savepoint rollback, then memory may have to be dynamically // allocated by this function. If this is the case and an allocation fails, // SQLITE_NOMEM is returned. -func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:54895:12: */ +func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDone uintptr, isMainJrnl int32, isSavepnt int32) int32 { /* sqlite3.c:54897:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -32900,7 +32900,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo } else { jfd = (*Pager)(unsafe.Pointer(pPager)).Fsjfd } - rc = read32bits(tls, jfd, *(*I64)(unsafe.Pointer(pOffset)), bp /* &pgno */) + rc = read32bits(tls, jfd, *(*I64)(unsafe.Pointer(pOffset)), bp) if rc != SQLITE_OK { return rc } @@ -32922,7 +32922,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo return SQLITE_OK } if isMainJrnl != 0 { - rc = read32bits(tls, jfd, *(*I64)(unsafe.Pointer(pOffset))-int64(4), bp+4 /* &cksum */) + rc = read32bits(tls, jfd, *(*I64)(unsafe.Pointer(pOffset))-int64(4), bp+4) if rc != 0 { return rc } @@ -33024,7 +33024,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // requiring a journal-sync before it is written. *(*U8)(unsafe.Pointer(pPager + 21)) |= U8(SPILLFLAG_ROLLBACK) - rc = Xsqlite3PagerGet(tls, pPager, *(*Pgno)(unsafe.Pointer(bp /* pgno */)), bp+8 /* &pPg */, 1) + rc = Xsqlite3PagerGet(tls, pPager, *(*Pgno)(unsafe.Pointer(bp /* pgno */)), bp+8, 1) *(*U8)(unsafe.Pointer(pPager + 21)) &= libc.Uint8FromInt32(libc.CplInt32(SPILLFLAG_ROLLBACK)) if rc != SQLITE_OK { @@ -33098,7 +33098,7 @@ func pager_playback_one_page(tls *libc.TLS, pPager uintptr, pOffset uintptr, pDo // the entire contents of the super-journal file. This could be // a couple of kilobytes or so - potentially larger than the page // size. -func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55142:12: */ +func pager_delsuper(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:55144:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -33153,7 +33153,7 @@ __3: // sqlite3_malloc() and pointed to by zSuperJournal. Also obtain // sufficient space (in zSuperPtr) to hold the names of super-journal // files extracted from regular rollback-journals. - rc = Xsqlite3OsFileSize(tls, pSuper, bp /* &nSuperJournal */) + rc = Xsqlite3OsFileSize(tls, pSuper, bp) if !(rc != SQLITE_OK) { goto __4 } @@ -33187,7 +33187,7 @@ __7: if !(I64((int32(zJournal)-int32(zSuperJournal))/1) < *(*I64)(unsafe.Pointer(bp))) { goto __8 } - rc = Xsqlite3OsAccess(tls, pVfs, zJournal, SQLITE_ACCESS_EXISTS, bp+8 /* &exists */) + rc = Xsqlite3OsAccess(tls, pVfs, zJournal, SQLITE_ACCESS_EXISTS, bp+8) if !(rc != SQLITE_OK) { goto __9 } @@ -33264,7 +33264,7 @@ __14: // // If successful, return SQLITE_OK. If an IO error occurs while modifying // the database file, return the error code to the caller. -func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55260:12: */ +func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite3.c:55262:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33278,7 +33278,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite var szPage int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // TODO: Is it safe to use Pager.dbFileSize here? - rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp /* ¤tSize */) + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) newSize = I64(szPage) * I64(nPage) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) != newSize { if *(*I64)(unsafe.Pointer(bp)) > newSize { @@ -33299,7 +33299,7 @@ func pager_truncate(tls *libc.TLS, pPager uintptr, nPage Pgno) int32 { /* sqlite // Return a sanitized version of the sector-size of OS file pFile. The // return value is guaranteed to lie between 32 and MAX_SECTOR_SIZE. -func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55296:20: */ +func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55298:20: */ var iRet int32 = Xsqlite3OsSectorSize(tls, pFile) if iRet < 32 { iRet = 512 @@ -33331,7 +33331,7 @@ func Xsqlite3SectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:55296 // (that is what POWERSAFE_OVERWRITE means), so we minimize the sector // size. For backwards compatibility of the rollback journal file format, // we cannot reduce the effective sector size below 512. -func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55330:13: */ +func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55332:13: */ if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || Xsqlite3OsDeviceCharacteristics(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd)&SQLITE_IOCAP_POWERSAFE_OVERWRITE != 0 { @@ -33399,7 +33399,7 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55330:13: */ // If the journal really is hot, reset the pager cache prior rolling // back any content. If the journal is merely persistent, no reset is // needed. -func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55403:12: */ +func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55405:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -33428,7 +33428,7 @@ func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlit // Figure out how many records are in the journal. Abort early if // the journal is empty. - rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16 /* &szJ */) + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16) if !(rc != SQLITE_OK) { goto __1 } @@ -33451,7 +33451,7 @@ __1: if !(rc == SQLITE_OK && *(*int8)(unsafe.Pointer(zSuper)) != 0) { goto __2 } - rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+24 /* &res */) + rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+24) __2: ; zSuper = uintptr(0) @@ -33475,7 +33475,7 @@ __4: // not enough bytes left in the journal file for a complete header, or // it is corrupted, then a process must have failed while writing it. // This indicates nothing more needs to be rolled back. - rc = readJournalHdr(tls, pPager, isHot, *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)), bp+28 /* &nRec */, bp+32 /* &mxPg */) + rc = readJournalHdr(tls, pPager, isHot, *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)), bp+28, bp+32) if !(rc != SQLITE_OK) { goto __6 } @@ -33604,7 +33604,7 @@ end_playback: if !(rc == SQLITE_OK) { goto __22 } - rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36 /* &savedPageSize */, -1) + rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36, -1) __22: ; // Following a rollback, the database file should be back in its original @@ -33662,7 +33662,7 @@ __26: if !(isHot != 0 && nPlayback != 0) { goto __27 } - Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3832, /* "recovered %d pag..." */ + Xsqlite3_log(tls, SQLITE_NOTICE|int32(2)<<8, ts+3854, libc.VaList(bp, nPlayback, (*Pager)(unsafe.Pointer(pPager)).FzJournal)) __27: ; @@ -33684,7 +33684,7 @@ __27: // // If an IO error occurs, then the IO error is returned to the caller. // Otherwise, SQLITE_OK is returned. -func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:55620:12: */ +func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:55622:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -33694,7 +33694,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:55620:12: */ *(*U32)(unsafe.Pointer(bp /* iFrame */)) = U32(0) // Frame of WAL containing pgno if (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { - rc = Xsqlite3WalFindFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno, bp /* &iFrame */) + rc = Xsqlite3WalFindFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, (*PgHdr)(unsafe.Pointer(pPg)).Fpgno, bp) if rc != 0 { return rc } @@ -33738,7 +33738,7 @@ func readDbPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:55620:12: */ // This is an unconditional update. See also the pager_incr_changecounter() // routine which only updates the change-counter if the update is actually // needed, as determined by the pPager->changeCountDone state variable. -func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:55683:13: */ +func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:55685:13: */ var change_counter U32 if pPg == uintptr(0) { return @@ -33765,7 +33765,7 @@ func pager_write_changecounter(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:55683: // references, the page content is reloaded from the database. If the // attempt to reload content from the database is required and fails, // return an SQLite error code. Otherwise, SQLITE_OK. -func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:55711:12: */ +func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3.c:55713:12: */ var rc int32 = SQLITE_OK var pPager uintptr = pCtx var pPg uintptr @@ -33796,7 +33796,7 @@ func pagerUndoCallback(tls *libc.TLS, pCtx uintptr, iPg Pgno) int32 { /* sqlite3 } // This function is called to rollback a transaction on a WAL database. -func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55746:12: */ +func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55748:12: */ var rc int32 // Return Code var pList uintptr // List of dirty pages to revert @@ -33827,7 +33827,7 @@ func pagerRollbackWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55746: // // The list of pages passed into this routine is always sorted by page number. // Hence, if page 1 appears anywhere on the list, it will be the first page. -func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:55778:12: */ +func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno, isCommit int32) int32 { /* sqlite3.c:55780:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pList @@ -33875,7 +33875,7 @@ func pagerWalFrames(tls *libc.TLS, pPager uintptr, pList uintptr, nTruncate Pgno // makes a snapshot of the database at the current point in time and preserves // that snapshot for use by the reader in spite of concurrently changes by // other writers or checkpointers. -func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55845:12: */ +func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55847:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -33888,7 +33888,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // the duplicate call is harmless. Xsqlite3WalEndReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) - rc = Xsqlite3WalBeginReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, bp /* &changed */) + rc = Xsqlite3WalBeginReadTransaction(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, bp) if rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp)) != 0 { pager_reset(tls, pPager) if (*Pager)(unsafe.Pointer(pPager)).FbUseFetch != 0 { @@ -33906,7 +33906,7 @@ func pagerBeginReadTransaction(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // If no error occurs, SQLITE_OK is returned and the size of the database // in pages is stored in *pnPage. Otherwise, an error code (perhaps // SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified. -func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:55878:12: */ +func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sqlite3.c:55880:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33926,7 +33926,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // integer multiple of the page-size, round up the result. if nPage == Pgno(0) && (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { *(*I64)(unsafe.Pointer(bp /* n */)) = int64(0) // Size of db file in bytes - var rc int32 = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp /* &n */) + var rc int32 = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) if rc != SQLITE_OK { return rc } @@ -33960,7 +33960,7 @@ func pagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) int32 { /* sq // a WAL on a none-empty database, this ensures there is no race condition // between the xAccess() below and an xDelete() being executed by some // other connection. -func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55938:12: */ +func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:55940:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -33970,13 +33970,13 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // var isWal int32 at bp, 4 // True if WAL file exists rc = Xsqlite3OsAccess(tls, - (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, SQLITE_ACCESS_EXISTS, bp /* &isWal */) + (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, SQLITE_ACCESS_EXISTS, bp) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) != 0 { // var nPage Pgno at bp+4, 4 // Size of the database file - rc = pagerPagecount(tls, pPager, bp+4 /* &nPage */) + rc = pagerPagecount(tls, pPager, bp+4) if rc != 0 { return rc } @@ -34028,7 +34028,7 @@ func pagerOpenWalIfPresent(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // is reset to the value that it held at the start of the savepoint // (or transaction). No page with a page-number greater than this value // is played back. If one is encountered it is simply skipped. -func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56005:12: */ +func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) int32 { /* sqlite3.c:56007:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -34095,7 +34095,7 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i *(*U32)(unsafe.Pointer(bp /* nJRec */)) = U32(0) // Number of Journal Records // var dummy U32 at bp+4, 4 - rc = readJournalHdr(tls, pPager, 0, szJ, bp /* &nJRec */, bp+4 /* &dummy */) + rc = readJournalHdr(tls, pPager, 0, szJ, bp, bp+4) // The "pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff" // test is related to ticket #2565. See the discussion in the @@ -34122,7 +34122,7 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i } for ii = (*PagerSavepoint)(unsafe.Pointer(pSavepoint)).FiSubRec; rc == SQLITE_OK && ii < (*Pager)(unsafe.Pointer(pPager)).FnSubRec; ii++ { - rc = pager_playback_one_page(tls, pPager, bp+8 /* &offset */, pDone, 0, 1) + rc = pager_playback_one_page(tls, pPager, bp+8, pDone, 0, 1) } } @@ -34137,18 +34137,18 @@ func pagerPlaybackSavepoint(tls *libc.TLS, pPager uintptr, pSavepoint uintptr) i // Change the maximum number of in-memory pages that are allowed // before attempting to recycle clean and unused pages. -func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56117:21: */ +func Xsqlite3PagerSetCachesize(tls *libc.TLS, pPager uintptr, mxPage int32) { /* sqlite3.c:56119:21: */ Xsqlite3PcacheSetCachesize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Change the maximum number of in-memory pages that are allowed // before attempting to spill pages to journal. -func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56125:20: */ +func Xsqlite3PagerSetSpillsize(tls *libc.TLS, pPager uintptr, mxPage int32) int32 { /* sqlite3.c:56127:20: */ return Xsqlite3PcacheSetSpillsize(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, mxPage) } // Invoke SQLITE_FCNTL_MMAP_SIZE based on the current value of szMmap. -func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56132:13: */ +func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56134:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34159,18 +34159,18 @@ func pagerFixMaplimit(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56132:13: */ *(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = (*Pager)(unsafe.Pointer(pPager)).FszMmap (*Pager)(unsafe.Pointer(pPager)).FbUseFetch = U8(libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp)) > int64(0))) setGetterMethod(tls, pPager) - Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_MMAP_SIZE, bp /* &sz */) + Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_MMAP_SIZE, bp) } } // Change the maximum size of any memory mapping made of the database file. -func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56148:21: */ +func Xsqlite3PagerSetMmapLimit(tls *libc.TLS, pPager uintptr, szMmap Sqlite3_int64) { /* sqlite3.c:56150:21: */ (*Pager)(unsafe.Pointer(pPager)).FszMmap = szMmap pagerFixMaplimit(tls, pPager) } // Free as much memory as possible from the pager. -func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56156:21: */ +func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56158:21: */ Xsqlite3PcacheShrink(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) } @@ -34223,7 +34223,7 @@ func Xsqlite3PagerShrink(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56156:21: // // Numeric values associated with these states are OFF==1, NORMAL=2, // and FULL=3. -func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56212:21: */ +func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* sqlite3.c:56214:21: */ var level uint32 = pgFlags & uint32(PAGER_SYNCHRONOUS_MASK) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { (*Pager)(unsafe.Pointer(pPager)).FnoSync = U8(1) @@ -34287,7 +34287,7 @@ func Xsqlite3PagerSetFlags(tls *libc.TLS, pPager uintptr, pgFlags uint32) { /* s // SQLITE_OPEN_CREATE // SQLITE_OPEN_EXCLUSIVE // SQLITE_OPEN_DELETEONCLOSE -func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56272:12: */ +func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) int32 { /* sqlite3.c:56274:12: */ var rc int32 // Return code vfsFlags = vfsFlags | (SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE) @@ -34315,7 +34315,7 @@ func pagerOpentemp(tls *libc.TLS, pPager uintptr, pFile uintptr, vfsFlags int32) // If the busy-handler callback returns non-zero, the lock is // retried. If it returns zero, then the SQLITE_BUSY error is // returned to the caller of the pager API function. -func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56311:21: */ +func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uintptr, pBusyHandlerArg uintptr) { /* sqlite3.c:56313:21: */ var ap uintptr (*Pager)(unsafe.Pointer(pPager)).FxBusyHandler = xBusyHandler (*Pager)(unsafe.Pointer(pPager)).FpBusyHandlerArg = pBusyHandlerArg @@ -34352,7 +34352,7 @@ func Xsqlite3PagerSetBusyHandler(tls *libc.TLS, pPager uintptr, xBusyHandler uin // conditions above is not true, the pager was in error state when this // function was called, or because the memory allocation attempt failed, // then *pPageSize is set to the old, retained page size before returning. -func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56355:20: */ +func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, nReserve int32) int32 { /* sqlite3.c:56357:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34376,7 +34376,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, *(*I64)(unsafe.Pointer(bp /* nByte */)) = int64(0) if int32((*Pager)(unsafe.Pointer(pPager)).FeState) > PAGER_OPEN && (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods != uintptr(0) { - rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp /* &nByte */) + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp) } if rc == SQLITE_OK { // 8 bytes of zeroed overrun space is sufficient so that the b-tree @@ -34421,7 +34421,7 @@ func Xsqlite3PagerSetPagesize(tls *libc.TLS, pPager uintptr, pPageSize uintptr, // during rollback and will be overwritten whenever a rollback // occurs. But other modules are free to use it too, as long as // no rollbacks are happening. -func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56423:21: */ +func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:56425:21: */ return (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace } @@ -34430,7 +34430,7 @@ func Xsqlite3PagerTempSpace(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3. // maximum page count below the current size of the database. // // Regardless of mxPage, return the current maximum page count. -func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56434:21: */ +func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno { /* sqlite3.c:56436:21: */ if mxPage > Pgno(0) { (*Pager)(unsafe.Pointer(pPager)).FmxPgno = mxPage } @@ -34461,7 +34461,7 @@ func Xsqlite3PagerMaxPageCount(tls *libc.TLS, pPager uintptr, mxPage Pgno) Pgno // If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered, // the error code is returned to the caller and the contents of the // output buffer undefined. -func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:56484:20: */ +func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest uintptr) int32 { /* sqlite3.c:56486:20: */ var rc int32 = SQLITE_OK libc.Xmemset(tls, pDest, 0, uint32(N)) @@ -34484,7 +34484,7 @@ func Xsqlite3PagerReadFileheader(tls *libc.TLS, pPager uintptr, N int32, pDest u // // However, if the file is between 1 and <page-size> bytes in size, then // this is considered a 1 page file. -func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:56512:21: */ +func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* sqlite3.c:56514:21: */ *(*int32)(unsafe.Pointer(pnPage)) = int32((*Pager)(unsafe.Pointer(pPager)).FdbSize) } @@ -34501,7 +34501,7 @@ func Xsqlite3PagerPagecount(tls *libc.TLS, pPager uintptr, pnPage uintptr) { /* // Return SQLITE_OK on success and an error code if we cannot obtain // the lock. If the lock is obtained successfully, set the Pager.state // variable to locktype before returning. -func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:56533:12: */ +func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { /* sqlite3.c:56535:12: */ var rc int32 // Return code // Check that this is either a no-op (because the requested lock is @@ -34547,7 +34547,7 @@ func pager_wait_on_lock(tls *libc.TLS, pPager uintptr, locktype int32) int32 { / // Once this function has been called, the transaction must either be // rolled back or committed. It is not safe to call this function and // then continue writing to the database. -func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:56597:21: */ +func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* sqlite3.c:56599:21: */ (*Pager)(unsafe.Pointer(pPager)).FdbSize = nPage @@ -34574,7 +34574,7 @@ func Xsqlite3PagerTruncateImage(tls *libc.TLS, pPager uintptr, nPage Pgno) { /* // // If everything goes as planned, SQLITE_OK is returned. Otherwise, // an SQLite error code. -func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56629:12: */ +func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56631:12: */ var rc int32 = SQLITE_OK if !(int32((*Pager)(unsafe.Pointer(pPager)).FnoSync) != 0) { rc = Xsqlite3OsSync(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, SQLITE_SYNC_NORMAL) @@ -34593,7 +34593,7 @@ func pagerSyncHotJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:566 // // Page references obtained by calling this function should be released // by calling pagerReleaseMapPage(). -func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:56651:12: */ +func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr, ppPage uintptr) int32 { /* sqlite3.c:56653:12: */ var p uintptr // Memory mapped page to return if (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist != 0 { @@ -34623,7 +34623,7 @@ func pagerAcquireMapPage(tls *libc.TLS, pPager uintptr, pgno Pgno, pData uintptr // Release a reference to page pPg. pPg must have been returned by an // earlier call to pagerAcquireMapPage(). -func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56695:13: */ +func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56697:13: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager (*Pager)(unsafe.Pointer(pPager)).FnMmapOut-- (*PgHdr)(unsafe.Pointer(pPg)).FpDirty = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist @@ -34633,7 +34633,7 @@ func pagerReleaseMapPage(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56695:13: */ } // Free all PgHdr objects stored in the Pager.pMmapFreelist list. -func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56708:13: */ +func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56710:13: */ var p uintptr var pNext uintptr for p = (*Pager)(unsafe.Pointer(pPager)).FpMmapFreelist; p != 0; p = pNext { @@ -34646,7 +34646,7 @@ func pagerFreeMapHdrs(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:56708:13: */ // under the pager. Return SQLITE_OK if the database is still where it ought // to be on disk. Return non-zero (SQLITE_READONLY_DBMOVED or some other error // code from sqlite3OsAccess()) if the database has gone missing. -func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56722:12: */ +func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56724:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -34660,7 +34660,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56722 return SQLITE_OK } - rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_HAS_MOVED, bp /* &bHasMoved */) + rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_HAS_MOVED, bp) if rc == SQLITE_NOTFOUND { // If the HAS_MOVED file-control is unimplemented, assume that the file // has not been moved. That is the historical behavior of SQLite: prior to @@ -34684,7 +34684,7 @@ func databaseIsUnmoved(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:56722 // is made to roll it back. If an error occurs during the rollback // a hot journal may be left in the filesystem but no error is returned // to the caller. -func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:56756:20: */ +func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:56758:20: */ var pTmp uintptr = (*Pager)(unsafe.Pointer(pPager)).FpTmpSpace Xsqlite3BeginBenignMalloc(tls) @@ -34733,7 +34733,7 @@ func Xsqlite3PagerClose(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sq } // Increment the reference count for page pPg. -func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56825:21: */ +func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56827:21: */ Xsqlite3PcacheRef(tls, pPg) } @@ -34770,7 +34770,7 @@ func Xsqlite3PagerRef(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:56825:21: */ // If successful, this routine clears the PGHDR_NEED_SYNC flag of every // page currently held in memory before returning SQLITE_OK. If an IO // error is encountered, then the IO error code is returned to the caller. -func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:56864:12: */ +func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3.c:56866:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -34813,11 +34813,11 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 // var zHeader [12]U8 at bp, 12 - libc.Xmemcpy(tls, bp /* &zHeader[0] */, uintptr(unsafe.Pointer(&aJournalMagic)), uint32(unsafe.Sizeof(aJournalMagic))) + libc.Xmemcpy(tls, bp, uintptr(unsafe.Pointer(&aJournalMagic)), uint32(unsafe.Sizeof(aJournalMagic))) Xsqlite3Put4byte(tls, bp+8, uint32((*Pager)(unsafe.Pointer(pPager)).FnRec)) iNextHdrOffset = journalHdrOffset(tls, pPager) - rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+12 /* &aMagic[0] */, 8, iNextHdrOffset) + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+12, 8, iNextHdrOffset) if rc == SQLITE_OK && 0 == libc.Xmemcmp(tls, bp+12, uintptr(unsafe.Pointer(&aJournalMagic)), uint32(8)) { rc = Xsqlite3OsWrite(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, uintptr(unsafe.Pointer(&zerobyte)), 1, iNextHdrOffset) } @@ -34844,7 +34844,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 } rc = Xsqlite3OsWrite(tls, - (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp /* &zHeader[0] */, int32(unsafe.Sizeof([12]U8{})), (*Pager)(unsafe.Pointer(pPager)).FjournalHdr) + (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp, int32(unsafe.Sizeof([12]U8{})), (*Pager)(unsafe.Pointer(pPager)).FjournalHdr) if rc != SQLITE_OK { return rc } @@ -34884,7 +34884,7 @@ func syncJournal(tls *libc.TLS, pPager uintptr, newHdr int32) int32 { /* sqlite3 return SQLITE_OK } -var zerobyte U8 = U8(0) /* sqlite3.c:56915:27 */ +var zerobyte U8 = U8(0) /* sqlite3.c:56917:27 */ // The argument is the first in a linked list of dirty pages connected // by the PgHdr.pDirty pointer. This function writes each one of the @@ -34916,7 +34916,7 @@ var zerobyte U8 = U8(0) /* sqlite3.c:56915:27 */ // If everything is successful, SQLITE_OK is returned. If an IO error // occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot // be obtained, SQLITE_BUSY is returned. -func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57007:12: */ +func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { /* sqlite3.c:57009:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -34939,7 +34939,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { (*Pager)(unsafe.Pointer(pPager)).FdbHintSize < (*Pager)(unsafe.Pointer(pPager)).FdbSize && ((*PgHdr)(unsafe.Pointer(pList)).FpDirty != 0 || (*PgHdr)(unsafe.Pointer(pList)).Fpgno > (*Pager)(unsafe.Pointer(pPager)).FdbHintSize) { *(*Sqlite3_int64)(unsafe.Pointer(bp /* szFile */)) = (*Pager)(unsafe.Pointer(pPager)).FpageSize * Sqlite3_int64((*Pager)(unsafe.Pointer(pPager)).FdbSize) - Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SIZE_HINT, bp /* &szFile */) + Xsqlite3OsFileControlHint(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SIZE_HINT, bp) (*Pager)(unsafe.Pointer(pPager)).FdbHintSize = (*Pager)(unsafe.Pointer(pPager)).FdbSize } @@ -34996,7 +34996,7 @@ func pager_write_pagelist(tls *libc.TLS, pPager uintptr, pList uintptr) int32 { // SQLITE_OK is returned if everything goes according to plan. An // SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() // fails. -func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57098:12: */ +func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57100:12: */ var rc int32 = SQLITE_OK if !((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fsjfd)).FpMethods != uintptr(0)) { var flags int32 = SQLITE_OPEN_SUBJOURNAL | SQLITE_OPEN_READWRITE | @@ -35020,7 +35020,7 @@ func openSubJournal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57098:12 // error code if the attempt to write to the sub-journal fails, or // SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint // bitvec. -func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57124:12: */ +func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57126:12: */ var rc int32 = SQLITE_OK var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF { @@ -35051,7 +35051,7 @@ func subjournalPage(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57124:12: * return rc } -func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57160:12: */ +func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:57162:12: */ if subjRequiresPage(tls, pPg) != 0 { return subjournalPage(tls, pPg) } else { @@ -35077,7 +35077,7 @@ func subjournalPageIfRequired(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5 // page clean, the IO error code is returned. If the page cannot be // made clean for some other reason, but no error occurs, then SQLITE_OK // is returned by sqlite3PcacheMakeClean() is not called. -func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57187:12: */ +func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:57189:12: */ var pPager uintptr = p var rc int32 = SQLITE_OK @@ -35139,7 +35139,7 @@ func pagerStress(tls *libc.TLS, p uintptr, pPg uintptr) int32 { /* sqlite3.c:571 } // Flush all unreferenced dirty pages to disk. -func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57264:20: */ +func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57266:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if !(int32((*Pager)(unsafe.Pointer(pPager)).FmemDb) != 0) { var pList uintptr = Xsqlite3PcacheDirtyList(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) @@ -35186,7 +35186,7 @@ func Xsqlite3PagerFlush(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5726 // and error code returned. This function may return SQLITE_NOMEM // (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or // various SQLITE_IO_XXX errors. -func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57313:20: */ +func Xsqlite3PagerOpen(tls *libc.TLS, pVfs uintptr, ppPager uintptr, zFilename uintptr, nExtra int32, flags int32, vfsFlags int32, xReinit uintptr) int32 { /* sqlite3.c:57315:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -35312,7 +35312,7 @@ __11: // bytes in length. This means the database cannot be opened, // as it will not be possible to open the journal file or even // check for a hot-journal before reading. - rc = Xsqlite3CantopenError(tls, 57400) + rc = Xsqlite3CantopenError(tls, 57402) __12: ; if !(rc != SQLITE_OK) { @@ -35389,7 +35389,7 @@ __14: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Fjfd = pPtr pPtr += uintptr(journalFileSize) - libc.Xmemcpy(tls, pPtr, bp /* &pPager */, uint32(unsafe.Sizeof(uintptr(0)))) + libc.Xmemcpy(tls, pPtr, bp, uint32(unsafe.Sizeof(uintptr(0)))) pPtr += uintptr(unsafe.Sizeof(uintptr(0))) // Fill in the Pager.zFilename and pPager.zQueryParam fields @@ -35420,7 +35420,7 @@ __15: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzJournal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3859 /* "-journal" */, uint32(8)) + libc.Xmemcpy(tls, pPtr, ts+3881, uint32(8)) pPtr += uintptr(8 + 1) goto __19 __18: @@ -35435,7 +35435,7 @@ __19: (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzWal = pPtr libc.Xmemcpy(tls, pPtr, zPathname, uint32(nPathname)) pPtr += uintptr(nPathname) - libc.Xmemcpy(tls, pPtr, ts+3868 /* "-wal" */, uint32(4)) + libc.Xmemcpy(tls, pPtr, ts+3890, uint32(4)) pPtr += uintptr(4 + 1) goto __21 __20: @@ -35458,7 +35458,7 @@ __22: goto __23 } *(*int32)(unsafe.Pointer(bp + 4 /* fout */)) = 0 // VFS flags returned by xOpen() - rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd, vfsFlags, bp+4 /* &fout */) + rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).Ffd, vfsFlags, bp+4) (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FmemVfs = U8(libc.AssignInt32(&memJM, libc.Bool32(*(*int32)(unsafe.Pointer(bp + 4))&SQLITE_OPEN_MEMORY != 0))) readOnly = libc.Bool32(*(*int32)(unsafe.Pointer(bp + 4))&SQLITE_OPEN_READONLY != 0) @@ -35495,9 +35495,9 @@ __27: ; __26: ; - (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, ts+3873 /* "nolock" */, 0)) + (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FnoLock = U8(Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPager */)))).FzFilename, ts+3895, 0)) if !(iDc&SQLITE_IOCAP_IMMUTABLE != 0 || - Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3880, 0) != 0) { + Xsqlite3_uri_boolean(tls, (*Pager)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FzFilename, ts+3902, 0) != 0) { goto __30 } vfsFlags = vfsFlags | SQLITE_OPEN_READONLY @@ -35532,7 +35532,7 @@ __24: goto __31 } - rc = Xsqlite3PagerSetPagesize(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */)), bp+8 /* &szPageDflt */, -1) + rc = Xsqlite3PagerSetPagesize(tls, *(*uintptr)(unsafe.Pointer(bp /* pPager */)), bp+8, -1) __31: ; @@ -35631,7 +35631,7 @@ __37: // Return the sqlite3_file for the main database given the name // of the corresonding WAL or Journal name as passed into // xOpen. -func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:57685:25: */ +func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:57687:25: */ var pPager uintptr for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- @@ -35669,7 +35669,7 @@ func Xsqlite3_database_file_object(tls *libc.TLS, zName uintptr) uintptr { /* sq // set to 0 and SQLITE_OK returned. If an IO error occurs while trying // to determine whether or not a hot-journal file exists, the IO error // code is returned and the value of *pExists is undefined. -func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:57726:12: */ +func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sqlite3.c:57728:12: */ bp := tls.Alloc(17) defer tls.Free(17) @@ -35680,7 +35680,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq *(*int32)(unsafe.Pointer(pExists)) = 0 if !(jrnlOpen != 0) { - rc = Xsqlite3OsAccess(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, SQLITE_ACCESS_EXISTS, bp /* &exists */) + rc = Xsqlite3OsAccess(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, SQLITE_ACCESS_EXISTS, bp) } if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { *(*int32)(unsafe.Pointer(bp + 4 /* locked */)) = 0 // True if some process holds a RESERVED lock @@ -35692,12 +35692,12 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // is the case, this routine might think there is a hot journal when // in fact there is none. This results in a false-positive which will // be dealt with by the playback routine. Ticket #3883. - rc = Xsqlite3OsCheckReservedLock(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+4 /* &locked */) + rc = Xsqlite3OsCheckReservedLock(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+4) if rc == SQLITE_OK && !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) { // var nPage Pgno at bp+8, 4 // Number of pages in database file - rc = pagerPagecount(tls, pPager, bp+8 /* &nPage */) + rc = pagerPagecount(tls, pPager, bp+8) if rc == SQLITE_OK { // If the database is zero pages in size, that means that either (1) the // journal is a remnant from a prior database with the same name where @@ -35723,11 +35723,11 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // it can be ignored. if !(jrnlOpen != 0) { *(*int32)(unsafe.Pointer(bp + 12 /* f */)) = SQLITE_OPEN_READONLY | SQLITE_OPEN_MAIN_JOURNAL - rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, *(*int32)(unsafe.Pointer(bp + 12 /* f */)), bp+12 /* &f */) + rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, *(*int32)(unsafe.Pointer(bp + 12 /* f */)), bp+12) } if rc == SQLITE_OK { *(*U8)(unsafe.Pointer(bp + 16 /* first */)) = U8(0) - rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16 /* &first */, 1, int64(0)) + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16, 1, int64(0)) if rc == SQLITE_IOERR|int32(2)<<8 { rc = SQLITE_OK } @@ -35780,7 +35780,7 @@ func hasHotJournal(tls *libc.TLS, pPager uintptr, pExists uintptr) int32 { /* sq // If everything is successful, SQLITE_OK is returned. If an IO error // occurs while locking the database, checking for a hot-journal file or // rolling back a journal file, the IO error code is returned. -func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57846:20: */ +func Xsqlite3PagerSharedLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:57848:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -35835,7 +35835,7 @@ __2: if !(int32((*Pager)(unsafe.Pointer(pPager)).FeLock) <= SHARED_LOCK) { goto __3 } - rc = hasHotJournal(tls, pPager, bp /* &bHotJournal */) + rc = hasHotJournal(tls, pPager, bp) __3: ; if !(rc != SQLITE_OK) { @@ -35889,24 +35889,24 @@ __7: // this connection obtained the exclusive lock above. Or, it // may mean that the pager was in the error-state when this // function was called and the journal file does not exist. - if !!((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) { + if !(!((*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Fjfd)).FpMethods != uintptr(0)) && int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) != PAGER_JOURNALMODE_OFF) { goto __8 } pVfs = (*Pager)(unsafe.Pointer(pPager)).FpVfs // True if journal file exists rc = Xsqlite3OsAccess(tls, - pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, SQLITE_ACCESS_EXISTS, bp+4 /* &bExists */) + pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, SQLITE_ACCESS_EXISTS, bp+4) if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 4)) != 0) { goto __9 } *(*int32)(unsafe.Pointer(bp + 8 /* fout */)) = 0 f = SQLITE_OPEN_READWRITE | SQLITE_OPEN_MAIN_JOURNAL - rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, f, bp+8 /* &fout */) + rc = Xsqlite3OsOpen(tls, pVfs, (*Pager)(unsafe.Pointer(pPager)).FzJournal, (*Pager)(unsafe.Pointer(pPager)).Fjfd, f, bp+8) if !(rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 8))&SQLITE_OPEN_READONLY != 0) { goto __10 } - rc = Xsqlite3CantopenError(tls, 57930) + rc = Xsqlite3CantopenError(tls, 57932) Xsqlite3OsClose(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd) __10: ; @@ -35975,7 +35975,7 @@ __5: goto __16 } - rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+12 /* &dbFileVers */, int32(unsafe.Sizeof([16]int8{})), int64(24)) + rc = Xsqlite3OsRead(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, bp+12, int32(unsafe.Sizeof([16]int8{})), int64(24)) if !(rc != SQLITE_OK) { goto __17 } @@ -35985,7 +35985,7 @@ __5: goto failed __18: ; - libc.Xmemset(tls, bp+12 /* &dbFileVers[0] */, 0, uint32(unsafe.Sizeof([16]int8{}))) + libc.Xmemset(tls, bp+12, 0, uint32(unsafe.Sizeof([16]int8{}))) __17: ; @@ -36055,7 +36055,7 @@ __24: // Except, in locking_mode=EXCLUSIVE when there is nothing to in // the rollback journal, the unlock is not performed and there is // nothing to rollback, so this routine is a no-op. -func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58063:13: */ +func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58065:13: */ if Xsqlite3PcacheRefCount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache) == 0 { // because page1 is never memory mapped pagerUnlockAndRollback(tls, pPager) @@ -36117,7 +36117,7 @@ func pagerUnlockIfUnused(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:58063:13: // has to go to disk, and could also playback an old journal if necessary. // Since Lookup() never goes to disk, it never has to deal with locks // or journal files. -func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58127:12: */ +func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58129:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36130,7 +36130,7 @@ func getPageNormal(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, fla if !(pgno == Pgno(0)) { goto __1 } - return Xsqlite3CorruptError(tls, 58143) + return Xsqlite3CorruptError(tls, 58145) __1: ; *(*uintptr)(unsafe.Pointer(bp /* pBase */)) = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 3) @@ -36138,7 +36138,7 @@ __1: goto __2 } pPg = uintptr(0) - rc = Xsqlite3PcacheFetchStress(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, bp /* &pBase */) + rc = Xsqlite3PcacheFetchStress(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, bp) if !(rc != SQLITE_OK) { goto __3 } @@ -36176,7 +36176,7 @@ __5: if !(pgno == Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1))) { goto __7 } - rc = Xsqlite3CorruptError(tls, 58175) + rc = Xsqlite3CorruptError(tls, 58177) goto pager_acquire_err __7: ; @@ -36248,7 +36248,7 @@ __14: } // The page getter for when memory-mapped I/O is enabled -func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58229:12: */ +func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58231:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -36268,11 +36268,11 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags // test in the previous statement, and avoid testing pgno==0 in the // common case where pgno is large. if pgno <= Pgno(1) && pgno == Pgno(0) { - return Xsqlite3CorruptError(tls, 58254) + return Xsqlite3CorruptError(tls, 58256) } if bMmapOk != 0 && (*Pager)(unsafe.Pointer(pPager)).FpWal != uintptr(0) { - rc = Xsqlite3WalFindFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pgno, bp /* &iFrame */) + rc = Xsqlite3WalFindFrame(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pgno, bp) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) return rc @@ -36281,13 +36281,13 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags if bMmapOk != 0 && *(*U32)(unsafe.Pointer(bp)) == U32(0) { *(*uintptr)(unsafe.Pointer(bp + 4 /* pData */)) = uintptr(0) rc = Xsqlite3OsFetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, - I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), bp+4 /* &pData */) + I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, int32((*Pager)(unsafe.Pointer(pPager)).FpageSize), bp+4) if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp + 4)) != 0 { if int32((*Pager)(unsafe.Pointer(pPager)).FeState) > PAGER_READER || (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */)) = Xsqlite3PagerLookup(tls, pPager, pgno) } if *(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0) { - rc = pagerAcquireMapPage(tls, pPager, pgno, *(*uintptr)(unsafe.Pointer(bp + 4 /* pData */)), bp+8 /* &pPg */) + rc = pagerAcquireMapPage(tls, pPager, pgno, *(*uintptr)(unsafe.Pointer(bp + 4 /* pData */)), bp+8) } else { Xsqlite3OsUnfetch(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, I64(pgno-Pgno(1))*(*Pager)(unsafe.Pointer(pPager)).FpageSize, *(*uintptr)(unsafe.Pointer(bp + 4 /* pData */))) } @@ -36306,7 +36306,7 @@ func getPageMMap(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags } // The page getter method for when the pager is an error state -func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58298:12: */ +func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58300:12: */ _ = pgno _ = flags @@ -36315,7 +36315,7 @@ func getPageError(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flag } // Dispatch all page fetch requests to the appropriate getter method. -func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58314:20: */ +func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:58316:20: */ return (*struct { f func(*libc.TLS, uintptr, Pgno, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Pager)(unsafe.Pointer(pPager)).FxGet})).f(tls, pPager, pgno, ppPage, flags) @@ -36330,7 +36330,7 @@ func Xsqlite3PagerGet(tls *libc.TLS, pPager uintptr, pgno Pgno, ppPage uintptr, // in the page if the page is not already in cache. This routine // returns NULL if the page is not in cache or if a disk I/O error // has ever happened. -func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58334:23: */ +func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* sqlite3.c:58336:23: */ var pPage uintptr pPage = Xsqlite3PcacheFetch(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache, pgno, 0) @@ -36351,7 +36351,7 @@ func Xsqlite3PagerLookup(tls *libc.TLS, pPager uintptr, pgno Pgno) uintptr { /* // Use sqlite3PagerUnrefPageOne() to release page1. This latter routine // checks the total number of outstanding pages and if the number of // pages reaches zero it drops the database lock. -func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58357:21: */ +func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58359:21: */ if int32((*DbPage)(unsafe.Pointer(pPg)).Fflags)&PGHDR_MMAP != 0 { // Page1 is never memory mapped @@ -36363,13 +36363,13 @@ func Xsqlite3PagerUnrefNotNull(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58357: } -func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58369:21: */ +func Xsqlite3PagerUnref(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58371:21: */ if pPg != 0 { Xsqlite3PagerUnrefNotNull(tls, pPg) } } -func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58372:21: */ +func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58374:21: */ var pPager uintptr // Page1 is never memory mapped @@ -36398,7 +36398,7 @@ func Xsqlite3PagerUnrefPageOne(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58372: // Return SQLITE_OK if everything is successful. Otherwise, return // SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or // an IO error code if opening or writing the journal file fails. -func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58404:12: */ +func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58406:12: */ var rc int32 = SQLITE_OK // Return code var pVfs uintptr = (*Pager)(unsafe.Pointer(pPager)).FpVfs // Local cache of vfs pointer @@ -36480,7 +36480,7 @@ func pager_open_journal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5840 // sub-journal. If the subjInMemory argument is zero, then any required // sub-journal is implemented in-memory if pPager is an in-memory database, // or using a temporary file otherwise. -func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:58493:20: */ +func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemory int32) int32 { /* sqlite3.c:58495:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FerrCode != 0 { @@ -36540,7 +36540,7 @@ func Xsqlite3PagerBegin(tls *libc.TLS, pPager uintptr, exFlag int32, subjInMemor } // Write page pPg onto the end of the rollback journal. -func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58562:28: */ +func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58564:28: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 var cksum U32 @@ -36590,7 +36590,7 @@ func pagerAddPageToRollbackJournal(tls *libc.TLS, pPg uintptr) int32 { /* sqlite // one of the journals, the corresponding bit is set in the // Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs // of any open savepoints as appropriate. -func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58619:12: */ +func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58621:12: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager var rc int32 = SQLITE_OK @@ -36664,7 +36664,7 @@ func pager_write(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58619:12: */ // Usually, the sector size is less than or equal to the page size, in which // case pages can be individually written. This routine only runs in the // exceptional case where the page size is smaller than the sector size. -func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58711:28: */ +func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58713:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36703,7 +36703,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5871 if pg == (*PgHdr)(unsafe.Pointer(pPg)).Fpgno || !(Xsqlite3BitvecTest(tls, (*Pager)(unsafe.Pointer(pPager)).FpInJournal, pg) != 0) { if pg != Pgno(I64(Xsqlite3PendingByte)/(*Pager)(unsafe.Pointer(pPager)).FpageSize+int64(1)) { - rc = Xsqlite3PagerGet(tls, pPager, pg, bp /* &pPage */, 0) + rc = Xsqlite3PagerGet(tls, pPager, pg, bp, 0) if rc == SQLITE_OK { rc = pager_write(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) if int32((*PgHdr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).Fflags)&PGHDR_NEED_SYNC != 0 { @@ -36752,7 +36752,7 @@ func pagerWriteLargeSector(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:5871 // // If an error occurs, SQLITE_NOMEM or an IO error code is returned // as appropriate. Otherwise, SQLITE_OK. -func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58805:20: */ +func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58807:20: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_WRITEABLE != 0 && (*Pager)(unsafe.Pointer(pPager)).FdbSize >= (*PgHdr)(unsafe.Pointer(pPg)).Fpgno { @@ -36793,7 +36793,7 @@ func Xsqlite3PagerWrite(tls *libc.TLS, pPg uintptr) int32 { /* sqlite3.c:58805:2 // memory pressure forces page pPg out of the cache, the data does need // to be written out to disk so that it may be read back in if the // current transaction is rolled back. -func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58854:21: */ +func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58856:21: */ var pPager uintptr = (*PgHdr)(unsafe.Pointer(pPg)).FpPager if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && int32((*PgHdr)(unsafe.Pointer(pPg)).Fflags)&PGHDR_DIRTY != 0 && (*Pager)(unsafe.Pointer(pPager)).FnSavepoint == 0 { @@ -36823,7 +36823,7 @@ func Xsqlite3PagerDontWrite(tls *libc.TLS, pPg uintptr) { /* sqlite3.c:58854:21: // if isDirect is non-zero, then the database file is updated directly // by writing an updated version of page 1 using a call to the // sqlite3OsWrite() function. -func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:58888:12: */ +func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) int32 { /* sqlite3.c:58890:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -36846,7 +36846,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // Reference to page 1 // Open page 1 of the file for writing. - rc = Xsqlite3PagerGet(tls, pPager, uint32(1), bp /* &pPgHdr */, 0) + rc = Xsqlite3PagerGet(tls, pPager, uint32(1), bp, 0) // If page one was fetched successfully, and this function is not // operating in direct-mode, make page 1 writable. When not in @@ -36893,7 +36893,7 @@ func pager_incr_changecounter(tls *libc.TLS, pPager uintptr, isDirectMode int32) // // If successful, or if called on a pager for which it is a no-op, this // function returns SQLITE_OK. Otherwise, an IO error code is returned. -func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:58971:20: */ +func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* sqlite3.c:58973:20: */ var rc int32 = SQLITE_OK var pArg uintptr = zSuper rc = Xsqlite3OsFileControl(tls, (*Pager)(unsafe.Pointer(pPager)).Ffd, SQLITE_FCNTL_SYNC, pArg) @@ -36916,7 +36916,7 @@ func Xsqlite3PagerSync(tls *libc.TLS, pPager uintptr, zSuper uintptr) int32 { /* // successful, or the connection is in WAL mode, SQLITE_OK is returned. // Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is // returned. -func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58994:20: */ +func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:58996:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK { @@ -36952,7 +36952,7 @@ func Xsqlite3PagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite // is not synced. The caller must call sqlite3PagerSync() directly to // sync the database file before calling CommitPhaseTwo() to delete the // journal file in this case. -func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59036:20: */ +func Xsqlite3PagerCommitPhaseOne(tls *libc.TLS, pPager uintptr, zSuper uintptr, noSync int32) int32 { /* sqlite3.c:59038:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37006,7 +37006,7 @@ __4: } // Must have at least one page for the WAL commit flag. // Ticket [2d1a5c67dfc2363e44f29d9bbd57f] 2011-05-18 - rc = Xsqlite3PagerGet(tls, pPager, uint32(1), bp /* &pPageOne */, 0) + rc = Xsqlite3PagerGet(tls, pPager, uint32(1), bp, 0) pList = *(*uintptr)(unsafe.Pointer(bp /* pPageOne */)) (*PgHdr)(unsafe.Pointer(pList)).FpDirty = uintptr(0) __8: @@ -37142,7 +37142,7 @@ __19: // // If an error occurs, an IO error code is returned and the pager // moves into the error state. Otherwise, SQLITE_OK is returned. -func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59266:20: */ +func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59268:20: */ var rc int32 = SQLITE_OK // Return code // This routine should not be called if a prior error has occurred. @@ -37199,7 +37199,7 @@ func Xsqlite3PagerCommitPhaseTwo(tls *libc.TLS, pPager uintptr) int32 { /* sqlit // current transaction are either expelled from the cache or reverted to // their pre-transaction state by re-reading data from the database or // WAL files. The WAL transaction is then closed. -func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59332:20: */ +func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59334:20: */ var rc int32 = SQLITE_OK // Return code // PagerRollback() is a no-op if called in READER or OPEN state. If @@ -37243,13 +37243,13 @@ func Xsqlite3PagerRollback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:5 // Return TRUE if the database file is opened read-only. Return FALSE // if the database is (in theory) writable. -func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59382:19: */ +func Xsqlite3PagerIsreadonly(tls *libc.TLS, pPager uintptr) U8 { /* sqlite3.c:59384:19: */ return (*Pager)(unsafe.Pointer(pPager)).FreadOnly } // Return the approximate number of bytes of memory currently // used by the pager and its associated cache. -func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59399:20: */ +func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59401:20: */ var perPageSize int32 = int32((*Pager)(unsafe.Pointer(pPager)).FpageSize + I64((*Pager)(unsafe.Pointer(pPager)).FnExtra) + I64(int32(uint32(unsafe.Sizeof(PgHdr{}))+uint32(5)*uint32(unsafe.Sizeof(uintptr(0)))))) return int32(I64(perPageSize*Xsqlite3PcachePagecount(tls, (*Pager)(unsafe.Pointer(pPager)).FpPCache)+ @@ -37258,7 +37258,7 @@ func Xsqlite3PagerMemUsed(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 } // Return the number of references to the specified page. -func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59410:20: */ +func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:59412:20: */ return Xsqlite3PcachePageRefcount(tls, pPage) } @@ -37271,7 +37271,7 @@ func Xsqlite3PagerPageRefcount(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3. // current cache hit or miss count, according to the value of eStat. If the // reset parameter is non-zero, the cache hit or miss count is zeroed before // returning. -func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59446:21: */ +func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset int32, pnVal uintptr) { /* sqlite3.c:59448:21: */ eStat = eStat - SQLITE_DBSTATUS_CACHE_HIT *(*int32)(unsafe.Pointer(pnVal)) += *(*int32)(unsafe.Pointer(pPager + 188 + uintptr(eStat)*4)) @@ -37281,7 +37281,7 @@ func Xsqlite3PagerCacheStat(tls *libc.TLS, pPager uintptr, eStat int32, reset in } // Return true if this is an in-memory or temp-file backed pager. -func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59469:20: */ +func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59471:20: */ return libc.Bool32((*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 || (*Pager)(unsafe.Pointer(pPager)).FmemVfs != 0) } @@ -37293,7 +37293,7 @@ func Xsqlite3PagerIsMemdb(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:59 // If a memory allocation fails, SQLITE_NOMEM is returned. If an error // occurs while opening the sub-journal file, then an IO error code is // returned. Otherwise, SQLITE_OK. -func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:59483:28: */ +func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:59485:28: */ var rc int32 = SQLITE_OK // Return code var nCurrent int32 = (*Pager)(unsafe.Pointer(pPager)).FnSavepoint // Current number of savepoints var ii int32 // Iterator variable @@ -37333,7 +37333,7 @@ func pagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { return rc } -func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:59529:20: */ +func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) int32 { /* sqlite3.c:59531:20: */ if nSavepoint > (*Pager)(unsafe.Pointer(pPager)).FnSavepoint && (*Pager)(unsafe.Pointer(pPager)).FuseJournal != 0 { return pagerOpenSavepoint(tls, pPager, nSavepoint) @@ -37371,7 +37371,7 @@ func Xsqlite3PagerOpenSavepoint(tls *libc.TLS, pPager uintptr, nSavepoint int32) // This function may return SQLITE_NOMEM if a memory allocation fails, // or an IO error code if an IO error occurs while rolling back a // savepoint. If no errors occur, SQLITE_OK is returned. -func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:59571:20: */ +func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:59573:20: */ var rc int32 = (*Pager)(unsafe.Pointer(pPager)).FerrCode if rc == SQLITE_OK && iSavepoint < (*Pager)(unsafe.Pointer(pPager)).FnSavepoint { @@ -37432,30 +37432,30 @@ func Xsqlite3PagerSavepoint(tls *libc.TLS, pPager uintptr, op int32, iSavepoint // // The return value to this routine is always safe to use with // sqlite3_uri_parameter() and sqlite3_filename_database() and friends. -func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:59652:27: */ +func Xsqlite3PagerFilename(tls *libc.TLS, pPager uintptr, nullIfMemDb int32) uintptr { /* sqlite3.c:59654:27: */ if nullIfMemDb != 0 && (*Pager)(unsafe.Pointer(pPager)).FmemDb != 0 { return uintptr(unsafe.Pointer(&zFake)) + 4 } return (*Pager)(unsafe.Pointer(pPager)).FzFilename } -var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:59653:21 */ +var zFake = [8]int8{int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:59655:21 */ // Return the VFS structure for the pager. -func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59660:28: */ +func Xsqlite3PagerVfs(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59662:28: */ return (*Pager)(unsafe.Pointer(pPager)).FpVfs } // Return the file handle for the database file associated // with the pager. This might return NULL if the file has // not yet been opened. -func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59669:29: */ +func Xsqlite3PagerFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59671:29: */ return (*Pager)(unsafe.Pointer(pPager)).Ffd } // Return the file handle for the journal file (if it exists). // This will be either the rollback journal or the WAL file. -func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59677:29: */ +func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59679:29: */ if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { return Xsqlite3WalFile(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -37463,7 +37463,7 @@ func Xsqlite3PagerJrnlFile(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c } // Return the full pathname of the journal file. -func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59688:27: */ +func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:59690:27: */ return (*Pager)(unsafe.Pointer(pPager)).FzJournal } @@ -37490,7 +37490,7 @@ func Xsqlite3PagerJournalname(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite // // This function may return SQLITE_NOMEM or an IO error code if an error // occurs. Otherwise, it returns SQLITE_OK. -func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:59718:20: */ +func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno, isCommit int32) int32 { /* sqlite3.c:59720:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37552,7 +37552,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno if pPgOld != 0 { if int32((*PgHdr)(unsafe.Pointer(pPgOld)).FnRef) > 1 { Xsqlite3PagerUnrefNotNull(tls, pPgOld) - return Xsqlite3CorruptError(tls, 59792) + return Xsqlite3CorruptError(tls, 59794) } *(*U16)(unsafe.Pointer(pPg + 28)) |= U16(int32((*PgHdr)(unsafe.Pointer(pPgOld)).Fflags) & PGHDR_NEED_SYNC) if (*Pager)(unsafe.Pointer(pPager)).FtempFile != 0 { @@ -37592,7 +37592,7 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // the journal file twice, but that is not a problem. // var pPgHdr uintptr at bp, 4 - rc = Xsqlite3PagerGet(tls, pPager, needSyncPgno, bp /* &pPgHdr */, 0) + rc = Xsqlite3PagerGet(tls, pPager, needSyncPgno, bp, 0) if rc != SQLITE_OK { if needSyncPgno <= (*Pager)(unsafe.Pointer(pPager)).FdbOrigSize { @@ -37612,21 +37612,21 @@ func Xsqlite3PagerMovepage(tls *libc.TLS, pPager uintptr, pPg uintptr, pgno Pgno // with a page number other than iNew. This function changes the page's // page number to iNew and sets the value of the PgHdr.flags field to // the value passed as the third parameter. -func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:59856:21: */ +func Xsqlite3PagerRekey(tls *libc.TLS, pPg uintptr, iNew Pgno, flags U16) { /* sqlite3.c:59858:21: */ (*DbPage)(unsafe.Pointer(pPg)).Fflags = flags Xsqlite3PcacheMove(tls, pPg, iNew) } // Return a pointer to the data for the specified page. -func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59865:21: */ +func Xsqlite3PagerGetData(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59867:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpData } // Return a pointer to the Pager.nExtra bytes of "extra" space // allocated along with the specified page. -func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59874:21: */ +func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59876:21: */ return (*DbPage)(unsafe.Pointer(pPg)).FpExtra } @@ -37638,7 +37638,7 @@ func Xsqlite3PagerGetExtra(tls *libc.TLS, pPg uintptr) uintptr { /* sqlite3.c:59 // The returned value is either PAGER_LOCKINGMODE_NORMAL or // PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated) // locking-mode. -func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:59888:20: */ +func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:59890:20: */ if eMode >= 0 && !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(Xsqlite3WalHeapMemory(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { (*Pager)(unsafe.Pointer(pPager)).FexclusiveMode = U8(eMode) @@ -37664,7 +37664,7 @@ func Xsqlite3PagerLockingMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 // * Temporary databases cannot have _WAL journalmode. // // The returned indicate the current (possibly updated) journal-mode. -func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:59921:20: */ +func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int32 { /* sqlite3.c:59923:20: */ var eOld U8 = (*Pager)(unsafe.Pointer(pPager)).FjournalMode // Prior journalmode // The eMode parameter is always valid @@ -37735,14 +37735,14 @@ func Xsqlite3PagerSetJournalMode(tls *libc.TLS, pPager uintptr, eMode int32) int } // Return the current journal mode. -func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60012:20: */ +func Xsqlite3PagerGetJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60014:20: */ return int32((*Pager)(unsafe.Pointer(pPager)).FjournalMode) } // Return TRUE if the pager is in a state where it is OK to change the // journalmode. Journalmode changes can only happen when the database // is unmodified. -func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60021:20: */ +func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60023:20: */ if int32((*Pager)(unsafe.Pointer(pPager)).FeState) >= PAGER_WRITER_CACHEMOD { return 0 @@ -37757,7 +37757,7 @@ func Xsqlite3PagerOkToChangeJournalMode(tls *libc.TLS, pPager uintptr) int32 { / // // Setting the size limit to -1 means no limit is enforced. // An attempt to set a limit smaller than -1 is a no-op. -func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60034:20: */ +func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I64 { /* sqlite3.c:60036:20: */ if iLimit >= int64(-1) { (*Pager)(unsafe.Pointer(pPager)).FjournalSizeLimit = iLimit Xsqlite3WalLimit(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, iLimit) @@ -37769,12 +37769,12 @@ func Xsqlite3PagerJournalSizeLimit(tls *libc.TLS, pPager uintptr, iLimit I64) I6 // in backup.c maintains the content of this variable. This module // uses it opaquely as an argument to sqlite3BackupRestart() and // sqlite3BackupUpdate() only. -func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60048:31: */ +func Xsqlite3PagerBackupPtr(tls *libc.TLS, pPager uintptr) uintptr { /* sqlite3.c:60050:31: */ return pPager + 92 } // Unless this is an in-memory or temporary database, clear the pager cache. -func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60056:21: */ +func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60058:21: */ if int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) == 0 { pager_reset(tls, pPager) @@ -37786,7 +37786,7 @@ func Xsqlite3PagerClearCache(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60056 // or wal_blocking_checkpoint() API functions. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60071:20: */ +func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:60073:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalCheckpoint(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, db, eMode, @@ -37803,13 +37803,13 @@ func Xsqlite3PagerCheckpoint(tls *libc.TLS, pPager uintptr, db uintptr, eMode in return rc } -func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60090:20: */ +func Xsqlite3PagerWalCallback(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60092:20: */ return Xsqlite3WalCallback(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } // Return true if the underlying VFS for the given pager supports the // primitives necessary for write-ahead logging. -func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60098:20: */ +func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60100:20: */ var pMethods uintptr = (*Sqlite3_file)(unsafe.Pointer((*Pager)(unsafe.Pointer(pPager)).Ffd)).FpMethods if (*Pager)(unsafe.Pointer(pPager)).FnoLock != 0 { return 0 @@ -37819,7 +37819,7 @@ func Xsqlite3PagerWalSupported(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3 // Attempt to take an exclusive lock on the database file. If a PENDING lock // is obtained instead, immediately release it. -func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60108:12: */ +func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60110:12: */ var rc int32 // Return code rc = pagerLockDb(tls, pPager, EXCLUSIVE_LOCK) @@ -37836,7 +37836,7 @@ func pagerExclusiveLock(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:6010 // exclusive-locking mode when this function is called, take an EXCLUSIVE // lock on the database file and use heap-memory to store the wal-index // in. Otherwise, use the normal shared-memory. -func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60128:12: */ +func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60130:12: */ var rc int32 = SQLITE_OK // If the pager is already in exclusive-mode, the WAL module will use @@ -37872,7 +37872,7 @@ func pagerOpenWal(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60128:12: // If the pager is open on a temp-file (or in-memory database), or if // the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK // without doing anything. -func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60173:20: */ +func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { /* sqlite3.c:60175:20: */ var rc int32 = SQLITE_OK // Return code if !(int32((*Pager)(unsafe.Pointer(pPager)).FtempFile) != 0) && !(int32((*Pager)(unsafe.Pointer(pPager)).FpWal) != 0) { @@ -37902,7 +37902,7 @@ func Xsqlite3PagerOpenWal(tls *libc.TLS, pPager uintptr, pbOpen uintptr) int32 { // EXCLUSIVE lock on the database file. If this cannot be obtained, an // error (SQLITE_BUSY) is returned and the log connection is not closed. // If successful, the EXCLUSIVE lock is not released before returning. -func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60212:20: */ +func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* sqlite3.c:60214:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -37916,7 +37916,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* rc = pagerLockDb(tls, pPager, SHARED_LOCK) if rc == SQLITE_OK { rc = Xsqlite3OsAccess(tls, - (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, SQLITE_ACCESS_EXISTS, bp /* &logexists */) + (*Pager)(unsafe.Pointer(pPager)).FpVfs, (*Pager)(unsafe.Pointer(pPager)).FzWal, SQLITE_ACCESS_EXISTS, bp) } if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { rc = pagerOpenWal(tls, pPager) @@ -37942,7 +37942,7 @@ func Xsqlite3PagerCloseWal(tls *libc.TLS, pPager uintptr, db uintptr) int32 { /* // If this is a WAL database, obtain a snapshot handle for the snapshot // currently open. Otherwise, return an error. -func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60281:20: */ +func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:60283:20: */ var rc int32 = SQLITE_ERROR if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotGet(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, ppSnapshot) @@ -37953,7 +37953,7 @@ func Xsqlite3PagerSnapshotGet(tls *libc.TLS, pPager uintptr, ppSnapshot uintptr) // If this is a WAL database, store a pointer to pSnapshot. Next time a // read transaction is opened, attempt to read from the snapshot it // identifies. If this is not a WAL database, return an error. -func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60294:20: */ +func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60296:20: */ var rc int32 = SQLITE_OK if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { Xsqlite3WalSnapshotOpen(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -37965,7 +37965,7 @@ func Xsqlite3PagerSnapshotOpen(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) // If this is a WAL database, call sqlite3WalSnapshotRecover(). If this // is not a WAL database, return an error. -func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60311:20: */ +func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqlite3.c:60313:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotRecover(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) @@ -37985,7 +37985,7 @@ func Xsqlite3PagerSnapshotRecover(tls *libc.TLS, pPager uintptr) int32 { /* sqli // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60333:20: */ +func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:60335:20: */ var rc int32 if (*Pager)(unsafe.Pointer(pPager)).FpWal != 0 { rc = Xsqlite3WalSnapshotCheck(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal, pSnapshot) @@ -37997,7 +37997,7 @@ func Xsqlite3PagerSnapshotCheck(tls *libc.TLS, pPager uintptr, pSnapshot uintptr // Release a lock obtained by an earlier successful call to // sqlite3PagerSnapshotCheck(). -func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60347:21: */ +func Xsqlite3PagerSnapshotUnlock(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:60349:21: */ Xsqlite3WalSnapshotUnlock(tls, (*Pager)(unsafe.Pointer(pPager)).FpWal) } @@ -38576,7 +38576,7 @@ type WalIndexHdr1 = struct { // byte. // Object declarations -type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:60675:28 */ +type WalIndexHdr = WalIndexHdr1 /* sqlite3.c:60677:28 */ type WalIterator1 = struct { FiPrior U32 FnSegment int32 @@ -38587,18 +38587,18 @@ type WalIterator1 = struct { FnEntry int32 FiZero int32 } -} /* sqlite3.c:60676:9 */ +} /* sqlite3.c:60678:9 */ -type WalIterator = WalIterator1 /* sqlite3.c:60676:28 */ +type WalIterator = WalIterator1 /* sqlite3.c:60678:28 */ type WalCkptInfo1 = struct { FnBackfill U32 FaReadMark [5]U32 FaLock [8]U8 FnBackfillAttempted U32 FnotUsed0 U32 -} /* sqlite3.c:60677:9 */ +} /* sqlite3.c:60679:9 */ -type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:60677:28 */ +type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:60679:28 */ // Candidate values for Wal.exclusiveMode. @@ -38606,7 +38606,7 @@ type WalCkptInfo = WalCkptInfo1 /* sqlite3.c:60677:28 */ // Each page of the wal-index mapping contains a hash-table made up of // an array of HASHTABLE_NSLOT elements of the following type. -type Ht_slot = U16 /* sqlite3.c:60932:13 */ +type Ht_slot = U16 /* sqlite3.c:60934:13 */ // This structure is used to implement an iterator that loops through // all frames in the WAL in database page order. Where two or more frames @@ -38627,7 +38627,7 @@ type WalSegment = struct { FaPgno uintptr FnEntry int32 FiZero int32 -} /* sqlite3.c:60676:9 */ +} /* sqlite3.c:60678:9 */ // Define the parameters of the hash tables in the wal-index file. There // is a hash-table following every HASHTABLE_NPAGE page numbers in the @@ -38658,7 +38658,7 @@ type WalSegment = struct { // (3) rc==SQLITE_OK and *ppPage==NULL // only if iPage==0 // // Scenario (3) can only occur when pWal->writeLock is false and iPage==0 -func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61003:28: */ +func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61005:28: */ var rc int32 = SQLITE_OK // Enlarge the pWal->apWiData[] array if required @@ -38704,7 +38704,7 @@ func walIndexPageRealloc(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintpt return rc } -func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61052:12: */ +func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int32 { /* sqlite3.c:61054:12: */ if (*Wal)(unsafe.Pointer(pWal)).FnWiData <= iPage || libc.AssignPtrUintptr(ppPage, *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPage)*4))) == uintptr(0) { return walIndexPageRealloc(tls, pWal, iPage, ppPage) } @@ -38712,13 +38712,13 @@ func walIndexPage(tls *libc.TLS, pWal uintptr, iPage int32, ppPage uintptr) int3 } // Return a pointer to the WalCkptInfo structure in the wal-index. -func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61066:29: */ +func walCkptInfo(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61068:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + 24*4 } // Return a pointer to the WalIndexHdr structure in the wal-index. -func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61074:29: */ +func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61076:29: */ return *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) } @@ -38736,7 +38736,7 @@ func walIndexHdr(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:61074:29: * // The checksum is written back into aOut[] before returning. // // nByte must be a positive multiple of 8. -func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61100:13: */ +func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, aIn uintptr, aOut uintptr) { /* sqlite3.c:61102:13: */ var s1 U32 var s2 U32 var aData uintptr = a @@ -38768,7 +38768,7 @@ func walChecksumBytes(tls *libc.TLS, nativeCksum int32, a uintptr, nByte int32, // If there is the possibility of concurrent access to the SHM file // from multiple threads and/or processes, then do a memory barrier. -func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61143:13: */ +func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61145:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) != WAL_HEAPMEMORY_MODE { Xsqlite3OsShmBarrier(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd) } @@ -38783,7 +38783,7 @@ func walShmBarrier(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61143:13: */ // Write the header information in pWal->hdr into the wal-index. // // The checksum on pWal->hdr is updated before it is written. -func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61167:28: */ +func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61169:28: */ var aHdr uintptr = walIndexHdr(tls, pWal) var nCksum int32 = int32(uintptr(0) + 40) @@ -38807,7 +38807,7 @@ func walIndexWriteHdr(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61167:28: */ // 12: Salt-2 (copied from the wal-header) // 16: Checksum-1. // 20: Checksum-2. -func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61194:13: */ +func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData uintptr, aFrame uintptr) { /* sqlite3.c:61196:13: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 52 + 24 @@ -38830,7 +38830,7 @@ func walEncodeFrame(tls *libc.TLS, pWal uintptr, iPage U32, nTruncate U32, aData // Check to see if the frame with header in aFrame[] and content // in aData[] is valid. If it is a valid frame, fill *piPage and // *pnTruncate and return true. Return if the frame is not valid. -func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61225:12: */ +func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uintptr, aData uintptr, aFrame uintptr) int32 { /* sqlite3.c:61227:12: */ var nativeCksum int32 // True for native byte-order checksums var aCksum uintptr = pWal + 52 + 24 var pgno U32 // Page number of the frame @@ -38872,7 +38872,7 @@ func walDecodeFrame(tls *libc.TLS, pWal uintptr, piPage uintptr, pnTruncate uint // through the unlocked state first. // // In locking_mode=EXCLUSIVE, all of these routines become no-ops. -func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61304:12: */ +func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite3.c:61306:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -38883,7 +38883,7 @@ func walLockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) int32 { /* sqlite return rc } -func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61314:13: */ +func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c:61316:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -38892,7 +38892,7 @@ func walUnlockShared(tls *libc.TLS, pWal uintptr, lockIdx int32) { /* sqlite3.c: } -func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61320:12: */ +func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:61322:12: */ var rc int32 if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return SQLITE_OK @@ -38903,7 +38903,7 @@ func walLockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) int32 return rc } -func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61330:13: */ +func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { /* sqlite3.c:61332:13: */ if (*Wal)(unsafe.Pointer(pWal)).FexclusiveMode != 0 { return } @@ -38915,12 +38915,12 @@ func walUnlockExclusive(tls *libc.TLS, pWal uintptr, lockIdx int32, n int32) { / // Compute a hash on a page number. The resulting hash value must land // between 0 and (HASHTABLE_NSLOT-1). The walHashNext() function advances // the hash to the next value in the event of a collision. -func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61343:12: */ +func walHash(tls *libc.TLS, iPage U32) int32 { /* sqlite3.c:61345:12: */ return int32(iPage * U32(HASHTABLE_HASH_1) & U32(HASHTABLE_NPAGE*2-1)) } -func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61348:12: */ +func walNextHash(tls *libc.TLS, iPriorHash int32) int32 { /* sqlite3.c:61350:12: */ return (iPriorHash + 1) & (HASHTABLE_NPAGE*2 - 1) } @@ -38931,12 +38931,12 @@ type WalHashLoc1 = struct { FaHash uintptr FaPgno uintptr FiZero U32 -} /* sqlite3.c:61357:9 */ +} /* sqlite3.c:61359:9 */ // An instance of the WalHashLoc object is used to describe the location // of a page hash table in the wal-index. This becomes the return value // from walHashGet(). -type WalHashLoc = WalHashLoc1 /* sqlite3.c:61357:27 */ +type WalHashLoc = WalHashLoc1 /* sqlite3.c:61359:27 */ // Return pointers to the hash table and page number array stored on // page iHash of the wal-index. The wal-index is broken into 32KB pages @@ -38950,7 +38950,7 @@ type WalHashLoc = WalHashLoc1 /* sqlite3.c:61357:27 */ // // Finally, set pLoc->aPgno so that pLoc->aPgno[0] is the page number of the // first frame indexed by the hash table, frame (pLoc->iZero). -func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61378:12: */ +func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { /* sqlite3.c:61380:12: */ var rc int32 // Return code rc = walIndexPage(tls, pWal, iHash, pLoc+4) @@ -38973,14 +38973,14 @@ func walHashGet(tls *libc.TLS, pWal uintptr, iHash int32, pLoc uintptr) int32 { // and page-number array that contain entries corresponding to WAL frame // iFrame. The wal-index is broken up into 32KB pages. Wal-index pages // are numbered starting from 0. -func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61408:12: */ +func walFramePage(tls *libc.TLS, iFrame U32) int32 { /* sqlite3.c:61410:12: */ var iHash int32 = int32((iFrame + U32(HASHTABLE_NPAGE) - (uint32(HASHTABLE_NPAGE) - (uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0)))) - U32(1)) / U32(HASHTABLE_NPAGE)) return iHash } // Return the page number associated with frame iFrame in this WAL. -func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61423:12: */ +func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61425:12: */ var iHash int32 = walFramePage(tls, iFrame) if iHash == 0 { return *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData)) + uintptr((uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0)))+iFrame-uint32(1))*4)) @@ -38998,7 +38998,7 @@ func walFramePgno(tls *libc.TLS, pWal uintptr, iFrame U32) U32 { /* sqlite3.c:61 // updated. Any later hash tables will be automatically cleared when // pWal->hdr.mxFrame advances to the point where those hash tables are // actually needed. -func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61443:13: */ +func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61445:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -39016,7 +39016,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61443:13: */ // the entry that corresponds to frame pWal->hdr.mxFrame. It is guaranteed // that the page said hash-table and array reside on is already mapped.(1) - i = walHashGet(tls, pWal, walFramePage(tls, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame), bp /* &sLoc */) + i = walHashGet(tls, pWal, walFramePage(tls, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame), bp) if i != 0 { return } // Defense-in-depth, in case (1) above is wrong @@ -39041,7 +39041,7 @@ func walCleanupHash(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:61443:13: */ // Set an entry in the wal-index that will map database page number // pPage into WAL frame iFrame. -func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:61505:12: */ +func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { /* sqlite3.c:61507:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -39049,7 +39049,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // var sLoc WalHashLoc at bp, 12 // Wal-index hash table location - rc = walHashGet(tls, pWal, walFramePage(tls, iFrame), bp /* &sLoc */) + rc = walHashGet(tls, pWal, walFramePage(tls, iFrame), bp) // Assuming the wal-index file was successfully mapped, populate the // page number array and hash table entry. @@ -39082,7 +39082,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { nCollide = idx for iKey = walHash(tls, iPage); *(*Ht_slot)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaHash + uintptr(iKey)*2)) != 0; iKey = walNextHash(tls, iKey) { if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 61545) + return Xsqlite3CorruptError(tls, 61547) } } *(*U32)(unsafe.Pointer((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno + uintptr(idx-1)*4)) = iPage @@ -39101,7 +39101,7 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // WAL_RECOVER_LOCK is also held so that other threads will know // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. -func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:61594:12: */ +func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:61596:12: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -39156,7 +39156,7 @@ __1: libc.Xmemset(tls, pWal+52, 0, uint32(unsafe.Sizeof(WalIndexHdr{}))) - rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+16 /* &nSize */) + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+16) if !(rc != SQLITE_OK) { goto __2 } @@ -39171,7 +39171,7 @@ __2: aFrame = uintptr(0) // Last frame in wal, based on nSize alone // Read in the WAL header. - rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+24 /* &aBuf[0] */, WAL_HDRSIZE, int64(0)) + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+24, WAL_HDRSIZE, int64(0)) if !(rc != SQLITE_OK) { goto __4 } @@ -39201,7 +39201,7 @@ __5: // Verify that the WAL header checksum is correct walChecksumBytes(tls, libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == SQLITE_BIGENDIAN), - bp+24 /* &aBuf[0] */, WAL_HDRSIZE-2*4, uintptr(0), pWal+52+24) + bp+24, WAL_HDRSIZE-2*4, uintptr(0), pWal+52+24) if !(*(*U32)(unsafe.Pointer(pWal + 52 + 24)) != Xsqlite3Get4byte(tls, bp+24+24) || *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) != Xsqlite3Get4byte(tls, bp+24+28)) { goto __6 @@ -39216,7 +39216,7 @@ __6: if !(version != U32(WAL_MAX_VERSION)) { goto __7 } - rc = Xsqlite3CantopenError(tls, 61677) + rc = Xsqlite3CantopenError(tls, 61679) goto finished __7: ; @@ -39253,7 +39253,7 @@ __9: } return uint32(HASHTABLE_NPAGE) - (uint32(unsafe.Sizeof(WalIndexHdr{}))*uint32(2)+uint32(unsafe.Sizeof(WalCkptInfo{})))/uint32(unsafe.Sizeof(U32(0))) + (iPg-U32(1))*U32(HASHTABLE_NPAGE) }() - rc = walIndexPage(tls, pWal, int32(iPg), bp+56 /* &aShare */) + rc = walIndexPage(tls, pWal, int32(iPg), bp+56) if !(*(*uintptr)(unsafe.Pointer(bp + 56)) == uintptr(0)) { goto __12 @@ -39278,7 +39278,7 @@ __13: goto __15 __16: ; - isValid = walDecodeFrame(tls, pWal, bp+60 /* &pgno */, bp+64 /* &nTruncate */, aData, aFrame) + isValid = walDecodeFrame(tls, pWal, bp+60, bp+64, aData, aFrame) if !!(isValid != 0) { goto __17 } @@ -39301,8 +39301,8 @@ __18: (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage = *(*U32)(unsafe.Pointer(bp + 64 /* nTruncate */)) (*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage = U16(szPage&0xff00 | szPage>>16) - *(*U32)(unsafe.Pointer(bp + 68 /* &aFrameCksum[0] */)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24)) - *(*U32)(unsafe.Pointer(bp + 68 /* &aFrameCksum[0] */ + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) + *(*U32)(unsafe.Pointer(bp + 68)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24)) + *(*U32)(unsafe.Pointer(bp + 68 + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) __19: ; goto __14 @@ -39350,8 +39350,8 @@ finished: if !(rc == SQLITE_OK) { goto __21 } - *(*U32)(unsafe.Pointer(pWal + 52 + 24)) = *(*U32)(unsafe.Pointer(bp + 68 /* &aFrameCksum[0] */)) - *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 68 /* &aFrameCksum[0] */ + 1*4)) + *(*U32)(unsafe.Pointer(pWal + 52 + 24)) = *(*U32)(unsafe.Pointer(bp + 68)) + *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 68 + 1*4)) walIndexWriteHdr(tls, pWal) // Reset the checkpoint-header. This is safe because this thread is @@ -39406,7 +39406,7 @@ __24: goto __30 } Xsqlite3_log(tls, SQLITE_NOTICE|int32(1)<<8, - ts+3890, /* "recovered %d fra..." */ + ts+3912, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) __30: ; @@ -39420,7 +39420,7 @@ recovery_error: } // Close an open wal-index. -func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:61817:13: */ +func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:61819:13: */ if int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE || (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { var i int32 for i = 0; i < (*Wal)(unsafe.Pointer(pWal)).FnWiData; i++ { @@ -39446,7 +39446,7 @@ func walIndexClose(tls *libc.TLS, pWal uintptr, isDelete int32) { /* sqlite3.c:6 // If the log file is successfully opened, SQLITE_OK is returned and // *ppWal is set to point to a new WAL handle. If an error occurs, // an SQLite error code is returned and *ppWal is left unmodified. -func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:61845:20: */ +func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintptr, bNoShm int32, mxWalSize I64, ppWal uintptr) int32 { /* sqlite3.c:61847:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -39494,7 +39494,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt // Open file handle on the write-ahead log file. *(*int32)(unsafe.Pointer(bp /* flags */)) = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_WAL - rc = Xsqlite3OsOpen(tls, pVfs, zWalName, (*Wal)(unsafe.Pointer(pRet)).FpWalFd, *(*int32)(unsafe.Pointer(bp /* flags */)), bp /* &flags */) + rc = Xsqlite3OsOpen(tls, pVfs, zWalName, (*Wal)(unsafe.Pointer(pRet)).FpWalFd, *(*int32)(unsafe.Pointer(bp /* flags */)), bp) if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp))&SQLITE_OPEN_READONLY != 0 { (*Wal)(unsafe.Pointer(pRet)).FreadOnly = U8(WAL_RDONLY) } @@ -39518,7 +39518,7 @@ func Xsqlite3WalOpen(tls *libc.TLS, pVfs uintptr, pDbFd uintptr, zWalName uintpt } // Change the size to which the WAL file is trucated on each reset. -func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:61948:21: */ +func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:61950:21: */ if pWal != 0 { (*Wal)(unsafe.Pointer(pWal)).FmxWalSize = iLimit } @@ -39532,7 +39532,7 @@ func Xsqlite3WalLimit(tls *libc.TLS, pWal uintptr, iLimit I64) { /* sqlite3.c:61 // // Return 0 on success. If there are no pages in the WAL with a page // number larger than *piPage, then return 1. -func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:61962:12: */ +func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) int32 { /* sqlite3.c:61964:12: */ var iMin U32 // Result pgno must be greater than iMin var iRet U32 = 0xFFFFFFFF // 0xffffffff is never a valid page number var i int32 // For looping through segments @@ -39579,7 +39579,7 @@ func walIteratorNext(tls *libc.TLS, p uintptr, piPage uintptr, piFrame uintptr) // aLeft[X]!=aRight[Y] && aContent[aLeft[X]] == aContent[aRight[Y]] // // When that happens, omit the aLeft[X] and use the aRight[Y] index. -func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62015:13: */ +func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRight uintptr, pnRight uintptr, aTmp uintptr) { /* sqlite3.c:62017:13: */ var iLeft int32 = 0 // Current index in aLeft var iRight int32 = 0 // Current index in aRight var iOut int32 = 0 // Current index in output buffer @@ -39625,7 +39625,7 @@ func walMerge(tls *libc.TLS, aContent uintptr, aLeft uintptr, nLeft int32, paRig // // Keep the larger of the two values aList[X] and aList[Y] and discard // the smaller. -func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62072:13: */ +func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintptr, pnList uintptr) { /* sqlite3.c:62074:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -39637,7 +39637,7 @@ func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintpt // var aSub [13]Sublist at bp, 104 // Array of sub-lists - libc.Xmemset(tls, bp /* &aSub[0] */, 0, uint32(unsafe.Sizeof([13]Sublist{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([13]Sublist{}))) for iList = 0; iList < nList; iList++ { *(*int32)(unsafe.Pointer(bp + 108 /* nMerge */)) = 1 @@ -39647,10 +39647,10 @@ func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintpt p = bp + uintptr(iSub)*8 - walMerge(tls, aContent, (*Sublist)(unsafe.Pointer(p)).FaList, (*Sublist)(unsafe.Pointer(p)).FnList, bp+104 /* &aMerge */, bp+108 /* &nMerge */, aBuffer) + walMerge(tls, aContent, (*Sublist)(unsafe.Pointer(p)).FaList, (*Sublist)(unsafe.Pointer(p)).FnList, bp+104, bp+108, aBuffer) } - (*Sublist)(unsafe.Pointer(bp /* &aSub */ + uintptr(iSub)*8)).FaList = *(*uintptr)(unsafe.Pointer(bp + 104 /* aMerge */)) - (*Sublist)(unsafe.Pointer(bp /* &aSub */ + uintptr(iSub)*8)).FnList = *(*int32)(unsafe.Pointer(bp + 108 /* nMerge */)) + (*Sublist)(unsafe.Pointer(bp + uintptr(iSub)*8)).FaList = *(*uintptr)(unsafe.Pointer(bp + 104 /* aMerge */)) + (*Sublist)(unsafe.Pointer(bp + uintptr(iSub)*8)).FnList = *(*int32)(unsafe.Pointer(bp + 108 /* nMerge */)) } for iSub++; iSub < U32(int32(uint32(unsafe.Sizeof([13]Sublist{}))/uint32(unsafe.Sizeof(Sublist{})))); iSub++ { @@ -39659,7 +39659,7 @@ func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintpt p = bp + uintptr(iSub)*8 - walMerge(tls, aContent, (*Sublist)(unsafe.Pointer(p)).FaList, (*Sublist)(unsafe.Pointer(p)).FnList, bp+104 /* &aMerge */, bp+108 /* &nMerge */, aBuffer) + walMerge(tls, aContent, (*Sublist)(unsafe.Pointer(p)).FaList, (*Sublist)(unsafe.Pointer(p)).FnList, bp+104, bp+108, aBuffer) } } @@ -39670,10 +39670,10 @@ func walMergesort(tls *libc.TLS, aContent uintptr, aBuffer uintptr, aList uintpt type Sublist = struct { FnList int32 FaList uintptr -} /* sqlite3.c:62078:3 */ +} /* sqlite3.c:62080:3 */ // Free an iterator allocated by walIteratorInit(). -func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62135:13: */ +func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62137:13: */ Xsqlite3_free(tls, p) } @@ -39688,7 +39688,7 @@ func walIteratorFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:62135:13: */ // // The calling routine should invoke walIteratorFree() to destroy the // WalIterator object when it has finished with it. -func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62152:12: */ +func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int32 { /* sqlite3.c:62154:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -39733,7 +39733,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int for i = walFramePage(tls, nBackfill+U32(1)); rc == SQLITE_OK && i < nSegment; i++ { // var sLoc WalHashLoc at bp, 12 - rc = walHashGet(tls, pWal, i, bp /* &sLoc */) + rc = walHashGet(tls, pWal, i, bp) if rc == SQLITE_OK { var j int32 // Counter variable // var nEntry int32 at bp+12, 4 @@ -39751,7 +39751,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int for j = 0; j < *(*int32)(unsafe.Pointer(bp + 12 /* nEntry */)); j++ { *(*Ht_slot)(unsafe.Pointer(aIndex + uintptr(j)*2)) = Ht_slot(j) } - walMergesort(tls, (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno, aTmp, aIndex, bp+12 /* &nEntry */) + walMergesort(tls, (*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FaPgno, aTmp, aIndex, bp+12) (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*20)).FiZero = int32((*WalHashLoc)(unsafe.Pointer(bp /* &sLoc */)).FiZero) (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*20)).FnEntry = *(*int32)(unsafe.Pointer(bp + 12 /* nEntry */)) (*WalSegment)(unsafe.Pointer(p + 8 + uintptr(i)*20)).FaIndex = aIndex @@ -39772,7 +39772,7 @@ func walIteratorInit(tls *libc.TLS, pWal uintptr, nBackfill U32, pp uintptr) int // n. If the attempt fails and parameter xBusy is not NULL, then it is a // busy-handler function. Invoke it and retry the lock until either the // lock is successfully obtained or the busy-handler returns 0. -func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62315:12: */ +func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, lockIdx int32, n int32) int32 { /* sqlite3.c:62317:12: */ var rc int32 for ok := true; ok; ok = xBusy != 0 && rc == SQLITE_BUSY && (*struct { f func(*libc.TLS, uintptr) int32 @@ -39784,7 +39784,7 @@ func walBusyLock(tls *libc.TLS, pWal uintptr, xBusy uintptr, pBusyArg uintptr, l // The cache of the wal-index header must be valid to call this function. // Return the page-size in bytes used by the database. -func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62339:12: */ +func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62341:12: */ return int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16 } @@ -39803,7 +39803,7 @@ func walPagesize(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:62339:12: */ // The value of parameter salt1 is used as the aSalt[1] value in the // new wal-index header. It should be passed a pseudo-random value (i.e. // one obtained from sqlite3_randomness()). -func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62360:13: */ +func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62362:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*U32)(unsafe.Pointer(bp)) = salt1 @@ -39814,7 +39814,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62360: (*Wal)(unsafe.Pointer(pWal)).FnCkpt++ (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = U32(0) Xsqlite3Put4byte(tls, aSalt, U32(1)+Xsqlite3Get4byte(tls, aSalt)) - libc.Xmemcpy(tls, pWal+52+32+1*4, bp /* &salt1 */, uint32(4)) + libc.Xmemcpy(tls, pWal+52+32+1*4, bp, uint32(4)) walIndexWriteHdr(tls, pWal) libc.AtomicStoreNInt32(pInfo, int32(0), 0) (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfillAttempted = U32(0) @@ -39854,7 +39854,7 @@ func walRestartHdr(tls *libc.TLS, pWal uintptr, salt1 U32) { /* sqlite3.c:62360: // The caller must be holding sufficient locks to ensure that no other // checkpoint is running (in any other thread or process) at the same // time. -func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62407:12: */ +func walCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, zBuf uintptr) int32 { /* sqlite3.c:62409:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -39951,7 +39951,7 @@ __4: if !((*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill < mxSafeFrame) { goto __10 } - rc = walIteratorInit(tls, pWal, (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill, bp /* &pIter */) + rc = walIteratorInit(tls, pWal, (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill, bp) __10: ; @@ -39974,7 +39974,7 @@ __10: } *(*I64)(unsafe.Pointer(bp + 12 /* nReq */)) = I64(mxPage) * I64(szPage) // Current size of database file Xsqlite3OsFileControl(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_CKPT_START, uintptr(0)) - rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, bp+4 /* &nSize */) + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, bp+4) if !(rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 4)) < *(*I64)(unsafe.Pointer(bp + 12))) { goto __13 } @@ -39985,10 +39985,10 @@ __10: // database plus the amount of data in the wal file, plus the // maximum size of the pending-byte page (65536 bytes), then // must be corruption somewhere. - rc = Xsqlite3CorruptError(tls, 62491) + rc = Xsqlite3CorruptError(tls, 62493) goto __15 __14: - Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+12 /* &nReq */) + Xsqlite3OsFileControlHint(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_SIZE_HINT, bp+12) __15: ; __13: @@ -40103,7 +40103,7 @@ __28: if !(eMode >= SQLITE_CHECKPOINT_RESTART) { goto __30 } - Xsqlite3_randomness(tls, 4, bp+28 /* &salt1 */) + Xsqlite3_randomness(tls, 4, bp+28) rc = walBusyLock(tls, pWal, xBusy, pBusyArg, 3+1, SQLITE_SHM_NLOCK-3-1) if !(rc == SQLITE_OK) { @@ -40146,7 +40146,7 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. -func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:62593:13: */ +func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:62595:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -40154,18 +40154,18 @@ func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:62593:13 var rx int32 Xsqlite3BeginBenignMalloc(tls) - rx = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+8 /* &sz */) + rx = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+8) if rx == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 8)) > nMax { rx = Xsqlite3OsTruncate(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, nMax) } Xsqlite3EndBenignMalloc(tls) if rx != 0 { - Xsqlite3_log(tls, rx, ts+3927 /* "cannot limit WAL..." */, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) + Xsqlite3_log(tls, rx, ts+3949, libc.VaList(bp, (*Wal)(unsafe.Pointer(pWal)).FzWalName)) } } // Close a connection to a log file. -func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:62610:20: */ +func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:62612:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40190,7 +40190,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, if rc == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* bPersist */)) = -1 Xsqlite3OsFileControlHint(tls, - (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_PERSIST_WAL, bp /* &bPersist */) + (*Wal)(unsafe.Pointer(pWal)).FpDbFd, SQLITE_FCNTL_PERSIST_WAL, bp) if *(*int32)(unsafe.Pointer(bp)) != 1 { // Try to delete the WAL file if the checkpoint completed and // fsyned (rc==SQLITE_OK) and if we are not in persistent-wal @@ -40237,7 +40237,7 @@ func Xsqlite3WalClose(tls *libc.TLS, pWal uintptr, db uintptr, sync_flags int32, // // If the checksum cannot be verified return non-zero. If the header // is read successfully and the checksum verified, return zero. -func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62691:27: */ +func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62693:27: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -40267,9 +40267,9 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // shared among multiple processes and not all mutex implementions work // reliably in that environment. libc.AtomicStoreUintptr(&aHdr, uintptr(walIndexHdr(tls, pWal))) - libc.Xmemcpy(tls, bp /* &h1 */, aHdr, uint32(unsafe.Sizeof(WalIndexHdr{}))) // Possible TSAN false-positive + libc.Xmemcpy(tls, bp, aHdr, uint32(unsafe.Sizeof(WalIndexHdr{}))) // Possible TSAN false-positive walShmBarrier(tls, pWal) - libc.Xmemcpy(tls, bp+48 /* &h2 */, aHdr+1*48, uint32(unsafe.Sizeof(WalIndexHdr{}))) + libc.Xmemcpy(tls, bp+48, aHdr+1*48, uint32(unsafe.Sizeof(WalIndexHdr{}))) if libc.Xmemcmp(tls, bp, bp+48, uint32(unsafe.Sizeof(WalIndexHdr{}))) != 0 { return 1 // Dirty read @@ -40277,14 +40277,14 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq if int32((*WalIndexHdr)(unsafe.Pointer(bp)).FisInit) == 0 { return 1 // Malformed header - probably all zeros } - walChecksumBytes(tls, 1, bp /* &h1 */, int32(uint32(unsafe.Sizeof(WalIndexHdr{}))-uint32(unsafe.Sizeof([2]U32{}))), uintptr(0), bp+96 /* &aCksum[0] */) + walChecksumBytes(tls, 1, bp, int32(uint32(unsafe.Sizeof(WalIndexHdr{}))-uint32(unsafe.Sizeof([2]U32{}))), uintptr(0), bp+96) if *(*U32)(unsafe.Pointer(bp + 96)) != *(*U32)(unsafe.Pointer(bp + 40)) || *(*U32)(unsafe.Pointer(bp + 96 + 1*4)) != *(*U32)(unsafe.Pointer(bp + 40 + 1*4)) { return 1 // Checksum does not match } if libc.Xmemcmp(tls, pWal+52, bp, uint32(unsafe.Sizeof(WalIndexHdr{}))) != 0 { *(*int32)(unsafe.Pointer(pChanged)) = 1 - libc.Xmemcpy(tls, pWal+52, bp /* &h1 */, uint32(unsafe.Sizeof(WalIndexHdr{}))) + libc.Xmemcpy(tls, pWal+52, bp, uint32(unsafe.Sizeof(WalIndexHdr{}))) (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0xfe00 + int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)&0x0001<<16) } @@ -40306,7 +40306,7 @@ func walIndexTryHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sq // // If the wal-index header is successfully read, return SQLITE_OK. // Otherwise an SQLite error code. -func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62761:12: */ +func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62763:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -40318,7 +40318,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // Ensure that page 0 of the wal-index (the page that contains the // wal-index header) is mapped. Return early if an error occurs here. - rc = walIndexPage(tls, pWal, 0, bp /* &page0 */) + rc = walIndexPage(tls, pWal, 0, bp) if rc != SQLITE_OK { // READONLY changed to OK in walIndexPage if rc == SQLITE_READONLY|int32(5)<<8 { @@ -40386,7 +40386,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // sure the wal-index was not constructed with some future format that // this version of SQLite cannot understand. if badHdr == 0 && (*Wal)(unsafe.Pointer(pWal)).Fhdr.FiVersion != U32(WALINDEX_MAX_VERSION) { - rc = Xsqlite3CantopenError(tls, 62840) + rc = Xsqlite3CantopenError(tls, 62842) } if (*Wal)(unsafe.Pointer(pWal)).FbShmUnreliable != 0 { if rc != SQLITE_OK { @@ -40431,7 +40431,7 @@ func walIndexReadHdr(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* s // beginning (including attempting to map the *-shm file). // // If an error occurs, an SQLite error code is returned. -func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62885:12: */ +func walBeginShmUnreliable(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:62887:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -40494,7 +40494,7 @@ __1: // even if some external agent does a "chmod" to make the shared-memory // writable by us, until sqlite3OsShmUnmap() has been called. // This is a requirement on the VFS implementation. - rc = Xsqlite3OsShmMap(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, 0, int32(uint32(unsafe.Sizeof(Ht_slot(0)))*uint32(HASHTABLE_NPAGE*2)+uint32(HASHTABLE_NPAGE)*uint32(unsafe.Sizeof(U32(0)))), 0, bp /* &pDummy */) + rc = Xsqlite3OsShmMap(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, 0, int32(uint32(unsafe.Sizeof(Ht_slot(0)))*uint32(HASHTABLE_NPAGE*2)+uint32(HASHTABLE_NPAGE)*uint32(unsafe.Sizeof(U32(0)))), 0, bp) // SQLITE_OK not possible for read-only connection if !(rc != SQLITE_READONLY|int32(5)<<8) { goto __3 @@ -40516,7 +40516,7 @@ __3: // Make sure some writer hasn't come in and changed the WAL file out // from under us, then disconnected, while we were not looking. - rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+4 /* &szWal */) + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+4) if !(rc != SQLITE_OK) { goto __4 } @@ -40544,7 +40544,7 @@ __5: ; // Check the salt keys at the start of the wal file still match. - rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+12 /* &aBuf[0] */, WAL_HDRSIZE, int64(0)) + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+12, WAL_HDRSIZE, int64(0)) if !(rc != SQLITE_OK) { goto __6 } @@ -40578,8 +40578,8 @@ __8: // wal file since the heap-memory wal-index was created. If so, the // heap-memory wal-index is discarded and WAL_RETRY returned to // the caller. - *(*U32)(unsafe.Pointer(bp + 44 /* &aSaveCksum[0] */)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24)) - *(*U32)(unsafe.Pointer(bp + 44 /* &aSaveCksum[0] */ + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) + *(*U32)(unsafe.Pointer(bp + 44)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24)) + *(*U32)(unsafe.Pointer(bp + 44 + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) iOffset = int64(WAL_HDRSIZE) + I64((*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame+U32(1)-U32(1))*I64(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage)+WAL_FRAME_HDRSIZE) __9: if !(iOffset+I64(szFrame) <= *(*I64)(unsafe.Pointer(bp + 4))) { @@ -40618,8 +40618,8 @@ __10: goto __11 __11: ; - *(*U32)(unsafe.Pointer(pWal + 52 + 24)) = *(*U32)(unsafe.Pointer(bp + 44 /* &aSaveCksum[0] */)) - *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 44 /* &aSaveCksum[0] */ + 1*4)) + *(*U32)(unsafe.Pointer(pWal + 52 + 24)) = *(*U32)(unsafe.Pointer(bp + 44)) + *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 44 + 1*4)) begin_unreliable_shm_out: Xsqlite3_free(tls, aFrame) @@ -40696,7 +40696,7 @@ __15: // update values of the aReadMark[] array in the header, but if it does // so it takes care to hold an exclusive lock on the corresponding // WAL_READ_LOCK() while changing values. -func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63080:12: */ +func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32, cnt int32) int32 { /* sqlite3.c:63082:12: */ var pInfo uintptr // Checkpoint information in wal-index var mxReadMark U32 // Largest aReadMark[] value var mxI int32 // Index of largest aReadMark[] value @@ -40913,7 +40913,7 @@ func walTryBeginRead(tls *libc.TLS, pWal uintptr, pChanged uintptr, useWal int32 // SQLITE_OK is returned if successful, or an SQLite error code if an // error occurs. It is not an error if nBackfillAttempted cannot be // decreased at all. -func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63310:20: */ +func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63312:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -40926,7 +40926,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // var szDb I64 at bp, 8 // Size of db file in bytes - rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, bp /* &szDb */) + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, bp) if rc == SQLITE_OK { var pBuf1 uintptr = Xsqlite3_malloc(tls, szPage) var pBuf2 uintptr = Xsqlite3_malloc(tls, szPage) @@ -40941,7 +40941,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. var iDbOff I64 // Offset of db file entry var iWalOff I64 // Offset of wal file entry - rc = walHashGet(tls, pWal, walFramePage(tls, i), bp+8 /* &sLoc */) + rc = walHashGet(tls, pWal, walFramePage(tls, i), bp+8) if rc != SQLITE_OK { break } @@ -40987,7 +40987,7 @@ func Xsqlite3WalSnapshotRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3. // transaction, then *pChanged is set to 1 before returning. The // Pager layer will use this to know that its cache is stale and // needs to be flushed. -func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63381:20: */ +func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintptr) int32 { /* sqlite3.c:63383:20: */ var rc int32 // Return code var cnt int32 = 0 // Number of TryBeginRead attempts var bChanged int32 = 0 @@ -41075,7 +41075,7 @@ func Xsqlite3WalBeginReadTransaction(tls *libc.TLS, pWal uintptr, pChanged uintp // Finish with a read transaction. All this does is release the // read-lock. -func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:63489:21: */ +func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:63491:21: */ Xsqlite3WalEndWriteTransaction(tls, pWal) if int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { walUnlockShared(tls, pWal, 3+int32((*Wal)(unsafe.Pointer(pWal)).FreadLock)) @@ -41089,7 +41089,7 @@ func Xsqlite3WalEndReadTransaction(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:6 // // Return SQLITE_OK if successful, or an error code if an error occurs. If an // error does occur, the final value of *piRead is undefined. -func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:63505:20: */ +func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr) int32 { /* sqlite3.c:63507:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -41143,7 +41143,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr var rc int32 // Error code var iH U32 - rc = walHashGet(tls, pWal, iHash, bp /* &sLoc */) + rc = walHashGet(tls, pWal, iHash, bp) if rc != SQLITE_OK { return rc } @@ -41156,7 +41156,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr iRead = iFrame } if libc.PostDecInt32(&nCollide, 1) == 0 { - return Xsqlite3CorruptError(tls, 63575) + return Xsqlite3CorruptError(tls, 63577) } iKey = walNextHash(tls, iKey) } @@ -41172,7 +41172,7 @@ func Xsqlite3WalFindFrame(tls *libc.TLS, pWal uintptr, pgno Pgno, piRead uintptr // Read the contents of frame iRead from the wal file into buffer pOut // (which is nOut bytes in size). Return SQLITE_OK if successful, or an // error code otherwise. -func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:63609:20: */ +func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pOut uintptr) int32 { /* sqlite3.c:63611:20: */ var sz int32 var iOffset I64 sz = int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage) @@ -41189,7 +41189,7 @@ func Xsqlite3WalReadFrame(tls *libc.TLS, pWal uintptr, iRead U32, nOut int32, pO } // Return the size of the database in pages (or zero, if unknown). -func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:63629:21: */ +func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:63631:21: */ if pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FreadLock) >= 0 { return (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage } @@ -41207,7 +41207,7 @@ func Xsqlite3WalDbsize(tls *libc.TLS, pWal uintptr) Pgno { /* sqlite3.c:63629:21 // returns SQLITE_BUSY in that case and no write transaction is started. // // There can only be a single writer active at a time. -func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63650:20: */ +func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63652:20: */ var rc int32 // Cannot start a write transaction without first holding a read @@ -41239,7 +41239,7 @@ func Xsqlite3WalBeginWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sq // End a write transaction. The commit has already been done. This // routine merely releases the lock. -func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63698:20: */ +func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63700:20: */ if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { walUnlockExclusive(tls, pWal, WAL_WRITE_LOCK, 1) (*Wal)(unsafe.Pointer(pWal)).FwriteLock = U8(0) @@ -41259,7 +41259,7 @@ func Xsqlite3WalEndWriteTransaction(tls *libc.TLS, pWal uintptr) int32 { /* sqli // // Otherwise, if the callback function does not return an error, this // function returns SQLITE_OK. -func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:63720:20: */ +func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintptr) int32 { /* sqlite3.c:63722:20: */ var rc int32 = SQLITE_OK if (*Wal)(unsafe.Pointer(pWal)).FwriteLock != 0 { var iMax Pgno = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame @@ -41296,7 +41296,7 @@ func Xsqlite3WalUndo(tls *libc.TLS, pWal uintptr, xUndo uintptr, pUndoCtx uintpt // values. This function populates the array with values required to // "rollback" the write position of the WAL handle back to the current // point in the event of a savepoint rollback (via WalSavepointUndo()). -func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:63760:21: */ +func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sqlite3.c:63762:21: */ *(*U32)(unsafe.Pointer(aWalData)) = (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame *(*U32)(unsafe.Pointer(aWalData + 1*4)) = *(*U32)(unsafe.Pointer(pWal + 52 + 24)) @@ -41308,7 +41308,7 @@ func Xsqlite3WalSavepoint(tls *libc.TLS, pWal uintptr, aWalData uintptr) { /* sq // the values in the aWalData[] array. aWalData must point to an array // of WAL_SAVEPOINT_NDATA u32 values that has been previously populated // by a call to WalSavepoint(). -func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:63774:20: */ +func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int32 { /* sqlite3.c:63776:20: */ var rc int32 = SQLITE_OK if *(*U32)(unsafe.Pointer(aWalData + 3*4)) != (*Wal)(unsafe.Pointer(pWal)).FnCkpt { @@ -41339,7 +41339,7 @@ func Xsqlite3WalSavepointUndo(tls *libc.TLS, pWal uintptr, aWalData uintptr) int // SQLITE_OK is returned if no error is encountered (regardless of whether // or not pWal->hdr.mxFrame is modified). An SQLite error code is returned // if an error occurs. -func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63811:12: */ +func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63813:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -41352,7 +41352,7 @@ func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63811:12: * if (*WalCkptInfo)(unsafe.Pointer(pInfo)).FnBackfill > U32(0) { // var salt1 U32 at bp, 4 - Xsqlite3_randomness(tls, 4, bp /* &salt1 */) + Xsqlite3_randomness(tls, 4, bp) rc = walLockExclusive(tls, pWal, 3+1, SQLITE_SHM_NLOCK-3-1) if rc == SQLITE_OK { // If all readers are using WAL_READ_LOCK(0) (in other words if no @@ -41376,7 +41376,7 @@ func walRestartLog(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:63811:12: * for ok := true; ok; ok = rc == -1 { // var notUsed int32 at bp+4, 4 - rc = walTryBeginRead(tls, pWal, bp+4 /* ¬Used */, 1, libc.PreIncInt32(&cnt, 1)) + rc = walTryBeginRead(tls, pWal, bp+4, 1, libc.PreIncInt32(&cnt, 1)) } // BUSY not possible when useWal==1 @@ -41393,12 +41393,12 @@ type WalWriter1 = struct { FiSyncPoint Sqlite3_int64 FsyncFlags int32 FszPage int32 -} /* sqlite3.c:63858:9 */ +} /* sqlite3.c:63860:9 */ // Information about the current state of the WAL file and where // the next fsync should occur - passed from sqlite3WalFrames() into // walWriteToLog(). -type WalWriter = WalWriter1 /* sqlite3.c:63864:3 */ +type WalWriter = WalWriter1 /* sqlite3.c:63866:3 */ // Write iAmt bytes of content into the WAL file beginning at iOffset. // Do a sync when crossing the p->iSyncPoint boundary. @@ -41406,7 +41406,7 @@ type WalWriter = WalWriter1 /* sqlite3.c:63864:3 */ // In other words, if iSyncPoint is in between iOffset and iOffset+iAmt, // first write the part before iSyncPoint, then sync, then write the // rest. -func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:63874:12: */ +func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:63876:12: */ var rc int32 if iOffset < (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint && iOffset+Sqlite3_int64(iAmt) >= (*WalWriter)(unsafe.Pointer(p)).FiSyncPoint { var iFirstAmt int32 = int32((*WalWriter)(unsafe.Pointer(p)).FiSyncPoint - iOffset) @@ -41428,7 +41428,7 @@ func walWriteToLog(tls *libc.TLS, p uintptr, pContent uintptr, iAmt int32, iOffs } // Write out a single frame of the WAL -func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:63899:12: */ +func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, iOffset Sqlite3_int64) int32 { /* sqlite3.c:63901:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41437,8 +41437,8 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // var aFrame [24]U8 at bp, 24 // Buffer to assemble frame-header in pData = (*PgHdr)(unsafe.Pointer(pPage)).FpData - walEncodeFrame(tls, (*WalWriter)(unsafe.Pointer(p)).FpWal, (*PgHdr)(unsafe.Pointer(pPage)).Fpgno, uint32(nTruncate), pData, bp /* &aFrame[0] */) - rc = walWriteToLog(tls, p, bp /* &aFrame[0] */, int32(unsafe.Sizeof([24]U8{})), iOffset) + walEncodeFrame(tls, (*WalWriter)(unsafe.Pointer(p)).FpWal, (*PgHdr)(unsafe.Pointer(pPage)).Fpgno, uint32(nTruncate), pData, bp) + rc = walWriteToLog(tls, p, bp, int32(unsafe.Sizeof([24]U8{})), iOffset) if rc != 0 { return rc } @@ -41453,7 +41453,7 @@ func walWriteOneFrame(tls *libc.TLS, p uintptr, pPage uintptr, nTruncate int32, // with the earliest to have been overwritten. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:63925:12: */ +func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqlite3.c:63927:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -41496,8 +41496,8 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli iPgno = Xsqlite3Get4byte(tls, aBuf) nDbSize = Xsqlite3Get4byte(tls, aBuf+4) - walEncodeFrame(tls, pWal, iPgno, nDbSize, aBuf+24, bp /* &aFrame[0] */) - rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp /* &aFrame[0] */, int32(unsafe.Sizeof([24]U8{})), iOff) + walEncodeFrame(tls, pWal, iPgno, nDbSize, aBuf+24, bp) + rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp, int32(unsafe.Sizeof([24]U8{})), iOff) } } @@ -41507,7 +41507,7 @@ func walRewriteChecksums(tls *libc.TLS, pWal uintptr, iLast U32) int32 { /* sqli // Write a set of frames to the log. The caller must hold the write-lock // on the log file (obtained using sqlite3WalBeginWriteTransaction()). -func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:63974:20: */ +func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, nTruncate Pgno, isCommit int32, sync_flags int32) int32 { /* sqlite3.c:63976:20: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -41555,17 +41555,17 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, Xsqlite3_randomness(tls, 8, pWal+52+32) } libc.Xmemcpy(tls, bp+16, pWal+52+32, uint32(8)) - walChecksumBytes(tls, 1, bp /* &aWalHdr[0] */, WAL_HDRSIZE-2*4, uintptr(0), bp+32 /* &aCksum[0] */) - Xsqlite3Put4byte(tls, bp+24, *(*U32)(unsafe.Pointer(bp + 32 /* &aCksum[0] */))) - Xsqlite3Put4byte(tls, bp+28, *(*U32)(unsafe.Pointer(bp + 32 /* &aCksum[0] */ + 1*4))) + walChecksumBytes(tls, 1, bp, WAL_HDRSIZE-2*4, uintptr(0), bp+32) + Xsqlite3Put4byte(tls, bp+24, *(*U32)(unsafe.Pointer(bp + 32))) + Xsqlite3Put4byte(tls, bp+28, *(*U32)(unsafe.Pointer(bp + 32 + 1*4))) (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(szPage) (*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum = U8(SQLITE_BIGENDIAN) - *(*U32)(unsafe.Pointer(pWal + 52 + 24)) = *(*U32)(unsafe.Pointer(bp + 32 /* &aCksum[0] */)) - *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 32 /* &aCksum[0] */ + 1*4)) + *(*U32)(unsafe.Pointer(pWal + 52 + 24)) = *(*U32)(unsafe.Pointer(bp + 32)) + *(*U32)(unsafe.Pointer(pWal + 52 + 24 + 1*4)) = *(*U32)(unsafe.Pointer(bp + 32 + 1*4)) (*Wal)(unsafe.Pointer(pWal)).FtruncateOnCommit = U8(1) - rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp /* &aWalHdr[0] */, int32(unsafe.Sizeof([32]U8{})), int64(0)) + rc = Xsqlite3OsWrite(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp, int32(unsafe.Sizeof([32]U8{})), int64(0)) if rc != SQLITE_OK { return rc @@ -41604,7 +41604,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // checksums must be recomputed when the transaction is committed. if iFirst != 0 && ((*PgHdr)(unsafe.Pointer(p)).FpDirty != 0 || isCommit == 0) { *(*U32)(unsafe.Pointer(bp + 40 /* iWrite */)) = U32(0) - Xsqlite3WalFindFrame(tls, pWal, (*PgHdr)(unsafe.Pointer(p)).Fpgno, bp+40 /* &iWrite */) + Xsqlite3WalFindFrame(tls, pWal, (*PgHdr)(unsafe.Pointer(p)).Fpgno, bp+40) if *(*U32)(unsafe.Pointer(bp + 40)) >= iFirst { var iOff I64 = int64(WAL_HDRSIZE) + I64(*(*U32)(unsafe.Pointer(bp + 40))-U32(1))*I64(szPage+WAL_FRAME_HDRSIZE) + int64(WAL_FRAME_HDRSIZE) @@ -41629,7 +41629,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, } else { nDbSize = 0 } - rc = walWriteOneFrame(tls, bp+44 /* &w */, p, nDbSize, iOffset) + rc = walWriteOneFrame(tls, bp+44, p, nDbSize, iOffset) if rc != 0 { return rc } @@ -41667,7 +41667,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, bSync = libc.Bool32((*WalWriter)(unsafe.Pointer(bp+44)).FiSyncPoint == iOffset) for iOffset < (*WalWriter)(unsafe.Pointer(bp+44)).FiSyncPoint { - rc = walWriteOneFrame(tls, bp+44 /* &w */, pLast, int32(nTruncate), iOffset) + rc = walWriteOneFrame(tls, bp+44, pLast, int32(nTruncate), iOffset) if rc != 0 { return rc } @@ -41740,7 +41740,7 @@ func Xsqlite3WalFrames(tls *libc.TLS, pWal uintptr, szPage int32, pList uintptr, // // If parameter xBusy is not NULL, it is a pointer to a busy-handler // callback. In this case this function runs a blocking checkpoint. -func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64212:20: */ +func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, xBusy uintptr, pBusyArg uintptr, sync_flags int32, nBuf int32, zBuf uintptr, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:64214:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -41794,7 +41794,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // Read the wal-index header. if rc == SQLITE_OK { - rc = walIndexReadHdr(tls, pWal, bp /* &isChanged */) + rc = walIndexReadHdr(tls, pWal, bp) if *(*int32)(unsafe.Pointer(bp)) != 0 && (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FpDbFd)).FpMethods)).FiVersion >= 3 { Xsqlite3OsUnfetch(tls, (*Wal)(unsafe.Pointer(pWal)).FpDbFd, int64(0), uintptr(0)) @@ -41805,7 +41805,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, if rc == SQLITE_OK { if (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame != 0 && walPagesize(tls, pWal) != nBuf { - rc = Xsqlite3CorruptError(tls, 64294) + rc = Xsqlite3CorruptError(tls, 64296) } else { rc = walCheckpoint(tls, pWal, db, eMode2, xBusy2, pBusyArg, sync_flags, zBuf) } @@ -41849,7 +41849,7 @@ func Xsqlite3WalCheckpoint(tls *libc.TLS, pWal uintptr, db uintptr, eMode int32, // number of frames in the WAL at the point of the last commit since // sqlite3WalCallback() was called. If no commits have occurred since // the last call, then return 0. -func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64337:20: */ +func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64339:20: */ var ret U32 = U32(0) if pWal != 0 { ret = (*Wal)(unsafe.Pointer(pWal)).FiCallback @@ -41880,7 +41880,7 @@ func Xsqlite3WalCallback(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64337 // not actually change anything. The pager uses this to see if it // should acquire the database exclusive lock prior to invoking // the op==1 case. -func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64370:20: */ +func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* sqlite3.c:64372:20: */ var rc int32 // pWal->readLock is usually set, but might be -1 if there was a @@ -41914,14 +41914,14 @@ func Xsqlite3WalExclusiveMode(tls *libc.TLS, pWal uintptr, op int32) int32 { /* // Return true if the argument is non-NULL and the WAL module is using // heap-memory for the wal-index. Otherwise, if the argument is NULL or the // WAL module is using shared-memory, return false. -func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64412:20: */ +func Xsqlite3WalHeapMemory(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:64414:20: */ return libc.Bool32(pWal != 0 && int32((*Wal)(unsafe.Pointer(pWal)).FexclusiveMode) == WAL_HEAPMEMORY_MODE) } // Create a snapshot object. The content of a snapshot is opaque to // every other subsystem, so the WAL module can put whatever it needs // in the object. -func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64421:20: */ +func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:64423:20: */ var rc int32 = SQLITE_OK var pRet uintptr @@ -41940,16 +41940,16 @@ func Xsqlite3WalSnapshotGet(tls *libc.TLS, pWal uintptr, ppSnapshot uintptr) int return rc } -var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64424:20 */ +var aZero = [4]U32{U32(0), U32(0), U32(0), U32(0)} /* sqlite3.c:64426:20 */ // Try to open on pSnapshot when the next read-transaction starts -func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:64445:21: */ +func Xsqlite3WalSnapshotOpen(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) { /* sqlite3.c:64447:21: */ (*Wal)(unsafe.Pointer(pWal)).FpSnapshot = pSnapshot } // Return a +ve value if snapshot p1 is newer than p2. A -ve value if // p1 is older than p2 and zero if p1 and p2 are the same snapshot. -func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:64456:16: */ +func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:64458:16: */ var pHdr1 uintptr = p1 var pHdr2 uintptr = p2 @@ -41979,7 +41979,7 @@ func Xsqlite3_snapshot_cmp(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sql // the CHECKPOINTER lock cannot be obtained, SQLITE_BUSY. If any error // occurs (any value other than SQLITE_OK is returned), the CHECKPOINTER // lock is released before returning. -func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:64480:20: */ +func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:64482:20: */ var rc int32 rc = walLockShared(tls, pWal, WAL_CKPT_LOCK) if rc == SQLITE_OK { @@ -41995,13 +41995,13 @@ func Xsqlite3WalSnapshotCheck(tls *libc.TLS, pWal uintptr, pSnapshot uintptr) in // Release a lock obtained by an earlier successful call to // sqlite3WalSnapshotCheck(). -func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64499:21: */ +func Xsqlite3WalSnapshotUnlock(tls *libc.TLS, pWal uintptr) { /* sqlite3.c:64501:21: */ walUnlockShared(tls, pWal, WAL_CKPT_LOCK) } // Return the sqlite3_file object for the WAL file -func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:64521:29: */ +func Xsqlite3WalFile(tls *libc.TLS, pWal uintptr) uintptr { /* sqlite3.c:64523:29: */ return (*Wal)(unsafe.Pointer(pWal)).FpWalFd } @@ -42521,7 +42521,7 @@ type MemPage1 = struct { // small cells will be rare, but they are possible. // Forward declarations -type MemPage = MemPage1 /* sqlite3.c:64779:24 */ +type MemPage = MemPage1 /* sqlite3.c:64781:24 */ type BtLock1 = struct { FpBtree uintptr FiTable Pgno @@ -42530,7 +42530,7 @@ type BtLock1 = struct { FpNext uintptr } /* sqlite3.c:578:9 */ -type BtLock = BtLock1 /* sqlite3.c:64780:23 */ +type BtLock = BtLock1 /* sqlite3.c:64782:23 */ type CellInfo1 = struct { FnKey I64 FpPayload uintptr @@ -42539,7 +42539,7 @@ type CellInfo1 = struct { FnSize U16 } /* sqlite3.c:578:9 */ -type CellInfo = CellInfo1 /* sqlite3.c:64781:25 */ +type CellInfo = CellInfo1 /* sqlite3.c:64783:25 */ // Legal values for BtCursor.curFlags @@ -42649,7 +42649,7 @@ type IntegrityCk1 = struct { FerrMsg StrAccum Fheap uintptr Fdb uintptr -} /* sqlite3.c:65238:9 */ +} /* sqlite3.c:65240:9 */ // Legal values for BtCursor.curFlags @@ -42745,7 +42745,7 @@ type IntegrityCk1 = struct { // the database the corresponding bit is set. This allows integrity-check to // detect pages that are used twice and orphaned pages (both of which // indicate corruption). -type IntegrityCk = IntegrityCk1 /* sqlite3.c:65238:28 */ +type IntegrityCk = IntegrityCk1 /* sqlite3.c:65240:28 */ // Routines to read or write a two- and four-byte big-endian integer values. @@ -42759,7 +42759,7 @@ type IntegrityCk = IntegrityCk1 /* sqlite3.c:65238:28 */ // Obtain the BtShared mutex associated with B-Tree handle p. Also, // set BtShared.db to the database handle associated with p and the // p->locked boolean to true. -func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65288:13: */ +func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65290:13: */ Xsqlite3_mutex_enter(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fmutex) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).Fdb = (*Btree)(unsafe.Pointer(p)).Fdb @@ -42768,7 +42768,7 @@ func lockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65288:13: */ // Release the BtShared mutex associated with B-Tree handle p and // clear the p->locked boolean. -func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65302:29: */ +func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65304:29: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3_mutex_leave(tls, (*BtShared)(unsafe.Pointer(pBt)).Fmutex) @@ -42789,7 +42789,7 @@ func unlockBtreeMutex(tls *libc.TLS, p uintptr) { /* sqlite3.c:65302:29: */ // p, then first unlock all of the others on p->pNext, then wait // for the lock to become available on p, then relock all of the // subsequent Btrees that desire a lock. -func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65332:21: */ +func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65334:21: */ // Some basic sanity checking on the Btree. The list of Btrees // connected by pNext and pPrev should be in sorted order by // Btree.pBt value. All elements of the list should belong to @@ -42817,7 +42817,7 @@ func Xsqlite3BtreeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:65332:21: */ // into this routine, we avoid unnecessary stack pointer changes // and thus help the sqlite3BtreeLock() routine to run much faster // in the common case. -func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65366:29: */ +func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65368:29: */ var pLater uintptr // In most cases, we should be able to acquire the lock we @@ -42848,7 +42848,7 @@ func btreeLockCarefully(tls *libc.TLS, p uintptr) { /* sqlite3.c:65366:29: */ } // Exit the recursive mutex on a Btree. -func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65404:21: */ +func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65406:21: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -42871,7 +42871,7 @@ func Xsqlite3BtreeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:65404:21: */ // to avoid the possibility of deadlock when two threads with // two or more btrees in common both try to lock all their btrees // at the same instant. -func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65447:29: */ +func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65449:29: */ var i int32 var skipOk int32 = 1 var p uintptr @@ -42886,13 +42886,13 @@ func btreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65447:29: */ (*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache = U8(skipOk) } -func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65461:21: */ +func Xsqlite3BtreeEnterAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65463:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeEnterAll(tls, db) } } -func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65464:29: */ +func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65466:29: */ var i int32 var p uintptr @@ -42904,7 +42904,7 @@ func btreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65464:29: */ } } -func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65473:21: */ +func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65475:21: */ if int32((*Sqlite3)(unsafe.Pointer(db)).FnoSharedCache) == 0 { btreeLeaveAll(tls, db) } @@ -42915,11 +42915,11 @@ func Xsqlite3BtreeLeaveAll(tls *libc.TLS, db uintptr) { /* sqlite3.c:65473:21: * // These entry points are used by incremental I/O only. Enter() is required // any time OMIT_SHARED_CACHE is not defined, regardless of whether or not // the build is threadsafe. Leave() is only required by threadsafe builds. -func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65559:21: */ +func Xsqlite3BtreeEnterCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65561:21: */ Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } -func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65563:21: */ +func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65565:21: */ Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) } @@ -42942,7 +42942,7 @@ func Xsqlite3BtreeLeaveCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:65563: // The header string that appears at the beginning of every // SQLite database. -var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3953 /* "SQLite format 3" */)) /* sqlite3.c:65594:19 */ +var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3975)) /* sqlite3.c:65596:19 */ // Set this global variable to 1 to enable tracing using the TRACE // macro. @@ -42968,14 +42968,14 @@ var zMagicHeader = *(*[16]int8)(unsafe.Pointer(ts + 3953 /* "SQLite format 3" */ // test builds. // // Access to this variable is protected by SQLITE_MUTEX_STATIC_MAIN. -var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:65649:17 */ +var sqlite3SharedCacheList uintptr = uintptr(0) /* sqlite3.c:65651:17 */ // Enable or disable the shared pager and schema features. // // This routine has no effect on existing database connections. // The shared cache setting effects only future calls to // sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2(). -func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:65661:16: */ +func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite3.c:65663:16: */ Xsqlite3Config.FsharedCacheEnabled = enable return SQLITE_OK } @@ -42992,7 +42992,7 @@ func Xsqlite3_enable_shared_cache(tls *libc.TLS, enable int32) int32 { /* sqlite // (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return // SQLITE_OK if the lock may be obtained (by calling // setSharedCacheTableLock()), or SQLITE_LOCKED if not. -func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:65860:12: */ +func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) int32 { /* sqlite3.c:65862:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pIter uintptr @@ -43049,7 +43049,7 @@ func querySharedCacheTableLock(tls *libc.TLS, p uintptr, iTab Pgno, eLock U8) in // // SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM // is returned if a malloc attempt fails. -func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:65932:12: */ +func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) int32 { /* sqlite3.c:65934:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pLock uintptr = uintptr(0) var pIter uintptr @@ -43100,7 +43100,7 @@ func setSharedCacheTableLock(tls *libc.TLS, p uintptr, iTable Pgno, eLock U8) in // This function assumes that Btree p has an open read or write // transaction. If it does not, then the BTS_PENDING flag // may be incorrectly cleared. -func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:65996:13: */ +func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:65998:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var ppIter uintptr = pBt + 76 @@ -43135,7 +43135,7 @@ func clearAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:6599 } // This function changes all write-locks held by Btree p into read-locks. -func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66040:13: */ +func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c:66042:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if (*BtShared)(unsafe.Pointer(pBt)).FpWriter == p { var pLock uintptr @@ -43159,7 +43159,7 @@ func downgradeAllSharedCacheTableLocks(tls *libc.TLS, p uintptr) { /* sqlite3.c: // Invalidate the overflow page-list cache for all cursors opened // on the shared btree structure pBt. -func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66093:13: */ +func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66095:13: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43178,7 +43178,7 @@ func invalidateAllOverflowCache(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66093 // Otherwise, if argument isClearTable is false, then the row with // rowid iRow is being replaced or deleted. In this case invalidate // only those incrblob cursors open on that specific row. -func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66115:13: */ +func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRow I64, isClearTable int32) { /* sqlite3.c:66117:13: */ var p uintptr (*Btree)(unsafe.Pointer(pBtree)).FhasIncrblobCur = U8(0) @@ -43225,7 +43225,7 @@ func invalidateIncrblobCursors(tls *libc.TLS, pBtree uintptr, pgnoRoot Pgno, iRo // optimization 2 above is omitted if the corresponding bit is already // set in BtShared.pHasContent. The contents of the bitvec are cleared // at the end of every transaction. -func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66175:12: */ +func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66177:12: */ var rc int32 = SQLITE_OK if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpHasContent) != 0) { @@ -43245,20 +43245,20 @@ func btreeSetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite // This function is called when a free-list leaf page is removed from the // free-list for reuse. It returns false if it is safe to retrieve the // page from the pager layer with the 'no-content' flag set. True otherwise. -func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66197:12: */ +func btreeGetHasContent(tls *libc.TLS, pBt uintptr, pgno Pgno) int32 { /* sqlite3.c:66199:12: */ var p uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpHasContent return libc.Bool32(p != 0 && (pgno > Xsqlite3BitvecSize(tls, p) || Xsqlite3BitvecTestNotNull(tls, p, pgno) != 0)) } // Clear (destroy) the BtShared.pHasContent bitvec. This should be // invoked at the conclusion of each write-transaction. -func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66206:13: */ +func btreeClearHasContent(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:66208:13: */ Xsqlite3BitvecDestroy(tls, (*BtShared)(unsafe.Pointer(pBt)).FpHasContent) (*BtShared)(unsafe.Pointer(pBt)).FpHasContent = uintptr(0) } // Release all of the apPage[] pages for a cursor. -func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66214:13: */ +func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66216:13: */ var i int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= 0 { for i = 0; i < int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage); i++ { @@ -43280,7 +43280,7 @@ func btreeReleaseAllCursorPages(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:6621 // NULL. If the cursor is open on a non-intkey table, then pCur->pKey is // set to point to a malloced buffer pCur->nKey bytes in size containing // the key. -func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66238:12: */ +func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66240:12: */ var rc int32 = SQLITE_OK if (*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey != 0 { @@ -43317,7 +43317,7 @@ func saveCursorKey(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66238:12: * // // The caller must ensure that the cursor is valid (has eState==CURSOR_VALID) // prior to calling this routine. -func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66280:12: */ +func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66282:12: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FcurFlags)&BTCF_Pinned != 0 { @@ -43358,7 +43358,7 @@ func saveCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66280: // Implementation note: This routine merely checks to see if any cursors // need to be saved. It calls out to saveCursorsOnList() in the (unusual) // event that cursors are in need to being saved. -func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66330:12: */ +func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66332:12: */ var p uintptr for p = (*BtShared)(unsafe.Pointer(pBt)).FpCursor; p != 0; p = (*BtCursor)(unsafe.Pointer(p)).FpNext { @@ -43379,7 +43379,7 @@ func saveAllCursors(tls *libc.TLS, pBt uintptr, iRoot Pgno, pExcept uintptr) int // the cursors if and when a cursor is found that actually requires saving. // The common case is that no cursors need to be saved, so this routine is // broken out from its caller to avoid unnecessary stack pointer movement. -func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66347:28: */ +func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) int32 { /* sqlite3.c:66349:28: */ for ok := true; ok; ok = p != 0 { if p != pExcept && (Pgno(0) == iRoot || (*BtCursor)(unsafe.Pointer(p)).FpgnoRoot == iRoot) { if int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_VALID || int32((*BtCursor)(unsafe.Pointer(p)).FeState) == CURSOR_SKIPNEXT { @@ -43398,7 +43398,7 @@ func saveCursorsOnList(tls *libc.TLS, p uintptr, iRoot Pgno, pExcept uintptr) in } // Clear the current cursor position. -func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66372:21: */ +func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66374:21: */ Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) (*BtCursor)(unsafe.Pointer(pCur)).FpKey = uintptr(0) @@ -43408,7 +43408,7 @@ func Xsqlite3BtreeClearCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:66372: // In this version of BtreeMoveto, pKey is a packed index record // such as is generated by the OP_MakeRecord opcode. Unpack the // record and then call BtreeMovetoUnpacked() to do the work. -func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66384:12: */ +func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32, pRes uintptr) int32 { /* sqlite3.c:66386:12: */ var rc int32 // Status code var pIdxKey uintptr // Unpacked index key @@ -43421,7 +43421,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 } Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, int32(nKey), pKey, pIdxKey) if int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) == 0 || int32((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FnField) > int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnAllField) { - rc = Xsqlite3CorruptError(tls, 66401) + rc = Xsqlite3CorruptError(tls, 66403) } else { rc = Xsqlite3BtreeIndexMoveto(tls, pCur, pIdxKey, pRes) } @@ -43438,7 +43438,7 @@ func btreeMoveto(tls *libc.TLS, pCur uintptr, pKey uintptr, nKey I64, bias int32 // saved position info stored by saveCursorPosition(), so there can be // at most one effective restoreCursorPosition() call after each // saveCursorPosition(). -func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66420:12: */ +func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66422:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43452,7 +43452,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. if Xsqlite3FaultSim(tls, 410) != 0 { rc = SQLITE_IOERR } else { - rc = btreeMoveto(tls, pCur, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtCursor)(unsafe.Pointer(pCur)).FnKey, 0, bp /* &skipNext */) + rc = btreeMoveto(tls, pCur, (*BtCursor)(unsafe.Pointer(pCur)).FpKey, (*BtCursor)(unsafe.Pointer(pCur)).FnKey, 0, bp) } if rc == SQLITE_OK { Xsqlite3_free(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpKey) @@ -43478,7 +43478,7 @@ func btreeRestoreCursorPosition(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3. // // Use the separate sqlite3BtreeCursorRestore() routine to restore a cursor // back to where it ought to be if this routine returns true. -func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66463:20: */ +func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:66465:20: */ return libc.Bool32(CURSOR_VALID != int32(*(*U8)(unsafe.Pointer(pCur)))) } @@ -43486,12 +43486,12 @@ func Xsqlite3BtreeCursorHasMoved(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3 // Return a pointer to a fake BtCursor object that will always answer // false to the sqlite3BtreeCursorHasMoved() routine above. The fake // cursor returned must not be used with any other Btree interface. -func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:66476:25: */ +func Xsqlite3BtreeFakeValidCursor(tls *libc.TLS) uintptr { /* sqlite3.c:66478:25: */ return uintptr(unsafe.Pointer(&fakeCursor)) } -var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:66477:13 */ +var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:66479:13 */ // This routine restores a cursor back to its original position after it // has been moved by some outside activity (such as a btree rebalance or @@ -43504,7 +43504,7 @@ var fakeCursor U8 = U8(CURSOR_VALID) /* sqlite3.c:66477:13 */ // // This routine should only be called for a cursor that just returned // TRUE from sqlite3BtreeCursorHasMoved(). -func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:66495:20: */ +func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintptr) int32 { /* sqlite3.c:66497:20: */ var rc int32 rc = func() int32 { @@ -43526,7 +43526,7 @@ func Xsqlite3BtreeCursorRestore(tls *libc.TLS, pCur uintptr, pDifferentRow uintp } // Provide flag hints to the cursor. -func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:66527:21: */ +func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sqlite3.c:66529:21: */ (*BtCursor)(unsafe.Pointer(pCur)).Fhints = U8(x) } @@ -43538,7 +43538,7 @@ func Xsqlite3BtreeCursorHintFlags(tls *libc.TLS, pCur uintptr, x uint32) { /* sq // Return 0 (not a valid page) for pgno==1 since there is // no pointer map associated with page 1. The integrity_check logic // requires that ptrmapPageno(*,1)!=1. -func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:66543:13: */ +func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:66545:13: */ var nPagesPerMapPage int32 var iPtrMap Pgno var ret Pgno @@ -43563,7 +43563,7 @@ func ptrmapPageno(tls *libc.TLS, pBt uintptr, pgno Pgno) Pgno { /* sqlite3.c:665 // If *pRC is initially non-zero (non-SQLITE_OK) then this routine is // a no-op. If an error occurs, the appropriate error code is written // into *pRC. -func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:66567:13: */ +func ptrmapPut(tls *libc.TLS, pBt uintptr, key Pgno, eType U8, parent Pgno, pRC uintptr) { /* sqlite3.c:66569:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43586,12 +43586,12 @@ __1: if !(key == Pgno(0)) { goto __2 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66582) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66584) return __2: ; iPtrmap = ptrmapPageno(tls, pBt, key) - rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, iPtrmap, bp /* &pDbPage */, 0) + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, iPtrmap, bp, 0) if !(rc != SQLITE_OK) { goto __3 } @@ -43605,7 +43605,7 @@ __3: // The first byte of the extra data is the MemPage.isInit byte. // If that byte is set, it means this page is also being used // as a btree page. - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66595) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66597) goto ptrmap_exit __4: ; @@ -43613,7 +43613,7 @@ __4: if !(offset < 0) { goto __5 } - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66600) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66602) goto ptrmap_exit __5: ; @@ -43644,7 +43644,7 @@ ptrmap_exit: // This routine retrieves the pointer map entry for page 'key', writing // the type and parent page number to *pEType and *pPgno respectively. // An error code is returned if something goes wrong, otherwise SQLITE_OK. -func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:66626:12: */ +func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintptr) int32 { /* sqlite3.c:66628:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -43656,7 +43656,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp var rc int32 iPtrmap = int32(ptrmapPageno(tls, pBt, key)) - rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, uint32(iPtrmap), bp /* &pDbPage */, 0) + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, uint32(iPtrmap), bp, 0) if rc != 0 { return rc } @@ -43665,7 +43665,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp offset = int32(Pgno(5) * (key - Pgno(iPtrmap) - Pgno(1))) if offset < 0 { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) - return Xsqlite3CorruptError(tls, 66645) + return Xsqlite3CorruptError(tls, 66647) } *(*U8)(unsafe.Pointer(pEType)) = *(*U8)(unsafe.Pointer(pPtrmap + uintptr(offset))) @@ -43675,7 +43675,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pDbPage */))) if int32(*(*U8)(unsafe.Pointer(pEType))) < 1 || int32(*(*U8)(unsafe.Pointer(pEType))) > 5 { - return Xsqlite3CorruptError(tls, 66653) + return Xsqlite3CorruptError(tls, 66655) } return SQLITE_OK } @@ -43693,7 +43693,7 @@ func ptrmapGet(tls *libc.TLS, pBt uintptr, key Pgno, pEType uintptr, pPgno uintp // btreeParseCellPtrIndex() for the case when the cell does not fit entirely // on a single B-tree page. Make necessary adjustments to the CellInfo // structure. -func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66685:29: */ +func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66687:29: */ // If the payload will not fit completely on the local page, we have // to decide how much to store locally and how much to spill onto // overflow pages. The strategy is to minimize the amount of unused @@ -43720,7 +43720,7 @@ func btreeParseCellAdjustSizeForOverflow(tls *libc.TLS, pPage uintptr, pCell uin // Given a record with nPayload bytes of payload stored within btree // page pPage, return the number of bytes of payload stored locally. -func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:66720:12: */ +func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* sqlite3.c:66722:12: */ var maxLocal int32 // Maximum amount of payload held locally maxLocal = int32((*MemPage)(unsafe.Pointer(pPage)).FmaxLocal) if nPayload <= I64(maxLocal) { @@ -43750,7 +43750,7 @@ func btreePayloadToLocal(tls *libc.TLS, pPage uintptr, nPayload I64) int32 { /* // There is also a wrapper function btreeParseCell() that works for // all MemPage types and that references the cell by index rather than // by pointer. -func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66748:13: */ +func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66750:13: */ _ = pPage (*CellInfo)(unsafe.Pointer(pInfo)).FnSize = U16(4 + int32(Xsqlite3GetVarint(tls, pCell+4, pInfo))) @@ -43760,7 +43760,7 @@ func btreeParseCellPtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr, pIn return } -func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66765:13: */ +func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66767:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -43808,7 +43808,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } pIter++ - (*CellInfo)(unsafe.Pointer(pInfo)).FnKey = *(*I64)(unsafe.Pointer(bp /* &iKey */)) + (*CellInfo)(unsafe.Pointer(pInfo)).FnKey = *(*I64)(unsafe.Pointer(bp)) (*CellInfo)(unsafe.Pointer(pInfo)).FnPayload = nPayload (*CellInfo)(unsafe.Pointer(pInfo)).FpPayload = pIter @@ -43825,7 +43825,7 @@ func btreeParseCellPtr(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt } } -func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66833:13: */ +func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) { /* sqlite3.c:66835:13: */ var pIter uintptr // For scanning through pCell var nPayload U32 // Number of bytes of cell payload @@ -43856,7 +43856,7 @@ func btreeParseCellPtrIndex(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo u } } -func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:66870:13: */ +func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { /* sqlite3.c:66872:13: */ (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCell)))))), pInfo) @@ -43872,7 +43872,7 @@ func btreeParseCell(tls *libc.TLS, pPage uintptr, iCell int32, pInfo uintptr) { // // cellSizePtrNoPayload() => table internal nodes // cellSizePtr() => all index nodes & table leaf nodes -func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:66890:12: */ +func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:66892:12: */ var pIter uintptr = pCell + uintptr((*MemPage)(unsafe.Pointer(pPage)).FchildPtrSize) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint var nSize U32 // Size value to return @@ -43913,7 +43913,7 @@ func cellSizePtr(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c return U16(nSize) } -func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:66938:12: */ +func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* sqlite3.c:66940:12: */ var pIter uintptr = pCell + uintptr(4) // For looping over bytes of pCell var pEnd uintptr // End mark for a varint @@ -43930,7 +43930,7 @@ func cellSizePtrNoPayload(tls *libc.TLS, pPage uintptr, pCell uintptr) U16 { /* // of pPage. (pSrc and pPager are often the same.) If pCell contains a // pointer to an overflow page, insert an entry into the pointer-map for // the overflow page that will be valid after pCell has been moved to pPage. -func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:66976:13: */ +func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, pRC uintptr) { /* sqlite3.c:66978:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -43947,7 +43947,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, var ovfl Pgno if Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) >= Uptr(pCell) && Uptr((*MemPage)(unsafe.Pointer(pSrc)).FaDataEnd) < Uptr(pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnLocal)) { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66985) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 66987) return } ovfl = Xsqlite3Get4byte(tls, pCell+uintptr(int32((*CellInfo)(unsafe.Pointer(bp)).FnSize)-4)) @@ -43965,7 +43965,7 @@ func ptrmapPutOvflPtr(tls *libc.TLS, pPage uintptr, pSrc uintptr, pCell uintptr, // b-tree page so that there are no freeblocks or fragment bytes, all // unused bytes are contained in the unallocated space region, and all // cells are packed tightly at the end of the page. -func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67007:12: */ +func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sqlite3.c:67009:12: */ var i int32 // Loop counter var pc int32 // Address of the i-th cell var hdr int32 // Offset to the page header @@ -44010,7 +44010,7 @@ func defragmentPage(tls *libc.TLS, pPage uintptr, nMaxFrag int32) int32 { /* sql if !(iFree > usableSize-4) { goto __2 } - return Xsqlite3CorruptError(tls, 67044) + return Xsqlite3CorruptError(tls, 67046) __2: ; if !(iFree != 0) { @@ -44020,7 +44020,7 @@ __2: if !(iFree2 > usableSize-4) { goto __4 } - return Xsqlite3CorruptError(tls, 67047) + return Xsqlite3CorruptError(tls, 67049) __4: ; if !(0 == iFree2 || int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2)))) == 0 && int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+1)))) == 0) { @@ -44033,7 +44033,7 @@ __4: if !(top >= iFree) { goto __6 } - return Xsqlite3CorruptError(tls, 67055) + return Xsqlite3CorruptError(tls, 67057) __6: ; if !(iFree2 != 0) { @@ -44042,14 +44042,14 @@ __6: if !(iFree+sz > iFree2) { goto __9 } - return Xsqlite3CorruptError(tls, 67058) + return Xsqlite3CorruptError(tls, 67060) __9: ; sz2 = int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFree2+2) + 1))) if !(iFree2+sz2 > usableSize) { goto __10 } - return Xsqlite3CorruptError(tls, 67060) + return Xsqlite3CorruptError(tls, 67062) __10: ; libc.Xmemmove(tls, data+uintptr(iFree+sz+sz2), data+uintptr(iFree+sz), uint32(iFree2-(iFree+sz))) @@ -44059,7 +44059,7 @@ __7: if !(iFree+sz > usableSize) { goto __11 } - return Xsqlite3CorruptError(tls, 67064) + return Xsqlite3CorruptError(tls, 67066) __11: ; __8: @@ -44121,7 +44121,7 @@ __18: if !(pc < iCellStart || pc > iCellLast) { goto __21 } - return Xsqlite3CorruptError(tls, 67093) + return Xsqlite3CorruptError(tls, 67095) __21: ; @@ -44132,7 +44132,7 @@ __21: if !(cbrk < iCellStart || pc+size > usableSize) { goto __22 } - return Xsqlite3CorruptError(tls, 67099) + return Xsqlite3CorruptError(tls, 67101) __22: ; @@ -44167,7 +44167,7 @@ defragment_out: if !(int32(*(*uint8)(unsafe.Pointer(data + uintptr(hdr+7))))+cbrk-iCellFirst != (*MemPage)(unsafe.Pointer(pPage)).FnFree) { goto __25 } - return Xsqlite3CorruptError(tls, 67118) + return Xsqlite3CorruptError(tls, 67120) __25: ; @@ -44192,7 +44192,7 @@ __25: // Slots on the free list that are between 1 and 3 bytes larger than nByte // will be ignored if adding the extra space to the fragmentation count // causes the fragmentation count to exceed 60. -func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67143:11: */ +func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr { /* sqlite3.c:67145:11: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset to page header var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Page data var iAddr int32 = hdr + 1 // Address of ptr to pc @@ -44221,7 +44221,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr *(*U8)(unsafe.Pointer(aData + uintptr(hdr+7))) += U8(int32(U8(x))) } else if x+pc > maxPC { // This slot extends off the end of the usable part of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67172) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67174) return uintptr(0) } else { // The slot remains on the free-list. Reduce its size to account @@ -44236,14 +44236,14 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr if pc <= iAddr+size { if pc != 0 { // The next slot in the chain is not past the end of the current slot - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67186) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67188) } return uintptr(0) } } if pc > maxPC+nByte-4 { // The free slot chain extends off the end of the page - *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67193) + *(*int32)(unsafe.Pointer(pRc)) = Xsqlite3CorruptError(tls, 67195) } return uintptr(0) } @@ -44259,7 +44259,7 @@ func pageFindSlot(tls *libc.TLS, pPg uintptr, nByte int32, pRc uintptr) uintptr // the first two bytes past the cell pointer area since presumably this // allocation is being made in order to insert a new cell, so we will // also end up needing a new cell pointer. -func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67211:12: */ +func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int32 { /* sqlite3.c:67213:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44284,7 +44284,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 if top == 0 && (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize == U32(65536) { top = 65536 } else { - return Xsqlite3CorruptError(tls, 67240) + return Xsqlite3CorruptError(tls, 67242) } } @@ -44293,13 +44293,13 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // freelist looking for a slot big enough to satisfy the request. if (*(*U8)(unsafe.Pointer(data + uintptr(hdr+2))) != 0 || *(*U8)(unsafe.Pointer(data + uintptr(hdr+1))) != 0) && gap+2 <= top { - var pSpace uintptr = pageFindSlot(tls, pPage, nByte, bp /* &rc */) + var pSpace uintptr = pageFindSlot(tls, pPage, nByte, bp) if pSpace != 0 { var g2 int32 *(*int32)(unsafe.Pointer(pIdx)) = libc.AssignInt32(&g2, (int32(pSpace)-int32(data))/1) if g2 <= gap { - return Xsqlite3CorruptError(tls, 67258) + return Xsqlite3CorruptError(tls, 67260) } else { return SQLITE_OK } @@ -44350,7 +44350,7 @@ func allocateSpace(tls *libc.TLS, pPage uintptr, nByte int32, pIdx uintptr) int3 // does it detect cells or freeblocks that encrouch into the reserved bytes // at the end of the page. So do additional corruption checks inside this // routine and return SQLITE_CORRUPT if any problems are found. -func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67307:12: */ +func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* sqlite3.c:67309:12: */ var iPtr U16 // Address of ptr to next freeblock var iFreeBlk U16 // Address of the next freeblock var hdr U8 // Page header size. 0 or 100 @@ -44374,12 +44374,12 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if int32(iFreeBlk) == 0 { break } // TH3: corrupt082.100 - return Xsqlite3CorruptError(tls, 67336) + return Xsqlite3CorruptError(tls, 67338) } iPtr = iFreeBlk } if U32(iFreeBlk) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize-U32(4) { // TH3: corrupt081.100 - return Xsqlite3CorruptError(tls, 67341) + return Xsqlite3CorruptError(tls, 67343) } // At this point: @@ -44390,11 +44390,11 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s if iFreeBlk != 0 && iEnd+U32(3) >= U32(iFreeBlk) { nFrag = U8(U32(iFreeBlk) - iEnd) if iEnd > U32(iFreeBlk) { - return Xsqlite3CorruptError(tls, 67353) + return Xsqlite3CorruptError(tls, 67355) } iEnd = U32(int32(iFreeBlk) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iFreeBlk)+2) + 1))))) if iEnd > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - return Xsqlite3CorruptError(tls, 67356) + return Xsqlite3CorruptError(tls, 67358) } iSize = U16(iEnd - U32(iStart)) iFreeBlk = U16(int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(iFreeBlk) + 1)))) @@ -44407,7 +44407,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s var iPtrEnd int32 = int32(iPtr) + (int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2))))<<8 | int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(iPtr)+2) + 1)))) if iPtrEnd+3 >= int32(iStart) { if iPtrEnd > int32(iStart) { - return Xsqlite3CorruptError(tls, 67369) + return Xsqlite3CorruptError(tls, 67371) } nFrag = U8(int32(nFrag) + (int32(iStart) - iPtrEnd)) iSize = U16(iEnd - U32(iPtr)) @@ -44415,7 +44415,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s } } if int32(nFrag) > int32(*(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7)))) { - return Xsqlite3CorruptError(tls, 67375) + return Xsqlite3CorruptError(tls, 67377) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+7))) -= uint8(int32(nFrag)) } @@ -44425,10 +44425,10 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // so just extend the cell content area rather than create another // freelist entry if int32(iStart) < int32(x) { - return Xsqlite3CorruptError(tls, 67383) + return Xsqlite3CorruptError(tls, 67385) } if int32(iPtr) != int32(hdr)+1 { - return Xsqlite3CorruptError(tls, 67384) + return Xsqlite3CorruptError(tls, 67386) } *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1))) = U8(int32(iFreeBlk) >> 8) *(*uint8)(unsafe.Pointer(data + uintptr(int32(hdr)+1) + 1)) = U8(iFreeBlk) @@ -44462,7 +44462,7 @@ func freeSpace(tls *libc.TLS, pPage uintptr, iStart U16, iSize U16) int32 { /* s // PTF_ZERODATA | PTF_LEAF // PTF_LEAFDATA | PTF_INTKEY // PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF -func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67414:12: */ +func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite3.c:67416:12: */ var pBt uintptr // A copy of pPage->pBt (*MemPage)(unsafe.Pointer(pPage)).Fleaf = U8(flagByte >> 3) @@ -44513,7 +44513,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite } else { // EVIDENCE-OF: R-47608-56469 Any other value for the b-tree page type is // an error. - return Xsqlite3CorruptError(tls, 67457) + return Xsqlite3CorruptError(tls, 67459) } (*MemPage)(unsafe.Pointer(pPage)).Fmax1bytePayload = (*BtShared)(unsafe.Pointer(pBt)).Fmax1bytePayload return SQLITE_OK @@ -44521,7 +44521,7 @@ func decodeFlags(tls *libc.TLS, pPage uintptr, flagByte int32) int32 { /* sqlite // Compute the amount of freespace on the page. In other words, fill // in the pPage->nFree field. -func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67467:12: */ +func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67469:12: */ var pc int32 // Address of a freeblock within pPage->aData[] var hdr U8 // Offset to beginning of page header var data uintptr // Equal to pPage->aData @@ -44553,12 +44553,12 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67 if pc < top { // EVIDENCE-OF: R-55530-52930 In a well-formed b-tree page, there will // always be at least one cell before the first freeblock. - return Xsqlite3CorruptError(tls, 67508) + return Xsqlite3CorruptError(tls, 67510) } for 1 != 0 { if pc > iCellLast { // Freeblock off the end of the page - return Xsqlite3CorruptError(tls, 67513) + return Xsqlite3CorruptError(tls, 67515) } next = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc) + 1)))) size = U32(int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2))))<<8 | int32(*(*U8)(unsafe.Pointer(data + uintptr(pc+2) + 1)))) @@ -44570,11 +44570,11 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67 } if next > U32(0) { // Freeblock not in ascending order - return Xsqlite3CorruptError(tls, 67523) + return Xsqlite3CorruptError(tls, 67525) } if U32(pc)+size > uint32(usableSize) { // Last freeblock extends past page end - return Xsqlite3CorruptError(tls, 67527) + return Xsqlite3CorruptError(tls, 67529) } } @@ -44585,7 +44585,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67 // serves to verify that the offset to the start of the cell-content // area, according to the page header, lies within the page. if nFree > usableSize || nFree < iCellFirst { - return Xsqlite3CorruptError(tls, 67539) + return Xsqlite3CorruptError(tls, 67541) } (*MemPage)(unsafe.Pointer(pPage)).FnFree = int32(U16(nFree - iCellFirst)) return SQLITE_OK @@ -44593,7 +44593,7 @@ func btreeComputeFreeSpace(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67 // Do additional sanity check after btreeInitPage() if // PRAGMA cell_size_check=ON -func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67549:28: */ +func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67551:28: */ var iCellFirst int32 // First allowable cell or freeblock offset var iCellLast int32 // Last possible cell or freeblock offset var i int32 // Index into the cell pointer array @@ -44615,14 +44615,14 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67549 pc = int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer(data + uintptr(cellOffset+i*2))))) if pc < iCellFirst || pc > iCellLast { - return Xsqlite3CorruptError(tls, 67570) + return Xsqlite3CorruptError(tls, 67572) } sz = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxCellSize})).f(tls, pPage, data+uintptr(pc))) if pc+sz > usableSize { - return Xsqlite3CorruptError(tls, 67575) + return Xsqlite3CorruptError(tls, 67577) } } return SQLITE_OK @@ -44635,7 +44635,7 @@ func btreeCellSizeCheck(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67549 // SQLITE_CORRUPT. Note that a return of SQLITE_OK does not // guarantee that the page is well-formed. It only shows that // we failed to detect any corruption. -func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67590:12: */ +func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67592:12: */ var data uintptr // Equal to pPage->aData var pBt uintptr // The main btree structure @@ -44644,7 +44644,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67590:12: // EVIDENCE-OF: R-28594-02890 The one-byte flag at offset 0 indicating // the b-tree page type. if decodeFlags(tls, pPage, int32(*(*U8)(unsafe.Pointer(data)))) != 0 { - return Xsqlite3CorruptError(tls, 67607) + return Xsqlite3CorruptError(tls, 67609) } (*MemPage)(unsafe.Pointer(pPage)).FmaskPage = U16((*BtShared)(unsafe.Pointer(pBt)).FpageSize - U32(1)) @@ -44658,7 +44658,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67590:12: (*MemPage)(unsafe.Pointer(pPage)).FnCell = U16(int32(*(*U8)(unsafe.Pointer(data + 3)))<<8 | int32(*(*U8)(unsafe.Pointer(data + 3 + 1)))) if U32((*MemPage)(unsafe.Pointer(pPage)).FnCell) > ((*BtShared)(unsafe.Pointer(pBt)).FpageSize-U32(8))/U32(6) { // To many cells for a single page. The page must be corrupt - return Xsqlite3CorruptError(tls, 67621) + return Xsqlite3CorruptError(tls, 67623) } // EVIDENCE-OF: R-24089-57979 If a page contains no cells (which is only @@ -44676,7 +44676,7 @@ func btreeInitPage(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:67590:12: // Set up a raw page so that it looks like a database page holding // no entries. -func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:67643:13: */ +func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:67645:13: */ var data uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData var pBt uintptr = (*MemPage)(unsafe.Pointer(pPage)).FpBt var hdr U8 = (*MemPage)(unsafe.Pointer(pPage)).FhdrOffset @@ -44711,7 +44711,7 @@ func zeroPage(tls *libc.TLS, pPage uintptr, flags int32) { /* sqlite3.c:67643:13 // Convert a DbPage obtained from the pager into a MemPage used by // the btree layer. -func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:67680:16: */ +func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) uintptr { /* sqlite3.c:67682:16: */ var pPage uintptr = Xsqlite3PagerGetExtra(tls, pDbPage) if pgno != (*MemPage)(unsafe.Pointer(pPage)).Fpgno { (*MemPage)(unsafe.Pointer(pPage)).FaData = Xsqlite3PagerGetData(tls, pDbPage) @@ -44738,14 +44738,14 @@ func btreePageFromDbPage(tls *libc.TLS, pDbPage uintptr, pgno Pgno, pBt uintptr) // If in the future we call sqlite3PagerWrite() on this page, that // means we have started to be concerned about content and the disk // read should occur at that point. -func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:67704:12: */ +func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:67706:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 // var pDbPage uintptr at bp, 4 - rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp /* &pDbPage */, flags) + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp, flags) if rc != 0 { return rc } @@ -44756,7 +44756,7 @@ func btreeGetPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags i // Retrieve a page from the pager cache. If the requested page is not // already in the pager cache return NULL. Initialize the MemPage.pBt and // MemPage.aData elements if needed. -func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:67726:16: */ +func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3.c:67728:16: */ var pDbPage uintptr pDbPage = Xsqlite3PagerLookup(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno) @@ -44768,11 +44768,11 @@ func btreePageLookup(tls *libc.TLS, pBt uintptr, pgno Pgno) uintptr { /* sqlite3 // Return the size of the database file in pages. If there is any kind of // error, return ((unsigned int)-1). -func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:67740:13: */ +func btreePagecount(tls *libc.TLS, pBt uintptr) Pgno { /* sqlite3.c:67742:13: */ return (*BtShared)(unsafe.Pointer(pBt)).FnPage } -func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:67743:21: */ +func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:67745:21: */ return btreePagecount(tls, (*Btree)(unsafe.Pointer(p)).FpBt) } @@ -44788,7 +44788,7 @@ func Xsqlite3BtreeLastPage(tls *libc.TLS, p uintptr) Pgno { /* sqlite3.c:67743:2 // // If an error occurs, then *ppPage is undefined. It // may remain unchanged, or it may be set to an invalid value. -func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:67761:12: */ +func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur uintptr, bReadOnly int32) int32 { /* sqlite3.c:67763:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -44798,11 +44798,11 @@ func getAndInitPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, pCur if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - rc = Xsqlite3CorruptError(tls, 67776) + rc = Xsqlite3CorruptError(tls, 67778) goto getAndInitPage_error1 __1: ; - rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp /* &pDbPage */, bReadOnly) + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, pgno, bp, bReadOnly) if !(rc != 0) { goto __2 } @@ -44829,7 +44829,7 @@ __3: if !(pCur != 0 && (int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FnCell) < 1 || int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FintKey) != int32((*BtCursor)(unsafe.Pointer(pCur)).FcurIntKey))) { goto __5 } - rc = Xsqlite3CorruptError(tls, 67797) + rc = Xsqlite3CorruptError(tls, 67799) goto getAndInitPage_error2 __5: ; @@ -44853,18 +44853,18 @@ __6: // call to btreeGetPage. // // Page1 is a special case and must be released using releasePageOne(). -func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67820:13: */ +func releasePageNotNull(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67822:13: */ Xsqlite3PagerUnrefNotNull(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } -func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67829:13: */ +func releasePage(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67831:13: */ if pPage != 0 { releasePageNotNull(tls, pPage) } } -func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67832:13: */ +func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67834:13: */ Xsqlite3PagerUnrefPageOne(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) } @@ -44876,13 +44876,13 @@ func releasePageOne(tls *libc.TLS, pPage uintptr) { /* sqlite3.c:67832:13: */ // * If the page is already in use for some other purpose, immediately // release it and return an SQLITE_CURRUPT error. // * Make sure the isInit flag is clear -func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:67852:12: */ +func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, flags int32) int32 { /* sqlite3.c:67854:12: */ var rc int32 = btreeGetPage(tls, pBt, pgno, ppPage, flags) if rc == SQLITE_OK { if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FpDbPage) > 1 { releasePage(tls, *(*uintptr)(unsafe.Pointer(ppPage))) *(*uintptr)(unsafe.Pointer(ppPage)) = uintptr(0) - return Xsqlite3CorruptError(tls, 67863) + return Xsqlite3CorruptError(tls, 67865) } (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppPage)))).FisInit = U8(0) } else { @@ -44897,7 +44897,7 @@ func btreeGetUnusedPage(tls *libc.TLS, pBt uintptr, pgno Pgno, ppPage uintptr, f // // This routine needs to reset the extra data section at the end of the // page to agree with the restored data. -func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:67881:13: */ +func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:67883:13: */ var pPage uintptr pPage = Xsqlite3PagerGetExtra(tls, pData) @@ -44917,7 +44917,7 @@ func pageReinit(tls *libc.TLS, pData uintptr) { /* sqlite3.c:67881:13: */ } // Invoke the busy handler for a btree. -func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:67903:12: */ +func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:67905:12: */ var pBt uintptr = pArg return Xsqlite3InvokeBusyHandler(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb+448) @@ -44942,7 +44942,7 @@ func btreeInvokeBusyHandler(tls *libc.TLS, pArg uintptr) int32 { /* sqlite3.c:67 // SQLITE_CONSTRAINT error. We cannot allow two or more BtShared // objects in the same database connection since doing so will lead // to problems with locking. -func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:67931:20: */ +func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintptr, ppBtree uintptr, flags int32, vfsFlags int32) int32 { /* sqlite3.c:67933:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -44974,7 +44974,7 @@ func Xsqlite3BtreeOpen(tls *libc.TLS, pVfs uintptr, zFilename uintptr, db uintpt mutexOpen = uintptr(0) rc = SQLITE_OK isTempDb = libc.Bool32(zFilename == uintptr(0) || int32(*(*int8)(unsafe.Pointer(zFilename))) == 0) - isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+3969) == 0 || + isMemdb = libc.Bool32(zFilename != 0 && libc.Xstrcmp(tls, zFilename, ts+3991) == 0 || isTempDb != 0 && Xsqlite3TempInMemory(tls, db) != 0 || vfsFlags&SQLITE_OPEN_MEMORY != 0) @@ -45135,7 +45135,7 @@ __21: goto __22 } Xsqlite3PagerSetMmapLimit(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, (*Sqlite3)(unsafe.Pointer(db)).FszMmap) - rc = Xsqlite3PagerReadFileheader(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, int32(unsafe.Sizeof([100]uint8{})), bp /* &zDbHeader[0] */) + rc = Xsqlite3PagerReadFileheader(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, int32(unsafe.Sizeof([100]uint8{})), bp) __22: ; if !(rc != SQLITE_OK) { @@ -45196,7 +45196,7 @@ __25: // EVIDENCE-OF: R-37497-42412 The size of the reserved region is // determined by the one-byte unsigned integer found at an offset of 20 // into the database file header. - nReserve = *(*uint8)(unsafe.Pointer(bp /* &zDbHeader[0] */ + 20)) + nReserve = *(*uint8)(unsafe.Pointer(bp + 20)) *(*U16)(unsafe.Pointer(pBt + 24)) |= U16(BTS_PAGESIZE_FIXED) (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum = func() uint8 { if Xsqlite3Get4byte(tls, bp+52) != 0 { @@ -45363,7 +45363,7 @@ __49: // remove the BtShared structure from the sharing list. Return // true if the BtShared.nRef counter reaches zero and return // false if it is still positive. -func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68229:12: */ +func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68231:12: */ var pMainMtx uintptr var pList uintptr var removed int32 = 0 @@ -45395,7 +45395,7 @@ func removeFromSharingList(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:6822 // Make sure pBt->pTmpSpace points to an allocation of // MX_CELL_SIZE(pBt) bytes with a 4-byte prefix for a left-child // pointer. -func allocateTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68268:13: */ +func allocateTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68270:13: */ if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) != 0) { (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) @@ -45421,7 +45421,7 @@ func allocateTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68268:13: */ } // Free the pBt->pTmpSpace allocation -func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68297:13: */ +func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68299:13: */ if (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace != 0 { *(*uintptr)(unsafe.Pointer(pBt + 84)) -= uintptr(4) Xsqlite3PageFree(tls, (*BtShared)(unsafe.Pointer(pBt)).FpTmpSpace) @@ -45430,7 +45430,7 @@ func freeTempSpace(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68297:13: */ } // Close an open database and invalidate all cursors. -func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68308:20: */ +func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68310:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Close all cursors opened via this handle. @@ -45480,7 +45480,7 @@ func Xsqlite3BtreeClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68308:20: // pages in the cache exceeds this soft limit. But the size of the // cache is allowed to grow larger than this limit if it contains // dirty pages or pages still in active use. -func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68374:20: */ +func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68376:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45497,7 +45497,7 @@ func Xsqlite3BtreeSetCacheSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // The value returned is the current spill size. If zero is passed // as an argument, no changes are made to the spill size setting, so // using mxPage of 0 is a way to query the current spill size. -func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68393:20: */ +func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { /* sqlite3.c:68395:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var res int32 @@ -45509,7 +45509,7 @@ func Xsqlite3BtreeSetSpillSize(tls *libc.TLS, p uintptr, mxPage int32) int32 { / // Change the limit on the amount of the database file that may be // memory mapped. -func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68408:20: */ +func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) int32 { /* sqlite3.c:68410:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45524,7 +45524,7 @@ func Xsqlite3BtreeSetMmapLimit(tls *libc.TLS, p uintptr, szMmap Sqlite3_int64) i // there is a high probability of damage) Level 2 is the default. There // is a very low but non-zero probability of damage. Level 3 reduces the // probability of damage to near zero but with a write performance reduction. -func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:68427:20: */ +func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 { /* sqlite3.c:68429:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -45551,7 +45551,7 @@ func Xsqlite3BtreeSetPagerFlags(tls *libc.TLS, p uintptr, pgFlags uint32) int32 // // If the iFix!=0 then the BTS_PAGESIZE_FIXED flag is set so that the page size // and autovacuum mode can no longer be changed. -func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:68460:20: */ +func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve int32, iFix int32) int32 { /* sqlite3.c:68462:20: */ var rc int32 = SQLITE_OK var x int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -45585,7 +45585,7 @@ func Xsqlite3BtreeSetPageSize(tls *libc.TLS, p uintptr, pageSize int32, nReserve } // Return the currently defined page size -func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68492:20: */ +func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68494:20: */ return int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize) } @@ -45598,7 +45598,7 @@ func Xsqlite3BtreeGetPageSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:684 // database handle that owns *p is not. In this case if sqlite3BtreeEnter() // were to be called, it might collide with some other operation on the // database handle that owns *p, causing undefined behavior. -func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68507:20: */ +func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68509:20: */ var n int32 n = int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpageSize - (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FusableSize) @@ -45612,7 +45612,7 @@ func Xsqlite3BtreeGetReserveNoMutex(tls *libc.TLS, p uintptr) int32 { /* sqlite3 // The value returned is the larger of the current reserve size and // the latest reserve size requested by SQLITE_FILECTRL_RESERVE_BYTES. // The amount of reserve can only grow - never shrink. -func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68523:20: */ +func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68525:20: */ var n1 int32 var n2 int32 Xsqlite3BtreeEnter(tls, p) @@ -45628,7 +45628,7 @@ func Xsqlite3BtreeGetRequestedReserve(tls *libc.TLS, p uintptr) int32 { /* sqlit // Set the maximum page count for a database if mxPage is positive. // No changes are made if mxPage is 0 or negative. // Regardless of the value of mxPage, return the maximum page count. -func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:68538:21: */ +func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* sqlite3.c:68540:21: */ var n Pgno Xsqlite3BtreeEnter(tls, p) n = Xsqlite3PagerMaxPageCount(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, mxPage) @@ -45652,7 +45652,7 @@ func Xsqlite3BtreeMaxPageCount(tls *libc.TLS, p uintptr, mxPage Pgno) Pgno { /* // With BTS_SECURE_DELETE, operation is like BTS_OVERWRITE with the addition // that freelist leaf pages are written back into the database, increasing // the amount of disk I/O. -func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:68564:20: */ +func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { /* sqlite3.c:68566:20: */ var b int32 if p == uintptr(0) { return 0 @@ -45672,7 +45672,7 @@ func Xsqlite3BtreeSecureDelete(tls *libc.TLS, p uintptr, newFlag int32) int32 { // parameter is non-zero, then auto-vacuum mode is enabled. If zero, it // is disabled. The default value for the auto-vacuum property is // determined by the SQLITE_DEFAULT_AUTOVACUUM macro. -func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:68585:20: */ +func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int32 { /* sqlite3.c:68587:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var rc int32 = SQLITE_OK var av U8 = U8(autoVacuum) @@ -45705,7 +45705,7 @@ func Xsqlite3BtreeSetAutoVacuum(tls *libc.TLS, p uintptr, autoVacuum int32) int3 // Return the value of the 'auto-vacuum' property. If auto-vacuum is // enabled 1 is returned. Otherwise 0. -func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68609:20: */ +func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68611:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = func() int32 { @@ -45730,7 +45730,7 @@ func Xsqlite3BtreeGetAutoVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6 // well-formed database file, then SQLITE_CORRUPT is returned. // SQLITE_BUSY is returned if the database is locked. SQLITE_NOMEM // is returned if we run out of memory. -func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68665:12: */ +func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68667:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -45754,7 +45754,7 @@ func lockBtree(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68665:12: */ return rc __1: ; - rc = btreeGetPage(tls, pBt, uint32(1), bp /* &pPage1 */, 0) + rc = btreeGetPage(tls, pBt, uint32(1), bp, 0) if !(rc != SQLITE_OK) { goto __2 } @@ -45765,7 +45765,7 @@ __2: // Do some checking to help insure the file we opened really is // a valid database file. nPage = Xsqlite3Get4byte(tls, uintptr(28)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData) - Xsqlite3PagerPagecount(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp+4 /* &nPageFile */) + Xsqlite3PagerPagecount(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp+4) if !(nPage == U32(0) || libc.Xmemcmp(tls, uintptr(24)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData, uintptr(92)+(*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData, uint32(4)) != 0) { goto __3 } @@ -45817,7 +45817,7 @@ __8: goto __9 } *(*int32)(unsafe.Pointer(bp + 8 /* isOpen */)) = 0 - rc = Xsqlite3PagerOpenWal(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp+8 /* &isOpen */) + rc = Xsqlite3PagerOpenWal(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp+8) if !(rc != SQLITE_OK) { goto __11 } @@ -45846,7 +45846,7 @@ __10: // // The original design allowed these amounts to vary, but as of // version 3.6.0, we require them to be fixed. - if !(libc.Xmemcmp(tls, page1+21, ts+3978, uint32(3)) != 0) { + if !(libc.Xmemcmp(tls, page1+21, ts+4000, uint32(3)) != 0) { goto __14 } goto page1_init_failed @@ -45896,7 +45896,7 @@ __16: if !(Xsqlite3WritableSchema(tls, (*BtShared)(unsafe.Pointer(pBt)).Fdb) == 0 && nPage > *(*U32)(unsafe.Pointer(bp + 4))) { goto __17 } - rc = Xsqlite3CorruptError(tls, 68789) + rc = Xsqlite3CorruptError(tls, 68791) goto page1_init_failed __17: ; @@ -45968,7 +45968,7 @@ page1_init_failed: // has the effect of releasing the read lock. // // If there is a transaction in progress, this routine is a no-op. -func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68871:13: */ +func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68873:13: */ if int32((*BtShared)(unsafe.Pointer(pBt)).FinTransaction) == TRANS_NONE && (*BtShared)(unsafe.Pointer(pBt)).FpPage1 != uintptr(0) { var pPage1 uintptr = (*BtShared)(unsafe.Pointer(pBt)).FpPage1 @@ -45981,7 +45981,7 @@ func unlockBtreeIfUnused(tls *libc.TLS, pBt uintptr) { /* sqlite3.c:68871:13: */ // If pBt points to an empty file then convert that empty file // into a new empty database by initializing the first page of // the database. -func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68888:12: */ +func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68890:12: */ var pP1 uintptr var data uintptr var rc int32 @@ -46021,7 +46021,7 @@ func newDatabase(tls *libc.TLS, pBt uintptr) int32 { /* sqlite3.c:68888:12: */ // Initialize the first page of the database file (creating a database // consisting of a single page and no schema objects). Return SQLITE_OK // if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68932:20: */ +func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68934:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnPage = U32(0) @@ -46063,7 +46063,7 @@ func Xsqlite3BtreeNewDb(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:68932:20: // no progress. By returning SQLITE_BUSY and not invoking the busy callback // when A already has a read lock, we encourage A to give up and let B // proceed. -func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:68976:20: */ +func Xsqlite3BtreeBeginTrans(tls *libc.TLS, p uintptr, wrflag int32, pSchemaVersion uintptr) int32 { /* sqlite3.c:68978:20: */ var pBt uintptr var pPager uintptr var rc int32 @@ -46327,7 +46327,7 @@ __34: // Set the pointer-map entries for all children of page pPage. Also, if // pPage contains cells that point to overflow pages, set the pointer // map entries for the overflow pages as well. -func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69156:12: */ +func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69158:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -46351,17 +46351,17 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69156:12 for i = 0; i < nCell; i++ { var pCell uintptr = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*i)))))) - ptrmapPutOvflPtr(tls, pPage, pPage, pCell, bp /* &rc */) + ptrmapPutOvflPtr(tls, pPage, pPage, pCell, bp) if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { var childPgno Pgno = Xsqlite3Get4byte(tls, pCell) - ptrmapPut(tls, pBt, childPgno, uint8(PTRMAP_BTREE), pgno, bp /* &rc */) + ptrmapPut(tls, pBt, childPgno, uint8(PTRMAP_BTREE), pgno, bp) } } if !(int32((*MemPage)(unsafe.Pointer(pPage)).Fleaf) != 0) { var childPgno Pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) - ptrmapPut(tls, pBt, childPgno, uint8(PTRMAP_BTREE), pgno, bp /* &rc */) + ptrmapPut(tls, pBt, childPgno, uint8(PTRMAP_BTREE), pgno, bp) } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -46379,14 +46379,14 @@ func setChildPtrmaps(tls *libc.TLS, pPage uintptr) int32 { /* sqlite3.c:69156:12 // // PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next // overflow page in the list. -func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69201:12: */ +func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType U8) int32 { /* sqlite3.c:69203:12: */ bp := tls.Alloc(20) defer tls.Free(20) if int32(eType) == PTRMAP_OVERFLOW2 { // The pointer is always the first 4 bytes of the page in this case. if Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData) != iFrom { - return Xsqlite3CorruptError(tls, 69207) + return Xsqlite3CorruptError(tls, 69209) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData, iTo) } else { @@ -46414,7 +46414,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pPage)).FxParseCell})).f(tls, pPage, pCell, bp /* &info */) if U32((*CellInfo)(unsafe.Pointer(bp)).FnLocal) < (*CellInfo)(unsafe.Pointer(bp)).FnPayload { if pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize) { - return Xsqlite3CorruptError(tls, 69226) + return Xsqlite3CorruptError(tls, 69228) } if iFrom == Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4)) { Xsqlite3Put4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(bp)).FnSize)-uintptr(4), iTo) @@ -46431,7 +46431,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType if i == nCell { if int32(eType) != PTRMAP_BTREE || Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8)) != iFrom { - return Xsqlite3CorruptError(tls, 69244) + return Xsqlite3CorruptError(tls, 69246) } Xsqlite3Put4byte(tls, (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+8), iTo) } @@ -46446,7 +46446,7 @@ func modifyPagePointer(tls *libc.TLS, pPage uintptr, iFrom Pgno, iTo Pgno, eType // the journal needs to be sync()ed before database page pDbPage->pgno // can be written to. The caller has already promised not to write to that // page. -func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69262:12: */ +func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPage Pgno, iFreePage Pgno, isCommit int32) int32 { /* sqlite3.c:69264:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -46457,7 +46457,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // var rc int32 at bp, 4 if iDbPage < Pgno(3) { - return Xsqlite3CorruptError(tls, 69279) + return Xsqlite3CorruptError(tls, 69281) } // Move page iDbPage from its current location to page number iFreePage @@ -46483,7 +46483,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag } else { var nextOvfl Pgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pDbPage)).FaData) if nextOvfl != Pgno(0) { - ptrmapPut(tls, pBt, nextOvfl, uint8(PTRMAP_OVERFLOW2), iFreePage, bp /* &rc */) + ptrmapPut(tls, pBt, nextOvfl, uint8(PTRMAP_OVERFLOW2), iFreePage, bp) if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } @@ -46494,7 +46494,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // that it points at iFreePage. Also fix the pointer map entry for // iPtrPage. if int32(eType) != PTRMAP_ROOTPAGE { - *(*int32)(unsafe.Pointer(bp /* rc */)) = btreeGetPage(tls, pBt, iPtrPage, bp+4 /* &pPtrPage */, 0) + *(*int32)(unsafe.Pointer(bp /* rc */)) = btreeGetPage(tls, pBt, iPtrPage, bp+4, 0) if *(*int32)(unsafe.Pointer(bp)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp /* rc */)) } @@ -46506,7 +46506,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag *(*int32)(unsafe.Pointer(bp /* rc */)) = modifyPagePointer(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pPtrPage */)), iDbPage, iFreePage, eType) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pPtrPage */))) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - ptrmapPut(tls, pBt, iFreePage, eType, iPtrPage, bp /* &rc */) + ptrmapPut(tls, pBt, iFreePage, eType, iPtrPage, bp) } } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -46527,7 +46527,7 @@ func relocatePage(tls *libc.TLS, pBt uintptr, pDbPage uintptr, eType U8, iPtrPag // caller will keep calling incrVacuumStep() until it returns SQLITE_DONE // or an error. bCommit is passed true for an auto-vacuum-on-commit // operation, or false for an incremental vacuum. -func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69356:12: */ +func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit int32) int32 { /* sqlite3.c:69358:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -46544,12 +46544,12 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit return SQLITE_DONE } - rc = ptrmapGet(tls, pBt, iLastPg, bp /* &eType */, bp+4 /* &iPtrPage */) + rc = ptrmapGet(tls, pBt, iLastPg, bp, bp+4) if rc != SQLITE_OK { return rc } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_ROOTPAGE { - return Xsqlite3CorruptError(tls, 69377) + return Xsqlite3CorruptError(tls, 69379) } if int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_FREEPAGE { @@ -46562,7 +46562,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // var pFreePg uintptr at bp+8, 4 - rc = allocateBtreePage(tls, pBt, bp+8 /* &pFreePg */, bp+12 /* &iFreePg */, iLastPg, uint8(BTALLOC_EXACT)) + rc = allocateBtreePage(tls, pBt, bp+8, bp+12, iLastPg, uint8(BTALLOC_EXACT)) if rc != SQLITE_OK { return rc } @@ -46577,7 +46577,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit var eMode U8 = U8(BTALLOC_ANY) // Mode parameter for allocateBtreePage() var iNear Pgno = Pgno(0) // nearby parameter for allocateBtreePage() - rc = btreeGetPage(tls, pBt, iLastPg, bp+16 /* &pLastPg */, 0) + rc = btreeGetPage(tls, pBt, iLastPg, bp+16, 0) if rc != SQLITE_OK { return rc } @@ -46595,7 +46595,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit for ok := true; ok; ok = bCommit != 0 && *(*Pgno)(unsafe.Pointer(bp + 24)) > nFin { // var pFreePg uintptr at bp+20, 4 - rc = allocateBtreePage(tls, pBt, bp+20 /* &pFreePg */, bp+24 /* &iFreePg */, iNear, eMode) + rc = allocateBtreePage(tls, pBt, bp+20, bp+24, iNear, eMode) if rc != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pLastPg */))) return rc @@ -46624,7 +46624,7 @@ func incrVacuumStep(tls *libc.TLS, pBt uintptr, nFin Pgno, iLastPg Pgno, bCommit // The database opened by the first argument is an auto-vacuum database // nOrig pages in size containing nFree free pages. Return the expected // size of the database in pages following an auto-vacuum operation. -func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:69452:13: */ +func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* sqlite3.c:69454:13: */ var nEntry int32 // Number of entries on one ptrmap page var nPtrmap Pgno // Number of PtrMap pages to be freed var nFin Pgno // Return value @@ -46648,7 +46648,7 @@ func finalDbSize(tls *libc.TLS, pBt uintptr, nOrig Pgno, nFree Pgno) Pgno { /* s // If the incremental vacuum is finished after this function has run, // SQLITE_DONE is returned. If it is not finished, but no error occurred, // SQLITE_OK is returned. Otherwise an SQLite error code. -func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69478:20: */ +func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69480:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46662,7 +46662,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6947 var nFin Pgno = finalDbSize(tls, pBt, nOrig, nFree) if nOrig < nFin || nFree >= nOrig { - rc = Xsqlite3CorruptError(tls, 69492) + rc = Xsqlite3CorruptError(tls, 69494) } else if nFree > Pgno(0) { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) if rc == SQLITE_OK { @@ -46683,7 +46683,7 @@ func Xsqlite3BtreeIncrVacuum(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:6947 // This routine is called prior to sqlite3PagerCommit when a transaction // is committed for an auto-vacuum database. -func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69515:12: */ +func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69517:12: */ var rc int32 = SQLITE_OK var pPager uintptr var pBt uintptr @@ -46706,7 +46706,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69515:12: * // It is not possible to create a database for which the final page // is either a pointer-map page or the pending-byte page. If one // is encountered, this indicates corruption. - return Xsqlite3CorruptError(tls, 69543) + return Xsqlite3CorruptError(tls, 69545) } nFree = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36) @@ -46737,7 +46737,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69515:12: * } nFin = finalDbSize(tls, pBt, nOrig, nVac) if nFin > nOrig { - return Xsqlite3CorruptError(tls, 69570) + return Xsqlite3CorruptError(tls, 69572) } if nFin < nOrig { rc = saveAllCursors(tls, pBt, uint32(0), uintptr(0)) @@ -46787,7 +46787,7 @@ func autoVacuumCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69515:12: * // // Once this is routine has returned, the only thing required to commit // the write-transaction for this database file is to delete the journal. -func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:69626:20: */ +func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) int32 { /* sqlite3.c:69628:20: */ var rc int32 = SQLITE_OK if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -46810,7 +46810,7 @@ func Xsqlite3BtreeCommitPhaseOne(tls *libc.TLS, p uintptr, zSuperJrnl uintptr) i // This function is called from both BtreeCommitPhaseTwo() and BtreeRollback() // at the conclusion of a transaction. -func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:69653:13: */ +func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:69655:13: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var db uintptr = (*Btree)(unsafe.Pointer(p)).Fdb @@ -46866,7 +46866,7 @@ func btreeEndTransaction(tls *libc.TLS, p uintptr) { /* sqlite3.c:69653:13: */ // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:69715:20: */ +func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 { /* sqlite3.c:69717:20: */ if int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_NONE { return SQLITE_OK @@ -46895,7 +46895,7 @@ func Xsqlite3BtreeCommitPhaseTwo(tls *libc.TLS, p uintptr, bCleanup int32) int32 } // Do both phases of a commit. -func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69747:20: */ +func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69749:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = Xsqlite3BtreeCommitPhaseOne(tls, p, uintptr(0)) @@ -46930,7 +46930,7 @@ func Xsqlite3BtreeCommit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:69747:20 // // SQLITE_OK is returned if successful, or if an error occurs while // saving a cursor position, an SQLite error code. -func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:69784:20: */ +func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, writeOnly int32) int32 { /* sqlite3.c:69786:20: */ var p uintptr var rc int32 = SQLITE_OK @@ -46959,14 +46959,14 @@ func Xsqlite3BtreeTripAllCursors(tls *libc.TLS, pBtree uintptr, errCode int32, w // Set the pBt->nPage field correctly, according to the current // state of the database. Assume pBt->pPage1 is valid. -func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:69816:13: */ +func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:69818:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* nPage */)) = int32(Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pPage1)).FaData+28)) if *(*int32)(unsafe.Pointer(bp)) == 0 { - Xsqlite3PagerPagecount(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp /* &nPage */) + Xsqlite3PagerPagecount(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, bp) } (*BtShared)(unsafe.Pointer(pBt)).FnPage = U32(*(*int32)(unsafe.Pointer(bp /* nPage */))) @@ -46981,7 +46981,7 @@ func btreeSetNPage(tls *libc.TLS, pBt uintptr, pPage1 uintptr) { /* sqlite3.c:69 // // This will release the write lock on the database file. If there // are no active cursors, it also releases the read lock. -func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:69835:20: */ +func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly int32) int32 { /* sqlite3.c:69837:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -47047,7 +47047,7 @@ func Xsqlite3BtreeRollback(tls *libc.TLS, p uintptr, tripCode int32, writeOnly i // are no active savepoints and no other statement-transactions open, // iStatement is 1. This anonymous savepoint can be released or rolled back // using the sqlite3BtreeSavepoint() function. -func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:69900:20: */ +func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { /* sqlite3.c:69902:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -47071,7 +47071,7 @@ func Xsqlite3BtreeBeginStmt(tls *libc.TLS, p uintptr, iStatement int32) int32 { // contents of the entire transaction are rolled back. This is different // from a normal transaction rollback, as no locks are released and the // transaction remains open. -func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:69931:20: */ +func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:69933:20: */ var rc int32 = SQLITE_OK if p != 0 && int32((*Btree)(unsafe.Pointer(p)).FinTrans) == TRANS_WRITE { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -47139,7 +47139,7 @@ func Xsqlite3BtreeSavepoint(tls *libc.TLS, p uintptr, op int32, iSavepoint int32 // // It is assumed that the sqlite3BtreeCursorZero() has been called // on pCur to initialize the memory space prior to invoking this routine. -func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70002:12: */ +func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70004:12: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt // Shared b-tree handle var pX uintptr // Looping over other all cursors @@ -47158,7 +47158,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u } if iTable <= Pgno(1) { if iTable < Pgno(1) { - return Xsqlite3CorruptError(tls, 70038) + return Xsqlite3CorruptError(tls, 70040) } else if btreePagecount(tls, pBt) == Pgno(0) { iTable = Pgno(0) @@ -47198,7 +47198,7 @@ func btreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo u return SQLITE_OK } -func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70067:12: */ +func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70069:12: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCursor(tls, p, iTable, wrFlag, pKeyInfo, pCur) @@ -47206,7 +47206,7 @@ func btreeCursorWithLock(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK return rc } -func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70080:20: */ +func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pKeyInfo uintptr, pCur uintptr) int32 { /* sqlite3.c:70082:20: */ if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { return btreeCursorWithLock(tls, p, iTable, wrFlag, pKeyInfo, pCur) } else { @@ -47221,7 +47221,7 @@ func Xsqlite3BtreeCursor(tls *libc.TLS, p uintptr, iTable Pgno, wrFlag int32, pK // sufficient storage to hold a cursor. The BtCursor object is opaque // to users so they cannot do the sizeof() themselves - they must call // this routine. -func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70102:20: */ +func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70104:20: */ return int32((uint32(unsafe.Sizeof(BtCursor{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } @@ -47231,13 +47231,13 @@ func Xsqlite3BtreeCursorSize(tls *libc.TLS) int32 { /* sqlite3.c:70102:20: */ // to zero. But it turns out that the apPage[] and aiIdx[] arrays // do not need to be zeroed and they are large, so we can save a lot // of run-time by skipping the initialization of those elements. -func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70114:21: */ +func Xsqlite3BtreeCursorZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:70116:21: */ libc.Xmemset(tls, p, 0, uint32(uintptr(0)+20)) } // Close a cursor. The read lock on the database file is released // when the last cursor is closed. -func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70122:20: */ +func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70124:20: */ var pBtree uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBtree if pBtree != 0 { var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt @@ -47278,7 +47278,7 @@ func Xsqlite3BtreeCloseCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c: // // BtCursor.info is a cache of the information in the current cell. // Using this cache reduces the number of calls to btreeParseCell(). -func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70183:29: */ +func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70185:29: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize) == 0 { *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_ValidNKey) btreeParseCell(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpPage, int32((*BtCursor)(unsafe.Pointer(pCur)).Fix), pCur+28) @@ -47287,7 +47287,7 @@ func getCellInfo(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70183:29: */ } } -func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70202:20: */ +func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70204:20: */ return libc.Bool32(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID) } @@ -47296,26 +47296,26 @@ func Xsqlite3BtreeCursorIsValidNN(tls *libc.TLS, pCur uintptr) int32 { /* sqlite // This routine is only valid for a cursor that is pointing into a // ordinary table btree. If the cursor points to an index btree or // is invalid, the result of this routine is undefined. -func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70213:20: */ +func Xsqlite3BtreeIntegerKey(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70215:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnKey } // Pin or unpin a cursor. -func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70224:21: */ +func Xsqlite3BtreeCursorPin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70226:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Pinned) } -func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70228:21: */ +func Xsqlite3BtreeCursorUnpin(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70230:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_Pinned)) } // Return the offset into the database file for the start of the // payload to which the cursor is pointing. -func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70238:20: */ +func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70240:20: */ getCellInfo(tls, pCur) return I64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize)*(I64((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).Fpgno)-int64(1)) + I64((int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload)-int32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpPage)).FaData))/1) @@ -47328,7 +47328,7 @@ func Xsqlite3BtreeOffset(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:70238:2 // The caller must guarantee that the cursor is pointing to a non-NULL // valid entry. In other words, the calling procedure must guarantee // that the cursor has Cursor.eState==CURSOR_VALID. -func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70256:20: */ +func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70258:20: */ getCellInfo(tls, pCur) return (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnPayload @@ -47345,7 +47345,7 @@ func Xsqlite3BtreePayloadSize(tls *libc.TLS, pCur uintptr) U32 { /* sqlite3.c:70 // // The current implementation merely returns the size of the underlying // database file. -func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70276:30: */ +func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* sqlite3.c:70278:30: */ return Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpageSize) * Sqlite3_int64((*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) } @@ -47367,7 +47367,7 @@ func Xsqlite3BtreeMaxRecordSize(tls *libc.TLS, pCur uintptr) Sqlite3_int64 { /* // on *ppPage to free the reference. In no reference was obtained (because // the pointer-map was used to obtain the value for *pPgnoNext), then // *ppPage is set to zero. -func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70301:12: */ +func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgnoNext uintptr) int32 { /* sqlite3.c:70303:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -47391,7 +47391,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn } if iGuess <= btreePagecount(tls, pBt) { - rc = ptrmapGet(tls, pBt, iGuess, bp /* &eType */, bp+4 /* &pgno */) + rc = ptrmapGet(tls, pBt, iGuess, bp, bp+4) if rc == SQLITE_OK && int32(*(*U8)(unsafe.Pointer(bp))) == PTRMAP_OVERFLOW2 && *(*Pgno)(unsafe.Pointer(bp + 4)) == ovfl { next = iGuess rc = SQLITE_DONE @@ -47400,7 +47400,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn } if rc == SQLITE_OK { - rc = btreeGetPage(tls, pBt, ovfl, bp+8 /* &pPage */, func() int32 { + rc = btreeGetPage(tls, pBt, ovfl, bp+8, func() int32 { if ppPage == uintptr(0) { return PAGER_GET_READONLY } @@ -47435,7 +47435,7 @@ func getOverflowPage(tls *libc.TLS, pBt uintptr, ovfl Pgno, ppPage uintptr, pPgn // of data are copied from the buffer pBuf to pPayload. // // SQLITE_OK is returned on success, otherwise an error code. -func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70369:12: */ +func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp int32, pDbPage uintptr) int32 { /* sqlite3.c:70371:12: */ if eOp != 0 { // Copy data from buffer to page (a write operation) var rc int32 = Xsqlite3PagerWrite(tls, pDbPage) @@ -47477,7 +47477,7 @@ func copyPayload(tls *libc.TLS, pPayload uintptr, pBuf uintptr, nByte int32, eOp // * An incremental vacuum, // * A commit in auto_vacuum="full" mode, // * Creating a table (may require moving an overflow page). -func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:70419:12: */ +func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr, eOp int32) int32 { /* sqlite3.c:70421:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -47488,7 +47488,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt // Btree this cursor belongs to if int32((*BtCursor)(unsafe.Pointer(pCur)).Fix) >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { - return Xsqlite3CorruptError(tls, 70439) + return Xsqlite3CorruptError(tls, 70441) } getCellInfo(tls, pCur) @@ -47499,7 +47499,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // conditional above is really: // &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize] // but is recast into its current form to avoid integer overflow problems - return Xsqlite3CorruptError(tls, 70454) + return Xsqlite3CorruptError(tls, 70456) } // Check if data must be read/written to/from the btree page itself. @@ -47556,7 +47556,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt for *(*Pgno)(unsafe.Pointer(bp)) != 0 { // If required, populate the overflow page-list cache. if *(*Pgno)(unsafe.Pointer(bp)) > (*BtShared)(unsafe.Pointer(pBt)).FnPage { - return Xsqlite3CorruptError(tls, 70516) + return Xsqlite3CorruptError(tls, 70518) } *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx)*4)) = *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) @@ -47571,7 +47571,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx+1)*4)) != 0 { *(*Pgno)(unsafe.Pointer(bp /* nextPage */)) = *(*Pgno)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FaOverflow + uintptr(iIdx+1)*4)) } else { - rc = getOverflowPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* nextPage */)), uintptr(0), bp /* &nextPage */) + rc = getOverflowPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* nextPage */)), uintptr(0), bp) } offset = offset - ovflSize } else { @@ -47585,7 +47585,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt { // var pDbPage uintptr at bp+4, 4 - rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, *(*Pgno)(unsafe.Pointer(bp /* nextPage */)), bp+4, /* &pDbPage */ + rc = Xsqlite3PagerGet(tls, (*BtShared)(unsafe.Pointer(pBt)).FpPager, *(*Pgno)(unsafe.Pointer(bp /* nextPage */)), bp+4, func() int32 { if eOp == 0 { return PAGER_GET_READONLY @@ -47616,7 +47616,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt if rc == SQLITE_OK && amt > U32(0) { // Overflow chain ends prematurely - return Xsqlite3CorruptError(tls, 70601) + return Xsqlite3CorruptError(tls, 70603) } return rc } @@ -47636,7 +47636,7 @@ func accessPayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintpt // Return SQLITE_OK on success or an error code if anything goes // wrong. An error is returned if "offset+amt" is larger than // the available payload. -func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70623:20: */ +func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70625:20: */ return accessPayload(tls, pCur, offset, amt, pBuf, 0) } @@ -47644,7 +47644,7 @@ func Xsqlite3BtreePayload(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf // This variant of sqlite3BtreePayload() works even if the cursor has not // in the CURSOR_VALID state. It is only used by the sqlite3_blob_read() // interface. -func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70636:28: */ +func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70638:28: */ var rc int32 if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_INVALID { return SQLITE_ABORT @@ -47657,7 +47657,7 @@ func accessPayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf return accessPayload(tls, pCur, offset, amt, pBuf, 0) } -func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70650:20: */ +func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pBuf uintptr) int32 { /* sqlite3.c:70652:20: */ if int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) == CURSOR_VALID { return accessPayload(tls, pCur, offset, amt, pBuf, 0) @@ -47684,7 +47684,7 @@ func Xsqlite3BtreePayloadChecked(tls *libc.TLS, pCur uintptr, offset U32, amt U3 // The pointer returned by this routine looks directly into the cached // page of the database. The data might change or move the next time // any btree routine is called. -func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:70679:19: */ +func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:70681:19: */ var amt int32 amt = int32((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) @@ -47715,7 +47715,7 @@ func fetchPayload(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite // // These routines is used to get quick access to key and data // in the common case where no overflow pages are used. -func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:70718:27: */ +func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintptr { /* sqlite3.c:70720:27: */ return fetchPayload(tls, pCur, pAmt) } @@ -47726,11 +47726,11 @@ func Xsqlite3BtreePayloadFetch(tls *libc.TLS, pCur uintptr, pAmt uintptr) uintpt // the new child page does not match the flags field of the parent (i.e. // if an intkey page appears to be the parent of a non-intkey page, or // vice-versa). -func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:70732:12: */ +func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c:70734:12: */ var pBt uintptr = (*BtCursor)(unsafe.Pointer(pCur)).FpBt if int32((*BtCursor)(unsafe.Pointer(pCur)).FiPage) >= BTCURSOR_MAX_DEPTH-1 { - return Xsqlite3CorruptError(tls, 70740) + return Xsqlite3CorruptError(tls, 70742) } (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_ValidNKey | BTCF_ValidOvfl)) @@ -47747,7 +47747,7 @@ func moveToChild(tls *libc.TLS, pCur uintptr, newPgno U32) int32 { /* sqlite3.c: // to the page we are coming from. If we are coming from the // right-most child page then pCur->idx is set to one more than // the largest cell index. -func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70781:13: */ +func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70783:13: */ var pLeaf uintptr (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnSize = U16(0) @@ -47777,7 +47777,7 @@ func moveToParent(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:70781:13: */ // indicating a table b-tree, or if the caller did specify a KeyInfo // structure the flags byte is set to 0x02 or 0x0A, indicating an index // b-tree). -func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70822:12: */ +func moveToRoot(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70824:12: */ var pRoot uintptr var rc int32 var subpage Pgno @@ -47856,7 +47856,7 @@ __2: if !(int32((*MemPage)(unsafe.Pointer(pRoot)).FisInit) == 0 || libc.Bool32((*BtCursor)(unsafe.Pointer(pCur)).FpKeyInfo == uintptr(0)) != int32((*MemPage)(unsafe.Pointer(pRoot)).FintKey)) { goto __11 } - return Xsqlite3CorruptError(tls, 70878) + return Xsqlite3CorruptError(tls, 70880) __11: ; @@ -47878,7 +47878,7 @@ __12: if !((*MemPage)(unsafe.Pointer(pRoot)).Fpgno != Pgno(1)) { goto __16 } - return Xsqlite3CorruptError(tls, 70891) + return Xsqlite3CorruptError(tls, 70893) __16: ; subpage = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(pRoot)).FaData+uintptr(int32((*MemPage)(unsafe.Pointer(pRoot)).FhdrOffset)+8)) @@ -47900,7 +47900,7 @@ __13: // // The left-most leaf is the one with the smallest key - the first // in ascending order. -func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70909:12: */ +func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70911:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr @@ -47921,7 +47921,7 @@ func moveToLeftmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70909:12: // // The right-most entry is the one with the largest key - the last // key in ascending order. -func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70934:12: */ +func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70936:12: */ var pgno Pgno var rc int32 = SQLITE_OK var pPage uintptr = uintptr(0) @@ -47942,7 +47942,7 @@ func moveToRightmost(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:70934:12: // Move the cursor to the first entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:70957:20: */ +func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:70959:20: */ var rc int32 rc = moveToRoot(tls, pCur) @@ -47961,7 +47961,7 @@ func Xsqlite3BtreeFirst(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sq // Move the cursor to the last entry in the table. Return SQLITE_OK // on success. Set *pRes to 0 if the cursor actually points to something // or set *pRes to 1 if the table is empty. -func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:70979:20: */ +func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sqlite3.c:70981:20: */ var rc int32 // If the cursor already points to the last entry, this is a no-op. @@ -48010,7 +48010,7 @@ func Xsqlite3BtreeLast(tls *libc.TLS, pCur uintptr, pRes uintptr) int32 { /* sql // // *pRes>0 The cursor is left pointing at an entry that // is larger than intKey. -func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71044:20: */ +func Xsqlite3BtreeTableMoveto(tls *libc.TLS, pCur uintptr, intKey I64, biasRight int32, pRes uintptr) int32 { /* sqlite3.c:71046:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -48126,7 +48126,7 @@ __19: if !(pCell >= (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __21 } - return Xsqlite3CorruptError(tls, 71134) + return Xsqlite3CorruptError(tls, 71136) __21: ; goto __19 @@ -48134,7 +48134,7 @@ __20: ; __18: ; - Xsqlite3GetVarint(tls, pCell, bp /* &nCellKey */) + Xsqlite3GetVarint(tls, pCell, bp) if !(*(*I64)(unsafe.Pointer(bp)) < intKey) { goto __22 } @@ -48255,7 +48255,7 @@ moveto_table_finish: // // The pIdxKey->eqSeen field is set to 1 if there // exists an entry in the table that exactly matches pIdxKey. -func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71213:20: */ +func Xsqlite3BtreeIndexMoveto(tls *libc.TLS, pCur uintptr, pIdxKey uintptr, pRes uintptr) int32 { /* sqlite3.c:71215:20: */ var rc int32 var xRecordCompare RecordCompare // The record flows over onto one or more overflow pages. In @@ -48360,7 +48360,7 @@ __11: if !(nCell < 2 || U32(nCell)/(*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FusableSize > (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FnPage) { goto __13 } - rc = Xsqlite3CorruptError(tls, 71316) + rc = Xsqlite3CorruptError(tls, 71318) goto moveto_index_finish __13: ; @@ -48409,7 +48409,7 @@ __18: if !((*UnpackedRecord)(unsafe.Pointer(pIdxKey)).FerrCode != 0) { goto __20 } - rc = Xsqlite3CorruptError(tls, 71348) + rc = Xsqlite3CorruptError(tls, 71350) __20: ; goto moveto_index_finish @@ -48476,7 +48476,7 @@ moveto_index_finish: // TRUE will be returned after a call to sqlite3BtreeNext() moves // past the last entry in the table or sqlite3BtreePrev() moves past // the first entry. TRUE is also returned if the table is empty. -func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71387:20: */ +func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71389:20: */ // TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries // have been deleted? This API will need to change to return an error code // as well as the boolean result value. @@ -48486,7 +48486,7 @@ func Xsqlite3BtreeEof(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71387:20 // Return an estimate for the number of rows in the table that pCur is // pointing to. Return a negative number if no estimate is currently // available. -func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71400:20: */ +func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71402:20: */ var n I64 var i U8 @@ -48525,7 +48525,7 @@ func Xsqlite3BtreeRowCountEst(tls *libc.TLS, pCur uintptr) I64 { /* sqlite3.c:71 // skipped if the SQL index had been a unique index. The F argument // is a hint to the implement. SQLite btree implementation does not use // this hint, but COMDB2 does. -func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71440:28: */ +func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71442:28: */ var rc int32 var idx int32 var pPage uintptr @@ -48562,7 +48562,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71440:28: */ // has pages in common with the table being queried. See TH3 // module cov1/btree78.test testcase 220 (2018-06-08) for an // example. - return Xsqlite3CorruptError(tls, 71471) + return Xsqlite3CorruptError(tls, 71473) } if idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) { @@ -48595,7 +48595,7 @@ func btreeNext(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71440:28: */ return int32(0) } -func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:71500:20: */ +func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:71502:20: */ var pPage uintptr _ = flags // Used in COMDB2 but not native SQLite @@ -48635,7 +48635,7 @@ func Xsqlite3BtreeNext(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqli // skipped if the SQL index had been a unique index. The F argument is a // hint to the implement. The native SQLite btree implementation does not // use this hint, but COMDB2 does. -func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71540:28: */ +func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71542:28: */ var rc int32 var pPage uintptr @@ -48689,7 +48689,7 @@ func btreePrevious(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:71540:28: * return rc } -func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:71589:20: */ +func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* sqlite3.c:71591:20: */ _ = flags // Used in COMDB2 but not native SQLite *(*U8)(unsafe.Pointer(pCur + 1)) &= libc.Uint8FromInt32(libc.CplInt32(BTCF_AtLast | BTCF_ValidOvfl | BTCF_ValidNKey)) @@ -48723,7 +48723,7 @@ func Xsqlite3BtreePrevious(tls *libc.TLS, pCur uintptr, flags int32) int32 { /* // eMode is BTALLOC_LT then the page returned will be less than or equal // to nearby if any such page exists. If eMode is BTALLOC_ANY then there // are no restrictions on which page is returned. -func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:71627:12: */ +func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr, nearby Pgno, eMode U8) int32 { /* sqlite3.c:71629:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -48790,7 +48790,7 @@ func allocateBtreePage(tls *libc.TLS, pBt uintptr, ppPage uintptr, pPgno uintptr if !(n >= mxPage) { goto __1 } - return Xsqlite3CorruptError(tls, 71651) + return Xsqlite3CorruptError(tls, 71653) __1: ; if !(n > U32(0)) { @@ -48809,7 +48809,7 @@ __1: goto __6 } - rc = ptrmapGet(tls, pBt, nearby, bp /* &eType */, uintptr(0)) + rc = ptrmapGet(tls, pBt, nearby, bp, uintptr(0)) if !(rc != 0) { goto __7 } @@ -48871,10 +48871,10 @@ __15: if !(iTrunk > mxPage || libc.PostIncUint32(&nSearch, 1) > n) { goto __16 } - rc = Xsqlite3CorruptError(tls, 71707) + rc = Xsqlite3CorruptError(tls, 71709) goto __17 __16: - rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4 /* &pTrunk */, 0) + rc = btreeGetUnusedPage(tls, pBt, iTrunk, bp+4, 0) __17: ; if !(rc != 0) { @@ -48913,7 +48913,7 @@ __19: goto __22 } // Value of k is out of range. Database corruption - rc = Xsqlite3CorruptError(tls, 71736) + rc = Xsqlite3CorruptError(tls, 71738) goto end_allocate_page goto __23 __22: @@ -48958,12 +48958,12 @@ __27: if !(iNewTrunk > mxPage) { goto __32 } - rc = Xsqlite3CorruptError(tls, 71770) + rc = Xsqlite3CorruptError(tls, 71772) goto end_allocate_page __32: ; - rc = btreeGetUnusedPage(tls, pBt, iNewTrunk, bp+8 /* &pNewTrunk */, 0) + rc = btreeGetUnusedPage(tls, pBt, iNewTrunk, bp+8, 0) if !(rc != SQLITE_OK) { goto __33 } @@ -49072,7 +49072,7 @@ __40: if !(iPage > mxPage || iPage < Pgno(2)) { goto __51 } - rc = Xsqlite3CorruptError(tls, 71835) + rc = Xsqlite3CorruptError(tls, 71837) goto end_allocate_page __51: ; @@ -49185,7 +49185,7 @@ __58: // becomes a new pointer-map page, the second is used by the caller. *(*uintptr)(unsafe.Pointer(bp + 12 /* pPg */)) = uintptr(0) - rc = btreeGetUnusedPage(tls, pBt, (*BtShared)(unsafe.Pointer(pBt)).FnPage, bp+12 /* &pPg */, bNoContent) + rc = btreeGetUnusedPage(tls, pBt, (*BtShared)(unsafe.Pointer(pBt)).FnPage, bp+12, bNoContent) if !(rc == SQLITE_OK) { goto __60 } @@ -49247,7 +49247,7 @@ end_allocate_page: // // If a pointer to a MemPage object is passed as the second argument, // its reference count is not altered by this function. -func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:71949:12: */ +func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { /* sqlite3.c:71951:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -49268,7 +49268,7 @@ func freePage2(tls *libc.TLS, pBt uintptr, pMemPage uintptr, iPage Pgno) int32 { if !(iPage < Pgno(2) || iPage > (*BtShared)(unsafe.Pointer(pBt)).FnPage) { goto __1 } - return Xsqlite3CorruptError(tls, 71962) + return Xsqlite3CorruptError(tls, 71964) __1: ; if !(pMemPage != 0) { @@ -49314,7 +49314,7 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __7 } - ptrmapPut(tls, pBt, iPage, uint8(PTRMAP_FREEPAGE), uint32(0), bp+4 /* &rc */) + ptrmapPut(tls, pBt, iPage, uint8(PTRMAP_FREEPAGE), uint32(0), bp+4) if !(*(*int32)(unsafe.Pointer(bp + 4)) != 0) { goto __8 } @@ -49338,11 +49338,11 @@ __7: if !(iTrunk > btreePagecount(tls, pBt)) { goto __10 } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72009) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72011) goto freepage_out __10: ; - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = btreeGetPage(tls, pBt, iTrunk, bp+8 /* &pTrunk */, 0) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = btreeGetPage(tls, pBt, iTrunk, bp+8, 0) if !(*(*int32)(unsafe.Pointer(bp + 4)) != SQLITE_OK) { goto __11 } @@ -49355,7 +49355,7 @@ __11: if !(nLeaf > (*BtShared)(unsafe.Pointer(pBt)).FusableSize/U32(4)-U32(2)) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72020) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 72022) goto freepage_out __12: ; @@ -49436,14 +49436,14 @@ __18: return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72083:13: */ +func freePage(tls *libc.TLS, pPage uintptr, pRC uintptr) { /* sqlite3.c:72085:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRC)) = freePage2(tls, (*MemPage)(unsafe.Pointer(pPage)).FpBt, pPage, (*MemPage)(unsafe.Pointer(pPage)).Fpgno) } } // Free the overflow pages associated with the given Cell. -func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72092:28: */ +func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintptr) int32 { /* sqlite3.c:72094:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -49455,7 +49455,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt if pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd { // Cell extends past end of page - return Xsqlite3CorruptError(tls, 72109) + return Xsqlite3CorruptError(tls, 72111) } ovflPgno = Xsqlite3Get4byte(tls, pCell+uintptr((*CellInfo)(unsafe.Pointer(pInfo)).FnSize)-uintptr(4)) pBt = (*MemPage)(unsafe.Pointer(pPage)).FpBt @@ -49470,10 +49470,10 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // 0 is not a legal page number and page 1 cannot be an // overflow page. Therefore if ovflPgno<2 or past the end of the // file the database must be corrupt. - return Xsqlite3CorruptError(tls, 72126) + return Xsqlite3CorruptError(tls, 72128) } if nOvfl != 0 { - rc = getOverflowPage(tls, pBt, ovflPgno, bp /* &pOvfl */, bp+4 /* &iNext */) + rc = getOverflowPage(tls, pBt, ovflPgno, bp, bp+4) if rc != 0 { return rc } @@ -49490,7 +49490,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // enabled. If this 'overflow' page happens to be a page that the // caller is iterating through or using in some other way, this // can be problematic. - rc = Xsqlite3CorruptError(tls, 72146) + rc = Xsqlite3CorruptError(tls, 72148) } else { rc = freePage2(tls, pBt, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */)), ovflPgno) } @@ -49522,7 +49522,7 @@ func clearCellOverflow(tls *libc.TLS, pPage uintptr, pCell uintptr, pInfo uintpt // area. pCell might point to some temporary storage. The cell will // be constructed in this temporary area then copied into pPage->aData // later. -func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72187:12: */ +func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize uintptr) int32 { /* sqlite3.c:72189:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -49652,7 +49652,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoOvfl */))++ } } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = allocateBtreePage(tls, pBt, bp /* &pOvfl */, bp+4 /* &pgnoOvfl */, *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoOvfl */)), uint8(0)) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+4, *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoOvfl */)), uint8(0)) // If the database supports auto-vacuum, and the second or subsequent // overflow page is being allocated, add an entry to the pointer-map // for that page now. @@ -49669,7 +49669,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize } return uint8(PTRMAP_OVERFLOW1) }() - ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoOvfl */)), eType, pgnoPtrmap, bp+8 /* &rc */) + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoOvfl */)), eType, pgnoPtrmap, bp+8) if *(*int32)(unsafe.Pointer(bp + 8)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pOvfl */))) } @@ -49704,7 +49704,7 @@ func fillInCell(tls *libc.TLS, pPage uintptr, pCell uintptr, pX uintptr, pnSize // removes the reference to the cell from pPage. // // "sz" must be the number of bytes in the cell. -func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72377:13: */ +func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { /* sqlite3.c:72379:13: */ var pc U32 // Offset to cell content of cell being deleted var data uintptr // pPage->aData var ptr uintptr // Used to move bytes around within data[] @@ -49717,11 +49717,12 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { data = (*MemPage)(unsafe.Pointer(pPage)).FaData ptr = (*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*idx) + pc = U32(int32(*(*U8)(unsafe.Pointer(ptr)))<<8 | int32(*(*U8)(unsafe.Pointer(ptr + 1)))) hdr = int32((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset) if pc+U32(sz) > (*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FpBt)).FusableSize { - *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72397) + *(*int32)(unsafe.Pointer(pRC)) = Xsqlite3CorruptError(tls, 72401) return } rc = freeSpace(tls, pPage, uint16(pc), uint16(sz)) @@ -49757,7 +49758,7 @@ func dropCell(tls *libc.TLS, pPage uintptr, idx int32, sz int32, pRC uintptr) { // pPage->nOverflow is incremented. // // *pRC must be SQLITE_OK when this routine is called. -func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:72433:13: */ +func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, pTemp uintptr, iChild Pgno, pRC uintptr) { /* sqlite3.c:72437:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -49797,7 +49798,7 @@ func insertCell(tls *libc.TLS, pPage uintptr, i int32, pCell uintptr, sz int32, data = (*MemPage)(unsafe.Pointer(pPage)).FaData - rc = allocateSpace(tls, pPage, sz, bp /* &idx */) + rc = allocateSpace(tls, pPage, sz, bp) if rc != 0 { *(*int32)(unsafe.Pointer(pRC)) = rc return @@ -49917,7 +49918,7 @@ type CellArray1 = struct { FszCell uintptr FapEnd [6]uintptr FixNx [6]int32 -} /* sqlite3.c:72608:9 */ +} /* sqlite3.c:72612:9 */ // The following parameters determine how many adjacent pages get involved // in a balancing operation. NN is the number of neighbors on either side @@ -49994,11 +49995,11 @@ type CellArray1 = struct { // cases, ixNx[] entries with higher indexes, and the corresponding apEnd[] // entries, shift down. The end result is that each ixNx[] entry should // be larger than the previous -type CellArray = CellArray1 /* sqlite3.c:72608:26 */ +type CellArray = CellArray1 /* sqlite3.c:72612:26 */ // Make sure the cell sizes at idx, idx+1, ..., idx+N-1 have been // computed. -func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:72622:13: */ +func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite3.c:72626:13: */ for N > 0 { @@ -50015,7 +50016,7 @@ func populateCellCache(tls *libc.TLS, p uintptr, idx int32, N int32) { /* sqlite } // Return the size of the Nth element of the cell array -func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:72640:28: */ +func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:72644:28: */ *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) = (*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -50023,7 +50024,7 @@ func computeCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:72640 return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) } -func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:72646:12: */ +func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:72650:12: */ if *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) != 0 { return *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(p)).FszCell + uintptr(N)*2)) @@ -50042,7 +50043,7 @@ func cachedCellSize(tls *libc.TLS, p uintptr, N int32) U16 { /* sqlite3.c:72646: // // The MemPage.nFree field is invalidated by this function. It is the // responsibility of the caller to set it correctly. -func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:72665:12: */ +func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg uintptr) int32 { /* sqlite3.c:72669:12: */ var hdr int32 = int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset) // Offset of header on pPg var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData // Pointer to data for pPg var usableSize int32 = int32((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) @@ -50073,12 +50074,12 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg if Uptr(pCell) >= Uptr(aData+uintptr(j)) && Uptr(pCell) < Uptr(pEnd) { if Uptr(pCell+uintptr(sz)) > Uptr(pEnd) { - return Xsqlite3CorruptError(tls, 72698) + return Xsqlite3CorruptError(tls, 72702) } pCell = pTmp + uintptr((int32(pCell)-int32(aData))/1) } else if Uptr(pCell+uintptr(sz)) > Uptr(pSrcEnd) && Uptr(pCell) < Uptr(pSrcEnd) { - return Xsqlite3CorruptError(tls, 72703) + return Xsqlite3CorruptError(tls, 72707) } pData -= uintptr(sz) @@ -50086,7 +50087,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg *(*U8)(unsafe.Pointer(pCellptr + 1)) = U8((int32(pData) - int32(aData)) / 1) pCellptr += uintptr(2) if pData < pCellptr { - return Xsqlite3CorruptError(tls, 72709) + return Xsqlite3CorruptError(tls, 72713) } libc.Xmemmove(tls, pData, pCell, uint32(sz)) @@ -50136,7 +50137,7 @@ func rebuildPage(tls *libc.TLS, pCArray uintptr, iFirst int32, nCell int32, pPg // all cells - not just those inserted by the current call). If the content // area must be extended to before this point in order to accomodate all // cells in apCell[], then the cells do not fit and non-zero is returned. -func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:72755:12: */ +func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, pCellptr uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:72759:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50174,7 +50175,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, if Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))+uintptr(sz)) > Uptr(pEnd) && Uptr(*(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4))) < Uptr(pEnd) { - Xsqlite3CorruptError(tls, 72794) + Xsqlite3CorruptError(tls, 72798) return 1 } libc.Xmemmove(tls, pSlot, *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(pCArray)).FapCell + uintptr(i)*4)), uint32(sz)) @@ -50201,7 +50202,7 @@ func pageInsertArray(tls *libc.TLS, pPg uintptr, pBegin uintptr, ppData uintptr, // The cell-pointers and other fields of the page are not updated. // // This function returns the total number of cells added to the free-list. -func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:72820:12: */ +func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArray uintptr) int32 { /* sqlite3.c:72824:12: */ var aData uintptr = (*MemPage)(unsafe.Pointer(pPg)).FaData var pEnd uintptr = aData + uintptr((*BtShared)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPg)).FpBt)).FusableSize) var pStart uintptr = aData + uintptr(int32((*MemPage)(unsafe.Pointer(pPg)).FhdrOffset)+8+int32((*MemPage)(unsafe.Pointer(pPg)).FchildPtrSize)) @@ -50253,7 +50254,7 @@ func pageFreeArray(tls *libc.TLS, pPg uintptr, iFirst int32, nCell int32, pCArra // // The pPg->nFree field is invalid when this function returns. It is the // responsibility of the caller to set it correctly. -func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:72879:12: */ +func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pCArray uintptr) int32 { /* sqlite3.c:72883:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -50287,7 +50288,7 @@ func editPage(tls *libc.TLS, pPg uintptr, iOld int32, iNew int32, nNew int32, pC if !(nShift > nCell) { goto __2 } - return Xsqlite3CorruptError(tls, 72905) + return Xsqlite3CorruptError(tls, 72909) __2: ; libc.Xmemmove(tls, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx, (*MemPage)(unsafe.Pointer(pPg)).FaCellIdx+uintptr(nShift*2), uint32(nCell*2)) @@ -50427,7 +50428,7 @@ editpage_fail: // byte page number followed by a variable length integer. In other // words, at most 13 bytes. Hence the pSpace buffer must be at // least 13 bytes in size. -func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73008:12: */ +func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr) int32 { /* sqlite3.c:73012:12: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -50440,13 +50441,13 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Page number of pNew if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) == 0 { - return Xsqlite3CorruptError(tls, 73018) + return Xsqlite3CorruptError(tls, 73022) } // dbfuzz001.test // Allocate a new page. This page will become the right-sibling of // pPage. Make the parent page writable, so that the new divider cell // may be inserted. If both these operations are successful, proceed. - *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) = allocateBtreePage(tls, pBt, bp /* &pNew */, bp+4 /* &pgnoNew */, uint32(0), uint8(0)) + *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+4, uint32(0), uint8(0)) if *(*int32)(unsafe.Pointer(bp + 80)) == SQLITE_OK { @@ -50465,7 +50466,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr (*CellArray)(unsafe.Pointer(bp + 16 /* &b */)).FszCell = bp + 12 /* &szCell */ *(*uintptr)(unsafe.Pointer(bp + 16 + 16)) = (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd *(*int32)(unsafe.Pointer(bp + 16 + 40)) = 2 - *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) = rebuildPage(tls, bp+16 /* &b */, 0, 1, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) + *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) = rebuildPage(tls, bp+16, 0, 1, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) if *(*int32)(unsafe.Pointer(bp + 80)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) return *(*int32)(unsafe.Pointer(bp + 80 /* rc */)) @@ -50481,9 +50482,9 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // be marked as dirty. Returning an error code will cause a // rollback, undoing any changes made to the parent page. if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { - ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoNew */)), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pParent)).Fpgno, bp+80 /* &rc */) + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoNew */)), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pParent)).Fpgno, bp+80) if int32(*(*U16)(unsafe.Pointer(bp + 12))) > int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FminLocal) { - ptrmapPutOvflPtr(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), *(*uintptr)(unsafe.Pointer(bp /* pNew */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* pCell */)), bp+80 /* &rc */) + ptrmapPutOvflPtr(tls, *(*uintptr)(unsafe.Pointer(bp /* pNew */)), *(*uintptr)(unsafe.Pointer(bp /* pNew */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* pCell */)), bp+80) } } @@ -50510,7 +50511,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // Insert the new divider cell into pParent. if *(*int32)(unsafe.Pointer(bp + 80)) == SQLITE_OK { insertCell(tls, pParent, int32((*MemPage)(unsafe.Pointer(pParent)).FnCell), pSpace, (int32(pOut)-int32(pSpace))/1, - uintptr(0), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+80 /* &rc */) + uintptr(0), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+80) } // Set the right-child pointer of pParent to point to the new page. @@ -50538,7 +50539,7 @@ func balance_quick(tls *libc.TLS, pParent uintptr, pPage uintptr, pSpace uintptr // The performance of this function is not critical. It is only used by // the balance_shallower() and balance_deeper() procedures, neither of // which are called often under normal circumstances. -func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73163:13: */ +func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { /* sqlite3.c:73167:13: */ if *(*int32)(unsafe.Pointer(pRC)) == SQLITE_OK { var pBt uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FpBt var aFrom uintptr = (*MemPage)(unsafe.Pointer(pFrom)).FaData @@ -50618,7 +50619,7 @@ func copyNodeContent(tls *libc.TLS, pFrom uintptr, pTo uintptr, pRC uintptr) { / // // If aOvflSpace is set to a null pointer, this function returns // SQLITE_NOMEM. -func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73245:12: */ +func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpace uintptr, isRoot int32, bBulk int32) int32 { /* sqlite3.c:73249:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -50712,8 +50713,8 @@ func balance_nonroot(tls *libc.TLS, pParent uintptr, iParentIdx int32, aOvflSpac iSpace1 = 0 iOvflSpace = 0 // Parsed information on cells being balanced - libc.Xmemset(tls, bp /* &abDone[0] */, 0, uint32(unsafe.Sizeof([5]U8{}))) - libc.Xmemset(tls, bp+8 /* &b */, 0, uint32(unsafe.Sizeof(CellArray{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([5]U8{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(CellArray{}))) pBt = (*MemPage)(unsafe.Pointer(pParent)).FpBt // At this point pParent may have at most one overflow cell. And if @@ -50790,18 +50791,18 @@ __12: if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { goto __13 } - libc.Xmemset(tls, bp+72 /* &apOld[0] */, 0, uint32(i+1)*uint32(unsafe.Sizeof(uintptr(0)))) + libc.Xmemset(tls, bp+72, 0, uint32(i+1)*uint32(unsafe.Sizeof(uintptr(0)))) goto balance_cleanup __13: ; if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*4)))).FnFree < 0) { goto __14 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */ + uintptr(i)*4))) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*4))) if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { goto __15 } - libc.Xmemset(tls, bp+72 /* &apOld[0] */, 0, uint32(i)*uint32(unsafe.Sizeof(uintptr(0)))) + libc.Xmemset(tls, bp+72, 0, uint32(i)*uint32(unsafe.Sizeof(uintptr(0)))) goto balance_cleanup __15: ; @@ -50818,17 +50819,17 @@ __16: if !((*MemPage)(unsafe.Pointer(pParent)).FnOverflow != 0 && i+nxDiv == int32(*(*U16)(unsafe.Pointer(pParent + 28)))) { goto __17 } - *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer(pParent + 36)) - *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4))) - *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i)*4)) = int32((*struct { + *(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer(pParent + 36)) + *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4))) + *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)) = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4)))) (*MemPage)(unsafe.Pointer(pParent)).FnOverflow = U8(0) goto __18 __17: - *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4)) = (*MemPage)(unsafe.Pointer(pParent)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pParent)).FaCellIdx + uintptr(2*(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow)))))))) - *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4))) - *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i)*4)) = int32((*struct { + *(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4)) = (*MemPage)(unsafe.Pointer(pParent)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pParent)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pParent)).FaCellIdx + uintptr(2*(i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow)))))))) + *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)) = Xsqlite3Get4byte(tls, *(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4))) + *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)) = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 })(unsafe.Pointer(&struct{ uintptr }{(*MemPage)(unsafe.Pointer(pParent)).FxCellSize})).f(tls, pParent, *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4)))) @@ -50854,13 +50855,13 @@ __17: if !(iOff+*(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)) <= int32((*BtShared)(unsafe.Pointer(pBt)).FusableSize)) { goto __20 } - libc.Xmemcpy(tls, aOvflSpace+uintptr(iOff), *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4)), uint32(*(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i)*4)))) - *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4)) = aOvflSpace + uintptr((int32(*(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4)))-int32((*MemPage)(unsafe.Pointer(pParent)).FaData))/1) + libc.Xmemcpy(tls, aOvflSpace+uintptr(iOff), *(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4)), uint32(*(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)))) + *(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4)) = aOvflSpace + uintptr((int32(*(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4)))-int32((*MemPage)(unsafe.Pointer(pParent)).FaData))/1) __20: ; __19: ; - dropCell(tls, pParent, i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow), *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i)*4)), bp+112 /* &rc */) + dropCell(tls, pParent, i+nxDiv-int32((*MemPage)(unsafe.Pointer(pParent)).FnOverflow), *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)), bp+112) __18: ; goto __10 @@ -50901,7 +50902,7 @@ __21: // // leafCorrection: 4 if pPage is a leaf. 0 if pPage is not a leaf. // leafData: 1 if pPage holds key+data and pParent holds only keys. - (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FpRef = *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */)) + (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FpRef = *(*uintptr)(unsafe.Pointer(bp + 72)) leafCorrection = U16(int32((*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FpRef)).Fleaf) * 4) leafData = int32((*MemPage)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FpRef)).FintKeyLeaf) i = 0 @@ -50909,7 +50910,7 @@ __22: if !(i < nOld) { goto __24 } - pOld = *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */ + uintptr(i)*4)) + pOld = *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*4)) limit = int32((*MemPage)(unsafe.Pointer(pOld)).FnCell) aData = (*MemPage)(unsafe.Pointer(pOld)).FaData maskPage = (*MemPage)(unsafe.Pointer(pOld)).FmaskPage @@ -50920,7 +50921,7 @@ __22: if !(int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pOld)).FaData))) != int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FaData)))) { goto __25 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73441) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73445) goto balance_cleanup __25: ; @@ -50948,7 +50949,7 @@ __25: if !(limit < int32(*(*U16)(unsafe.Pointer(pOld + 28)))) { goto __27 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73465) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73469) goto balance_cleanup __27: ; @@ -50998,17 +50999,17 @@ __34: __35: ; - *(*int32)(unsafe.Pointer(bp + 116 /* &cntOld[0] */ + uintptr(i)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell + *(*int32)(unsafe.Pointer(bp + 116 + uintptr(i)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell if !(i < nOld-1 && !(leafData != 0)) { goto __36 } - sz = U16(*(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i)*4))) + sz = U16(*(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4))) *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*2)) = sz pTemp = aSpace1 + uintptr(iSpace1) iSpace1 = iSpace1 + int32(sz) - libc.Xmemcpy(tls, pTemp, *(*uintptr)(unsafe.Pointer(bp + 84 /* &apDiv[0] */ + uintptr(i)*4)), uint32(sz)) + libc.Xmemcpy(tls, pTemp, *(*uintptr)(unsafe.Pointer(bp + 84 + uintptr(i)*4)), uint32(sz)) *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*4)) = pTemp + uintptr(leafCorrection) *(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FnCell)*2)) = U16(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr((*CellArray)(unsafe.Pointer(bp+8)).FnCell)*2))) - int32(leafCorrection)) @@ -51067,9 +51068,9 @@ __41: if !(i < nOld) { goto __43 } - p = *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */ + uintptr(i)*4)) + p = *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*4)) *(*uintptr)(unsafe.Pointer(bp + 8 + 16 + uintptr(k)*4)) = (*MemPage)(unsafe.Pointer(p)).FaDataEnd - *(*int32)(unsafe.Pointer(bp + 8 + 40 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(bp + 116 /* &cntOld[0] */ + uintptr(i)*4)) + *(*int32)(unsafe.Pointer(bp + 8 + 40 + uintptr(k)*4)) = *(*int32)(unsafe.Pointer(bp + 116 + uintptr(i)*4)) if !(k != 0 && *(*int32)(unsafe.Pointer(bp + 8 + 40 + uintptr(k)*4)) == *(*int32)(unsafe.Pointer(bp + 8 + 40 + uintptr(k-1)*4))) { goto __44 } @@ -51085,7 +51086,7 @@ __44: __45: ; - *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i)*4)) = usableSpace - (*MemPage)(unsafe.Pointer(p)).FnFree + *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)) = usableSpace - (*MemPage)(unsafe.Pointer(p)).FnFree j = 0 __46: if !(j < int32((*MemPage)(unsafe.Pointer(p)).FnOverflow)) { @@ -51101,7 +51102,7 @@ __47: goto __48 __48: ; - *(*int32)(unsafe.Pointer(bp + 136 /* &cntNew[0] */ + uintptr(i)*4)) = *(*int32)(unsafe.Pointer(bp + 116 /* &cntOld[0] */ + uintptr(i)*4)) + *(*int32)(unsafe.Pointer(bp + 136 + uintptr(i)*4)) = *(*int32)(unsafe.Pointer(bp + 116 + uintptr(i)*4)) goto __42 __42: i++ @@ -51127,12 +51128,12 @@ __52: if !(k > NB+2) { goto __55 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73566) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73570) goto balance_cleanup __55: ; - *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(k-1)*4)) = 0 - *(*int32)(unsafe.Pointer(bp + 136 /* &cntNew[0] */ + uintptr(k-1)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell + *(*int32)(unsafe.Pointer(bp + 92 + uintptr(k-1)*4)) = 0 + *(*int32)(unsafe.Pointer(bp + 136 + uintptr(k-1)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell __54: ; sz1 = 2 + int32(cachedCellSize(tls, bp+8, *(*int32)(unsafe.Pointer(bp + 136 + uintptr(i)*4))-1)) @@ -51152,7 +51153,7 @@ __58: __56: ; *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i+1)*4)) += sz1 - *(*int32)(unsafe.Pointer(bp + 136 /* &cntNew[0] */ + uintptr(i)*4))-- + *(*int32)(unsafe.Pointer(bp + 136 + uintptr(i)*4))-- goto __52 __53: ; @@ -51168,7 +51169,7 @@ __59: __61: ; *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)) += sz1 - *(*int32)(unsafe.Pointer(bp + 136 /* &cntNew[0] */ + uintptr(i)*4))++ + *(*int32)(unsafe.Pointer(bp + 136 + uintptr(i)*4))++ if !!(leafData != 0) { goto __62 } @@ -51201,7 +51202,7 @@ __65: }()) { goto __67 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73599) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73603) goto balance_cleanup __67: ; @@ -51229,16 +51230,16 @@ __68: if !(i > 0) { goto __70 } - szRight = *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i)*4)) // Size of sibling on the right - szLeft = *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i-1)*4)) // Index of first cell to the left of right sibling + szRight = *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)) // Size of sibling on the right + szLeft = *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i-1)*4)) // Index of first cell to the left of right sibling r = *(*int32)(unsafe.Pointer(bp + 136 + uintptr(i-1)*4)) - 1 d = r + 1 - leafData - cachedCellSize(tls, bp+8 /* &b */, d) + cachedCellSize(tls, bp+8, d) __71: ; - cachedCellSize(tls, bp+8 /* &b */, r) + cachedCellSize(tls, bp+8, r) if !(szRight != 0 && (bBulk != 0 || szRight+int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2)))+2 > szLeft-(int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(r)*2)))+func() int32 { if i == k-1 { @@ -51253,7 +51254,7 @@ __74: ; szRight = szRight + (int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(d)*2))) + 2) szLeft = szLeft - (int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(r)*2))) + 2) - *(*int32)(unsafe.Pointer(bp + 136 /* &cntNew[0] */ + uintptr(i-1)*4)) = r + *(*int32)(unsafe.Pointer(bp + 136 + uintptr(i-1)*4)) = r r-- d-- goto __72 @@ -51264,8 +51265,8 @@ __72: goto __73 __73: ; - *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i)*4)) = szRight - *(*int32)(unsafe.Pointer(bp + 92 /* &szNew[0] */ + uintptr(i-1)*4)) = szLeft + *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i)*4)) = szRight + *(*int32)(unsafe.Pointer(bp + 92 + uintptr(i-1)*4)) = szLeft if !(*(*int32)(unsafe.Pointer(bp + 136 + uintptr(i-1)*4)) <= func() int32 { if i > 1 { return *(*int32)(unsafe.Pointer(bp + 136 + uintptr(i-2)*4)) @@ -51274,7 +51275,7 @@ __73: }()) { goto __75 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73641) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73645) goto balance_cleanup __75: ; @@ -51294,7 +51295,7 @@ __70: // that page. // Allocate k new pages. Reuse old pages where possible. - pageFlags = int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */)))).FaData))) + pageFlags = int32(*(*U8)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 72)))).FaData))) i = 0 __76: if !(i < k) { @@ -51303,15 +51304,15 @@ __76: if !(i < nOld) { goto __79 } - *(*uintptr)(unsafe.Pointer(bp + 176 /* pNew */)) = libc.AssignPtrUintptr(bp+156+uintptr(i)*4, *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */ + uintptr(i)*4))) - *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */ + uintptr(i)*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 176 /* pNew */)) = libc.AssignPtrUintptr(bp+156+uintptr(i)*4, *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*4))) + *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*4)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176 /* pNew */)))).FpDbPage) nNew++ if !(Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176)))).FpDbPage) != 1+libc.Bool32(i == iParentIdx-nxDiv) && *(*int32)(unsafe.Pointer(bp + 112)) == SQLITE_OK) { goto __81 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73674) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73678) __81: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -51323,7 +51324,7 @@ __82: goto __80 __79: ; - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = allocateBtreePage(tls, pBt, bp+176 /* &pNew */, bp+180 /* &pgno */, func() uint32 { + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = allocateBtreePage(tls, pBt, bp+176, bp+180, func() uint32 { if bBulk != 0 { return uint32(1) } @@ -51336,15 +51337,15 @@ __79: __83: ; zeroPage(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pNew */)), pageFlags) - *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer(bp + 176 /* pNew */)) + *(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer(bp + 176 /* pNew */)) nNew++ - *(*int32)(unsafe.Pointer(bp + 116 /* &cntOld[0] */ + uintptr(i)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell + *(*int32)(unsafe.Pointer(bp + 116 + uintptr(i)*4)) = (*CellArray)(unsafe.Pointer(bp + 8 /* &b */)).FnCell // Set the pointer-map entry for the new sibling page. if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __84 } - ptrmapPut(tls, pBt, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176 /* pNew */)))).Fpgno, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pParent)).Fpgno, bp+112 /* &rc */) + ptrmapPut(tls, pBt, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 176 /* pNew */)))).Fpgno, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pParent)).Fpgno, bp+112) if !(*(*int32)(unsafe.Pointer(bp + 112)) != SQLITE_OK) { goto __85 } @@ -51378,8 +51379,8 @@ __86: if !(i < nNew) { goto __88 } - *(*Pgno)(unsafe.Pointer(bp + 184 /* &aPgOrder[0] */ + uintptr(i)*4)) = libc.AssignPtrUint32(bp+204+uintptr(i)*4, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(i)*4)))).Fpgno) - *(*U16)(unsafe.Pointer(bp + 224 /* &aPgFlags[0] */ + uintptr(i)*2)) = (*DbPage)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(i)*4)))).FpDbPage)).Fflags + *(*Pgno)(unsafe.Pointer(bp + 184 + uintptr(i)*4)) = libc.AssignPtrUint32(bp+204+uintptr(i)*4, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4)))).Fpgno) + *(*U16)(unsafe.Pointer(bp + 224 + uintptr(i)*2)) = (*DbPage)(unsafe.Pointer((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4)))).FpDbPage)).Fflags j = 0 __89: if !(j < i) { @@ -51395,7 +51396,7 @@ __89: // cache with two separate objects associated with the same // page number. - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73720) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73724) goto balance_cleanup __92: ; @@ -51437,19 +51438,19 @@ __97: goto __98 __98: ; - *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)) = *(*Pgno)(unsafe.Pointer(bp + 184 /* &aPgOrder[0] */ + uintptr(iBest)*4)) - *(*Pgno)(unsafe.Pointer(bp + 184 /* &aPgOrder[0] */ + uintptr(iBest)*4)) = 0xffffffff + *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)) = *(*Pgno)(unsafe.Pointer(bp + 184 + uintptr(iBest)*4)) + *(*Pgno)(unsafe.Pointer(bp + 184 + uintptr(iBest)*4)) = 0xffffffff if !(iBest != i) { goto __100 } if !(iBest > i) { goto __101 } - Xsqlite3PagerRekey(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(iBest)*4)))).FpDbPage, (*BtShared)(unsafe.Pointer(pBt)).FnPage+U32(iBest)+U32(1), uint16(0)) + Xsqlite3PagerRekey(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(iBest)*4)))).FpDbPage, (*BtShared)(unsafe.Pointer(pBt)).FnPage+U32(iBest)+U32(1), uint16(0)) __101: ; - Xsqlite3PagerRekey(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(i)*4)))).FpDbPage, *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)), *(*U16)(unsafe.Pointer(bp + 224 /* &aPgFlags[0] */ + uintptr(iBest)*2))) - (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(i)*4)))).Fpgno = *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)) + Xsqlite3PagerRekey(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4)))).FpDbPage, *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)), *(*U16)(unsafe.Pointer(bp + 224 + uintptr(iBest)*2))) + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4)))).Fpgno = *(*Pgno)(unsafe.Pointer(bp + 180 /* pgno */)) __100: ; goto __94 @@ -51460,7 +51461,7 @@ __94: __95: ; - Xsqlite3Put4byte(tls, pRight, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(nNew-1)*4)))).Fpgno) + Xsqlite3Put4byte(tls, pRight, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(nNew-1)*4)))).Fpgno) // If the sibling pages are not leaves, ensure that the right-child pointer // of the right-most new sibling page is set to the value that was @@ -51496,7 +51497,7 @@ __102: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __103 } - pNew1 = libc.AssignUintptr(&pOld2, *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */))) + pNew1 = libc.AssignUintptr(&pOld2, *(*uintptr)(unsafe.Pointer(bp + 156))) cntOldNext = int32((*MemPage)(unsafe.Pointer(pNew1)).FnCell) + int32((*MemPage)(unsafe.Pointer(pNew1)).FnOverflow) iNew = 0 iOld = 0 @@ -51514,9 +51515,9 @@ __107: iOld++ if iOld < nNew { - pOld2 = *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(iOld)*4)) + pOld2 = *(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(iOld)*4)) } else { - pOld2 = *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */ + uintptr(iOld)*4)) + pOld2 = *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(iOld)*4)) } cntOldNext = cntOldNext + (int32((*MemPage)(unsafe.Pointer(pOld2)).FnCell) + int32((*MemPage)(unsafe.Pointer(pOld2)).FnOverflow) + libc.BoolInt32(!(leafData != 0))) goto __107 @@ -51525,7 +51526,7 @@ __108: if !(i == *(*int32)(unsafe.Pointer(bp + 136 + uintptr(iNew)*4))) { goto __109 } - pNew1 = *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(libc.PreIncInt32(&iNew, 1))*4)) + pNew1 = *(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(libc.PreIncInt32(&iNew, 1))*4)) if !!(leafData != 0) { goto __110 } @@ -51549,13 +51550,13 @@ __109: if !!(leafCorrection != 0) { goto __112 } - ptrmapPut(tls, pBt, Xsqlite3Get4byte(tls, pCell), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pNew1)).Fpgno, bp+112 /* &rc */) + ptrmapPut(tls, pBt, Xsqlite3Get4byte(tls, pCell), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pNew1)).Fpgno, bp+112) __112: ; if !(int32(cachedCellSize(tls, bp+8, i)) > int32((*MemPage)(unsafe.Pointer(pNew1)).FminLocal)) { goto __113 } - ptrmapPutOvflPtr(tls, pNew1, pOld2, pCell, bp+112 /* &rc */) + ptrmapPutOvflPtr(tls, pNew1, pOld2, pCell, bp+112) __113: ; if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { @@ -51582,8 +51583,8 @@ __115: if !(i < nNew-1) { goto __117 } - pNew2 = *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(i)*4)) - j = *(*int32)(unsafe.Pointer(bp + 136 /* &cntNew[0] */ + uintptr(i)*4)) + pNew2 = *(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4)) + j = *(*int32)(unsafe.Pointer(bp + 136 + uintptr(i)*4)) pCell1 = *(*uintptr)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8 /* &b */)).FapCell + uintptr(j)*4)) sz2 = int32(*(*U16)(unsafe.Pointer((*CellArray)(unsafe.Pointer(bp+8)).FszCell + uintptr(j)*2))) + int32(leafCorrection) @@ -51648,11 +51649,11 @@ __125: if !(Uptr(pSrcEnd) >= Uptr(pCell1) && Uptr(pSrcEnd) < Uptr(pCell1+uintptr(sz2))) { goto __126 } - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73877) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = Xsqlite3CorruptError(tls, 73881) goto balance_cleanup __126: ; - insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno, bp+112 /* &rc */) + insertCell(tls, pParent, nxDiv+i, pCell1, sz2, pTemp1, (*MemPage)(unsafe.Pointer(pNew2)).Fpgno, bp+112) if !(*(*int32)(unsafe.Pointer(bp + 112)) != SQLITE_OK) { goto __127 } @@ -51721,7 +51722,7 @@ __131: goto __133 } iNew1 = libc.AssignInt32(&iOld1, 0) - nNewCell = *(*int32)(unsafe.Pointer(bp + 136 /* &cntNew[0] */)) + nNewCell = *(*int32)(unsafe.Pointer(bp + 136)) goto __134 __133: if iPg < nOld { @@ -51734,15 +51735,15 @@ __133: __134: ; - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = editPage(tls, *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(iPg)*4)), iOld1, iNew1, nNewCell, bp+8 /* &b */) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = editPage(tls, *(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(iPg)*4)), iOld1, iNew1, nNewCell, bp+8) if !(*(*int32)(unsafe.Pointer(bp + 112)) != 0) { goto __135 } goto balance_cleanup __135: ; - *(*U8)(unsafe.Pointer(bp /* &abDone[0] */ + uintptr(iPg)))++ - (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(iPg)*4)))).FnFree = usableSpace - *(*int32)(unsafe.Pointer(bp + 92 + uintptr(iPg)*4)) + *(*U8)(unsafe.Pointer(bp + uintptr(iPg)))++ + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(iPg)*4)))).FnFree = usableSpace - *(*int32)(unsafe.Pointer(bp + 92 + uintptr(iPg)*4)) __132: ; @@ -51774,10 +51775,10 @@ __130: // by smaller than the child due to the database header, and so all the // free space needs to be up front. - *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = defragmentPage(tls, *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */)), -1) + *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = defragmentPage(tls, *(*uintptr)(unsafe.Pointer(bp + 156)), -1) - copyNodeContent(tls, *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */)), pParent, bp+112 /* &rc */) - freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */)), bp+112 /* &rc */) + copyNodeContent(tls, *(*uintptr)(unsafe.Pointer(bp + 156)), pParent, bp+112) + freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 156)), bp+112) goto __137 __136: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && !(leafCorrection != 0)) { @@ -51792,7 +51793,7 @@ __139: goto __141 } key = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4)))).FaData+8) - ptrmapPut(tls, pBt, key, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(i)*4)))).Fpgno, bp+112 /* &rc */) + ptrmapPut(tls, pBt, key, uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4)))).Fpgno, bp+112) goto __140 __140: i++ @@ -51811,7 +51812,7 @@ __142: if !(i < nOld) { goto __144 } - freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */ + uintptr(i)*4)), bp+112 /* &rc */) + freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*4)), bp+112) goto __143 __143: i++ @@ -51828,7 +51829,7 @@ __145: if !(i < nOld) { goto __147 } - releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* &apOld[0] */ + uintptr(i)*4))) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 72 + uintptr(i)*4))) goto __146 __146: i++ @@ -51841,7 +51842,7 @@ __148: if !(i < nNew) { goto __150 } - releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 156 /* &apNew[0] */ + uintptr(i)*4))) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 156 + uintptr(i)*4))) goto __149 __149: i++ @@ -51870,7 +51871,7 @@ __150: // page and SQLITE_OK is returned. In this case the caller is required // to call releasePage() on *ppChild exactly once. If an error occurs, // an error code is returned and *ppChild is set to 0. -func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74042:12: */ +func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sqlite3.c:74046:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -51885,10 +51886,10 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // of the node stored on pRoot into the new child page. *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pRoot)).FpDbPage) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = allocateBtreePage(tls, pBt, bp /* &pChild */, bp+4 /* &pgnoChild */, (*MemPage)(unsafe.Pointer(pRoot)).Fpgno, uint8(0)) - copyNodeContent(tls, pRoot, *(*uintptr)(unsafe.Pointer(bp /* pChild */)), bp+8 /* &rc */) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = allocateBtreePage(tls, pBt, bp, bp+4, (*MemPage)(unsafe.Pointer(pRoot)).Fpgno, uint8(0)) + copyNodeContent(tls, pRoot, *(*uintptr)(unsafe.Pointer(bp /* pChild */)), bp+8) if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { - ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoChild */)), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pRoot)).Fpgno, bp+8 /* &rc */) + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* pgnoChild */)), uint8(PTRMAP_BTREE), (*MemPage)(unsafe.Pointer(pRoot)).Fpgno, bp+8) } } if *(*int32)(unsafe.Pointer(bp + 8)) != 0 { @@ -51921,13 +51922,13 @@ func balance_deeper(tls *libc.TLS, pRoot uintptr, ppChild uintptr) int32 { /* sq // table linked to the same b-tree. If the secondary insert causes a // rebalance, that can change content out from under the cursor on the // first SQL table, violating invariants on the first insert. -func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74100:12: */ +func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74104:12: */ var pOther uintptr for pOther = (*BtShared)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBt)).FpCursor; pOther != 0; pOther = (*BtCursor)(unsafe.Pointer(pOther)).FpNext { if pOther != pCur && int32((*BtCursor)(unsafe.Pointer(pOther)).FeState) == CURSOR_VALID && (*BtCursor)(unsafe.Pointer(pOther)).FpPage == (*BtCursor)(unsafe.Pointer(pCur)).FpPage { - return Xsqlite3CorruptError(tls, 74107) + return Xsqlite3CorruptError(tls, 74111) } } return SQLITE_OK @@ -51941,7 +51942,7 @@ func anotherValidCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74100: // balance_quick() // balance_deeper() // balance_nonroot() -func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74123:12: */ +func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74127:12: */ bp := tls.Alloc(13) defer tls.Free(13) @@ -52006,7 +52007,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74123:12: */ // function. If this were not verified, a subtle bug involving reuse // of the aBalanceQuickSpace[] might sneak in. - rc = balance_quick(tls, pParent, pPage, bp /* &aBalanceQuickSpace[0] */) + rc = balance_quick(tls, pParent, pPage, bp) } else { // In this case, call balance_nonroot() to redistribute cells // between pPage and up to 2 of its sibling pages. This involves @@ -52060,7 +52061,7 @@ func balance(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:74123:12: */ // Overwrite content from pX into pDest. Only do the write if the // content is different from what is already there. -func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74249:12: */ +func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintptr, iOffset int32, iAmt int32) int32 { /* sqlite3.c:74253:12: */ var nData int32 = (*BtreePayload)(unsafe.Pointer(pX)).FnData - iOffset if nData <= 0 { // Overwritting with zeros @@ -52102,7 +52103,7 @@ func btreeOverwriteContent(tls *libc.TLS, pPage uintptr, pDest uintptr, pX uintp // Overwrite the cell that cursor pCur is pointing to with fresh content // contained in pX. -func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74292:12: */ +func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqlite3.c:74296:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -52116,7 +52117,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli if (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload+uintptr((*BtCursor)(unsafe.Pointer(pCur)).Finfo.FnLocal) > (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaDataEnd || (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload < (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaData+uintptr((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FcellOffset) { - return Xsqlite3CorruptError(tls, 74304) + return Xsqlite3CorruptError(tls, 74308) } // Overwrite the local portion first rc = btreeOverwriteContent(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), (*BtCursor)(unsafe.Pointer(pCur)).Finfo.FpPayload, pX, @@ -52135,12 +52136,12 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli pBt = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FpBt ovflPageSize = (*BtShared)(unsafe.Pointer(pBt)).FusableSize - U32(4) for ok := true; ok; ok = iOffset < nTotal { - rc = btreeGetPage(tls, pBt, ovflPgno, bp /* &pPage */, 0) + rc = btreeGetPage(tls, pBt, ovflPgno, bp, 0) if rc != 0 { return rc } if Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1 || (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FisInit != 0 { - rc = Xsqlite3CorruptError(tls, 74323) + rc = Xsqlite3CorruptError(tls, 74327) } else { if U32(iOffset)+ovflPageSize < U32(nTotal) { ovflPgno = Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pPage */)))).FaData) @@ -52187,7 +52188,7 @@ func btreeOverwriteCell(tls *libc.TLS, pCur uintptr, pX uintptr) int32 { /* sqli // if pX->nMem is non-zero, then pX->aMem contains pointers to the unpacked // key values and pX->aMem can be used instead of pX->pKey to avoid having // to decode the key. -func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74371:20: */ +func Xsqlite3BtreeInsert(tls *libc.TLS, pCur uintptr, pX uintptr, flags int32, seekResult int32) int32 { /* sqlite3.c:74375:20: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -52259,7 +52260,7 @@ __3: // Which can only happen if the SQLITE_NoSchemaError flag was set when // the schema was loaded. This cannot be asserted though, as a user might // set the flag, load the schema, and then unset the flag. - return Xsqlite3CorruptError(tls, 74428) + return Xsqlite3CorruptError(tls, 74432) __4: ; __2: @@ -52308,7 +52309,7 @@ __8: // to an adjacent cell. Move the cursor so that it is pointing either // to the cell to be overwritten or an adjacent cell. *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3BtreeTableMoveto(tls, pCur, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, - libc.Bool32(flags&BTREE_APPEND != 0), bp /* &loc */) + libc.Bool32(flags&BTREE_APPEND != 0), bp) if !(*(*int32)(unsafe.Pointer(bp + 72)) != 0) { goto __12 } @@ -52342,11 +52343,11 @@ __5: (*UnpackedRecord)(unsafe.Pointer(bp + 4 /* &r */)).FnField = (*BtreePayload)(unsafe.Pointer(pX)).FnMem (*UnpackedRecord)(unsafe.Pointer(bp + 4 /* &r */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 4 /* &r */)).FeqSeen = U8(0) - *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3BtreeIndexMoveto(tls, pCur, bp+4 /* &r */, bp /* &loc */) + *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3BtreeIndexMoveto(tls, pCur, bp+4, bp) goto __15 __14: *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = btreeMoveto(tls, pCur, (*BtreePayload)(unsafe.Pointer(pX)).FpKey, (*BtreePayload)(unsafe.Pointer(pX)).FnKey, - libc.Bool32(flags&BTREE_APPEND != 0), bp /* &loc */) + libc.Bool32(flags&BTREE_APPEND != 0), bp) __15: ; if !(*(*int32)(unsafe.Pointer(bp + 72)) != 0) { @@ -52371,7 +52372,7 @@ __13: (*BtreePayload)(unsafe.Pointer(bp + 20 /* &x2 */)).FpData = (*BtreePayload)(unsafe.Pointer(pX)).FpKey (*BtreePayload)(unsafe.Pointer(bp + 20 /* &x2 */)).FnData = int32((*BtreePayload)(unsafe.Pointer(pX)).FnKey) (*BtreePayload)(unsafe.Pointer(bp + 20 /* &x2 */)).FnZero = 0 - return btreeOverwriteCell(tls, pCur, bp+20 /* &x2 */) + return btreeOverwriteCell(tls, pCur, bp+20) __18: ; __17: @@ -52387,7 +52388,7 @@ __6: if !(int32((*BtCursor)(unsafe.Pointer(pCur)).FeState) > CURSOR_INVALID) { goto __20 } - *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3CorruptError(tls, 74528) + *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3CorruptError(tls, 74532) goto __21 __20: *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = btreeComputeFreeSpace(tls, pPage) @@ -52425,14 +52426,14 @@ __25: goto __27 } ovfl = Xsqlite3Get4byte(tls, newCell+uintptr(*(*int32)(unsafe.Pointer(bp + 76))-4)) - ptrmapPut(tls, pBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+72 /* &rc */) + ptrmapPut(tls, pBt, ovfl, uint8(PTRMAP_OVERFLOW1), (*MemPage)(unsafe.Pointer(pPage)).Fpgno, bp+72) __27: ; __26: ; goto __24 __23: - *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = fillInCell(tls, pPage, newCell, pX, bp+76 /* &szNew */) + *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = fillInCell(tls, pPage, newCell, pX, bp+76) __24: ; if !(*(*int32)(unsafe.Pointer(bp + 72)) != 0) { @@ -52450,7 +52451,7 @@ __28: if !(idx >= int32((*MemPage)(unsafe.Pointer(pPage)).FnCell)) { goto __31 } - return Xsqlite3CorruptError(tls, 74564) + return Xsqlite3CorruptError(tls, 74568) __31: ; *(*int32)(unsafe.Pointer(bp + 72 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pPage)).FpDbPage) @@ -52498,20 +52499,20 @@ __35: if !(oldCell < (*MemPage)(unsafe.Pointer(pPage)).FaData+uintptr((*MemPage)(unsafe.Pointer(pPage)).FhdrOffset)+uintptr(10)) { goto __37 } - return Xsqlite3CorruptError(tls, 74591) + return Xsqlite3CorruptError(tls, 74595) __37: ; if !(oldCell+uintptr(*(*int32)(unsafe.Pointer(bp + 76))) > (*MemPage)(unsafe.Pointer(pPage)).FaDataEnd) { goto __38 } - return Xsqlite3CorruptError(tls, 74594) + return Xsqlite3CorruptError(tls, 74598) __38: ; libc.Xmemcpy(tls, oldCell, newCell, uint32(*(*int32)(unsafe.Pointer(bp + 76 /* szNew */)))) return SQLITE_OK __36: ; - dropCell(tls, pPage, idx, int32((*CellInfo)(unsafe.Pointer(bp+80 /* &info1 */)).FnSize), bp+72 /* &rc */) + dropCell(tls, pPage, idx, int32((*CellInfo)(unsafe.Pointer(bp+80 /* &info1 */)).FnSize), bp+72) if !(*(*int32)(unsafe.Pointer(bp + 72)) != 0) { goto __39 } @@ -52533,7 +52534,7 @@ __41: ; __30: ; - insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 76 /* szNew */)), uintptr(0), uint32(0), bp+72 /* &rc */) + insertCell(tls, pPage, idx, newCell, *(*int32)(unsafe.Pointer(bp + 76 /* szNew */)), uintptr(0), uint32(0), bp+72) // If no error has occurred and pPage has an overflow cell, call balance() // to redistribute the cells within the tree. Since balance() may move @@ -52612,7 +52613,7 @@ end_insert: // calling sqlite3BtreeInsert() with the BTREE_PREFORMAT flag specified. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:74680:20: */ +func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I64) int32 { /* sqlite3.c:74684:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -52639,7 +52640,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I nIn = U32((*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnLocal) aIn = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload if aIn+uintptr(nIn) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 74694) + return Xsqlite3CorruptError(tls, 74698) } nRem = (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FnPayload if nIn == nRem && nIn < U32((*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pDest)).FpPage)).FmaxLocal) { @@ -52662,7 +52663,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nRem > nIn { if aIn+uintptr(nIn)+uintptr(4) > (*MemPage)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pSrc)).FpPage)).FaDataEnd { - return Xsqlite3CorruptError(tls, 74717) + return Xsqlite3CorruptError(tls, 74721) } ovflIn = Xsqlite3Get4byte(tls, (*BtCursor)(unsafe.Pointer(pSrc)).Finfo.FpPayload+uintptr(nIn)) } @@ -52687,7 +52688,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I if nOut > U32(0) { Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageIn */))) *(*uintptr)(unsafe.Pointer(bp /* pPageIn */)) = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3PagerGet(tls, pSrcPager, ovflIn, bp /* &pPageIn */, PAGER_GET_READONLY) + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3PagerGet(tls, pSrcPager, ovflIn, bp, PAGER_GET_READONLY) if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { aIn = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pPageIn */))) ovflIn = Xsqlite3Get4byte(tls, aIn) @@ -52701,10 +52702,10 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // var pgnoNew Pgno at bp+8, 4 *(*uintptr)(unsafe.Pointer(bp + 4 /* pNew */)) = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = allocateBtreePage(tls, pBt, bp+4 /* &pNew */, bp+8 /* &pgnoNew */, uint32(0), uint8(0)) + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = allocateBtreePage(tls, pBt, bp+4, bp+8, uint32(0), uint8(0)) Xsqlite3Put4byte(tls, pPgnoOut, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoNew */))) if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && pPageOut != 0 { - ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoNew */)), uint8(PTRMAP_OVERFLOW2), (*MemPage)(unsafe.Pointer(pPageOut)).Fpgno, bp+12 /* &rc */) + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 8 /* pgnoNew */)), uint8(PTRMAP_OVERFLOW2), (*MemPage)(unsafe.Pointer(pPageOut)).Fpgno, bp+12) } releasePage(tls, pPageOut) pPageOut = *(*uintptr)(unsafe.Pointer(bp + 4 /* pNew */)) @@ -52744,7 +52745,7 @@ func Xsqlite3BtreeTransferRow(tls *libc.TLS, pDest uintptr, pSrc uintptr, iKey I // operation on non-FORDELETE cursors is tagged with the AUXDELETE flag. // The BTREE_AUXDELETE bit is a hint that is not used by this implementation, // but which might be used by alternative storage engines. -func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:74790:20: */ +func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlite3.c:74794:20: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -52774,7 +52775,10 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit pPage = (*BtCursor)(unsafe.Pointer(pCur)).FpPage pCell = (*MemPage)(unsafe.Pointer(pPage)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pPage)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pPage)).FaCellIdx + uintptr(2*iCellIdx)))))) if (*MemPage)(unsafe.Pointer(pPage)).FnFree < 0 && btreeComputeFreeSpace(tls, pPage) != 0 { - return SQLITE_CORRUPT + return Xsqlite3CorruptError(tls, 74825) + } + if int32((*MemPage)(unsafe.Pointer(pPage)).FnCell) <= iCellIdx { + return Xsqlite3CorruptError(tls, 74828) } // If the bPreserve flag is set to true, then the cursor position must @@ -52847,7 +52851,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = SQLITE_OK } - dropCell(tls, pPage, iCellIdx, int32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize), bp+20 /* &rc */) + dropCell(tls, pPage, iCellIdx, int32((*CellInfo)(unsafe.Pointer(bp /* &info */)).FnSize), bp+20) if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { return *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) } @@ -52876,7 +52880,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit } pCell = (*MemPage)(unsafe.Pointer(pLeaf)).FaData + uintptr(int32((*MemPage)(unsafe.Pointer(pLeaf)).FmaskPage)&int32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((*MemPage)(unsafe.Pointer(pLeaf)).FaCellIdx + uintptr(2*(int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1))))))) if pCell < (*MemPage)(unsafe.Pointer(pLeaf)).FaData+4 { - return Xsqlite3CorruptError(tls, 74901) + return Xsqlite3CorruptError(tls, 74910) } nCell = int32((*struct { f func(*libc.TLS, uintptr, uintptr) U16 @@ -52886,9 +52890,9 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(pLeaf)).FpDbPage) if *(*int32)(unsafe.Pointer(bp + 20)) == SQLITE_OK { - insertCell(tls, pPage, iCellIdx, pCell-uintptr(4), nCell+4, pTmp, n, bp+20 /* &rc */) + insertCell(tls, pPage, iCellIdx, pCell-uintptr(4), nCell+4, pTmp, n, bp+20) } - dropCell(tls, pLeaf, int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1, nCell, bp+20 /* &rc */) + dropCell(tls, pLeaf, int32((*MemPage)(unsafe.Pointer(pLeaf)).FnCell)-1, nCell, bp+20) if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { return *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) } @@ -52953,7 +52957,7 @@ func Xsqlite3BtreeDelete(tls *libc.TLS, pCur uintptr, flags U8) int32 { /* sqlit // // BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys // BTREE_ZERODATA Used for SQL indices -func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:74975:12: */ +func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags int32) int32 { /* sqlite3.c:74984:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -52981,9 +52985,9 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // Read the value of meta[3] from the database to determine where the // root page of the new table should go. meta[3] is the largest root-page // created so far, so the new root-page is (meta[3]+1). - Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp /* &pgnoRoot */) + Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp) if *(*Pgno)(unsafe.Pointer(bp)) > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75009) + return Xsqlite3CorruptError(tls, 75018) } *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */))++ @@ -52996,7 +53000,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags // Allocate a page. The page that currently resides at pgnoRoot will // be moved to the allocated page (unless the allocated page happens // to reside at pgnoRoot). - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = allocateBtreePage(tls, pBt, bp+4 /* &pPageMove */, bp+8 /* &pgnoMove */, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), uint8(BTALLOC_EXACT)) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = allocateBtreePage(tls, pBt, bp+4, bp+8, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), uint8(BTALLOC_EXACT)) if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -53020,13 +53024,13 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } // Move the page currently at pgnoRoot to pgnoMove. - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+12 /* &pRoot */, 0) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+12, 0) if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+16 /* &eType */, bp+20 /* &iPtrPage */) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = ptrmapGet(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+16, bp+20) if int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_ROOTPAGE || int32(*(*U8)(unsafe.Pointer(bp + 16))) == PTRMAP_FREEPAGE { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75057) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75066) } if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pRoot */))) @@ -53040,7 +53044,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+12 /* &pRoot */, 0) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), bp+12, 0) if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -53054,7 +53058,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } // Update the pointer-map and meta-data with the new root-page number. - ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), uint8(PTRMAP_ROOTPAGE), uint32(0), bp+24 /* &rc */) + ptrmapPut(tls, pBt, *(*Pgno)(unsafe.Pointer(bp /* pgnoRoot */)), uint8(PTRMAP_ROOTPAGE), uint32(0), bp+24) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pRoot */))) return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) @@ -53071,7 +53075,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags } } else { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = allocateBtreePage(tls, pBt, bp+12 /* &pRoot */, bp /* &pgnoRoot */, uint32(1), uint8(0)) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = allocateBtreePage(tls, pBt, bp+12, bp, uint32(1), uint8(0)) if *(*int32)(unsafe.Pointer(bp + 24)) != 0 { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -53089,7 +53093,7 @@ func btreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, createTabFlags return SQLITE_OK } -func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75120:20: */ +func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags int32) int32 { /* sqlite3.c:75129:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeCreateTable(tls, p, piTable, flags) @@ -53099,7 +53103,7 @@ func Xsqlite3BtreeCreateTable(tls *libc.TLS, p uintptr, piTable uintptr, flags i // Erase the given database page and all its children. Return // the page to the freelist. -func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75132:12: */ +func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32, pnChange uintptr) int32 { /* sqlite3.c:75141:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -53115,10 +53119,10 @@ func clearDatabasePage(tls *libc.TLS, pBt uintptr, pgno Pgno, freePageFlag int32 if !(pgno > btreePagecount(tls, pBt)) { goto __1 } - return Xsqlite3CorruptError(tls, 75147) + return Xsqlite3CorruptError(tls, 75156) __1: ; - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp /* &pPage */, uintptr(0), 0) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = getAndInitPage(tls, pBt, pgno, bp, uintptr(0), 0) if !(*(*int32)(unsafe.Pointer(bp + 24)) != 0) { goto __2 } @@ -53129,7 +53133,7 @@ __2: Xsqlite3PagerPageRefcount(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage) != 1) { goto __3 } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75154) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3CorruptError(tls, 75163) goto cleardatabasepage_out __3: ; @@ -53206,7 +53210,7 @@ __15: if !(freePageFlag != 0) { goto __16 } - freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+24 /* &rc */) + freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+24) goto __17 __16: if !(libc.AssignPtrInt32(bp+24, Xsqlite3PagerWrite(tls, (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpDbPage)) == 0) { @@ -53233,7 +53237,7 @@ cleardatabasepage_out: // // If pnChange is not NULL, then the integer value pointed to by pnChange // is incremented by the number of entries in the table. -func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75199:20: */ +func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange uintptr) int32 { /* sqlite3.c:75208:20: */ var rc int32 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53256,7 +53260,7 @@ func Xsqlite3BtreeClearTable(tls *libc.TLS, p uintptr, iTable int32, pnChange ui // Delete all information from the single table that pCur is open on. // // This routine only work for pCur on an ephemeral table. -func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75225:20: */ +func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:75234:20: */ return Xsqlite3BtreeClearTable(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree, int32((*BtCursor)(unsafe.Pointer(pCur)).FpgnoRoot), uintptr(0)) } @@ -53278,7 +53282,7 @@ func Xsqlite3BtreeClearTableOfCursor(tls *libc.TLS, pCur uintptr) int32 { /* sql // the move. If no page gets moved, *piMoved is set to 0. // The last root page is recorded in meta[3] and the value of // meta[3] is updated by this procedure. -func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75249:12: */ +func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int32 { /* sqlite3.c:75258:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53288,14 +53292,14 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt if iTable > btreePagecount(tls, pBt) { - return Xsqlite3CorruptError(tls, 75258) + return Xsqlite3CorruptError(tls, 75267) } *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3BtreeClearTable(tls, p, int32(iTable), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 8)) != 0 { return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeGetPage(tls, pBt, iTable, bp /* &pPage */, 0) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeGetPage(tls, pBt, iTable, bp, 0) if *(*int32)(unsafe.Pointer(bp + 8)) != 0 { releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) @@ -53306,12 +53310,12 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 if (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 { // var maxRootPgno Pgno at bp+4, 4 - Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp+4 /* &maxRootPgno */) + Xsqlite3BtreeGetMeta(tls, p, BTREE_LARGEST_ROOT_PAGE, bp+4) if iTable == *(*Pgno)(unsafe.Pointer(bp + 4)) { // If the table being dropped is the table with the largest root-page // number in the database, put the root page on the free list. - freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+8 /* &rc */) + freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+8) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) if *(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) @@ -53323,7 +53327,7 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 // var pMove uintptr at bp+12, 4 releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* maxRootPgno */)), bp+12 /* &pMove */, 0) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* maxRootPgno */)), bp+12, 0) if *(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } @@ -53333,8 +53337,8 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } *(*uintptr)(unsafe.Pointer(bp + 12 /* pMove */)) = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* maxRootPgno */)), bp+12 /* &pMove */, 0) - freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pMove */)), bp+8 /* &rc */) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = btreeGetPage(tls, pBt, *(*Pgno)(unsafe.Pointer(bp + 4 /* maxRootPgno */)), bp+12, 0) + freePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pMove */)), bp+8) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pMove */))) if *(*int32)(unsafe.Pointer(bp + 8)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) @@ -53354,13 +53358,13 @@ func btreeDropTable(tls *libc.TLS, p uintptr, iTable Pgno, piMoved uintptr) int3 *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = Xsqlite3BtreeUpdateMeta(tls, p, 4, *(*Pgno)(unsafe.Pointer(bp + 4 /* maxRootPgno */))) } else { - freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+8 /* &rc */) + freePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */)), bp+8) releasePage(tls, *(*uintptr)(unsafe.Pointer(bp /* pPage */))) } return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } -func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75334:20: */ +func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uintptr) int32 { /* sqlite3.c:75343:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) rc = btreeDropTable(tls, p, uint32(iTable), piMoved) @@ -53386,7 +53390,7 @@ func Xsqlite3BtreeDropTable(tls *libc.TLS, p uintptr, iTable int32, piMoved uint // database file. It is a number computed by the pager. But its access // pattern is the same as header meta values, and so it is convenient to // read it from this routine. -func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75363:21: */ +func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { /* sqlite3.c:75372:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) @@ -53405,7 +53409,7 @@ func Xsqlite3BtreeGetMeta(tls *libc.TLS, p uintptr, idx int32, pMeta uintptr) { // Write meta-information back into the database. Meta[0] is // read-only and may not be written. -func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75393:20: */ +func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int32 { /* sqlite3.c:75402:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt var pP1 uintptr var rc int32 @@ -53431,7 +53435,7 @@ func Xsqlite3BtreeUpdateMeta(tls *libc.TLS, p uintptr, idx int32, iMeta U32) int // SQLITE_OK is returned if the operation is successfully executed. // Otherwise, if an error is encountered (i.e. an IO error or database // corruption) an SQLite error code is returned. -func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:75425:20: */ +func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr) int32 { /* sqlite3.c:75434:20: */ var nEntry I64 = int64(0) // Value to return in *pnEntry var rc int32 // Return code @@ -53494,12 +53498,12 @@ func Xsqlite3BtreeCount(tls *libc.TLS, db uintptr, pCur uintptr, pnEntry uintptr // Return the pager associated with a BTree. This routine is used for // testing and debugging only. -func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:75494:22: */ +func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:75503:22: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager } // Append a message to the error message string. -func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:75502:13: */ +func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:75511:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -53512,7 +53516,7 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr++ ap = va if (*IntegrityCk)(unsafe.Pointer(pCheck)).FerrMsg.FnChar != 0 { - Xsqlite3_str_append(tls, pCheck+40, ts+3982 /* "\n" */, 1) + Xsqlite3_str_append(tls, pCheck+40, ts+4004, 1) } if (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx != 0 { Xsqlite3_str_appendf(tls, pCheck+40, (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx, libc.VaList(bp, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1, (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2)) @@ -53526,13 +53530,13 @@ func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) // Return non-zero if the bit in the IntegrityCk.aPgRef[] array that // corresponds to page iPg is already set. -func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:75532:12: */ +func getPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) int32 { /* sqlite3.c:75541:12: */ return int32(*(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8))))) & (int32(1) << (iPg & Pgno(0x07))) } // Set the bit in the IntegrityCk.aPgRef[] array that corresponds to page iPg. -func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:75540:13: */ +func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:75549:13: */ *(*U8)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FaPgRef + uintptr(iPg/Pgno(8)))) |= U8(int32(1) << (iPg & Pgno(0x07))) } @@ -53543,16 +53547,16 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // if this is the first reference to the page. // // Also check that the page number is in bounds. -func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:75554:12: */ +func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:75563:12: */ bp := tls.Alloc(16) defer tls.Free(16) if iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage || iPage == Pgno(0) { - checkAppendMsg(tls, pCheck, ts+3984 /* "invalid page num..." */, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4006, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4007 /* "2nd reference to..." */, libc.VaList(bp+8, iPage)) + checkAppendMsg(tls, pCheck, ts+4029, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+300, 0) != 0 { @@ -53565,7 +53569,7 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:75 // Check that the entry in the pointer-map for page iChild maps to // page iParent, pointer type ptrType. If not, append an error message // to pCheck. -func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:75574:13: */ +func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:75583:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -53574,25 +53578,25 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P // var iPtrmapParent Pgno at bp+52, 4 - rc = ptrmapGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt, iChild, bp+48 /* &ePtrmapType */, bp+52 /* &iPtrmapParent */) + rc = ptrmapGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt, iChild, bp+48, bp+52) if rc != SQLITE_OK { if rc == SQLITE_NOMEM || rc == SQLITE_IOERR|int32(12)<<8 { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 } - checkAppendMsg(tls, pCheck, ts+4032 /* "Failed to read p..." */, libc.VaList(bp, iChild)) + checkAppendMsg(tls, pCheck, ts+4054, libc.VaList(bp, iChild)) return } if int32(*(*U8)(unsafe.Pointer(bp + 48))) != int32(eType) || *(*Pgno)(unsafe.Pointer(bp + 52)) != iParent { checkAppendMsg(tls, pCheck, - ts+4061, /* "Bad ptr map entr..." */ + ts+4083, libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48 /* ePtrmapType */))), *(*Pgno)(unsafe.Pointer(bp + 52 /* iPtrmapParent */)))) } } // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. -func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:75603:13: */ +func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:75612:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -53608,7 +53612,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } N-- if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40, 0) != 0 { - checkAppendMsg(tls, pCheck, ts+4115 /* "failed to get pa..." */, libc.VaList(bp, iPage)) + checkAppendMsg(tls, pCheck, ts+4137, libc.VaList(bp, iPage)) break } pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pOvflPage */))) @@ -53619,7 +53623,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize/U32(4)-U32(2) { checkAppendMsg(tls, pCheck, - ts+4137 /* "freelist leaf co..." */, libc.VaList(bp+8, iPage)) + ts+4159, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -53645,12 +53649,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if N != 0 && nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr { checkAppendMsg(tls, pCheck, - ts+4176, /* "%s is %d but sho..." */ + ts+4198, libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { - return ts + 4202 /* "size" */ + return ts + 4224 /* "size" */ } - return ts + 4207 /* "overflow list le..." */ + return ts + 4229 /* "overflow list le..." */ }(), expected-N, expected)) } @@ -53676,7 +53680,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 // entry represents the span of a cell or freeblock on a btree page. // The upper 16 bits are the index of the first byte of a range and the // lower 16 bits are the index of the last byte of that range. -func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:75692:13: */ +func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:75701:13: */ var j U32 var i U32 = libc.PreIncUint32(&*(*U32)(unsafe.Pointer(aHeap)), 1) *(*U32)(unsafe.Pointer(aHeap + uintptr(i)*4)) = x @@ -53688,7 +53692,7 @@ func btreeHeapInsert(tls *libc.TLS, aHeap uintptr, x U32) { /* sqlite3.c:75692:1 } } -func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:75702:12: */ +func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite3.c:75711:12: */ var j U32 var i U32 var x U32 @@ -53727,7 +53731,7 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 3. Check the integrity of overflow pages. // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. -func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:75736:12: */ +func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:75745:12: */ bp := tls.Alloc(132) defer tls.Free(132) *(*I64)(unsafe.Pointer(bp + 100)) = maxKey @@ -53794,13 +53798,13 @@ __1: return 0 __2: ; - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4228 /* "Page %u: " */ + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4250 /* "Page %u: " */ (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage if !(libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96, 0)) != 0) { goto __3 } checkAppendMsg(tls, pCheck, - ts+4238 /* "unable to get th..." */, libc.VaList(bp, rc)) + ts+4260, libc.VaList(bp, rc)) goto end_of_check __3: ; @@ -53814,7 +53818,7 @@ __3: } // The only possible error from InitPage checkAppendMsg(tls, pCheck, - ts+4276 /* "btreeInitPage() ..." */, libc.VaList(bp+8, rc)) + ts+4298, libc.VaList(bp+8, rc)) goto end_of_check __4: ; @@ -53822,7 +53826,7 @@ __4: goto __5 } - checkAppendMsg(tls, pCheck, ts+4314 /* "free space corru..." */, libc.VaList(bp+16, rc)) + checkAppendMsg(tls, pCheck, ts+4336, libc.VaList(bp+16, rc)) goto end_of_check __5: ; @@ -53830,7 +53834,7 @@ __5: hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FhdrOffset) // Set up for cell analysis - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4336 /* "On tree page %u ..." */ + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4358 /* "On tree page %u ..." */ contentOffset = U32((int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5))))<<8|int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+5) + 1)))-1)&0xffff + 1) // Enforced by btreeInitPage() @@ -53852,11 +53856,11 @@ __5: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __8 } - (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4362 /* "On page %u at ri..." */ + (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4384 /* "On page %u at ri..." */ checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; - depth = checkTreePage(tls, pCheck, uint32(pgno), bp+100 /* &maxKey */, *(*I64)(unsafe.Pointer(bp + 100 /* maxKey */))) + depth = checkTreePage(tls, pCheck, uint32(pgno), bp+100, *(*I64)(unsafe.Pointer(bp + 100 /* maxKey */))) keyCanBeEqual = 0 goto __7 __6: @@ -53883,7 +53887,7 @@ __9: if !(pc < contentOffset || pc > usableSize-U32(4)) { goto __12 } - checkAppendMsg(tls, pCheck, ts+4390, /* "Offset %d out of..." */ + checkAppendMsg(tls, pCheck, ts+4412, libc.VaList(bp+24, pc, contentOffset, usableSize-U32(4))) doCoverageCheck = 0 goto __10 @@ -53896,7 +53900,7 @@ __12: if !(pc+U32((*CellInfo)(unsafe.Pointer(bp+108)).FnSize) > usableSize) { goto __13 } - checkAppendMsg(tls, pCheck, ts+4420 /* "Extends off end ..." */, 0) + checkAppendMsg(tls, pCheck, ts+4442, 0) doCoverageCheck = 0 goto __10 __13: @@ -53914,7 +53918,7 @@ __13: }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4444 /* "Rowid %lld out o..." */, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+108 /* &info */)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4466, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+108 /* &info */)).FnKey)) __15: ; *(*I64)(unsafe.Pointer(bp + 100 /* maxKey */)) = (*CellInfo)(unsafe.Pointer(bp + 108 /* &info */)).FnKey @@ -53950,12 +53954,12 @@ __16: checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __20: ; - d2 = checkTreePage(tls, pCheck, uint32(pgno), bp+100 /* &maxKey */, *(*I64)(unsafe.Pointer(bp + 100 /* maxKey */))) + d2 = checkTreePage(tls, pCheck, uint32(pgno), bp+100, *(*I64)(unsafe.Pointer(bp + 100 /* maxKey */))) keyCanBeEqual = 0 if !(d2 != depth) { goto __21 } - checkAppendMsg(tls, pCheck, ts+4468 /* "Child page depth..." */, 0) + checkAppendMsg(tls, pCheck, ts+4490, 0) depth = d2 __21: ; @@ -54055,7 +54059,7 @@ __29: goto __31 } checkAppendMsg(tls, pCheck, - ts+4493 /* "Multiple uses fo..." */, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 128))>>16, iPage)) + ts+4515, libc.VaList(bp+56, *(*U32)(unsafe.Pointer(bp + 128))>>16, iPage)) goto __30 goto __32 __31: @@ -54075,7 +54079,7 @@ __30: goto __33 } checkAppendMsg(tls, pCheck, - ts+4530, /* "Fragmentation of..." */ + ts+4552, libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr(hdr+7)))), iPage)) __33: ; @@ -54116,7 +54120,7 @@ __34: // since obviously it is not possible to know which pages are covered by // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. -func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76015:21: */ +func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:76024:21: */ bp := tls.Alloc(212) defer tls.Free(212) @@ -54166,7 +54170,7 @@ __1: (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fv2 = 0 (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FaPgRef = uintptr(0) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fheap = uintptr(0) - Xsqlite3StrAccumInit(tls, bp+32+40, uintptr(0), bp+104 /* &zErr[0] */, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) + Xsqlite3StrAccumInit(tls, bp+32+40, uintptr(0), bp+104, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FerrMsg.FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) if !((*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage == Pgno(0)) { goto __3 @@ -54196,7 +54200,7 @@ __5: if !(i <= (*IntegrityCk)(unsafe.Pointer(bp+32)).FnPage) { goto __6 } - setPageReferenced(tls, bp+32 /* &sCheck */, i) + setPageReferenced(tls, bp+32, i) __6: ; @@ -54204,8 +54208,8 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = ts + 4582 /* "Main freelist: " */ - checkList(tls, bp+32 /* &sCheck */, 1, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32), + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = ts + 4604 /* "Main freelist: " */ + checkList(tls, bp+32, 1, Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32), Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36)) (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = uintptr(0) __7: @@ -54241,8 +54245,8 @@ __13: if !(mx != mxInHdr) { goto __15 } - checkAppendMsg(tls, bp+32, /* &sCheck */ - ts+4598, /* "max rootpage (%d..." */ + checkAppendMsg(tls, bp+32, + ts+4620, libc.VaList(bp, mx, mxInHdr)) __15: ; @@ -54251,8 +54255,8 @@ __9: if !(Xsqlite3Get4byte(tls, (*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+64) != U32(0)) { goto __16 } - checkAppendMsg(tls, bp+32, /* &sCheck */ - ts+4643 /* "incremental_vacu..." */, 0) + checkAppendMsg(tls, bp+32, + ts+4665, 0) __16: ; __10: @@ -54275,10 +54279,10 @@ __20: if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0 && *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) > Pgno(1) && !(bPartial != 0)) { goto __21 } - checkPtrmap(tls, bp+32 /* &sCheck */, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), uint8(PTRMAP_ROOTPAGE), uint32(0)) + checkPtrmap(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), uint8(PTRMAP_ROOTPAGE), uint32(0)) __21: ; - checkTreePage(tls, bp+32 /* &sCheck */, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), bp+204 /* ¬Used */, int64(0xffffffff)|I64(int64(0x7fffffff))<<32) + checkTreePage(tls, bp+32, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), bp+204, int64(0xffffffff)|I64(int64(0x7fffffff))<<32) goto __18 __18: i++ @@ -54302,13 +54306,13 @@ __23: if !(getPageReferenced(tls, bp+32, i) == 0 && (ptrmapPageno(tls, pBt, i) != i || !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0))) { goto __26 } - checkAppendMsg(tls, bp+32 /* &sCheck */, ts+4698 /* "Page %d is never..." */, libc.VaList(bp+16, i)) + checkAppendMsg(tls, bp+32, ts+4720, libc.VaList(bp+16, i)) __26: ; if !(getPageReferenced(tls, bp+32, i) != 0 && (ptrmapPageno(tls, pBt, i) == i && (*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0)) { goto __27 } - checkAppendMsg(tls, bp+32 /* &sCheck */, ts+4720 /* "Pointer map page..." */, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32, ts+4742, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -54350,7 +54354,7 @@ __29: // // The pager filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76170:27: */ +func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76179:27: */ return Xsqlite3PagerFilename(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager, 1) } @@ -54361,14 +54365,14 @@ func Xsqlite3BtreeGetFilename(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:7 // // The pager journal filename is invariant as long as the pager is // open so it is safe to access without the BtShared mutex. -func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76183:27: */ +func Xsqlite3BtreeGetJournalname(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:76192:27: */ return Xsqlite3PagerJournalname(tls, (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FpPager) } // Return one of SQLITE_TXN_NONE, SQLITE_TXN_READ, or SQLITE_TXN_WRITE // to describe the current transaction state of Btree p. -func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76192:20: */ +func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76201:20: */ if p != 0 { return int32((*Btree)(unsafe.Pointer(p)).FinTrans) @@ -54382,7 +54386,7 @@ func Xsqlite3BtreeTxnState(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76192: // transaction on the shared-cache the argument Btree is connected to. // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART. -func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76206:20: */ +func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:76215:20: */ var rc int32 = SQLITE_OK if p != 0 { var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt @@ -54398,7 +54402,7 @@ func Xsqlite3BtreeCheckpoint(tls *libc.TLS, p uintptr, eMode int32, pnLog uintpt } // Return true if there is currently a backup running on Btree p. -func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76225:20: */ +func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76234:20: */ return libc.Bool32((*Btree)(unsafe.Pointer(p)).FnBackup != 0) } @@ -54421,7 +54425,7 @@ func Xsqlite3BtreeIsInBackup(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:7622 // xFree argument when the memory allocation was made is invoked on the // blob of allocated memory. The xFree function should not call sqlite3_free() // on the memory, the btree layer does that. -func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76251:21: */ +func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) uintptr { /* sqlite3.c:76260:21: */ var pBt uintptr = (*Btree)(unsafe.Pointer(p)).FpBt Xsqlite3BtreeEnter(tls, p) if !(int32((*BtShared)(unsafe.Pointer(pBt)).FpSchema) != 0) && nBytes != 0 { @@ -54435,7 +54439,7 @@ func Xsqlite3BtreeSchema(tls *libc.TLS, p uintptr, nBytes int32, xFree uintptr) // Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared // btree as the argument handle holds an exclusive lock on the // sqlite_schema table. Otherwise SQLITE_OK. -func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76267:20: */ +func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76276:20: */ var rc int32 Xsqlite3BtreeEnter(tls, p) @@ -54448,7 +54452,7 @@ func Xsqlite3BtreeSchemaLocked(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76 // Obtain a lock on the table whose root page is iTab. The // lock is a write lock if isWritelock is true or a read lock // if it is false. -func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76284:20: */ +func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8) int32 { /* sqlite3.c:76293:20: */ var rc int32 = SQLITE_OK if (*Btree)(unsafe.Pointer(p)).Fsharable != 0 { @@ -54472,7 +54476,7 @@ func Xsqlite3BtreeLockTable(tls *libc.TLS, p uintptr, iTab int32, isWriteLock U8 // change the length of the data stored. If this function is called with // parameters that attempt to write past the end of the existing data, // no modifications are made and SQLITE_CORRUPT is returned. -func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76314:20: */ +func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z uintptr) int32 { /* sqlite3.c:76323:20: */ var rc int32 rc = func() int32 { @@ -54512,7 +54516,7 @@ func Xsqlite3BtreePutData(tls *libc.TLS, pCsr uintptr, offset U32, amt U32, z ui } // Mark this cursor as an incremental blob cursor. -func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76362:21: */ +func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:76371:21: */ *(*U8)(unsafe.Pointer(pCur + 1)) |= U8(BTCF_Incrblob) (*Btree)(unsafe.Pointer((*BtCursor)(unsafe.Pointer(pCur)).FpBtree)).FhasIncrblobCur = U8(1) } @@ -54520,7 +54524,7 @@ func Xsqlite3BtreeIncrblobCursor(tls *libc.TLS, pCur uintptr) { /* sqlite3.c:763 // Set both the "read version" (single byte at byte offset 18) and // "write version" (single byte at byte offset 19) fields in the database // header to iVersion. -func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76373:20: */ +func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int32 { /* sqlite3.c:76382:20: */ var pBt uintptr = (*Btree)(unsafe.Pointer(pBtree)).FpBt var rc int32 // Return code @@ -54552,29 +54556,29 @@ func Xsqlite3BtreeSetVersion(tls *libc.TLS, pBtree uintptr, iVersion int32) int3 // Return true if the cursor has a hint specified. This routine is // only used from within assert() statements -func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:76408:20: */ +func Xsqlite3BtreeCursorHasHint(tls *libc.TLS, pCsr uintptr, mask uint32) int32 { /* sqlite3.c:76417:20: */ return libc.Bool32(uint32((*BtCursor)(unsafe.Pointer(pCsr)).Fhints)&mask != uint32(0)) } // Return true if the given Btree is read-only. -func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76415:20: */ +func Xsqlite3BtreeIsReadonly(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76424:20: */ return libc.Bool32(int32((*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FbtsFlags)&BTS_READ_ONLY != 0) } // Return the size of the header added to each page by this module. -func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:76422:20: */ +func Xsqlite3HeaderSizeBtree(tls *libc.TLS) int32 { /* sqlite3.c:76431:20: */ return int32((uint32(unsafe.Sizeof(MemPage{})) + uint32(7)) & libc.Uint32FromInt32(libc.CplInt32(7))) } // Return true if the Btree passed as the only argument is sharable. -func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76428:20: */ +func Xsqlite3BtreeSharable(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76437:20: */ return int32((*Btree)(unsafe.Pointer(p)).Fsharable) } // Return the number of connections to the BtShared object accessed by // the Btree handle passed as the only argument. For private caches // this is always 1. For shared caches it may be 1 or greater. -func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76437:20: */ +func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76446:20: */ return (*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer(p)).FpBt)).FnRef } @@ -54614,7 +54618,7 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // If the "temp" database is requested, it may need to be opened by this // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. -func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:76526:14: */ +func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:76535:14: */ bp := tls.Alloc(284) defer tls.Free(284) @@ -54624,21 +54628,21 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // var sParse Parse at bp+16, 268 var rc int32 = 0 - libc.Xmemset(tls, bp+16 /* &sParse */, 0, uint32(unsafe.Sizeof(Parse{}))) + libc.Xmemset(tls, bp+16, 0, uint32(unsafe.Sizeof(Parse{}))) (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Fdb = pDb if Xsqlite3OpenTempDatabase(tls, bp+16) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc, ts+3601 /* "%s" */, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc, ts+3623, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg)) rc = SQLITE_ERROR } Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg) - Xsqlite3ParserReset(tls, bp+16 /* &sParse */) + Xsqlite3ParserReset(tls, bp+16) if rc != 0 { return uintptr(0) } } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4754 /* "unknown database..." */, libc.VaList(bp+8, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+4776, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -54647,7 +54651,7 @@ func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintpt // Attempt to set the page size of the destination to match the page size // of the source. -func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76557:12: */ +func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76566:12: */ var rc int32 rc = Xsqlite3BtreeSetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpDest, Xsqlite3BtreeGetPageSize(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc), 0, 0) return rc @@ -54657,9 +54661,9 @@ func setDestPgsz(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:76557:12: */ // second argument. If there is not, return SQLITE_OK. Otherwise, if there // is an open read-transaction, return SQLITE_ERROR and leave an error // message in database handle db. -func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:76569:12: */ +func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:76578:12: */ if Xsqlite3BtreeTxnState(tls, p) != SQLITE_TXN_NONE { - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4774 /* "destination data..." */, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+4796, 0) return SQLITE_ERROR } return SQLITE_OK @@ -54671,7 +54675,7 @@ func checkReadTransaction(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlit // // If an error occurs, NULL is returned and an error code and error message // stored in database handle pDestDb. -func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:76585:27: */ +func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcDb uintptr, zSrcDb uintptr) uintptr { /* sqlite3.c:76594:27: */ var p uintptr // Value to return // Lock the source database handle. The destination database @@ -54686,7 +54690,7 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD if pSrcDb == pDestDb { Xsqlite3ErrorWithMsg(tls, - pDestDb, SQLITE_ERROR, ts+4805 /* "source and desti..." */, 0) + pDestDb, SQLITE_ERROR, ts+4827, 0) p = uintptr(0) } else { // Allocate space for a new sqlite3_backup object... @@ -54731,14 +54735,14 @@ func Xsqlite3_backup_init(tls *libc.TLS, pDestDb uintptr, zDestDb uintptr, pSrcD // Argument rc is an SQLite error code. Return true if this error is // considered fatal if encountered during a backup operation. All errors // are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED. -func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:76662:12: */ +func isFatalError(tls *libc.TLS, rc int32) int32 { /* sqlite3.c:76671:12: */ return libc.Bool32(rc != SQLITE_OK && rc != SQLITE_BUSY && rc != SQLITE_LOCKED) } // Parameter zSrcData points to a buffer containing the data for // page iSrcPg from the source database. Copy this data into the // destination database. -func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:76671:12: */ +func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpdate int32) int32 { /* sqlite3.c:76680:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -54800,13 +54804,13 @@ func backupOnePage(tls *libc.TLS, p uintptr, iSrcPg Pgno, zSrcData uintptr, bUpd // // Return SQLITE_OK if everything is successful, or an SQLite error // code if an error occurs. -func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:76740:12: */ +func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqlite3.c:76749:12: */ bp := tls.Alloc(8) defer tls.Free(8) // var iCurrent I64 at bp, 8 - var rc int32 = Xsqlite3OsFileSize(tls, pFile, bp /* &iCurrent */) + var rc int32 = Xsqlite3OsFileSize(tls, pFile, bp) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp)) > iSize { rc = Xsqlite3OsTruncate(tls, pFile, iSize) } @@ -54815,7 +54819,7 @@ func backupTruncateFile(tls *libc.TLS, pFile uintptr, iSize I64) int32 { /* sqli // Register this backup object with the associated source pager for // callbacks when pages are changed or the cache invalidated. -func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:76753:13: */ +func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:76762:13: */ var pp uintptr pp = Xsqlite3PagerBackupPtr(tls, Xsqlite3BtreePager(tls, (*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)) @@ -54825,7 +54829,7 @@ func attachBackupObject(tls *libc.TLS, p uintptr) { /* sqlite3.c:76753:13: */ } // Copy nPage pages from the source b-tree to the destination. -func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:76765:16: */ +func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqlite3.c:76774:16: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -54899,7 +54903,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli if iSrcPg != U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpSrc)).FpBt)).FpageSize+U32(1) { // var pSrcPg uintptr at bp, 4 // Source page object - rc = Xsqlite3PagerGet(tls, pSrcPager, iSrcPg, bp /* &pSrcPg */, PAGER_GET_READONLY) + rc = Xsqlite3PagerGet(tls, pSrcPager, iSrcPg, bp, PAGER_GET_READONLY) if rc == SQLITE_OK { rc = backupOnePage(tls, p, iSrcPg, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp /* pSrcPg */))), 0) Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp /* pSrcPg */))) @@ -54984,12 +54988,12 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli // the database file in any way, knowing that if a power failure // occurs, the original database will be reconstructed from the // journal file. - Xsqlite3PagerPagecount(tls, pDestPager, bp+4 /* &nDstPage */) + Xsqlite3PagerPagecount(tls, pDestPager, bp+4) for iPg = Pgno(nDestTruncate); rc == SQLITE_OK && iPg <= Pgno(*(*int32)(unsafe.Pointer(bp + 4 /* nDstPage */))); iPg++ { if iPg != U32(Xsqlite3PendingByte)/(*BtShared)(unsafe.Pointer((*Btree)(unsafe.Pointer((*Sqlite3_backup)(unsafe.Pointer(p)).FpDest)).FpBt)).FpageSize+U32(1) { // var pPg uintptr at bp+8, 4 - rc = Xsqlite3PagerGet(tls, pDestPager, iPg, bp+8 /* &pPg */, 0) + rc = Xsqlite3PagerGet(tls, pDestPager, iPg, bp+8, 0) if rc == SQLITE_OK { rc = Xsqlite3PagerWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */))) Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pPg */))) @@ -55010,7 +55014,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli for iOff = I64(Xsqlite3PendingByte + pgszSrc); rc == SQLITE_OK && iOff < iEnd; iOff = iOff + I64(pgszSrc) { *(*uintptr)(unsafe.Pointer(bp + 12 /* pSrcPg */)) = uintptr(0) var iSrcPg Pgno = Pgno(iOff/I64(pgszSrc) + int64(1)) - rc = Xsqlite3PagerGet(tls, pSrcPager, iSrcPg, bp+12 /* &pSrcPg */, 0) + rc = Xsqlite3PagerGet(tls, pSrcPager, iSrcPg, bp+12, 0) if rc == SQLITE_OK { var zData uintptr = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pSrcPg */))) rc = Xsqlite3OsWrite(tls, pFile, zData, pgszSrc, iOff) @@ -55063,7 +55067,7 @@ func Xsqlite3_backup_step(tls *libc.TLS, p uintptr, nPage int32) int32 { /* sqli } // Release all resources associated with an sqlite3_backup* handle. -func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77019:16: */ +func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77028:16: */ var pp uintptr // Ptr to head of pagers backup list var pSrcDb uintptr // Source database connection var rc int32 // Value to return @@ -55121,13 +55125,13 @@ func Xsqlite3_backup_finish(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77019 // Return the number of pages still to be backed up as of the most recent // call to sqlite3_backup_step(). -func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77073:16: */ +func Xsqlite3_backup_remaining(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77082:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnRemaining) } // Return the total number of pages in the source database as of the most // recent call to sqlite3_backup_step(). -func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77087:16: */ +func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77096:16: */ return int32((*Sqlite3_backup)(unsafe.Pointer(p)).FnPagecount) } @@ -55141,7 +55145,7 @@ func Xsqlite3_backup_pagecount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:77 // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77109:29: */ +func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77118:29: */ for ok := true; ok; ok = libc.AssignUintptr(&p, (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext) != uintptr(0) { @@ -55162,7 +55166,7 @@ func backupUpdate(tls *libc.TLS, p uintptr, iPage Pgno, aData uintptr) { /* sqli } } -func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77134:21: */ +func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uintptr) { /* sqlite3.c:77143:21: */ if pBackup != 0 { backupUpdate(tls, pBackup, iPage, aData) } @@ -55177,7 +55181,7 @@ func Xsqlite3BackupUpdate(tls *libc.TLS, pBackup uintptr, iPage Pgno, aData uint // It is assumed that the mutex associated with the BtShared object // corresponding to the source database is held when this function is // called. -func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77149:21: */ +func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77158:21: */ var p uintptr // Iterator variable for p = pBackup; p != 0; p = (*Sqlite3_backup)(unsafe.Pointer(p)).FpNext { @@ -55191,7 +55195,7 @@ func Xsqlite3BackupRestart(tls *libc.TLS, pBackup uintptr) { /* sqlite3.c:77149: // The size of file pTo may be reduced by this operation. If anything // goes wrong, the transaction on pTo is rolled back. If successful, the // transaction is committed before returning. -func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77166:20: */ +func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:77175:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -55209,7 +55213,7 @@ func Xsqlite3BtreeCopyFile(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* goto __1 } *(*I64)(unsafe.Pointer(bp /* nByte */)) = I64(Xsqlite3BtreeGetPageSize(tls, pFrom)) * I64(Xsqlite3BtreeLastPage(tls, pFrom)) - rc = Xsqlite3OsFileControl(tls, pFd, SQLITE_FCNTL_OVERWRITE, bp /* &nByte */) + rc = Xsqlite3OsFileControl(tls, pFd, SQLITE_FCNTL_OVERWRITE, bp) if !(rc == SQLITE_NOTFOUND) { goto __2 } @@ -55229,7 +55233,7 @@ __1: // to 0. This is used by the implementations of sqlite3_backup_step() // and sqlite3_backup_finish() to detect that they are being called // from this function, not directly by the user. - libc.Xmemset(tls, bp+8 /* &b */, 0, uint32(unsafe.Sizeof(Sqlite3_backup{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Sqlite3_backup{}))) (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpSrcDb = (*Btree)(unsafe.Pointer(pFrom)).Fdb (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpSrc = pFrom (*Sqlite3_backup)(unsafe.Pointer(bp + 8 /* &b */)).FpDest = pTo @@ -55241,9 +55245,9 @@ __1: // within a single call (unless an error occurs). The assert() statement // checks this assumption - (p->rc) should be set to either SQLITE_DONE // or an error code. - Xsqlite3_backup_step(tls, bp+8 /* &b */, 0x7FFFFFFF) + Xsqlite3_backup_step(tls, bp+8, 0x7FFFFFFF) - rc = Xsqlite3_backup_finish(tls, bp+8 /* &b */) + rc = Xsqlite3_backup_finish(tls, bp+8) if !(rc == SQLITE_OK) { goto __4 } @@ -55285,7 +55289,7 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. -func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77324:13: */ +func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77333:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -55296,11 +55300,11 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96270 // var x I64 at bp+8, 8 - libc.Xmemcpy(tls, bp+8 /* &x */, p, uint32(int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Int*2)) + libc.Xmemcpy(tls, bp+8, p, uint32(int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Int*2)) Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8 /* x */)), zBuf) } else { - Xsqlite3StrAccumInit(tls, bp+16 /* &acc */, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+16 /* &acc */, ts+4845, /* "%!.15g" */ + Xsqlite3StrAccumInit(tls, bp+16, uintptr(0), zBuf, sz, 0) + Xsqlite3_str_appendf(tls, bp+16, ts+4867, libc.VaList(bp, func() float64 { if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_IntReal != 0 { return float64(*(*I64)(unsafe.Pointer(p))) @@ -55323,7 +55327,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql // SQLITE_OK is returned if the conversion is successful (or not required). // SQLITE_NOMEM may be returned if a malloc() fails during conversion // between formats. -func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:77417:20: */ +func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) int32 { /* sqlite3.c:77426:20: */ var rc int32 if !(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0) || int32((*Mem)(unsafe.Pointer(pMem)).Fenc) == desiredEnc { @@ -55343,7 +55347,7 @@ func Xsqlite3VdbeChangeEncoding(tls *libc.TLS, pMem uintptr, desiredEnc int32) i // pMem->z into the new allocation. pMem must be either a string or // blob if bPreserve is true. If bPreserve is false, any prior content // in pMem->z is discarded. -func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:77452:36: */ +func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) int32 { /* sqlite3.c:77461:36: */ // If the bPreserve flag is set to true, then the memory cell must already // contain a valid string or blob value. @@ -55399,7 +55403,7 @@ func Xsqlite3VdbeMemGrow(tls *libc.TLS, pMem uintptr, n int32, bPreserve int32) // // Return SQLITE_OK on success or an error code (probably SQLITE_NOMEM) // if unable to complete the resizing. -func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:77515:20: */ +func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int32 { /* sqlite3.c:77524:20: */ if (*Mem)(unsafe.Pointer(pMem)).FszMalloc < szNew { return Xsqlite3VdbeMemGrow(tls, pMem, szNew, 0) @@ -55417,7 +55421,7 @@ func Xsqlite3VdbeMemClearAndResize(tls *libc.TLS, pMem uintptr, szNew int32) int // to be a double-zero byte at an even byte boundary in order to // terminate a UTF16 string, even if the initial size of the buffer // is an odd number of bytes. -func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77536:28: */ +func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77545:28: */ if Xsqlite3VdbeMemGrow(tls, pMem, (*Mem)(unsafe.Pointer(pMem)).Fn+3, 1) != 0 { return SQLITE_NOMEM } @@ -55432,7 +55436,7 @@ func vdbeMemAddTerminator(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7753 // MEM.zMalloc, where it can be safely written. // // Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails. -func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77553:20: */ +func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77562:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Str|MEM_Blob) != 0 { if func() int32 { @@ -55457,7 +55461,7 @@ func Xsqlite3VdbeMemMakeWriteable(tls *libc.TLS, pMem uintptr) int32 { /* sqlite // If the given Mem* has a zero-filled tail, turn it into an ordinary // blob stored in dynamically allocated space. -func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77577:20: */ +func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77586:20: */ var nByte int32 // Set nByte to the number of bytes required to store the expanded blob. @@ -55479,7 +55483,7 @@ func Xsqlite3VdbeMemExpandBlob(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c } // Make sure the given Mem is \u0000 terminated. -func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77608:20: */ +func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77617:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Term|MEM_Str) != MEM_Str { return SQLITE_OK // Nothing to do @@ -55501,7 +55505,7 @@ func Xsqlite3VdbeMemNulTerminate(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3 // sqlite3_value_text()), or for ensuring that values to be used as btree // keys are strings. In the former case a NULL pointer is returned the // user and the latter is an internal programming error. -func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:77634:20: */ +func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) int32 { /* sqlite3.c:77643:20: */ var nByte int32 = 32 if Xsqlite3VdbeMemClearAndResize(tls, pMem, nByte) != 0 { @@ -55527,7 +55531,7 @@ func Xsqlite3VdbeMemStringify(tls *libc.TLS, pMem uintptr, enc U8, bForce U8) in // // Return SQLITE_ERROR if the finalizer reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:77669:20: */ +func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { /* sqlite3.c:77678:20: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -55535,8 +55539,8 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // var t Mem at bp+32, 40 - libc.Xmemset(tls, bp /* &ctx */, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) - libc.Xmemset(tls, bp+32 /* &t */, 0, uint32(unsafe.Sizeof(Mem{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) + libc.Xmemset(tls, bp+32, 0, uint32(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 32 /* &t */)).Fflags = U16(MEM_Null) (*Mem)(unsafe.Pointer(bp + 32 /* &t */)).Fdb = (*Mem)(unsafe.Pointer(pMem)).Fdb (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpOut = bp + 32 /* &t */ @@ -55547,7 +55551,7 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { if (*Mem)(unsafe.Pointer(pMem)).FszMalloc > 0 { Xsqlite3DbFreeNN(tls, (*Mem)(unsafe.Pointer(pMem)).Fdb, (*Mem)(unsafe.Pointer(pMem)).FzMalloc) } - libc.Xmemcpy(tls, pMem, bp+32 /* &t */, uint32(unsafe.Sizeof(Mem{}))) + libc.Xmemcpy(tls, pMem, bp+32, uint32(unsafe.Sizeof(Mem{}))) return (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FisError } @@ -55557,13 +55561,13 @@ func Xsqlite3VdbeMemFinalize(tls *libc.TLS, pMem uintptr, pFunc uintptr) int32 { // // SQLITE_ERROR is returned if xValue() reports an error. SQLITE_OK // otherwise. -func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:77700:20: */ +func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc uintptr) int32 { /* sqlite3.c:77709:20: */ bp := tls.Alloc(32) defer tls.Free(32) // var ctx Sqlite3_context at bp, 32 - libc.Xmemset(tls, bp /* &ctx */, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) Xsqlite3VdbeMemSetNull(tls, pOut) (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpOut = pOut (*Sqlite3_context)(unsafe.Pointer(bp /* &ctx */)).FpMem = pAccum @@ -55579,7 +55583,7 @@ func Xsqlite3VdbeMemAggValue(tls *libc.TLS, pAccum uintptr, pOut uintptr, pFunc // This is a helper routine for sqlite3VdbeMemSetNull() and // for sqlite3VdbeMemRelease(). Use those other routines as the // entry point for releasing Mem resources. -func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:77725:29: */ +func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:77734:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Agg != 0 { Xsqlite3VdbeMemFinalize(tls, p, *(*uintptr)(unsafe.Pointer(p))) @@ -55598,7 +55602,7 @@ func vdbeMemClearExternAndSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:77725 // This is a helper routine invoked by sqlite3VdbeMemRelease() in // the unusual case where there really is memory in p that needs // to be freed. -func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:77748:29: */ +func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:77757:29: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, p) } @@ -55617,7 +55621,7 @@ func vdbeMemClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:77748:29: */ // // Use sqlite3VdbeMemSetNull() to release just the Mem.xDel space // prior to inserting new content into the Mem. -func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:77769:21: */ +func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:77778:21: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 || (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { vdbeMemClear(tls, p) @@ -55627,7 +55631,7 @@ func Xsqlite3VdbeMemRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:77769:21: * // Convert a 64-bit IEEE double into a 64-bit signed integer. // If the double is out of range of a 64-bit signed integer then // return the closest available 64-bit signed integer. -func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:77781:28: */ +func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:77790:28: */ if r <= float64(minInt) { return minInt @@ -55639,8 +55643,8 @@ func doubleToInt64(tls *libc.TLS, r float64) I64 { /* sqlite3.c:77781:28: */ return I64(0) } -var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:77793:20 */ -var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:77794:20 */ +var maxInt I64 = int64(0xffffffff) | I64(int64(0x7fffffff))<<32 /* sqlite3.c:77802:20 */ +var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* sqlite3.c:77803:20 */ // Return some kind of integer value which is the best we can do // at representing the value that *pMem describes as an integer. @@ -55651,16 +55655,16 @@ var minInt I64 = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) /* // an SQL-NULL value, return 0. // // If pMem represents a string value, its encoding might be changed. -func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77817:28: */ +func memIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77826:28: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp /* value */)) = int64(0) - Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &value */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) + Xsqlite3Atoi64(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*I64)(unsafe.Pointer(bp /* value */)) } -func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77822:20: */ +func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77831:20: */ var flags int32 flags = int32((*Mem)(unsafe.Pointer(pMem)).Fflags) @@ -55681,17 +55685,17 @@ func Xsqlite3VdbeIntValue(tls *libc.TLS, pMem uintptr) I64 { /* sqlite3.c:77822: // double. If pMem is already a double or an integer, return its // value. If it is a string or blob, try to convert it to a double. // If it is a NULL, return 0.0. -func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77846:31: */ +func memRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77855:31: */ bp := tls.Alloc(8) defer tls.Free(8) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... *(*float64)(unsafe.Pointer(bp /* val */)) = float64(0) - Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp /* &val */, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) + Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pMem)).Fz, bp, (*Mem)(unsafe.Pointer(pMem)).Fn, (*Mem)(unsafe.Pointer(pMem)).Fenc) return *(*float64)(unsafe.Pointer(bp /* val */)) } -func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77852:23: */ +func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:77861:23: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { return *(*float64)(unsafe.Pointer(pMem)) @@ -55709,7 +55713,7 @@ func Xsqlite3VdbeRealValue(tls *libc.TLS, pMem uintptr) float64 { /* sqlite3.c:7 // Return 1 if pMem represents true, and return 0 if pMem represents false. // Return the value ifNull if pMem is NULL. -func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:77873:20: */ +func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { /* sqlite3.c:77882:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { return libc.Bool32(*(*I64)(unsafe.Pointer(pMem)) != int64(0)) @@ -55722,7 +55726,7 @@ func Xsqlite3VdbeBooleanValue(tls *libc.TLS, pMem uintptr, ifNull int32) int32 { // The MEM structure is already a MEM_Real. Try to also make it a // MEM_Int if we can. -func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:77884:21: */ +func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:77893:21: */ var ix I64 ix = doubleToInt64(tls, *(*float64)(unsafe.Pointer(pMem))) @@ -55743,7 +55747,7 @@ func Xsqlite3VdbeIntegerAffinity(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:778 } // Convert pMem to type integer. Invalidate any prior representations. -func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77913:20: */ +func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77922:20: */ *(*I64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeIntValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Int) @@ -55752,7 +55756,7 @@ func Xsqlite3VdbeMemIntegerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c // Convert pMem so that it is of type MEM_Real. // Invalidate any prior representations. -func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77928:20: */ +func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77937:20: */ *(*float64)(unsafe.Pointer(pMem)) = Xsqlite3VdbeRealValue(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&libc.CplInt32(MEM_TypeMask|MEM_Zero) | MEM_Real) @@ -55767,7 +55771,7 @@ func Xsqlite3VdbeMemRealify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77 // For some versions of GCC on 32-bit machines, if you do the more obvious // comparison of "r1==(double)i" you sometimes get an answer of false even // though the r1 and (double)i values are bit-for-bit the same. -func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:77947:20: */ +func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { /* sqlite3.c:77956:20: */ bp := tls.Alloc(16) defer tls.Free(16) *(*float64)(unsafe.Pointer(bp)) = r1 @@ -55784,7 +55788,7 @@ func Xsqlite3RealSameAsInt(tls *libc.TLS, r1 float64, i Sqlite3_int64) int32 { / // Every effort is made to force the conversion, even if the input // is a string that does not look completely like a number. Convert // as much of the string as we can and ignore the rest. -func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77962:20: */ +func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:77971:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -55811,7 +55815,7 @@ func Xsqlite3VdbeMemNumerify(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:7 // is forced. In other words, the value is converted into the desired // affinity even if that results in loss of data. This routine is // used (for example) to implement the SQL "cast()" operator. -func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:77995:20: */ +func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 { /* sqlite3.c:78004:20: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { return SQLITE_OK } @@ -55865,7 +55869,7 @@ func Xsqlite3VdbeMemCast(tls *libc.TLS, pMem uintptr, aff U8, encoding U8) int32 // Initialize bulk memory to be a consistent Mem object. // // The minimum amount of initialization feasible is performed. -func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78038:21: */ +func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { /* sqlite3.c:78047:21: */ (*Mem)(unsafe.Pointer(pMem)).Fflags = flags (*Mem)(unsafe.Pointer(pMem)).Fdb = db @@ -55882,7 +55886,7 @@ func Xsqlite3VdbeMemInit(tls *libc.TLS, pMem uintptr, db uintptr, flags U16) { / // Use this routine to reset the Mem prior to insert a new value. // // Use sqlite3VdbeMemRelease() to complete erase the Mem prior to abandoning it. -func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78058:21: */ +func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78067:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeMemClearExternAndSetNull(tls, pMem) } else { @@ -55890,13 +55894,13 @@ func Xsqlite3VdbeMemSetNull(tls *libc.TLS, pMem uintptr) { /* sqlite3.c:78058:21 } } -func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78065:21: */ +func Xsqlite3ValueSetNull(tls *libc.TLS, p uintptr) { /* sqlite3.c:78074:21: */ Xsqlite3VdbeMemSetNull(tls, p) } // Delete any previous value and set the value to be a BLOB of length // n containing all zeros. -func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78074:21: */ +func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlite3.c:78083:21: */ Xsqlite3VdbeMemRelease(tls, pMem) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Zero) (*Mem)(unsafe.Pointer(pMem)).Fn = 0 @@ -55911,7 +55915,7 @@ func Xsqlite3VdbeMemSetZeroBlob(tls *libc.TLS, pMem uintptr, n int32) { /* sqlit // The pMem is known to contain content that needs to be destroyed prior // to a value change. So invoke the destructor, then set the value to // a 64-bit integer. -func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78104:29: */ +func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78113:29: */ Xsqlite3VdbeMemSetNull(tls, pMem) *(*I64)(unsafe.Pointer(pMem)) = val (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) @@ -55919,7 +55923,7 @@ func vdbeReleaseAndSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c // Delete any previous value and set the value stored in *pMem to val, // manifest type INTEGER. -func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78114:21: */ +func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3.c:78123:21: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeReleaseAndSetInt64(tls, pMem, val) } else { @@ -55929,19 +55933,19 @@ func Xsqlite3VdbeMemSetInt64(tls *libc.TLS, pMem uintptr, val I64) { /* sqlite3. } // A no-op destructor -func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78124:21: */ +func Xsqlite3NoopDestructor(tls *libc.TLS, p uintptr) { /* sqlite3.c:78133:21: */ _ = p } // Set the value stored in *pMem should already be a NULL. // Also store a pointer to go with it. -func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78130:21: */ +func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:78139:21: */ *(*uintptr)(unsafe.Pointer(pMem)) = func() uintptr { if zPType != 0 { return zPType } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }() (*Mem)(unsafe.Pointer(pMem)).Fz = pPtr (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null | MEM_Dyn | MEM_Subtype | MEM_Term) @@ -55956,7 +55960,7 @@ func Xsqlite3VdbeMemSetPointer(tls *libc.TLS, pMem uintptr, pPtr uintptr, zPType // Delete any previous value and set the value stored in *pMem to val, // manifest type REAL. -func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78149:21: */ +func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sqlite3.c:78158:21: */ Xsqlite3VdbeMemSetNull(tls, pMem) if !(Xsqlite3IsNaN(tls, val) != 0) { *(*float64)(unsafe.Pointer(pMem)) = val @@ -55969,7 +55973,7 @@ func Xsqlite3VdbeMemSetDouble(tls *libc.TLS, pMem uintptr, val float64) { /* sql // // Return SQLITE_OK on success and SQLITE_NOMEM if a memory allocation // error occurs. -func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78176:20: */ +func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c:78185:20: */ var db uintptr = (*Mem)(unsafe.Pointer(pMem)).Fdb var p uintptr @@ -55986,7 +55990,7 @@ func Xsqlite3VdbeMemSetRowSet(tls *libc.TLS, pMem uintptr) int32 { /* sqlite3.c: // Return true if the Mem object contains a TEXT or BLOB that is // too large - whose size exceeds SQLITE_MAX_LENGTH. -func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78194:20: */ +func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78203:20: */ if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Str|MEM_Blob) != 0 { var n int32 = (*Mem)(unsafe.Pointer(p)).Fn @@ -56002,13 +56006,13 @@ func Xsqlite3VdbeMemTooBig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:78194: // pTo are freed. The pFrom->z field is not duplicated. If // pFrom->z is used, then pTo->z points to the same thing as pFrom->z // and flags gets srcType (either MEM_Ephem or MEM_Static). -func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78250:29: */ +func vdbeClrCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, eType int32) { /* sqlite3.c:78259:29: */ vdbeMemClearExternAndSetNull(tls, pTo) Xsqlite3VdbeMemShallowCopy(tls, pTo, pFrom, eType) } -func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78255:21: */ +func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcType int32) { /* sqlite3.c:78264:21: */ if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { vdbeClrCopy(tls, pTo, pFrom, srcType) @@ -56024,7 +56028,7 @@ func Xsqlite3VdbeMemShallowCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr, srcTy // Make a full copy of pFrom into pTo. Prior contents of pTo are // freed before the copy is made. -func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78271:20: */ +func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:78280:20: */ var rc int32 = SQLITE_OK if int32((*Mem)(unsafe.Pointer(pTo)).Fflags)&(MEM_Agg|MEM_Dyn) != 0 { @@ -56046,7 +56050,7 @@ func Xsqlite3VdbeMemCopy(tls *libc.TLS, pTo uintptr, pFrom uintptr) int32 { /* s // freed. If pFrom contains ephemeral data, a copy is made. // // pFrom contains an SQL NULL when this routine returns. -func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78294:21: */ +func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:78303:21: */ Xsqlite3VdbeMemRelease(tls, pTo) libc.Xmemcpy(tls, pTo, pFrom, uint32(unsafe.Sizeof(Mem{}))) @@ -56067,7 +56071,7 @@ func Xsqlite3VdbeMemMove(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3 // stored without allocating memory, then it is. If a memory allocation // is required to store the string, then value of pMem is unchanged. In // either case, SQLITE_TOOBIG is returned. -func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78320:20: */ +func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8, xDel uintptr) int32 { /* sqlite3.c:78329:20: */ var nByte I64 = n // New value for pMem->n var iLimit int32 // Maximum allowed string or blob size var flags U16 = U16(0) // New value for pMem->flags @@ -56178,11 +56182,11 @@ func Xsqlite3VdbeMemSetStr(tls *libc.TLS, pMem uintptr, z uintptr, n I64, enc U8 // // If this routine fails for any reason (malloc returns NULL or unable // to read from the disk) then the pMem is left in an inconsistent state. -func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:78429:20: */ +func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, pMem uintptr) int32 { /* sqlite3.c:78438:20: */ var rc int32 (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Null) if Xsqlite3BtreeMaxRecordSize(tls, pCur) < Sqlite3_int64(offset+amt) { - return Xsqlite3CorruptError(tls, 78438) + return Xsqlite3CorruptError(tls, 78447) } if SQLITE_OK == libc.AssignInt32(&rc, Xsqlite3VdbeMemClearAndResize(tls, pMem, int32(amt+U32(1)))) { rc = Xsqlite3BtreePayload(tls, pCur, offset, amt, (*Mem)(unsafe.Pointer(pMem)).Fz) @@ -56197,7 +56201,7 @@ func Xsqlite3VdbeMemFromBtree(tls *libc.TLS, pCur uintptr, offset U32, amt U32, return rc } -func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:78452:20: */ +func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pMem uintptr) int32 { /* sqlite3.c:78461:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56207,7 +56211,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // Note: the calls to BtreeKeyFetch() and DataFetch() below assert() // that both the BtShared and database handle mutexes are held. - (*Mem)(unsafe.Pointer(pMem)).Fz = Xsqlite3BtreePayloadFetch(tls, pCur, bp /* &available */) + (*Mem)(unsafe.Pointer(pMem)).Fz = Xsqlite3BtreePayloadFetch(tls, pCur, bp) if amt <= *(*U32)(unsafe.Pointer(bp)) { (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Blob | MEM_Ephem) @@ -56222,7 +56226,7 @@ func Xsqlite3VdbeMemFromBtreeZeroOffset(tls *libc.TLS, pCur uintptr, amt U32, pM // The pVal argument is known to be a value other than NULL. // Convert it into a string with encoding enc and return a pointer // to a zero-terminated version of that string. -func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:78484:35: */ +func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:78493:35: */ if int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -56267,7 +56271,7 @@ func valueToText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:784 // (2006-02-16:) The enc value can be or-ed with SQLITE_UTF16_ALIGNED. // If that is the case, then the result must be aligned on an even byte // boundary. -func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:78527:27: */ +func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3.c:78536:27: */ if !(pVal != 0) { return uintptr(0) } @@ -56283,7 +56287,7 @@ func Xsqlite3ValueText(tls *libc.TLS, pVal uintptr, enc U8) uintptr { /* sqlite3 } // Create a new sqlite3_value object. -func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:78545:30: */ +func Xsqlite3ValueNew(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:78554:30: */ var p uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Mem{}))) if p != 0 { (*Mem)(unsafe.Pointer(p)).Fflags = U16(MEM_Null) @@ -56299,7 +56303,7 @@ type ValueNewStat4Ctx = struct { FpIdx uintptr FppRec uintptr FiVal int32 -} /* sqlite3.c:78558:1 */ +} /* sqlite3.c:78567:1 */ // Allocate and return a pointer to a new sqlite3_value object. If // the second argument to this function is NULL, the object is allocated @@ -56310,7 +56314,7 @@ type ValueNewStat4Ctx = struct { // already been allocated, allocate the UnpackedRecord structure that // that function will return to its caller here. Then return a pointer to // an sqlite3_value within the UnpackedRecord.a[] array. -func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:78576:22: */ +func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:78585:22: */ if p != 0 { var pRec uintptr = *(*uintptr)(unsafe.Pointer((*ValueNewStat4Ctx)(unsafe.Pointer(p)).FppRec)) @@ -56366,7 +56370,7 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:78576 // If the conditions above are not met, this function returns SQLITE_OK // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. -func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:78638:12: */ +func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:78647:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -56446,7 +56450,7 @@ __3: __9: ; - libc.Xmemset(tls, bp+8 /* &ctx */, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpOut = pVal (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpFunc = pFunc (*struct { @@ -56456,7 +56460,7 @@ __9: goto __10 } rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FisError - Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) + Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3623, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: Xsqlite3ValueApplyAffinity(tls, pVal, aff, uint8(SQLITE_UTF8)) @@ -56512,7 +56516,7 @@ __14: // has been allocated, it is freed before returning. Or, if pCtx is not // NULL, it is assumed that the caller will free any allocated object // in all cases. -func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:78734:12: */ +func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:78743:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -56528,7 +56532,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 zVal = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = uintptr(0) negInt = 1 - zNeg = ts + 1543 /* "" */ + zNeg = ts + 1565 /* "" */ rc = SQLITE_OK __1: @@ -56578,7 +56582,7 @@ __4: pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft op = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) negInt = -1 - zNeg = ts + 4852 /* "-" */ + zNeg = ts + 4874 /* "-" */ __6: ; @@ -56598,7 +56602,7 @@ __9: Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), I64(*(*int32)(unsafe.Pointer(pExpr + 8)))*I64(negInt)) goto __11 __10: - zVal = Xsqlite3MPrintf(tls, db, ts+4854 /* "%s%s" */, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + zVal = Xsqlite3MPrintf(tls, db, ts+4876, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) if !(zVal == uintptr(0)) { goto __12 } @@ -56699,7 +56703,7 @@ __27: if !(op == TK_FUNCTION && pCtx != uintptr(0)) { goto __30 } - rc = valueFromFunction(tls, db, pExpr, enc, affinity, bp+16 /* &pVal */, pCtx) + rc = valueFromFunction(tls, db, pExpr, enc, affinity, bp+16, pCtx) goto __31 __30: if !(op == TK_TRUEFALSE) { @@ -56756,7 +56760,7 @@ __35: // a pointer written to *ppVal. The caller is responsible for deallocating // the value by passing it to sqlite3ValueFree() later on. If the expression // cannot be converted to a value, then *ppVal is set to NULL. -func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:78893:20: */ +func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:78902:20: */ if pExpr != 0 { return valueFromExpr(tls, db, pExpr, enc, affinity, ppVal, uintptr(0)) } @@ -56779,7 +56783,7 @@ func Xsqlite3ValueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, aff // // On success, *ppVal is made to point to the extracted value. The caller // is responsible for ensuring that the value is eventually freed. -func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:78922:12: */ +func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, pAlloc uintptr, ppVal uintptr) int32 { /* sqlite3.c:78931:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -56808,7 +56812,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U } } } else { - rc = valueFromExpr(tls, db, pExpr, (*Sqlite3)(unsafe.Pointer(db)).Fenc, affinity, bp /* &pVal */, pAlloc) + rc = valueFromExpr(tls, db, pExpr, (*Sqlite3)(unsafe.Pointer(db)).Fenc, affinity, bp, pAlloc) } *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp /* pVal */)) @@ -56847,7 +56851,7 @@ func stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U // Unless an error is encountered, SQLITE_OK is returned. It is not an // error if a value cannot be extracted from pExpr. If an error does // occur, an SQLite error code is returned. -func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:78997:20: */ +func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppRec uintptr, pExpr uintptr, nElem int32, iVal int32, pnExtract uintptr) int32 { /* sqlite3.c:79006:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -56872,7 +56876,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR }() var aff U8 = U8(Xsqlite3IndexColumnAffinity(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pIdx, iVal+i)) (*ValueNewStat4Ctx)(unsafe.Pointer(bp /* &alloc */)).FiVal = iVal + i - rc = stat4ValueFromExpr(tls, pParse, pElem, aff, bp /* &alloc */, bp+16 /* &pVal */) + rc = stat4ValueFromExpr(tls, pParse, pElem, aff, bp, bp+16) if !(*(*uintptr)(unsafe.Pointer(bp + 16)) != 0) { break } @@ -56892,7 +56896,7 @@ func Xsqlite3Stat4ProbeSetValue(tls *libc.TLS, pParse uintptr, pIdx uintptr, ppR // (e.g. OOM), return SQLITE_OK and set *ppVal to NULL. Or, if an error // does occur, return an SQLite error code. The final value of *ppVal // is undefined in this case. -func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79042:20: */ +func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, affinity U8, ppVal uintptr) int32 { /* sqlite3.c:79051:20: */ return stat4ValueFromExpr(tls, pParse, pExpr, affinity, uintptr(0), ppVal) } @@ -56902,7 +56906,7 @@ func Xsqlite3Stat4ValueFromExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr, af // // If *ppVal is initially NULL then the caller is responsible for // ensuring that the value written into *ppVal is eventually freed. -func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79059:20: */ +func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:79068:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -56923,7 +56927,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC return Xsqlite3GetVarint32(tls, a, bp) }()) if *(*int32)(unsafe.Pointer(bp)) > nRec || iHdr >= *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79077) + return Xsqlite3CorruptError(tls, 79086) } iField = *(*int32)(unsafe.Pointer(bp /* nHdr */)) for i = 0; i <= iCol; i++ { @@ -56938,14 +56942,14 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC }()) if iHdr > *(*int32)(unsafe.Pointer(bp)) { - return Xsqlite3CorruptError(tls, 79083) + return Xsqlite3CorruptError(tls, 79092) } szField = int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 4 /* t */)))) iField = iField + szField } if iField > nRec { - return Xsqlite3CorruptError(tls, 79089) + return Xsqlite3CorruptError(tls, 79098) } if pMem == uintptr(0) { pMem = libc.AssignPtrUintptr(ppVal, Xsqlite3ValueNew(tls, db)) @@ -56961,7 +56965,7 @@ func Xsqlite3Stat4Column(tls *libc.TLS, db uintptr, pRec uintptr, nRec int32, iC // Unless it is NULL, the argument must be an UnpackedRecord object returned // by an earlier call to sqlite3Stat4ProbeSetValue(). This call deletes // the object. -func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79104:21: */ +func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79113:21: */ if pRec != 0 { var i int32 var nCol int32 = int32((*KeyInfo)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(pRec)).FpKeyInfo)).FnAllField) @@ -56976,14 +56980,14 @@ func Xsqlite3Stat4ProbeFree(tls *libc.TLS, pRec uintptr) { /* sqlite3.c:79104:21 } // Change the string value of an sqlite3_value object -func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79122:21: */ +func Xsqlite3ValueSetStr(tls *libc.TLS, v uintptr, n int32, z uintptr, enc U8, xDel uintptr) { /* sqlite3.c:79131:21: */ if v != 0 { Xsqlite3VdbeMemSetStr(tls, v, z, int64(n), enc, xDel) } } // Free an sqlite3_value object -func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79135:21: */ +func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79144:21: */ if !(v != 0) { return } @@ -56994,14 +56998,14 @@ func Xsqlite3ValueFree(tls *libc.TLS, v uintptr) { /* sqlite3.c:79135:21: */ // The sqlite3ValueBytes() routine returns the number of bytes in the // sqlite3_value object assuming that it uses the encoding "enc". // The valueBytes() routine is a helper function. -func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79146:28: */ +func valueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79155:28: */ if valueToText(tls, pVal, enc) != uintptr(0) { return (*Sqlite3_value)(unsafe.Pointer(pVal)).Fn } return 0 } -func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79149:20: */ +func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3.c:79158:20: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&MEM_Str != 0 && int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fenc) == int32(enc) { @@ -57021,7 +57025,7 @@ func Xsqlite3ValueBytes(tls *libc.TLS, pVal uintptr, enc U8) int32 { /* sqlite3. } // Create a new virtual database engine. -func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79192:21: */ +func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79201:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var p uintptr p = Xsqlite3DbMallocRawNN(tls, db, uint64(unsafe.Sizeof(Vdbe{}))) @@ -57045,12 +57049,12 @@ func Xsqlite3VdbeCreate(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:79 } // Return the Parse object that owns a Vdbe object. -func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79219:22: */ +func Xsqlite3VdbeParser(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:79228:22: */ return (*Vdbe)(unsafe.Pointer(p)).FpParse } // Change the error string stored in Vdbe.zErrMsg -func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79226:21: */ +func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:79235:21: */ var ap Va_list _ = ap Xsqlite3DbFree(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -57060,7 +57064,7 @@ func Xsqlite3VdbeError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { } // Remember the SQL string for a prepared statement. -func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79237:21: */ +func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags U8) { /* sqlite3.c:79246:21: */ if p == uintptr(0) { return } @@ -57073,7 +57077,7 @@ func Xsqlite3VdbeSetSql(tls *libc.TLS, p uintptr, z uintptr, n int32, prepFlags } // Swap all content between two VDBE structures. -func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79287:21: */ +func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:79296:21: */ var tmp Vdbe var pTmp uintptr var zTmp uintptr @@ -57104,7 +57108,7 @@ func Xsqlite3VdbeSwap(tls *libc.TLS, pA uintptr, pB uintptr) { /* sqlite3.c:7928 // SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain // unchanged (this is so that any opcodes already allocated can be // correctly deallocated along with the rest of the Vdbe). -func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79324:12: */ +func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79333:12: */ var pNew uintptr var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse @@ -57157,7 +57161,7 @@ func growOpArray(tls *libc.TLS, v uintptr, nOp int32) int32 { /* sqlite3.c:79324 // Use the sqlite3VdbeResolveLabel() function to fix an address and // the sqlite3VdbeChangeP4() function to change the value of the P4 // operand. -func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79395:28: */ +func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79404:28: */ if growOpArray(tls, p, 1) != 0 { return 1 @@ -57166,7 +57170,7 @@ func growOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) i return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) } -func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79401:20: */ +func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32) int32 { /* sqlite3.c:79410:20: */ var i int32 var pOp uintptr @@ -57189,26 +57193,26 @@ func Xsqlite3VdbeAddOp3(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, return i } -func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:79440:20: */ +func Xsqlite3VdbeAddOp0(tls *libc.TLS, p uintptr, op int32) int32 { /* sqlite3.c:79449:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, 0, 0, 0) } -func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:79443:20: */ +func Xsqlite3VdbeAddOp1(tls *libc.TLS, p uintptr, op int32, p1 int32) int32 { /* sqlite3.c:79452:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, 0, 0) } -func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:79446:20: */ +func Xsqlite3VdbeAddOp2(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32) int32 { /* sqlite3.c:79455:20: */ return Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, 0) } // Generate code for an unconditional jump to instruction iDest -func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:79452:20: */ +func Xsqlite3VdbeGoto(tls *libc.TLS, p uintptr, iDest int32) int32 { /* sqlite3.c:79461:20: */ return Xsqlite3VdbeAddOp3(tls, p, OP_Goto, 0, iDest, 0) } // Generate code to cause the string zStr to be loaded into // register iDest -func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:79459:20: */ +func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) int32 { /* sqlite3.c:79468:20: */ return Xsqlite3VdbeAddOp4(tls, p, OP_String8, 0, iDest, 0, zStr, 0) } @@ -57221,7 +57225,7 @@ func Xsqlite3VdbeLoadString(tls *libc.TLS, p uintptr, iDest int32, zStr uintptr) // // If the input string does not end with "X" then an OP_ResultRow instruction // is generated for the values inserted. -func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:79474:21: */ +func Xsqlite3VdbeMultiLoad(tls *libc.TLS, p uintptr, iDest int32, zTypes uintptr, va uintptr) { /* sqlite3.c:79483:21: */ var ap Va_list _ = ap var i int32 @@ -57269,7 +57273,7 @@ skip_op_resultrow: } // Add an opcode that includes the p4 value as a pointer. -func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:79497:20: */ +func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:79506:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) Xsqlite3VdbeChangeP4(tls, p, addr, zP4, p4type) return addr @@ -57283,7 +57287,7 @@ func Xsqlite3VdbeAddOp4(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, // NC_IdxExpr means called as part of an index expression. NC_PartIdx // means in the WHERE clause of a partial index. NC_GenCol means called // while computing a generated column value. 0 is the usual case. -func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:79521:20: */ +func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int32, p3 int32, nArg int32, pFunc uintptr, eCallCtx int32) int32 { /* sqlite3.c:79530:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var nByte int32 var addr int32 @@ -57315,7 +57319,7 @@ func Xsqlite3VdbeAddFunctionCall(tls *libc.TLS, pParse uintptr, p1 int32, p2 int // Add an opcode that includes the p4 value with a P4_INT64 or // P4_REAL type. -func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:79558:20: */ +func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, zP4 uintptr, p4type int32) int32 { /* sqlite3.c:79567:20: */ var p4copy uintptr = Xsqlite3DbMallocRawNN(tls, Xsqlite3VdbeDb(tls, p), uint64(8)) if p4copy != 0 { libc.Xmemcpy(tls, p4copy, zP4, uint32(8)) @@ -57325,7 +57329,7 @@ func Xsqlite3VdbeAddOp4Dup8(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int // Return the address of the current EXPLAIN QUERY PLAN baseline. // 0 means "none". -func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:79577:20: */ +func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:79586:20: */ var pOp uintptr if (*Parse)(unsafe.Pointer(pParse)).FaddrExplain == 0 { return 0 @@ -57341,7 +57345,7 @@ func Xsqlite3VdbeExplainParent(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3 // // If the bPush flag is true, then make this opcode the parent for // subsequent Explains until sqlite3VdbeExplainPop() is called. -func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:79601:21: */ +func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, va uintptr) { /* sqlite3.c:79610:21: */ // Always include the OP_Explain opcodes if SQLITE_DEBUG is defined. // But omit them (for performance) during production builds if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { @@ -57365,7 +57369,7 @@ func Xsqlite3VdbeExplain(tls *libc.TLS, pParse uintptr, bPush U8, zFmt uintptr, } // Pop the EXPLAIN QUERY PLAN stack one level. -func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:79629:21: */ +func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:79638:21: */ (*Parse)(unsafe.Pointer(pParse)).FaddrExplain = Xsqlite3VdbeExplainParent(tls, pParse) } @@ -57376,7 +57380,7 @@ func Xsqlite3VdbeExplainPop(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:79629: // // The zWhere string must have been obtained from sqlite3_malloc(). // This routine will take ownership of the allocated memory. -func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:79643:21: */ +func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere uintptr, p5 U16) { /* sqlite3.c:79652:21: */ var j int32 Xsqlite3VdbeAddOp4(tls, p, OP_ParseSchema, iDb, 0, 0, zWhere, -7) Xsqlite3VdbeChangeP5(tls, p, p5) @@ -57387,7 +57391,7 @@ func Xsqlite3VdbeAddParseSchemaOp(tls *libc.TLS, p uintptr, iDb int32, zWhere ui } // Add an opcode that includes the p4 value as an integer. -func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:79654:20: */ +func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int32, p3 int32, p4 int32) int32 { /* sqlite3.c:79663:20: */ var addr int32 = Xsqlite3VdbeAddOp3(tls, p, op, p1, p2, p3) if int32((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed) == 0 { var pOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr(addr)*20 @@ -57398,7 +57402,7 @@ func Xsqlite3VdbeAddOp4Int(tls *libc.TLS, p uintptr, op int32, p1 int32, p2 int3 } // Insert the end of a co-routine -func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:79673:21: */ +func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sqlite3.c:79682:21: */ Xsqlite3VdbeAddOp1(tls, v, OP_EndCoroutine, regYield) // Clear the temporary register cache, thereby ensuring that each @@ -57433,14 +57437,14 @@ func Xsqlite3VdbeEndCoroutine(tls *libc.TLS, v uintptr, regYield int32) { /* sql // been issued. The negative is stored because // that gives a performance improvement over storing // the equivalent positive value. -func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:79711:20: */ +func Xsqlite3VdbeMakeLabel(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:79720:20: */ return libc.PreDecInt32(&(*Parse)(unsafe.Pointer(pParse)).FnLabel, 1) } // Resolve label "x" to be the address of the next instruction to // be inserted. The parameter "x" must have been obtained from // a prior call to sqlite3VdbeMakeLabel(). -func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:79720:29: */ +func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlite3.c:79729:29: */ var nNewSize int32 = 10 - (*Parse)(unsafe.Pointer(p)).FnLabel (*Parse)(unsafe.Pointer(p)).FaLabel = Xsqlite3DbReallocOrFree(tls, (*Parse)(unsafe.Pointer(p)).Fdb, (*Parse)(unsafe.Pointer(p)).FaLabel, uint64(uint32(nNewSize)*uint32(unsafe.Sizeof(int32(0))))) @@ -57452,7 +57456,7 @@ func resizeResolveLabel(tls *libc.TLS, p uintptr, v uintptr, j int32) { /* sqlit } } -func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:79735:21: */ +func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c:79744:21: */ var p uintptr = (*Vdbe)(unsafe.Pointer(v)).FpParse var j int32 = ^x @@ -57465,12 +57469,12 @@ func Xsqlite3VdbeResolveLabel(tls *libc.TLS, v uintptr, x int32) { /* sqlite3.c: } // Mark the VDBE as one that can only be run one time. -func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:79757:21: */ +func Xsqlite3VdbeRunOnlyOnce(tls *libc.TLS, p uintptr) { /* sqlite3.c:79766:21: */ libc.SetBitFieldPtr16Uint32(p+148, Bft(1), 5, 0x20) } // Mark the VDBE as one that can only be run multiple times. -func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:79764:21: */ +func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:79773:21: */ libc.SetBitFieldPtr16Uint32(p+148, Bft(0), 5, 0x20) } @@ -57493,7 +57497,7 @@ func Xsqlite3VdbeReusable(tls *libc.TLS, p uintptr) { /* sqlite3.c:79764:21: */ // This routine will only function correctly if the mkopcodeh.tcl generator // script numbers the opcodes correctly. Changes to this routine must be // coordinated with changes to mkopcodeh.tcl. -func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:79960:13: */ +func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite3.c:79969:13: */ var nMaxArgs int32 = *(*int32)(unsafe.Pointer(pMaxFuncArgs)) var pOp uintptr var pParse uintptr = (*Vdbe)(unsafe.Pointer(p)).FpParse @@ -57622,7 +57626,7 @@ func resolveP2Values(tls *libc.TLS, p uintptr, pMaxFuncArgs uintptr) { /* sqlite } // Return the address of the next instruction to be inserted. -func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80062:20: */ +func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:80071:20: */ return (*Vdbe)(unsafe.Pointer(p)).FnOp } @@ -57653,7 +57657,7 @@ func Xsqlite3VdbeCurrentAddr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:8006 // array. Also, *pnMaxArg is set to the larger of its current value and // the number of entries in the Vdbe.apArg[] array required to execute the // returned program. -func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80119:23: */ +func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg uintptr) uintptr { /* sqlite3.c:80128:23: */ var aOp uintptr = (*Vdbe)(unsafe.Pointer(p)).FaOp // Check that sqlite3VdbeUsesBtree() was not called on this VM @@ -57669,7 +57673,7 @@ func Xsqlite3VdbeTakeOpArray(tls *libc.TLS, p uintptr, pnOp uintptr, pnMaxArg ui // // Non-zero P2 arguments to jump instructions are automatically adjusted // so that the jump target is relative to the first operation inserted. -func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80139:23: */ +func Xsqlite3VdbeAddOpList(tls *libc.TLS, p uintptr, nOp int32, aOp uintptr, iLineno int32) uintptr { /* sqlite3.c:80148:23: */ var i int32 var pOut uintptr var pFirst uintptr @@ -57713,23 +57717,23 @@ __3: // Change the value of the opcode, or P1, P2, P3, or P5 operands // for a specific instruction. -func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80215:21: */ +func Xsqlite3VdbeChangeOpcode(tls *libc.TLS, p uintptr, addr int32, iNewOpcode U8) { /* sqlite3.c:80224:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fopcode = iNewOpcode } -func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80218:21: */ +func Xsqlite3VdbeChangeP1(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80227:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp1 = val } -func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80221:21: */ +func Xsqlite3VdbeChangeP2(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80230:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp2 = val } -func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80224:21: */ +func Xsqlite3VdbeChangeP3(tls *libc.TLS, p uintptr, addr int32, val int32) { /* sqlite3.c:80233:21: */ (*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, p, addr))).Fp3 = val } -func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80227:21: */ +func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80236:21: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 { (*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp + uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20)).Fp5 = p5 @@ -57738,7 +57742,7 @@ func Xsqlite3VdbeChangeP5(tls *libc.TLS, p uintptr, p5 U16) { /* sqlite3.c:80227 // Change the P2 operand of instruction addr so that it points to // the address of the next instruction to be coded. -func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80236:21: */ +func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80245:21: */ Xsqlite3VdbeChangeP2(tls, p, addr, (*Vdbe)(unsafe.Pointer(p)).FnOp) } @@ -57753,7 +57757,7 @@ func Xsqlite3VdbeJumpHere(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:8 // // 7 Once 0 8 0 // 8 ... -func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80253:21: */ +func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sqlite3.c:80262:21: */ if addr == (*Vdbe)(unsafe.Pointer(p)).FnOp-1 { (*Vdbe)(unsafe.Pointer(p)).FnOp-- @@ -57764,26 +57768,26 @@ func Xsqlite3VdbeJumpHereOrPopInst(tls *libc.TLS, p uintptr, addr int32) { /* sq // If the input FuncDef structure is ephemeral, then free it. If // the FuncDef is not ephermal, then do nothing. -func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80273:13: */ +func freeEphemeralFunction(tls *libc.TLS, db uintptr, pDef uintptr) { /* sqlite3.c:80282:13: */ if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_EPHEM) != U32(0) { Xsqlite3DbFreeNN(tls, db, pDef) } } // Delete a P4 value if necessary. -func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80282:29: */ +func freeP4Mem(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80291:29: */ if (*Mem)(unsafe.Pointer(p)).FszMalloc != 0 { Xsqlite3DbFree(tls, db, (*Mem)(unsafe.Pointer(p)).FzMalloc) } Xsqlite3DbFreeNN(tls, db, p) } -func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80286:29: */ +func freeP4FuncCtx(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:80295:29: */ freeEphemeralFunction(tls, db, (*Sqlite3_context)(unsafe.Pointer(p)).FpFunc) Xsqlite3DbFreeNN(tls, db, p) } -func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80290:13: */ +func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c:80299:13: */ switch p4type { case -16: @@ -57844,7 +57848,7 @@ func freeP4(tls *libc.TLS, db uintptr, p4type int32, p4 uintptr) { /* sqlite3.c: // Free the space allocated for aOp and any p4 values allocated for the // opcodes contained within. If aOp is not NULL it is assumed to contain // nOp entries. -func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80339:13: */ +func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sqlite3.c:80348:13: */ if aOp != 0 { var pOp uintptr for pOp = aOp + uintptr(nOp-1)*20; pOp >= aOp; pOp -= 20 { @@ -57859,18 +57863,18 @@ func vdbeFreeOpArray(tls *libc.TLS, db uintptr, aOp uintptr, nOp int32) { /* sql // Link the SubProgram object passed as the second argument into the linked // list at Vdbe.pSubProgram. This list is used to delete all sub-program // objects when the VM is no longer required. -func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80357:21: */ +func Xsqlite3VdbeLinkSubProgram(tls *libc.TLS, pVdbe uintptr, p uintptr) { /* sqlite3.c:80366:21: */ (*SubProgram)(unsafe.Pointer(p)).FpNext = (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram (*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram = p } // Return true if the given Vdbe has any SubPrograms. -func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80365:20: */ +func Xsqlite3VdbeHasSubProgram(tls *libc.TLS, pVdbe uintptr) int32 { /* sqlite3.c:80374:20: */ return libc.Bool32((*Vdbe)(unsafe.Pointer(pVdbe)).FpProgram != uintptr(0)) } // Change the opcode at addr into OP_Noop -func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80372:20: */ +func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* sqlite3.c:80381:20: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { return 0 @@ -57886,7 +57890,7 @@ func Xsqlite3VdbeChangeToNoop(tls *libc.TLS, p uintptr, addr int32) int32 { /* s // If the last opcode is "op" and it is not a jump destination, // then remove it. Return true if and only if an opcode was removed. -func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80388:20: */ +func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* sqlite3.c:80397:20: */ if (*Vdbe)(unsafe.Pointer(p)).FnOp > 0 && int32((*Op)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FaOp+uintptr((*Vdbe)(unsafe.Pointer(p)).FnOp-1)*20)).Fopcode) == int32(op) { return Xsqlite3VdbeChangeToNoop(tls, p, (*Vdbe)(unsafe.Pointer(p)).FnOp-1) } else { @@ -57910,7 +57914,7 @@ func Xsqlite3VdbeDeletePriorOpcode(tls *libc.TLS, p uintptr, op U8) int32 { /* s // the Vdbe. In these cases we can just copy the pointer. // // If addr<0 then change P4 on the most recently inserted instruction. -func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:80448:29: */ +func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int32) { /* sqlite3.c:80457:29: */ if (*Op)(unsafe.Pointer(pOp)).Fp4type != 0 { freeP4(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, int32((*Op)(unsafe.Pointer(pOp)).Fp4type), *(*uintptr)(unsafe.Pointer(pOp + 16))) (*Op)(unsafe.Pointer(pOp)).Fp4type = int8(0) @@ -57927,7 +57931,7 @@ func vdbeChangeP4Full(tls *libc.TLS, p uintptr, pOp uintptr, zP4 uintptr, n int3 } } -func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:80467:21: */ +func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n int32) { /* sqlite3.c:80476:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = zP4 @@ -57939,7 +57943,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if n != -12 { - freeP4(tls, db, n, *(*uintptr)(unsafe.Pointer(bp /* &zP4 */))) + freeP4(tls, db, n, *(*uintptr)(unsafe.Pointer(bp))) } return } @@ -57974,7 +57978,7 @@ func Xsqlite3VdbeChangeP4(tls *libc.TLS, p uintptr, addr int32, zP4 uintptr, n i // The P4 operand must not have been previously defined. And the new // P4 must not be P4_INT32. Use sqlite3VdbeChangeP4() in either of // those cases. -func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:80510:21: */ +func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* sqlite3.c:80519:21: */ var pOp uintptr if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FmallocFailed != 0 { @@ -57990,7 +57994,7 @@ func Xsqlite3VdbeAppendP4(tls *libc.TLS, p uintptr, pP4 uintptr, n int32) { /* s // Set the P4 on the most recently added opcode to the KeyInfo for the // index given. -func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:80530:21: */ +func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* sqlite3.c:80539:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pKeyInfo uintptr @@ -58011,7 +58015,7 @@ func Xsqlite3VdbeSetP4KeyInfo(tls *libc.TLS, pParse uintptr, pIdx uintptr) { /* // this routine is a valid pointer. But because the dummy.opcode is 0, // dummy will never be written to. This is verified by code inspection and // by running with Valgrind. -func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:80597:23: */ // Ignore the MSVC warning about no initializer +func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite3.c:80606:23: */ // Ignore the MSVC warning about no initializer if addr < 0 { addr = (*Vdbe)(unsafe.Pointer(p)).FnOp - 1 @@ -58025,52 +58029,52 @@ func Xsqlite3VdbeGetOp(tls *libc.TLS, p uintptr, addr int32) uintptr { /* sqlite return uintptr(0) } -var dummy VdbeOp /* sqlite3.c:80600:17: */ +var dummy VdbeOp /* sqlite3.c:80609:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. -func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:80801:21: */ +func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:80810:21: */ bp := tls.Alloc(168) defer tls.Free(168) var zP4 uintptr = uintptr(0) // var x StrAccum at bp+144, 24 - Xsqlite3StrAccumInit(tls, bp+144 /* &x */, uintptr(0), uintptr(0), 0, SQLITE_MAX_LENGTH) + Xsqlite3StrAccumInit(tls, bp+144, uintptr(0), uintptr(0), 0, SQLITE_MAX_LENGTH) switch int32((*Op)(unsafe.Pointer(pOp)).Fp4type) { case -9: { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4859 /* "k(%d" */, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144, ts+4881, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) for j = 0; j < int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField); j++ { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(j)*4)) var zColl uintptr if pColl != 0 { zColl = (*CollSeq)(unsafe.Pointer(pColl)).FzName } else { - zColl = ts + 1543 /* "" */ + zColl = ts + 1565 /* "" */ } - if libc.Xstrcmp(tls, zColl, ts+1070) == 0 { - zColl = ts + 4864 /* "B" */ + if libc.Xstrcmp(tls, zColl, ts+1092) == 0 { + zColl = ts + 4886 /* "B" */ } - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4866, /* ",%s%s%s" */ + Xsqlite3_str_appendf(tls, bp+144, ts+4888, libc.VaList(bp+8, func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_DESC != 0 { - return ts + 4852 /* "-" */ + return ts + 4874 /* "-" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), func() uintptr { if int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j))))&KEYINFO_ORDER_BIGNULL != 0 { - return ts + 4874 /* "N." */ + return ts + 4896 /* "N." */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), zColl)) } - Xsqlite3_str_append(tls, bp+144 /* &x */, ts+4877 /* ")" */, 1) + Xsqlite3_str_append(tls, bp+144, ts+4899, 1) break } @@ -58078,7 +58082,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4879 /* "%.18s-%s" */, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144, ts+4901, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -58086,32 +58090,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* case -8: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4888 /* "%s(%d)" */, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4910, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -16: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpFunc - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4888 /* "%s(%d)" */, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144, ts+4910, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -14: { - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+1327 /* "%lld" */, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1349, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4895 /* "%d" */, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) + Xsqlite3_str_appendf(tls, bp+144, ts+4917, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16)))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+1321 /* "%.16g" */, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) + Xsqlite3_str_appendf(tls, bp+144, ts+1343, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))))) break } @@ -58121,14 +58125,14 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Str != 0 { zP4 = (*Mem)(unsafe.Pointer(pMem)).Fz } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+1327 /* "%lld" */, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1349, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Real != 0 { - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+1321 /* "%.16g" */, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) + Xsqlite3_str_appendf(tls, bp+144, ts+1343, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem)))) } else if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Null != 0 { - zP4 = ts + 1544 /* "NULL" */ + zP4 = ts + 1566 /* "NULL" */ } else { - zP4 = ts + 4898 /* "(blob)" */ + zP4 = ts + 4920 /* "(blob)" */ } break @@ -58136,7 +58140,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* case -12: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16)))).FpVtab - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4905 /* "vtab:%p" */, libc.VaList(bp+120, pVtab)) + Xsqlite3_str_appendf(tls, bp+144, ts+4927, libc.VaList(bp+120, pVtab)) break } @@ -58147,20 +58151,20 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* var n U32 = *(*U32)(unsafe.Pointer(ai)) // The first element of an INTARRAY is always the // count of the number of elements to follow for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+4913 /* "%c%u" */, libc.VaList(bp+128, func() int32 { + Xsqlite3_str_appendf(tls, bp+144, ts+4935, libc.VaList(bp+128, func() int32 { if i == U32(1) { return '[' } return ',' }(), *(*U32)(unsafe.Pointer(ai + uintptr(i)*4)))) } - Xsqlite3_str_append(tls, bp+144 /* &x */, ts+4918 /* "]" */, 1) + Xsqlite3_str_append(tls, bp+144, ts+4940, 1) break } case -4: { - zP4 = ts + 4920 /* "program" */ + zP4 = ts + 4942 /* "program" */ break } @@ -58184,15 +58188,15 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* } } if zP4 != 0 { - Xsqlite3_str_appendall(tls, bp+144 /* &x */, zP4) + Xsqlite3_str_appendall(tls, bp+144, zP4) } if int32((*StrAccum)(unsafe.Pointer(bp+144)).FaccError)&SQLITE_NOMEM != 0 { Xsqlite3OomFault(tls, db) } - return Xsqlite3StrAccumFinish(tls, bp+144 /* &x */) + return Xsqlite3StrAccumFinish(tls, bp+144) } -var encnames = [4]uintptr{ts + 4928 /* "?" */, ts + 4930 /* "8" */, ts + 4932 /* "16LE" */, ts + 4937 /* "16BE" */} /* sqlite3.c:80831:25 */ +var encnames = [4]uintptr{ts + 4950, ts + 4952, ts + 4954, ts + 4959} /* sqlite3.c:80840:25 */ // Declare to the Vdbe that the BTree object at db->aDb[i] is used. // @@ -58200,7 +58204,7 @@ var encnames = [4]uintptr{ts + 4928 /* "?" */, ts + 4930 /* "8" */, ts + 4932 /* // attached databases that will be use. A mask of these databases // is maintained in p->btreeMask. The p->lockMask value is the subset of // p->btreeMask of databases that will require a lock. -func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:80926:21: */ +func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:80935:21: */ *(*YDbMask)(unsafe.Pointer(p + 152)) |= YDbMask(YDbMask(1)) << i if i != 1 && Xsqlite3BtreeSharable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FaDb+uintptr(i)*16)).FpBt) != 0 { @@ -58227,7 +58231,7 @@ func Xsqlite3VdbeUsesBtree(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:809 // corresponding to btrees that use shared cache. Then the runtime of // this routine is N*N. But as N is rarely more than 1, this should not // be a problem. -func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:80957:21: */ +func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:80966:21: */ var i int32 var db uintptr var aDb uintptr @@ -58246,7 +58250,7 @@ func Xsqlite3VdbeEnter(tls *libc.TLS, p uintptr) { /* sqlite3.c:80957:21: */ } // Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter(). -func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80978:29: */ +func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80987:29: */ var i int32 var db uintptr var aDb uintptr @@ -58261,7 +58265,7 @@ func vdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80978:29: */ } } -func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80992:21: */ +func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:81001:21: */ if (*Vdbe)(unsafe.Pointer(p)).FlockMask == YDbMask(0) { return } // The common case @@ -58269,7 +58273,7 @@ func Xsqlite3VdbeLeave(tls *libc.TLS, p uintptr) { /* sqlite3.c:80992:21: */ } // Initialize an array of N Mem element. -func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81034:13: */ +func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* sqlite3.c:81043:13: */ for libc.PostDecInt32(&N, 1) > 0 { (*Mem)(unsafe.Pointer(p)).Fdb = db (*Mem)(unsafe.Pointer(p)).Fflags = flags @@ -58279,7 +58283,7 @@ func initMemArray(tls *libc.TLS, p uintptr, N int32, db uintptr, flags U16) { /* } // Release an array of N Mem elements -func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81049:13: */ +func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81058:13: */ if p != 0 && N != 0 { var pEnd uintptr = p + uintptr(N)*40 var db uintptr = (*Mem)(unsafe.Pointer(p)).Fdb @@ -58323,7 +58327,7 @@ func releaseMemArray(tls *libc.TLS, p uintptr, N int32) { /* sqlite3.c:81049:13: // // This routine does not delete the Frame right away. It merely adds the // frame to a list of frames to be deleted when the Vdbe halts. -func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81111:21: */ +func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81120:21: */ var pFrame uintptr = pArg (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent = (*Vdbe)(unsafe.Pointer((*VdbeFrame)(unsafe.Pointer(pFrame)).Fv)).FpDelFrame @@ -58335,7 +58339,7 @@ func Xsqlite3VdbeFrameMemDel(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:81111:2 // // Return SQLITE_ROW on success. Return SQLITE_DONE if there are no // more opcodes to be displayed. -func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81126:20: */ +func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, piPc uintptr, piAddr uintptr, paOp uintptr) int32 { /* sqlite3.c:81135:20: */ var nRow int32 // Stop when row count reaches this var nSub int32 = 0 // Number of sub-vdbes seen so far var apSub uintptr = uintptr(0) // Array of sub-vdbes @@ -58434,7 +58438,7 @@ func Xsqlite3VdbeNextOpcode(tls *libc.TLS, p uintptr, pSub uintptr, eMode int32, // Delete a VdbeFrame object and its contents. VdbeFrame objects are // allocated by the OP_Program opcode in sqlite3VdbeExec(). -func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81238:21: */ +func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81247:21: */ var i int32 var aMem uintptr = p + 88 var apCsr uintptr = aMem + uintptr((*VdbeFrame)(unsafe.Pointer(p)).FnChildMem)*40 @@ -58463,7 +58467,7 @@ func Xsqlite3VdbeFrameDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:81238:21: // // When p->explain==1, first the main program is listed, then each of // the trigger subprograms are listed one by one. -func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81270:20: */ +func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81279:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -58503,7 +58507,7 @@ func Xsqlite3VdbeList(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:81270:20: * } // Figure out which opcode is next to display - rc = Xsqlite3VdbeNextOpcode(tls, p, pSub, libc.Bool32(int32(*(*uint16)(unsafe.Pointer(p + 148))&0xc>>2) == 2), p+36, bp /* &i */, bp+4 /* &aOp */) + rc = Xsqlite3VdbeNextOpcode(tls, p, pSub, libc.Bool32(int32(*(*uint16)(unsafe.Pointer(p + 148))&0xc>>2) == 2), p+36, bp, bp+4) if rc == SQLITE_OK { pOp = *(*uintptr)(unsafe.Pointer(bp + 4)) + uintptr(*(*int32)(unsafe.Pointer(bp)))*20 @@ -58552,7 +58556,7 @@ type ReusableSpace = struct { FpSpace uintptr FnFree Sqlite3_int64 FnNeeded Sqlite3_int64 -} /* sqlite3.c:81415:1 */ +} /* sqlite3.c:81424:1 */ // Try to allocate nByte bytes of 8-byte aligned bulk memory for pBuf // from the ReusableSpace object. Return a pointer to the allocated @@ -58567,7 +58571,7 @@ type ReusableSpace = struct { // This allocator is employed to repurpose unused slots at the end of the // opcode array of prepared state for other memory needs of the prepared // statement. -func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:81435:13: */ +func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:81444:13: */ if pBuf == uintptr(0) { nByte = (nByte + int64(7)) & int64(libc.CplInt32(7)) @@ -58584,7 +58588,7 @@ func allocSpace(tls *libc.TLS, p uintptr, pBuf uintptr, nByte Sqlite3_int64) uin // Rewind the VDBE back to the beginning in preparation for // running it. -func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:81458:21: */ +func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:81467:21: */ // There should be at least one opcode. @@ -58617,7 +58621,7 @@ func Xsqlite3VdbeRewind(tls *libc.TLS, p uintptr) { /* sqlite3.c:81458:21: */ // // Use the sqlite3VdbeRewind() procedure to restore a virtual machine back // to its initial state after it has been run. -func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:81511:21: */ +func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite3.c:81520:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -58657,7 +58661,7 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite (*ReusableSpace)(unsafe.Pointer(bp + 4 /* &x */)).FnFree = Sqlite3_int64(((*Parse)(unsafe.Pointer(pParse)).FszOpAlloc - n) & libc.CplInt32(7)) // Bytes of unused memory - resolveP2Values(tls, p, bp /* &nArg */) + resolveP2Values(tls, p, bp) libc.SetBitFieldPtr16Uint32(p+148, Bft(U8(libc.Bool32((*Parse)(unsafe.Pointer(pParse)).FisMultiWrite != 0 && (*Parse)(unsafe.Pointer(pParse)).FmayAbort != 0))), 6, 0x40) if (*Parse)(unsafe.Pointer(pParse)).Fexplain != 0 { var iFirst int32 @@ -58693,18 +58697,18 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite // the leftover memory at the end of the opcode array. This can significantly // reduce the amount of memory held by a prepared statement. (*ReusableSpace)(unsafe.Pointer(bp + 4 /* &x */)).FnNeeded = int64(0) - (*Vdbe)(unsafe.Pointer(p)).FaMem = allocSpace(tls, bp+4 /* &x */, uintptr(0), int64(uint32(nMem)*uint32(unsafe.Sizeof(Mem{})))) - (*Vdbe)(unsafe.Pointer(p)).FaVar = allocSpace(tls, bp+4 /* &x */, uintptr(0), int64(uint32(nVar)*uint32(unsafe.Sizeof(Mem{})))) - (*Vdbe)(unsafe.Pointer(p)).FapArg = allocSpace(tls, bp+4 /* &x */, uintptr(0), int64(uint32(*(*int32)(unsafe.Pointer(bp)))*uint32(unsafe.Sizeof(uintptr(0))))) - (*Vdbe)(unsafe.Pointer(p)).FapCsr = allocSpace(tls, bp+4 /* &x */, uintptr(0), int64(uint32(nCursor)*uint32(unsafe.Sizeof(uintptr(0))))) + (*Vdbe)(unsafe.Pointer(p)).FaMem = allocSpace(tls, bp+4, uintptr(0), int64(uint32(nMem)*uint32(unsafe.Sizeof(Mem{})))) + (*Vdbe)(unsafe.Pointer(p)).FaVar = allocSpace(tls, bp+4, uintptr(0), int64(uint32(nVar)*uint32(unsafe.Sizeof(Mem{})))) + (*Vdbe)(unsafe.Pointer(p)).FapArg = allocSpace(tls, bp+4, uintptr(0), int64(uint32(*(*int32)(unsafe.Pointer(bp)))*uint32(unsafe.Sizeof(uintptr(0))))) + (*Vdbe)(unsafe.Pointer(p)).FapCsr = allocSpace(tls, bp+4, uintptr(0), int64(uint32(nCursor)*uint32(unsafe.Sizeof(uintptr(0))))) if (*ReusableSpace)(unsafe.Pointer(bp+4)).FnNeeded != 0 { (*ReusableSpace)(unsafe.Pointer(bp + 4 /* &x */)).FpSpace = libc.AssignPtrUintptr(p+192, Xsqlite3DbMallocRawNN(tls, db, uint64((*ReusableSpace)(unsafe.Pointer(bp+4 /* &x */)).FnNeeded))) (*ReusableSpace)(unsafe.Pointer(bp + 4 /* &x */)).FnFree = (*ReusableSpace)(unsafe.Pointer(bp + 4 /* &x */)).FnNeeded if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - (*Vdbe)(unsafe.Pointer(p)).FaMem = allocSpace(tls, bp+4 /* &x */, (*Vdbe)(unsafe.Pointer(p)).FaMem, int64(uint32(nMem)*uint32(unsafe.Sizeof(Mem{})))) - (*Vdbe)(unsafe.Pointer(p)).FaVar = allocSpace(tls, bp+4 /* &x */, (*Vdbe)(unsafe.Pointer(p)).FaVar, int64(uint32(nVar)*uint32(unsafe.Sizeof(Mem{})))) - (*Vdbe)(unsafe.Pointer(p)).FapArg = allocSpace(tls, bp+4 /* &x */, (*Vdbe)(unsafe.Pointer(p)).FapArg, int64(uint32(*(*int32)(unsafe.Pointer(bp)))*uint32(unsafe.Sizeof(uintptr(0))))) - (*Vdbe)(unsafe.Pointer(p)).FapCsr = allocSpace(tls, bp+4 /* &x */, (*Vdbe)(unsafe.Pointer(p)).FapCsr, int64(uint32(nCursor)*uint32(unsafe.Sizeof(uintptr(0))))) + (*Vdbe)(unsafe.Pointer(p)).FaMem = allocSpace(tls, bp+4, (*Vdbe)(unsafe.Pointer(p)).FaMem, int64(uint32(nMem)*uint32(unsafe.Sizeof(Mem{})))) + (*Vdbe)(unsafe.Pointer(p)).FaVar = allocSpace(tls, bp+4, (*Vdbe)(unsafe.Pointer(p)).FaVar, int64(uint32(nVar)*uint32(unsafe.Sizeof(Mem{})))) + (*Vdbe)(unsafe.Pointer(p)).FapArg = allocSpace(tls, bp+4, (*Vdbe)(unsafe.Pointer(p)).FapArg, int64(uint32(*(*int32)(unsafe.Pointer(bp)))*uint32(unsafe.Sizeof(uintptr(0))))) + (*Vdbe)(unsafe.Pointer(p)).FapCsr = allocSpace(tls, bp+4, (*Vdbe)(unsafe.Pointer(p)).FapCsr, int64(uint32(nCursor)*uint32(unsafe.Sizeof(uintptr(0))))) } } @@ -58724,13 +58728,13 @@ func Xsqlite3VdbeMakeReady(tls *libc.TLS, p uintptr, pParse uintptr) { /* sqlite } var azColName = [12]uintptr{ - ts + 4942 /* "addr" */, ts + 4947 /* "opcode" */, ts + 4954 /* "p1" */, ts + 4957 /* "p2" */, ts + 4960 /* "p3" */, ts + 4963 /* "p4" */, ts + 4966 /* "p5" */, ts + 4969, /* "comment" */ - ts + 4977 /* "id" */, ts + 4980 /* "parent" */, ts + 4987 /* "notused" */, ts + 4995, /* "detail" */ -} /* sqlite3.c:81559:23 */ + ts + 4964, ts + 4969, ts + 4976, ts + 4979, ts + 4982, ts + 4985, ts + 4988, ts + 4991, + ts + 4999, ts + 5002, ts + 5009, ts + 5017, +} /* sqlite3.c:81568:23 */ // Close a VDBE cursor and release all the resources that cursor // happens to hold. -func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:81636:21: */ +func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3.c:81645:21: */ if pCx == uintptr(0) { return } @@ -58765,7 +58769,7 @@ func Xsqlite3VdbeFreeCursor(tls *libc.TLS, p uintptr, pCx uintptr) { /* sqlite3. } // Close all cursors in the current frame. -func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:81668:13: */ +func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:81677:13: */ if (*Vdbe)(unsafe.Pointer(p)).FapCsr != 0 { var i int32 for i = 0; i < (*Vdbe)(unsafe.Pointer(p)).FnCursor; i++ { @@ -58781,7 +58785,7 @@ func closeCursorsInFrame(tls *libc.TLS, p uintptr) { /* sqlite3.c:81668:13: */ // Copy the values stored in the VdbeFrame structure to its Vdbe. This // is used, for example, when a trigger sub-program is halted to restore // control to the main program. -func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:81686:20: */ +func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3.c:81695:20: */ var v uintptr = (*VdbeFrame)(unsafe.Pointer(pFrame)).Fv closeCursorsInFrame(tls, v) (*Vdbe)(unsafe.Pointer(v)).FaOp = (*VdbeFrame)(unsafe.Pointer(pFrame)).FaOp @@ -58805,7 +58809,7 @@ func Xsqlite3VdbeFrameRestore(tls *libc.TLS, pFrame uintptr) int32 { /* sqlite3. // cell array. This is necessary as the memory cell array may contain // pointers to VdbeFrame objects, which may in turn contain pointers to // open cursors. -func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:81715:13: */ +func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:81724:13: */ if (*Vdbe)(unsafe.Pointer(p)).FpFrame != 0 { var pFrame uintptr for pFrame = (*Vdbe)(unsafe.Pointer(p)).FpFrame; (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent != 0; pFrame = (*VdbeFrame)(unsafe.Pointer(pFrame)).FpParent { @@ -58836,7 +58840,7 @@ func closeAllCursors(tls *libc.TLS, p uintptr) { /* sqlite3.c:81715:13: */ // statement. This is now set at compile time, rather than during // execution of the vdbe program so that sqlite3_column_count() can // be called on an SQL statement before sqlite3_step(). -func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:81745:21: */ +func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sqlite3.c:81754:21: */ var n int32 var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -58861,7 +58865,7 @@ func Xsqlite3VdbeSetNumCols(tls *libc.TLS, p uintptr, nResColumn int32) { /* sql // The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC // or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed // to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed. -func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:81770:20: */ +func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zName uintptr, xDel uintptr) int32 { /* sqlite3.c:81779:20: */ var rc int32 var pColName uintptr @@ -58880,7 +58884,7 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // db. If a transaction is active, commit it. If there is a // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. -func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81798:12: */ +func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81807:12: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -58977,7 +58981,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81798 // Select a super-journal file name nMainFile = Xsqlite3Strlen30(tls, zMainFile) - zSuper = Xsqlite3MPrintf(tls, db, ts+5002 /* "%.4c%s%.16c" */, libc.VaList(bp, 0, zMainFile, 0)) + zSuper = Xsqlite3MPrintf(tls, db, ts+5024, libc.VaList(bp, 0, zMainFile, 0)) if zSuper == uintptr(0) { return SQLITE_NOMEM } @@ -58987,25 +58991,25 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81798 if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5014 /* "MJ delete: %s" */, libc.VaList(bp+24, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5036, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5028 /* "MJ collide: %s" */, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5050, libc.VaList(bp+32, zSuper)) } } retryCount++ - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56 /* &iRandom */) - Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5043, /* "-mj%06X9%02X" */ + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56) + Xsqlite3_snprintf(tls, 13, zSuper+uintptr(nMainFile), ts+5065, libc.VaList(bp+40, *(*U32)(unsafe.Pointer(bp + 56))>>8&U32(0xffffff), *(*U32)(unsafe.Pointer(bp + 56))&U32(0xff))) // The antipenultimate character of the super-journal name must // be "9" to avoid name collisions when using 8+3 filenames. - rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60 /* &res */) + rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60) } if rc == SQLITE_OK { // Open the super-journal. - rc = Xsqlite3OsOpenMalloc(tls, pVfs, zSuper, bp+64, /* &pSuperJrnl */ + rc = Xsqlite3OsOpenMalloc(tls, pVfs, zSuper, bp+64, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_SUPER_JOURNAL, uintptr(0)) } if rc != SQLITE_OK { @@ -59108,7 +59112,7 @@ var aMJNeeded = [6]U8{ /* TRUNCATE */ U8(1), /* MEMORY */ U8(0), /* WAL */ U8(0), -} /* sqlite3.c:81833:23 */ +} /* sqlite3.c:81842:23 */ // This routine checks that the sqlite3.nVdbeActive count variable // matches the number of vdbe's in the list sqlite3.pVdbe that are @@ -59126,7 +59130,7 @@ var aMJNeeded = [6]U8{ // // If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. // Otherwise SQLITE_OK. -func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82094:28: */ +func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82103:28: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = SQLITE_OK var i int32 @@ -59169,7 +59173,7 @@ func vdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3. return rc } -func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82140:20: */ +func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* sqlite3.c:82149:20: */ if (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).FnStatement != 0 && (*Vdbe)(unsafe.Pointer(p)).FiStatement != 0 { return vdbeCloseStatement(tls, p, eOp) } @@ -59184,13 +59188,13 @@ func Xsqlite3VdbeCloseStatement(tls *libc.TLS, p uintptr, eOp int32) int32 { /* // If there are outstanding FK violations and this function returns // SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT_FOREIGNKEY // and write an error message to it. Then return SQLITE_ERROR. -func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82159:20: */ +func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sqlite3.c:82168:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb if deferred != 0 && (*Sqlite3)(unsafe.Pointer(db)).FnDeferredCons+(*Sqlite3)(unsafe.Pointer(db)).FnDeferredImmCons > int64(0) || !(deferred != 0) && (*Vdbe)(unsafe.Pointer(p)).FnFkConstraint > int64(0) { (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_CONSTRAINT | int32(3)<<8 (*Vdbe)(unsafe.Pointer(p)).FerrorAction = U8(OE_Abort) - Xsqlite3VdbeError(tls, p, ts+5056 /* "FOREIGN KEY cons..." */, 0) + Xsqlite3VdbeError(tls, p, ts+5078, 0) return SQLITE_ERROR } return SQLITE_OK @@ -59207,7 +59211,7 @@ func Xsqlite3VdbeCheckFk(tls *libc.TLS, p uintptr, deferred int32) int32 { /* sq // Return an error code. If the commit could not complete because of // lock contention, return SQLITE_BUSY. If SQLITE_BUSY is returned, it // means the close did not happen and needs to be repeated. -func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82186:20: */ +func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82195:20: */ var rc int32 // Used to store transient return codes var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59411,7 +59415,7 @@ func Xsqlite3VdbeHalt(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82186:20: * // Each VDBE holds the result of the most recent sqlite3_step() call // in p->rc. This routine sets that result back to SQLITE_OK. -func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82396:21: */ +func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82405:21: */ (*Vdbe)(unsafe.Pointer(p)).Frc = SQLITE_OK } @@ -59421,7 +59425,7 @@ func Xsqlite3VdbeResetStepResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:82396: // // This function does not clear the VDBE error code or message, just // copies them to the database handle. -func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82408:20: */ +func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82417:20: */ var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb var rc int32 = (*Vdbe)(unsafe.Pointer(p)).Frc if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { @@ -59449,7 +59453,7 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82 // To look at it another way, this routine resets the state of the // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. -func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82457:20: */ +func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82466:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59481,7 +59485,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82457:20: // called), set the database error in this case as well. Xsqlite3ErrorWithMsg(tls, db, (*Vdbe)(unsafe.Pointer(p)).Frc, func() uintptr { if (*Vdbe)(unsafe.Pointer(p)).FzErrMsg != 0 { - return ts + 3601 /* "%s" */ + return ts + 3623 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) @@ -59501,7 +59505,7 @@ func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82457:20: // Clean up and delete a VDBE after execution. Return an integer which is // the result code. Write any error message text into *pzErrMsg. -func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82554:20: */ +func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82563:20: */ var rc int32 = SQLITE_OK if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic == U32(VDBE_MAGIC_HALT) { rc = Xsqlite3VdbeReset(tls, p) @@ -59525,7 +59529,7 @@ func Xsqlite3VdbeFinalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82554:2 // // * the corresponding bit in argument mask is clear (where the first // function parameter corresponds to bit 0 etc.). -func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:82580:21: */ +func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, mask int32) { /* sqlite3.c:82589:21: */ for *(*uintptr)(unsafe.Pointer(pp)) != 0 { var pAux uintptr = *(*uintptr)(unsafe.Pointer(pp)) if iOp < 0 || @@ -59550,7 +59554,7 @@ func Xsqlite3VdbeDeleteAuxData(tls *libc.TLS, db uintptr, pp uintptr, iOp int32, // The difference between this function and sqlite3VdbeDelete() is that // VdbeDelete() also unlinks the Vdbe from the list of VMs associated with // the database connection and frees the object itself. -func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:82608:21: */ +func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:82617:21: */ var pSub uintptr var pNext uintptr @@ -59571,7 +59575,7 @@ func Xsqlite3VdbeClearObject(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3. } // Delete an entire VDBE. -func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:82649:21: */ +func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:82658:21: */ var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -59594,7 +59598,7 @@ func Xsqlite3VdbeDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:82649:21: */ // The cursor "p" has a pending seek operation that has not yet been // carried out. Seek the cursor now. If an error occurs, return // the appropriate error code. -func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82675:36: */ +func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82684:36: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -59602,12 +59606,12 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:826 var rc int32 - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(p + 40)), (*VdbeCursor)(unsafe.Pointer(p)).FmovetoTarget, 0, bp /* &res */) + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(p + 40)), (*VdbeCursor)(unsafe.Pointer(p)).FmovetoTarget, 0, bp) if rc != 0 { return rc } if *(*int32)(unsafe.Pointer(bp)) != 0 { - return Xsqlite3CorruptError(tls, 82685) + return Xsqlite3CorruptError(tls, 82694) } (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) @@ -59619,7 +59623,7 @@ func Xsqlite3VdbeFinishMoveto(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:826 // rebalanced. Whatever the cause, try to restore "p" to the place it // is supposed to be pointing. If the row was deleted out from under the // cursor, set the cursor to point to a NULL row. -func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82701:28: */ +func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82710:28: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -59627,7 +59631,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82701:28: var rc int32 - rc = Xsqlite3BtreeCursorRestore(tls, *(*uintptr)(unsafe.Pointer(p + 40)), bp /* &isDifferentRow */) + rc = Xsqlite3BtreeCursorRestore(tls, *(*uintptr)(unsafe.Pointer(p + 40)), bp) (*VdbeCursor)(unsafe.Pointer(p)).FcacheStatus = U32(CACHE_STALE) if *(*int32)(unsafe.Pointer(bp)) != 0 { (*VdbeCursor)(unsafe.Pointer(p)).FnullRow = U8(1) @@ -59637,7 +59641,7 @@ func handleMovedCursor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82701:28: // Check to ensure that the cursor is valid. Restore the cursor // if need be. Return any I/O error from the restore operation. -func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82716:20: */ +func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82725:20: */ if Xsqlite3BtreeCursorHasMoved(tls, *(*uintptr)(unsafe.Pointer(p + 40))) != 0 { return handleMovedCursor(tls, p) @@ -59656,7 +59660,7 @@ func Xsqlite3VdbeCursorRestore(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82 // // If the cursor is already pointing to the correct row and that row has // not been deleted out from under the cursor, then this routine is a no-op. -func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:82737:20: */ +func Xsqlite3VdbeCursorMoveto(tls *libc.TLS, pp uintptr, piCol uintptr) int32 { /* sqlite3.c:82746:20: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if (*VdbeCursor)(unsafe.Pointer(p)).FdeferredMoveto != 0 { @@ -59731,10 +59735,10 @@ var sqlite3SmallTypeSizes = [128]U8{ /* 100 */ U8(44), U8(44), U8(45), U8(45), U8(46), U8(46), U8(47), U8(47), U8(48), U8(48), /* 110 */ U8(49), U8(49), U8(50), U8(50), U8(51), U8(51), U8(52), U8(52), U8(53), U8(53), /* 120 */ U8(54), U8(54), U8(55), U8(55), U8(56), U8(56), U8(57), U8(57), -} /* sqlite3.c:82874:17 */ +} /* sqlite3.c:82883:17 */ // Return the length of the data corresponding to the supplied serial-type. -func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:82894:20: */ +func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3.c:82903:20: */ if serial_type >= U32(128) { return (serial_type - U32(12)) / U32(2) } else { @@ -59744,7 +59748,7 @@ func Xsqlite3VdbeSerialTypeLen(tls *libc.TLS, serial_type U32) U32 { /* sqlite3. return U32(0) } -func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:82903:19: */ +func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sqlite3.c:82912:19: */ return sqlite3SmallTypeSizes[serial_type] } @@ -59793,7 +59797,7 @@ func Xsqlite3VdbeOneByteSerialTypeLen(tls *libc.TLS, serial_type U8) U8 { /* sql // Return the number of bytes actually written into buf[]. The number // of bytes in the zero-filled tail is included in the return value only // if those bytes were zeroed in buf[]. -func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:82974:20: */ +func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type U32) U32 { /* sqlite3.c:82983:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59806,7 +59810,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type var i U32 if serial_type == U32(7) { - libc.Xmemcpy(tls, bp /* &v */, pMem, uint32(unsafe.Sizeof(U64(0)))) + libc.Xmemcpy(tls, bp, pMem, uint32(unsafe.Sizeof(U64(0)))) } else { *(*U64)(unsafe.Pointer(bp /* v */)) = U64(*(*I64)(unsafe.Pointer(pMem))) @@ -59844,7 +59848,7 @@ func Xsqlite3VdbeSerialPut(tls *libc.TLS, buf uintptr, pMem uintptr, serial_type // The few cases that require local variables are broken out into a separate // routine so that in most cases the overhead of moving the stack pointer // is avoided. -func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:83028:12: */ +func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:83037:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -59854,14 +59858,14 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { if serial_type == U32(6) { // EVIDENCE-OF: R-29851-52272 Value is a big-endian 64-bit // twos-complement integer. - *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp /* &x */)) + *(*I64)(unsafe.Pointer(pMem)) = *(*I64)(unsafe.Pointer(bp)) (*Mem)(unsafe.Pointer(pMem)).Fflags = U16(MEM_Int) } else { // EVIDENCE-OF: R-57343-49114 Value is a big-endian IEEE 754-2008 64-bit // floating point number. - libc.Xmemcpy(tls, pMem, bp /* &x */, uint32(unsafe.Sizeof(U64(0)))) + libc.Xmemcpy(tls, pMem, bp, uint32(unsafe.Sizeof(U64(0)))) (*Mem)(unsafe.Pointer(pMem)).Fflags = func() uint16 { if *(*U64)(unsafe.Pointer(bp))&(U64(uint64(0x7ff))<<52) == U64(uint64(0x7ff))<<52 && *(*U64)(unsafe.Pointer(bp))&(U64(uint64(1))<<52-uint64(1)) != uint64(0) { return uint16(MEM_Null) @@ -59872,7 +59876,7 @@ func serialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { return U32(8) } -func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:83064:20: */ +func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uintptr) U32 { /* sqlite3.c:83073:20: */ switch serial_type { case U32(10): { // Internal use only: NULL with virtual table @@ -59974,7 +59978,7 @@ func Xsqlite3VdbeSerialGet(tls *libc.TLS, buf uintptr, serial_type U32, pMem uin return U32(0) } -var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83146:24 */ +var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlite3.c:83155:24 */ // This routine is used to allocate sufficient space for an UnpackedRecord // structure large enough to be used with sqlite3VdbeRecordUnpack() if @@ -59988,7 +59992,7 @@ var aFlag = [2]U16{U16(MEM_Blob | MEM_Ephem), U16(MEM_Str | MEM_Ephem)} /* sqlit // before returning. // // If an OOM error occurs, NULL is returned. -func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83169:31: */ +func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { /* sqlite3.c:83178:31: */ var p uintptr // Unpacked record to return var nByte int32 // Number of bytes required for *p nByte = int32((uint32(unsafe.Sizeof(UnpackedRecord{}))+uint32(7))&libc.Uint32FromInt32(libc.CplInt32(7)) + uint32(unsafe.Sizeof(Mem{}))*uint32(int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField)+1)) @@ -60006,7 +60010,7 @@ func Xsqlite3VdbeAllocUnpackedRecord(tls *libc.TLS, pKeyInfo uintptr) uintptr { // Given the nKey-byte encoding of a record in pKey[], populate the // UnpackedRecord structure indicated by the fourth argument with the // contents of the decoded record. -func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83189:21: */ +func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr, p uintptr) { /* sqlite3.c:83198:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -60066,7 +60070,7 @@ func Xsqlite3VdbeRecordUnpack(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey // using the collation sequence pColl. As usual, return a negative , zero // or positive value if *pMem1 is less than, equal to or greater than // *pMem2, respectively. Similar in spirit to "rc = (*pMem1) - (*pMem2);". -func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83384:12: */ +func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr, prcErr uintptr) int32 { /* sqlite3.c:83393:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -60084,12 +60088,12 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // var c2 Mem at bp+40, 40 - Xsqlite3VdbeMemInit(tls, bp /* &c1 */, (*Mem)(unsafe.Pointer(pMem1)).Fdb, uint16(MEM_Null)) - Xsqlite3VdbeMemInit(tls, bp+40 /* &c2 */, (*Mem)(unsafe.Pointer(pMem1)).Fdb, uint16(MEM_Null)) - Xsqlite3VdbeMemShallowCopy(tls, bp /* &c1 */, pMem1, MEM_Ephem) - Xsqlite3VdbeMemShallowCopy(tls, bp+40 /* &c2 */, pMem2, MEM_Ephem) - v1 = Xsqlite3ValueText(tls, bp /* &c1 */, (*CollSeq)(unsafe.Pointer(pColl)).Fenc) - v2 = Xsqlite3ValueText(tls, bp+40 /* &c2 */, (*CollSeq)(unsafe.Pointer(pColl)).Fenc) + Xsqlite3VdbeMemInit(tls, bp, (*Mem)(unsafe.Pointer(pMem1)).Fdb, uint16(MEM_Null)) + Xsqlite3VdbeMemInit(tls, bp+40, (*Mem)(unsafe.Pointer(pMem1)).Fdb, uint16(MEM_Null)) + Xsqlite3VdbeMemShallowCopy(tls, bp, pMem1, MEM_Ephem) + Xsqlite3VdbeMemShallowCopy(tls, bp+40, pMem2, MEM_Ephem) + v1 = Xsqlite3ValueText(tls, bp, (*CollSeq)(unsafe.Pointer(pColl)).Fenc) + v2 = Xsqlite3ValueText(tls, bp+40, (*CollSeq)(unsafe.Pointer(pColl)).Fenc) if v1 == uintptr(0) || v2 == uintptr(0) { if prcErr != 0 { *(*U8)(unsafe.Pointer(prcErr)) = U8(SQLITE_NOMEM) @@ -60100,8 +60104,8 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*CollSeq)(unsafe.Pointer(pColl)).FxCmp})).f(tls, (*CollSeq)(unsafe.Pointer(pColl)).FpUser, (*Mem)(unsafe.Pointer(bp /* &c1 */)).Fn, v1, (*Mem)(unsafe.Pointer(bp+40 /* &c2 */)).Fn, v2) } - Xsqlite3VdbeMemRelease(tls, bp /* &c1 */) - Xsqlite3VdbeMemRelease(tls, bp+40 /* &c2 */) + Xsqlite3VdbeMemRelease(tls, bp) + Xsqlite3VdbeMemRelease(tls, bp+40) return rc } return int32(0) @@ -60109,7 +60113,7 @@ func vdbeCompareMemString(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uin // The input pBlob is guaranteed to be a Blob that is not marked // with MEM_Zero. Return true if it could be a zero-blob. -func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:83421:12: */ +func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:83430:12: */ var i int32 for i = 0; i < n; i++ { if *(*int8)(unsafe.Pointer(z + uintptr(i))) != 0 { @@ -60122,7 +60126,7 @@ func isAllZero(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:83421:12: // Compare two blobs. Return negative, zero, or positive if the first // is less than, equal to, or greater than the second, respectively. // If one blob is a prefix of the other, then the shorter is the lessor. -func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:83434:36: */ +func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sqlite3.c:83443:36: */ var c int32 var n1 int32 = (*Mem)(unsafe.Pointer(pB1)).Fn var n2 int32 = (*Mem)(unsafe.Pointer(pB2)).Fn @@ -60162,7 +60166,7 @@ func Xsqlite3BlobCompare(tls *libc.TLS, pB1 uintptr, pB2 uintptr) int32 { /* sql // Do a comparison between a 64-bit signed integer and a 64-bit floating-point // number. Return negative, zero, or positive if the first (i64) is less than, // equal to, or greater than the second (double). -func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:83467:20: */ +func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3.c:83476:20: */ if uint32(unsafe.Sizeof(float64(0))) > uint32(8) { var x float64 = float64(i) @@ -60208,7 +60212,7 @@ func Xsqlite3IntFloatCompare(tls *libc.TLS, i I64, r float64) int32 { /* sqlite3 // sequence pColl and finally blob's ordered by memcmp(). // // Two NULL values are considered equal by this function. -func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:83500:20: */ +func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintptr) int32 { /* sqlite3.c:83509:20: */ var f1 int32 var f2 int32 var combined_flags int32 @@ -60302,7 +60306,7 @@ func Xsqlite3MemCompare(tls *libc.TLS, pMem1 uintptr, pMem2 uintptr, pColl uintp // except 7. The second points to a buffer containing an integer value // serialized according to serial_type. This function deserializes // and returns the value. -func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:83599:12: */ +func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* sqlite3.c:83608:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -60324,7 +60328,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* { *(*U32)(unsafe.Pointer(bp /* y */)) = U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3))) - return I64(*(*int32)(unsafe.Pointer(bp /* &y */))) + return I64(*(*int32)(unsafe.Pointer(bp))) } case U32(5): @@ -60338,7 +60342,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* *(*U64)(unsafe.Pointer(bp + 4 /* x */)) = U64(U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3)))) *(*U64)(unsafe.Pointer(bp + 4 /* x */)) = *(*U64)(unsafe.Pointer(bp + 4))<<32 | U64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 3)))) - return *(*I64)(unsafe.Pointer(bp + 4 /* &x */)) + return *(*I64)(unsafe.Pointer(bp + 4)) } } @@ -60365,7 +60369,7 @@ func vdbeRecordDecodeInt(tls *libc.TLS, serial_type U32, aKey uintptr) I64 { /* // SQLITE_CORRUPT and return 0. If an OOM error is encountered, // pPKey2->errCode is set to SQLITE_NOMEM and, if it is not NULL, the // malloc-failed flag set on database handle (pPKey2->pKeyInfo->db). -func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:83654:20: */ +func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr, bSkip int32) int32 { /* sqlite3.c:83663:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -60407,7 +60411,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr i = 0 } if d1 > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83685)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83694)) return 0 // Corruption } @@ -60424,7 +60428,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(7) { - Xsqlite3VdbeSerialGet(tls, aKey1+uintptr(d1), *(*U32)(unsafe.Pointer(bp + 48 /* serial_type */)), bp+8 /* &mem1 */) + Xsqlite3VdbeSerialGet(tls, aKey1+uintptr(d1), *(*U32)(unsafe.Pointer(bp + 48 /* serial_type */)), bp+8) rc = -Xsqlite3IntFloatCompare(tls, *(*I64)(unsafe.Pointer(pRhs)), *(*float64)(unsafe.Pointer(bp + 8))) } else { var lhs I64 = vdbeRecordDecodeInt(tls, *(*U32)(unsafe.Pointer(bp + 48 /* serial_type */)), aKey1+uintptr(d1)) @@ -60446,7 +60450,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if *(*U32)(unsafe.Pointer(bp + 48)) == U32(0) { rc = -1 } else { - Xsqlite3VdbeSerialGet(tls, aKey1+uintptr(d1), *(*U32)(unsafe.Pointer(bp + 48 /* serial_type */)), bp+8 /* &mem1 */) + Xsqlite3VdbeSerialGet(tls, aKey1+uintptr(d1), *(*U32)(unsafe.Pointer(bp + 48 /* serial_type */)), bp+8) if *(*U32)(unsafe.Pointer(bp + 48)) == U32(7) { if *(*float64)(unsafe.Pointer(bp + 8)) < *(*float64)(unsafe.Pointer(pRhs)) { rc = -1 @@ -60460,7 +60464,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Str != 0 { *(*U32)(unsafe.Pointer(bp + 48 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(0x80) { - Xsqlite3GetVarint32(tls, aKey1+uintptr(idx1), bp+48 /* &serial_type */) + Xsqlite3GetVarint32(tls, aKey1+uintptr(idx1), bp+48) } if *(*U32)(unsafe.Pointer(bp + 48)) < U32(12) { @@ -60472,7 +60476,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr if d1+U32((*Mem)(unsafe.Pointer(bp+8)).Fn) > uint32(nKey1) || int32((*KeyInfo)(unsafe.Pointer(libc.AssignUintptr(&pKeyInfo, (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FpKeyInfo))).FnAllField) <= i { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83762)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83771)) return 0 // Corruption } else if *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)) != 0 { (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fenc = (*KeyInfo)(unsafe.Pointer(pKeyInfo)).Fenc @@ -60480,7 +60484,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fflags = U16(MEM_Str) (*Mem)(unsafe.Pointer(bp + 8 /* &mem1 */)).Fz = aKey1 + uintptr(d1) rc = vdbeCompareMemString(tls, - bp+8 /* &mem1 */, pRhs, *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)), pPKey2+11) + bp+8, pRhs, *(*uintptr)(unsafe.Pointer(pKeyInfo + 20 + uintptr(i)*4)), pPKey2+11) } else { var nCmp int32 = func() int32 { if (*Mem)(unsafe.Pointer(bp+8)).Fn < (*Mem)(unsafe.Pointer(pRhs)).Fn { @@ -60498,7 +60502,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr *(*U32)(unsafe.Pointer(bp + 48 /* serial_type */)) = U32(*(*uint8)(unsafe.Pointer(aKey1 + uintptr(idx1)))) if *(*U32)(unsafe.Pointer(bp + 48)) >= U32(0x80) { - Xsqlite3GetVarint32(tls, aKey1+uintptr(idx1), bp+48 /* &serial_type */) + Xsqlite3GetVarint32(tls, aKey1+uintptr(idx1), bp+48) } if *(*U32)(unsafe.Pointer(bp + 48)) < U32(12) || *(*U32)(unsafe.Pointer(bp + 48))&U32(0x01) != 0 { @@ -60507,7 +60511,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr var nStr int32 = int32((*(*U32)(unsafe.Pointer(bp + 48)) - U32(12)) / U32(2)) if d1+U32(nStr) > uint32(nKey1) { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83792)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83801)) return 0 // Corruption } else if int32((*Mem)(unsafe.Pointer(pRhs)).Fflags)&MEM_Zero != 0 { if !(isAllZero(tls, aKey1+uintptr(d1), nStr) != 0) { @@ -60568,7 +60572,7 @@ func Xsqlite3VdbeRecordCompareWithSkip(tls *libc.TLS, nKey1 int32, pKey1 uintptr return int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fdefault_rc) } -func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83851:20: */ +func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83860:20: */ return Xsqlite3VdbeRecordCompareWithSkip(tls, nKey1, pKey1, pPKey2, 0) } @@ -60579,7 +60583,7 @@ func Xsqlite3VdbeRecordCompare(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 // // To avoid concerns about buffer overreads, this routine is only used // on schemas where the maximum valid header size is 63 bytes or less. -func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83868:12: */ +func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83877:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -60618,7 +60622,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint case 4: { // 4-byte signed integer *(*U32)(unsafe.Pointer(bp /* y */)) = U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3))) - lhs = I64(*(*int32)(unsafe.Pointer(bp /* &y */))) + lhs = I64(*(*int32)(unsafe.Pointer(bp))) break @@ -60634,7 +60638,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint { // 8-byte signed integer *(*U64)(unsafe.Pointer(bp + 4 /* x */)) = U64(U32(*(*U8)(unsafe.Pointer(aKey)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aKey + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aKey + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aKey + 3)))) *(*U64)(unsafe.Pointer(bp + 4 /* x */)) = *(*U64)(unsafe.Pointer(bp + 4))<<32 | U64(U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4))))<<24|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 1)))<<16)|U32(int32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 2)))<<8)|U32(*(*U8)(unsafe.Pointer(aKey + uintptr(4) + 3)))) - lhs = *(*I64)(unsafe.Pointer(bp + 4 /* &x */)) + lhs = *(*I64)(unsafe.Pointer(bp + 4)) break @@ -60684,7 +60688,7 @@ func vdbeRecordCompareInt(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uint // that (a) the first field of pPKey2 is a string, that (b) the first field // uses the collation sequence BINARY and (c) that the size-of-header varint // at the start of (pKey1/nKey1) fits in a single byte. -func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83962:12: */ +func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 uintptr) int32 { /* sqlite3.c:83971:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -60695,7 +60699,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u *(*int32)(unsafe.Pointer(bp /* serial_type */)) = int32(*(*U8)(unsafe.Pointer(aKey1 + 1))) if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { - Xsqlite3GetVarint32(tls, aKey1+1, bp /* &serial_type */) + Xsqlite3GetVarint32(tls, aKey1+1, bp) } if *(*int32)(unsafe.Pointer(bp)) < 12 { res = int32((*UnpackedRecord)(unsafe.Pointer(pPKey2)).Fr1) // (pKey1/nKey1) is a number or a null @@ -60708,7 +60712,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u nStr = (*(*int32)(unsafe.Pointer(bp)) - 12) / 2 if szHdr+nStr > nKey1 { - (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83987)) + (*UnpackedRecord)(unsafe.Pointer(pPKey2)).FerrCode = U8(Xsqlite3CorruptError(tls, 83996)) return 0 // Corruption } nCmp = func() int32 { @@ -60746,7 +60750,7 @@ func vdbeRecordCompareString(tls *libc.TLS, nKey1 int32, pKey1 uintptr, pPKey2 u // Return a pointer to an sqlite3VdbeRecordCompare() compatible function // suitable for comparing serialized records to the unpacked record passed // as the only argument. -func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84026:30: */ +func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite3.c:84035:30: */ // varintRecordCompareInt() and varintRecordCompareString() both assume // that the size-of-header varint that occurs at the start of each record // fits in a single byte (i.e. is 127 or less). varintRecordCompareInt() @@ -60800,7 +60804,7 @@ func Xsqlite3VdbeFindCompare(tls *libc.TLS, p uintptr) RecordCompare { /* sqlite // // pCur might be pointing to text obtained from a corrupt database file. // So the content cannot be trusted. Do appropriate checks on the content. -func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84077:20: */ +func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr) int32 { /* sqlite3.c:84086:20: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -60824,8 +60828,8 @@ func Xsqlite3VdbeIdxRowid(tls *libc.TLS, db uintptr, pCur uintptr, rowid uintptr nCellKey = I64(Xsqlite3BtreePayloadSize(tls, pCur)) // Read in the complete content of the index entry - Xsqlite3VdbeMemInit(tls, bp /* &m */, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp /* &m */) + Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) if !(rc != 0) { goto __1 } @@ -60838,7 +60842,7 @@ __1: if !(*(*U32)(unsafe.Pointer(bp + 40)) >= U32(0x80)) { goto __2 } - Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(bp)).Fz, bp+40 /* &szHdr */) + Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(bp)).Fz, bp+40) __2: ; @@ -60855,7 +60859,7 @@ __3: if !(*(*U32)(unsafe.Pointer(bp + 44)) >= U32(0x80)) { goto __4 } - Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(bp)).Fz+uintptr(*(*U32)(unsafe.Pointer(bp + 40))-U32(1)), bp+44 /* &typeRowid */) + Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(bp)).Fz+uintptr(*(*U32)(unsafe.Pointer(bp + 40))-U32(1)), bp+44) __4: ; @@ -60875,17 +60879,17 @@ __6: ; // Fetch the integer off the end of the index record - Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(bp)).Fz+uintptr(U32((*Mem)(unsafe.Pointer(bp)).Fn)-lenRowid), *(*U32)(unsafe.Pointer(bp + 44 /* typeRowid */)), bp+48 /* &v */) + Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(bp)).Fz+uintptr(U32((*Mem)(unsafe.Pointer(bp)).Fn)-lenRowid), *(*U32)(unsafe.Pointer(bp + 44 /* typeRowid */)), bp+48) *(*I64)(unsafe.Pointer(rowid)) = *(*I64)(unsafe.Pointer(bp + 48)) - Xsqlite3VdbeMemRelease(tls, bp /* &m */) + Xsqlite3VdbeMemRelease(tls, bp) return SQLITE_OK // Jump here if database corruption is detected after m has been // allocated. Free the m object and return SQLITE_CORRUPT. idx_rowid_corruption: ; - Xsqlite3VdbeMemRelease(tls, bp /* &m */) - return Xsqlite3CorruptError(tls, 84142) + Xsqlite3VdbeMemRelease(tls, bp) + return Xsqlite3CorruptError(tls, 84151) } // Compare the key of the index entry that cursor pC is pointing to against @@ -60897,7 +60901,7 @@ idx_rowid_corruption: // omits the rowid at the end. The rowid at the end of the index entry // is ignored as well. Hence, this routine only compares the prefixes // of the keys prior to the final rowid, not the entire key. -func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84156:20: */ +func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked uintptr, res uintptr) int32 { /* sqlite3.c:84165:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -60913,21 +60917,21 @@ func Xsqlite3VdbeIdxKeyCompare(tls *libc.TLS, db uintptr, pC uintptr, pUnpacked // that btreeParseCellPtr() and sqlite3GetVarint32() are implemented if nCellKey <= int64(0) || nCellKey > int64(0x7fffffff) { *(*int32)(unsafe.Pointer(res)) = 0 - return Xsqlite3CorruptError(tls, 84175) + return Xsqlite3CorruptError(tls, 84184) } - Xsqlite3VdbeMemInit(tls, bp /* &m */, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp /* &m */) + Xsqlite3VdbeMemInit(tls, bp, db, uint16(0)) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur, U32(nCellKey), bp) if rc != 0 { return rc } *(*int32)(unsafe.Pointer(res)) = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp /* &m */)).Fz, pUnpacked, 0) - Xsqlite3VdbeMemRelease(tls, bp /* &m */) + Xsqlite3VdbeMemRelease(tls, bp) return SQLITE_OK } // This routine sets the value to be returned by subsequent calls to // sqlite3_changes() on the database handle 'db'. -func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84191:21: */ +func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3.c:84200:21: */ (*Sqlite3)(unsafe.Pointer(db)).FnChange = nChange *(*I64)(unsafe.Pointer(db + 104)) += nChange @@ -60935,7 +60939,7 @@ func Xsqlite3VdbeSetChanges(tls *libc.TLS, db uintptr, nChange I64) { /* sqlite3 // Set a flag in the vdbe to update the change counter when it is finalised // or reset. -func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84201:21: */ +func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84210:21: */ libc.SetBitFieldPtr16Uint32(v+148, Bft(1), 4, 0x10) } @@ -60955,7 +60959,7 @@ func Xsqlite3VdbeCountChanges(tls *libc.TLS, v uintptr) { /* sqlite3.c:84201:21: // Internally, this function just sets the Vdbe.expired flag on all // prepared statements. The flag is set to 1 for an immediate expiration // and set to 2 for an advisory expiration. -func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84223:21: */ +func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { /* sqlite3.c:84232:21: */ var p uintptr for p = (*Sqlite3)(unsafe.Pointer(db)).FpVdbe; p != 0; p = (*Vdbe)(unsafe.Pointer(p)).FpNext { libc.SetBitFieldPtr16Uint32(p+148, Bft(iCode+1), 0, 0x3) @@ -60963,12 +60967,12 @@ func Xsqlite3ExpirePreparedStatements(tls *libc.TLS, db uintptr, iCode int32) { } // Return the database associated with the Vdbe. -func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84233:24: */ +func Xsqlite3VdbeDb(tls *libc.TLS, v uintptr) uintptr { /* sqlite3.c:84242:24: */ return (*Vdbe)(unsafe.Pointer(v)).Fdb } // Return the SQLITE_PREPARE flags for a Vdbe. -func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84240:19: */ +func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84249:19: */ return (*Vdbe)(unsafe.Pointer(v)).FprepFlags } @@ -60978,7 +60982,7 @@ func Xsqlite3VdbePrepareFlags(tls *libc.TLS, v uintptr) U8 { /* sqlite3.c:84240: // constants) to the value before returning it. // // The returned value must be freed by the caller using sqlite3ValueFree(). -func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84252:30: */ +func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uintptr { /* sqlite3.c:84261:30: */ if v != 0 { var pMem uintptr = (*Vdbe)(unsafe.Pointer(v)).FaVar + uintptr(iVar-1)*40 @@ -60998,7 +61002,7 @@ func Xsqlite3VdbeGetBoundValue(tls *libc.TLS, v uintptr, iVar int32, aff U8) uin // Configure SQL variable iVar so that binding a new value to it signals // to sqlite3_reoptimize() that re-preparing the statement may result // in a better query plan. -func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84274:21: */ +func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c:84283:21: */ if iVar >= 32 { *(*U32)(unsafe.Pointer(v + 208)) |= 0x80000000 @@ -61014,7 +61018,7 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // throw an error if it is given inputs that would make it non-deterministic. // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. -func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84293:20: */ +func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84302:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61027,13 +61031,13 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84293 var zContext uintptr var zMsg uintptr if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_IsCheck != 0 { - zContext = ts + 5086 /* "a CHECK constrai..." */ + zContext = ts + 5108 /* "a CHECK constrai..." */ } else if int32((*VdbeOp)(unsafe.Pointer(pOp)).Fp5)&NC_GenCol != 0 { - zContext = ts + 5105 /* "a generated colu..." */ + zContext = ts + 5127 /* "a generated colu..." */ } else { - zContext = ts + 5124 /* "an index" */ + zContext = ts + 5146 /* "an index" */ } - zMsg = Xsqlite3_mprintf(tls, ts+5133, /* "non-deterministi..." */ + zMsg = Xsqlite3_mprintf(tls, ts+5155, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpFunc)).FzName, zContext)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) @@ -61045,7 +61049,7 @@ func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84293 // Transfer error message text from an sqlite3_vtab.zErrMsg (text stored // in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored // in memory obtained from sqlite3DbMalloc). -func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84324:21: */ +func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqlite3.c:84333:21: */ if (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg != 0 { var db uintptr = (*Vdbe)(unsafe.Pointer(p)).Fdb Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) @@ -61061,7 +61065,7 @@ func Xsqlite3VtabImportErrmsg(tls *libc.TLS, p uintptr, pVtab uintptr) { /* sqli // // This function is used to free UnpackedRecord structures allocated by // the vdbeUnpackRecord() function found in vdbeapi.c. -func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84345:13: */ +func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* sqlite3.c:84354:13: */ if p != 0 { var i int32 for i = 0; i < nField; i++ { @@ -61078,7 +61082,7 @@ func vdbeFreeUnpacked(tls *libc.TLS, db uintptr, nField int32, p uintptr) { /* s // then cursor passed as the second argument should point to the row about // to be update or deleted. If the application calls sqlite3_preupdate_old(), // the required value will be read from the row the cursor points to. -func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84364:21: */ +func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, zDb uintptr, pTab uintptr, iKey1 I64, iReg int32, iBlobWrite int32) { /* sqlite3.c:84373:21: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -61088,7 +61092,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, var zTbl uintptr = (*Table)(unsafe.Pointer(pTab)).FzName - libc.Xmemset(tls, bp /* &preupdate */, 0, uint32(unsafe.Sizeof(PreUpdate{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(PreUpdate{}))) if libc.Bool32((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) == 0 { iKey1 = libc.AssignInt64(&iKey2, int64(0)) (*PreUpdate)(unsafe.Pointer(bp /* &preupdate */)).FpPk = Xsqlite3PrimaryKeyIndex(tls, pTab) @@ -61130,7 +61134,7 @@ func Xsqlite3VdbePreUpdateHook(tls *libc.TLS, v uintptr, pCsr uintptr, op int32, } } -var fakeSortOrder U8 = U8(0) /* sqlite3.c:84378:19 */ +var fakeSortOrder U8 = U8(0) /* sqlite3.c:84387:19 */ //************* End of vdbeaux.c ******************************************** //************* Begin file vdbeapi.c **************************************** @@ -61156,7 +61160,7 @@ var fakeSortOrder U8 = U8(0) /* sqlite3.c:84378:19 */ // that sqlite3_prepare() generates. For example, if new functions or // collating sequences are registered or if an authorizer function is // added or changed. -func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84457:16: */ +func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84466:16: */ var p uintptr = pStmt return libc.Bool32(p == uintptr(0) || Bft(int32(*(*uint16)(unsafe.Pointer(p + 148))&0x3>>0)) != 0) } @@ -61164,9 +61168,9 @@ func Xsqlite3_expired(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84457:1 // Check on a Vdbe to make sure it has not been finalized. Log // an error and return true if it has been finalized (or is otherwise // invalid). Return false if it is ok. -func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84468:12: */ +func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84477:12: */ if (*Vdbe)(unsafe.Pointer(p)).Fdb == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5169 /* "API called with ..." */, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5191, 0) return 1 } else { return 0 @@ -61174,9 +61178,9 @@ func vdbeSafety(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84468:12: */ return int32(0) } -func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84476:12: */ +func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84485:12: */ if p == uintptr(0) { - Xsqlite3_log(tls, SQLITE_MISUSE, ts+5214 /* "API called with ..." */, 0) + Xsqlite3_log(tls, SQLITE_MISUSE, ts+5236, 0) return 1 } else { return vdbeSafety(tls, p) @@ -61186,7 +61190,7 @@ func vdbeSafetyNotNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:84476:12: // Invoke the profile callback. This routine is only called if we already // know that the profile callback is defined and needs to be invoked. -func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:84490:29: */ +func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:84499:29: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -61194,7 +61198,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // var iElapse Sqlite3_int64 at bp+8, 8 - Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, bp /* &iNow */) + Xsqlite3OsCurrentTimeInt64(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, bp) *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* iElapse */)) = (*(*Sqlite3_int64)(unsafe.Pointer(bp)) - (*Vdbe)(unsafe.Pointer(p)).FstartTime) * int64(1000000) if (*Sqlite3)(unsafe.Pointer(db)).FxProfile != 0 { (*struct { @@ -61219,7 +61223,7 @@ func invokeProfileCallback(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84528:16: */ +func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84537:16: */ var rc int32 if pStmt == uintptr(0) { // IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL @@ -61229,7 +61233,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84528: var v uintptr = pStmt var db uintptr = (*Vdbe)(unsafe.Pointer(v)).Fdb if vdbeSafety(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 84537) + return Xsqlite3MisuseError(tls, 84546) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Vdbe)(unsafe.Pointer(v)).FstartTime > int64(0) { @@ -61249,7 +61253,7 @@ func Xsqlite3_finalize(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84528: // // This routine sets the error code and string returned by // sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). -func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84555:16: */ +func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84564:16: */ var rc int32 if pStmt == uintptr(0) { rc = SQLITE_OK @@ -61271,7 +61275,7 @@ func Xsqlite3_reset(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84555:16: } // Set all the parameters in the compiled SQL statement to NULL. -func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84576:16: */ +func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:84585:16: */ var i int32 var rc int32 = SQLITE_OK var p uintptr = pStmt @@ -61293,7 +61297,7 @@ func Xsqlite3_clear_bindings(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: // // The following routines extract information from a Mem or sqlite3_value // structure. -func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84601:23: */ +func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84610:23: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_Blob|MEM_Str) != 0 { if func() int32 { @@ -61316,27 +61320,27 @@ func Xsqlite3_value_blob(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:846 return uintptr(0) } -func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84614:16: */ +func Xsqlite3_value_bytes(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84623:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84617:16: */ +func Xsqlite3_value_bytes16(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84626:16: */ return Xsqlite3ValueBytes(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:84620:19: */ +func Xsqlite3_value_double(tls *libc.TLS, pVal uintptr) float64 { /* sqlite3.c:84629:19: */ return Xsqlite3VdbeRealValue(tls, pVal) } -func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84623:16: */ +func Xsqlite3_value_int(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84632:16: */ return int32(Xsqlite3VdbeIntValue(tls, pVal)) } -func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:84626:25: */ +func Xsqlite3_value_int64(tls *libc.TLS, pVal uintptr) Sqlite_int64 { /* sqlite3.c:84635:25: */ return Xsqlite3VdbeIntValue(tls, pVal) } -func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:84629:25: */ +func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:84638:25: */ var pMem uintptr = pVal return func() uint32 { if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&MEM_Subtype != 0 { @@ -61346,7 +61350,7 @@ func Xsqlite3_value_subtype(tls *libc.TLS, pVal uintptr) uint32 { /* sqlite3.c:8 }() } -func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:84633:17: */ +func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr { /* sqlite3.c:84642:17: */ var p uintptr = pVal if int32((*Mem)(unsafe.Pointer(p)).Fflags)&(MEM_TypeMask|MEM_Term|MEM_Subtype) == MEM_Null|MEM_Term|MEM_Subtype && zPType != uintptr(0) && @@ -61359,26 +61363,26 @@ func Xsqlite3_value_pointer(tls *libc.TLS, pVal uintptr, zPType uintptr) uintptr return uintptr(0) } -func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84646:32: */ +func Xsqlite3_value_text(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84655:32: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF8)) } -func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84650:23: */ +func Xsqlite3_value_text16(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84659:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84653:23: */ +func Xsqlite3_value_text16be(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84662:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16BE)) } -func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84656:23: */ +func Xsqlite3_value_text16le(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:84665:23: */ return Xsqlite3ValueText(tls, pVal, uint8(SQLITE_UTF16LE)) } // EVIDENCE-OF: R-12793-43283 Every value in SQLite has one of five // fundamental datatypes: 64-bit signed integer 64-bit IEEE floating // point number string BLOB NULL -func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84664:16: */ +func Xsqlite3_value_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84673:16: */ return int32(aType[int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_AffMask]) } @@ -61447,20 +61451,20 @@ var aType = [64]U8{ U8(SQLITE_NULL), // 0x3d (not possible) U8(SQLITE_FLOAT), // 0x3e (not possible) U8(SQLITE_NULL), // 0x3f (not possible) -} /* sqlite3.c:84665:19 */ +} /* sqlite3.c:84674:19 */ // Return true if a parameter to xUpdate represents an unchanged column -func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84750:16: */ +func Xsqlite3_value_nochange(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84759:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&(MEM_Null|MEM_Zero) == MEM_Null|MEM_Zero) } // Return true if a parameter value originated from an sqlite3_bind() -func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84755:16: */ +func Xsqlite3_value_frombind(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:84764:16: */ return libc.Bool32(int32((*Sqlite3_value)(unsafe.Pointer(pVal)).Fflags)&MEM_FromBind != 0) } // Make a copy of an sqlite3_value object -func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:84761:26: */ +func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:84770:26: */ var pNew uintptr if pOrig == uintptr(0) { return uintptr(0) @@ -61486,7 +61490,7 @@ func Xsqlite3_value_dup(tls *libc.TLS, pOrig uintptr) uintptr { /* sqlite3.c:847 // Destroy an sqlite3_value object previously obtained from // sqlite3_value_dup(). -func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:84784:17: */ +func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:84793:17: */ Xsqlite3ValueFree(tls, pOld) } @@ -61501,7 +61505,7 @@ func Xsqlite3_value_free(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:84784:17: * // // The invokeValueDestructor(P,X) routine invokes destructor function X() // on value P is not going to be used and need to be destroyed. -func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:84800:13: */ +func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8, xDel uintptr) { /* sqlite3.c:84809:13: */ var rc int32 = Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), enc, xDel) if rc != 0 { if rc == SQLITE_TOOBIG { @@ -61515,7 +61519,7 @@ func setResultStrOrError(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, enc U8 } } -func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:84819:12: */ +func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) int32 { /* sqlite3.c:84828:12: */ if xDel == uintptr(0) { // noop @@ -61528,12 +61532,12 @@ func invokeValueDestructor(tls *libc.TLS, p uintptr, xDel uintptr, pCtx uintptr) return SQLITE_TOOBIG } -func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84835:17: */ +func Xsqlite3_result_blob(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84844:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(0), xDel) } -func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:84845:17: */ +func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr) { /* sqlite3.c:84854:17: */ if n > uint64(0x7fffffff) { invokeValueDestructor(tls, z, xDel, pCtx) @@ -61542,39 +61546,39 @@ func Xsqlite3_result_blob64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:84859:17: */ +func Xsqlite3_result_double(tls *libc.TLS, pCtx uintptr, rVal float64) { /* sqlite3.c:84868:17: */ Xsqlite3VdbeMemSetDouble(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, rVal) } -func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:84863:17: */ +func Xsqlite3_result_error(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:84872:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF8), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:84869:17: */ +func Xsqlite3_result_error16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32) { /* sqlite3.c:84878:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_ERROR Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, z, int64(n), uint8(SQLITE_UTF16LE), libc.UintptrFromInt32(-1)) } -func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:84875:17: */ +func Xsqlite3_result_int(tls *libc.TLS, pCtx uintptr, iVal int32) { /* sqlite3.c:84884:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, I64(iVal)) } -func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:84879:17: */ +func Xsqlite3_result_int64(tls *libc.TLS, pCtx uintptr, iVal I64) { /* sqlite3.c:84888:17: */ Xsqlite3VdbeMemSetInt64(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, iVal) } -func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84883:17: */ +func Xsqlite3_result_null(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84892:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) } -func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:84887:17: */ +func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType uintptr, xDestructor uintptr) { /* sqlite3.c:84896:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut Xsqlite3VdbeMemRelease(tls, pOut) @@ -61582,19 +61586,19 @@ func Xsqlite3_result_pointer(tls *libc.TLS, pCtx uintptr, pPtr uintptr, zPType u Xsqlite3VdbeMemSetPointer(tls, pOut, pPtr, zPType, xDestructor) } -func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:84899:17: */ +func Xsqlite3_result_subtype(tls *libc.TLS, pCtx uintptr, eSubtype uint32) { /* sqlite3.c:84908:17: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut (*Mem)(unsafe.Pointer(pOut)).FeSubtype = U8(eSubtype & uint32(0xff)) *(*U16)(unsafe.Pointer(pOut + 8)) |= U16(MEM_Subtype) } -func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84905:17: */ +func Xsqlite3_result_text(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84914:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF8), xDel) } -func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:84914:17: */ +func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_uint64, xDel uintptr, enc uint8) { /* sqlite3.c:84923:17: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -61606,32 +61610,32 @@ func Xsqlite3_result_text64(tls *libc.TLS, pCtx uintptr, z uintptr, n Sqlite3_ui } } -func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84931:17: */ +func Xsqlite3_result_text16(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84940:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84940:17: */ +func Xsqlite3_result_text16be(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84949:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16BE), xDel) } -func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84949:17: */ +func Xsqlite3_result_text16le(tls *libc.TLS, pCtx uintptr, z uintptr, n int32, xDel uintptr) { /* sqlite3.c:84958:17: */ setResultStrOrError(tls, pCtx, z, n, uint8(SQLITE_UTF16LE), xDel) } -func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:84959:17: */ +func Xsqlite3_result_value(tls *libc.TLS, pCtx uintptr, pValue uintptr) { /* sqlite3.c:84968:17: */ Xsqlite3VdbeMemCopy(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, pValue) } -func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:84963:17: */ +func Xsqlite3_result_zeroblob(tls *libc.TLS, pCtx uintptr, n int32) { /* sqlite3.c:84972:17: */ Xsqlite3VdbeMemSetZeroBlob(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, n) } -func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:84967:16: */ +func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* sqlite3.c:84976:16: */ var pOut uintptr = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut if n > U64(*(*int32)(unsafe.Pointer((*Mem)(unsafe.Pointer(pOut)).Fdb + 112))) { @@ -61641,7 +61645,7 @@ func Xsqlite3_result_zeroblob64(tls *libc.TLS, pCtx uintptr, n U64) int32 { /* s return SQLITE_OK } -func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:84980:17: */ +func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* sqlite3.c:84989:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = func() int32 { if errCode != 0 { return errCode @@ -61655,15 +61659,15 @@ func Xsqlite3_result_error_code(tls *libc.TLS, pCtx uintptr, errCode int32) { /* } // Force an SQLITE_TOOBIG error. -func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:84992:17: */ +func Xsqlite3_result_error_toobig(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85001:17: */ (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_TOOBIG - Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5254 /* "string or blob t..." */, int64(-1), + Xsqlite3VdbeMemSetStr(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut, ts+5276, int64(-1), uint8(SQLITE_UTF8), uintptr(0)) } // An SQLITE_NOMEM error. -func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85000:17: */ +func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85009:17: */ Xsqlite3VdbeMemSetNull(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut) (*Sqlite3_context)(unsafe.Pointer(pCtx)).FisError = SQLITE_NOMEM @@ -61673,7 +61677,7 @@ func Xsqlite3_result_error_nomem(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:850 // Force the INT64 value currently stored as the result to be // a MEM_IntReal value. See the SQLITE_TESTCTRL_RESULT_INTREAL // test-control. -func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85012:21: */ +func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85021:21: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut)).Fflags)&MEM_Int != 0 { *(*U16)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(pCtx)).FpOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Int)) @@ -61683,7 +61687,7 @@ func Xsqlite3ResultIntReal(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:85012:21: // This function is called after a transaction has been committed. It // invokes callbacks registered with sqlite3_wal_hook() as required. -func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85026:12: */ +func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85035:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -61710,7 +61714,7 @@ func doWalCallbacks(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:85026:12: */ // API. The only thing omitted is the automatic recompile if a // schema change has occurred. That detail is handled by the // outer sqlite3_step() wrapper procedure. -func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85056:12: */ +func sqlite3Step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85065:12: */ var db uintptr var rc int32 @@ -61877,14 +61881,14 @@ end_of_step: // This is the top-level implementation of sqlite3_step(). Call // sqlite3Step() to do most of the work. If a schema error occurs, // call sqlite3Reprepare() and try again. -func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: */ +func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85199:16: */ var rc int32 = SQLITE_OK // Result from sqlite3Step() var v uintptr = pStmt // the prepared statement var cnt int32 = 0 // Counter to prevent infinite loop of reprepares var db uintptr // The database connection if vdbeSafetyNotNull(tls, v) != 0 { - return Xsqlite3MisuseError(tls, 85197) + return Xsqlite3MisuseError(tls, 85206) } db = (*Vdbe)(unsafe.Pointer(v)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -61924,7 +61928,7 @@ func Xsqlite3_step(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85190:16: // Extract the user data from a sqlite3_context structure and return a // pointer to it. -func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85239:17: */ +func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85248:17: */ return (*FuncDef)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpFunc)).FpUserData } @@ -61937,7 +61941,7 @@ func Xsqlite3_user_data(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85239:1 // parameter) of the sqlite3_create_function() and // sqlite3_create_function16() routines that originally registered the // application defined function. -func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85254:20: */ +func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:85263:20: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpOut)).Fdb } @@ -61954,7 +61958,7 @@ func Xsqlite3_context_db_handle(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c // Virtual table implements might use this routine to optimize their // performance by substituting a NULL result, or some other light-weight // value, as a signal to the xUpdate routine that the column is unchanged. -func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85273:16: */ +func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85282:16: */ return Xsqlite3_value_nochange(tls, (*Sqlite3_context)(unsafe.Pointer(p)).FpOut) } @@ -61964,7 +61968,7 @@ func Xsqlite3_vtab_nochange(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85273 // statement, the exact same time is returned for each invocation regardless // of the amount of time that elapses between invocations. In other words, // the time returned is always the time of the first call. -func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85285:30: */ +func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite3.c:85294:30: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -61987,7 +61991,7 @@ func Xsqlite3StmtCurrentTime(tls *libc.TLS, p uintptr) Sqlite3_int64 { /* sqlite // Create a new aggregate context for p and return a pointer to // its pMem->z element. -func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85305:29: */ +func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85314:29: */ var pMem uintptr = (*Sqlite3_context)(unsafe.Pointer(p)).FpMem if nByte <= 0 { @@ -62007,7 +62011,7 @@ func createAggContext(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite // Allocate or return the aggregate context for a user function. A new // context is allocated on the first call. Subsequent calls return the // same context that was returned on prior calls. -func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85327:17: */ +func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { /* sqlite3.c:85336:17: */ if int32((*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fflags)&MEM_Agg == 0 { return createAggContext(tls, p, nByte) @@ -62025,7 +62029,7 @@ func Xsqlite3_aggregate_context(tls *libc.TLS, p uintptr, nByte int32) uintptr { // Undocumented behavior: If iArg is negative then access a cache of // auxiliary data pointers that is available to all functions within a // single prepared statement. The iArg values must match. -func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:85348:17: */ +func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* sqlite3.c:85357:17: */ var pAuxData uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -62048,7 +62052,7 @@ func Xsqlite3_get_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32) uintptr { /* // Undocumented behavior: If iArg is negative then make the data available // to all functions within the current prepared statement using iArg as an // access code. -func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:85376:17: */ +func Xsqlite3_set_auxdata(tls *libc.TLS, pCtx uintptr, iArg int32, pAux uintptr, xDelete uintptr) { /* sqlite3.c:85385:17: */ var pAuxData uintptr var pVdbe uintptr pVdbe = (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe @@ -62128,13 +62132,13 @@ __11: // provide only to avoid breaking legacy code. New aggregate function // implementations should keep their own counts within their aggregate // context. -func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85429:16: */ +func Xsqlite3_aggregate_count(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:85438:16: */ return (*Mem)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(p)).FpMem)).Fn } // Return the number of columns in the result set for the statement pStmt. -func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85438:16: */ +func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85447:16: */ var pVm uintptr = pStmt if pVm != 0 { return int32((*Vdbe)(unsafe.Pointer(pVm)).FnResColumn) @@ -62144,7 +62148,7 @@ func Xsqlite3_column_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85 // Return the number of values available from the current row of the // currently executing statement pStmt. -func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85447:16: */ +func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:85456:16: */ var pVm uintptr = pStmt if pVm == uintptr(0) || (*Vdbe)(unsafe.Pointer(pVm)).FpResultSet == uintptr(0) { return 0 @@ -62153,19 +62157,19 @@ func Xsqlite3_data_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8544 } // Return a pointer to static memory containing an SQL NULL value. -func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:85456:18: */ +func columnNullValue(tls *libc.TLS) uintptr { /* sqlite3.c:85465:18: */ return uintptr(unsafe.Pointer(&nullMem)) } var nullMem = Mem{ /* .flags = */ Fflags: U16(MEM_Null), -} /* sqlite3.c:85466:20 */ +} /* sqlite3.c:85475:20 */ // Check to see if column iCol of the given statement is valid. If // it is, return a pointer to the Mem for the value of that column. // If iCol is not valid, return a pointer to a Mem which has a value // of NULL. -func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85496:12: */ +func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85505:12: */ var pVm uintptr var pOut uintptr @@ -62200,7 +62204,7 @@ func columnMem(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:854 // sqlite3_column_bytes() // sqlite3_column_bytes16() // sqiite3_column_blob() -func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:85531:13: */ +func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:85540:13: */ // If malloc() failed during an encoding conversion within an // sqlite3_column_XXX API, then set the return code of the statement to // SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR @@ -62217,7 +62221,7 @@ func columnMallocFailure(tls *libc.TLS, pStmt uintptr) { /* sqlite3.c:85531:13: // // The following routines are used to access elements of the current row // in the result set. -func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85551:23: */ +func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85560:23: */ var val uintptr val = Xsqlite3_value_blob(tls, columnMem(tls, pStmt, i)) // Even though there is no encoding conversion, value_blob() might @@ -62227,43 +62231,43 @@ func Xsqlite3_column_blob(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sq return val } -func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85561:16: */ +func Xsqlite3_column_bytes(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85570:16: */ var val int32 = Xsqlite3_value_bytes(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } -func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85566:16: */ +func Xsqlite3_column_bytes16(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85575:16: */ var val int32 = Xsqlite3_value_bytes16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } -func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:85571:19: */ +func Xsqlite3_column_double(tls *libc.TLS, pStmt uintptr, i int32) float64 { /* sqlite3.c:85580:19: */ var val float64 = Xsqlite3_value_double(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } -func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85576:16: */ +func Xsqlite3_column_int(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85585:16: */ var val int32 = Xsqlite3_value_int(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } -func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:85581:25: */ +func Xsqlite3_column_int64(tls *libc.TLS, pStmt uintptr, i int32) Sqlite_int64 { /* sqlite3.c:85590:25: */ var val Sqlite_int64 = Xsqlite3_value_int64(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } -func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85586:32: */ +func Xsqlite3_column_text(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85595:32: */ var val uintptr = Xsqlite3_value_text(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } -func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85591:26: */ +func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85600:26: */ var pOut uintptr = columnMem(tls, pStmt, i) if int32((*Mem)(unsafe.Pointer(pOut)).Fflags)&MEM_Static != 0 { *(*U16)(unsafe.Pointer(pOut + 8)) &= libc.Uint16FromInt32(libc.CplInt32(MEM_Static)) @@ -62273,13 +62277,13 @@ func Xsqlite3_column_value(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* s return pOut } -func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85601:23: */ +func Xsqlite3_column_text16(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:85610:23: */ var val uintptr = Xsqlite3_value_text16(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return val } -func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85607:16: */ +func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85616:16: */ var iType int32 = Xsqlite3_value_type(tls, columnMem(tls, pStmt, i)) columnMallocFailure(tls, pStmt) return iType @@ -62299,7 +62303,7 @@ func Xsqlite3_column_type(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqli // // If the result is not a simple column reference (if it is an expression // or a constant) then useTypes 2, 3, and 4 return NULL. -func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:85629:19: */ +func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType int32) uintptr { /* sqlite3.c:85638:19: */ var ret uintptr var p uintptr var n int32 @@ -62331,11 +62335,11 @@ func columnName(tls *libc.TLS, pStmt uintptr, N int32, useUtf16 int32, useType i // Return the name of the Nth column of the result set returned by SQL // statement pStmt. -func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85678:23: */ +func Xsqlite3_column_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85687:23: */ return columnName(tls, pStmt, N, 0, COLNAME_NAME) } -func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85682:23: */ +func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85691:23: */ return columnName(tls, pStmt, N, 1, COLNAME_NAME) } @@ -62344,44 +62348,44 @@ func Xsqlite3_column_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* // Return the column declaration type (if applicable) of the 'i'th column // of the result set of SQL statement pStmt. -func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85701:23: */ +func Xsqlite3_column_decltype(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85710:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DECLTYPE) } -func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85705:23: */ +func Xsqlite3_column_decltype16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85714:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DECLTYPE) } // Return the name of the database from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85717:23: */ +func Xsqlite3_column_database_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85726:23: */ return columnName(tls, pStmt, N, 0, COLNAME_DATABASE) } -func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85721:23: */ +func Xsqlite3_column_database_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85730:23: */ return columnName(tls, pStmt, N, 1, COLNAME_DATABASE) } // Return the name of the table from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85731:23: */ +func Xsqlite3_column_table_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85740:23: */ return columnName(tls, pStmt, N, 0, COLNAME_TABLE) } -func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85735:23: */ +func Xsqlite3_column_table_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85744:23: */ return columnName(tls, pStmt, N, 1, COLNAME_TABLE) } // Return the name of the table column from which a result column derives. // NULL is returned if the result column is an expression or constant or // anything else which is not an unambiguous reference to a database column. -func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85745:23: */ +func Xsqlite3_column_origin_name(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85754:23: */ return columnName(tls, pStmt, N, 0, COLNAME_COLUMN) } -func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85749:23: */ +func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintptr { /* sqlite3.c:85758:23: */ return columnName(tls, pStmt, N, 1, COLNAME_COLUMN) } @@ -62398,21 +62402,21 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // // The error code stored in database p->db is overwritten with the return // value in any case. -func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:85771:12: */ +func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:85780:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { - return Xsqlite3MisuseError(tls, 85774) + return Xsqlite3MisuseError(tls, 85783) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) if (*Vdbe)(unsafe.Pointer(p)).FiVdbeMagic != U32(VDBE_MAGIC_RUN) || (*Vdbe)(unsafe.Pointer(p)).Fpc >= 0 { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) Xsqlite3_log(tls, SQLITE_MISUSE, - ts+5277 /* "bind on a busy p..." */, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) - return Xsqlite3MisuseError(tls, 85782) + ts+5299, libc.VaList(bp, (*Vdbe)(unsafe.Pointer(p)).FzSql)) + return Xsqlite3MisuseError(tls, 85791) } if i < 1 || i > int32((*Vdbe)(unsafe.Pointer(p)).FnVar) { Xsqlite3Error(tls, (*Vdbe)(unsafe.Pointer(p)).Fdb, SQLITE_RANGE) @@ -62446,7 +62450,7 @@ func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:85771:12 } // Bind a text or BLOB value. -func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:85814:12: */ +func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, xDel uintptr, encoding U8) int32 { /* sqlite3.c:85823:12: */ var p uintptr = pStmt var pVar uintptr var rc int32 @@ -62472,16 +62476,16 @@ func bindText(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData I64, x } // Bind a blob value to an SQL statement variable. -func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85850:16: */ +func Xsqlite3_bind_blob(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85859:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:85862:16: */ +func Xsqlite3_bind_blob64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr) int32 { /* sqlite3.c:85871:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(0)) } -func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:85872:16: */ +func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) int32 { /* sqlite3.c:85881:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62492,11 +62496,11 @@ func Xsqlite3_bind_double(tls *libc.TLS, pStmt uintptr, i int32, rValue float64) return rc } -func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:85882:16: */ +func Xsqlite3_bind_int(tls *libc.TLS, p uintptr, i int32, iValue int32) int32 { /* sqlite3.c:85891:16: */ return Xsqlite3_bind_int64(tls, p, i, I64(iValue)) } -func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:85885:16: */ +func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_int64) int32 { /* sqlite3.c:85894:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62507,7 +62511,7 @@ func Xsqlite3_bind_int64(tls *libc.TLS, pStmt uintptr, i int32, iValue Sqlite_in return rc } -func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85895:16: */ +func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite3.c:85904:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62517,7 +62521,7 @@ func Xsqlite3_bind_null(tls *libc.TLS, pStmt uintptr, i int32) int32 { /* sqlite return rc } -func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:85904:16: */ +func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, zPTtype uintptr, xDestructor uintptr) int32 { /* sqlite3.c:85913:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62530,11 +62534,11 @@ func Xsqlite3_bind_pointer(tls *libc.TLS, pStmt uintptr, i int32, pPtr uintptr, return rc } -func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85922:16: */ +func Xsqlite3_bind_text(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85931:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF8)) } -func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:85931:16: */ +func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData Sqlite3_uint64, xDel uintptr, enc uint8) int32 { /* sqlite3.c:85940:16: */ if int32(enc) == SQLITE_UTF16 { enc = uint8(SQLITE_UTF16LE) @@ -62542,11 +62546,11 @@ func Xsqlite3_bind_text64(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, return bindText(tls, pStmt, i, zData, int64(nData), xDel, enc) } -func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85944:16: */ +func Xsqlite3_bind_text16(tls *libc.TLS, pStmt uintptr, i int32, zData uintptr, nData int32, xDel uintptr) int32 { /* sqlite3.c:85953:16: */ return bindText(tls, pStmt, i, zData, int64(nData), xDel, uint8(SQLITE_UTF16LE)) } -func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:85954:16: */ +func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) int32 { /* sqlite3.c:85963:16: */ var rc int32 switch Xsqlite3_value_type(tls, pValue) { case SQLITE_INTEGER: @@ -62588,7 +62592,7 @@ func Xsqlite3_bind_value(tls *libc.TLS, pStmt uintptr, i int32, pValue uintptr) return rc } -func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:85985:16: */ +func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int32 { /* sqlite3.c:85994:16: */ var rc int32 var p uintptr = pStmt rc = vdbeUnbind(tls, p, i) @@ -62599,7 +62603,7 @@ func Xsqlite3_bind_zeroblob(tls *libc.TLS, pStmt uintptr, i int32, n int32) int3 return rc } -func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:85999:16: */ +func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_uint64) int32 { /* sqlite3.c:86008:16: */ var rc int32 var p uintptr = pStmt Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).Fdb)).Fmutex) @@ -62616,7 +62620,7 @@ func Xsqlite3_bind_zeroblob64(tls *libc.TLS, pStmt uintptr, i int32, n Sqlite3_u // Return the number of wildcards that can be potentially bound to. // This routine is added to support DBD::SQLite. -func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86018:16: */ +func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86027:16: */ var p uintptr = pStmt if p != 0 { return int32((*Vdbe)(unsafe.Pointer(p)).FnVar) @@ -62628,7 +62632,7 @@ func Xsqlite3_bind_parameter_count(tls *libc.TLS, pStmt uintptr) int32 { /* sqli // is out of range or if the wildcard is unnamed. // // The result is always UTF-8. -func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86029:23: */ +func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr { /* sqlite3.c:86038:23: */ var p uintptr = pStmt if p == uintptr(0) { return uintptr(0) @@ -62639,19 +62643,19 @@ func Xsqlite3_bind_parameter_name(tls *libc.TLS, pStmt uintptr, i int32) uintptr // Given a wildcard parameter name, return the index of the variable // with that name. If there is no variable with the given name, // return 0. -func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86040:20: */ +func Xsqlite3VdbeParameterIndex(tls *libc.TLS, p uintptr, zName uintptr, nName int32) int32 { /* sqlite3.c:86049:20: */ if p == uintptr(0) || zName == uintptr(0) { return 0 } return Xsqlite3VListNameToNum(tls, (*Vdbe)(unsafe.Pointer(p)).FpVList, zName, nName) } -func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86044:16: */ +func Xsqlite3_bind_parameter_index(tls *libc.TLS, pStmt uintptr, zName uintptr) int32 { /* sqlite3.c:86053:16: */ return Xsqlite3VdbeParameterIndex(tls, pStmt, zName, Xsqlite3Strlen30(tls, zName)) } // Transfer all bindings from the first statement over to the second. -func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86051:20: */ +func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86060:20: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt var i int32 @@ -62674,7 +62678,7 @@ func Xsqlite3TransferBindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) // If the two statements contain a different number of bindings, then // an SQLITE_ERROR is returned. Nothing else can go wrong, so otherwise // SQLITE_OK is returned. -func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86078:16: */ +func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintptr) int32 { /* sqlite3.c:86087:16: */ var pFrom uintptr = pFromStmt var pTo uintptr = pToStmt if int32((*Vdbe)(unsafe.Pointer(pFrom)).FnVar) != int32((*Vdbe)(unsafe.Pointer(pTo)).FnVar) { @@ -62695,7 +62699,7 @@ func Xsqlite3_transfer_bindings(tls *libc.TLS, pFromStmt uintptr, pToStmt uintpt // in the argument belongs. This is the same database handle that was // the first argument to the sqlite3_prepare() that was used to create // the statement in the first place. -func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86102:20: */ +func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86111:20: */ if pStmt != 0 { return (*Vdbe)(unsafe.Pointer(pStmt)).Fdb } @@ -62704,7 +62708,7 @@ func Xsqlite3_db_handle(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:861 // Return true if the prepared statement is guaranteed to not modify the // database. -func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86110:16: */ +func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86119:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 148)) & 0x80 >> 7) } @@ -62713,7 +62717,7 @@ func Xsqlite3_stmt_readonly(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:8 // Return 1 if the statement is an EXPLAIN and return 2 if the // statement is an EXPLAIN QUERY PLAN -func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86118:16: */ +func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86127:16: */ if pStmt != 0 { return int32(*(*uint16)(unsafe.Pointer(pStmt + 148)) & 0xc >> 2) } @@ -62721,7 +62725,7 @@ func Xsqlite3_stmt_isexplain(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c: } // Return true if the prepared statement is in need of being reset. -func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125:16: */ +func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86134:16: */ var v uintptr = pStmt return libc.Bool32(v != uintptr(0) && (*Vdbe)(unsafe.Pointer(v)).FiVdbeMagic == U32(VDBE_MAGIC_RUN) && (*Vdbe)(unsafe.Pointer(v)).Fpc >= 0) } @@ -62730,7 +62734,7 @@ func Xsqlite3_stmt_busy(tls *libc.TLS, pStmt uintptr) int32 { /* sqlite3.c:86125 // with database connection pDb. If pStmt is NULL, return the first // prepared statement for the database connection. Return NULL if there // are no more. -func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86136:25: */ +func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* sqlite3.c:86145:25: */ var pNext uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(pDb)).Fmutex) if pStmt == uintptr(0) { @@ -62743,7 +62747,7 @@ func Xsqlite3_next_stmt(tls *libc.TLS, pDb uintptr, pStmt uintptr) uintptr { /* } // Return the value of a status counter for a prepared statement -func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86157:16: */ +func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int32) int32 { /* sqlite3.c:86166:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -62769,7 +62773,7 @@ func Xsqlite3_stmt_status(tls *libc.TLS, pStmt uintptr, op int32, resetFlag int3 } // Return the SQL associated with a prepared statement -func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86187:23: */ +func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86196:23: */ var p uintptr = pStmt if p != 0 { return (*Vdbe)(unsafe.Pointer(p)).FzSql @@ -62784,7 +62788,7 @@ func Xsqlite3_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86187:23: // // The SQLITE_TRACE_SIZE_LIMIT puts an upper bound on the size of // expanded bound parameters. -func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86201:17: */ +func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c:86210:17: */ var z uintptr = uintptr(0) var zSql uintptr = Xsqlite3_sql(tls, pStmt) if zSql != 0 { @@ -62799,7 +62803,7 @@ func Xsqlite3_expanded_sql(tls *libc.TLS, pStmt uintptr) uintptr { /* sqlite3.c: // Allocate and populate an UnpackedRecord structure based on the serialized // record in nKey/pKey. Return a pointer to the new UnpackedRecord structure // if successful, or a NULL pointer if an OOM error is encountered. -func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86239:23: */ +func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) uintptr { /* sqlite3.c:86248:23: */ var pRet uintptr // Return value pRet = Xsqlite3VdbeAllocUnpackedRecord(tls, pKeyInfo) @@ -62812,7 +62816,7 @@ func vdbeUnpackRecord(tls *libc.TLS, pKeyInfo uintptr, nKey int32, pKey uintptr) // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or deleted. -func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86258:16: */ +func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86267:16: */ var p uintptr var pMem uintptr var rc int32 @@ -62826,7 +62830,7 @@ func Xsqlite3_preupdate_old(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_INSERT) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86266) + rc = Xsqlite3MisuseError(tls, 86275) goto preupdate_old_out __1: ; @@ -62918,7 +62922,7 @@ preupdate_old_out: // This function is called from within a pre-update callback to retrieve // the number of columns in the row being updated, deleted or inserted. -func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86322:16: */ +func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86331:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62937,7 +62941,7 @@ func Xsqlite3_preupdate_count(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // // For the purposes of the previous paragraph, a foreign key CASCADE, SET NULL // or SET DEFAULT action is considered a trigger. -func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86340:16: */ +func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86349:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62949,7 +62953,7 @@ func Xsqlite3_preupdate_depth(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86 // This function is designed to be called from within a pre-update callback // only. -func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86351:16: */ +func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:86360:16: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdate return func() int32 { if p != 0 { @@ -62961,7 +62965,7 @@ func Xsqlite3_preupdate_blobwrite(tls *libc.TLS, db uintptr) int32 { /* sqlite3. // This function is called from within a pre-update callback to retrieve // a field of the row currently being updated or inserted. -func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86362:16: */ +func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintptr) int32 { /* sqlite3.c:86371:16: */ var p uintptr var rc int32 var pMem uintptr @@ -62975,7 +62979,7 @@ func Xsqlite3_preupdate_new(tls *libc.TLS, db uintptr, iIdx int32, ppValue uintp if !(!(p != 0) || (*PreUpdate)(unsafe.Pointer(p)).Fop == SQLITE_DELETE) { goto __1 } - rc = Xsqlite3MisuseError(tls, 86368) + rc = Xsqlite3MisuseError(tls, 86377) goto preupdate_new_out __1: ; @@ -63116,7 +63120,7 @@ preupdate_new_out: // bytes in this text up to but excluding the first character in // a host parameter. If the text contains no host parameters, return // the total number of bytes in the text. -func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:86532:12: */ +func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { /* sqlite3.c:86541:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -63127,7 +63131,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { *(*int32)(unsafe.Pointer(pnToken)) = 0 for *(*int8)(unsafe.Pointer(zSql)) != 0 { - n = Xsqlite3GetToken(tls, zSql, bp /* &tokenType */) + n = Xsqlite3GetToken(tls, zSql, bp) if *(*int32)(unsafe.Pointer(bp)) == TK_VARIABLE { *(*int32)(unsafe.Pointer(pnToken)) = n @@ -63161,7 +63165,7 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // statement for the corresponding OP_Variable opcode. Once the host // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. -func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:86575:21: */ +func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:86584:21: */ bp := tls.Alloc(120) defer tls.Free(120) @@ -63179,23 +63183,23 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Used to convert UTF16 into UTF8 for display db = (*Vdbe)(unsafe.Pointer(p)).Fdb - Xsqlite3StrAccumInit(tls, bp+48 /* &out */, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 112))) + Xsqlite3StrAccumInit(tls, bp+48, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 112))) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1 { for *(*int8)(unsafe.Pointer(zRawSql)) != 0 { var zStart uintptr = zRawSql for int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n' && *(*int8)(unsafe.Pointer(zRawSql)) != 0 { } - Xsqlite3_str_append(tls, bp+48 /* &out */, ts+5317 /* "-- " */, 3) + Xsqlite3_str_append(tls, bp+48, ts+5339, 3) - Xsqlite3_str_append(tls, bp+48 /* &out */, zStart, (int32(zRawSql)-int32(zStart))/1) + Xsqlite3_str_append(tls, bp+48, zStart, (int32(zRawSql)-int32(zStart))/1) } } else if int32((*Vdbe)(unsafe.Pointer(p)).FnVar) == 0 { - Xsqlite3_str_append(tls, bp+48 /* &out */, zRawSql, Xsqlite3Strlen30(tls, zRawSql)) + Xsqlite3_str_append(tls, bp+48, zRawSql, Xsqlite3Strlen30(tls, zRawSql)) } else { for *(*int8)(unsafe.Pointer(zRawSql)) != 0 { - n = findNextHostParameter(tls, zRawSql, bp+72 /* &nToken */) + n = findNextHostParameter(tls, zRawSql, bp+72) - Xsqlite3_str_append(tls, bp+48 /* &out */, zRawSql, n) + Xsqlite3_str_append(tls, bp+48, zRawSql, n) zRawSql += uintptr(n) if *(*int32)(unsafe.Pointer(bp + 72)) == 0 { @@ -63204,7 +63208,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { if int32(*(*int8)(unsafe.Pointer(zRawSql))) == '?' { if *(*int32)(unsafe.Pointer(bp + 72)) > 1 { - Xsqlite3GetInt32(tls, zRawSql+1, bp+76 /* &idx */) + Xsqlite3GetInt32(tls, zRawSql+1, bp+76) } else { *(*int32)(unsafe.Pointer(bp + 76 /* idx */)) = nextIndex } @@ -63223,18 +63227,18 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = (*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr(*(*int32)(unsafe.Pointer(bp + 76))-1)*40 if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Null != 0 { - Xsqlite3_str_append(tls, bp+48 /* &out */, ts+1544 /* "NULL" */, 4) + Xsqlite3_str_append(tls, bp+48, ts+1566, 4) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&(MEM_Int|MEM_IntReal) != 0 { - Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+1327 /* "%lld" */, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+1349, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Real != 0 { - Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+4845 /* "%!.15g" */, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+4867, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar)))) } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Str != 0 { var nOut int32 // Number of bytes of the string text to include in output var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc if int32(enc) != SQLITE_UTF8 { - libc.Xmemset(tls, bp+80 /* &utf8 */, 0, uint32(unsafe.Sizeof(Mem{}))) + libc.Xmemset(tls, bp+80, 0, uint32(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 80 /* &utf8 */)).Fdb = db - Xsqlite3VdbeMemSetStr(tls, bp+80 /* &utf8 */, (*Mem)(unsafe.Pointer(pVar)).Fz, int64((*Mem)(unsafe.Pointer(pVar)).Fn), enc, uintptr(0)) + Xsqlite3VdbeMemSetStr(tls, bp+80, (*Mem)(unsafe.Pointer(pVar)).Fz, int64((*Mem)(unsafe.Pointer(pVar)).Fn), enc, uintptr(0)) if SQLITE_NOMEM == Xsqlite3VdbeChangeEncoding(tls, bp+80, SQLITE_UTF8) { (*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FaccError = U8(SQLITE_NOMEM) (*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FnAlloc = U32(0) @@ -63242,28 +63246,28 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { pVar = bp + 80 /* &utf8 */ } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+5321 /* "'%.*q'" */, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48, ts+5343, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { - Xsqlite3VdbeMemRelease(tls, bp+80 /* &utf8 */) + Xsqlite3VdbeMemRelease(tls, bp+80) } } else if int32((*Mem)(unsafe.Pointer(pVar)).Fflags)&MEM_Zero != 0 { - Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+5328 /* "zeroblob(%d)" */, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) + Xsqlite3_str_appendf(tls, bp+48, ts+5350, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar)))) } else { var nOut int32 // Number of bytes of the blob to include in output - Xsqlite3_str_append(tls, bp+48 /* &out */, ts+5341 /* "x'" */, 2) + Xsqlite3_str_append(tls, bp+48, ts+5363, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+5344 /* "%02x" */, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) + Xsqlite3_str_appendf(tls, bp+48, ts+5366, libc.VaList(bp+40, int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff)) } - Xsqlite3_str_append(tls, bp+48 /* &out */, ts+5349 /* "'" */, 1) + Xsqlite3_str_append(tls, bp+48, ts+5371, 1) } } } if (*StrAccum)(unsafe.Pointer(bp+48)).FaccError != 0 { - Xsqlite3_str_reset(tls, bp+48 /* &out */) + Xsqlite3_str_reset(tls, bp+48) } - return Xsqlite3StrAccumFinish(tls, bp+48 /* &out */) + return Xsqlite3StrAccumFinish(tls, bp+48) } //************* End of vdbetrace.c ****************************************** @@ -63384,7 +63388,7 @@ func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { // Allocate VdbeCursor number iCur. Return a pointer to it. Return NULL // if we run out of memory. -func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, iDb int32, eCurType U8) uintptr { /* sqlite3.c:86938:19: */ +func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, iDb int32, eCurType U8) uintptr { /* sqlite3.c:86947:19: */ // Find the memory cell that will be used to store the blob of memory // required for this VdbeCursor structure. It is convenient to use a // vdbe memory cell to manage the memory allocation required for a @@ -63456,7 +63460,7 @@ func allocateCursor(tls *libc.TLS, p uintptr, iCur int32, nField int32, iDb int3 // floating point value of rValue. Return true and set *piValue to the // integer value if the string is in range to be an integer. Otherwise, // return false. -func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87016:12: */ +func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int32 { /* sqlite3.c:87025:12: */ var iValue I64 = I64(rValue) if Xsqlite3RealSameAsInt(tls, rValue, iValue) != 0 { *(*I64)(unsafe.Pointer(piValue)) = iValue @@ -63478,7 +63482,7 @@ func alsoAnInt(tls *libc.TLS, pRec uintptr, rValue float64, piValue uintptr) int // If bTryForInt is false, then if the input string contains a decimal // point or exponential notation, the result is only MEM_Real, even // if there is an exact integer representation of the quantity. -func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87040:13: */ +func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sqlite3.c:87049:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -63487,7 +63491,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq var enc U8 = (*Mem)(unsafe.Pointer(pRec)).Fenc var rc int32 - rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pRec)).Fz, bp /* &rValue */, (*Mem)(unsafe.Pointer(pRec)).Fn, enc) + rc = Xsqlite3AtoF(tls, (*Mem)(unsafe.Pointer(pRec)).Fz, bp, (*Mem)(unsafe.Pointer(pRec)).Fn, enc) if rc <= 0 { return } @@ -63524,7 +63528,7 @@ func applyNumericAffinity(tls *libc.TLS, pRec uintptr, bTryForInt int32) { /* sq // SQLITE_AFF_BLOB: // SQLITE_AFF_NONE: // No-op. pRec is unchanged. -func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87080:13: */ +func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqlite3.c:87089:13: */ if int32(affinity) >= SQLITE_AFF_NUMERIC { if int32((*Mem)(unsafe.Pointer(pRec)).Fflags)&MEM_Int == 0 { //OPTIMIZATION-IF-FALSE @@ -63556,7 +63560,7 @@ func applyAffinity(tls *libc.TLS, pRec uintptr, affinity int8, enc U8) { /* sqli // into a numeric representation. Use either INTEGER or REAL whichever // is appropriate. But only do the conversion if it is possible without // loss of information and return the revised type of the argument. -func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87119:16: */ +func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3.c:87128:16: */ var eType int32 = Xsqlite3_value_type(tls, pVal) if eType == SQLITE_TEXT { var pMem uintptr = pVal @@ -63568,7 +63572,7 @@ func Xsqlite3_value_numeric_type(tls *libc.TLS, pVal uintptr) int32 { /* sqlite3 // Exported version of applyAffinity(). This one works on sqlite3_value*, // not the internal Mem* type. -func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87133:21: */ +func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8) { /* sqlite3.c:87142:21: */ applyAffinity(tls, pVal, int8(affinity), enc) } @@ -63576,7 +63580,7 @@ func Xsqlite3ValueApplyAffinity(tls *libc.TLS, pVal uintptr, affinity U8, enc U8 // interpret as a string if we want to). Compute its corresponding // numeric type, if has one. Set the pMem->u.r and pMem->u.i fields // accordingly. -func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87147:28: */ +func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87156:28: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -63612,7 +63616,7 @@ func computeNumericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87147:28 // // Unlike applyNumericAffinity(), this routine does not modify pMem->flags. // But it does set pMem->u.r and pMem->u.i appropriately. -func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87178:12: */ +func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87187:12: */ if int32((*Mem)(unsafe.Pointer(pMem)).Fflags)&(MEM_Int|MEM_Real|MEM_IntReal) != 0 { return U16(int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_Real | MEM_IntReal)) @@ -63626,13 +63630,13 @@ func numericType(tls *libc.TLS, pMem uintptr) U16 { /* sqlite3.c:87178:12: */ // Return the register of pOp->p2 after first preparing it to be // overwritten with an integer value. -func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:87353:28: */ +func out2PrereleaseWithClear(tls *libc.TLS, pOut uintptr) uintptr { /* sqlite3.c:87362:28: */ Xsqlite3VdbeMemSetNull(tls, pOut) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) return pOut } -func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:87358:12: */ +func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3.c:87367:12: */ var pOut uintptr pOut = (*Vdbe)(unsafe.Pointer(p)).FaMem + uintptr((*VdbeOp)(unsafe.Pointer(pOp)).Fp2)*40 @@ -63647,21 +63651,21 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. } // Return the symbolic name for the data type of a pMem -func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:87375:19: */ +func vdbeMemTypeName(tls *libc.TLS, pMem uintptr) uintptr { /* sqlite3.c:87384:19: */ return azTypes[Xsqlite3_value_type(tls, pMem)-1] } var azTypes = [5]uintptr{ - /* SQLITE_INTEGER */ ts + 1086, /* "INT" */ - /* SQLITE_FLOAT */ ts + 1098, /* "REAL" */ - /* SQLITE_TEXT */ ts + 1103, /* "TEXT" */ - /* SQLITE_BLOB */ ts + 1081, /* "BLOB" */ - /* SQLITE_NULL */ ts + 1544, /* "NULL" */ -} /* sqlite3.c:87376:21 */ + ts + 1108, + ts + 1120, + ts + 1125, + ts + 1103, + ts + 1566, +} /* sqlite3.c:87385:21 */ // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). -func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87390:20: */ +func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87399:20: */ bp := tls.Alloc(748) defer tls.Free(748) @@ -67013,19 +67017,19 @@ __192: goto __195 } - Xsqlite3VdbeError(tls, p, ts+5351 /* "%s constraint fa..." */, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) + Xsqlite3VdbeError(tls, p, ts+5373, libc.VaList(bp, azType[int32((*Op)(unsafe.Pointer(pOp)).Fp5)-1])) if !(*(*uintptr)(unsafe.Pointer(pOp + 16)) != 0) { goto __197 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5372 /* "%z: %s" */, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5394, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __197: ; goto __196 __195: - Xsqlite3VdbeError(tls, p, ts+3601 /* "%s" */, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) + Xsqlite3VdbeError(tls, p, ts+3623, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16)))) __196: ; - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5379 /* "abort at %d in [..." */, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5401, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __194: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -67863,7 +67867,7 @@ __272: } goto __274 __273: - libc.Xmemcpy(tls, bp+216 /* &uA */, bp+224 /* &iA1 */, uint32(unsafe.Sizeof(U64(0)))) + libc.Xmemcpy(tls, bp+216, bp+224, uint32(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { goto __275 } @@ -67880,7 +67884,7 @@ __277: ; __276: ; - libc.Xmemcpy(tls, bp+224 /* &iA1 */, bp+216 /* &uA */, uint32(unsafe.Sizeof(I64(0)))) + libc.Xmemcpy(tls, bp+224, bp+216, uint32(unsafe.Sizeof(I64(0)))) __274: ; __271: @@ -68768,7 +68772,7 @@ __71: // PseudoTable input register // If the cursor cache is stale (meaning it is not currently point at // the correct row) then bring it up-to-date by doing the necessary // B-Tree seek. - rc = Xsqlite3VdbeCursorMoveto(tls, bp+232 /* &pC1 */, bp+236 /* &p22 */) + rc = Xsqlite3VdbeCursorMoveto(tls, bp+232, bp+236) if !(rc != 0) { goto __348 } @@ -68891,8 +68895,8 @@ __349: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { goto __362 } - libc.Xmemset(tls, bp+240 /* &sMem */, 0, uint32(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 40)), *(*U32)(unsafe.Pointer(aOffset)), bp+240 /* &sMem */) + libc.Xmemset(tls, bp+240, 0, uint32(unsafe.Sizeof(Mem{}))) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 40)), *(*U32)(unsafe.Pointer(aOffset)), bp+240) if !(rc != SQLITE_OK) { goto __364 } @@ -68921,7 +68925,7 @@ __365: offset64 = offset64 + U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 280))))) goto __369 __368: - zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+280 /* &t */)) + zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+280)) *(*U32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)) + 84 + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 280 /* t */)) offset64 = offset64 + U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 280)))) __369: @@ -68954,7 +68958,7 @@ __371: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { goto __373 } - Xsqlite3VdbeMemRelease(tls, bp+240 /* &sMem */) + Xsqlite3VdbeMemRelease(tls, bp+240) __373: ; goto op_column_corrupt @@ -68968,7 +68972,7 @@ __370: if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 232)))).FaRow == uintptr(0)) { goto __374 } - Xsqlite3VdbeMemRelease(tls, bp+240 /* &sMem */) + Xsqlite3VdbeMemRelease(tls, bp+240) __374: ; goto __361 @@ -69098,7 +69102,7 @@ op_column_corrupt: goto __8 goto __390 __389: - rc = Xsqlite3CorruptError(tls, 89595) + rc = Xsqlite3CorruptError(tls, 89604) goto abort_due_to_error __390: ; @@ -69259,7 +69263,7 @@ __393: goto __8 vdbe_type_error: - Xsqlite3VdbeError(tls, p, ts+5403, /* "cannot store %s ..." */ + Xsqlite3VdbeError(tls, p, ts+5425, libc.VaList(bp+56, vdbeMemTypeName(tls, pIn1), Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(aCol + uintptr(i3)*16 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(aCol+uintptr(i3)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(12)<<8 @@ -69722,7 +69726,7 @@ __75: goto __468 __467: *(*I64)(unsafe.Pointer(bp + 284 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. - rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+284 /* &nEntry */) + rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+284) if !(rc != 0) { goto __469 } @@ -69757,7 +69761,7 @@ __76: } // A new savepoint cannot be created if there are active write // statements (i.e. open read/write incremental blob handles). - Xsqlite3VdbeError(tls, p, ts+5444 /* "cannot open save..." */, 0) + Xsqlite3VdbeError(tls, p, ts+5466, 0) rc = SQLITE_BUSY goto __473 __472: @@ -69830,7 +69834,7 @@ __480: if !!(pSavepoint != 0) { goto __481 } - Xsqlite3VdbeError(tls, p, ts+5495 /* "no such savepoin..." */, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+5517, libc.VaList(bp+88, zName)) rc = SQLITE_ERROR goto __482 __481: @@ -69840,7 +69844,7 @@ __481: // It is not possible to release (commit) a savepoint if there are // active write statements. Xsqlite3VdbeError(tls, p, - ts+5517 /* "cannot release s..." */, 0) + ts+5539, 0) rc = SQLITE_BUSY goto __484 __483: @@ -70045,7 +70049,7 @@ __513: // If this instruction implements a COMMIT and other VMs are writing // return an error indicating that the other VMs must complete first. Xsqlite3VdbeError(tls, p, - ts+5571 /* "cannot commit tr..." */, 0) + ts+5593, 0) rc = SQLITE_BUSY goto abort_due_to_error goto __516 @@ -70088,13 +70092,13 @@ __511: Xsqlite3VdbeError(tls, p, func() uintptr { if !(desiredAutoCommit != 0) { - return ts + 5626 /* "cannot start a t..." */ + return ts + 5648 /* "cannot start a t..." */ } return func() uintptr { if iRollback != 0 { - return ts + 5674 /* "cannot rollback ..." */ + return ts + 5696 /* "cannot rollback ..." */ } - return ts + 5717 /* "cannot commit - ..." */ + return ts + 5739 /* "cannot commit - ..." */ }() }(), 0) @@ -70164,7 +70168,7 @@ __522: if !(pBt != 0) { goto __525 } - rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+292 /* &iMeta */) + rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+292) if !(rc != SQLITE_OK) { goto __526 @@ -70224,7 +70228,7 @@ __525: // version is checked to ensure that the schema has not changed since the // SQL statement was prepared. Xsqlite3DbFree(tls, db, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg) - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5758 /* "database schema ..." */) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3DbStrDup(tls, db, ts+5780) // If the schema-cookie from the database file matches the cookie // stored with the in-memory representation of the schema, do // not reload the schema from the database file. @@ -70271,7 +70275,7 @@ __79: iDb = (*Op)(unsafe.Pointer(pOp)).Fp1 iCookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpBt, iCookie, bp+296 /* &iMeta1 */) + Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpBt, iCookie, bp+296) pOut = out2Prerelease(tls, p, pOp) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 296 /* iMeta1 */))) goto __8 @@ -70303,6 +70307,7 @@ __80: // When the schema cookie changes, record the new cookie internally (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - int32((*Op)(unsafe.Pointer(pOp)).Fp5) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_SchemaChange) + Xsqlite3FkClearTriggerCache(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) goto __535 __534: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == BTREE_FILE_FORMAT) { @@ -70608,7 +70613,7 @@ __86: // Only used when number of columns is zero (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fn = 0 - (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1543 /* "" */ + (*Mem)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40)).Fz = ts + 1565 /* "" */ __551: ; pCx1 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*4)) @@ -70921,7 +70926,7 @@ __568: goto jump_to_p2 goto __572 __571: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 40)), bp+300 /* &res1 */) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 40)), bp+300) if !(rc != SQLITE_OK) { goto __573 } @@ -70969,7 +70974,7 @@ __575: ; __569: ; - rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 40)), int64(U64(iKey)), 0, bp+300 /* &res1 */) + rc = Xsqlite3BtreeTableMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 40)), int64(U64(iKey)), 0, bp+300) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { goto __579 @@ -71011,7 +71016,7 @@ __580: (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FeqSeen = U8(0) - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 40)), bp+304 /* &r */, bp+300 /* &res1 */) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC3 + 40)), bp+304, bp+300) if !(rc != SQLITE_OK) { goto __581 } @@ -71177,7 +71182,7 @@ __599: if !(1 != 0) { goto __600 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+320 /* &r1 */, bp+336 /* &res3 */) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+320, bp+336) if !(rc != 0) { goto __601 } @@ -71448,7 +71453,7 @@ __620: ; __617: ; - rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 40)), pIdxKey, bp+356 /* &res4 */) + rc = Xsqlite3BtreeIndexMoveto(tls, *(*uintptr)(unsafe.Pointer(pC7 + 40)), pIdxKey, bp+356) if !(pFree != 0) { goto __622 } @@ -71553,7 +71558,7 @@ __102: // changing the datatype of pIn3, however, as it is used by other // parts of the prepared statement. *(*Mem)(unsafe.Pointer(bp + 360 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) - applyAffinity(tls, bp+360 /* &x */, int8(SQLITE_AFF_NUMERIC), encoding) + applyAffinity(tls, bp+360, int8(SQLITE_AFF_NUMERIC), encoding) if !(int32((*Mem)(unsafe.Pointer(bp+360)).Fflags)&MEM_Int == 0) { goto __630 } @@ -71574,7 +71579,7 @@ notExistsWithKey: pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 40)) *(*int32)(unsafe.Pointer(bp + 400 /* res5 */)) = 0 - rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+400 /* &res5 */) + rc = Xsqlite3BtreeTableMoveto(tls, pCrsr2, int64(iKey1), 0, bp+400) (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) // Used by OP_Delete (*VdbeCursor)(unsafe.Pointer(pC8)).FnullRow = U8(0) @@ -71589,7 +71594,7 @@ notExistsWithKey: if !((*Op)(unsafe.Pointer(pOp)).Fp2 == 0) { goto __632 } - rc = Xsqlite3CorruptError(tls, 91738) + rc = Xsqlite3CorruptError(tls, 91748) goto __633 __632: goto jump_to_p2 @@ -71661,7 +71666,7 @@ __105: // Root frame of VDBE if !!(int32(*(*uint8)(unsafe.Pointer(pC9 + 8))&0x2>>1) != 0) { goto __635 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 40)), bp+404 /* &res6 */) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 40)), bp+404) if !(rc != SQLITE_OK) { goto __636 } @@ -71751,7 +71756,7 @@ __641: // an AUTOINCREMENT table. cnt1 = 0 __650: - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+408 /* &v */) + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+408) *(*I64)(unsafe.Pointer(bp + 408 /* v */)) &= I64(int64(U64(uint64(0x7fffffff))<<32|uint64(0xffffffff))) >> 1 *(*I64)(unsafe.Pointer(bp + 408 /* v */))++ // Ensure that v is greater than zero goto __651 @@ -71904,7 +71909,7 @@ __663: __664: ; (*BtreePayload)(unsafe.Pointer(bp + 416 /* &x1 */)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 40)), bp+416, /* &x1 */ + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 40)), bp+416, int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), seekResult) (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) @@ -72116,7 +72121,7 @@ __110: pIn3 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16)) *(*int32)(unsafe.Pointer(bp + 448 /* res7 */)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+448 /* &res7 */) + rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+448) if !(rc != 0) { goto __676 @@ -72365,7 +72370,7 @@ __694: ; __693: ; - rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+460 /* &res8 */) + rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+460) (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 460 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) @@ -72399,7 +72404,7 @@ __117: pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 40)) - rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+464 /* &res9 */) + rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+464) if !(rc != 0) { goto __698 } @@ -72470,13 +72475,13 @@ __120: if !(int32((*VdbeCursor)(unsafe.Pointer(pC19)).FeCurType) == CURTYPE_SORTER) { goto __702 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+468 /* &res10 */) + rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+468) goto __703 __702: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 40)) - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+468 /* &res10 */) + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+468) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) __703: @@ -72649,7 +72654,7 @@ __709: (*BtreePayload)(unsafe.Pointer(bp + 472 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz (*BtreePayload)(unsafe.Pointer(bp + 472 /* &x2 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*40 (*BtreePayload)(unsafe.Pointer(bp + 472 /* &x2 */)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 40)), bp+472, /* &x2 */ + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 40)), bp+472, int32((*Op)(unsafe.Pointer(pOp)).Fp5)&(OPFLAG_APPEND|OPFLAG_SAVEPOSITION|OPFLAG_PREFORMAT), func() int32 { if int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_USESEEKRESULT != 0 { @@ -72725,7 +72730,7 @@ __126: (*UnpackedRecord)(unsafe.Pointer(bp + 504 /* &r3 */)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) (*UnpackedRecord)(unsafe.Pointer(bp + 504 /* &r3 */)).Fdefault_rc = int8(0) (*UnpackedRecord)(unsafe.Pointer(bp + 504 /* &r3 */)).FaMem = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40 - rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+504 /* &r3 */, bp+520 /* &res11 */) + rc = Xsqlite3BtreeIndexMoveto(tls, pCrsr7, bp+504, bp+520) if !(rc != 0) { goto __713 } @@ -72747,7 +72752,7 @@ __714: if !((*Op)(unsafe.Pointer(pOp)).Fp5 != 0 && !(Xsqlite3WritableSchema(tls, db) != 0)) { goto __717 } - rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 92790, ts+5786 /* "index corruption" */) + rc = Xsqlite3ReportError(tls, SQLITE_CORRUPT|int32(3)<<8, 92800, ts+5808) goto abort_due_to_error __717: ; @@ -72808,7 +72813,7 @@ __718: goto __719 } *(*I64)(unsafe.Pointer(bp + 524 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 40)), bp+524 /* &rowid */) + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 40)), bp+524) if !(rc != SQLITE_OK) { goto __721 } @@ -72939,20 +72944,20 @@ __727: if !(nCellKey <= int64(0) || nCellKey > int64(0x7fffffff)) { goto __728 } - rc = Xsqlite3CorruptError(tls, 92994) + rc = Xsqlite3CorruptError(tls, 93004) goto abort_due_to_error __728: ; - Xsqlite3VdbeMemInit(tls, bp+532 /* &m */, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+532 /* &m */) + Xsqlite3VdbeMemInit(tls, bp+532, db, uint16(0)) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+532) if !(rc != 0) { goto __729 } goto abort_due_to_error __729: ; - res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+532 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+532 /* &m */)).Fz, bp+572 /* &r4 */, 0) - Xsqlite3VdbeMemRelease(tls, bp+532 /* &m */) + res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+532 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+532 /* &m */)).Fz, bp+572, 0) + Xsqlite3VdbeMemRelease(tls, bp+532) // End of inlined sqlite3VdbeIdxKeyCompare() @@ -73018,7 +73023,7 @@ __733: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 *(*int32)(unsafe.Pointer(bp + 588 /* iMoved */)) = 0 // Not needed. Only to silence a warning. - rc = Xsqlite3BtreeDropTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb2)*16)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp1, bp+588 /* &iMoved */) + rc = Xsqlite3BtreeDropTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb2)*16)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp1, bp+588) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) *(*I64)(unsafe.Pointer(pOut)) = I64(*(*int32)(unsafe.Pointer(bp + 588 /* iMoved */))) if !(rc != 0) { @@ -73060,7 +73065,7 @@ __135: ; *(*I64)(unsafe.Pointer(bp + 592 /* nChange */)) = int64(0) - rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*16)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+592 /* &nChange */) + rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*16)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+592) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __737 } @@ -73127,7 +73132,7 @@ __137: pDb2 = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*16 - rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+600 /* &pgno */, (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+600, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { goto __743 } @@ -73180,14 +73185,14 @@ __139: goto __746 __745: - zSchema = ts + 5803 /* "sqlite_master" */ + zSchema = ts + 5825 /* "sqlite_master" */ (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).FiDb = iDb3 (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).FpzErrMsg = p + 124 (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).FmInitFlags = U32(0) (*InitData)(unsafe.Pointer(bp + 604 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+5817, /* "SELECT*FROM\"%w\"...." */ + ts+5839, libc.VaList(bp+96, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*16)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16)))) if !(zSql == uintptr(0)) { goto __747 @@ -73215,7 +73220,7 @@ __749: // The OP_ParseSchema opcode with a non-NULL P4 argument should parse // at least one SQL statement. Any less than that indicates that // the sqlite_schema table is corrupt. - rc = Xsqlite3CorruptError(tls, 93246) + rc = Xsqlite3CorruptError(tls, 93256) __750: ; Xsqlite3DbFreeNN(tls, db, zSql) @@ -73320,7 +73325,7 @@ __144: // Register keeping track of errors remaining pIn1 = aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*40 z = Xsqlite3BtreeIntegrityCheck(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*16)).FpBt, aRoot+1*4, nRoot, - int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+632 /* &nErr */) + int32(*(*I64)(unsafe.Pointer(pnErr)))+1, bp+632) Xsqlite3VdbeMemSetNull(tls, pIn1) if !(*(*int32)(unsafe.Pointer(bp + 632)) == 0) { goto __754 @@ -73520,7 +73525,7 @@ __767: goto __772 } rc = SQLITE_ERROR - Xsqlite3VdbeError(tls, p, ts+5860 /* "too many levels ..." */, 0) + Xsqlite3VdbeError(tls, p, ts+5882, 0) goto abort_due_to_error __772: ; @@ -73969,7 +73974,7 @@ __807: if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { goto __809 } - Xsqlite3VdbeError(tls, p, ts+3601 /* "%s" */, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3623, libc.VaList(bp+120, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError __809: ; @@ -74047,7 +74052,7 @@ __814: if !(rc != 0) { goto __815 } - Xsqlite3VdbeError(tls, p, ts+3601 /* "%s" */, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) + Xsqlite3VdbeError(tls, p, ts+3623, libc.VaList(bp+128, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error __815: ; @@ -74074,8 +74079,8 @@ __816: __162: // Write results here ; - *(*int32)(unsafe.Pointer(bp + 652 /* &aRes[0] */)) = 0 - *(*int32)(unsafe.Pointer(bp + 652 /* &aRes[0] */ + 1*4)) = libc.AssignPtrInt32(bp+652+2*4, -1) + *(*int32)(unsafe.Pointer(bp + 652)) = 0 + *(*int32)(unsafe.Pointer(bp + 652 + 1*4)) = libc.AssignPtrInt32(bp+652+2*4, -1) rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+652+1*4, bp+652+2*4) if !(rc != 0) { @@ -74088,7 +74093,7 @@ __162: // Write results here __818: ; rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 652 /* &aRes[0] */)) = 1 + *(*int32)(unsafe.Pointer(bp + 652)) = 1 __817: ; i6 = 0 @@ -74097,7 +74102,7 @@ __819: if !(i6 < 3) { goto __821 } - Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 652 /* &aRes[0] */ + uintptr(i6)*4)))) + Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 652 + uintptr(i6)*4)))) goto __820 __820: i6++ @@ -74162,12 +74167,12 @@ __824: } rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, - ts+5897, /* "cannot change %s..." */ + ts+5919, libc.VaList(bp+136, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { - return ts + 5949 /* "into" */ + return ts + 5971 /* "into" */ } - return ts + 5954 /* "out of" */ + return ts + 5976 /* "out of" */ }())) goto abort_due_to_error goto __827 @@ -74370,7 +74375,7 @@ __169: goto __842 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16)) - Xsqlite3VdbeError(tls, p, ts+5961 /* "database table i..." */, libc.VaList(bp+144, z1)) + Xsqlite3VdbeError(tls, p, ts+5983, libc.VaList(bp+144, z1)) __842: ; goto abort_due_to_error @@ -74411,14 +74416,14 @@ __844: // P1. Call the xCreate method for that table. __171: // Name of the virtual table - libc.Xmemset(tls, bp+664 /* &sMem1 */, 0, uint32(unsafe.Sizeof(Mem{}))) + libc.Xmemset(tls, bp+664, 0, uint32(unsafe.Sizeof(Mem{}))) (*Mem)(unsafe.Pointer(bp + 664 /* &sMem1 */)).Fdb = db // Because P2 is always a static string, it is impossible for the // sqlite3VdbeMemCopy() to fail - rc = Xsqlite3VdbeMemCopy(tls, bp+664 /* &sMem1 */, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) + rc = Xsqlite3VdbeMemCopy(tls, bp+664, aMem+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*40) - zTab = Xsqlite3_value_text(tls, bp+664 /* &sMem1 */) + zTab = Xsqlite3_value_text(tls, bp+664) if !(zTab != 0) { goto __845 @@ -74426,7 +74431,7 @@ __171: // Name of the virtual table rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, p+124) __845: ; - Xsqlite3VdbeMemRelease(tls, bp+664 /* &sMem1 */) + Xsqlite3VdbeMemRelease(tls, bp+664) if !(rc != 0) { goto __846 } @@ -74602,7 +74607,7 @@ __857: pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 40)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule - libc.Xmemset(tls, bp+708 /* &sContext */, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) + libc.Xmemset(tls, bp+708, 0, uint32(unsafe.Sizeof(Sqlite3_context{}))) (*Sqlite3_context)(unsafe.Pointer(bp + 708 /* &sContext */)).FpOut = pDest2 if !(int32((*Op)(unsafe.Pointer(pOp)).Fp5)&OPFLAG_NOCHNG != 0) { @@ -74623,7 +74628,7 @@ __859: if !((*Sqlite3_context)(unsafe.Pointer(bp+708)).FisError > 0) { goto __860 } - Xsqlite3VdbeError(tls, p, ts+3601 /* "%s" */, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) + Xsqlite3VdbeError(tls, p, ts+3623, libc.VaList(bp+152, Xsqlite3_value_text(tls, pDest2))) rc = (*Sqlite3_context)(unsafe.Pointer(bp + 708 /* &sContext */)).FisError __860: ; @@ -74963,7 +74968,7 @@ __883: if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { goto __888 } - Xsqlite3VdbeError(tls, p, ts+3601 /* "%s" */, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3623, libc.VaList(bp+160, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError __888: ; @@ -75055,7 +75060,7 @@ __893: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { goto __895 } - z3 = Xsqlite3MPrintf(tls, db, ts+5990 /* "-- %s" */, libc.VaList(bp+168, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6012, libc.VaList(bp+168, zTrace)) (*struct { f func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(db + 208 /* &.trace */))})).f(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) @@ -75153,7 +75158,7 @@ __903: if !(rc == SQLITE_IOERR|int32(33)<<8) { goto __905 } - rc = Xsqlite3CorruptError(tls, 95084) + rc = Xsqlite3CorruptError(tls, 95094) __905: ; __904: @@ -75162,13 +75167,13 @@ __904: if !((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0) && rc != SQLITE_IOERR|int32(12)<<8) { goto __906 } - Xsqlite3VdbeError(tls, p, ts+3601 /* "%s" */, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) + Xsqlite3VdbeError(tls, p, ts+3623, libc.VaList(bp+176, Xsqlite3ErrStr(tls, rc))) __906: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) - Xsqlite3_log(tls, rc, ts+5996, /* "statement aborts..." */ + Xsqlite3_log(tls, rc, ts+6018, libc.VaList(bp+184, (int32(pOp)-int32(aOp))/20, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == SQLITE_IOERR|int32(12)<<8) { @@ -75221,14 +75226,14 @@ __911: // Jump to here if a string or blob larger than SQLITE_MAX_LENGTH // is encountered. too_big: - Xsqlite3VdbeError(tls, p, ts+5254 /* "string or blob t..." */, 0) + Xsqlite3VdbeError(tls, p, ts+5276, 0) rc = SQLITE_TOOBIG goto abort_due_to_error // Jump to here if a malloc() fails. no_mem: Xsqlite3OomFault(tls, db) - Xsqlite3VdbeError(tls, p, ts+6028 /* "out of memory" */, 0) + Xsqlite3VdbeError(tls, p, ts+6050, 0) rc = SQLITE_NOMEM goto abort_due_to_error @@ -75241,12 +75246,12 @@ abort_due_to_interrupt: return int32(0) } -var azType = [4]uintptr{ts + 6042 /* "NOT NULL" */, ts + 6051 /* "UNIQUE" */, ts + 6058, /* "CHECK" */ - ts + 6064 /* "FOREIGN KEY" */} /* sqlite3.c:87835:25 */ -var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89055:32 */ -var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89058:32 */ -var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:89542:24 */ -var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:90793:20 */ +var azType = [4]uintptr{ts + 6064, ts + 6073, ts + 6080, + ts + 6086} /* sqlite3.c:87844:25 */ +var and_logic = [9]uint8{uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(0), uint8(2), uint8(2)} /* sqlite3.c:89064:32 */ +var or_logic = [9]uint8{uint8(0), uint8(1), uint8(2), uint8(1), uint8(1), uint8(1), uint8(2), uint8(1), uint8(2)} /* sqlite3.c:89067:32 */ +var aFlag1 = [2]U16{U16(MEM_Blob), U16(MEM_Str | MEM_Term)} /* sqlite3.c:89551:24 */ +var vfsFlags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TRANSIENT_DB /* sqlite3.c:90803:20 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -75277,7 +75282,7 @@ type Incrblob1 = struct { Fdb uintptr FzDb uintptr FpTab uintptr -} /* sqlite3.c:95189:9 */ +} /* sqlite3.c:95199:9 */ //************* End of vdbe.c *********************************************** //************* Begin file vdbeblob.c *************************************** @@ -75298,7 +75303,7 @@ type Incrblob1 = struct { // #include "vdbeInt.h" // Valid sqlite3_blob* handles point to Incrblob structures. -type Incrblob = Incrblob1 /* sqlite3.c:95189:25 */ +type Incrblob = Incrblob1 /* sqlite3.c:95199:25 */ // This function is used by both blob_open() and blob_reopen(). It seeks // the b-tree cursor associated with blob handle p to point to row iRow. @@ -75315,7 +75320,7 @@ type Incrblob = Incrblob1 /* sqlite3.c:95189:25 */ // If an error does occur, then the b-tree cursor is closed. All subsequent // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. -func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:95219:12: */ +func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:95229:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -75350,16 +75355,16 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } if type1 < U32(12) { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6076, /* "cannot open valu..." */ + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6098, libc.VaList(bp, func() uintptr { if type1 == U32(0) { - return ts + 6105 /* "null" */ + return ts + 6127 /* "null" */ } return func() uintptr { if type1 == U32(7) { - return ts + 6110 /* "real" */ + return ts + 6132 /* "real" */ } - return ts + 6115 /* "integer" */ + return ts + 6137 /* "integer" */ }() }())) rc = SQLITE_ERROR @@ -75379,10 +75384,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) rc = Xsqlite3_finalize(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) if rc == SQLITE_OK { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6123 /* "no such rowid: %..." */, libc.VaList(bp+8, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6145, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3601 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3623, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -75391,7 +75396,7 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) } // Open a blob handle. -func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:95287:16: */ +func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:95297:16: */ bp := tls.Alloc(320) defer tls.Free(320) @@ -75428,7 +75433,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, pBlob = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Incrblob{}))) __1: - libc.Xmemset(tls, bp+48 /* &sParse */, 0, uint32(unsafe.Sizeof(Parse{}))) + libc.Xmemset(tls, bp+48, 0, uint32(unsafe.Sizeof(Parse{}))) if !!(pBlob != 0) { goto __4 } @@ -75440,26 +75445,26 @@ __4: *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) - pTab = Xsqlite3LocateTable(tls, bp+48 /* &sParse */, uint32(0), zTable, zDb) + pTab = Xsqlite3LocateTable(tls, bp+48, uint32(0), zTable, zDb) if !(pTab != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __5 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+6143 /* "cannot open virt..." */, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6165, libc.VaList(bp, zTable)) __5: ; if !(pTab != 0 && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0))) { goto __6 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+6173 /* "cannot open tabl..." */, libc.VaList(bp+8, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6195, libc.VaList(bp+8, zTable)) __6: ; if !(pTab != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+6209 /* "cannot open view..." */, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48, ts+6231, libc.VaList(bp+16, zTable)) __7: ; if !!(pTab != 0) { @@ -75504,7 +75509,7 @@ __12: goto __14 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */))) - *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6230 /* "no such column: ..." */, libc.VaList(bp+24, zColumn)) + *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6252, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -75534,7 +75539,7 @@ __20: if !((*sColMap)(unsafe.Pointer(pFKey+36+uintptr(j)*8)).FiFrom == iCol) { goto __23 } - zFault = ts + 6251 /* "foreign key" */ + zFault = ts + 6273 /* "foreign key" */ __23: ; goto __21 @@ -75567,7 +75572,7 @@ __27: if !(int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == iCol || int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j1)*2))) == -2) { goto __30 } - zFault = ts + 6263 /* "indexed" */ + zFault = ts + 6285 /* "indexed" */ __30: ; goto __28 @@ -75588,7 +75593,7 @@ __26: goto __31 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */))) - *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6271 /* "cannot open %s c..." */, libc.VaList(bp+32, zFault)) + *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6293, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -75597,7 +75602,7 @@ __31: __15: ; - (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt = Xsqlite3VdbeCreate(tls, bp+48 /* &sParse */) + (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt = Xsqlite3VdbeCreate(tls, bp+48) if !((*Incrblob)(unsafe.Pointer(pBlob)).FpStmt != 0) { goto __32 @@ -75654,7 +75659,7 @@ __35: (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnVar = int16(0) (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnMem = 1 (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnTab = 1 - Xsqlite3VdbeMakeReady(tls, v, bp+48 /* &sParse */) + Xsqlite3VdbeMakeReady(tls, v, bp+48) __34: ; __32: @@ -75669,7 +75674,7 @@ __32: goto blob_open_out __36: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+316 /* &zErr */) + rc = blobSeekToRow(tls, pBlob, iRow, bp+316) goto __2 __2: if libc.PreIncInt32(&nAttempt, 1) < SQLITE_MAX_SCHEMA_RETRY && rc == SQLITE_SCHEMA { @@ -75697,18 +75702,18 @@ __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 316)) != 0 { - return ts + 3601 /* "%s" */ + return ts + 3623 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 316 /* zErr */))) - Xsqlite3ParserReset(tls, bp+48 /* &sParse */) + Xsqlite3ParserReset(tls, bp+48) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc } -var iLn int32 = 0 /* sqlite3.c:95431:24 */ +var iLn int32 = 0 /* sqlite3.c:95441:24 */ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_TableLock)}, // 0: Acquire a read or write lock {Fopcode: U8(OP_OpenRead)}, // 1: Open a cursor @@ -75717,11 +75722,11 @@ var openBlob = [6]VdbeOpList{ {Fopcode: U8(OP_Column), Fp3: int8(1)}, // 3 {Fopcode: U8(OP_ResultRow), Fp1: int8(1)}, // 4 {Fopcode: U8(OP_Halt)}, // 5 -} /* sqlite3.c:95432:31 */ +} /* sqlite3.c:95442:31 */ // Close a blob handle that was previously created using // sqlite3_blob_open(). -func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:95521:16: */ +func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:95531:16: */ var p uintptr = pBlob var rc int32 var db uintptr @@ -75740,14 +75745,14 @@ func Xsqlite3_blob_close(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9552 } // Perform a read or write operation on a blob -func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:95542:12: */ +func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32, xCall uintptr) int32 { /* sqlite3.c:95552:12: */ var rc int32 var p uintptr = pBlob var v uintptr var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 95554) + return Xsqlite3MisuseError(tls, 95564) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75806,14 +75811,14 @@ func blobReadWrite(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int } // Read data from a blob handle. -func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:95617:16: */ +func Xsqlite3_blob_read(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:95627:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePayloadChecked}))) } // Write data to a blob handle. -func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:95624:16: */ +func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffset int32) int32 { /* sqlite3.c:95634:16: */ return blobReadWrite(tls, pBlob, z, n, iOffset, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, U32, U32, uintptr) int32 }{Xsqlite3BtreePutData}))) @@ -75823,7 +75828,7 @@ func Xsqlite3_blob_write(tls *libc.TLS, pBlob uintptr, z uintptr, n int32, iOffs // // The Incrblob.nByte field is fixed for the lifetime of the Incrblob // so no mutex is required for access. -func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:95634:16: */ +func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:95644:16: */ var p uintptr = pBlob if p != 0 && (*Incrblob)(unsafe.Pointer(p)).FpStmt != 0 { return (*Incrblob)(unsafe.Pointer(p)).FnByte @@ -75839,7 +75844,7 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9563 // database handle error code and message set. If this happens, then all // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. -func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:95649:16: */ +func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:95659:16: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -75848,7 +75853,7 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 var db uintptr if p == uintptr(0) { - return Xsqlite3MisuseError(tls, 95654) + return Xsqlite3MisuseError(tls, 95664) } db = (*Incrblob)(unsafe.Pointer(p)).Fdb Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -75861,11 +75866,11 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 // var zErr uintptr at bp+8, 4 (*Vdbe)(unsafe.Pointer((*Incrblob)(unsafe.Pointer(p)).FpStmt)).Frc = SQLITE_OK - rc = blobSeekToRow(tls, p, iRow, bp+8 /* &zErr */) + rc = blobSeekToRow(tls, p, iRow, bp+8) if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 8)) != 0 { - return ts + 3601 /* "%s" */ + return ts + 3623 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))) @@ -76034,7 +76039,7 @@ type MergeEngine1 = struct { FpTask uintptr FaTree uintptr FaReadr uintptr -} /* sqlite3.c:21732:9 */ +} /* sqlite3.c:21734:9 */ //************* End of vdbeblob.c ******************************************* //************* Begin file vdbesort.c *************************************** @@ -76185,7 +76190,7 @@ type MergeEngine1 = struct { // overflows. 512MiB. // Private objects used by the sorter -type MergeEngine = MergeEngine1 /* sqlite3.c:95843:28 */ // Merge PMAs together +type MergeEngine = MergeEngine1 /* sqlite3.c:95853:28 */ // Merge PMAs together type PmaReader1 = struct { FiReadOff I64 FiEof I64 @@ -76198,10 +76203,10 @@ type PmaReader1 = struct { FnBuffer int32 FaMap uintptr FpIncr uintptr -} /* sqlite3.c:21732:9 */ +} /* sqlite3.c:21734:9 */ // Merge PMAs together -type PmaReader = PmaReader1 /* sqlite3.c:95844:26 */ // Incrementally read one PMA +type PmaReader = PmaReader1 /* sqlite3.c:95854:26 */ // Incrementally read one PMA type PmaWriter1 = struct { FeFWErr int32 FaBuffer uintptr @@ -76210,17 +76215,17 @@ type PmaWriter1 = struct { FiBufEnd int32 FiWriteOff I64 FpFd uintptr -} /* sqlite3.c:95845:9 */ +} /* sqlite3.c:95855:9 */ // Incrementally read one PMA -type PmaWriter = PmaWriter1 /* sqlite3.c:95845:26 */ // Incrementally write one PMA +type PmaWriter = PmaWriter1 /* sqlite3.c:95855:26 */ // Incrementally write one PMA type SorterRecord1 = struct { FnVal int32 Fu struct{ FpNext uintptr } -} /* sqlite3.c:21732:9 */ +} /* sqlite3.c:21734:9 */ // Incrementally write one PMA -type SorterRecord = SorterRecord1 /* sqlite3.c:95846:29 */ // A record being sorted +type SorterRecord = SorterRecord1 /* sqlite3.c:95856:29 */ // A record being sorted type SortSubtask1 = struct { FpThread uintptr FbDone int32 @@ -76231,25 +76236,25 @@ type SortSubtask1 = struct { FxCompare SorterCompare Ffile SorterFile Ffile2 SorterFile -} /* sqlite3.c:21732:9 */ +} /* sqlite3.c:21734:9 */ // A record being sorted -type SortSubtask = SortSubtask1 /* sqlite3.c:95847:28 */ // A sub-task in the sort process +type SortSubtask = SortSubtask1 /* sqlite3.c:95857:28 */ // A sub-task in the sort process type SorterFile1 = struct { FpFd uintptr FiEof I64 -} /* sqlite3.c:21732:9 */ +} /* sqlite3.c:21734:9 */ // A sub-task in the sort process -type SorterFile = SorterFile1 /* sqlite3.c:95848:27 */ // Temporary file object wrapper +type SorterFile = SorterFile1 /* sqlite3.c:95858:27 */ // Temporary file object wrapper type SorterList1 = struct { FpList uintptr FaMemory uintptr FszPMA int32 -} /* sqlite3.c:21732:9 */ +} /* sqlite3.c:21734:9 */ // Temporary file object wrapper -type SorterList = SorterList1 /* sqlite3.c:95849:27 */ // In-memory list of records +type SorterList = SorterList1 /* sqlite3.c:95859:27 */ // In-memory list of records type IncrMerger1 = struct { FpTask uintptr FpMerger uintptr @@ -76258,10 +76263,10 @@ type IncrMerger1 = struct { FbEof int32 FbUseThread int32 FaFile [2]SorterFile -} /* sqlite3.c:21732:9 */ +} /* sqlite3.c:21734:9 */ // In-memory list of records -type IncrMerger = IncrMerger1 /* sqlite3.c:95850:27 */ +type IncrMerger = IncrMerger1 /* sqlite3.c:95860:27 */ // This object represents a single thread of control in a sort operation. // Exactly VdbeSorter.nTask instances of this object are allocated @@ -76292,11 +76297,11 @@ type IncrMerger = IncrMerger1 /* sqlite3.c:95850:27 */ // In both cases, the effects of the main thread seeing (bDone==0) even // after the thread has finished are not dire. So we don't worry about // memory barriers and such here. -type SorterCompare = uintptr /* sqlite3.c:95977:13 */ +type SorterCompare = uintptr /* sqlite3.c:95987:13 */ // Free all memory belonging to the PmaReader object passed as the // argument. All structure fields are set to zero before returning. -func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96152:13: */ +func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96162:13: */ Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaAlloc) Xsqlite3_free(tls, (*PmaReader)(unsafe.Pointer(pReadr)).FaBuffer) if (*PmaReader)(unsafe.Pointer(pReadr)).FaMap != 0 { @@ -76313,7 +76318,7 @@ func vdbePmaReaderClear(tls *libc.TLS, pReadr uintptr) { /* sqlite3.c:96152:13: // // The buffer returned in *ppOut is only valid until the // next call to this function. -func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96169:12: */ +func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 { /* sqlite3.c:96179:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76400,7 +76405,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 if nRem > (*PmaReader)(unsafe.Pointer(p)).FnBuffer { nCopy = (*PmaReader)(unsafe.Pointer(p)).FnBuffer } - rc = vdbePmaReadBlob(tls, p, nCopy, bp /* &aNext */) + rc = vdbePmaReadBlob(tls, p, nCopy, bp) if rc != SQLITE_OK { return rc } @@ -76417,7 +76422,7 @@ func vdbePmaReadBlob(tls *libc.TLS, p uintptr, nByte int32, ppOut uintptr) int32 // Read a varint from the stream of data accessed by p. Set *pnOut to // the value read. -func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:96263:12: */ +func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlite3.c:96273:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -76437,13 +76442,13 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit var i int32 = 0 var rc int32 for ok := true; ok; ok = int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))))&0x80 != 0 { - rc = vdbePmaReadBlob(tls, p, 1, bp /* &a */) + rc = vdbePmaReadBlob(tls, p, 1, bp) if rc != 0 { return rc } - *(*U8)(unsafe.Pointer(bp + 4 /* &aVarint[0] */ + uintptr(libc.PostIncInt32(&i, 1)&0xf))) = *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* a */)))) + *(*U8)(unsafe.Pointer(bp + 4 + uintptr(libc.PostIncInt32(&i, 1)&0xf))) = *(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* a */)))) } - Xsqlite3GetVarint(tls, bp+4 /* &aVarint[0] */, pnOut) + Xsqlite3GetVarint(tls, bp+4, pnOut) } } @@ -76457,7 +76462,7 @@ func vdbePmaReadVarint(tls *libc.TLS, p uintptr, pnOut uintptr) int32 { /* sqlit // // Or, if an error occurs, return an SQLite error code. The final value of // *pp is undefined in this case. -func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:96296:12: */ +func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) int32 { /* sqlite3.c:96306:12: */ var rc int32 = SQLITE_OK if (*SorterFile)(unsafe.Pointer(pFile)).FiEof <= I64((*Sqlite3)(unsafe.Pointer((*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fdb)).FnMaxSorterMmap) { var pFd uintptr = (*SorterFile)(unsafe.Pointer(pFile)).FpFd @@ -76472,7 +76477,7 @@ func vdbeSorterMapFile(tls *libc.TLS, pTask uintptr, pFile uintptr, pp uintptr) // Attach PmaReader pReadr to file pFile (if it is not already attached to // that file) and seek it to offset iOff within the file. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:96313:12: */ +func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintptr, iOff I64) int32 { /* sqlite3.c:96323:12: */ var rc int32 = SQLITE_OK if Xsqlite3FaultSim(tls, 201) != 0 { @@ -76513,7 +76518,7 @@ func vdbePmaReaderSeek(tls *libc.TLS, pTask uintptr, pReadr uintptr, pFile uintp // Advance PmaReader pReadr to the next key in its PMA. Return SQLITE_OK if // no error occurs, or an SQLite error code if one does. -func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:96360:12: */ +func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:96370:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76541,7 +76546,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:96360 } if rc == SQLITE_OK { - rc = vdbePmaReadVarint(tls, pReadr, bp /* &nRec */) + rc = vdbePmaReadVarint(tls, pReadr, bp) } if rc == SQLITE_OK { (*PmaReader)(unsafe.Pointer(pReadr)).FnKey = int32(*(*U64)(unsafe.Pointer(bp /* nRec */))) @@ -76559,7 +76564,7 @@ func vdbePmaReaderNext(tls *libc.TLS, pReadr uintptr) int32 { /* sqlite3.c:96360 // // If the pnByte parameter is NULL, then it is assumed that the file // contains a single PMA, and that that PMA omits the initial length varint. -func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:96407:12: */ +func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, pReadr uintptr, pnByte uintptr) int32 { /* sqlite3.c:96417:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76568,7 +76573,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, rc = vdbePmaReaderSeek(tls, pTask, pReadr, pFile, iStart) if rc == SQLITE_OK { *(*U64)(unsafe.Pointer(bp /* nByte */)) = uint64(0) // Size of PMA in bytes - rc = vdbePmaReadVarint(tls, pReadr, bp /* &nByte */) + rc = vdbePmaReadVarint(tls, pReadr, bp) (*PmaReader)(unsafe.Pointer(pReadr)).FiEof = I64(U64((*PmaReader)(unsafe.Pointer(pReadr)).FiReadOff) + *(*U64)(unsafe.Pointer(bp))) *(*I64)(unsafe.Pointer(pnByte)) += I64(*(*U64)(unsafe.Pointer(bp))) } @@ -76582,7 +76587,7 @@ func vdbePmaReaderInit(tls *libc.TLS, pTask uintptr, pFile uintptr, iStart I64, // A version of vdbeSorterCompare() that assumes that it has already been // determined that the first field of key1 is equal to the first field of // key2. -func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96440:12: */ +func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96450:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if *(*int32)(unsafe.Pointer(pbKey2Cached)) == 0 { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -76602,7 +76607,7 @@ func vdbeSorterCompareTail(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // // If an OOM error is encountered, (pTask->pUnpacked->error_rc) is set // to SQLITE_NOMEM. -func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96467:12: */ +func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96477:12: */ var r2 uintptr = (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked if !(*(*int32)(unsafe.Pointer(pbKey2Cached)) != 0) { Xsqlite3VdbeRecordUnpack(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo, nKey2, pKey2, r2) @@ -76614,7 +76619,7 @@ func vdbeSorterCompare(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is a TEXT value and that the collation // sequence to compare them with is BINARY. -func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96486:12: */ +func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96496:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -76631,11 +76636,11 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p *(*int32)(unsafe.Pointer(bp /* n1 */)) = int32(U32(*(*U8)(unsafe.Pointer(p1 + 1)))) if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { - Xsqlite3GetVarint32(tls, p1+1, bp /* &n1 */) + Xsqlite3GetVarint32(tls, p1+1, bp) } *(*int32)(unsafe.Pointer(bp + 4 /* n2 */)) = int32(U32(*(*U8)(unsafe.Pointer(p2 + 1)))) if *(*int32)(unsafe.Pointer(bp + 4)) >= 0x80 { - Xsqlite3GetVarint32(tls, p2+1, bp+4 /* &n2 */) + Xsqlite3GetVarint32(tls, p2+1, bp+4) } res = libc.Xmemcmp(tls, v1, v2, uint32((func() int32 { if *(*int32)(unsafe.Pointer(bp)) < *(*int32)(unsafe.Pointer(bp + 4)) { @@ -76664,7 +76669,7 @@ func vdbeSorterCompareText(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, p // A specially optimized version of vdbeSorterCompare() that assumes that // the first field of each key is an INTEGER value. -func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96528:12: */ +func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pKey1 uintptr, nKey1 int32, pKey2 uintptr, nKey2 int32) int32 { /* sqlite3.c:96538:12: */ var p1 uintptr = pKey1 var p2 uintptr = pKey2 var s1 int32 = int32(*(*U8)(unsafe.Pointer(p1 + 1))) // Left hand serial type @@ -76724,7 +76729,7 @@ func vdbeSorterCompareInt(tls *libc.TLS, pTask uintptr, pbKey2Cached uintptr, pK return res } -var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:96547:21 */ +var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), U8(0)} /* sqlite3.c:96557:21 */ // Initialize the temporary index cursor just opened as a sorter cursor. // @@ -76743,7 +76748,7 @@ var aLen = [10]U8{U8(0), U8(1), U8(2), U8(3), U8(4), U8(6), U8(8), U8(0), U8(0), // mode, but not in multi-threaded mode. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:96611:20: */ +func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintptr) int32 { /* sqlite3.c:96621:20: */ var pgsz int32 // Page size of main database var i int32 // Used to iterate through aTask[] var pSorter uintptr // The new sorter @@ -76839,7 +76844,7 @@ func Xsqlite3VdbeSorterInit(tls *libc.TLS, db uintptr, nField int32, pCsr uintpt } // Free the list of sorted records starting at pRecord. -func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:96716:13: */ +func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlite3.c:96726:13: */ var p uintptr var pNext uintptr for p = pRecord; p != 0; p = pNext { @@ -76850,7 +76855,7 @@ func vdbeSorterRecordFree(tls *libc.TLS, db uintptr, pRecord uintptr) { /* sqlit // Free all resources owned by the object indicated by argument pTask. All // fields of *pTask are zeroed before returning. -func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:96729:13: */ +func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlite3.c:96739:13: */ Xsqlite3DbFree(tls, db, (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked) // pTask->list.aMemory can only be non-zero if it was handed memory // from the main thread. That only occurs SQLITE_MAX_WORKER_THREADS>0 @@ -76870,7 +76875,7 @@ func vdbeSortSubtaskCleanup(tls *libc.TLS, db uintptr, pTask uintptr) { /* sqlit } // Join thread pTask->thread. -func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:96795:12: */ +func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:96805:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -76878,7 +76883,7 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:967 if (*SortSubtask)(unsafe.Pointer(pTask)).FpThread != 0 { *(*uintptr)(unsafe.Pointer(bp /* pRet */)) = uintptr(SQLITE_ERROR) - Xsqlite3ThreadJoin(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FpThread, bp /* &pRet */) + Xsqlite3ThreadJoin(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FpThread, bp) rc = int32(*(*uintptr)(unsafe.Pointer(bp))) @@ -76889,14 +76894,14 @@ func vdbeSorterJoinThread(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:967 } // Launch a background thread to run xTask(pIn). -func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:96816:12: */ +func vdbeSorterCreateThread(tls *libc.TLS, pTask uintptr, xTask uintptr, pIn uintptr) int32 { /* sqlite3.c:96826:12: */ return Xsqlite3ThreadCreate(tls, pTask, xTask, pIn) } // Join all outstanding threads launched by SorterWrite() to create // level-0 PMAs. -func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:96829:12: */ +func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sqlite3.c:96839:12: */ var rc int32 = rcin var i int32 @@ -76922,7 +76927,7 @@ func vdbeSorterJoinAll(tls *libc.TLS, pSorter uintptr, rcin int32) int32 { /* sq // // nReader is automatically rounded up to the next power of two. // nReader may not exceed SORTER_MAX_MERGE_COUNT even after rounding up. -func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:96859:20: */ +func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:96869:20: */ var N int32 = 2 // Smallest power of two >= nReader var nByte int32 // Total bytes of space to allocate var pNew uintptr // Pointer to allocated object to return @@ -76947,7 +76952,7 @@ func vdbeMergeEngineNew(tls *libc.TLS, nReader int32) uintptr { /* sqlite3.c:968 } // Free the MergeEngine object passed as the only argument. -func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:96882:13: */ +func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:96892:13: */ var i int32 if pMerger != 0 { for i = 0; i < (*MergeEngine)(unsafe.Pointer(pMerger)).FnTree; i++ { @@ -76959,7 +76964,7 @@ func vdbeMergeEngineFree(tls *libc.TLS, pMerger uintptr) { /* sqlite3.c:96882:13 // Free all resources associated with the IncrMerger object indicated by // the first argument. -func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:96896:13: */ +func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:96906:13: */ if pIncr != 0 { if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { vdbeSorterJoinThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask) @@ -76976,7 +76981,7 @@ func vdbeIncrFree(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:96896:13: */ } // Reset a sorting cursor back to its original empty state. -func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:96913:21: */ +func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sqlite3.c:96923:21: */ var i int32 vdbeSorterJoinAll(tls, pSorter, SQLITE_OK) @@ -77005,7 +77010,7 @@ func Xsqlite3VdbeSorterReset(tls *libc.TLS, db uintptr, pSorter uintptr) { /* sq } // Free any cursor components allocated by sqlite3VdbeSorterXXX routines. -func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:96946:21: */ +func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlite3.c:96956:21: */ var pSorter uintptr pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 40)) @@ -77024,7 +77029,7 @@ func Xsqlite3VdbeSorterClose(tls *libc.TLS, db uintptr, pCsr uintptr) { /* sqlit // // Whether or not the file does end up memory mapped of course depends on // the specific VFS implementation. -func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:96968:13: */ +func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { /* sqlite3.c:96978:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*I64)(unsafe.Pointer(bp + 4)) = nByte @@ -77032,9 +77037,9 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / if *(*I64)(unsafe.Pointer(bp + 4)) <= I64((*Sqlite3)(unsafe.Pointer(db)).FnMaxSorterMmap) && (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer(pFd)).FpMethods)).FiVersion >= 3 { *(*uintptr)(unsafe.Pointer(bp + 12 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp /* chunksize */)) = 4 * 1024 - Xsqlite3OsFileControlHint(tls, pFd, SQLITE_FCNTL_CHUNK_SIZE, bp /* &chunksize */) - Xsqlite3OsFileControlHint(tls, pFd, SQLITE_FCNTL_SIZE_HINT, bp+4 /* &nByte */) - Xsqlite3OsFetch(tls, pFd, int64(0), int32(*(*I64)(unsafe.Pointer(bp + 4 /* nByte */))), bp+12 /* &p */) + Xsqlite3OsFileControlHint(tls, pFd, SQLITE_FCNTL_CHUNK_SIZE, bp) + Xsqlite3OsFileControlHint(tls, pFd, SQLITE_FCNTL_SIZE_HINT, bp+4) + Xsqlite3OsFetch(tls, pFd, int64(0), int32(*(*I64)(unsafe.Pointer(bp + 4 /* nByte */))), bp+12) if *(*uintptr)(unsafe.Pointer(bp + 12)) != 0 { Xsqlite3OsUnfetch(tls, pFd, int64(0), *(*uintptr)(unsafe.Pointer(bp + 12 /* p */))) } @@ -77044,7 +77049,7 @@ func vdbeSorterExtendFile(tls *libc.TLS, db uintptr, pFd uintptr, nByte I64) { / // Allocate space for a file-handle and open a temporary file. If successful, // set *ppFd to point to the malloc'd file-handle and return SQLITE_OK. // Otherwise, set *ppFd to 0 and return an SQLite error code. -func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:96987:12: */ +func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr) int32 { /* sqlite3.c:96997:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -77054,10 +77059,10 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr return SQLITE_IOERR | int32(13)<<8 } *(*int32)(unsafe.Pointer(bp /* rc */)) = Xsqlite3OsOpenMalloc(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), ppFd, - SQLITE_OPEN_TEMP_JOURNAL|SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_DELETEONCLOSE, bp /* &rc */) + SQLITE_OPEN_TEMP_JOURNAL|SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_DELETEONCLOSE, bp) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { *(*I64)(unsafe.Pointer(bp + 4 /* max */)) = int64(SQLITE_MAX_MMAP_SIZE) - Xsqlite3OsFileControlHint(tls, *(*uintptr)(unsafe.Pointer(ppFd)), SQLITE_FCNTL_MMAP_SIZE, bp+4 /* &max */) + Xsqlite3OsFileControlHint(tls, *(*uintptr)(unsafe.Pointer(ppFd)), SQLITE_FCNTL_MMAP_SIZE, bp+4) if nExtend > int64(0) { vdbeSorterExtendFile(tls, db, *(*uintptr)(unsafe.Pointer(ppFd)), nExtend) } @@ -77068,7 +77073,7 @@ func vdbeSorterOpenTempFile(tls *libc.TLS, db uintptr, nExtend I64, ppFd uintptr // If it has not already been allocated, allocate the UnpackedRecord // structure at pTask->pUnpacked. Return SQLITE_OK if successful (or // if no allocation was required), or SQLITE_NOMEM otherwise. -func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97014:12: */ +func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97024:12: */ if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked = Xsqlite3VdbeAllocUnpackedRecord(tls, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).FpKeyInfo) if (*SortSubtask)(unsafe.Pointer(pTask)).FpUnpacked == uintptr(0) { @@ -77081,7 +77086,7 @@ func vdbeSortAllocUnpacked(tls *libc.TLS, pTask uintptr) int32 { /* sqlite3.c:97 } // Merge the two sorted lists p1 and p2 into a single list. -func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97028:21: */ +func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:97038:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77094,7 +77099,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp res = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, - pTask, bp+4 /* &bCached */, p1+uintptr(1)*8, (*SorterRecord)(unsafe.Pointer(p1)).FnVal, p2+uintptr(1)*8, (*SorterRecord)(unsafe.Pointer(p2)).FnVal) + pTask, bp+4, p1+uintptr(1)*8, (*SorterRecord)(unsafe.Pointer(p1)).FnVal, p2+uintptr(1)*8, (*SorterRecord)(unsafe.Pointer(p2)).FnVal) if res <= 0 { *(*uintptr)(unsafe.Pointer(pp)) = p1 @@ -77120,7 +77125,7 @@ func vdbeSorterMerge(tls *libc.TLS, pTask uintptr, p1 uintptr, p2 uintptr) uintp // Return the SorterCompare function to compare values collected by the // sorter object passed as the only argument. -func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97070:22: */ +func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c:97080:22: */ if int32((*VdbeSorter)(unsafe.Pointer(p)).FtypeMask) == SORTER_TYPE_INTEGER { return *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 @@ -77138,7 +77143,7 @@ func vdbeSorterGetCompare(tls *libc.TLS, p uintptr) SorterCompare { /* sqlite3.c // Sort the linked list of records headed at pTask->pList. Return // SQLITE_OK if successful, or an SQLite error code (i.e. SQLITE_NOMEM) if // an error occurs. -func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97084:12: */ +func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97094:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -77154,7 +77159,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli p = (*SorterList)(unsafe.Pointer(pList)).FpList (*SortSubtask)(unsafe.Pointer(pTask)).FxCompare = vdbeSorterGetCompare(tls, (*SortSubtask)(unsafe.Pointer(pTask)).FpSorter) - libc.Xmemset(tls, bp /* &aSlot[0] */, 0, uint32(unsafe.Sizeof([64]uintptr{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([64]uintptr{}))) for p != 0 { var pNext uintptr @@ -77171,10 +77176,10 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli *(*uintptr)(unsafe.Pointer(p + 4)) = uintptr(0) for i = 0; *(*uintptr)(unsafe.Pointer(bp /* &aSlot[0] */ + uintptr(i)*4)) != 0; i++ { - p = vdbeSorterMerge(tls, pTask, p, *(*uintptr)(unsafe.Pointer(bp /* &aSlot[0] */ + uintptr(i)*4))) - *(*uintptr)(unsafe.Pointer(bp /* &aSlot[0] */ + uintptr(i)*4)) = uintptr(0) + p = vdbeSorterMerge(tls, pTask, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4))) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer(bp /* &aSlot[0] */ + uintptr(i)*4)) = p + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = p p = pNext } @@ -77184,9 +77189,9 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli continue } if p != 0 { - p = vdbeSorterMerge(tls, pTask, p, *(*uintptr)(unsafe.Pointer(bp /* &aSlot[0] */ + uintptr(i)*4))) + p = vdbeSorterMerge(tls, pTask, p, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4))) } else { - p = *(*uintptr)(unsafe.Pointer(bp /* &aSlot[0] */ + uintptr(i)*4)) + p = *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) } } (*SorterList)(unsafe.Pointer(pList)).FpList = p @@ -77195,7 +77200,7 @@ func vdbeSorterSort(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqli } // Initialize a PMA-writer object. -func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97135:13: */ +func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart I64) { /* sqlite3.c:97145:13: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(PmaWriter{}))) (*PmaWriter)(unsafe.Pointer(p)).FaBuffer = Xsqlite3Malloc(tls, uint64(nBuf)) if !(int32((*PmaWriter)(unsafe.Pointer(p)).FaBuffer) != 0) { @@ -77210,7 +77215,7 @@ func vdbePmaWriterInit(tls *libc.TLS, pFd uintptr, p uintptr, nBuf int32, iStart // Write nData bytes of data to the PMA. Return SQLITE_OK // if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97157:13: */ +func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* sqlite3.c:97167:13: */ var nRem int32 = nData for nRem > 0 && (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 { var nCopy int32 = nRem @@ -77239,7 +77244,7 @@ func vdbePmaWriteBlob(tls *libc.TLS, p uintptr, pData uintptr, nData int32) { /* // // Before returning, set *piEof to the offset immediately following the // last byte written to the file. -func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97190:12: */ +func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sqlite3.c:97200:12: */ var rc int32 if (*PmaWriter)(unsafe.Pointer(p)).FeFWErr == 0 && (*PmaWriter)(unsafe.Pointer(p)).FaBuffer != 0 && (*PmaWriter)(unsafe.Pointer(p)).FiBufEnd > (*PmaWriter)(unsafe.Pointer(p)).FiBufStart { (*PmaWriter)(unsafe.Pointer(p)).FeFWErr = Xsqlite3OsWrite(tls, (*PmaWriter)(unsafe.Pointer(p)).FpFd, @@ -77255,15 +77260,15 @@ func vdbePmaWriterFinish(tls *libc.TLS, p uintptr, piEof uintptr) int32 { /* sql // Write value iVal encoded as a varint to the PMA. Return // SQLITE_OK if successful, or an SQLite error code if an error occurs. -func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:97209:13: */ +func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:97219:13: */ bp := tls.Alloc(10) defer tls.Free(10) var nByte int32 // var aByte [10]U8 at bp, 10 - nByte = Xsqlite3PutVarint(tls, bp /* &aByte[0] */, iVal) - vdbePmaWriteBlob(tls, p, bp /* &aByte[0] */, nByte) + nByte = Xsqlite3PutVarint(tls, bp, iVal) + vdbePmaWriteBlob(tls, p, bp, nByte) } // Write the current contents of in-memory linked-list pList to a level-0 @@ -77278,7 +77283,7 @@ func vdbePmaWriteVarint(tls *libc.TLS, p uintptr, iVal U64) { /* sqlite3.c:97209 // * One or more records packed end-to-end in order of ascending keys. // Each record consists of a varint followed by a blob of data (the // key). The varint is the number of bytes in the blob of data. -func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97230:12: */ +func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* sqlite3.c:97240:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -77287,7 +77292,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // var writer PmaWriter at bp, 32 // Object used to write to the file - libc.Xmemset(tls, bp /* &writer */, 0, uint32(unsafe.Sizeof(PmaWriter{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(PmaWriter{}))) // If the first temporary PMA file has not been opened, open it now. if (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd == uintptr(0) { @@ -77309,20 +77314,20 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* var p uintptr var pNext uintptr = uintptr(0) - vdbePmaWriterInit(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd, bp /* &writer */, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz, + vdbePmaWriterInit(tls, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FpFd, bp, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz, (*SortSubtask)(unsafe.Pointer(pTask)).Ffile.FiEof) (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA++ - vdbePmaWriteVarint(tls, bp /* &writer */, uint64((*SorterList)(unsafe.Pointer(pList)).FszPMA)) + vdbePmaWriteVarint(tls, bp, uint64((*SorterList)(unsafe.Pointer(pList)).FszPMA)) for p = (*SorterList)(unsafe.Pointer(pList)).FpList; p != 0; p = pNext { pNext = *(*uintptr)(unsafe.Pointer(p + 4)) - vdbePmaWriteVarint(tls, bp /* &writer */, uint64((*SorterRecord)(unsafe.Pointer(p)).FnVal)) - vdbePmaWriteBlob(tls, bp /* &writer */, p+uintptr(1)*8, (*SorterRecord)(unsafe.Pointer(p)).FnVal) + vdbePmaWriteVarint(tls, bp, uint64((*SorterRecord)(unsafe.Pointer(p)).FnVal)) + vdbePmaWriteBlob(tls, bp, p+uintptr(1)*8, (*SorterRecord)(unsafe.Pointer(p)).FnVal) if (*SorterList)(unsafe.Pointer(pList)).FaMemory == uintptr(0) { Xsqlite3_free(tls, p) } } (*SorterList)(unsafe.Pointer(pList)).FpList = p - rc = vdbePmaWriterFinish(tls, bp /* &writer */, pTask+36+4) + rc = vdbePmaWriterFinish(tls, bp, pTask+36+4) } return rc @@ -77333,7 +77338,7 @@ func vdbeSorterListToPMA(tls *libc.TLS, pTask uintptr, pList uintptr) int32 { /* // the MergeEngine has reached the end of all its inputs. // // Return SQLITE_OK if successful or an error code if an error occurs. -func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:97294:12: */ +func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { /* sqlite3.c:97304:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77409,7 +77414,7 @@ func vdbeMergeEngineStep(tls *libc.TLS, pMerger uintptr, pbEof uintptr) int32 { } // The main routine for background threads that write level-0 PMAs. -func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97365:13: */ +func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97375:13: */ var pTask uintptr = pCtx var rc int32 // Return code @@ -77420,7 +77425,7 @@ func vdbeSorterFlushThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:9 // Flush the current contents of VdbeSorter.list to a new PMA, possibly // using a background thread. -func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:97379:12: */ +func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:97389:12: */ var rc int32 = SQLITE_OK var i int32 var pTask uintptr = uintptr(0) // Thread context used to create new PMA @@ -77484,7 +77489,7 @@ func vdbeSorterFlushPMA(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:973 } // Add a record to the sorter. -func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:97449:20: */ +func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { /* sqlite3.c:97459:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77500,7 +77505,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 40)) *(*int32)(unsafe.Pointer(bp /* t */)) = int32(U32(*(*U8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVal)).Fz + 1)))) if *(*int32)(unsafe.Pointer(bp)) >= 0x80 { - Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(pVal)).Fz+1, bp /* &t */) + Xsqlite3GetVarint32(tls, (*Mem)(unsafe.Pointer(pVal)).Fz+1, bp) } if *(*int32)(unsafe.Pointer(bp)) > 0 && *(*int32)(unsafe.Pointer(bp)) < 10 && *(*int32)(unsafe.Pointer(bp)) != 7 { *(*U8)(unsafe.Pointer(pSorter + 60)) &= U8(SORTER_TYPE_INTEGER) @@ -77600,7 +77605,7 @@ func Xsqlite3VdbeSorterWrite(tls *libc.TLS, pCsr uintptr, pVal uintptr) int32 { // Read keys from pIncr->pMerger and populate pIncr->aFile[1]. The format // of the data stored in aFile[1] is the same as that used by regular PMAs, // except that the number-of-bytes varint is omitted from the start. -func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97561:12: */ +func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97571:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -77612,7 +77617,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97561:1 var pMerger uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger // var writer PmaWriter at bp, 32 - vdbePmaWriterInit(tls, (*SorterFile)(unsafe.Pointer(pOut)).FpFd, bp /* &writer */, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz, iStart) + vdbePmaWriterInit(tls, (*SorterFile)(unsafe.Pointer(pOut)).FpFd, bp, (*VdbeSorter)(unsafe.Pointer((*SortSubtask)(unsafe.Pointer(pTask)).FpSorter)).Fpgsz, iStart) for rc == SQLITE_OK { // var dummy int32 at bp+32, 4 @@ -77630,13 +77635,13 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97561:1 } // Write the next key to the output. - vdbePmaWriteVarint(tls, bp /* &writer */, uint64(nKey)) - vdbePmaWriteBlob(tls, bp /* &writer */, (*PmaReader)(unsafe.Pointer(pReader)).FaKey, nKey) + vdbePmaWriteVarint(tls, bp, uint64(nKey)) + vdbePmaWriteBlob(tls, bp, (*PmaReader)(unsafe.Pointer(pReader)).FaKey, nKey) - rc = vdbeMergeEngineStep(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger, bp+32 /* &dummy */) + rc = vdbeMergeEngineStep(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpMerger, bp+32) } - rc2 = vdbePmaWriterFinish(tls, bp /* &writer */, pOut+4) + rc2 = vdbePmaWriterFinish(tls, bp, pOut+4) if rc == SQLITE_OK { rc = rc2 } @@ -77646,7 +77651,7 @@ func vdbeIncrPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97561:1 // The main routine for background threads that populate aFile[1] of // multi-threaded IncrMerger objects. -func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97603:13: */ +func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97613:13: */ var pIncr uintptr = pCtx var pRet uintptr = uintptr(vdbeIncrPopulate(tls, pIncr)) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask)).FbDone = 1 @@ -77654,7 +77659,7 @@ func vdbeIncrPopulateThread(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c: } // Launch a background thread to populate aFile[1] of pIncr. -func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97613:12: */ +func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97623:12: */ var p uintptr = pIncr return vdbeSorterCreateThread(tls, (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask, *(*uintptr)(unsafe.Pointer(&struct { @@ -77677,7 +77682,7 @@ func vdbeIncrBgPopulate(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97613 // to populate the new aFile[1]. // // SQLITE_OK is returned on success, or an SQLite error code otherwise. -func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97637:12: */ +func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97647:12: */ var rc int32 = SQLITE_OK if (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread != 0 { @@ -77711,7 +77716,7 @@ func vdbeIncrSwap(tls *libc.TLS, pIncr uintptr) int32 { /* sqlite3.c:97637:12: * // // If an OOM condition is encountered, return NULL. In this case free the // pMerger argument before returning. -func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:97676:12: */ +func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uintptr) int32 { /* sqlite3.c:97686:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = libc.AssignPtrUintptr(ppOut, func() uintptr { if Xsqlite3FaultSim(tls, 100) != 0 { @@ -77738,7 +77743,7 @@ func vdbeIncrMergerNew(tls *libc.TLS, pTask uintptr, pMerger uintptr, ppOut uint } // Set the "use-threads" flag on object pIncr. -func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97701:13: */ +func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97711:13: */ (*IncrMerger)(unsafe.Pointer(pIncr)).FbUseThread = 1 *(*I64)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer(pIncr)).FpTask + 48 + 4)) -= I64((*IncrMerger)(unsafe.Pointer(pIncr)).FmxSz) } @@ -77746,7 +77751,7 @@ func vdbeIncrMergerSetThreads(tls *libc.TLS, pIncr uintptr) { /* sqlite3.c:97701 // Recompute pMerger->aTree[iOut] by comparing the next keys on the // two PmaReaders that feed that entry. Neither of the PmaReaders // are advanced. This routine merely does the comparison. -func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:97714:13: */ +func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sqlite3.c:97724:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -77779,7 +77784,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql res = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr, int32) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SortSubtask)(unsafe.Pointer(pTask)).FxCompare})).f(tls, - pTask, bp /* &bCached */, (*PmaReader)(unsafe.Pointer(p1)).FaKey, (*PmaReader)(unsafe.Pointer(p1)).FnKey, (*PmaReader)(unsafe.Pointer(p2)).FaKey, (*PmaReader)(unsafe.Pointer(p2)).FnKey) + pTask, bp, (*PmaReader)(unsafe.Pointer(p1)).FaKey, (*PmaReader)(unsafe.Pointer(p1)).FnKey, (*PmaReader)(unsafe.Pointer(p2)).FaKey, (*PmaReader)(unsafe.Pointer(p2)).FnKey) if res <= 0 { iRes = i1 } else { @@ -77806,7 +77811,7 @@ func vdbeMergeEngineCompare(tls *libc.TLS, pMerger uintptr, iOut int32) { /* sql // to pMerger. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:97796:12: */ +func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode int32) int32 { /* sqlite3.c:97806:12: */ var rc int32 = SQLITE_OK // Return code var i int32 // For looping over PmaReader objects var nTree int32 // Number of subtrees to merge @@ -77876,7 +77881,7 @@ func vdbeMergeEngineInit(tls *libc.TLS, pTask uintptr, pMerger uintptr, eMode in // the current PmaReader set to point to the first key in its range. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:97872:12: */ +func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:97882:12: */ var rc int32 = SQLITE_OK var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr var pTask uintptr = (*IncrMerger)(unsafe.Pointer(pIncr)).FpTask @@ -77933,7 +77938,7 @@ func vdbePmaReaderIncrMergeInit(tls *libc.TLS, pReadr uintptr, eMode int32) int3 // The main routine for vdbePmaReaderIncrMergeInit() operations run in // background threads. -func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97939:13: */ +func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:97949:13: */ var pReader uintptr = pCtx var pRet uintptr = uintptr(vdbePmaReaderIncrMergeInit(tls, pReader, INCRINIT_TASK)) (*SortSubtask)(unsafe.Pointer((*IncrMerger)(unsafe.Pointer((*PmaReader)(unsafe.Pointer(pReader)).FpIncr)).FpTask)).FbDone = 1 @@ -77949,7 +77954,7 @@ func vdbePmaReaderBgIncrInit(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c // then a background thread is launched to call vdbePmaReaderIncrMergeInit(). // Or, if the IncrMerger is single threaded, the same function is called // using the current thread. -func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:97960:12: */ +func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { /* sqlite3.c:97970:12: */ var pIncr uintptr = (*PmaReader)(unsafe.Pointer(pReadr)).FpIncr // Incremental merger var rc int32 = SQLITE_OK // Return code if pIncr != 0 { @@ -77976,7 +77981,7 @@ func vdbePmaReaderIncrInit(tls *libc.TLS, pReadr uintptr, eMode int32) int32 { / // set to the offset immediately following the last byte of the last // PMA before returning. If an error does occur, then the final value of // *piOffset is undefined. -func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:97990:12: */ +func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset uintptr, ppOut uintptr) int32 { /* sqlite3.c:98000:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -77993,7 +77998,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui for i = 0; i < nPMA && rc == SQLITE_OK; i++ { *(*I64)(unsafe.Pointer(bp /* nDummy */)) = int64(0) var pReadr uintptr = (*MergeEngine)(unsafe.Pointer(pNew)).FaReadr + uintptr(i)*52 - rc = vdbePmaReaderInit(tls, pTask, pTask+36, iOff, pReadr, bp /* &nDummy */) + rc = vdbePmaReaderInit(tls, pTask, pTask+36, iOff, pReadr, bp) iOff = (*PmaReader)(unsafe.Pointer(pReadr)).FiEof } @@ -78013,7 +78018,7 @@ func vdbeMergeEngineLevel0(tls *libc.TLS, pTask uintptr, nPMA int32, piOffset ui // nPMA<=16 -> TreeDepth() == 0 // nPMA<=256 -> TreeDepth() == 1 // nPMA<=65536 -> TreeDepth() == 2 -func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98029:12: */ +func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98039:12: */ var nDepth int32 = 0 var nDiv I64 = int64(SORTER_MAX_MERGE_COUNT) for nDiv < I64(nPMA) { @@ -78029,7 +78034,7 @@ func vdbeSorterTreeDepth(tls *libc.TLS, nPMA int32) int32 { /* sqlite3.c:98029:1 // // If successful, SQLITE_OK is returned. If an error occurs, an SQLite error // code is returned and pLeaf is freed. -func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98047:12: */ +func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, pRoot uintptr, pLeaf uintptr) int32 { /* sqlite3.c:98057:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78039,7 +78044,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, var p uintptr = pRoot // var pIncr uintptr at bp, 4 - rc = vdbeIncrMergerNew(tls, pTask, pLeaf, bp /* &pIncr */) + rc = vdbeIncrMergerNew(tls, pTask, pLeaf, bp) for i = 1; i < nDepth; i++ { nDiv = nDiv * SORTER_MAX_MERGE_COUNT @@ -78080,7 +78085,7 @@ func vdbeSorterAddToTree(tls *libc.TLS, pTask uintptr, nDepth int32, iSeq int32, // MergeEngine object at the root of the tree before returning. Or, if an // error occurs, an SQLite error code is returned and the final value // of *ppOut is undefined. -func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98103:12: */ +func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int32 { /* sqlite3.c:98113:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -78108,7 +78113,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int *(*I64)(unsafe.Pointer(bp /* iReadOff */)) = int64(0) if (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA <= SORTER_MAX_MERGE_COUNT { - rc = vdbeMergeEngineLevel0(tls, pTask, (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA, bp /* &iReadOff */, bp+8 /* &pRoot */) + rc = vdbeMergeEngineLevel0(tls, pTask, (*SortSubtask)(unsafe.Pointer(pTask)).FnPMA, bp, bp+8) } else { var i int32 var iSeq int32 = 0 @@ -78126,7 +78131,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int } return SORTER_MAX_MERGE_COUNT }() - rc = vdbeMergeEngineLevel0(tls, pTask, nReader, bp /* &iReadOff */, bp+12 /* &pMerger */) + rc = vdbeMergeEngineLevel0(tls, pTask, nReader, bp, bp+12) if rc == SQLITE_OK { rc = vdbeSorterAddToTree(tls, pTask, nDepth, libc.PostIncInt32(&iSeq, 1), *(*uintptr)(unsafe.Pointer(bp + 8 /* pRoot */)), *(*uintptr)(unsafe.Pointer(bp + 12 /* pMerger */))) } @@ -78161,7 +78166,7 @@ func vdbeSorterMergeTreeBuild(tls *libc.TLS, pSorter uintptr, ppOut uintptr) int // all records stored in the sorter. // // SQLITE_OK is returned if successful, or an SQLite error code otherwise. -func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98182:12: */ +func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:98192:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78175,7 +78180,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 (*SortSubtask)(unsafe.Pointer(pSorter + 64 + uintptr(i)*60)).FxCompare = xCompare } - rc = vdbeSorterMergeTreeBuild(tls, pSorter, bp /* &pMain */) + rc = vdbeSorterMergeTreeBuild(tls, pSorter, bp) if rc == SQLITE_OK { if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUseThreads != 0 { @@ -78236,7 +78241,7 @@ func vdbeSorterSetupMerge(tls *libc.TLS, pSorter uintptr) int32 { /* sqlite3.c:9 // Once the sorter has been populated by calls to sqlite3VdbeSorterWrite, // this function is called to prepare for iterating through the records // in sorted order. -func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:98264:20: */ +func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 { /* sqlite3.c:98274:20: */ var pSorter uintptr var rc int32 = SQLITE_OK // Return code @@ -78281,7 +78286,7 @@ func Xsqlite3VdbeSorterRewind(tls *libc.TLS, pCsr uintptr, pbEof uintptr) int32 // SQLITE_OK success // SQLITE_DONE end of data // otherwise some kind of error. -func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:98316:20: */ +func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* sqlite3.c:98326:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78300,7 +78305,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* } else { *(*int32)(unsafe.Pointer(bp /* res */)) = 0 - rc = vdbeMergeEngineStep(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger, bp /* &res */) + rc = vdbeMergeEngineStep(tls, (*VdbeSorter)(unsafe.Pointer(pSorter)).FpMerger, bp) if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) != 0 { rc = SQLITE_DONE } @@ -78323,7 +78328,7 @@ func Xsqlite3VdbeSorterNext(tls *libc.TLS, db uintptr, pCsr uintptr) int32 { /* // Return a pointer to a buffer owned by the sorter that contains the // current key. -func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:98354:13: */ +func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { /* sqlite3.c:98364:13: */ var pKey uintptr if (*VdbeSorter)(unsafe.Pointer(pSorter)).FbUsePMA != 0 { var pReader uintptr @@ -78342,7 +78347,7 @@ func vdbeSorterRowkey(tls *libc.TLS, pSorter uintptr, pnKey uintptr) uintptr { / } // Copy the current sorter key into the memory cell pOut. -func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:98381:20: */ +func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { /* sqlite3.c:98391:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78352,7 +78357,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // Sorter key to copy into pOut pSorter = *(*uintptr)(unsafe.Pointer(pCsr + 40)) - pKey = vdbeSorterRowkey(tls, pSorter, bp /* &nKey */) + pKey = vdbeSorterRowkey(tls, pSorter, bp) if Xsqlite3VdbeMemClearAndResize(tls, pOut, *(*int32)(unsafe.Pointer(bp))) != 0 { return SQLITE_NOMEM } @@ -78377,7 +78382,7 @@ func Xsqlite3VdbeSorterRowkey(tls *libc.TLS, pCsr uintptr, pOut uintptr) int32 { // // This routine forms the core of the OP_SorterCompare opcode, which in // turn is used to verify uniqueness when constructing a UNIQUE INDEX. -func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:98414:20: */ +func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCol int32, pRes uintptr) int32 { /* sqlite3.c:98424:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -78400,7 +78405,7 @@ func Xsqlite3VdbeSorterCompare(tls *libc.TLS, pCsr uintptr, pVal uintptr, nKeyCo (*UnpackedRecord)(unsafe.Pointer(r2)).FnField = U16(nKeyCol) } - pKey = vdbeSorterRowkey(tls, pSorter, bp /* &nKey */) + pKey = vdbeSorterRowkey(tls, pSorter, bp) Xsqlite3VdbeRecordUnpack(tls, pKeyInfo, *(*int32)(unsafe.Pointer(bp /* nKey */)), pKey, r2) for i = 0; i < nKeyCol; i++ { if int32((*Mem)(unsafe.Pointer((*UnpackedRecord)(unsafe.Pointer(r2)).FaMem+uintptr(i)*40)).Fflags)&MEM_Null != 0 { @@ -78468,7 +78473,7 @@ type MemJournal1 = struct { Fflags int32 FpVfs uintptr FzJournal uintptr -} /* sqlite3.c:98907:9 */ +} /* sqlite3.c:98917:9 */ //************* End of vdbesort.c ******************************************* //************* Begin file vdbevtab.c *************************************** @@ -78515,23 +78520,23 @@ type MemJournal1 = struct { // #include "sqliteInt.h" // Forward references to internal structures -type MemJournal = MemJournal1 /* sqlite3.c:98907:27 */ +type MemJournal = MemJournal1 /* sqlite3.c:98917:27 */ type FilePoint1 = struct { FiOffset Sqlite3_int64 FpChunk uintptr -} /* sqlite3.c:98907:9 */ +} /* sqlite3.c:98917:9 */ -type FilePoint = FilePoint1 /* sqlite3.c:98908:26 */ +type FilePoint = FilePoint1 /* sqlite3.c:98918:26 */ type FileChunk1 = struct { FpNext uintptr FzChunk [8]U8 -} /* sqlite3.c:98907:9 */ +} /* sqlite3.c:98917:9 */ -type FileChunk = FileChunk1 /* sqlite3.c:98909:26 */ +type FileChunk = FileChunk1 /* sqlite3.c:98919:26 */ // Read data from the in-memory journal file. This is the implementation // of the sqlite3_vfs.xRead method. -func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:98964:12: */ +func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:98974:12: */ var p uintptr = pJfd var zOut uintptr = zBuf var nRead int32 = iAmt @@ -78578,7 +78583,7 @@ func memjrnlRead(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Free the list of FileChunk structures headed at MemJournal.pFirst. -func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99011:13: */ +func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99021:13: */ var pIter uintptr var pNext uintptr for pIter = pFirst; pIter != 0; pIter = pNext { @@ -78588,7 +78593,7 @@ func memjrnlFreeChunks(tls *libc.TLS, pFirst uintptr) { /* sqlite3.c:99011:13: * } // Flush the contents of memory to a real file on disk. -func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99023:12: */ +func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99033:12: */ var rc int32 var pReal uintptr = p var copy = *(*MemJournal)(unsafe.Pointer(p)) @@ -78626,7 +78631,7 @@ func memjrnlCreateFile(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99023:12: } // Write data to the file. -func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99062:12: */ +func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:99072:12: */ var p uintptr = pJfd var nWrite int32 = iAmt var zWrite uintptr = zBuf @@ -78687,7 +78692,7 @@ func memjrnlWrite(tls *libc.TLS, pJfd uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate the in-memory file. -func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99136:12: */ +func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* sqlite3.c:99146:12: */ var p uintptr = pJfd if size < (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset { @@ -78697,7 +78702,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* (*MemJournal)(unsafe.Pointer(p)).FpFirst = uintptr(0) } else { var iOff I64 = I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) - for pIter = (*MemJournal)(unsafe.Pointer(p)).FpFirst; pIter != 0 && iOff <= size; pIter = (*FileChunk)(unsafe.Pointer(pIter)).FpNext { + for pIter = (*MemJournal)(unsafe.Pointer(p)).FpFirst; pIter != 0 && iOff < size; pIter = (*FileChunk)(unsafe.Pointer(pIter)).FpNext { iOff = iOff + I64((*MemJournal)(unsafe.Pointer(p)).FnChunkSize) } if pIter != 0 { @@ -78715,7 +78720,7 @@ func memjrnlTruncate(tls *libc.TLS, pJfd uintptr, size Sqlite_int64) int32 { /* } // Close the file. -func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99166:12: */ +func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99176:12: */ var p uintptr = pJfd memjrnlFreeChunks(tls, (*MemJournal)(unsafe.Pointer(p)).FpFirst) return SQLITE_OK @@ -78725,14 +78730,14 @@ func memjrnlClose(tls *libc.TLS, pJfd uintptr) int32 { /* sqlite3.c:99166:12: */ // // If the real file has been created, call its xSync method. Otherwise, // syncing an in-memory journal is a no-op. -func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99178:12: */ +func memjrnlSync(tls *libc.TLS, pJfd uintptr, flags int32) int32 { /* sqlite3.c:99188:12: */ _ = pJfd _ = flags return SQLITE_OK } // Query the size of the file in bytes. -func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99186:12: */ +func memjrnlFileSize(tls *libc.TLS, pJfd uintptr, pSize uintptr) int32 { /* sqlite3.c:99196:12: */ var p uintptr = pJfd *(*Sqlite_int64)(unsafe.Pointer(pSize)) = (*MemJournal)(unsafe.Pointer(p)).Fendpoint.FiOffset return SQLITE_OK @@ -78747,7 +78752,7 @@ var sMemJournalMethods = sqlite3_io_methods{ FxTruncate: 0, // xTruncate FxSync: 0, // xSync FxFileSize: 0, // xUnfetch -} /* sqlite3.c:99195:40 */ +} /* sqlite3.c:99205:40 */ // Open a journal file. // @@ -78759,7 +78764,7 @@ var sMemJournalMethods = sqlite3_io_methods{ // but may be flushed to disk later on. In this case the journal file is // flushed to disk either when it grows larger than nSpill bytes in size, // or when sqlite3JournalCreate() is called. -func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:99229:20: */ +func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintptr, flags int32, nSpill int32) int32 { /* sqlite3.c:99239:20: */ var p uintptr = pJfd // Zero the file-handle object. If nSpill was passed zero, initialize @@ -78787,20 +78792,20 @@ func Xsqlite3JournalOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pJfd uintpt } // Open an in-memory journal file. -func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:99265:21: */ +func Xsqlite3MemJournalOpen(tls *libc.TLS, pJfd uintptr) { /* sqlite3.c:99275:21: */ Xsqlite3JournalOpen(tls, uintptr(0), uintptr(0), pJfd, 0, -1) } // The file-handle passed as the only argument is open on a journal file. // Return true if this "journal file" is currently stored in heap memory, // or false otherwise. -func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99304:20: */ +func Xsqlite3JournalIsInMemory(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99314:20: */ return libc.Bool32((*Sqlite3_file)(unsafe.Pointer(p)).FpMethods == uintptr(unsafe.Pointer(&sMemJournalMethods))) } // Return the number of bytes required to store a JournalFile that uses vfs // pVfs to create the underlying on-disk files. -func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:99312:20: */ +func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:99322:20: */ return func() int32 { if (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile > int32(unsafe.Sizeof(MemJournal{})) { return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile @@ -78829,7 +78834,7 @@ func Xsqlite3JournalSize(tls *libc.TLS, pVfs uintptr) int32 { /* sqlite3.c:99312 // Walk all expressions linked into the list of Window objects passed // as the second argument. -func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:99342:12: */ +func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int32) int32 { /* sqlite3.c:99352:12: */ var pWin uintptr for pWin = pList; pWin != 0; pWin = (*Window)(unsafe.Pointer(pWin)).FpNextWin { var rc int32 @@ -78877,7 +78882,7 @@ func walkWindowList(tls *libc.TLS, pWalker uintptr, pList uintptr, bOneOnly int3 // // The return value from this routine is WRC_Abort to abandon the tree walk // and WRC_Continue to continue. -func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99381:28: */ +func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99391:28: */ var rc int32 for 1 != 0 { @@ -78919,7 +78924,7 @@ func walkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3. return WRC_Continue } -func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99413:20: */ +func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99423:20: */ if pExpr != 0 { return walkExpr(tls, pWalker, pExpr) } @@ -78928,7 +78933,7 @@ func Xsqlite3WalkExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Call sqlite3WalkExpr() for every expression in list p or until // an abort request is seen. -func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99421:20: */ +func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99431:20: */ var i int32 var pItem uintptr if p != 0 { @@ -78957,7 +78962,7 @@ func Xsqlite3WalkExprList(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // This is a no-op callback for Walker->xSelectCallback2. If this // callback is set, then the Select->pWinDefn list is traversed. -func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:99436:21: */ +func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:99446:21: */ _ = pWalker _ = p // No-op @@ -78967,7 +78972,7 @@ func Xsqlite3WalkWinDefnDummyCallback(tls *libc.TLS, pWalker uintptr, p uintptr) // not invoke the SELECT callback on p, but do (of course) invoke // any expr callbacks and SELECT callbacks that come from subqueries. // Return WRC_Abort or WRC_Continue. -func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99448:20: */ +func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99458:20: */ if Xsqlite3WalkExprList(tls, pWalker, (*Select)(unsafe.Pointer(p)).FpEList) != 0 { return WRC_Abort } @@ -79009,7 +79014,7 @@ func Xsqlite3WalkSelectExpr(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // callback on p, but do invoke it on each FROM clause subquery // and on any subqueries further down in the tree. Return // WRC_Abort or WRC_Continue; -func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99481:20: */ +func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99491:20: */ var pSrc uintptr var i int32 var pItem uintptr @@ -79058,7 +79063,7 @@ func Xsqlite3WalkSelectFrom(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { / // // If the Walker does not have an xSelectCallback() then this routine // is a no-op returning WRC_Continue. -func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99519:20: */ +func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:99529:20: */ var rc int32 if p == uintptr(0) { return WRC_Continue @@ -79089,13 +79094,13 @@ func Xsqlite3WalkSelect(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sq // Increase the walkerDepth when entering a subquery, and // descrease when leaving the subquery. -func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:99542:20: */ +func Xsqlite3WalkerDepthIncrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:99552:20: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth++ return WRC_Continue } -func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:99547:21: */ +func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:99557:21: */ _ = pSelect (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth-- } @@ -79107,7 +79112,7 @@ func Xsqlite3WalkerDepthDecrease(tls *libc.TLS, pWalker uintptr, pSelect uintptr // when this routine is used for Walker.xExprCallback then // Walker.xSelectCallback is set to do something useful for every // subquery in the parser tree. -func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:99562:20: */ +func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:99572:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79115,7 +79120,7 @@ func Xsqlite3ExprWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int3 // No-op routine for the parse-tree walker for SELECT statements. // subquery in the parser tree. -func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:99571:20: */ +func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) int32 { /* sqlite3.c:99581:20: */ _ = NotUsed _ = NotUsed2 return WRC_Continue @@ -79150,26 +79155,26 @@ func Xsqlite3SelectWalkNoop(tls *libc.TLS, NotUsed uintptr, NotUsed2 uintptr) in // is a helper function - a callback for the tree walker. // // See also the sqlite3WindowExtraAggFuncDepth() routine in window.c -func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99612:12: */ +func incrAggDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99622:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION { *(*U8)(unsafe.Pointer(pExpr + 2)) += U8(*(*int32)(unsafe.Pointer(pWalker + 24))) } return WRC_Continue } -func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:99616:13: */ +func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c:99626:13: */ bp := tls.Alloc(28) defer tls.Free(28) if N > 0 { // var w Walker at bp, 28 - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{incrAggDepth})) *(*int32)(unsafe.Pointer(bp + 24)) = N - Xsqlite3WalkExpr(tls, bp /* &w */, pExpr) + Xsqlite3WalkExpr(tls, bp, pExpr) } } @@ -79190,7 +79195,7 @@ func incrAggFunctionDepth(tls *libc.TLS, pExpr uintptr, N int32) { /* sqlite3.c: // zero but it might be more if the alias is contained within a subquery // of the original expression. The Expr.op2 field of TK_AGG_FUNCTION // structures must be increased by the nSubquery amount. -func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:99645:13: */ +func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pExpr uintptr, nSubquery int32) { /* sqlite3.c:99655:13: */ var pOrig uintptr // The iCol-th column of the result set var pDup uintptr // Copy of pOrig var db uintptr // The database connection @@ -79236,7 +79241,7 @@ func resolveAlias(tls *libc.TLS, pParse uintptr, pEList uintptr, iCol int32, pEx // // Return FALSE if the USING clause is NULL or if it does not contain // zCol. -func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:99702:12: */ +func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* sqlite3.c:99712:12: */ if pUsing != 0 { var k int32 for k = 0; k < (*IdList)(unsafe.Pointer(pUsing)).FnId; k++ { @@ -79253,7 +79258,7 @@ func nameInUsingClause(tls *libc.TLS, pUsing uintptr, zCol uintptr) int32 { /* s // Check to see if the zSpan given to this routine matches the zDb, zTab, // and zCol. If any of zDb, zTab, and zCol are NULL then those fields will // match anything. -func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:99719:20: */ +func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr, zDb uintptr) int32 { /* sqlite3.c:99729:20: */ var n int32 var zSpan uintptr if int32(*(*uint8)(unsafe.Pointer(pItem + 12))&0x3>>0) != ENAME_TAB { @@ -79279,7 +79284,7 @@ func Xsqlite3MatchEName(tls *libc.TLS, pItem uintptr, zCol uintptr, zTab uintptr } // Return TRUE if the double-quoted string mis-feature should be supported. -func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:99748:12: */ +func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) int32 { /* sqlite3.c:99758:12: */ if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { return 1 } // Always support for legacy schemas @@ -79298,7 +79303,7 @@ func areDoubleQuotedStringsEnabled(tls *libc.TLS, db uintptr, pTopNC uintptr) in // The argument is guaranteed to be a non-NULL Expr node of type TK_COLUMN. // return the appropriate colUsed mask. -func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:99766:24: */ +func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:99776:24: */ var n int32 var pExTab uintptr @@ -79348,7 +79353,7 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:99 // // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. -func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:99815:12: */ +func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:99825:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -79430,7 +79435,7 @@ __5: goto __6 __6: ; - if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6305, zDb) == 0) { + if !(i == (*Sqlite3)(unsafe.Pointer(db)).FnDb && Xsqlite3StrICmp(tls, ts+6327, zDb) == 0) { goto __8 } // This branch is taken when the main database has been renamed @@ -79637,14 +79642,14 @@ __40: ; goto __39 __38: - if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6310, zTab) == 0) { + if !(op != TK_DELETE && zTab != 0 && Xsqlite3StrICmp(tls, ts+6332, zTab) == 0) { goto __41 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 1 pTab = (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab goto __42 __41: - if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6314, zTab) == 0) { + if !(op != TK_INSERT && zTab != 0 && Xsqlite3StrICmp(tls, ts+6336, zTab) == 0) { goto __43 } (*Expr)(unsafe.Pointer(pExpr)).FiTable = 0 @@ -79661,7 +79666,7 @@ __37: goto __44 } pUpsert = *(*uintptr)(unsafe.Pointer(pNC + 8)) - if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6318, zTab) == 0) { + if !(pUpsert != 0 && Xsqlite3StrICmp(tls, ts+6340, zTab) == 0) { goto __45 } pTab = (*SrcItem)(unsafe.Pointer((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc + 8)).FpTab @@ -79755,7 +79760,7 @@ __60: goto __62 } - *(*U32)(unsafe.Pointer(pParse + 132)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 140)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -79765,7 +79770,7 @@ __60: __62: ; - *(*U32)(unsafe.Pointer(pParse + 136)) |= func() uint32 { + *(*U32)(unsafe.Pointer(pParse + 144)) |= func() uint32 { if iCol >= 32 { return 0xffffffff } @@ -79839,7 +79844,7 @@ __66: if !((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 && (*Expr)(unsafe.Pointer(pOrig)).Fflags&U32(EP_Agg) != U32(0)) { goto __70 } - Xsqlite3ErrorMsg(tls, pParse, ts+6327 /* "misuse of aliase..." */, libc.VaList(bp, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6349, libc.VaList(bp, zAs)) return WRC_Abort __70: ; @@ -79847,14 +79852,14 @@ __70: ((*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 || pNC != pTopNC)) { goto __71 } - Xsqlite3ErrorMsg(tls, pParse, ts+6358 /* "misuse of aliase..." */, libc.VaList(bp+8, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6380, libc.VaList(bp+8, zAs)) return WRC_Abort __71: ; if !(Xsqlite3ExprVectorSize(tls, pOrig) != 1) { goto __72 } - Xsqlite3ErrorMsg(tls, pParse, ts+6395 /* "row value misuse..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6417, 0) return WRC_Abort __72: ; @@ -79930,7 +79935,7 @@ __11: // a huge amount of legacy SQL that uses it. So for now, we just // issue a warning. Xsqlite3_log(tls, SQLITE_WARNING, - ts+6413 /* "double-quoted st..." */, libc.VaList(bp+16, zCol)) + ts+6435, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) libc.Xmemset(tls, pExpr+44, 0, uint32(unsafe.Sizeof(struct { FpTab uintptr @@ -79954,23 +79959,23 @@ __75: goto __78 } if cnt == 0 { - zErr = ts + 6448 /* "no such column" */ + zErr = ts + 6470 /* "no such column" */ } else { - zErr = ts + 6463 /* "ambiguous column..." */ + zErr = ts + 6485 /* "ambiguous column..." */ } if !(zDb != 0) { goto __79 } - Xsqlite3ErrorMsg(tls, pParse, ts+6485 /* "%s: %s.%s.%s" */, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6507, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __80 __79: if !(zTab != 0) { goto __81 } - Xsqlite3ErrorMsg(tls, pParse, ts+6498 /* "%s: %s.%s" */, libc.VaList(bp+56, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6520, libc.VaList(bp+56, zErr, zTab, zCol)) goto __82 __81: - Xsqlite3ErrorMsg(tls, pParse, ts+6508 /* "%s: %s" */, libc.VaList(bp+80, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6530, libc.VaList(bp+80, zErr, zCol)) __82: ; __80: @@ -80053,7 +80058,7 @@ __86: // Allocate and return a pointer to an expression to load the column iCol // from datasource iSrc in SrcList pSrc. -func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:100258:21: */ +func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int32, iCol int32) uintptr { /* sqlite3.c:100268:21: */ var p uintptr = Xsqlite3ExprAlloc(tls, db, TK_COLUMN, uintptr(0), 0) if p != 0 { var pItem uintptr = pSrc + 8 + uintptr(iSrc)*72 @@ -80102,19 +80107,19 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // As an optimization, since the conditional is almost always false // (because errors are rare), the conditional is moved outside of the // function call using a macro. -func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr) { /* sqlite3.c:100302:13: */ +func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr) { /* sqlite3.c:100312:13: */ bp := tls.Alloc(16) defer tls.Free(16) - var zIn uintptr = ts + 6515 /* "partial index WH..." */ + var zIn uintptr = ts + 6537 /* "partial index WH..." */ if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IdxExpr != 0 { - zIn = ts + 6543 /* "index expression..." */ + zIn = ts + 6565 /* "index expression..." */ } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_IsCheck != 0 { - zIn = ts + 6561 /* "CHECK constraint..." */ + zIn = ts + 6583 /* "CHECK constraint..." */ } else if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_GenCol != 0 { - zIn = ts + 6579 /* "generated column..." */ + zIn = ts + 6601 /* "generated column..." */ } - Xsqlite3ErrorMsg(tls, pParse, ts+6597 /* "%s prohibited in..." */, libc.VaList(bp, zMsg, zIn)) + Xsqlite3ErrorMsg(tls, pParse, ts+6619, libc.VaList(bp, zMsg, zIn)) if pExpr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } @@ -80123,7 +80128,7 @@ func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExp // Expression p should encode a floating point value between 1.0 and 0.0. // Return 1024 times this value. Or return -1 if p is not a floating point // value between 1.0 and 0.0. -func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100328:12: */ +func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100338:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80132,7 +80137,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100328:12: * return -1 } - Xsqlite3AtoF(tls, *(*uintptr)(unsafe.Pointer(p + 8)), bp /* &r */, Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(p + 8))), uint8(SQLITE_UTF8)) + Xsqlite3AtoF(tls, *(*uintptr)(unsafe.Pointer(p + 8)), bp, Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(p + 8))), uint8(SQLITE_UTF8)) if *(*float64)(unsafe.Pointer(bp)) > 1.0 { return -1 @@ -80149,7 +80154,7 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:100328:12: * // This routine also does error checking and name resolution for // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. -func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100349:12: */ +func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:100359:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -80210,7 +80215,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s goto __3 } { - *(*int32)(unsafe.Pointer(bp + 96 /* &anRef[0] */ + uintptr(i)*4)) = (*NameContext)(unsafe.Pointer(p)).FnRef + *(*int32)(unsafe.Pointer(bp + 96 + uintptr(i)*4)) = (*NameContext)(unsafe.Pointer(p)).FnRef } goto __2 @@ -80225,10 +80230,10 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s if 0 == Xsqlite3ExprCanBeNull(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_NOTNULL { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6617 /* "true" */ + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6639 /* "true" */ *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsTrue) } else { - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6622 /* "false" */ + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6644 /* "false" */ *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) } (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) @@ -80239,7 +80244,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s goto __6 } { - (*NameContext)(unsafe.Pointer(p)).FnRef = *(*int32)(unsafe.Pointer(bp + 96 /* &anRef[0] */ + uintptr(i)*4)) + (*NameContext)(unsafe.Pointer(p)).FnRef = *(*int32)(unsafe.Pointer(bp + 96 + uintptr(i)*4)) } goto __5 @@ -80282,7 +80287,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6628 /* "the \".\" operator" */, uintptr(0)) + notValidImpl(tls, pParse, pNC, ts+6650, uintptr(0)) } pRight = (*Expr)(unsafe.Pointer(pExpr)).FpRight @@ -80351,7 +80356,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s if (*Expr)(unsafe.Pointer(pExpr)).FiTable < 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6645 /* "second argument ..." */, 0) + ts+6667, 0) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } } else { @@ -80376,7 +80381,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s var auth int32 = Xsqlite3AuthCheck(tls, pParse, SQLITE_FUNCTION, uintptr(0), (*FuncDef)(unsafe.Pointer(pDef)).FzName, uintptr(0)) if auth != SQLITE_OK { if auth == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+6716, /* "not authorized t..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+6738, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(pDef)).FzName)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -80400,7 +80405,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // in a CHECK constraint. SQLServer, MySQL, and PostgreSQL all // all this. if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IdxExpr|NC_PartIdx|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6751 /* "non-deterministi..." */, uintptr(0)) + notValidImpl(tls, pParse, pNC, ts+6773, uintptr(0)) } } else { @@ -80429,30 +80434,30 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s if pDef != 0 && (*FuncDef)(unsafe.Pointer(pDef)).FxValue == uintptr(0) && pWin != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+6779 /* "%.*s() may not b..." */, libc.VaList(bp+8, nId, zId)) + ts+6801, libc.VaList(bp+8, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if is_agg != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowAgg == 0 || is_agg != 0 && (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 && !(pWin != 0) || is_agg != 0 && pWin != 0 && (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_AllowWin == 0 { var zType uintptr if (*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 || pWin != 0 { - zType = ts + 6823 /* "window" */ + zType = ts + 6845 /* "window" */ } else { - zType = ts + 6830 /* "aggregate" */ + zType = ts + 6852 /* "aggregate" */ } - Xsqlite3ErrorMsg(tls, pParse, ts+6840 /* "misuse of %s fun..." */, libc.VaList(bp+24, zType, nId, zId)) + Xsqlite3ErrorMsg(tls, pParse, ts+6862, libc.VaList(bp+24, zType, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ is_agg = 0 } else if no_such_func != 0 && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6869 /* "no such function..." */, libc.VaList(bp+48, nId, zId)) + Xsqlite3ErrorMsg(tls, pParse, ts+6891, libc.VaList(bp+48, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6892, /* "wrong number of ..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+6914, libc.VaList(bp+64, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if is_agg == 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+6937, /* "FILTER may not b..." */ + ts+6959, libc.VaList(bp+80, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } @@ -80530,7 +80535,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s var nRef int32 = (*NameContext)(unsafe.Pointer(pNC)).FnRef if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&NC_SelfRef != 0 { - notValidImpl(tls, pParse, pNC, ts+6986 /* "subqueries" */, pExpr) + notValidImpl(tls, pParse, pNC, ts+7008, pExpr) } else { Xsqlite3WalkSelect(tls, pWalker, *(*uintptr)(unsafe.Pointer(pExpr + 20))) } @@ -80547,7 +80552,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s { if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_IsCheck|NC_PartIdx|NC_IdxExpr|NC_GenCol) != 0 { - notValidImpl(tls, pParse, pNC, ts+6997 /* "parameters" */, pExpr) + notValidImpl(tls, pParse, pNC, ts+7019, pExpr) } break @@ -80608,7 +80613,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s } if nLeft != nRight { - Xsqlite3ErrorMsg(tls, pParse, ts+6395 /* "row value misuse..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6417, 0) } break @@ -80630,7 +80635,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s // return 0. // // pEList has been resolved. pE has not. -func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:100807:12: */ +func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) int32 { /* sqlite3.c:100817:12: */ var i int32 // Loop counter _ = pParse @@ -80665,7 +80670,7 @@ func resolveAsName(tls *libc.TLS, pParse uintptr, pEList uintptr, pE uintptr) in // the column. // // If there is no match, return 0. Return -1 if an error occurs. -func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:100849:12: */ +func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr, pE uintptr) int32 { /* sqlite3.c:100859:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -80680,7 +80685,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList // Resolve all names in the ORDER BY term expression - libc.Xmemset(tls, bp /* &nc */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &nc */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp /* &nc */)).FpSrcList = (*Select)(unsafe.Pointer(pSelect)).FpSrc *(*uintptr)(unsafe.Pointer(bp + 8)) = pEList @@ -80689,7 +80694,7 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr db = (*Parse)(unsafe.Pointer(pParse)).Fdb savedSuppErr = (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = U8(1) - rc = Xsqlite3ResolveExprNames(tls, bp /* &nc */, pE) + rc = Xsqlite3ResolveExprNames(tls, bp, pE) (*Sqlite3)(unsafe.Pointer(db)).FsuppressErr = savedSuppErr if rc != 0 { return 0 @@ -80709,13 +80714,13 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr } // Generate an ORDER BY or GROUP BY term out-of-range error. -func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32) { /* sqlite3.c:100896:13: */ +func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32) { /* sqlite3.c:100906:13: */ bp := tls.Alloc(24) defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, - ts+7008 /* "%r %s BY term ou..." */, libc.VaList(bp, i, zType, mx)) + ts+7030, libc.VaList(bp, i, zType, mx)) } // Analyze the ORDER BY clause in a compound SELECT statement. Modify @@ -80731,7 +80736,7 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // the integer column number. // // Return the number of errors seen. -func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:100922:12: */ +func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:100932:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -80747,7 +80752,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } db = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 112 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7064 /* "too many terms i..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7086, 0) return 1 } for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { @@ -80782,7 +80787,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 } if Xsqlite3ExprIsInteger(tls, pE, bp+8) != 0 { if *(*int32)(unsafe.Pointer(bp + 8)) <= 0 || *(*int32)(unsafe.Pointer(bp + 8)) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr { - resolveOutOfRangeError(tls, pParse, ts+7098 /* "ORDER" */, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr) + resolveOutOfRangeError(tls, pParse, ts+7120, i+1, (*ExprList)(unsafe.Pointer(pEList)).FnExpr) return 1 } } else { @@ -80853,7 +80858,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr; i++ { if int32(*(*uint8)(unsafe.Pointer(pOrderBy + 8 + uintptr(i)*20 + 12))&0x4>>2) == 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+7104 /* "%r ORDER BY term..." */, libc.VaList(bp, i+1)) + ts+7126, libc.VaList(bp, i+1)) return 1 } } @@ -80868,7 +80873,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. -func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101035:20: */ +func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101045:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -80881,7 +80886,7 @@ func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, return 0 } if (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr > *(*int32)(unsafe.Pointer(db + 112 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7165 /* "too many terms i..." */, libc.VaList(bp, zType)) + Xsqlite3ErrorMsg(tls, pParse, ts+7187, libc.VaList(bp, zType)) return 1 } pEList = (*Select)(unsafe.Pointer(pSelect)).FpEList @@ -80914,7 +80919,7 @@ __3: } // Walker callback for windowRemoveExprFromSelect(). -func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101069:12: */ +func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:101079:12: */ _ = pWalker if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 44)) @@ -80925,19 +80930,19 @@ func resolveRemoveWindowsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 // Remove any Window objects owned by the expression pExpr from the // Select.pWin list of Select object pSelect. -func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101082:13: */ +func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { /* sqlite3.c:101092:13: */ bp := tls.Alloc(28) defer tls.Free(28) if (*Select)(unsafe.Pointer(pSelect)).FpWin != 0 { // var sWalker Walker at bp, 28 - libc.Xmemset(tls, bp /* &sWalker */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{resolveRemoveWindowsCb})) *(*uintptr)(unsafe.Pointer(bp + 24)) = pSelect - Xsqlite3WalkExpr(tls, bp /* &sWalker */, pExpr) + Xsqlite3WalkExpr(tls, bp, pExpr) } } @@ -80957,7 +80962,7 @@ func windowRemoveExprFromSelect(tls *libc.TLS, pSelect uintptr, pExpr uintptr) { // This routine returns the number of errors. If errors occur, then // an appropriate error message might be left in pParse. (OOM errors // excepted.) -func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101113:12: */ +func resolveOrderGroupBy(tls *libc.TLS, pNC uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:101123:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -81034,7 +81039,7 @@ __3: } // Resolve names in the SELECT statement p and all of its descendants. -func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101176:12: */ +func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:101186:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -81081,7 +81086,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // Resolve the expressions in the LIMIT and OFFSET clauses. These // are not allowed to refer to any names, so pass an empty NameContext. - libc.Xmemset(tls, bp /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpWinSelect = p if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpLimit) != 0 { @@ -81170,7 +81175,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 24)) |= NC_UEList if (*Select)(unsafe.Pointer(p)).FpHaving != 0 { if !(pGroupBy != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7196 /* "a GROUP BY claus..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7218, 0) return WRC_Abort } if Xsqlite3ResolveExprNames(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) != 0 { @@ -81227,7 +81232,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // resolve those symbols on the incorrect ORDER BY for consistency. if (*Select)(unsafe.Pointer(p)).FpOrderBy != uintptr(0) && isCompound <= nCompound && - resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7098) != 0 { + resolveOrderGroupBy(tls, bp, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7120) != 0 { return WRC_Abort } if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -81240,7 +81245,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql if pGroupBy != 0 { var pItem uintptr - if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7240) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + if resolveOrderGroupBy(tls, bp, p, pGroupBy, ts+7262) != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return WRC_Abort } i = 0 @@ -81252,7 +81257,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql { if (*Expr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pItem)).FpExpr)).Fflags&U32(EP_Agg) != U32(0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7246 /* "aggregate functi..." */, 0) + ts+7268, 0) return WRC_Abort } @@ -81333,7 +81338,7 @@ func resolveSelectStep(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sql // // An error message is left in pParse if anything is amiss. The number // if errors is returned. -func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:101463:20: */ +func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:101473:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81359,12 +81364,12 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { }() (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24)) = pNC - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 204)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 212)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight if Xsqlite3ExprCheckHeight(tls, (*Walker)(unsafe.Pointer(bp)).FpParse, (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnHeight) != 0 { return SQLITE_ERROR } - Xsqlite3WalkExpr(tls, bp /* &w */, pExpr) - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 204)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + Xsqlite3WalkExpr(tls, bp, pExpr) + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 212)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) *(*int32)(unsafe.Pointer(pNC + 24)) |= savedHasAgg @@ -81374,7 +81379,7 @@ func Xsqlite3ResolveExprNames(tls *libc.TLS, pNC uintptr, pExpr uintptr) int32 { // Resolve all names for all expression in an expression list. This is // just like sqlite3ResolveExprNames() except that it works for an expression // list rather than a single expression. -func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:101502:20: */ +func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int32 { /* sqlite3.c:101512:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81401,12 +81406,12 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int if pExpr == uintptr(0) { continue } - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 204)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 212)) += (*Expr)(unsafe.Pointer(pExpr)).FnHeight if Xsqlite3ExprCheckHeight(tls, (*Walker)(unsafe.Pointer(bp)).FpParse, (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse)).FnHeight) != 0 { return WRC_Abort } - Xsqlite3WalkExpr(tls, bp /* &w */, pExpr) - *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 204)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight + Xsqlite3WalkExpr(tls, bp, pExpr) + *(*int32)(unsafe.Pointer((*Walker)(unsafe.Pointer(bp)).FpParse + 212)) -= (*Expr)(unsafe.Pointer(pExpr)).FnHeight if (*NameContext)(unsafe.Pointer(pNC)).FncFlags&(NC_HasAgg|NC_MinMaxAgg|NC_HasWin|NC_OrderAgg) != 0 { *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32((*NameContext)(unsafe.Pointer(pNC)).FncFlags & (NC_HasAgg | NC_HasWin)) @@ -81431,7 +81436,7 @@ func Xsqlite3ResolveExprListNames(tls *libc.TLS, pNC uintptr, pList uintptr) int // // All SELECT statements should have been expanded using // sqlite3SelectExpand() prior to invoking this routine. -func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:101558:21: */ +func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:101568:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -81446,7 +81451,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse *(*uintptr)(unsafe.Pointer(bp + 24)) = pOuterNC - Xsqlite3WalkSelect(tls, bp /* &w */, p) + Xsqlite3WalkSelect(tls, bp, p) } // Resolve names in expressions that can only reference a single table @@ -81465,7 +81470,7 @@ func Xsqlite3ResolveSelectNames(tls *libc.TLS, pParse uintptr, p uintptr, pOuter // set to the column number. In case (4), TK_COLUMN nodes cause an error. // // Any errors cause an error message to be set in pParse. -func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:101592:20: */ +func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, type1 int32, pExpr uintptr, pList uintptr) int32 { /* sqlite3.c:101602:20: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -81475,8 +81480,8 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t // Name context for pParse->pNewTable var rc int32 - libc.Xmemset(tls, bp /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) - libc.Xmemset(tls, bp+32 /* &sSrc */, 0, uint32(unsafe.Sizeof(SrcList{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+32, 0, uint32(unsafe.Sizeof(SrcList{}))) if pTab != 0 { (*SrcList)(unsafe.Pointer(bp + 32 /* &sSrc */)).FnSrc = 1 (*SrcItem)(unsafe.Pointer(bp + 32 + 8)).FzName = (*Table)(unsafe.Pointer(pTab)).FzName @@ -81495,13 +81500,13 @@ func Xsqlite3ResolveSelfReference(tls *libc.TLS, pParse uintptr, pTab uintptr, t return rc } if pList != 0 { - rc = Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, pList) + rc = Xsqlite3ResolveExprListNames(tls, bp, pList) } return rc } // Return the affinity character for a single column of a table. -func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:101652:21: */ +func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { /* sqlite3.c:101662:21: */ if iCol < 0 || iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { return int8(SQLITE_AFF_INTEGER) } @@ -81522,7 +81527,7 @@ func Xsqlite3TableColumnAffinity(tls *libc.TLS, pTab uintptr, iCol int32) int8 { // SELECT * FROM t1 WHERE a; // SELECT a AS b FROM t1 WHERE b; // SELECT * FROM t1 WHERE (select a from t1); -func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:101673:21: */ +func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:101683:21: */ var op int32 for (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_IfNullRow) != U32(0) { @@ -81565,7 +81570,7 @@ func Xsqlite3ExprAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:1016 // // If a memory allocation error occurs, that fact is recorded in pParse->db // and the pExpr parameter is returned unchanged. -func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:101726:21: */ +func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, pCollName uintptr, dequote int32) uintptr { /* sqlite3.c:101736:21: */ if (*Token)(unsafe.Pointer(pCollName)).Fn > uint32(0) { var pNew uintptr = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_COLLATE, pCollName, dequote) if pNew != 0 { @@ -81577,18 +81582,18 @@ func Xsqlite3ExprAddCollateToken(tls *libc.TLS, pParse uintptr, pExpr uintptr, p return pExpr } -func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:101742:21: */ +func Xsqlite3ExprAddCollateString(tls *libc.TLS, pParse uintptr, pExpr uintptr, zC uintptr) uintptr { /* sqlite3.c:101752:21: */ bp := tls.Alloc(8) defer tls.Free(8) // var s Token at bp, 8 - Xsqlite3TokenInit(tls, bp /* &s */, zC) - return Xsqlite3ExprAddCollateToken(tls, pParse, pExpr, bp /* &s */, 0) + Xsqlite3TokenInit(tls, bp, zC) + return Xsqlite3ExprAddCollateToken(tls, pParse, pExpr, bp, 0) } // Skip over any TK_COLLATE operators. -func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:101756:21: */ +func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:101766:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip) != U32(0) { pExpr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft @@ -81599,7 +81604,7 @@ func Xsqlite3ExprSkipCollate(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3. // Skip over any TK_COLLATE operators and/or any unlikely() // or likelihood() or likely() functions at the root of an // expression. -func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:101769:21: */ +func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:101779:21: */ for pExpr != 0 && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Skip|EP_Unlikely) != U32(0) { if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Unlikely) != U32(0) { @@ -81624,7 +81629,7 @@ func Xsqlite3ExprSkipCollateAndLikely(tls *libc.TLS, pExpr uintptr) uintptr { /* // or by the presence of a column with a defined collating sequence. // COLLATE operators take first precedence. Left operands take // precedence over right operands. -func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:101798:24: */ +func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:101808:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pColl uintptr = uintptr(0) var p uintptr = pExpr @@ -81696,7 +81701,7 @@ func Xsqlite3ExprCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { // // The sqlite3ExprCollSeq() routine works the same except that it // returns NULL if there is no defined collation. -func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:101871:24: */ +func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:101881:24: */ var p uintptr = Xsqlite3ExprCollSeq(tls, pParse, pExpr) if p == uintptr(0) { p = (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FpDfltColl @@ -81706,7 +81711,7 @@ func Xsqlite3ExprNNCollSeq(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr } // Return TRUE if the two expressions have equivalent collating sequences. -func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:101881:20: */ +func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr) int32 { /* sqlite3.c:101891:20: */ var pColl1 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE1) var pColl2 uintptr = Xsqlite3ExprNNCollSeq(tls, pParse, pE2) return libc.Bool32(Xsqlite3StrICmp(tls, (*CollSeq)(unsafe.Pointer(pColl1)).FzName, (*CollSeq)(unsafe.Pointer(pColl2)).FzName) == 0) @@ -81715,7 +81720,7 @@ func Xsqlite3ExprCollSeqMatch(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 ui // pExpr is an operand of a comparison operator. aff2 is the // type affinity of the other operand. This routine returns the // type affinity that should be used for the comparison operator. -func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:101892:21: */ +func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* sqlite3.c:101902:21: */ var aff1 int8 = Xsqlite3ExprAffinity(tls, pExpr) if int32(aff1) > SQLITE_AFF_NONE && int32(aff2) > SQLITE_AFF_NONE { // Both sides of the comparison are columns. If one has numeric @@ -81740,7 +81745,7 @@ func Xsqlite3CompareAffinity(tls *libc.TLS, pExpr uintptr, aff2 int8) int8 { /* // pExpr is a comparison operator. Return the type affinity that should // be applied to both operands prior to doing the comparison. -func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:101914:13: */ +func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:101924:13: */ var aff int8 aff = Xsqlite3ExprAffinity(tls, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) @@ -81758,7 +81763,7 @@ func comparisonAffinity(tls *libc.TLS, pExpr uintptr) int8 { /* sqlite3.c:101914 // idx_affinity is the affinity of an indexed column. Return true // if the index with affinity idx_affinity may be used to implement // the comparison in pExpr. -func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:101937:20: */ +func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) int32 { /* sqlite3.c:101947:20: */ var aff int8 = comparisonAffinity(tls, pExpr) if int32(aff) < SQLITE_AFF_TEXT { return 1 @@ -81771,7 +81776,7 @@ func Xsqlite3IndexAffinityOk(tls *libc.TLS, pExpr uintptr, idx_affinity int8) in // Return the P5 value that should be used for a binary comparison // opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2. -func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:101952:11: */ +func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull int32) U8 { /* sqlite3.c:101962:11: */ var aff U8 = U8(Xsqlite3ExprAffinity(tls, pExpr2)) aff = U8(int32(U8(Xsqlite3CompareAffinity(tls, pExpr1, int8(aff)))) | int32(U8(jumpIfNull))) return aff @@ -81787,7 +81792,7 @@ func binaryCompareP5(tls *libc.TLS, pExpr1 uintptr, pExpr2 uintptr, jumpIfNull i // // Argument pRight (but not pLeft) may be a null pointer. In this case, // it is not considered. -func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:101974:24: */ +func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:101984:24: */ var pColl uintptr if (*Expr)(unsafe.Pointer(pLeft)).Fflags&U32(EP_Collate) != 0 { @@ -81810,7 +81815,7 @@ func Xsqlite3BinaryCompareCollSeq(tls *libc.TLS, pParse uintptr, pLeft uintptr, // However, if the OP_Commuted flag is set, then the order of the operands // is reversed in the sqlite3BinaryCompareCollSeq() call so that the // correct collating sequence is found. -func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102002:24: */ +func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:102012:24: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Commuted) != U32(0) { return Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(p)).FpRight, (*Expr)(unsafe.Pointer(p)).FpLeft) } else { @@ -81820,7 +81825,7 @@ func Xsqlite3ExprCompareCollSeq(tls *libc.TLS, pParse uintptr, p uintptr) uintpt } // Generate code for a comparison operator. -func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102013:12: */ +func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, opcode int32, in1 int32, in2 int32, dest int32, jumpIfNull int32, isCommuted int32) int32 { /* sqlite3.c:102023:12: */ var p5 int32 var addr int32 var p4 uintptr @@ -81847,7 +81852,7 @@ func codeCompare(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr, o // parser will not generate a TK_VECTOR with fewer than two entries. // But a TK_SELECT might be either a vector or a scalar. It is only // considered a vector if it has two or more result columns. -func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102049:20: */ +func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102059:20: */ return libc.Bool32(Xsqlite3ExprVectorSize(tls, pExpr) > 1) } @@ -81855,7 +81860,7 @@ func Xsqlite3ExprIsVector(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102 // return the number of expressions in the vector. Or, if the expression // is a sub-select, return the number of columns in the sub-select. For // any other type of expression, return 1. -func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102059:20: */ +func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:102069:20: */ var op U8 = (*Expr)(unsafe.Pointer(pExpr)).Fop if int32(op) == TK_REGISTER { op = (*Expr)(unsafe.Pointer(pExpr)).Fop2 @@ -81885,7 +81890,7 @@ func Xsqlite3ExprVectorSize(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // just the expression for the i-th term of the result set, and may // not be ready for evaluation because the table cursor has not yet // been positioned. -func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102088:21: */ +func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr { /* sqlite3.c:102098:21: */ if Xsqlite3ExprIsVector(tls, pVector) != 0 { @@ -81919,7 +81924,7 @@ func Xsqlite3VectorFieldSubexpr(tls *libc.TLS, pVector uintptr, i int32) uintptr // A trick to cause a TK_SELECT pVector to be deleted together with // the returned Expr object is to attach the pVector to the pRight field // of the returned TK_SELECT_COLUMN Expr object. -func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102124:21: */ +func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, nField int32) uintptr { /* sqlite3.c:102134:21: */ var pRet uintptr if int32((*Expr)(unsafe.Pointer(pVector)).Fop) == TK_SELECT { @@ -81967,7 +81972,7 @@ func Xsqlite3ExprForVectorField(tls *libc.TLS, pParse uintptr, pVector uintptr, // of registers in which the result is stored). // // If pExpr is not a TK_SELECT expression, return 0. -func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102180:12: */ +func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:102190:12: */ var reg int32 = 0 if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { reg = Xsqlite3CodeSubselect(tls, pParse, pExpr) @@ -81991,7 +81996,7 @@ func exprCodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // // Before returning, output parameter (*ppExpr) is set to point to the // Expr object corresponding to element iElem of the vector. -func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:102208:12: */ +func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField int32, regSelect int32, ppExpr uintptr, pRegFree uintptr) int32 { /* sqlite3.c:102218:12: */ var op U8 = (*Expr)(unsafe.Pointer(pVector)).Fop if int32(op) == TK_REGISTER { @@ -82020,7 +82025,7 @@ func exprVectorRegister(tls *libc.TLS, pParse uintptr, pVector uintptr, iField i // if pExpr->op==TK_IS: op==TK_EQ and p5==SQLITE_NULLEQ // if pExpr->op==TK_ISNOT: op==TK_NE and p5==SQLITE_NULLEQ // otherwise: op==pExpr->op and p5==0 -func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:102246:13: */ +func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, op U8, p5 U8) { /* sqlite3.c:102256:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82040,7 +82045,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, return } if nLeft != Xsqlite3ExprVectorSize(tls, pRight) { - Xsqlite3ErrorMsg(tls, pParse, ts+6395 /* "row value misuse..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6417, 0) return } @@ -82069,8 +82074,8 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, if addrCmp != 0 { Xsqlite3VdbeJumpHere(tls, v, addrCmp) } - r1 = exprVectorRegister(tls, pParse, pLeft, i, regLeft, bp /* &pL */, bp+4 /* ®Free1 */) - r2 = exprVectorRegister(tls, pParse, pRight, i, regRight, bp+8 /* &pR */, bp+12 /* ®Free2 */) + r1 = exprVectorRegister(tls, pParse, pLeft, i, regLeft, bp, bp+4) + r2 = exprVectorRegister(tls, pParse, pRight, i, regRight, bp+8, bp+12) addrCmp = Xsqlite3VdbeCurrentAddr(tls, v) codeCompare(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pL */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* pR */)), int32(opx), r1, r2, addrDone, int32(p5), isCommuted) @@ -82108,7 +82113,7 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // Check that argument nHeight is less than or equal to the maximum // expression depth allowed. If it is not, leave an error message in // pParse. -func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:102341:20: */ +func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:102351:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82116,7 +82121,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 var mxHeight int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 112 + 3*4)) if nHeight > mxHeight { Xsqlite3ErrorMsg(tls, pParse, - ts+7305 /* "Expression tree ..." */, libc.VaList(bp, mxHeight)) + ts+7327, libc.VaList(bp, mxHeight)) rc = SQLITE_ERROR } return rc @@ -82130,7 +82135,7 @@ func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 // If this maximum height is greater than the current value pointed // to by pnHeight, the second parameter, then set *pnHeight to that // value. -func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:102362:13: */ +func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:102372:13: */ if p != 0 { if (*Expr)(unsafe.Pointer(p)).FnHeight > *(*int32)(unsafe.Pointer(pnHeight)) { *(*int32)(unsafe.Pointer(pnHeight)) = (*Expr)(unsafe.Pointer(p)).FnHeight @@ -82138,7 +82143,7 @@ func heightOfExpr(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:102 } } -func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:102369:13: */ +func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c:102379:13: */ if p != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(p)).FnExpr; i++ { @@ -82147,7 +82152,7 @@ func heightOfExprList(tls *libc.TLS, p uintptr, pnHeight uintptr) { /* sqlite3.c } } -func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:102377:13: */ +func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlite3.c:102387:13: */ var p uintptr for p = pSelect; p != 0; p = (*Select)(unsafe.Pointer(p)).FpPrior { heightOfExpr(tls, (*Select)(unsafe.Pointer(p)).FpWhere, pnHeight) @@ -82167,17 +82172,17 @@ func heightOfSelect(tls *libc.TLS, pSelect uintptr, pnHeight uintptr) { /* sqlit // // Also propagate EP_Propagate flags up from Expr.x.pList to Expr.flags, // if appropriate. -func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:102399:13: */ +func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:102409:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* nHeight */)) = 0 - heightOfExpr(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, bp /* &nHeight */) - heightOfExpr(tls, (*Expr)(unsafe.Pointer(p)).FpRight, bp /* &nHeight */) + heightOfExpr(tls, (*Expr)(unsafe.Pointer(p)).FpLeft, bp) + heightOfExpr(tls, (*Expr)(unsafe.Pointer(p)).FpRight, bp) if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { - heightOfSelect(tls, *(*uintptr)(unsafe.Pointer(p + 20)), bp /* &nHeight */) + heightOfSelect(tls, *(*uintptr)(unsafe.Pointer(p + 20)), bp) } else if *(*uintptr)(unsafe.Pointer(p + 20)) != 0 { - heightOfExprList(tls, *(*uintptr)(unsafe.Pointer(p + 20)), bp /* &nHeight */) + heightOfExprList(tls, *(*uintptr)(unsafe.Pointer(p + 20)), bp) *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_Collate|EP_Subquery|EP_HasFunc) & Xsqlite3ExprListFlags(tls, *(*uintptr)(unsafe.Pointer(p + 20))) } (*Expr)(unsafe.Pointer(p)).FnHeight = *(*int32)(unsafe.Pointer(bp)) + 1 @@ -82189,7 +82194,7 @@ func exprSetHeight(tls *libc.TLS, p uintptr) { /* sqlite3.c:102399:13: */ // // Also propagate all EP_Propagate flags from the Expr.x.pList into // Expr.flags. -func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:102420:21: */ +func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:102430:21: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -82199,12 +82204,12 @@ func Xsqlite3ExprSetHeightAndFlags(tls *libc.TLS, pParse uintptr, p uintptr) { / // Return the maximum height of any expression tree referenced // by the select statement passed as an argument. -func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102430:20: */ +func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102440:20: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* nHeight */)) = 0 - heightOfSelect(tls, p, bp /* &nHeight */) + heightOfSelect(tls, p, bp) return *(*int32)(unsafe.Pointer(bp /* nHeight */)) } @@ -82226,7 +82231,7 @@ func Xsqlite3SelectExprHeight(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102 // stored in u.zToken. Instead, the integer values is written // into u.iValue and the EP_IntValue flag is set. No extra storage // is allocated to hold the integer text and the dequote flag is ignored. -func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:102469:21: */ +func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequote int32) uintptr { /* sqlite3.c:102479:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82274,7 +82279,7 @@ func Xsqlite3ExprAlloc(tls *libc.TLS, db uintptr, op int32, pToken uintptr, dequ // Allocate a new expression node from a zero-terminated token that has // already been dequoted. -func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:102517:21: */ +func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { /* sqlite3.c:102527:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82282,14 +82287,14 @@ func Xsqlite3Expr(tls *libc.TLS, db uintptr, op int32, zToken uintptr) uintptr { (*Token)(unsafe.Pointer(bp /* &x */)).Fz = zToken (*Token)(unsafe.Pointer(bp /* &x */)).Fn = uint32(Xsqlite3Strlen30(tls, zToken)) - return Xsqlite3ExprAlloc(tls, db, op, bp /* &x */, 0) + return Xsqlite3ExprAlloc(tls, db, op, bp, 0) } // Attach subtrees pLeft and pRight to the Expr node pRoot. // // If pRoot==NULL that means that a memory allocation error has occurred. // In that case, delete the subtrees pLeft and pRight. -func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:102534:21: */ +func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft uintptr, pRight uintptr) { /* sqlite3.c:102544:21: */ if pRoot == uintptr(0) { Xsqlite3ExprDelete(tls, db, pLeft) @@ -82312,7 +82317,7 @@ func Xsqlite3ExprAttachSubtrees(tls *libc.TLS, db uintptr, pRoot uintptr, pLeft // One or both of the subtrees can be NULL. Return a pointer to the new // Expr node. Or, if an OOM error occurs, set pParse->db->mallocFailed, // free the subtrees and return NULL. -func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102564:21: */ +func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102574:21: */ var p uintptr p = Xsqlite3DbMallocRawNN(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Expr{}))) if p != 0 { @@ -82330,7 +82335,7 @@ func Xsqlite3PExpr(tls *libc.TLS, pParse uintptr, op int32, pLeft uintptr, pRigh // Add pSelect to the Expr.x.pSelect field. Or, if pExpr is NULL (due // do a memory allocation failure) then delete the pSelect object. -func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:102589:21: */ +func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelect uintptr) { /* sqlite3.c:102599:21: */ if pExpr != 0 { *(*uintptr)(unsafe.Pointer(pExpr + 20)) = pSelect *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_xIsSelect | EP_Subquery) @@ -82358,7 +82363,7 @@ func Xsqlite3PExprAddSelect(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSelec // // This is used as part of processing IN(...) expressions with a list // of vectors on the RHS. e.g. "... IN ((1,2), (3,4), (5,6))". -func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:102619:23: */ +func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList uintptr) uintptr { /* sqlite3.c:102629:23: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -82376,12 +82381,12 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList nExprElem = 1 } if nExprElem != nElem { - Xsqlite3ErrorMsg(tls, pParse, ts+7353, /* "IN(...) element ..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+7375, libc.VaList(bp, nExprElem, func() uintptr { if nExprElem > 1 { - return ts + 7397 /* "s" */ + return ts + 7419 /* "s" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), nElem)) break } @@ -82410,7 +82415,7 @@ func Xsqlite3ExprListToValues(tls *libc.TLS, pParse uintptr, nElem int32, pEList // If one side or the other of the AND is known to be false, then instead // of returning an AND expression, just return a constant expression with // a value of false. -func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102666:21: */ +func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:102676:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pLeft == uintptr(0) { return pRight @@ -82420,7 +82425,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { Xsqlite3ExprDeferredDelete(tls, pParse, pLeft) Xsqlite3ExprDeferredDelete(tls, pParse, pRight) - return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7399 /* "0" */) + return Xsqlite3Expr(tls, db, TK_INTEGER, ts+7421) } else { return Xsqlite3PExpr(tls, pParse, TK_AND, pLeft, pRight) } @@ -82429,7 +82434,7 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. -func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:102687:21: */ +func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:102697:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82444,7 +82449,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u if pList != 0 && (*ExprList)(unsafe.Pointer(pList)).FnExpr > *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 112 + 6*4)) && !(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7401 /* "too many argumen..." */, libc.VaList(bp, pToken)) + Xsqlite3ErrorMsg(tls, pParse, ts+7423, libc.VaList(bp, pToken)) } *(*uintptr)(unsafe.Pointer(pNew + 20)) = pList *(*U32)(unsafe.Pointer(pNew + 4)) |= U32(EP_HasFunc) @@ -82465,7 +82470,7 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // top-level SQL // // If the function is not usable, create an error. -func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:102726:21: */ +func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:102736:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -82478,7 +82483,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // is tagged with SQLITE_FUNC_UNSAFE) and // SQLITE_DBCONFIG_TRUSTED_SCHEMA is off (meaning // that the schema is possibly tainted). - Xsqlite3ErrorMsg(tls, pParse, ts+7435 /* "unsafe use of %s..." */, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(pDef)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7457, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(pDef)).FzName)) } } } @@ -82497,7 +82502,7 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // as the previous instance of the same wildcard. Or if this is the first // instance of the wildcard, the next sequential variable number is // assigned. -func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:102765:21: */ +func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:102775:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -82531,7 +82536,7 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } if bOk == 0 || *(*I64)(unsafe.Pointer(bp + 8)) < int64(1) || *(*I64)(unsafe.Pointer(bp + 8)) > I64(*(*int32)(unsafe.Pointer(db + 112 + 9*4))) { - Xsqlite3ErrorMsg(tls, pParse, ts+7454, /* "variable number ..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+7476, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 112 + 9*4)))) return } @@ -82558,12 +82563,12 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n } (*Expr)(unsafe.Pointer(pExpr)).FiColumn = x if int32(x) > *(*int32)(unsafe.Pointer(db + 112 + 9*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+7497 /* "too many SQL var..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+7519, 0) } } // Recursively delete an expression tree. -func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:102833:29: */ +func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:102843:29: */ if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { // The Expr.x union is never used at the same time as Expr.pRight @@ -82593,7 +82598,7 @@ func sqlite3ExprDeleteNN(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:10 } } -func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:102874:21: */ +func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:102884:21: */ if p != 0 { sqlite3ExprDeleteNN(tls, db, p) } @@ -82607,13 +82612,13 @@ func Xsqlite3ExprDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:102 // // The deferred delete is (currently) implemented by adding the // pExpr to the pParse->pConstExpr list with a register number of 0. -func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:102889:21: */ +func Xsqlite3ExprDeferredDelete(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:102899:21: */ (*Parse)(unsafe.Pointer(pParse)).FpConstExpr = Xsqlite3ExprListAppend(tls, pParse, (*Parse)(unsafe.Pointer(pParse)).FpConstExpr, pExpr) } // Invoke sqlite3RenameExprUnmap() and sqlite3ExprDelete() on the // expression. -func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:102897:21: */ +func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:102907:21: */ if p != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, p) @@ -82625,7 +82630,7 @@ func Xsqlite3ExprUnmapAndDelete(tls *libc.TLS, pParse uintptr, p uintptr) { /* s // Return the number of bytes allocated for the expression structure // passed as the first argument. This is always one of EXPR_FULLSIZE, // EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE. -func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102911:12: */ +func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102921:12: */ if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_TokenOnly) != U32(0) { return int32(uintptr(0) + 12) } @@ -82667,7 +82672,7 @@ func exprStructSize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:102911:12: */ // to reduce a pristine expression tree from the parser. The implementation // of dupedExprStructSize() contain multiple assert() statements that attempt // to enforce this constraint. -func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:102951:12: */ +func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:102961:12: */ var nSize int32 // Only one flag value allowed @@ -82689,7 +82694,7 @@ func dupedExprStructSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlit // This function returns the space in bytes required to store the copy // of the Expr structure and a copy of the Expr.u.zToken string (if that // string is defined.) -func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:102982:12: */ +func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:102992:12: */ var nByte int32 = dupedExprStructSize(tls, p, flags) & 0xfff if !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_IntValue) != U32(0)) && *(*uintptr)(unsafe.Pointer(p + 8)) != 0 { nByte = int32(Size_t(nByte) + (libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(p + 8)))&Size_t(0x3fffffff) + Size_t(1))) @@ -82708,7 +82713,7 @@ func dupedExprNodeSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3 // space to duplicate all Expr nodes in the tree formed by Expr.pLeft // and Expr.pRight variables (but not for any structures pointed to or // descended from the Expr.x.pList or Expr.x.pSelect variables). -func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103003:12: */ +func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:103013:12: */ var nByte int32 = 0 if p != 0 { nByte = dupedExprNodeSize(tls, p, flags) @@ -82725,7 +82730,7 @@ func dupedExprSize(tls *libc.TLS, p uintptr, flags int32) int32 { /* sqlite3.c:1 // (if applicable), and the copies of the p->pLeft and p->pRight expressions, // if any. Before returning, *pzBuffer is set to the first byte past the // portion of the buffer copied into by this function. -func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103022:13: */ +func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uintptr) uintptr { /* sqlite3.c:103032:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -82799,13 +82804,13 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint if !((*Expr)(unsafe.Pointer(pNew)).Fflags&U32(EP_TokenOnly|EP_Leaf) != U32(0)) { (*Expr)(unsafe.Pointer(pNew)).FpLeft = func() uintptr { if (*Expr)(unsafe.Pointer(p)).FpLeft != 0 { - return exprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpLeft, EXPRDUP_REDUCE, bp /* &zAlloc */) + return exprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpLeft, EXPRDUP_REDUCE, bp) } return uintptr(0) }() (*Expr)(unsafe.Pointer(pNew)).FpRight = func() uintptr { if (*Expr)(unsafe.Pointer(p)).FpRight != 0 { - return exprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpRight, EXPRDUP_REDUCE, bp /* &zAlloc */) + return exprDup(tls, db, (*Expr)(unsafe.Pointer(p)).FpRight, EXPRDUP_REDUCE, bp) } return uintptr(0) }() @@ -82835,7 +82840,7 @@ func exprDup(tls *libc.TLS, db uintptr, p uintptr, dupFlags int32, pzBuffer uint // Create and return a deep copy of the object passed as the second // argument. If an OOM condition is encountered, NULL is returned // and the db->mallocFailed flag set. -func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103132:21: */ +func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103142:21: */ var pRet uintptr = uintptr(0) if p != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(With{})) + uint32(unsafe.Sizeof(Cte{}))*uint32((*With)(unsafe.Pointer(p)).FnCte-1)) @@ -82857,7 +82862,7 @@ func Xsqlite3WithDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3. // gatherSelectWindowsCallback() are used to scan all the expressions // an a newly duplicated SELECT statement and gather all of the Window // objects found there, assembling them onto the linked list at Select->pWin. -func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103160:12: */ +func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103170:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pWin uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 44)) @@ -82867,14 +82872,14 @@ func gatherSelectWindowsCallback(tls *libc.TLS, pWalker uintptr, pExpr uintptr) return WRC_Continue } -func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103171:12: */ +func gatherSelectWindowsSelectCallback(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:103181:12: */ if p == *(*uintptr)(unsafe.Pointer(pWalker + 24)) { return WRC_Continue } return WRC_Prune } -func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103174:13: */ +func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103184:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -82889,7 +82894,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103174:13: */ (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24)) = p - Xsqlite3WalkSelect(tls, bp /* &w */, p) + Xsqlite3WalkSelect(tls, bp, p) } // The following group of routines make deep copies of expressions, @@ -82907,7 +82912,7 @@ func gatherSelectWindows(tls *libc.TLS, p uintptr) { /* sqlite3.c:103174:13: */ // If the EXPRDUP_REDUCE flag is set, then the structure returned is a // truncated version of the usual Expr structure that will be stored as // part of the in-memory representation of the database schema. -func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:103203:21: */ +func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:103213:21: */ if p != 0 { return exprDup(tls, db, p, flags, uintptr(0)) @@ -82915,7 +82920,7 @@ func Xsqlite3ExprDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr return uintptr(0) } -func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:103207:25: */ +func Xsqlite3ExprListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:103217:25: */ var pNew uintptr var pItem uintptr var pOldItem uintptr @@ -82984,7 +82989,7 @@ __3: // the build, then none of the following routines, except for // sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes // called with a NULL argument. -func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:103262:24: */ +func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintptr { /* sqlite3.c:103272:24: */ var pNew uintptr var i int32 var nByte int32 @@ -83037,7 +83042,7 @@ func Xsqlite3SrcListDup(tls *libc.TLS, db uintptr, p uintptr, flags int32) uintp return pNew } -func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103306:23: */ +func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:103316:23: */ var pNew uintptr var i int32 @@ -83066,7 +83071,7 @@ func Xsqlite3IdListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite return pNew } -func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:103330:23: */ +func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uintptr { /* sqlite3.c:103340:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83132,9 +83137,9 @@ func Xsqlite3SelectDup(tls *libc.TLS, db uintptr, pDup uintptr, flags int32) uin // If a memory allocation error occurs, the entire list is freed and // NULL is returned. If non-NULL is returned, then it is guaranteed // that the new entry was successfully appended. -var zeroItem = ExprList_item{} /* sqlite3.c:103401:35 */ +var zeroItem = ExprList_item{} /* sqlite3.c:103411:35 */ -func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103402:41: */ +func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103412:41: */ var pItem uintptr var pList uintptr @@ -83151,7 +83156,7 @@ func Xsqlite3ExprListAppendNew(tls *libc.TLS, db uintptr, pExpr uintptr) uintptr return pList } -func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103421:41: */ +func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103431:41: */ var pItem uintptr var pNew uintptr *(*int32)(unsafe.Pointer(pList + 4)) *= 2 @@ -83170,7 +83175,7 @@ func Xsqlite3ExprListAppendGrow(tls *libc.TLS, db uintptr, pList uintptr, pExpr return pList } -func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103443:25: */ +func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103453:25: */ var pItem uintptr if pList == uintptr(0) { return Xsqlite3ExprListAppendNew(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -83193,7 +83198,7 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // For each term of the vector assignment, append new entries to the // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. -func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103472:25: */ +func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:103482:25: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -83231,7 +83236,7 @@ __2: if !(int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_SELECT && (*IdList)(unsafe.Pointer(pColumns)).FnId != libc.AssignInt32(&n, Xsqlite3ExprVectorSize(tls, pExpr))) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+7520, /* "%d columns assig..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+7542, libc.VaList(bp, (*IdList)(unsafe.Pointer(pColumns)).FnId, n)) goto vector_append_error __3: @@ -83290,7 +83295,7 @@ vector_append_error: } // Set the sort order for the last element on the given ExprList. -func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:103534:21: */ +func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eNulls int32) { /* sqlite3.c:103544:21: */ var pItem uintptr if p == uintptr(0) { return @@ -83317,7 +83322,7 @@ func Xsqlite3ExprListSetSortOrder(tls *libc.TLS, p uintptr, iSortOrder int32, eN // pList might be NULL following an OOM error. But pName should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:103572:21: */ +func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName uintptr, dequote int32) { /* sqlite3.c:103582:21: */ if pList != 0 { var pItem uintptr @@ -83343,7 +83348,7 @@ func Xsqlite3ExprListSetName(tls *libc.TLS, pParse uintptr, pList uintptr, pName // pList might be NULL following an OOM error. But pSpan should never be // NULL. If a memory allocation fails, the pParse->db->mallocFailed flag // is set. -func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:103607:21: */ +func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:103617:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pList != 0 { @@ -83358,19 +83363,19 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. -func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:103629:21: */ +func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:103639:21: */ bp := tls.Alloc(8) defer tls.Free(8) var mx int32 = *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 112 + 2*4)) if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr > mx { - Xsqlite3ErrorMsg(tls, pParse, ts+7550 /* "too many columns..." */, libc.VaList(bp, zObject)) + Xsqlite3ErrorMsg(tls, pParse, ts+7572, libc.VaList(bp, zObject)) } } // Delete an entire expression list. -func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:103645:29: */ +func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:103655:29: */ var i int32 = (*ExprList)(unsafe.Pointer(pList)).FnExpr var pItem uintptr = pList + 8 /* &.a */ @@ -83382,7 +83387,7 @@ func exprListDeleteNN(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:1 Xsqlite3DbFreeNN(tls, db, pList) } -func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:103656:21: */ +func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:103666:21: */ if pList != 0 { exprListDeleteNN(tls, db, pList) } @@ -83390,7 +83395,7 @@ func Xsqlite3ExprListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlit // Return the bitwise-OR of all Expr.flags fields in the given // ExprList. -func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:103664:20: */ +func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:103674:20: */ var i int32 var m U32 = U32(0) @@ -83407,7 +83412,7 @@ func Xsqlite3ExprListFlags(tls *libc.TLS, pList uintptr) U32 { /* sqlite3.c:1036 // pWalker->eCode to zero and abort. // // This callback is used by multiple expression walkers. -func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:103683:20: */ +func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int32 { /* sqlite3.c:103693:20: */ _ = NotUsed (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -83419,11 +83424,11 @@ func Xsqlite3SelectWalkFail(tls *libc.TLS, pWalker uintptr, NotUsed uintptr) int // "true" EP_IsTrue // "false" EP_IsFalse // anything else 0 -func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:103697:20: */ - if Xsqlite3StrICmp(tls, zIn, ts+6617) == 0 { +func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:103707:20: */ + if Xsqlite3StrICmp(tls, zIn, ts+6639) == 0 { return U32(EP_IsTrue) } - if Xsqlite3StrICmp(tls, zIn, ts+6622) == 0 { + if Xsqlite3StrICmp(tls, zIn, ts+6644) == 0 { return U32(EP_IsFalse) } return U32(0) @@ -83432,7 +83437,7 @@ func Xsqlite3IsTrueOrFalse(tls *libc.TLS, zIn uintptr) U32 { /* sqlite3.c:103697 // If the input expression is an ID with the name "true" or "false" // then convert it into an TK_TRUEFALSE term. Return non-zero if // the conversion happened, and zero if the expression is unaltered. -func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:103709:20: */ +func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:103719:20: */ var v U32 if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Quoted|EP_IntValue) != U32(0)) && @@ -83446,7 +83451,7 @@ func Xsqlite3ExprIdToTrueFalse(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3. // The argument must be a TK_TRUEFALSE Expr node. Return 1 if it is TRUE // and 0 if it is FALSE. -func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:103726:20: */ +func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:103736:20: */ pExpr = Xsqlite3ExprSkipCollate(tls, pExpr) return libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8)) + 4))) == 0) @@ -83463,7 +83468,7 @@ func Xsqlite3ExprTruthValue(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:1 // (x<10) AND (y=22 OR false) => (x<10) AND (y=22) // (x<10) AND (y=22 OR true) => (x<10) // (y=22) OR true => true -func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:103748:21: */ +func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqlite3.c:103758:21: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AND || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_OR { var pRight uintptr = Xsqlite3ExprSimplifiedAndOr(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) @@ -83509,7 +83514,7 @@ func Xsqlite3ExprSimplifiedAndOr(tls *libc.TLS, pExpr uintptr) uintptr { /* sqli // contain a bound parameter because they were generated by older versions // of SQLite to be parsed by newer versions of SQLite without raising a // malformed schema error. -func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103789:12: */ +func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103799:12: */ // If pWalker->eCode is 2 then any term of the expression that comes from // the ON or USING clauses of a left join disqualifies the expression @@ -83584,7 +83589,7 @@ func exprNodeIsConstant(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / return int32(0) } -func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:103861:12: */ +func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { /* sqlite3.c:103871:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -83598,7 +83603,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3SelectWalkFail})) *(*int32)(unsafe.Pointer(bp + 24)) = iCur - Xsqlite3WalkExpr(tls, bp /* &w */, p) + Xsqlite3WalkExpr(tls, bp, p) return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) } @@ -83608,7 +83613,7 @@ func exprIsConst(tls *libc.TLS, p uintptr, initFlag int32, iCur int32) int32 { / // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103882:20: */ +func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103892:20: */ return exprIsConst(tls, p, 1, 0) } @@ -83623,7 +83628,7 @@ func Xsqlite3ExprIsConstant(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:10388 // When this routine returns true, it indicates that the expression // can be added to the pParse->pConstExpr list and evaluated once when // the prepared statement starts up. See sqlite3ExprCodeRunJustOnce(). -func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103899:20: */ +func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:103909:20: */ return exprIsConst(tls, p, 2, 0) } @@ -83631,12 +83636,12 @@ func Xsqlite3ExprIsConstantNotJoin(tls *libc.TLS, p uintptr) int32 { /* sqlite3. // for any single row of the table with cursor iCur. In other words, the // expression must not refer to any non-deterministic function nor any // table other than iCur. -func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:103909:20: */ +func Xsqlite3ExprIsTableConstant(tls *libc.TLS, p uintptr, iCur int32) int32 { /* sqlite3.c:103919:20: */ return exprIsConst(tls, p, 3, iCur) } // sqlite3WalkExpr() callback used by sqlite3ExprIsConstantOrGroupBy(). -func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103917:12: */ +func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:103927:12: */ var pGroupBy uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var i int32 @@ -83678,7 +83683,7 @@ func exprNodeIsConstantOrGroupBy(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // alternative collating sequences are uncommon, and this is only an // optimization, so we take the easy way out and simply require the // GROUP BY to use the BINARY collating sequence. -func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:103961:20: */ +func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, pGroupBy uintptr) int32 { /* sqlite3.c:103971:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -83691,7 +83696,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24)) = pGroupBy (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse - Xsqlite3WalkExpr(tls, bp /* &w */, p) + Xsqlite3WalkExpr(tls, bp, p) return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) } @@ -83714,7 +83719,7 @@ func Xsqlite3ExprIsConstantOrGroupBy(tls *libc.TLS, pParse uintptr, p uintptr, p // For the purposes of this function, a double-quoted string (ex: "abc") // is considered a variable but a single-quoted string (ex: 'abc') is // a constant. -func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:103993:20: */ +func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 { /* sqlite3.c:104003:20: */ return exprIsConst(tls, p, 4+int32(isInit), 0) } @@ -83723,7 +83728,7 @@ func Xsqlite3ExprIsConstantOrFunction(tls *libc.TLS, p uintptr, isInit U8) int32 // to fit in a 32-bit integer, return 1 and put the value of the integer // in *pValue. If the expression is not an integer or if it is too big // to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged. -func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104022:20: */ +func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* sqlite3.c:104032:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -83775,7 +83780,7 @@ func Xsqlite3ExprIsInteger(tls *libc.TLS, p uintptr, pValue uintptr) int32 { /* // hand, a false negative (returning FALSE when the result could be NULL) // will likely result in an incorrect answer. So when in doubt, return // TRUE. -func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104068:20: */ +func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104078:20: */ var op U8 for int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UPLUS || int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_UMINUS { @@ -83814,7 +83819,7 @@ func Xsqlite3ExprCanBeNull(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:104068 // can be omitted. When in doubt return FALSE. A false negative // is harmless. A false positive, however, can result in the wrong // answer. -func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104105:20: */ +func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 { /* sqlite3.c:104115:20: */ var op U8 var unaryMinus int32 = 0 if int32(aff) == SQLITE_AFF_BLOB { @@ -83867,14 +83872,14 @@ func Xsqlite3ExprNeedsNoAffinityChange(tls *libc.TLS, p uintptr, aff int8) int32 } // Return TRUE if the given string is a row-id column name. -func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104141:20: */ - if Xsqlite3StrICmp(tls, z, ts+7573) == 0 { +func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104151:20: */ + if Xsqlite3StrICmp(tls, z, ts+7595) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7581) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7603) == 0 { return 1 } - if Xsqlite3StrICmp(tls, z, ts+7587) == 0 { + if Xsqlite3StrICmp(tls, z, ts+7609) == 0 { return 1 } return 0 @@ -83885,7 +83890,7 @@ func Xsqlite3IsRowid(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:104141:20: * // a pointer to the SELECT statement. If pX is not a SELECT statement, // or if the SELECT statement needs to be manifested into a transient // table, then return NULL. -func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104156:15: */ +func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:104166:15: */ var p uintptr var pSrc uintptr var pEList uintptr @@ -83943,7 +83948,7 @@ func isCandidateForInOpt(tls *libc.TLS, pX uintptr) uintptr { /* sqlite3.c:10415 // it contains any NULL entries. Cause the register at regHasNull to be set // to a non-NULL value if iCur contains no NULLs. Cause register regHasNull // to be set to NULL if iCur contains one or more NULL values. -func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:104201:13: */ +func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int32) { /* sqlite3.c:104211:13: */ var addr1 int32 Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regHasNull) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_Rewind, iCur) @@ -83955,7 +83960,7 @@ func sqlite3SetHasNullFlag(tls *libc.TLS, v uintptr, iCur int32, regHasNull int3 // The argument is an IN operator with a list (not a subquery) on the // right-hand side. Return TRUE if that list is constant. -func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:104218:12: */ +func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:104228:12: */ var pLHS uintptr var res int32 @@ -84044,7 +84049,7 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:104 // CREATE INDEX i1 ON t1(b, c, a); // // then aiMap[] is populated with {2, 0, 1}. -func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:104311:20: */ +func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:104321:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84102,7 +84107,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, Xsqlite3OpenTable(tls, pParse, iTab, iDb, pTab, OP_OpenRead) eType = IN_INDEX_ROWID - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7591 /* "USING ROWID SEAR..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7613, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VdbeJumpHere(tls, v, iAddr) } else { var pIdx uintptr // Iterator variable @@ -84193,7 +84198,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == Bitmask(uint64(1))<<nExpr-uint64(1) { // If we reach this point, that means the index pIdx is usable var iAddr int32 = Xsqlite3VdbeAddOp0(tls, v, OP_Once) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7638 /* "USING INDEX %s F..." */, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7660, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName)) Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iTab, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) @@ -84262,7 +84267,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, // // It is the responsibility of the caller to ensure that the returned // string is eventually freed using sqlite3DbFree(). -func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104535:13: */ +func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:104545:13: */ var pLeft uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpLeft var nVal int32 = Xsqlite3ExprVectorSize(tls, pLeft) var pSelect uintptr @@ -84294,12 +84299,12 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // message of the form: // // "sub-select returns N columns - expected M" -func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:104567:21: */ +func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:104577:21: */ bp := tls.Alloc(16) defer tls.Free(16) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { - var zFmt uintptr = ts + 7669 /* "sub-select retur..." */ + var zFmt uintptr = ts + 7691 /* "sub-select retur..." */ Xsqlite3ErrorMsg(tls, pParse, zFmt, libc.VaList(bp, nActual, nExpect)) } } @@ -84313,11 +84318,11 @@ func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpec // Or, if it is a regular scalar vector: // // "row value misused" -func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:104586:21: */ +func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:104596:21: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { Xsqlite3SubselectError(tls, pParse, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FpEList)).FnExpr, 1) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6395 /* "row value misuse..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6417, 0) } } @@ -84341,7 +84346,7 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // if either column has NUMERIC or INTEGER affinity. If neither // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. -func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:104620:21: */ +func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:104630:21: */ bp := tls.Alloc(53) defer tls.Free(53) @@ -84370,7 +84375,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_xIsSelect) != U32(0) { - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7713 /* "REUSE LIST SUBQU..." */, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FselId)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7735, libc.VaList(bp, (*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)))).FselId)) } Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 44 + 4 /* &.regReturn */)), @@ -84408,11 +84413,11 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 20)) var pEList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpEList - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7736 /* "%sLIST SUBQUERY ..." */, libc.VaList(bp+8, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7758, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ } - return ts + 7755 /* "CORRELATED " */ + return ts + 7777 /* "CORRELATED " */ }(), (*Select)(unsafe.Pointer(pSelect)).FselId)) // If the LHS and RHS of the IN operator do not match, that // error will have been caught long before we reach this point. @@ -84422,7 +84427,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 var i int32 var rc int32 - Xsqlite3SelectDestInit(tls, bp+24 /* &dest */, SRT_Set, iTab) + Xsqlite3SelectDestInit(tls, bp+24, SRT_Set, iTab) (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FzAffSdst = exprINAffinity(tls, pParse, pExpr) (*Select)(unsafe.Pointer(pSelect)).FiLimit = 0 @@ -84431,7 +84436,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { rc = 1 } else { - rc = Xsqlite3Select(tls, pParse, pCopy, bp+24 /* &dest */) + rc = Xsqlite3Select(tls, pParse, pCopy, bp+24) } Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pCopy) Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FzAffSdst) @@ -84496,7 +84501,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // Evaluate the expression and insert it into the temp table Xsqlite3ExprCode(tls, pParse, pE2, r1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, r1, 1, r2, bp+52 /* &affinity */, 1) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, r1, 1, r2, bp+52, 1) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iTab, r2, r1, 1) } @@ -84536,7 +84541,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // the result is stored in a contiguous array of registers and the // return value is the register of the left-most result column. // Return 0 if an error occurs. -func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:104815:20: */ +func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:104825:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -84559,7 +84564,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // If this routine has already been coded, then invoke it as a // subroutine. if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Subrtn) != U32(0) { - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7767 /* "REUSE SUBQUERY %..." */, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+7789, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) Xsqlite3VdbeAddOp2(tls, v, OP_Gosub, *(*int32)(unsafe.Pointer(pExpr + 44 + 4 /* &.regReturn */)), *(*int32)(unsafe.Pointer(pExpr + 44))) @@ -84594,18 +84599,18 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // // In both cases, the query is augmented with "LIMIT 1". Any // preexisting limit is discarded in place of the new LIMIT 1. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7785 /* "%sSCALAR SUBQUER..." */, libc.VaList(bp+8, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+7807, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ } - return ts + 7755 /* "CORRELATED " */ + return ts + 7777 /* "CORRELATED " */ }(), (*Select)(unsafe.Pointer(pSel)).FselId)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { nReg = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpEList)).FnExpr } else { nReg = 1 } - Xsqlite3SelectDestInit(tls, bp+24 /* &dest */, 0, (*Parse)(unsafe.Pointer(pParse)).FnMem+1) + Xsqlite3SelectDestInit(tls, bp+24, 0, (*Parse)(unsafe.Pointer(pParse)).FnMem+1) *(*int32)(unsafe.Pointer(pParse + 44)) += nReg if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FeDest = U8(SRT_Mem) @@ -84622,7 +84627,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // The subquery already has a limit. If the pre-existing limit is X // then make the new limit X<>0 so that the new limit is either 1 or 0 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7399 /* "0" */) + pLimit = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7421) if pLimit != 0 { (*Expr)(unsafe.Pointer(pLimit)).FaffExpr = int8(SQLITE_AFF_NUMERIC) pLimit = Xsqlite3PExpr(tls, pParse, TK_NE, @@ -84632,7 +84637,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(pSel)).FpLimit)).FpLeft = pLimit } else { // If there is no pre-existing limit add a limit of 1 - pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+7806 /* "1" */) + pLimit = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, ts+7828) (*Select)(unsafe.Pointer(pSel)).FpLimit = Xsqlite3PExpr(tls, pParse, TK_LIMIT, pLimit, uintptr(0)) } (*Select)(unsafe.Pointer(pSel)).FiLimit = 0 @@ -84661,7 +84666,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // sub-select on the RHS of the IN() operator has the same number of // columns as the vector on the LHS. Or, if the RHS of the IN() is not // a sub-query, that the LHS is a vector of size 1. -func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:104939:20: */ +func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* sqlite3.c:104949:20: */ var nVector int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer(pIn)).FpLeft) if (*Expr)(unsafe.Pointer(pIn)).Fflags&U32(EP_xIsSelect) != U32(0) && !(int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed) != 0) { if nVector != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIn + 20)))).FpEList)).FnExpr { @@ -84698,7 +84703,7 @@ func Xsqlite3ExprCheckIN(tls *libc.TLS, pParse uintptr, pIn uintptr) int32 { /* // // See the separate in-operator.md documentation file in the canonical // SQLite source tree for additional information. -func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:104980:13: */ +func sqlite3ExprCodeIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, destIfFalse int32, destIfNull int32) { /* sqlite3.c:104990:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -84793,7 +84798,7 @@ __2: // by code generated below. (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = U8(0) - rLhsOrig = exprCodeVector(tls, pParse, pLeft, bp+8 /* &iDummy */) + rLhsOrig = exprCodeVector(tls, pParse, pLeft, bp+8) (*Parse)(unsafe.Pointer(pParse)).FokConstFactor = okConstFactor i = 0 __3: @@ -84857,7 +84862,7 @@ __13: if !(ii < (*ExprList)(unsafe.Pointer(pList)).FnExpr) { goto __15 } - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*20)).FpExpr, bp+12 /* ®ToFree */) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*20)).FpExpr, bp+12) if !(regCkNull != 0 && Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(ii)*20)).FpExpr) != 0) { goto __16 } @@ -85085,19 +85090,19 @@ sqlite3ExprCodeIN_oom_error: // The z[] string will probably not be zero-terminated. But the // z[n] character is guaranteed to be something that does not look // like the continuation of the number. -func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:105239:13: */ +func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) { /* sqlite3.c:105249:13: */ bp := tls.Alloc(8) defer tls.Free(8) if z != uintptr(0) { // var value float64 at bp, 8 - Xsqlite3AtoF(tls, z, bp /* &value */, Xsqlite3Strlen30(tls, z), uint8(SQLITE_UTF8)) + Xsqlite3AtoF(tls, z, bp, Xsqlite3Strlen30(tls, z), uint8(SQLITE_UTF8)) // The new AtoF never returns NaN if negateFlag != 0 { *(*float64)(unsafe.Pointer(bp /* value */)) = -*(*float64)(unsafe.Pointer(bp /* value */)) } - Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Real, 0, iMem, 0, bp /* &value */, -13) + Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Real, 0, iMem, 0, bp, -13) } } @@ -85105,7 +85110,7 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // text z[0..n-1] into register iMem. // // Expr.u.zToken is always UTF8 and zero-terminated. -func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:105257:13: */ +func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:105267:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -85123,14 +85128,14 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM var z uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 8)) - c = Xsqlite3DecOrHexToI64(tls, z, bp+16 /* &value */) + c = Xsqlite3DecOrHexToI64(tls, z, bp+16) if c == 3 && !(negFlag != 0) || c == 2 || negFlag != 0 && *(*I64)(unsafe.Pointer(bp + 16)) == int64(-1)-(int64(0xffffffff)|I64(int64(0x7fffffff))<<32) { - if Xsqlite3_strnicmp(tls, z, ts+7808, 2) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7811 /* "hex literal too ..." */, libc.VaList(bp, func() uintptr { + if Xsqlite3_strnicmp(tls, z, ts+7830, 2) == 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+7833, libc.VaList(bp, func() uintptr { if negFlag != 0 { - return ts + 4852 /* "-" */ + return ts + 4874 /* "-" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), z)) } else { codeReal(tls, v, z, negFlag, iMem) @@ -85143,14 +85148,14 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM *(*I64)(unsafe.Pointer(bp + 16 /* value */)) = -*(*I64)(unsafe.Pointer(bp + 16 /* value */)) } } - Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, iMem, 0, bp+16 /* &value */, -14) + Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, iMem, 0, bp+16, -14) } } } // Generate code that will load into register regOut a value that is // appropriate for the iIdxCol-th column of index pIdx. -func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:105294:21: */ +func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr, iTabCur int32, iIdxCol int32, regOut int32) { /* sqlite3.c:105304:21: */ var iTabCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iIdxCol)*2)) if int32(iTabCol) == -2 { @@ -85165,7 +85170,7 @@ func Xsqlite3ExprCodeLoadIndexColumn(tls *libc.TLS, pParse uintptr, pIdx uintptr // Generate code that will compute the value of generated column pCol // and store the result in register regOut -func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:105319:21: */ +func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, regOut int32) { /* sqlite3.c:105329:21: */ var iAddr int32 var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -85184,7 +85189,7 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pTab uintptr } // Generate code to extract the value of the iCol-th column of a table. -func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:105345:21: */ +func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:105355:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -85205,7 +85210,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT } else if int32((*Column)(unsafe.Pointer(libc.AssignUintptr(&pCol, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16))).FcolFlags)&COLFLAG_VIRTUAL != 0 { var pParse uintptr = Xsqlite3VdbeParser(tls, v) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_BUSY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7837, /* "generated column..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+7859, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else { var savedSelfTab int32 = (*Parse)(unsafe.Pointer(pParse)).FiSelfTab @@ -85235,7 +85240,7 @@ func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iT // // There must be an open cursor to pTab in iTable when this routine // is called. If iColumn<0 then code is generated that extracts the rowid. -func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:105403:20: */ +func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iColumn int32, iTable int32, iReg int32, p5 U8) int32 { /* sqlite3.c:105413:20: */ Xsqlite3ExprCodeGetColumnOfTable(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, pTab, iTable, iColumn, iReg) if p5 != 0 { @@ -85249,14 +85254,14 @@ func Xsqlite3ExprCodeGetColumn(tls *libc.TLS, pParse uintptr, pTab uintptr, iCol // Generate code to move content from registers iFrom...iFrom+nReg-1 // over to iTo..iTo+nReg-1. -func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:105424:21: */ +func Xsqlite3ExprCodeMove(tls *libc.TLS, pParse uintptr, iFrom int32, iTo int32, nReg int32) { /* sqlite3.c:105434:21: */ Xsqlite3VdbeAddOp3(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Move, iFrom, iTo, nReg) } // Convert a scalar expression node to a TK_REGISTER referencing // register iReg. The caller must ensure that iReg already contains // the correct value for the expression. -func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:105433:13: */ +func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:105443:13: */ var p uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if p == uintptr(0) { return @@ -85275,7 +85280,7 @@ func exprToRegister(tls *libc.TLS, pExpr uintptr, iReg int32) { /* sqlite3.c:105 // that register number into *piFreeable. If the returned result register // is not a temporary or if the expression is a vector set *piFreeable // to 0. -func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:105452:12: */ +func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr) int32 { /* sqlite3.c:105462:12: */ var iResult int32 var nResult int32 = Xsqlite3ExprVectorSize(tls, p) if nResult == 1 { @@ -85299,7 +85304,7 @@ func exprCodeVector(tls *libc.TLS, pParse uintptr, p uintptr, piFreeable uintptr // If the last opcode is a OP_Copy, then set the do-not-merge flag (p5) // so that a subsequent copy will not be merged into this one. -func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:105482:13: */ +func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:105492:13: */ if int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Copy { Xsqlite3VdbeChangeP5(tls, v, uint16(1)) // Tag trailing OP_Copy as not mergable } @@ -85307,7 +85312,7 @@ func setDoNotMergeFlagOnCopy(tls *libc.TLS, v uintptr) { /* sqlite3.c:105482:13: // Generate code to implement special SQL functions that are implemented // in-line rather than by using the usual callbacks. -func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:105492:12: */ +func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncId int32, target int32) int32 { /* sqlite3.c:105502:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -85340,10 +85345,10 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI { // var caseExpr Expr at bp, 52 - libc.Xmemset(tls, bp /* &caseExpr */, 0, uint32(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(bp /* &caseExpr */)).Fop = U8(TK_CASE) *(*uintptr)(unsafe.Pointer(bp + 20)) = pFarg - return Xsqlite3ExprCodeTarget(tls, pParse, bp /* &caseExpr */, target) + return Xsqlite3ExprCodeTarget(tls, pParse, bp, target) } @@ -85405,14 +85410,14 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // The AFFINITY() function evaluates to a string that describes // the type affinity of the argument. This is used for testing of // the SQLite type logic. - *(*[5]uintptr)(unsafe.Pointer(bp + 52 /* azAff */)) = [5]uintptr{ts + 7867 /* "blob" */, ts + 7872 /* "text" */, ts + 7877 /* "numeric" */, ts + 6115 /* "integer" */, ts + 6110 /* "real" */} + *(*[5]uintptr)(unsafe.Pointer(bp + 52 /* azAff */)) = [5]uintptr{ts + 7889, ts + 7894, ts + 7899, ts + 6137, ts + 6132} var aff int8 aff = Xsqlite3ExprAffinity(tls, (*ExprList_item)(unsafe.Pointer(pFarg+8)).FpExpr) Xsqlite3VdbeLoadString(tls, v, target, func() uintptr { if int32(aff) <= SQLITE_AFF_NONE { - return ts + 7885 /* "none" */ + return ts + 7907 /* "none" */ } return *(*uintptr)(unsafe.Pointer(bp + 52 /* &azAff[0] */ + uintptr(int32(aff)-SQLITE_AFF_BLOB)*4)) }()) @@ -85432,7 +85437,7 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // register if it is convenient to do so. The calling function // must check the return code and move the results to the desired // register. -func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:105608:20: */ +func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:105618:20: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -85787,7 +85792,7 @@ __69: if !(int32((*Column)(unsafe.Pointer(pCol1)).FcolFlags)&COLFLAG_BUSY != 0) { goto __72 } - Xsqlite3ErrorMsg(tls, pParse, ts+7837, /* "generated column..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+7859, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) return 0 __72: @@ -85929,8 +85934,8 @@ __22: codeVectorCompare(tls, pParse, pExpr, target, uint8(op), uint8(p5)) goto __80 __79: - r1 = Xsqlite3ExprCodeTemp(tls, pParse, pLeft, bp+40 /* ®Free1 */) - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44 /* ®Free2 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, pLeft, bp+40) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, inReg) codeCompare(tls, pParse, pLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2, Xsqlite3VdbeCurrentAddr(tls, v)+2, p5, @@ -85964,8 +85969,8 @@ __33: __34: ; - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40 /* ®Free1 */) - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44 /* ®Free2 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44) Xsqlite3VdbeAddOp3(tls, v, op, r2, r1, target) goto __3 @@ -85992,8 +85997,8 @@ __85: (*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fflags = U32(EP_IntValue | EP_TokenOnly) *(*int32)(unsafe.Pointer(bp + 48 + 8)) = 0 - r1 = Xsqlite3ExprCodeTemp(tls, pParse, bp+48 /* &tempX */, bp+40 /* ®Free1 */) - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+44 /* ®Free2 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, bp+48, bp+40) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+44) Xsqlite3VdbeAddOp3(tls, v, OP_Subtract, r2, r1, target) __86: @@ -86006,13 +86011,13 @@ __36: __37: ; - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40 /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) goto __3 __38: // IS TRUE or IS FALSE - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40 /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) bNormal = libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_IS) @@ -86025,7 +86030,7 @@ __40: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40 /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40) addr = Xsqlite3VdbeAddOp1(tls, v, op, r1) @@ -86041,7 +86046,7 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+7890 /* "misuse of aggreg..." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+7912, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) goto __88 __87: return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*20)).FiMem @@ -86083,7 +86088,7 @@ __90: if !(pDef == uintptr(0) || (*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0)) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+7916 /* "unknown function..." */, libc.VaList(bp+16, zId)) + Xsqlite3ErrorMsg(tls, pParse, ts+7938, libc.VaList(bp+16, zId)) goto __3 __91: ; @@ -86279,7 +86284,7 @@ __122: if !((*Expr)(unsafe.Pointer(pExpr)).FiTable != n1) { goto __123 } - Xsqlite3ErrorMsg(tls, pParse, ts+7520, /* "%d columns assig..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+7542, libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __123: ; @@ -86338,7 +86343,7 @@ __124: goto __3 __52: - Xsqlite3ErrorMsg(tls, pParse, ts+6395 /* "row value misuse..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6417, 0) goto __3 // TK_IF_NULL_ROW Expr nodes are inserted ahead of expressions @@ -86400,9 +86405,9 @@ __54: // The X expression __126: ; - exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40 /* ®Free1 */)) + exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40)) - libc.Xmemset(tls, bp+100 /* &opCompare */, 0, uint32(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp+100, 0, uint32(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(bp + 100 /* &opCompare */)).Fop = U8(TK_EQ) (*Expr)(unsafe.Pointer(bp + 100 /* &opCompare */)).FpLeft = pDel pTest = bp + 100 /* &opCompare */ @@ -86462,7 +86467,7 @@ __55: goto __134 } Xsqlite3ErrorMsg(tls, pParse, - ts+7939 /* "RAISE() may only..." */, 0) + ts+7961, 0) return 0 __134: ; @@ -86501,7 +86506,7 @@ __3: return inReg } -var zAff = *(*[8]int8)(unsafe.Pointer(ts + 7989 /* "B\x00C\x00D\x00E" */)) /* sqlite3.c:105675:29 */ +var zAff = *(*[8]int8)(unsafe.Pointer(ts + 8011)) /* sqlite3.c:105685:29 */ // Generate code that will evaluate expression pExpr just one time // per prepared statement execution. @@ -86518,7 +86523,7 @@ var zAff = *(*[8]int8)(unsafe.Pointer(ts + 7989 /* "B\x00C\x00D\x00E" */)) /* sq // code to the same register, if they do not contain function calls and hence // are factored out into the initialization section at the end of the // prepared statement. -func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:106382:20: */ +func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, regDest int32) int32 { /* sqlite3.c:106392:20: */ var p uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpConstExpr @@ -86587,7 +86592,7 @@ func Xsqlite3ExprCodeRunJustOnce(tls *libc.TLS, pParse uintptr, pExpr uintptr, r // If pExpr is a constant, then this routine might generate this // code to fill the register in the initialization section of the // VDBE program, in order to factor it out of the evaluation loop. -func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:106439:20: */ +func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uintptr) int32 { /* sqlite3.c:106449:20: */ var r2 int32 pExpr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && @@ -86612,7 +86617,7 @@ func Xsqlite3ExprCodeTemp(tls *libc.TLS, pParse uintptr, pExpr uintptr, pReg uin // Generate code that will evaluate expression pExpr and store the // results in register target. The results are guaranteed to appear // in register target. -func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:106467:21: */ +func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:106477:21: */ var inReg int32 if (*Parse)(unsafe.Pointer(pParse)).FpVdbe == uintptr(0) { @@ -86633,7 +86638,7 @@ func Xsqlite3ExprCode(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32 // Make a transient copy of expression pExpr and then code it using // sqlite3ExprCode(). This routine works just like sqlite3ExprCode() // except that the input expression is guaranteed to be unchanged. -func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:106491:21: */ +func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:106501:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pExpr = Xsqlite3ExprDup(tls, db, pExpr, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { @@ -86646,7 +86651,7 @@ func Xsqlite3ExprCodeCopy(tls *libc.TLS, pParse uintptr, pExpr uintptr, target i // results in register target. The results are guaranteed to appear // in register target. If the expression is constant, then this routine // might choose to code the expression at initialization time. -func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:106504:21: */ +func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) { /* sqlite3.c:106514:21: */ if (*Parse)(unsafe.Pointer(pParse)).FokConstFactor != 0 && Xsqlite3ExprIsConstantNotJoin(tls, pExpr) != 0 { Xsqlite3ExprCodeRunJustOnce(tls, pParse, pExpr, target) } else { @@ -86672,7 +86677,7 @@ func Xsqlite3ExprCodeFactorable(tls *libc.TLS, pParse uintptr, pExpr uintptr, ta // in registers at srcReg, and so the value can be copied from there. // If SQLITE_ECEL_OMITREF is also set, then the values with u.x.iOrderByCol>0 // are simply omitted rather than being copied from srcReg. -func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:106532:20: */ +func Xsqlite3ExprCodeExprList(tls *libc.TLS, pParse uintptr, pList uintptr, target int32, srcReg int32, flags U8) int32 { /* sqlite3.c:106542:20: */ var pItem uintptr var i int32 var j int32 @@ -86754,7 +86759,7 @@ __3: // sqlite3ExprIfFalse: Jump to dest if false // // The jumpIfNull parameter is ignored if xJumpIf is NULL. -func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:106607:13: */ +func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, xJump uintptr, jumpIfNull int32) { /* sqlite3.c:106617:13: */ bp := tls.Alloc(160) defer tls.Free(160) @@ -86768,9 +86773,9 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x var pDel uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb - libc.Xmemset(tls, bp /* &compLeft */, 0, uint32(unsafe.Sizeof(Expr{}))) - libc.Xmemset(tls, bp+52 /* &compRight */, 0, uint32(unsafe.Sizeof(Expr{}))) - libc.Xmemset(tls, bp+104 /* &exprAnd */, 0, uint32(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp+52, 0, uint32(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp+104, 0, uint32(unsafe.Sizeof(Expr{}))) pDel = Xsqlite3ExprDup(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -86783,7 +86788,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x (*Expr)(unsafe.Pointer(bp + 52 /* &compRight */)).Fop = U8(TK_LE) (*Expr)(unsafe.Pointer(bp + 52 /* &compRight */)).FpLeft = pDel (*Expr)(unsafe.Pointer(bp + 52 /* &compRight */)).FpRight = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 20)) + 8 + 1*20)).FpExpr - exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+156 /* ®Free1 */)) + exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+156)) if xJump != 0 { (*struct { f func(*libc.TLS, uintptr, uintptr, int32, int32) @@ -86795,7 +86800,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // for clarity, but we are out of bits in the Expr.flags field so we // have to reuse the EP_FromJoin bit. Bummer. *(*U32)(unsafe.Pointer(pDel + 4)) |= U32(EP_FromJoin) - Xsqlite3ExprCodeTarget(tls, pParse, bp+104 /* &exprAnd */, dest) + Xsqlite3ExprCodeTarget(tls, pParse, bp+104, dest) } Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 156 /* regFree1 */))) } @@ -86817,7 +86822,7 @@ func exprCodeBetween(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, x // operation. Special comments in vdbe.c and the mkopcodeh.awk script in // the make process cause these values to align. Assert()s in the code // below verify that the numbers are aligned correctly. -func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:106679:21: */ +func Xsqlite3ExprIfTrue(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:106689:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -86976,8 +86981,8 @@ __15: __27: ; - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp /* ®Free1 */) - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+4 /* ®Free2 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+4) codeCompare(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2, dest, jumpIfNull, libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) @@ -86987,7 +86992,7 @@ __16: __17: ; - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -87025,7 +87030,7 @@ __28: // No-op goto __31 __30: - r1 = Xsqlite3ExprCodeTemp(tls, pParse, pExpr, bp /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, pExpr, bp) Xsqlite3VdbeAddOp3(tls, v, OP_If, r1, dest, libc.Bool32(jumpIfNull != 0)) __31: @@ -87047,7 +87052,7 @@ __3: // If the expression evaluates to NULL (neither true nor false) then // jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull // is 0. -func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:106821:21: */ +func Xsqlite3ExprIfFalse(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:106831:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -87228,8 +87233,8 @@ __15: __27: ; - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp /* ®Free1 */) - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+4 /* ®Free2 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+4) codeCompare(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2, dest, jumpIfNull, libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_Commuted) != U32(0))) @@ -87237,7 +87242,7 @@ __27: __16: __17: - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp) Xsqlite3VdbeAddOp2(tls, v, op, r1, dest) goto __3 @@ -87277,7 +87282,7 @@ __30: // no-op goto __33 __32: - r1 = Xsqlite3ExprCodeTemp(tls, pParse, pExpr, bp /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, pExpr, bp) Xsqlite3VdbeAddOp3(tls, v, OP_IfNot, r1, dest, libc.Bool32(jumpIfNull != 0)) __33: @@ -87295,7 +87300,7 @@ __3: // Like sqlite3ExprIfFalse() except that a copy is made of pExpr before // code generation, and that copy is deleted after code generation. This // ensures that the original pExpr is unchanged. -func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:106993:21: */ +func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, jumpIfNull int32) { /* sqlite3.c:107003:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pCopy uintptr = Xsqlite3ExprDup(tls, db, pExpr, 0) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 { @@ -87315,7 +87320,7 @@ func Xsqlite3ExprIfFalseDup(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest i // same as that currently bound to variable pVar, non-zero is returned. // Otherwise, if the values are not the same or if pExpr is not a simple // SQL value, zero is returned. -func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107015:12: */ +func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uintptr) int32 { /* sqlite3.c:107025:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -87324,7 +87329,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint var pL uintptr *(*uintptr)(unsafe.Pointer(bp /* pR */)) = uintptr(0) - Xsqlite3ValueFromExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp /* &pR */) + Xsqlite3ValueFromExpr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { iVar = int32((*Expr)(unsafe.Pointer(pVar)).FiColumn) Xsqlite3VdbeSetVarmask(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iVar) @@ -87369,7 +87374,7 @@ func exprCompareVariable(tls *libc.TLS, pParse uintptr, pVar uintptr, pExpr uint // If pParse is NULL (the normal case) then any TK_VARIABLE term in // Argument pParse should normally be NULL. If it is not NULL and pA or // pB causes a return value of 2. -func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107071:20: */ +func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107081:20: */ var combinedFlags U32 if pA == uintptr(0) || pB == uintptr(0) { if pB == pA { @@ -87473,7 +87478,7 @@ func Xsqlite3ExprCompare(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, // // Two NULL pointers are considered to be the same. But a NULL pointer // always differs from a non-NULL pointer. -func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107167:20: */ +func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107177:20: */ var i int32 if pA == uintptr(0) && pB == uintptr(0) { return 0 @@ -87500,7 +87505,7 @@ func Xsqlite3ExprListCompare(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // Like sqlite3ExprCompare() except COLLATE operators at the top-level // are ignored. -func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107186:20: */ +func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) int32 { /* sqlite3.c:107196:20: */ return Xsqlite3ExprCompare(tls, uintptr(0), Xsqlite3ExprSkipCollateAndLikely(tls, pA), Xsqlite3ExprSkipCollateAndLikely(tls, pB), @@ -87511,7 +87516,7 @@ func Xsqlite3ExprCompareSkip(tls *libc.TLS, pA uintptr, pB uintptr, iTab int32) // // Or if seenNot is true, return non-zero if Expr p can only be // non-NULL if pNN is not NULL -func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:107199:12: */ +func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, iTab int32, seenNot int32) int32 { /* sqlite3.c:107209:12: */ if Xsqlite3ExprCompare(tls, pParse, p, pNN, iTab) == 0 { return libc.Bool32(int32((*Expr)(unsafe.Pointer(pNN)).Fop) != TK_NULL) @@ -87637,7 +87642,7 @@ func exprImpliesNotNull(tls *libc.TLS, pParse uintptr, p uintptr, pNN uintptr, i // When in doubt, return false. Returning true might give a performance // improvement. Returning false might cause a performance reduction, but // it will always give the correct answer and is hence always safe. -func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:107296:20: */ +func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uintptr, iTab int32) int32 { /* sqlite3.c:107306:20: */ if Xsqlite3ExprCompare(tls, pParse, pE1, pE2, iTab) == 0 { return 1 } @@ -87660,7 +87665,7 @@ func Xsqlite3ExprImpliesExpr(tls *libc.TLS, pParse uintptr, pE1 uintptr, pE2 uin // This routine controls an optimization. False positives (setting // pWalker->eCode to 1 when it should not be) are deadly, but false-negatives // (never setting pWalker->eCode) is a harmless missed optimization. -func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107328:12: */ +func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107338:12: */ if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin) != U32(0) { return WRC_Prune @@ -87769,7 +87774,7 @@ func impliesNotNullRow(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // clause requires that some column of the right table of the LEFT JOIN // be non-NULL, then the LEFT JOIN can be safely converted into an // ordinary join. -func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:107437:20: */ +func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { /* sqlite3.c:107447:20: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -87796,14 +87801,14 @@ func Xsqlite3ExprImpliesNonNullRow(tls *libc.TLS, p uintptr, iTab int32) int32 { (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0) *(*int32)(unsafe.Pointer(bp + 24)) = iTab - Xsqlite3WalkExpr(tls, bp /* &w */, p) + Xsqlite3WalkExpr(tls, bp, p) return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) } // Check to see if there are references to columns in table // pWalker->u.pIdxCover->iCur can be satisfied using the index // pWalker->u.pIdxCover->pIdx. -func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107475:12: */ +func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107485:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FiCur && int32(Xsqlite3TableColumnToIndex(tls, (*IdxCover)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FpIdx, (*Expr)(unsafe.Pointer(pExpr)).FiColumn)) < 0 { @@ -87821,7 +87826,7 @@ func exprIdxCover(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqli // An index covering an expression means that the expression can be // evaluated using only the index and without having to lookup the // corresponding table entry. -func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:107496:20: */ +func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx uintptr) int32 { /* sqlite3.c:107506:20: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -87829,14 +87834,14 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // var xcov IdxCover at bp+28, 8 - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*IdxCover)(unsafe.Pointer(bp + 28 /* &xcov */)).FiCur = iCur (*IdxCover)(unsafe.Pointer(bp + 28 /* &xcov */)).FpIdx = pIdx (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{exprIdxCover})) *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 /* &xcov */ - Xsqlite3WalkExpr(tls, bp /* &w */, pExpr) + Xsqlite3WalkExpr(tls, bp, pExpr) return libc.BoolInt32(!((*Walker)(unsafe.Pointer(bp)).FeCode != 0)) } @@ -87846,7 +87851,7 @@ func Xsqlite3ExprCoveredByIndex(tls *libc.TLS, pExpr uintptr, iCur int32, pIdx u // entries for that subquery to the exclude list. // // When leaving the subquery, remove those entries from the exclude list. -func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:107531:12: */ +func selectRefEnter(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:107541:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc var i I64 @@ -87884,7 +87889,7 @@ __3: return WRC_Continue } -func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:107551:13: */ +func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:107561:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc if (*RefSrcList)(unsafe.Pointer(p)).FnExclude != 0 { @@ -87900,7 +87905,7 @@ func selectRefLeave(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite // // Set the 0x02 bit of pWalker->eCode if there is a reference to a // table is in neither RefSrcList.pRef nor RefSrcList.aiExclude. -func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107568:12: */ +func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107578:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN || int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_COLUMN { var i int32 @@ -87940,7 +87945,7 @@ func exprRefToSrcList(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // As currently used, pExpr is always an aggregate function call. That // fact is exploited for efficiency. -func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:107605:20: */ +func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSrcList uintptr) int32 { /* sqlite3.c:107615:20: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -87948,8 +87953,8 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // var x RefSrcList at bp+28, 20 - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) - libc.Xmemset(tls, bp+28 /* &x */, 0, uint32(unsafe.Sizeof(RefSrcList{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp+28, 0, uint32(unsafe.Sizeof(RefSrcList{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{exprRefToSrcList})) @@ -87963,9 +87968,9 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr (*RefSrcList)(unsafe.Pointer(bp + 28 /* &x */)).Fdb = (*Parse)(unsafe.Pointer(pParse)).Fdb (*RefSrcList)(unsafe.Pointer(bp + 28 /* &x */)).FpRef = pSrcList - Xsqlite3WalkExprList(tls, bp /* &w */, *(*uintptr)(unsafe.Pointer(pExpr + 20))) + Xsqlite3WalkExprList(tls, bp, *(*uintptr)(unsafe.Pointer(pExpr + 20))) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0) { - Xsqlite3WalkExpr(tls, bp /* &w */, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) + Xsqlite3WalkExpr(tls, bp, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*RefSrcList)(unsafe.Pointer(bp+28 /* &x */)).FaiExclude) if int32((*Walker)(unsafe.Pointer(bp)).FeCode)&0x01 != 0 { @@ -87989,7 +87994,7 @@ func Xsqlite3ReferencesSrcList(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSr // This will cause the expression to be deleted automatically when the // Parse object is destroyed, but the zero register number means that it // will not generate any code in the preamble. -func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107647:12: */ +func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107657:12: */ if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_TokenOnly|EP_Reduced) != U32(0)) && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo != uintptr(0) { var pAggInfo uintptr = (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo @@ -88022,7 +88027,7 @@ func agginfoPersistExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // Initialize a Walker object so that will persist AggInfo entries referenced // by the tree that is walked. -func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:107683:21: */ +func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uintptr) { /* sqlite3.c:107693:21: */ libc.Xmemset(tls, pWalker, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(pWalker)).FpParse = pParse (*Walker)(unsafe.Pointer(pWalker)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { @@ -88035,7 +88040,7 @@ func Xsqlite3AggInfoPersistWalkerInit(tls *libc.TLS, pWalker uintptr, pParse uin // Add a new element to the pAggInfo->aCol[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:107694:12: */ +func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:107704:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88046,13 +88051,13 @@ func addAggInfoColumn(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlit (*AggInfo)(unsafe.Pointer(pInfo)).FaCol, int32(unsafe.Sizeof(AggInfo_col{})), pInfo+32, - bp /* &i */) + bp) return *(*int32)(unsafe.Pointer(bp /* i */)) } // Add a new element to the pAggInfo->aFunc[] array. Return the index of // the new element. Return a negative number if malloc fails. -func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:107710:12: */ +func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3.c:107720:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -88063,14 +88068,14 @@ func addAggInfoFunc(tls *libc.TLS, db uintptr, pInfo uintptr) int32 { /* sqlite3 (*AggInfo)(unsafe.Pointer(pInfo)).FaFunc, int32(unsafe.Sizeof(AggInfo_func{})), pInfo+44, - bp /* &i */) + bp) return *(*int32)(unsafe.Pointer(bp /* i */)) } // This is the xExprCallback for a tree walker. It is used to // implement sqlite3ExprAnalyzeAggregates(). See sqlite3ExprAnalyzeAggregates // for additional information. -func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107727:12: */ +func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:107737:12: */ var i int32 var pNC uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*NameContext)(unsafe.Pointer(pNC)).FpParse @@ -88261,7 +88266,7 @@ func analyzeAggregate(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // // This routine should only be called after the expression has been // analyzed by sqlite3ResolveExprNames(). -func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:107865:21: */ +func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { /* sqlite3.c:107875:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -88280,14 +88285,14 @@ func Xsqlite3ExprAnalyzeAggregates(tls *libc.TLS, pNC uintptr, pExpr uintptr) { *(*uintptr)(unsafe.Pointer(bp + 24)) = pNC (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = uintptr(0) - Xsqlite3WalkExpr(tls, bp /* &w */, pExpr) + Xsqlite3WalkExpr(tls, bp, pExpr) } // Call sqlite3ExprAnalyzeAggregates() for every expression in an // expression list. Return the number of errors. // // If an error is found, the analysis is cut short. -func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:107883:21: */ +func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* sqlite3.c:107893:21: */ var pItem uintptr var i int32 if pList != 0 { @@ -88312,26 +88317,26 @@ func Xsqlite3ExprAnalyzeAggList(tls *libc.TLS, pNC uintptr, pList uintptr) { /* } // Allocate a single new register for use to hold some intermediate result. -func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:107896:20: */ +func Xsqlite3GetTempReg(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:107906:20: */ if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) == 0 { return libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) } - return *(*int32)(unsafe.Pointer(pParse + 144 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) + return *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PreDecUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) } // Deallocate a register, making available for reuse for some other // purpose. -func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:107907:21: */ +func Xsqlite3ReleaseTempReg(tls *libc.TLS, pParse uintptr, iReg int32) { /* sqlite3.c:107917:21: */ if iReg != 0 { if int32((*Parse)(unsafe.Pointer(pParse)).FnTempReg) < int32(uint32(unsafe.Sizeof([8]int32{}))/uint32(unsafe.Sizeof(int32(0)))) { - *(*int32)(unsafe.Pointer(pParse + 144 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg + *(*int32)(unsafe.Pointer(pParse + 152 + uintptr(libc.PostIncUint8(&(*Parse)(unsafe.Pointer(pParse)).FnTempReg, 1))*4)) = iReg } } } // Allocate or deallocate a block of nReg consecutive registers. -func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:107919:20: */ +func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* sqlite3.c:107929:20: */ var i int32 var n int32 if nReg == 1 { @@ -88349,7 +88354,7 @@ func Xsqlite3GetTempRange(tls *libc.TLS, pParse uintptr, nReg int32) int32 { /* return i } -func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:107933:21: */ +func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg int32) { /* sqlite3.c:107943:21: */ if nReg == 1 { Xsqlite3ReleaseTempReg(tls, pParse, iReg) return @@ -88367,7 +88372,7 @@ func Xsqlite3ReleaseTempRange(tls *libc.TLS, pParse uintptr, iReg int32, nReg in // that might be invoked from other parts of the code, to ensure that // the sub/co-routine does not use registers in common with the code that // invokes the sub/co-routine. -func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:107953:21: */ +func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:107963:21: */ (*Parse)(unsafe.Pointer(pParse)).FnTempReg = U8(0) (*Parse)(unsafe.Pointer(pParse)).FnRangeReg = 0 } @@ -88401,15 +88406,15 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:107 // in pParse->zErr (system tables may not be altered) and returns non-zero. // // Or, if zName is not a system table, zero is returned. -func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108013:12: */ +func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:108023:12: */ bp := tls.Alloc(8) defer tls.Free(8) - if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+7997, 7) || + if 0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Eponymous) != U32(0) || (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Shadow) != U32(0) && Xsqlite3ReadOnlyShadowTables(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+8005 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8027, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -88420,21 +88425,21 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // called at the end of the generation of an ALTER TABLE ... RENAME ... // statement to ensure that the operation has not rendered any schema // objects unusable. -func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108035:13: */ +func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:108045:13: */ bp := tls.Alloc(64) defer tls.Free(64) (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, - ts+8033, /* "SELECT 1 FROM \"%..." */ + ts+8055, libc.VaList(bp, zDb, zDb, bTemp, zWhen, bNoDQS)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8208, /* "SELECT 1 FROM te..." */ + ts+8230, libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -88444,23 +88449,23 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // database zDb with their single-quoted equivalents. If argument bTemp is // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. -func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108072:13: */ +func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:108082:13: */ bp := tls.Alloc(16) defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, - ts+8382 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp, zDb, zDb)) + ts+8404, libc.VaList(bp, zDb, zDb)) if bTemp == 0 { Xsqlite3NestedParse(tls, pParse, - ts+8529 /* "UPDATE temp.sqli..." */, 0) + ts+8551, 0) } } // Generate code to reload the schema for database iDb. And, if iDb!=1, for // the temp database as well. -func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108093:13: */ +func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* sqlite3.c:108103:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if v != 0 { Xsqlite3ChangeCookie(tls, pParse, iDb) @@ -88473,7 +88478,7 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. -func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108106:21: */ +func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:108116:21: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -88525,7 +88530,7 @@ __3: goto __4 } Xsqlite3ErrorMsg(tls, pParse, - ts+8680 /* "there is already..." */, libc.VaList(bp, zName)) + ts+8702, libc.VaList(bp, zName)) goto exit_rename_table __4: ; @@ -88538,7 +88543,7 @@ __4: goto exit_rename_table __5: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8739, zName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+8761, zName)) { goto __6 } goto exit_rename_table @@ -88548,7 +88553,7 @@ __6: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+8745 /* "view %s may not ..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+8767, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -88601,24 +88606,24 @@ __12: // the schema to use the new table name. Xsqlite3NestedParse(tls, pParse, - ts+8772 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) + ts+8794, libc.VaList(bp+16, zDb, zDb, zTabName, zName, libc.Bool32(iDb == 1), zTabName)) // Update the tbl_name and name columns of the sqlite_schema table // as required. Xsqlite3NestedParse(tls, pParse, - ts+8956, /* "UPDATE %Q.sqlite..." */ + ts+8978, libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) // If the sqlite_sequence table exists in this database, then update // it with the new table name. - if !(Xsqlite3FindTable(tls, db, ts+9261, zDb) != 0) { + if !(Xsqlite3FindTable(tls, db, ts+9283, zDb) != 0) { goto __13 } Xsqlite3NestedParse(tls, pParse, - ts+9277, /* "UPDATE \"%w\".sqli..." */ + ts+9299, libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -88631,7 +88636,7 @@ __13: } Xsqlite3NestedParse(tls, pParse, - ts+9335 /* "UPDATE sqlite_te..." */, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9357, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; @@ -88649,7 +88654,7 @@ __15: ; renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9600 /* "after rename" */, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+9622, 0) exit_rename_table: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -88658,12 +88663,12 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. -func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:108275:13: */ +func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:108285:13: */ bp := tls.Alloc(24) defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, - ts+9613, /* "SELECT raise(ABO..." */ + ts+9635, libc.VaList(bp, zErr, zDb, zTab)) } @@ -88673,7 +88678,7 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // // The Table structure pParse->pNewTable was extended to include // the new column during parsing. -func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:108295:21: */ +func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:108305:21: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -88711,12 +88716,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // If there is a NOT NULL constraint, then the default value for the // column must not be NULL. if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+9651 /* "Cannot add a PRI..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+9673, 0) return } if (*Table)(unsafe.Pointer(pNew)).FpIndex != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+9683 /* "Cannot add a UNI..." */, 0) + ts+9705, 0) return } if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED == 0 { @@ -88730,11 +88735,11 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && *(*uintptr)(unsafe.Pointer(pNew + 44 + 4)) != 0 && pDflt != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9710 /* "Cannot add a REF..." */) + ts+9732) } if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && !(pDflt != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9769 /* "Cannot add a NOT..." */) + ts+9791) } // Ensure the default expression is something that sqlite3ValueFromExpr() @@ -88742,7 +88747,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr if pDflt != 0 { *(*uintptr)(unsafe.Pointer(bp + 56 /* pVal */)) = uintptr(0) var rc int32 - rc = Xsqlite3ValueFromExpr(tls, db, pDflt, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp+56 /* &pVal */) + rc = Xsqlite3ValueFromExpr(tls, db, pDflt, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp+56) if rc != SQLITE_OK { @@ -88750,12 +88755,12 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr } if !(*(*uintptr)(unsafe.Pointer(bp + 56)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, - ts+9822 /* "Cannot add a col..." */) + ts+9844) } Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pVal */))) } } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_STORED != 0 { - sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9868 /* "cannot add a STO..." */) + sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+9890) } // Modify the CREATE TABLE statement. @@ -88770,7 +88775,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr Xsqlite3NestedParse(tls, pParse, - ts+9895, /* "UPDATE \"%w\".sqli..." */ + ts+9917, libc.VaList(bp, zDb, *(*int32)(unsafe.Pointer(pNew + 44)), zCol, *(*int32)(unsafe.Pointer(pNew + 44)), zTab)) Xsqlite3DbFree(tls, db, zCol) @@ -88798,7 +88803,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 && int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3NestedParse(tls, pParse, - ts+10041, /* "SELECT CASE WHEN..." */ + ts+10063, libc.VaList(bp+40, zTab, zDb)) } } @@ -88817,7 +88822,7 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. -func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:108458:21: */ +func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:108468:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -88849,7 +88854,7 @@ __2: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+10275 /* "virtual tables m..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10297, 0) goto exit_begin_add_column __3: ; @@ -88858,7 +88863,7 @@ __3: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+10309 /* "Cannot add a col..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+10331, 0) goto exit_begin_add_column __4: ; @@ -88893,7 +88898,7 @@ __6: nAlloc = (int32((*Table)(unsafe.Pointer(pNew)).FnCol)-1)/8*8 + 8 (*Table)(unsafe.Pointer(pNew)).FaCol = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(Column{}))*uint32(nAlloc))) - (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10339 /* "sqlite_altertab_..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + (*Table)(unsafe.Pointer(pNew)).FzName = Xsqlite3MPrintf(tls, db, ts+10361, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(!(int32((*Table)(unsafe.Pointer(pNew)).FaCol) != 0) || !(int32((*Table)(unsafe.Pointer(pNew)).FzName) != 0)) { goto __7 } @@ -88934,24 +88939,24 @@ exit_begin_add_column: // it loads an error message into pParse and returns non-zero. // // Or, if pTab is not a view or virtual table, zero is returned. -func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:108541:12: */ +func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:108551:12: */ bp := tls.Alloc(24) defer tls.Free(24) var zType uintptr = uintptr(0) if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - zType = ts + 10358 /* "view" */ + zType = ts + 10380 /* "view" */ } if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { - zType = ts + 10363 /* "virtual table" */ + zType = ts + 10385 /* "virtual table" */ } if zType != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+10377, /* "cannot %s %s \"%s..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+10399, libc.VaList(bp, func() uintptr { if bDrop != 0 { - return ts + 10395 /* "drop column from" */ + return ts + 10417 /* "drop column from" */ } - return ts + 10412 /* "rename columns o..." */ + return ts + 10434 /* "rename columns o..." */ }(), zType, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 @@ -88962,7 +88967,7 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // Handles the following parser reduction: // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew -func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:108571:21: */ +func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:108581:21: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -89044,13 +89049,13 @@ __8: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+6230 /* "no such column: ..." */, libc.VaList(bp, zOld)) + Xsqlite3ErrorMsg(tls, pParse, ts+6252, libc.VaList(bp, zOld)) goto exit_rename_column __10: ; // Ensure the schema contains no double-quoted strings - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1543 /* "" */, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+1565, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iSchema == 1)) // Do the rename operation using a recursive UPDATE statement that @@ -89068,19 +89073,19 @@ __11: bQuote = int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(pNew)).Fz)))]) & 0x80 Xsqlite3NestedParse(tls, pParse, - ts+10430, /* "UPDATE \"%w\".sqli..." */ + ts+10452, libc.VaList(bp+8, zDb, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, libc.Bool32(iSchema == 1), (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3NestedParse(tls, pParse, - ts+10612, /* "UPDATE temp.sqli..." */ + ts+10634, libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9600 /* "after rename" */, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iSchema == 1), ts+9622, 1) exit_rename_column: Xsqlite3SrcListDelete(tls, db, pSrc) @@ -89091,7 +89096,7 @@ exit_rename_column: // The context of an ALTER TABLE RENAME COLUMN operation that gets passed // down into the Walker. -type RenameCtx = RenameCtx1 /* sqlite3.c:108686:26 */ +type RenameCtx = RenameCtx1 /* sqlite3.c:108696:26 */ // Remember that the parser tree element pPtr was created using // the token pToken. @@ -89103,7 +89108,7 @@ type RenameCtx = RenameCtx1 /* sqlite3.c:108686:26 */ // The pPtr argument is returned so that this routine can be used // with tail recursion in tokenExpr() routine, for a small performance // improvement. -func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:108747:27: */ +func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken uintptr) uintptr { /* sqlite3.c:108757:27: */ var pNew uintptr if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) != PARSE_MODE_UNMAP { @@ -89122,7 +89127,7 @@ func Xsqlite3RenameTokenMap(tls *libc.TLS, pParse uintptr, pPtr uintptr, pToken // It is assumed that there is already a RenameToken object associated // with parse tree element pFrom. This function remaps the associated token // to parse tree element pTo. -func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:108773:21: */ +func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:108783:21: */ var p uintptr for p = (*Parse)(unsafe.Pointer(pParse)).FpRename; p != 0; p = (*RenameToken)(unsafe.Pointer(p)).FpNext { @@ -89134,7 +89139,7 @@ func Xsqlite3RenameTokenRemap(tls *libc.TLS, pParse uintptr, pTo uintptr, pFrom } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108787:12: */ +func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108797:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), pExpr) if (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) { @@ -89145,7 +89150,7 @@ func renameUnmapExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // Iterate through the Select objects that are part of WITH clauses attached // to select statement pSelect. -func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108800:13: */ +func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite3.c:108810:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -89168,10 +89173,10 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite var p uintptr = (*Cte)(unsafe.Pointer(pWith + 12 + uintptr(i)*24)).FpSelect // var sNC NameContext at bp, 32 - libc.Xmemset(tls, bp /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse if pCopy != 0 { - Xsqlite3SelectPrep(tls, (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse, p, bp /* &sNC */) + Xsqlite3SelectPrep(tls, (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse, p, bp) } if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*NameContext)(unsafe.Pointer(bp)).FpParse)).Fdb)).FmallocFailed != 0 { return @@ -89186,7 +89191,7 @@ func renameWalkWith(tls *libc.TLS, pWalker uintptr, pSelect uintptr) { /* sqlite } // Unmap all tokens in the IdList object passed as the second argument. -func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:108835:13: */ +func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* sqlite3.c:108845:13: */ if pIdList != 0 { var ii int32 for ii = 0; ii < (*IdList)(unsafe.Pointer(pIdList)).FnId; ii++ { @@ -89196,7 +89201,7 @@ func unmapColumnIdlistNames(tls *libc.TLS, pParse uintptr, pIdList uintptr) { /* } // Walker callback used by sqlite3RenameExprUnmap(). -func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:108850:12: */ +func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:108860:12: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { @@ -89228,14 +89233,14 @@ func renameUnmapSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* s } // Remove all nodes that are part of expression pExpr from the rename list. -func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:108883:21: */ +func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* sqlite3.c:108893:21: */ bp := tls.Alloc(28) defer tls.Free(28) var eMode U8 = (*Parse)(unsafe.Pointer(pParse)).FeParseMode // var sWalker Walker at bp, 28 - libc.Xmemset(tls, bp /* &sWalker */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -89244,13 +89249,13 @@ func Xsqlite3RenameExprUnmap(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* f func(*libc.TLS, uintptr, uintptr) int32 }{renameUnmapSelectCb})) (*Parse)(unsafe.Pointer(pParse)).FeParseMode = U8(PARSE_MODE_UNMAP) - Xsqlite3WalkExpr(tls, bp /* &sWalker */, pExpr) + Xsqlite3WalkExpr(tls, bp, pExpr) (*Parse)(unsafe.Pointer(pParse)).FeParseMode = eMode } // Remove all nodes that are part of expression-list pEList from the // rename list. -func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:108899:21: */ +func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) { /* sqlite3.c:108909:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -89258,12 +89263,12 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) var i int32 // var sWalker Walker at bp, 28 - libc.Xmemset(tls, bp /* &sWalker */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{renameUnmapExprCb})) - Xsqlite3WalkExprList(tls, bp /* &sWalker */, pEList) + Xsqlite3WalkExprList(tls, bp, pEList) for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { if int32(*(*uint8)(unsafe.Pointer(pEList + 8 + uintptr(i)*20 + 12))&0x3>>0) == ENAME_NAME { Xsqlite3RenameTokenRemap(tls, pParse, uintptr(0), (*ExprList_item)(unsafe.Pointer(pEList+8+uintptr(i)*20)).FzEName) @@ -89273,7 +89278,7 @@ func Xsqlite3RenameExprlistUnmap(tls *libc.TLS, pParse uintptr, pEList uintptr) } // Free the list of RenameToken objects given in the second argument -func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:108918:13: */ +func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:108928:13: */ var pNext uintptr var p uintptr for p = pToken; p != 0; p = pNext { @@ -89289,7 +89294,7 @@ func renameTokenFree(tls *libc.TLS, db uintptr, pToken uintptr) { /* sqlite3.c:1 // If the second argument passed to this function is not NULL and a matching // RenameToken object is found, remove it from the Parse object and add it to // the list maintained by the RenameCtx object. -func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:108936:20: */ +func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) uintptr { /* sqlite3.c:108946:20: */ var pp uintptr if pPtr == uintptr(0) { return uintptr(0) @@ -89312,7 +89317,7 @@ func renameTokenFind(tls *libc.TLS, pParse uintptr, pCtx uintptr, pPtr uintptr) // This is a Walker select callback. It does nothing. It is only required // because without a dummy callback, sqlite3WalkExpr() and similar do not // descend into sub-select statements. -func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:108965:12: */ +func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:108975:12: */ if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_View|SF_CopyCte) != 0 { return WRC_Prune @@ -89328,7 +89333,7 @@ func renameColumnSelectCb(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* // ALTER TABLE statement. If it is, then attach its associated // RenameToken object to the list of RenameToken objects being // constructed in RenameCtx object at pWalker->u.pRename. -func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108984:12: */ +func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:108994:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_TRIGGER && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*RenameCtx)(unsafe.Pointer(p)).FiCol && @@ -89350,7 +89355,7 @@ func renameColumnExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { / // the input SQL is parsed from left to right. Repeated calls to this routine // return all column name tokens in the order that they are encountered // in the SQL statement. -func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109010:20: */ +func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:109020:20: */ var pBest uintptr = (*RenameCtx)(unsafe.Pointer(pCtx)).FpList var pToken uintptr var pp uintptr @@ -89372,7 +89377,7 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // ALTER TABLE RENAME COLUMN program. The error message emitted by the // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. -func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109031:13: */ +func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:109041:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -89380,12 +89385,12 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui var zN uintptr = Xsqlite3_value_text(tls, pObject) var zErr uintptr - zErr = Xsqlite3_mprintf(tls, ts+10743, /* "error in %s %s%s..." */ + zErr = Xsqlite3_mprintf(tls, ts+10765, libc.VaList(bp, zT, zN, func() uintptr { if *(*int8)(unsafe.Pointer(zWhen)) != 0 { - return ts + 10766 /* " " */ + return ts + 10788 /* " " */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), zWhen, (*Parse)(unsafe.Pointer(pParse)).FzErrMsg)) Xsqlite3_result_error(tls, pCtx, zErr, -1) @@ -89396,7 +89401,7 @@ func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType ui // pEList->a[i].zName) that matches the string in zOld, extract the // corresponding rename-token from Parse object pParse and add it // to the RenameCtx pCtx. -func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109056:13: */ +func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList uintptr, zOld uintptr) { /* sqlite3.c:109066:13: */ if pEList != 0 { var i int32 for i = 0; i < (*ExprList)(unsafe.Pointer(pEList)).FnExpr; i++ { @@ -89413,7 +89418,7 @@ func renameColumnElistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pEList // For each name in the the id-list pIdList (i.e. each pIdList->a[i].zName) // that matches the string in zOld, extract the corresponding rename-token // from Parse object pParse and add it to the RenameCtx pCtx. -func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109081:13: */ +func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdList uintptr, zOld uintptr) { /* sqlite3.c:109091:13: */ if pIdList != 0 { var i int32 for i = 0; i < (*IdList)(unsafe.Pointer(pIdList)).FnId; i++ { @@ -89427,7 +89432,7 @@ func renameColumnIdlistNames(tls *libc.TLS, pParse uintptr, pCtx uintptr, pIdLis // Parse the SQL statement zSql using Parse object (*p). The Parse object // is initialized by this function before it is used. -func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109103:12: */ +func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uintptr, bTemp int32) int32 { /* sqlite3.c:109113:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -89449,7 +89454,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint (*Parse)(unsafe.Pointer(p)).Fdb = db (*Parse)(unsafe.Pointer(p)).FnQueryLoop = U32(1) if zSql != 0 { - rc = Xsqlite3RunParser(tls, p, zSql, bp /* &zErr */) + rc = Xsqlite3RunParser(tls, p, zSql, bp) } else { rc = SQLITE_NOMEM } @@ -89460,7 +89465,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint } if rc == SQLITE_OK && (*Parse)(unsafe.Pointer(p)).FpNewTable == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewIndex == uintptr(0) && (*Parse)(unsafe.Pointer(p)).FpNewTrigger == uintptr(0) { - rc = Xsqlite3CorruptError(tls, 109130) + rc = Xsqlite3CorruptError(tls, 109140) } (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(0) @@ -89474,7 +89479,7 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. -func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109158:12: */ +func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:109168:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -89494,7 +89499,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // ALTER TABLE statement was quoted (bQuote==1), then set zNew to // point to zQuot so that all substitutions are made using the // quoted version of the new column name. - zQuot = Xsqlite3MPrintf(tls, db, ts+10768 /* "\"%w\" " */, libc.VaList(bp, zNew)) + zQuot = Xsqlite3MPrintf(tls, db, ts+10790, libc.VaList(bp, zNew)) if zQuot == uintptr(0) { return SQLITE_NOMEM } else { @@ -89544,12 +89549,12 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10774 /* "%Q%s" */, libc.VaList(bp+8, zBuf1, + Xsqlite3_snprintf(tls, int32(nSql*int64(2)), zBuf2, ts+10796, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { - return ts + 10766 /* " " */ + return ts + 10788 /* " " */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }())) zReplace = zBuf2 nReplace = U32(Xsqlite3Strlen30(tls, zReplace)) @@ -89580,7 +89585,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z // it was read from the schema of database zDb. Return SQLITE_OK if // successful. Otherwise, return an SQLite error code and leave an error // message in the Parse object. -func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:109265:12: */ +func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:109275:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -89591,7 +89596,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:10 var rc int32 = SQLITE_OK - libc.Xmemset(tls, bp /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = pParse (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = Xsqlite3FindTable(tls, db, (*Trigger)(unsafe.Pointer(pNew)).Ftable, @@ -89605,12 +89610,12 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:10 // Resolve symbols in WHEN clause if rc == SQLITE_OK && (*Trigger)(unsafe.Pointer(pNew)).FpWhen != 0 { - rc = Xsqlite3ResolveExprNames(tls, bp /* &sNC */, (*Trigger)(unsafe.Pointer(pNew)).FpWhen) + rc = Xsqlite3ResolveExprNames(tls, bp, (*Trigger)(unsafe.Pointer(pNew)).FpWhen) } for pStep = (*Trigger)(unsafe.Pointer(pNew)).Fstep_list; rc == SQLITE_OK && pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { if (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect != 0 { - Xsqlite3SelectPrep(tls, pParse, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect, bp /* &sNC */) + Xsqlite3SelectPrep(tls, pParse, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect, bp) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(pParse)).Frc } @@ -89642,10 +89647,10 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:10 } (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = pSrc if rc == SQLITE_OK && (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere != 0 { - rc = Xsqlite3ResolveExprNames(tls, bp /* &sNC */, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) + rc = Xsqlite3ResolveExprNames(tls, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) } if rc == SQLITE_OK { - rc = Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) + rc = Xsqlite3ResolveExprListNames(tls, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList) } if (*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert != 0 && rc == SQLITE_OK { @@ -89653,16 +89658,16 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:10 (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSrc = pSrc *(*uintptr)(unsafe.Pointer(bp + 8)) = pUpsert (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = NC_UUpsert - rc = Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) + rc = Xsqlite3ResolveExprListNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) if rc == SQLITE_OK { var pUpsertSet uintptr = (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertSet - rc = Xsqlite3ResolveExprListNames(tls, bp /* &sNC */, pUpsertSet) + rc = Xsqlite3ResolveExprListNames(tls, bp, pUpsertSet) } if rc == SQLITE_OK { - rc = Xsqlite3ResolveExprNames(tls, bp /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertWhere) + rc = Xsqlite3ResolveExprNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertWhere) } if rc == SQLITE_OK { - rc = Xsqlite3ResolveExprNames(tls, bp /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) + rc = Xsqlite3ResolveExprNames(tls, bp, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) } (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FncFlags = 0 } @@ -89678,7 +89683,7 @@ func renameResolveTrigger(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:10 // Invoke sqlite3WalkExpr() or sqlite3WalkSelect() on all Select or Expr // objects that are part of the trigger passed as the second argument. -func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:109361:13: */ +func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sqlite3.c:109371:13: */ var pStep uintptr // Find tokens to edit in WHEN clause @@ -89707,7 +89712,7 @@ func renameWalkTrigger(tls *libc.TLS, pWalker uintptr, pTrigger uintptr) { /* sq // Free the contents of Parse object (*pParse). Do not free the memory // occupied by the Parse object itself. -func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:109392:13: */ +func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:109402:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pIdx uintptr if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { @@ -89745,7 +89750,7 @@ func renameParseCleanup(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:109392:13: // This function is used internally by the ALTER TABLE RENAME COLUMN command. // It is only accessible to SQL created using sqlite3NestedParse(). It is // not reachable from ordinary SQL passed into sqlite3_prepare(). -func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109432:13: */ +func renameColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109442:13: */ bp := tls.Alloc(316) defer tls.Free(316) @@ -89823,7 +89828,7 @@ __4: __5: ; zOld = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName - libc.Xmemset(tls, bp /* &sCtx */, 0, uint32(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(RenameCtx{}))) (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FiCol = func() int32 { if iCol == int32((*Table)(unsafe.Pointer(pTab)).FiPKey) { return -1 @@ -89832,10 +89837,10 @@ __5: }() (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) - rc = renameParseSql(tls, bp+20 /* &sParse */, zDb, db, zSql, bTemp) + rc = renameParseSql(tls, bp+20, zDb, db, zSql, bTemp) // Find tokens that need to be replaced. - libc.Xmemset(tls, bp+288 /* &sWalker */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp+288, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp + 288 /* &sWalker */)).FpParse = bp + 20 /* &sParse */ (*Walker)(unsafe.Pointer(bp + 288 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -89861,7 +89866,7 @@ __6: pSelect = *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable + 44)) *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) (*Parse)(unsafe.Pointer(bp + 20 /* &sParse */)).Frc = SQLITE_OK - Xsqlite3SelectPrep(tls, bp+20 /* &sParse */, pSelect, uintptr(0)) + Xsqlite3SelectPrep(tls, bp+20, pSelect, uintptr(0)) rc = func() int32 { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -89871,7 +89876,7 @@ __6: if !(rc == SQLITE_OK) { goto __11 } - Xsqlite3WalkSelect(tls, bp+288 /* &sWalker */, pSelect) + Xsqlite3WalkSelect(tls, bp+288, pSelect) __11: ; if !(rc != SQLITE_OK) { @@ -89895,22 +89900,22 @@ __9: goto __15 } renameTokenFind(tls, - bp+20 /* &sParse */, bp /* &sCtx */, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTable)).FaCol+uintptr(iCol)*16)).FzCnName) + bp+20, bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTable)).FaCol+uintptr(iCol)*16)).FzCnName) __15: ; if !((*RenameCtx)(unsafe.Pointer(bp)).FiCol < 0) { goto __16 } - renameTokenFind(tls, bp+20 /* &sParse */, bp /* &sCtx */, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable+32) + renameTokenFind(tls, bp+20, bp, (*Parse)(unsafe.Pointer(bp+20)).FpNewTable+32) __16: ; - Xsqlite3WalkExprList(tls, bp+288 /* &sWalker */, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+288, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTable)).FpCheck) pIdx = (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp + 20 /* &sParse */)).FpNewTable)).FpIndex __17: if !(pIdx != 0) { goto __19 } - Xsqlite3WalkExprList(tls, bp+288 /* &sWalker */, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+288, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __18 __18: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -89923,7 +89928,7 @@ __20: if !(pIdx != 0) { goto __22 } - Xsqlite3WalkExprList(tls, bp+288 /* &sWalker */, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) + Xsqlite3WalkExprList(tls, bp+288, (*Index)(unsafe.Pointer(pIdx)).FaColExpr) goto __21 __21: pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext @@ -89938,7 +89943,7 @@ __23: } pExpr = Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20)).FpNewTable)).FaCol+uintptr(i)*16) - Xsqlite3WalkExpr(tls, bp+288 /* &sWalker */, pExpr) + Xsqlite3WalkExpr(tls, bp+288, pExpr) goto __24 __24: i++ @@ -89962,14 +89967,14 @@ __29: if !(bFKOnly == 0 && (*sColMap)(unsafe.Pointer(pFKey+36+uintptr(i)*8)).FiFrom == iCol) { goto __32 } - renameTokenFind(tls, bp+20 /* &sParse */, bp /* &sCtx */, pFKey+36+uintptr(i)*8) + renameTokenFind(tls, bp+20, bp, pFKey+36+uintptr(i)*8) __32: ; if !(0 == Xsqlite3_stricmp(tls, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zTable) && 0 == Xsqlite3_stricmp(tls, (*sColMap)(unsafe.Pointer(pFKey+36+uintptr(i)*8)).FzCol, zOld)) { goto __33 } - renameTokenFind(tls, bp+20 /* &sParse */, bp /* &sCtx */, (*sColMap)(unsafe.Pointer(pFKey+36+uintptr(i)*8)).FzCol) + renameTokenFind(tls, bp+20, bp, (*sColMap)(unsafe.Pointer(pFKey+36+uintptr(i)*8)).FzCol) __33: ; goto __30 @@ -89995,11 +90000,11 @@ __7: if !((*Parse)(unsafe.Pointer(bp+20)).FpNewIndex != 0) { goto __34 } - Xsqlite3WalkExprList(tls, bp+288 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+288 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+288, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+288, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewIndex)).FpPartIdxWhere) goto __35 __34: - rc = renameResolveTrigger(tls, bp+20 /* &sParse */) + rc = renameResolveTrigger(tls, bp+20) if !(rc != SQLITE_OK) { goto __36 } @@ -90015,7 +90020,7 @@ __37: if !((*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0) { goto __40 } - pTarget = Xsqlite3LocateTable(tls, bp+20 /* &sParse */, uint32(0), (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zDb) + pTarget = Xsqlite3LocateTable(tls, bp+20, uint32(0), (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zDb) if !(pTarget == pTab) { goto __41 } @@ -90023,11 +90028,11 @@ __37: goto __42 } pUpsertSet = (*Upsert)(unsafe.Pointer((*TriggerStep)(unsafe.Pointer(pStep)).FpUpsert)).FpUpsertSet - renameColumnElistNames(tls, bp+20 /* &sParse */, bp /* &sCtx */, pUpsertSet, zOld) + renameColumnElistNames(tls, bp+20, bp, pUpsertSet, zOld) __42: ; - renameColumnIdlistNames(tls, bp+20 /* &sParse */, bp /* &sCtx */, (*TriggerStep)(unsafe.Pointer(pStep)).FpIdList, zOld) - renameColumnElistNames(tls, bp+20 /* &sParse */, bp /* &sCtx */, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList, zOld) + renameColumnIdlistNames(tls, bp+20, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpIdList, zOld) + renameColumnElistNames(tls, bp+20, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FpExprList, zOld) __41: ; __40: @@ -90044,18 +90049,18 @@ __39: if !((*Parse)(unsafe.Pointer(bp+20)).FpTriggerTab == pTab) { goto __43 } - renameColumnIdlistNames(tls, bp+20 /* &sParse */, bp /* &sCtx */, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTrigger)).FpColumns, zOld) + renameColumnIdlistNames(tls, bp+20, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTrigger)).FpColumns, zOld) __43: ; // Find tokens to edit in various expressions and selects - renameWalkTrigger(tls, bp+288 /* &sWalker */, (*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTrigger) + renameWalkTrigger(tls, bp+288, (*Parse)(unsafe.Pointer(bp+20 /* &sParse */)).FpNewTrigger) __35: ; __8: ; - rc = renameEditSql(tls, context, bp /* &sCtx */, zSql, zNew, bQuote) + rc = renameEditSql(tls, context, bp, zSql, zNew, bQuote) renameColumnFunc_done: if !(rc != SQLITE_OK) { @@ -90064,7 +90069,7 @@ renameColumnFunc_done: if !((*Parse)(unsafe.Pointer(bp+20)).FzErrMsg != 0) { goto __45 } - renameColumnParseError(tls, context, ts+1543 /* "" */, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20 /* &sParse */) + renameColumnParseError(tls, context, ts+1565, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+20) goto __46 __45: Xsqlite3_result_error_code(tls, context, rc) @@ -90073,14 +90078,14 @@ __46: __44: ; - renameParseCleanup(tls, bp+20 /* &sParse */) + renameParseCleanup(tls, bp+20) renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpList) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth Xsqlite3BtreeLeaveAll(tls, db) } // Walker expression callback used by "RENAME TABLE". -func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109597:12: */ +func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109607:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc|EP_Subrtn) == U32(0) && @@ -90091,7 +90096,7 @@ func renameTableExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* } // Walker select callback used by "RENAME TABLE". -func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:109611:12: */ +func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:109621:12: */ var i int32 var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSrc uintptr = (*Select)(unsafe.Pointer(pSelect)).FpSrc @@ -90131,7 +90136,7 @@ func renameTableSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 // // sqlite_rename_table('main', 'CREATE TABLE t1(a REFERENCES t2)','t2','t3',0) // -> 'CREATE TABLE t1(a REFERENCES t3)' -func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109655:13: */ +func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109665:13: */ bp := tls.Alloc(348) defer tls.Free(348) @@ -90157,9 +90162,9 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr Xsqlite3BtreeEnterAll(tls, db) - libc.Xmemset(tls, bp /* &sCtx */, 0, uint32(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(RenameCtx{}))) (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = Xsqlite3FindTable(tls, db, zOld, zDb) - libc.Xmemset(tls, bp+20 /* &sWalker */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp+20, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp + 20 /* &sWalker */)).FpParse = bp + 48 /* &sParse */ (*Walker)(unsafe.Pointer(bp + 20 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -90169,7 +90174,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr }{renameTableSelectCb})) *(*uintptr)(unsafe.Pointer(bp + 20 + 24)) = bp /* &sCtx */ - rc = renameParseSql(tls, bp+48 /* &sParse */, zDb, db, zInput, bTemp) + rc = renameParseSql(tls, bp+48, zDb, db, zInput, bTemp) if rc == SQLITE_OK { var isLegacy int32 = int32((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_LegacyAlter)) @@ -90181,15 +90186,15 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pTab + 44)) // var sNC NameContext at bp+316, 32 - libc.Xmemset(tls, bp+316 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+316, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 316 /* &sNC */)).FpParse = bp + 48 /* &sParse */ *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) - Xsqlite3SelectPrep(tls, bp+48 /* &sParse */, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+316 /* &sNC */) + Xsqlite3SelectPrep(tls, bp+48, *(*uintptr)(unsafe.Pointer(pTab + 44)), bp+316) if (*Parse)(unsafe.Pointer(bp+48)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).Frc } else { - Xsqlite3WalkSelect(tls, bp+20 /* &sWalker */, *(*uintptr)(unsafe.Pointer(pTab + 44))) + Xsqlite3WalkSelect(tls, bp+20, *(*uintptr)(unsafe.Pointer(pTab + 44))) } } } else { @@ -90200,7 +90205,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 44 + 4 /* &.pFKey */)); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom { if Xsqlite3_stricmp(tls, (*FKey)(unsafe.Pointer(pFKey)).FzTo, zOld) == 0 { - renameTokenFind(tls, bp+48 /* &sParse */, bp /* &sCtx */, (*FKey)(unsafe.Pointer(pFKey)).FzTo) + renameTokenFind(tls, bp+48, bp, (*FKey)(unsafe.Pointer(pFKey)).FzTo) } } } @@ -90211,31 +90216,31 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if Xsqlite3_stricmp(tls, zOld, (*Table)(unsafe.Pointer(pTab)).FzName) == 0 { (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpTab = pTab if isLegacy == 0 { - Xsqlite3WalkExprList(tls, bp+20 /* &sWalker */, (*Table)(unsafe.Pointer(pTab)).FpCheck) + Xsqlite3WalkExprList(tls, bp+20, (*Table)(unsafe.Pointer(pTab)).FpCheck) } - renameTokenFind(tls, bp+48 /* &sParse */, bp /* &sCtx */, (*Table)(unsafe.Pointer(pTab)).FzName) + renameTokenFind(tls, bp+48, bp, (*Table)(unsafe.Pointer(pTab)).FzName) } } } else if (*Parse)(unsafe.Pointer(bp+48)).FpNewIndex != 0 { - renameTokenFind(tls, bp+48 /* &sParse */, bp /* &sCtx */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+48 /* &sParse */)).FpNewIndex)).FzName) + renameTokenFind(tls, bp+48, bp, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+48 /* &sParse */)).FpNewIndex)).FzName) if isLegacy == 0 { - Xsqlite3WalkExpr(tls, bp+20 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+48 /* &sParse */)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExpr(tls, bp+20, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+48 /* &sParse */)).FpNewIndex)).FpPartIdxWhere) } } else { var pTrigger uintptr = (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FpNewTrigger var pStep uintptr if 0 == Xsqlite3_stricmp(tls, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+48)).FpNewTrigger)).Ftable, zOld) && (*Table)(unsafe.Pointer((*RenameCtx)(unsafe.Pointer(bp)).FpTab)).FpSchema == (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema { - renameTokenFind(tls, bp+48 /* &sParse */, bp /* &sCtx */, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+48 /* &sParse */)).FpNewTrigger)).Ftable) + renameTokenFind(tls, bp+48, bp, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+48 /* &sParse */)).FpNewTrigger)).Ftable) } if isLegacy == 0 { - rc = renameResolveTrigger(tls, bp+48 /* &sParse */) + rc = renameResolveTrigger(tls, bp+48) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+20 /* &sWalker */, pTrigger) + renameWalkTrigger(tls, bp+20, pTrigger) for pStep = (*Trigger)(unsafe.Pointer(pTrigger)).Fstep_list; pStep != 0; pStep = (*TriggerStep)(unsafe.Pointer(pStep)).FpNext { if (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget != 0 && 0 == Xsqlite3_stricmp(tls, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget, zOld) { - renameTokenFind(tls, bp+48 /* &sParse */, bp /* &sCtx */, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) + renameTokenFind(tls, bp+48, bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) } } } @@ -90244,17 +90249,17 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp /* &sCtx */, zInput, zNew, bQuote) + rc = renameEditSql(tls, context, bp, zInput, zNew, bQuote) } if rc != SQLITE_OK { if (*Parse)(unsafe.Pointer(bp+48)).FzErrMsg != 0 { - renameColumnParseError(tls, context, ts+1543 /* "" */, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48 /* &sParse */) + renameColumnParseError(tls, context, ts+1565, *(*uintptr)(unsafe.Pointer(argv + 1*4)), *(*uintptr)(unsafe.Pointer(argv + 2*4)), bp+48) } else { Xsqlite3_result_error_code(tls, context, rc) } } - renameParseCleanup(tls, bp+48 /* &sParse */) + renameParseCleanup(tls, bp+48) renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp /* &sCtx */)).FpList) Xsqlite3BtreeLeaveAll(tls, db) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth @@ -90263,7 +90268,7 @@ func renameTableFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr return } -func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109796:12: */ +func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:109806:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_STRING && (*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_DblQuoted) != 0 { renameTokenFind(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, *(*uintptr)(unsafe.Pointer(pWalker + 24)), pExpr) } @@ -90291,7 +90296,7 @@ func renameQuotefixExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // returns the string: // // CREATE VIEW v1 AS SELECT "a", 'string' FROM t1 -func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109826:13: */ +func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109836:13: */ bp := tls.Alloc(316) defer tls.Free(316) @@ -90309,7 +90314,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint var rc int32 // var sParse Parse at bp, 268 - rc = renameParseSql(tls, bp /* &sParse */, zDb, db, zInput, 0) + rc = renameParseSql(tls, bp, zDb, db, zInput, 0) if rc == SQLITE_OK { // var sCtx RenameCtx at bp+268, 20 @@ -90317,8 +90322,8 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // var sWalker Walker at bp+288, 28 // Walker to find tokens that need to be replaced. - libc.Xmemset(tls, bp+268 /* &sCtx */, 0, uint32(unsafe.Sizeof(RenameCtx{}))) - libc.Xmemset(tls, bp+288 /* &sWalker */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp+268, 0, uint32(unsafe.Sizeof(RenameCtx{}))) + libc.Xmemset(tls, bp+288, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp + 288 /* &sWalker */)).FpParse = bp /* &sParse */ (*Walker)(unsafe.Pointer(bp + 288 /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -90333,7 +90338,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint var pSelect uintptr = *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)) *(*U32)(unsafe.Pointer(pSelect + 4)) &= libc.Uint32FromInt32(libc.CplInt32(SF_View)) (*Parse)(unsafe.Pointer(bp /* &sParse */)).Frc = SQLITE_OK - Xsqlite3SelectPrep(tls, bp /* &sParse */, pSelect, uintptr(0)) + Xsqlite3SelectPrep(tls, bp, pSelect, uintptr(0)) rc = func() int32 { if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -90341,36 +90346,36 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint return (*Parse)(unsafe.Pointer(bp)).Frc }() if rc == SQLITE_OK { - Xsqlite3WalkSelect(tls, bp+288 /* &sWalker */, pSelect) + Xsqlite3WalkSelect(tls, bp+288, pSelect) } } else { var i int32 - Xsqlite3WalkExprList(tls, bp+288 /* &sWalker */, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FpCheck) + Xsqlite3WalkExprList(tls, bp+288, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FpCheck) for i = 0; i < int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable)).FnCol); i++ { - Xsqlite3WalkExpr(tls, bp+288, /* &sWalker */ + Xsqlite3WalkExpr(tls, bp+288, Xsqlite3ColumnExpr(tls, (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTable, (*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FaCol+uintptr(i)*16)) } } } else if (*Parse)(unsafe.Pointer(bp)).FpNewIndex != 0 { - Xsqlite3WalkExprList(tls, bp+288 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FaColExpr) - Xsqlite3WalkExpr(tls, bp+288 /* &sWalker */, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FpPartIdxWhere) + Xsqlite3WalkExprList(tls, bp+288, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FaColExpr) + Xsqlite3WalkExpr(tls, bp+288, (*Index)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewIndex)).FpPartIdxWhere) } else { - rc = renameResolveTrigger(tls, bp /* &sParse */) + rc = renameResolveTrigger(tls, bp) if rc == SQLITE_OK { - renameWalkTrigger(tls, bp+288 /* &sWalker */, (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTrigger) + renameWalkTrigger(tls, bp+288, (*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTrigger) } } if rc == SQLITE_OK { - rc = renameEditSql(tls, context, bp+268 /* &sCtx */, zInput, uintptr(0), 0) + rc = renameEditSql(tls, context, bp+268, zInput, uintptr(0), 0) } renameTokenFree(tls, db, (*RenameCtx)(unsafe.Pointer(bp+268 /* &sCtx */)).FpList) } if rc != SQLITE_OK { Xsqlite3_result_error_code(tls, context, rc) } - renameParseCleanup(tls, bp /* &sParse */) + renameParseCleanup(tls, bp) } (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth @@ -90397,7 +90402,7 @@ func renameQuotefixFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uint // // * the SQL argument creates a trigger, and // * the table that the trigger is attached to is in database zDb. -func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109932:13: */ +func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109942:13: */ bp := tls.Alloc(300) defer tls.Free(300) @@ -90422,21 +90427,21 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr if bNoDQS != 0 { *(*U64)(unsafe.Pointer(db + 28)) &= libc.Uint64FromInt32(libc.CplInt32(SQLITE_DqsDML | SQLITE_DqsDDL)) } - rc = renameParseSql(tls, bp /* &sParse */, zDb, db, zInput, bTemp) + rc = renameParseSql(tls, bp, zDb, db, zInput, bTemp) *(*U64)(unsafe.Pointer(db + 28)) |= U64(flags & (SQLITE_DqsDML | SQLITE_DqsDDL)) if rc == SQLITE_OK { if isLegacy == 0 && (*Parse)(unsafe.Pointer(bp)).FpNewTable != 0 && int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable)).FeTabType) == TABTYP_VIEW { // var sNC NameContext at bp+268, 32 - libc.Xmemset(tls, bp+268 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+268, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 268 /* &sNC */)).FpParse = bp /* &sParse */ - Xsqlite3SelectPrep(tls, bp /* &sParse */, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+268 /* &sNC */) + Xsqlite3SelectPrep(tls, bp, *(*uintptr)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp)).FpNewTable + 44)), bp+268) if (*Parse)(unsafe.Pointer(bp)).FnErr != 0 { rc = (*Parse)(unsafe.Pointer(bp /* &sParse */)).Frc } } else if (*Parse)(unsafe.Pointer(bp)).FpNewTrigger != 0 { if isLegacy == 0 { - rc = renameResolveTrigger(tls, bp /* &sParse */) + rc = renameResolveTrigger(tls, bp) } if rc == SQLITE_OK { var i1 int32 = Xsqlite3SchemaToIndex(tls, db, (*Trigger)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp /* &sParse */)).FpNewTrigger)).FpTabSchema) @@ -90449,9 +90454,9 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr } if rc != SQLITE_OK && zWhen != 0 { - renameColumnParseError(tls, context, zWhen, *(*uintptr)(unsafe.Pointer(argv + 2*4)), *(*uintptr)(unsafe.Pointer(argv + 3*4)), bp /* &sParse */) + renameColumnParseError(tls, context, zWhen, *(*uintptr)(unsafe.Pointer(argv + 2*4)), *(*uintptr)(unsafe.Pointer(argv + 3*4)), bp) } - renameParseCleanup(tls, bp /* &sParse */) + renameParseCleanup(tls, bp) } (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth @@ -90467,7 +90472,7 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. -func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110003:13: */ +func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:110013:13: */ bp := tls.Alloc(292) defer tls.Free(292) @@ -90495,7 +90500,7 @@ func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) _ = NotUsed - rc = renameParseSql(tls, bp+24 /* &sParse */, zDb, db, zSql, libc.Bool32(iSchema == 1)) + rc = renameParseSql(tls, bp+24, zDb, db, zSql, libc.Bool32(iSchema == 1)) if !(rc != SQLITE_OK) { goto __1 } @@ -90507,16 +90512,16 @@ __1: goto __2 } // This can happen if the sqlite_schema table is corrupt - rc = Xsqlite3CorruptError(tls, 110031) + rc = Xsqlite3CorruptError(tls, 110041) goto drop_column_done __2: ; - pCol = renameTokenFind(tls, bp+24 /* &sParse */, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FzCnName) + pCol = renameTokenFind(tls, bp+24, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FzCnName) if !(iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1) { goto __3 } - pEnd = renameTokenFind(tls, bp+24 /* &sParse */, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol+1)*16)).FzCnName) + pEnd = renameTokenFind(tls, bp+24, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol+1)*16)).FzCnName) zEnd = (*RenameToken)(unsafe.Pointer(pEnd)).Ft.Fz goto __4 __3: @@ -90533,12 +90538,12 @@ __6: __4: ; - zNew = Xsqlite3MPrintf(tls, db, ts+10779 /* "%.*s%s" */, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) + zNew = Xsqlite3MPrintf(tls, db, ts+10801, libc.VaList(bp, (int32((*RenameToken)(unsafe.Pointer(pCol)).Ft.Fz)-int32(zSql))/1, zSql, zEnd)) Xsqlite3_result_text(tls, context, zNew, -1, libc.UintptrFromInt32(-1)) Xsqlite3_free(tls, zNew) drop_column_done: - renameParseCleanup(tls, bp+24 /* &sParse */) + renameParseCleanup(tls, bp+24) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth if !(rc != SQLITE_OK) { goto __7 @@ -90553,7 +90558,7 @@ __7: // // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. -func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110068:21: */ +func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:110078:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -90621,7 +90626,7 @@ __5: if !(iCol < 0) { goto __6 } - Xsqlite3ErrorMsg(tls, pParse, ts+6230 /* "no such column: ..." */, libc.VaList(bp, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+6252, libc.VaList(bp, zCol)) goto exit_drop_column __6: ; @@ -90631,12 +90636,12 @@ __6: if !(int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&(COLFLAG_PRIMKEY|COLFLAG_UNIQUE) != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+10786, /* "cannot drop %s c..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+10808, libc.VaList(bp+8, func() uintptr { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_PRIMKEY != 0 { - return ts + 10814 /* "PRIMARY KEY" */ + return ts + 10836 /* "PRIMARY KEY" */ } - return ts + 6051 /* "UNIQUE" */ + return ts + 6073 /* "UNIQUE" */ }(), zCol)) goto exit_drop_column @@ -90647,7 +90652,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+10826 /* "cannot drop colu..." */, libc.VaList(bp+24, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+10848, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -90656,15 +90661,15 @@ __8: iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1543 /* "" */, 0) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+1565, 0) renameFixQuotes(tls, pParse, zDb, libc.Bool32(iDb == 1)) Xsqlite3NestedParse(tls, pParse, - ts+10874 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+10896, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) - renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+10995 /* "after drop colum..." */, 1) + renameTestSchema(tls, pParse, zDb, libc.Bool32(iDb == 1), ts+11017, 1) // Edit rows of table on disk if !((*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16)).FcolFlags)&COLFLAG_VIRTUAL == 0) { @@ -90779,16 +90784,16 @@ exit_drop_column: } // Register built-in functions used to help implement ALTER TABLE -func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:110204:21: */ +func Xsqlite3AlterFunctions(tls *libc.TLS) { /* sqlite3.c:110214:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aAlterTableFuncs)), int32(uint32(unsafe.Sizeof(aAlterTableFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } var aAlterTableFuncs = [5]FuncDef{ - {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11013 /* "sqlite_rename_co..." */}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11034 /* "sqlite_rename_ta..." */}, - {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11054 /* "sqlite_rename_te..." */}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11073 /* "sqlite_drop_colu..." */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11092 /* "sqlite_rename_qu..." */}} /* sqlite3.c:110205:18 */ + {FnArg: int8(9), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11035}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11056}, + {FnArg: int8(7), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11076}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11095}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_INTERNAL | SQLITE_UTF8 | SQLITE_FUNC_CONSTANT), FxSFunc: 0, FzName: ts + 11114}} /* sqlite3.c:110215:18 */ //************* End of alter.c ********************************************** //************* Begin file analyze.c **************************************** @@ -90944,7 +90949,7 @@ var aAlterTableFuncs = [5]FuncDef{ // or it may be a NULL pointer. If it is not NULL, then all entries in // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. -func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:110383:13: */ +func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:110393:13: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -90977,7 +90982,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh }{}))); i++ { var zTab uintptr = aTable[i].FzName var pStat uintptr - *(*U8)(unsafe.Pointer(bp + 72 /* &aCreateTbl[0] */ + uintptr(i))) = U8(0) + *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(0) if libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) == uintptr(0) { if i < nToOpen { // The sqlite_statN table does not exist. Create it. Note that a @@ -90985,25 +90990,25 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // of the new table in register pParse->regRoot. This is important // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, - ts+11115 /* "CREATE TABLE %Q...." */, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) - *(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) - *(*U8)(unsafe.Pointer(bp + 72 /* &aCreateTbl[0] */ + uintptr(i))) = U8(OPFLAG_P2ISREG) + ts+11137, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) + *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) + *(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))) = U8(OPFLAG_P2ISREG) } } else { // The table already exists. If zWhere is not NULL, delete all entries // associated with the table zWhere. If zWhere is NULL, delete the // entire contents of the table. - *(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4)) = (*Table)(unsafe.Pointer(pStat)).Ftnum - Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4)), uint8(1), zTab) + *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)) = (*Table)(unsafe.Pointer(pStat)).Ftnum + Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11138, /* "DELETE FROM %Q.%..." */ + ts+11160, libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11168 /* "DELETE FROM %Q.%..." */, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11190, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. - Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4))), iDb) + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb) } } } @@ -91011,8 +91016,8 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // Open the sqlite_stat[134] tables for writing. for i = 0; i < nToOpen; i++ { - Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, iStatCur+i, int32(*(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4))), iDb, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(*(*U8)(unsafe.Pointer(bp + 72 /* &aCreateTbl[0] */ + uintptr(i))))) + Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, iStatCur+i, int32(*(*U32)(unsafe.Pointer(bp + 76 + uintptr(i)*4))), iDb, 3) + Xsqlite3VdbeChangeP5(tls, v, uint16(*(*U8)(unsafe.Pointer(bp + 72 + uintptr(i))))) } } @@ -91021,10 +91026,10 @@ var aTable = [3]struct { FzName uintptr FzCols uintptr }{ - {FzName: ts + 11186 /* "sqlite_stat1" */, FzCols: ts + 11199 /* "tbl,idx,stat" */}, - {FzName: ts + 11212 /* "sqlite_stat4" */, FzCols: ts + 11225 /* "tbl,idx,neq,nlt,..." */}, - {FzName: ts + 11253 /* "sqlite_stat3" */}, -} /* sqlite3.c:110393:5 */ + {FzName: ts + 11208 /* "sqlite_stat1" */, FzCols: ts + 11221 /* "tbl,idx,stat" */}, + {FzName: ts + 11234 /* "sqlite_stat4" */, FzCols: ts + 11247 /* "tbl,idx,neq,nlt,..." */}, + {FzName: ts + 11275 /* "sqlite_stat3" */}, +} /* sqlite3.c:110403:5 */ // Recommended number of samples for sqlite_stat4 @@ -91050,14 +91055,14 @@ type StatAccum1 = struct { FnMaxEqZero int32 FiGet int32 Fa uintptr -} /* sqlite3.c:110481:9 */ +} /* sqlite3.c:110491:9 */ // Recommended number of samples for sqlite_stat4 // Three SQL functions - stat_init(), stat_push(), and stat_get() - // share an instance of the following structure to hold their state // information. -type StatAccum = StatAccum1 /* sqlite3.c:110481:26 */ +type StatAccum = StatAccum1 /* sqlite3.c:110491:26 */ type StatSample1 = struct { FanEq uintptr FanDLt uintptr @@ -91068,12 +91073,12 @@ type StatSample1 = struct { F__ccgo_pad1 [3]byte FiCol int32 FiHash U32 -} /* sqlite3.c:110481:9 */ +} /* sqlite3.c:110491:9 */ -type StatSample = StatSample1 /* sqlite3.c:110482:27 */ +type StatSample = StatSample1 /* sqlite3.c:110492:27 */ // Reclaim memory used by a StatSample -func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:110523:13: */ +func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:110533:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -91082,7 +91087,7 @@ func sampleClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:110523:13: } // Initialize the BLOB value of a ROWID -func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:110535:13: */ +func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr) { /* sqlite3.c:110545:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -91097,7 +91102,7 @@ func sampleSetRowid(tls *libc.TLS, db uintptr, p uintptr, n int32, pData uintptr } // Initialize the INTEGER value of a ROWID. -func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:110551:13: */ +func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* sqlite3.c:110561:13: */ if (*StatSample)(unsafe.Pointer(p)).FnRowid != 0 { Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(p + 12))) @@ -91107,7 +91112,7 @@ func sampleSetRowidInt64(tls *libc.TLS, db uintptr, p uintptr, iRowid I64) { /* } // Copy the contents of object (*pFrom) into (*pTo). -func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:110564:13: */ +func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlite3.c:110574:13: */ (*StatSample)(unsafe.Pointer(pTo)).FisPSample = (*StatSample)(unsafe.Pointer(pFrom)).FisPSample (*StatSample)(unsafe.Pointer(pTo)).FiCol = (*StatSample)(unsafe.Pointer(pFrom)).FiCol (*StatSample)(unsafe.Pointer(pTo)).FiHash = (*StatSample)(unsafe.Pointer(pFrom)).FiHash @@ -91122,7 +91127,7 @@ func sampleCopy(tls *libc.TLS, p uintptr, pTo uintptr, pFrom uintptr) { /* sqlit } // Reclaim all memory of a StatAccum structure. -func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:110582:13: */ +func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:110592:13: */ var p uintptr = pOld if (*StatAccum)(unsafe.Pointer(p)).FmxSample != 0 { var i int32 @@ -91157,7 +91162,7 @@ func statAccumDestructor(tls *libc.TLS, pOld uintptr) { /* sqlite3.c:110582:13: // value is a pointer to the StatAccum object. The datatype of the // return value is BLOB, but it is really just a pointer to the StatAccum // object. -func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:110617:13: */ +func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:110627:13: */ var p uintptr var nCol int32 // Number of columns in index being sampled var nKeyCol int32 // Number of key columns @@ -91249,10 +91254,10 @@ func statInit(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } var statInitFuncdef = FuncDef{ - FnArg: int8(4), // nArg - FfuncFlags: U32(SQLITE_UTF8), // pNext - FxSFunc: 0, // xValue, xInverse - FzName: ts + 11266 /* "stat_init" */} /* sqlite3.c:110703:22 */ + FnArg: int8(4), // nArg + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11288} /* sqlite3.c:110713:22 */ // pNew and pOld are both candidate non-periodic samples selected for // the same column (pNew->iCol==pOld->iCol). Ignoring this column and @@ -91263,7 +91268,7 @@ var statInitFuncdef = FuncDef{ // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol+1] onwards are valid. -func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:110727:12: */ +func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:110737:12: */ var nCol int32 = (*StatAccum)(unsafe.Pointer(pAccum)).FnCol var i int32 @@ -91285,7 +91290,7 @@ func sampleIsBetterPost(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintpt // // This function assumes that for each argument sample, the contents of // the anEq[] array from pSample->anEq[pSample->iCol] onwards are valid. -func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:110751:12: */ +func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) int32 { /* sqlite3.c:110761:12: */ var nEqNew TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pNew)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pNew)).FiCol)*4)) var nEqOld TRowcnt = *(*TRowcnt)(unsafe.Pointer((*StatSample)(unsafe.Pointer(pOld)).FanEq + uintptr((*StatSample)(unsafe.Pointer(pOld)).FiCol)*4)) @@ -91303,7 +91308,7 @@ func sampleIsBetter(tls *libc.TLS, pAccum uintptr, pNew uintptr, pOld uintptr) i // Copy the contents of sample *pNew into the p->a[] array. If necessary, // remove the least desirable sample from p->a[] to make room. -func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:110774:13: */ +func sampleInsert(tls *libc.TLS, p uintptr, pNew uintptr, nEqZero int32) { /* sqlite3.c:110784:13: */ var pSample uintptr var i int32 var pOld uintptr @@ -91446,7 +91451,7 @@ __11: // p->current contains a sample that reflects the previous row of the // index. The value of anEq[iChng] and subsequent anEq[] elements are // correct at this point. -func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:110866:13: */ +func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:110876:13: */ var i int32 // Check if any samples from the aBest[] array should be pushed @@ -91498,7 +91503,7 @@ func samplePushPrevious(tls *libc.TLS, p uintptr, iChng int32) { /* sqlite3.c:11 // if it wants the byte-code to do special processing. // // The R parameter is only used for STAT4 -func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:110918:13: */ +func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:110928:13: */ var i int32 // The three function arguments @@ -91568,9 +91573,9 @@ func statPush(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql var statPushFuncdef = FuncDef{ FnArg: int8(2 + IsStat4), - FfuncFlags: U32(SQLITE_UTF8), // pNext - FxSFunc: 0, // xValue, xInverse - FzName: ts + 11276 /* "stat_push" */} /* sqlite3.c:110993:22 */ + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11298} /* sqlite3.c:111003:22 */ // Implementation of the stat_get(P,J) SQL function. This routine is // used to query statistical information that has been gathered into @@ -91589,7 +91594,7 @@ var statPushFuncdef = FuncDef{ // STAT_GET_STAT1 and is hence omitted and this routine becomes // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. -func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111030:13: */ +func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:111040:13: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -91622,8 +91627,8 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Text of the constructed "stat" line var i int32 // Loop counter - Xsqlite3StrAccumInit(tls, bp+24 /* &sStat */, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) - Xsqlite3_str_appendf(tls, bp+24 /* &sStat */, ts+11286, /* "%llu" */ + Xsqlite3StrAccumInit(tls, bp+24, uintptr(0), uintptr(0), 0, ((*StatAccum)(unsafe.Pointer(p)).FnKeyCol+1)*100) + Xsqlite3_str_appendf(tls, bp+24, ts+11308, libc.VaList(bp, func() uint64 { if (*StatAccum)(unsafe.Pointer(p)).FnSkipAhead != 0 { return U64((*StatAccum)(unsafe.Pointer(p)).FnEst) @@ -91633,10 +91638,10 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1)) var iVal U64 = (U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct - uint64(1)) / nDistinct - Xsqlite3_str_appendf(tls, bp+24 /* &sStat */, ts+11291 /* " %llu" */, libc.VaList(bp+8, iVal)) + Xsqlite3_str_appendf(tls, bp+24, ts+11313, libc.VaList(bp+8, iVal)) } - Xsqlite3ResultStrAccum(tls, context, bp+24 /* &sStat */) + Xsqlite3ResultStrAccum(tls, context, bp+24) } else if eCall == STAT_GET_ROWID { if (*StatAccum)(unsafe.Pointer(p)).FiGet < 0 { samplePushPrevious(tls, p, 0) @@ -91674,25 +91679,25 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } } - Xsqlite3StrAccumInit(tls, bp+48 /* &sStat */, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) + Xsqlite3StrAccumInit(tls, bp+48, uintptr(0), uintptr(0), 0, (*StatAccum)(unsafe.Pointer(p)).FnCol*100) for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_str_appendf(tls, bp+48 /* &sStat */, ts+11297 /* "%llu " */, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_str_appendf(tls, bp+48, ts+11319, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) } if (*Sqlite3_str)(unsafe.Pointer(bp+48)).FnChar != 0 { (*Sqlite3_str)(unsafe.Pointer(bp+48 /* &sStat */)).FnChar-- } - Xsqlite3ResultStrAccum(tls, context, bp+48 /* &sStat */) + Xsqlite3ResultStrAccum(tls, context, bp+48) } _ = argc } var statGetFuncdef = FuncDef{ FnArg: int8(1 + IsStat4), - FfuncFlags: U32(SQLITE_UTF8), // pNext - FxSFunc: 0, // xValue, xInverse - FzName: ts + 11303 /* "stat_get" */} /* sqlite3.c:111127:22 */ + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11325} /* sqlite3.c:111137:22 */ -func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111139:13: */ +func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, regOut int32) { /* sqlite3.c:111149:13: */ Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Integer, iParam, regStat+1) Xsqlite3VdbeAddFunctionCall(tls, pParse, 0, regStat, regOut, 1+IsStat4, @@ -91701,7 +91706,7 @@ func callStatGet(tls *libc.TLS, pParse uintptr, regStat int32, iParam int32, reg // Generate code to do an analysis of all indices associated with // a single table. -func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:111180:13: */ +func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr, iStatCur int32, iMem int32, iTab int32) { /* sqlite3.c:111190:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var pIdx uintptr // An index to being analyzed var iIdxCur int32 // Cursor open on index being analyzed @@ -91737,7 +91742,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Do not gather statistics on views or virtual tables return } - if Xsqlite3_strlike(tls, ts+11312, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { + if Xsqlite3_strlike(tls, ts+11334, (*Table)(unsafe.Pointer(pTab)).FzName, uint32('\\')) == 0 { // Do not gather statistics on system tables return } @@ -91755,7 +91760,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp return } (*Table)(unsafe.Pointer(pStat1)).FzName = pStat1 + 1*64 - libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11186 /* "sqlite_stat1" */, uint32(13)) + libc.Xmemcpy(tls, (*Table)(unsafe.Pointer(pStat1)).FzName, ts+11208, uint32(13)) (*Table)(unsafe.Pointer(pStat1)).FnCol = int16(3) (*Table)(unsafe.Pointer(pStat1)).FiPKey = int16(-1) Xsqlite3VdbeAddOp4(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_Noop, 0, 0, 0, pStat1, -17) @@ -91988,7 +91993,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Add the entry to the stat1 table. callStatGet(tls, pParse, regStat, STAT_GET_STAT1, regStat1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11322 /* "BBB" */, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11344, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP4(tls, v, -1, pStat1, -6) @@ -92050,7 +92055,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp jZeroRows = Xsqlite3VdbeAddOp1(tls, v, OP_IfNot, regStat1) Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regIdxname) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11322 /* "BBB" */, 0) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regTabname, 3, regTemp, ts+11344, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, iStatCur, regNewRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, iStatCur, regTemp, regNewRowid) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_APPEND)) @@ -92061,7 +92066,7 @@ func analyzeOneTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintp // Generate code that will cause the most recent index analysis to // be loaded into internal hash tables where is can be used. -func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:111542:13: */ +func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:111552:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { Xsqlite3VdbeAddOp1(tls, v, OP_LoadAnalysis, iDb) @@ -92069,7 +92074,7 @@ func loadAnalysis(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11154 } // Generate code that will do an analysis of an entire database -func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:111552:13: */ +func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:111562:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSchema uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FpSchema // Schema of database iDb var k uintptr @@ -92094,7 +92099,7 @@ func analyzeDatabase(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:11 // Generate code that will do an analysis of a single table in // a database. If pOnlyIdx is not NULL then it is a single index // in pTab that should be analyzed. -func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:111579:13: */ +func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) { /* sqlite3.c:111589:13: */ var iDb int32 var iStatCur int32 @@ -92103,9 +92108,9 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) iStatCur = (*Parse)(unsafe.Pointer(pParse)).FnTab *(*int32)(unsafe.Pointer(pParse + 40)) += 3 if pOnlyIdx != 0 { - openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11326 /* "idx" */) + openStatTable(tls, pParse, iDb, iStatCur, (*Index)(unsafe.Pointer(pOnlyIdx)).FzName, ts+11348) } else { - openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11330 /* "tbl" */) + openStatTable(tls, pParse, iDb, iStatCur, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11352) } analyzeOneTable(tls, pParse, pTab, pOnlyIdx, iStatCur, (*Parse)(unsafe.Pointer(pParse)).FnMem+1, (*Parse)(unsafe.Pointer(pParse)).FnTab) loadAnalysis(tls, pParse, iDb) @@ -92121,7 +92126,7 @@ func analyzeTable(tls *libc.TLS, pParse uintptr, pTab uintptr, pOnlyIdx uintptr) // Form 1 causes all indices in all attached databases to be analyzed. // Form 2 analyzes all indices the single database named. // Form 3 analyzes all indices associated with the named table. -func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:111610:21: */ +func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:111620:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -92156,7 +92161,7 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp analyzeDatabase(tls, pParse, iDb) } else { // Form 3: Analyze the table or index named as an argument - iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp /* &pTableName */) + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) if iDb >= 0 { if (*Token)(unsafe.Pointer(pName2)).Fn != 0 { zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName @@ -92184,23 +92189,23 @@ func Xsqlite3Analyze(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp type analysisInfo = struct { Fdb uintptr FzDatabase uintptr -} /* sqlite3.c:111662:9 */ +} /* sqlite3.c:111672:9 */ // Used to pass information from the analyzer reader through to the // callback routine. -type AnalysisInfo = analysisInfo /* sqlite3.c:111662:29 */ +type AnalysisInfo = analysisInfo /* sqlite3.c:111672:29 */ // The first argument points to a nul-terminated string containing a // list of space separated integers. Read the first nOut of these into // the array aOut[]. -func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:111673:13: */ +func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, aLog uintptr, pIndex uintptr) { /* sqlite3.c:111683:13: */ var z uintptr = zIntArray var c int32 var i int32 var v TRowcnt if z == uintptr(0) { - z = ts + 1543 /* "" */ + z = ts + 1565 /* "" */ } for i = 0; *(*int8)(unsafe.Pointer(z)) != 0 && i < nOut; i++ { v = TRowcnt(0) @@ -92222,15 +92227,15 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 2, 0x4) libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(0), 6, 0x40) for *(*int8)(unsafe.Pointer(z)) != 0 { - if Xsqlite3_strglob(tls, ts+11334, z) == 0 { + if Xsqlite3_strglob(tls, ts+11356, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 2, 0x4) - } else if Xsqlite3_strglob(tls, ts+11345, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11367, z) == 0 { var sz int32 = Xsqlite3Atoi(tls, z+uintptr(3)) if sz < 2 { sz = 2 } (*Index)(unsafe.Pointer(pIndex)).FszIdxRow = Xsqlite3LogEst(tls, uint64(sz)) - } else if Xsqlite3_strglob(tls, ts+11355, z) == 0 { + } else if Xsqlite3_strglob(tls, ts+11377, z) == 0 { libc.SetBitFieldPtr16Uint32(pIndex+56, uint32(1), 6, 0x40) } for int32(*(*int8)(unsafe.Pointer(z))) != 0 && int32(*(*int8)(unsafe.Pointer(z))) != ' ' { @@ -92252,7 +92257,7 @@ func decodeIntArray(tls *libc.TLS, zIntArray uintptr, nOut int32, aOut uintptr, // // Entries for which argv[1]==NULL simply record the number of rows in // the table. -func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:111746:12: */ +func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:111756:12: */ bp := tls.Alloc(92) defer tls.Free(92) @@ -92304,7 +92309,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // var fakeIdx Index at bp, 92 (*Index)(unsafe.Pointer(bp /* &fakeIdx */)).FszIdxRow = (*Table)(unsafe.Pointer(pTable)).FszTabRow - decodeIntArray(tls, z, 1, uintptr(0), pTable+38, bp /* &fakeIdx */) + decodeIntArray(tls, z, 1, uintptr(0), pTable+38, bp) (*Table)(unsafe.Pointer(pTable)).FszTabRow = (*Index)(unsafe.Pointer(bp /* &fakeIdx */)).FszIdxRow *(*U32)(unsafe.Pointer(pTable + 28)) |= U32(TF_HasStat1) } @@ -92314,7 +92319,7 @@ func analysisLoader(tls *libc.TLS, pData uintptr, argc int32, argv uintptr, NotU // If the Index.aSample variable is not NULL, delete the aSample[] array // and its contents. -func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:111809:21: */ +func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sqlite3.c:111819:21: */ if (*Index)(unsafe.Pointer(pIdx)).FaSample != 0 { var j int32 for j = 0; j < (*Index)(unsafe.Pointer(pIdx)).FnSample; j++ { @@ -92331,7 +92336,7 @@ func Xsqlite3DeleteIndexSamples(tls *libc.TLS, db uintptr, pIdx uintptr) { /* sq // Populate the pIdx->aAvgEq[] array based on the samples currently // stored in pIdx->aSample[]. -func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:111834:13: */ +func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:111844:13: */ if pIdx != 0 { var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var pFinal uintptr = aSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample-1)*20 @@ -92389,7 +92394,7 @@ func initAvgEq(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:111834:13: */ // Look up an index by name. Or, if the name of a WITHOUT ROWID table // is supplied instead, find the PRIMARY KEY index for that table. -func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:111893:14: */ +func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:111903:14: */ var pIdx uintptr = Xsqlite3FindIndex(tls, db, zName, zDb) if pIdx == uintptr(0) { var pTab uintptr = Xsqlite3FindTable(tls, db, zName, zDb) @@ -92410,7 +92415,7 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // zSql2: SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4 // // where %Q is replaced with the database name before the SQL is executed. -func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:111918:12: */ +func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:111928:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -92424,7 +92429,7 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui if !(zSql != 0) { return SQLITE_NOMEM } - rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16, uintptr(0)) Xsqlite3DbFree(tls, db, zSql) if rc != 0 { return rc @@ -92489,7 +92494,7 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui if !(zSql != 0) { return SQLITE_NOMEM } - rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16, uintptr(0)) Xsqlite3DbFree(tls, db, zSql) if rc != 0 { return rc @@ -92546,15 +92551,15 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // Load content from the sqlite_stat4 table into // the Index.aSample[] arrays of all indices. -func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112039:12: */ +func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:112049:12: */ var rc int32 = SQLITE_OK // Result codes from subroutines var pStat4 uintptr - if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11212, zDb)) != uintptr(0) && + if libc.AssignUintptr(&pStat4, Xsqlite3FindTable(tls, db, ts+11234, zDb)) != uintptr(0) && int32((*Table)(unsafe.Pointer(pStat4)).FeTabType) == TABTYP_NORM { rc = loadStatTbl(tls, db, - ts+11367, /* "SELECT idx,count..." */ - ts+11421, /* "SELECT idx,neq,n..." */ + ts+11389, + ts+11443, zDb) } return rc @@ -92578,7 +92583,7 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1120 // If an OOM error occurs, this function always sets db->mallocFailed. // This means if the caller does not care about other errors, the return // code may be ignored. -func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112077:20: */ +func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:112087:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -92606,10 +92611,10 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // Load new statistics out of the sqlite_stat1 table (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName - if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11186, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && + if libc.AssignUintptr(&pStat1, Xsqlite3FindTable(tls, db, ts+11208, (*AnalysisInfo)(unsafe.Pointer(bp+8)).FzDatabase)) != 0 && int32((*Table)(unsafe.Pointer(pStat1)).FeTabType) == TABTYP_NORM { zSql = Xsqlite3MPrintf(tls, db, - ts+11473 /* "SELECT tbl,idx,s..." */, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) + ts+11495, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { @@ -92685,7 +92690,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit // ATTACH DATABASE abc||def AS 'db2' // // will fail because neither abc or def can be resolved. -func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:112185:12: */ +func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* sqlite3.c:112195:12: */ var rc int32 = SQLITE_OK if pExpr != 0 { if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_ID { @@ -92699,9 +92704,9 @@ func resolveAttachExpr(tls *libc.TLS, pName uintptr, pExpr uintptr) int32 { /* s // Return true if zName points to a name that may be used to refer to // database iDb attached to handle db. -func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:112202:20: */ +func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int32 { /* sqlite3.c:112212:20: */ return libc.Bool32(Xsqlite3StrICmp(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName) == 0 || - iDb == 0 && Xsqlite3StrICmp(tls, ts+6305, zName) == 0) + iDb == 0 && Xsqlite3StrICmp(tls, ts+6327, zName) == 0) } // An SQL user-function registered to do the work of an ATTACH statement. The @@ -92717,7 +92722,7 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // If the db->init.reopenMemdb flags is set, then instead of attaching a // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. -func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:112224:13: */ +func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:112234:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -92752,13 +92757,13 @@ func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / if !(zFile == uintptr(0)) { goto __1 } - zFile = ts + 1543 /* "" */ + zFile = ts + 1565 /* "" */ __1: ; if !(zName == uintptr(0)) { goto __2 } - zName = ts + 1543 /* "" */ + zName = ts + 1565 /* "" */ __2: ; @@ -92768,7 +92773,7 @@ __2: // This is not a real ATTACH. Instead, this routine is being called // from sqlite3_deserialize() to close database db->init.iDb and // reopen it as a MemDB - *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)) = Xsqlite3_vfs_find(tls, ts+3773 /* "memdb" */) + *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)) = Xsqlite3_vfs_find(tls, ts+3795) if !(*(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0)) { goto __5 } @@ -92784,7 +92789,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)), ts+11514 /* "x\x00" */, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pVfs */)), ts+11536, db, pNew+4, 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -92797,7 +92802,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= *(*int32)(unsafe.Pointer(db + 112 + 7*4))+2) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11517, /* "too many attache..." */ + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11539, libc.VaList(bp, *(*int32)(unsafe.Pointer(db + 112 + 7*4)))) goto attach_error __7: @@ -92811,7 +92816,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11554 /* "database %s is a..." */, libc.VaList(bp+8, zName)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11576, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -92855,7 +92860,7 @@ __13: // it to obtain the database schema. At this point the schema may // or may not be initialized. *(*uint32)(unsafe.Pointer(bp + 24 /* flags */)) = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags - rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+24 /* &flags */, bp+28 /* &pVfs */, bp+32 /* &zPath */, bp+36 /* &zErr */) + rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+24, bp+28, bp+32, bp+36) if !(rc != SQLITE_OK) { goto __16 } @@ -92882,7 +92887,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11584 /* "database is alre..." */, 0) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11606, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -92899,7 +92904,7 @@ __21: goto __23 } *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, - ts+11613 /* "attached databas..." */, 0) + ts+11635, 0) rc = SQLITE_ERROR __23: ; @@ -92939,7 +92944,7 @@ __24: if !!(int32(*(*uint8)(unsafe.Pointer(db + 164 + 8))&0x4>>2) != 0) { goto __26 } - rc = Xsqlite3Init(tls, db, bp+40 /* &zErrDyn */) + rc = Xsqlite3Init(tls, db, bp+40) __26: ; Xsqlite3BtreeLeaveAll(tls, db) @@ -92969,13 +92974,13 @@ __29: } Xsqlite3OomFault(tls, db) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */))) - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+6028 /* "out of memory" */, 0) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+6050, 0) goto __31 __30: if !(*(*uintptr)(unsafe.Pointer(bp + 40)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11681 /* "unable to open d..." */, libc.VaList(bp+16, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11703, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -93010,7 +93015,7 @@ __34: // DETACH DATABASE x // // SELECT sqlite_detach(x) -func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:112417:13: */ +func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:112427:13: */ bp := tls.Alloc(152) defer tls.Free(152) @@ -93031,7 +93036,7 @@ func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / if !(zName == uintptr(0)) { goto __1 } - zName = ts + 1543 /* "" */ + zName = ts + 1565 /* "" */ __1: ; i = 0 @@ -93063,14 +93068,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+11709 /* "no such database..." */, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11731, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+11730 /* "cannot detach da..." */, libc.VaList(bp+8, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11752, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -93078,7 +93083,7 @@ __8: Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+11756 /* "database %s is l..." */, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24, ts+11778, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -93110,12 +93115,12 @@ __11: return detach_error: - Xsqlite3_result_error(tls, context, bp+24 /* &zErr[0] */, -1) + Xsqlite3_result_error(tls, context, bp+24, -1) } // This procedure generates VDBE code for a single invocation of either the // sqlite_detach() or sqlite_attach() SQL user functions. -func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:112479:13: */ +func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuthArg uintptr, pFilename uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:112489:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -93134,7 +93139,7 @@ func codeAttach(tls *libc.TLS, pParse uintptr, type1 int32, pFunc uintptr, pAuth goto attach_end __1: ; - libc.Xmemset(tls, bp /* &sName */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sName */)).FpParse = pParse if !(SQLITE_OK != resolveAttachExpr(tls, bp, pFilename) || SQLITE_OK != resolveAttachExpr(tls, bp, pDbname) || SQLITE_OK != resolveAttachExpr(tls, bp, pKey)) { @@ -93194,31 +93199,31 @@ attach_end: // Called by the parser to compile a DETACH statement. // // DETACH pDbname -func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:112551:21: */ +func Xsqlite3Detach(tls *libc.TLS, pParse uintptr, pDbname uintptr) { /* sqlite3.c:112561:21: */ codeAttach(tls, pParse, SQLITE_DETACH, uintptr(unsafe.Pointer(&detach_func)), pDbname, uintptr(0), uintptr(0), pDbname) } var detach_func = FuncDef{ - FnArg: int8(1), // nArg - FfuncFlags: U32(SQLITE_UTF8), // pNext - FxSFunc: 0, // xValue, xInverse - FzName: ts + 11778 /* "sqlite_detach" */} /* sqlite3.c:112552:24 */ + FnArg: int8(1), // nArg + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11800} /* sqlite3.c:112562:24 */ // Called by the parser to compile an ATTACH statement. // // ATTACH p AS pDbname KEY pKey -func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:112571:21: */ +func Xsqlite3Attach(tls *libc.TLS, pParse uintptr, p uintptr, pDbname uintptr, pKey uintptr) { /* sqlite3.c:112581:21: */ codeAttach(tls, pParse, SQLITE_ATTACH, uintptr(unsafe.Pointer(&attach_func)), p, p, pDbname, pKey) } var attach_func = FuncDef{ - FnArg: int8(3), // nArg - FfuncFlags: U32(SQLITE_UTF8), // pNext - FxSFunc: 0, // xValue, xInverse - FzName: ts + 11792 /* "sqlite_attach" */} /* sqlite3.c:112572:24 */ + FnArg: int8(3), // nArg + FfuncFlags: U32(SQLITE_UTF8), // pNext + FxSFunc: 0, // xValue, xInverse + FzName: ts + 11814} /* sqlite3.c:112582:24 */ // Expression callback used by sqlite3FixAAAA() routines. -func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:112590:12: */ +func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:112600:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -93230,7 +93235,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:112 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer((*DbFixer)(unsafe.Pointer(pFix)).FpParse)).Fdb)).Finit.Fbusy != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_NULL) } else { - Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11806 /* "%s cannot use va..." */, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) + Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, ts+11828, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType)) return WRC_Abort } } @@ -93238,7 +93243,7 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:112 } // Select callback used by sqlite3FixAAAA() routines. -func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:112607:12: */ +func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:112617:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -93263,7 +93268,7 @@ __1: if (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase != 0 { if iDb != Xsqlite3FindDbName(tls, db, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase) { Xsqlite3ErrorMsg(tls, (*DbFixer)(unsafe.Pointer(pFix)).FpParse, - ts+11830, /* "%s %T cannot ref..." */ + ts+11852, libc.VaList(bp, (*DbFixer)(unsafe.Pointer(pFix)).FzType, (*DbFixer)(unsafe.Pointer(pFix)).FpName, (*SrcItem)(unsafe.Pointer(pItem)).FzDatabase)) return WRC_Abort } @@ -93299,7 +93304,7 @@ __3: // Initialize a DbFixer structure. This routine must be called prior // to passing the structure to one of the sqliteFixAAAA() routines below. -func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:112650:21: */ +func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zType uintptr, pName uintptr) { /* sqlite3.c:112660:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*DbFixer)(unsafe.Pointer(pFix)).FpParse = pParse @@ -93335,7 +93340,7 @@ func Xsqlite3FixInit(tls *libc.TLS, pFix uintptr, pParse uintptr, iDb int32, zTy // to an object in a different database, an error message is added to // pParse->zErrMsg and these routines return non-zero. If everything // checks out, these routines return 0. -func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:112688:20: */ +func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* sqlite3.c:112698:20: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -93343,22 +93348,22 @@ func Xsqlite3FixSrcList(tls *libc.TLS, pFix uintptr, pList uintptr) int32 { /* s if pList != 0 { // var s Select at bp, 76 - libc.Xmemset(tls, bp /* &s */, 0, uint32(unsafe.Sizeof(Select{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Select{}))) (*Select)(unsafe.Pointer(bp /* &s */)).FpSrc = pList - res = Xsqlite3WalkSelect(tls, pFix+4, bp /* &s */) + res = Xsqlite3WalkSelect(tls, pFix+4, bp) } return res } -func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:112702:20: */ +func Xsqlite3FixSelect(tls *libc.TLS, pFix uintptr, pSelect uintptr) int32 { /* sqlite3.c:112712:20: */ return Xsqlite3WalkSelect(tls, pFix+4, pSelect) } -func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:112708:20: */ +func Xsqlite3FixExpr(tls *libc.TLS, pFix uintptr, pExpr uintptr) int32 { /* sqlite3.c:112718:20: */ return Xsqlite3WalkExpr(tls, pFix+4, pExpr) } -func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:112717:20: */ +func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { /* sqlite3.c:112727:20: */ for pStep != 0 { if Xsqlite3WalkSelect(tls, pFix+4, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect) != 0 || Xsqlite3WalkExpr(tls, pFix+4, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) != 0 || @@ -93448,7 +93453,7 @@ func Xsqlite3FixTriggerStep(tls *libc.TLS, pFix uintptr, pStep uintptr) int32 { // // Setting the auth function to NULL disables this hook. The default // setting of the auth function is NULL. -func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:112821:16: */ +func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uintptr) int32 { /* sqlite3.c:112831:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg = pArg @@ -93461,8 +93466,8 @@ func Xsqlite3_set_authorizer(tls *libc.TLS, db uintptr, xAuth uintptr, pArg uint // Write an error message into pParse->zErrMsg that explains that the // user-supplied authorization function returned an illegal value. -func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:112841:13: */ - Xsqlite3ErrorMsg(tls, pParse, ts+11876 /* "authorizer malfu..." */, 0) +func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:112851:13: */ + Xsqlite3ErrorMsg(tls, pParse, ts+11898, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR } @@ -93473,7 +93478,7 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11284 // If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. -func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:112855:20: */ +func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:112865:20: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -93488,11 +93493,11 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, SQLITE_READ, zTab, zCol, zDb, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - var z uintptr = Xsqlite3_mprintf(tls, ts+11899 /* "%s.%s" */, libc.VaList(bp, zTab, zCol)) + var z uintptr = Xsqlite3_mprintf(tls, ts+11921, libc.VaList(bp, zTab, zCol)) if (*Sqlite3)(unsafe.Pointer(db)).FnDb > 2 || iDb != 0 { - z = Xsqlite3_mprintf(tls, ts+11905 /* "%s.%z" */, libc.VaList(bp+16, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+11927, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+11911 /* "access to %z is ..." */, libc.VaList(bp+32, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+11933, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_IGNORE && rc != SQLITE_OK { sqliteAuthBadReturnCode(tls, pParse) @@ -93507,7 +93512,7 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp // If the auth function returns SQLITE_IGNORE, change the TK_COLUMN // instruction into a TK_NULL. If the auth function returns SQLITE_DENY, // then generate an error. -func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:112891:21: */ +func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uintptr, pTabList uintptr) { /* sqlite3.c:112901:21: */ var pTab uintptr = uintptr(0) // The table being read var zCol uintptr // Name of the column of the table var iSrc int32 // Index in pTabList->a[] of table being read @@ -93544,7 +93549,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName } else { - zCol = ts + 7581 /* "ROWID" */ + zCol = ts + 7603 /* "ROWID" */ } if SQLITE_IGNORE == Xsqlite3AuthReadCol(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FzName, zCol, iDb) { @@ -93556,7 +93561,7 @@ func Xsqlite3AuthRead(tls *libc.TLS, pParse uintptr, pExpr uintptr, pSchema uint // either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY. If SQLITE_DENY // is returned, then the error count and error message in pParse are // modified appropriately. -func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:112948:20: */ +func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, zArg2 uintptr, zArg3 uintptr) int32 { /* sqlite3.c:112958:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var rc int32 @@ -93578,7 +93583,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, f func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAuth})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAuthArg, code, zArg1, zArg2, zArg3, (*Parse)(unsafe.Pointer(pParse)).FzAuthContext) if rc == SQLITE_DENY { - Xsqlite3ErrorMsg(tls, pParse, ts+11938 /* "not authorized" */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+11960, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if rc != SQLITE_OK && rc != SQLITE_IGNORE { rc = SQLITE_DENY @@ -93590,7 +93595,7 @@ func Xsqlite3AuthCheck(tls *libc.TLS, pParse uintptr, code int32, zArg1 uintptr, // Push an authorization context. After this routine is called, the // zArg3 argument to authorization callbacks will be zContext until // popped. Or if pParse==0, this routine is a no-op. -func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:112997:21: */ +func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zContext uintptr) { /* sqlite3.c:113007:21: */ (*AuthContext)(unsafe.Pointer(pContext)).FpParse = pParse (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext = (*Parse)(unsafe.Pointer(pParse)).FzAuthContext @@ -93599,7 +93604,7 @@ func Xsqlite3AuthContextPush(tls *libc.TLS, pParse uintptr, pContext uintptr, zC // Pop an authorization context that was previously pushed // by sqlite3AuthContextPush -func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113012:21: */ +func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:113022:21: */ if (*AuthContext)(unsafe.Pointer(pContext)).FpParse != 0 { (*Parse)(unsafe.Pointer((*AuthContext)(unsafe.Pointer(pContext)).FpParse)).FzAuthContext = (*AuthContext)(unsafe.Pointer(pContext)).FzAuthContext (*AuthContext)(unsafe.Pointer(pContext)).FpParse = uintptr(0) @@ -93614,7 +93619,7 @@ func Xsqlite3AuthContextPop(tls *libc.TLS, pContext uintptr) { /* sqlite3.c:1130 // This routine just records the fact that the lock is desired. The // code to make the lock occur is generated by a later call to // codeTableLocks() which occurs during sqlite3FinishCoding(). -func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113071:29: */ +func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113081:29: */ var pToplevel uintptr var i int32 var nBytes int32 @@ -93648,7 +93653,7 @@ func lockTable(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock } } -func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113107:21: */ +func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWriteLock U8, zName uintptr) { /* sqlite3.c:113117:21: */ if iDb == 1 { return } @@ -93660,7 +93665,7 @@ func Xsqlite3TableLock(tls *libc.TLS, pParse uintptr, iDb int32, iTab Pgno, isWr // Code an OP_TableLock instruction for each table locked by the // statement (configured by calls to sqlite3TableLock()). -func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113123:13: */ +func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113133:13: */ var i int32 var pVdbe uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -93684,7 +93689,7 @@ func codeTableLocks(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113123:13: */ // // Note that if an error occurred, it might be the case that // no VDBE code was generated. -func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113162:21: */ +func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113172:21: */ var db uintptr var v uintptr @@ -93715,7 +93720,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113162:2 if v != 0 { if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 124)) + var pReturning uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) var addrRewind int32 var i int32 var reg int32 @@ -93798,7 +93803,7 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113162:2 } if (*Parse)(unsafe.Pointer(pParse)).FbReturning != 0 { - var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 124)) + var pRet uintptr = *(*uintptr)(unsafe.Pointer(pParse + 132)) if (*Returning)(unsafe.Pointer(pRet)).FnRetCol == 0 { } else { @@ -93834,17 +93839,17 @@ func Xsqlite3FinishCoding(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:113162:2 // * Built-in SQL functions always take precedence over application-defined // SQL functions. In other words, it is not possible to override a // built-in function. -func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:113328:21: */ - bp := tls.Alloc(88) - defer tls.Free(88) +func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:113338:21: */ + bp := tls.Alloc(80) + defer tls.Free(80) var ap Va_list _ = ap var zSql uintptr - *(*uintptr)(unsafe.Pointer(bp + 84 /* zErrMsg */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 76 /* zErrMsg */)) = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedDbFlags U32 = (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags - // var saveBuf [84]int8 at bp, 84 + // var saveBuf [76]int8 at bp, 76 if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return @@ -93864,14 +93869,14 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint return } (*Parse)(unsafe.Pointer(pParse)).Fnested++ - libc.Xmemcpy(tls, bp /* &saveBuf[0] */, pParse+uintptr(uint32(uintptr(0)+184)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+184)) - libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+184)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+184)) + libc.Xmemcpy(tls, bp, pParse+uintptr(uint32(uintptr(0)+192)), uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+192)) + libc.Xmemset(tls, pParse+uintptr(uint32(uintptr(0)+192)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+192)) *(*U32)(unsafe.Pointer(db + 24)) |= U32(DBFLAG_PreferBuiltin) - Xsqlite3RunParser(tls, pParse, zSql, bp+84 /* &zErrMsg */) + Xsqlite3RunParser(tls, pParse, zSql, bp+76) (*Sqlite3)(unsafe.Pointer(db)).FmDbFlags = savedDbFlags - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 84 /* zErrMsg */))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 76 /* zErrMsg */))) Xsqlite3DbFree(tls, db, zSql) - libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+184)), bp /* &saveBuf[0] */, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+184)) + libc.Xmemcpy(tls, pParse+uintptr(uint32(uintptr(0)+192)), bp, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+192)) (*Parse)(unsafe.Pointer(pParse)).Fnested-- } @@ -93885,7 +93890,7 @@ func Xsqlite3NestedParse(tls *libc.TLS, pParse uintptr, zFormat uintptr, va uint // auxiliary databases added using the ATTACH command. // // See also sqlite3LocateTable(). -func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:113383:22: */ +func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintptr) uintptr { /* sqlite3.c:113393:22: */ var p uintptr = uintptr(0) var i int32 @@ -93900,25 +93905,25 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp if i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb { // No match against the official names. But always match "main" // to schema 0 as a legacy fallback. - if Xsqlite3StrICmp(tls, zDatabase, ts+6305) == 0 { + if Xsqlite3StrICmp(tls, zDatabase, ts+6327) == 0 { i = 0 } else { return uintptr(0) } } p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, zName) - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+7997, 7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { if i == 1 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11953+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11972+7) == 0 || - Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5803+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11975+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11994+7) == 0 || + Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5825+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+11986 /* "sqlite_temp_mast..." */) + ts+12008) } } else { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11972+7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11994+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i)*16)).FpSchema+8, - ts+5803 /* "sqlite_master" */) + ts+5825) } } } @@ -93941,12 +93946,12 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp break } } - if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+7997, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11972+7) == 0 { - p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5803 /* "sqlite_master" */) - } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11953+7) == 0 { + if p == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11994+7) == 0 { + p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpSchema+8, ts+5825) + } else if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11975+7) == 0 { p = Xsqlite3HashFind(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema+8, - ts+11986 /* "sqlite_temp_mast..." */) + ts+12008) } } } @@ -93961,7 +93966,7 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // The difference between this routine and sqlite3FindTable() is that this // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. -func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:113461:22: */ +func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:113471:22: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -93982,7 +93987,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // can be an eponymous virtual table. if int32((*Parse)(unsafe.Pointer(pParse)).FdisableVtab) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 { var pMod uintptr = Xsqlite3HashFind(tls, db+388, zName) - if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12005, 7) == 0 { + if pMod == uintptr(0) && Xsqlite3_strnicmp(tls, zName, ts+12027, 7) == 0 { pMod = Xsqlite3PragmaVtabRegister(tls, db, zName) } if pMod != 0 && Xsqlite3VtabEponymousTableInit(tls, pParse, pMod) != 0 { @@ -94001,14 +94006,14 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if p == uintptr(0) { var zMsg uintptr if flags&U32(LOCATE_VIEW) != 0 { - zMsg = ts + 12013 /* "no such view" */ + zMsg = ts + 12035 /* "no such view" */ } else { - zMsg = ts + 12026 /* "no such table" */ + zMsg = ts + 12048 /* "no such table" */ } if zDbase != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+6498 /* "%s: %s.%s" */, libc.VaList(bp, zMsg, zDbase, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6520, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+6508 /* "%s: %s" */, libc.VaList(bp+24, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+6530, libc.VaList(bp+24, zMsg, zName)) } } else { @@ -94024,7 +94029,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr // the search to schema (p->pSchema) if it is not NULL. p->pSchema may be // non-NULL if it is part of a view or trigger program definition. See // sqlite3FixSrcList() for details. -func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:113524:22: */ +func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr) uintptr { /* sqlite3.c:113534:22: */ var zDb uintptr if (*SrcItem)(unsafe.Pointer(p)).FpSchema != 0 { @@ -94038,13 +94043,13 @@ func Xsqlite3LocateTableItem(tls *libc.TLS, pParse uintptr, flags U32, p uintptr // Return the preferred table name for system tables. Translate legacy // names into the new preferred names, as appropriate. -func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:113544:27: */ - if Xsqlite3_strnicmp(tls, zName, ts+7997, 7) == 0 { - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5803+7) == 0 { - return ts + 11972 /* "sqlite_schema" */ +func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:113554:27: */ + if Xsqlite3_strnicmp(tls, zName, ts+8019, 7) == 0 { + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+5825+7) == 0 { + return ts + 11994 /* "sqlite_schema" */ } - if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+11986+7) == 0 { - return ts + 11953 /* "sqlite_temp_sche..." */ + if Xsqlite3StrICmp(tls, zName+uintptr(7), ts+12008+7) == 0 { + return ts + 11975 /* "sqlite_temp_sche..." */ } } return zName @@ -94060,7 +94065,7 @@ func Xsqlite3PreferredTableName(tls *libc.TLS, zName uintptr) uintptr { /* sqlit // for duplicate index names is done.) The search order is // TEMP first, then MAIN, then any auxiliary databases added // using the ATTACH command. -func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:113568:22: */ +func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) uintptr { /* sqlite3.c:113578:22: */ var p uintptr = uintptr(0) var i int32 // All mutexes are required for schema access. Make sure we hold them. @@ -94087,7 +94092,7 @@ func Xsqlite3FindIndex(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr) ui } // Reclaim the memory used by an index -func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:113588:21: */ +func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:113598:21: */ Xsqlite3DeleteIndexSamples(tls, db, p) Xsqlite3ExprDelete(tls, db, (*Index)(unsafe.Pointer(p)).FpPartIdxWhere) Xsqlite3ExprListDelete(tls, db, (*Index)(unsafe.Pointer(p)).FaColExpr) @@ -94103,7 +94108,7 @@ func Xsqlite3FreeIndex(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1135 // unlike that index from its Table then remove the index from // the index hash table and free all memory structures associated // with the index. -func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:113608:21: */ +func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName uintptr) { /* sqlite3.c:113618:21: */ var pIndex uintptr var pHash uintptr @@ -94135,7 +94140,7 @@ func Xsqlite3UnlinkAndDeleteIndex(tls *libc.TLS, db uintptr, iDb int32, zIdxName // // Entry 0 (the "main" database) and entry 1 (the "temp" database) // are never candidates for being collapsed. -func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:113641:21: */ +func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:113651:21: */ var i int32 var j int32 for i = libc.AssignInt32(&j, 2); i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -94161,7 +94166,7 @@ func Xsqlite3CollapseDatabaseArray(tls *libc.TLS, db uintptr) { /* sqlite3.c:113 // Reset the schema for the database at index iDb. Also reset the // TEMP schema. The reset is deferred if db->nSchemaLock is not zero. // Deferred resets may be run by calling with iDb<0. -func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:113668:21: */ +func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:113678:21: */ var i int32 if iDb >= 0 { @@ -94182,7 +94187,7 @@ func Xsqlite3ResetOneSchema(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c // Erase all schema information from all attached databases (including // "main" and "temp") for a single database connection. -func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:113692:21: */ +func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3.c:113702:21: */ var i int32 Xsqlite3BtreeEnterAll(tls, db) for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -94204,14 +94209,14 @@ func Xsqlite3ResetAllSchemasOfConnection(tls *libc.TLS, db uintptr) { /* sqlite3 } // This routine is called when a commit occurs. -func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:113716:21: */ +func Xsqlite3CommitInternalChanges(tls *libc.TLS, db uintptr) { /* sqlite3.c:113726:21: */ *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_SchemaChange)) } // Set the expression associated with a column. This is usually // the DEFAULT value, but might also be the expression that computes // the value for a generated column. -func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:113725:21: */ +func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uintptr, pExpr uintptr) { /* sqlite3.c:113735:21: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.pDfltList */)) @@ -94234,7 +94239,7 @@ func Xsqlite3ColumnSetExpr(tls *libc.TLS, pParse uintptr, pTab uintptr, pCol uin // Return the expression associated with a column. The expression might be // the DEFAULT clause or the AS clause of a generated column. // Return NULL if the column has no associated expression. -func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:113751:21: */ +func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* sqlite3.c:113761:21: */ if int32((*Column)(unsafe.Pointer(pCol)).FiDflt) == 0 { return uintptr(0) } @@ -94251,7 +94256,7 @@ func Xsqlite3ColumnExpr(tls *libc.TLS, pTab uintptr, pCol uintptr) uintptr { /* } // Set the collating sequence name for a column. -func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:113762:21: */ +func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintptr) { /* sqlite3.c:113772:21: */ var nColl I64 var n I64 var zNew uintptr @@ -94270,7 +94275,7 @@ func Xsqlite3ColumnSetColl(tls *libc.TLS, db uintptr, pCol uintptr, zColl uintpt } // Return the collating squence name for a column -func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:113787:27: */ +func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:113797:27: */ var z uintptr if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASCOLL == 0 { return uintptr(0) @@ -94289,7 +94294,7 @@ func Xsqlite3ColumnColl(tls *libc.TLS, pCol uintptr) uintptr { /* sqlite3.c:1137 // Delete memory allocated for the column names of a table or view (the // Table.aCol[] array). -func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113802:21: */ +func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113812:21: */ var i int32 var pCol uintptr @@ -94339,7 +94344,7 @@ func Xsqlite3DeleteColumnNames(tls *libc.TLS, db uintptr, pTable uintptr) { /* s // lookaside memory, but some ephemeral Table objects do.) Or the // db parameter can be used with db->pnBytesFreed to measure the memory // used by the Table object. -func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113840:29: */ +func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113850:29: */ var pIndex uintptr var pNext uintptr @@ -94376,7 +94381,7 @@ func deleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:11384 } -func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113897:21: */ +func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3.c:113907:21: */ // Do not delete the table until the reference count reaches zero. if !(pTable != 0) { return @@ -94389,7 +94394,7 @@ func Xsqlite3DeleteTable(tls *libc.TLS, db uintptr, pTable uintptr) { /* sqlite3 // Unlink the given table from the hash tables and the delete the // table structure with all its indices and foreign keys. -func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:113909:21: */ +func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName uintptr) { /* sqlite3.c:113919:21: */ var p uintptr var pDb uintptr @@ -94411,7 +94416,7 @@ func Xsqlite3UnlinkAndDeleteTable(tls *libc.TLS, db uintptr, iDb int32, zTabName // Tokens are often just pointers into the original SQL text and so // are not \000 terminated and are not persistent. The returned string // is \000 terminated and is persistent. -func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:113937:21: */ +func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { /* sqlite3.c:113947:21: */ var zName uintptr if pName != 0 { zName = Xsqlite3DbStrNDup(tls, db, (*Token)(unsafe.Pointer(pName)).Fz, uint64((*Token)(unsafe.Pointer(pName)).Fn)) @@ -94424,9 +94429,9 @@ func Xsqlite3NameFromToken(tls *libc.TLS, db uintptr, pName uintptr) uintptr { / // Open the sqlite_schema table stored in database number iDb for // writing. The table is opened using cursor 0. -func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:113952:21: */ +func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c:113962:21: */ var v uintptr = Xsqlite3GetVdbe(tls, p) - Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5803 /* "sqlite_master" */) + Xsqlite3TableLock(tls, p, iDb, uint32(SCHEMA_ROOT), uint8(1), ts+5825) Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, 0, SCHEMA_ROOT, iDb, 5) if (*Parse)(unsafe.Pointer(p)).FnTab == 0 { (*Parse)(unsafe.Pointer(p)).FnTab = 1 @@ -94437,7 +94442,7 @@ func Xsqlite3OpenSchemaTable(tls *libc.TLS, p uintptr, iDb int32) { /* sqlite3.c // of a database ("main", "temp" or the name of an attached db). This // function returns the index of the named database in db->aDb[], or // -1 if the named db cannot be found. -func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:113967:20: */ +func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:113977:20: */ var i int32 = -1 // Database number if zName != 0 { var pDb uintptr @@ -94453,7 +94458,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql } // "main" is always an acceptable alias for the primary database // even if it has been renamed using SQLITE_DBCONFIG_MAINDBNAME. - if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6305, zName) { + if i == 0 && 0 == Xsqlite3_stricmp(tls, ts+6327, zName) { goto __3 } @@ -94473,7 +94478,7 @@ func Xsqlite3FindDbName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sql // "temp" or the name of an attached db). This routine returns the // index of the named database in db->aDb[], or -1 if the named db // does not exist. -func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:113987:20: */ +func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3.c:113997:20: */ var i int32 // Database number var zName uintptr // Name we are searching for zName = Xsqlite3NameFromToken(tls, db, pName) @@ -94497,7 +94502,7 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // This routine sets the *ppUnqual pointer to point at the token (pName1 or // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. -func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114012:20: */ +func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:114022:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94506,13 +94511,13 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u if (*Token)(unsafe.Pointer(pName2)).Fn > uint32(0) { if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12040 /* "corrupt database" */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12062, 0) return -1 } *(*uintptr)(unsafe.Pointer(pUnqual)) = pName2 iDb = Xsqlite3FindDb(tls, db, pName1) if iDb < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12057 /* "unknown database..." */, libc.VaList(bp, pName1)) + Xsqlite3ErrorMsg(tls, pParse, ts+12079, libc.VaList(bp, pName1)) return -1 } } else { @@ -94524,7 +94529,7 @@ func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u } // True if PRAGMA writable_schema is ON -func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114045:20: */ +func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:114055:20: */ return libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema|SQLITE_Defensive) == uint64(SQLITE_WriteSchema)) } @@ -94538,7 +94543,7 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1140 // When parsing the sqlite_schema table, this routine also checks to // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. -func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114067:20: */ +func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:114077:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -94553,13 +94558,13 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType if Xsqlite3_stricmp(tls, zType, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit))) != 0 || Xsqlite3_stricmp(tls, zName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 1*4))) != 0 || Xsqlite3_stricmp(tls, zTblName, *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit + 2*4))) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1543 /* "" */, 0) // corruptSchema() will supply the error + Xsqlite3ErrorMsg(tls, pParse, ts+1565, 0) // corruptSchema() will supply the error return SQLITE_ERROR } } else { - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+7997, 7) || + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 && 0 == Xsqlite3_strnicmp(tls, zName, ts+8019, 7) || Xsqlite3ReadOnlyShadowTables(tls, db) != 0 && Xsqlite3ShadowTableName(tls, db, zName) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12077, /* "object name rese..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+12099, libc.VaList(bp, zName)) return SQLITE_ERROR } @@ -94569,7 +94574,7 @@ func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType } // Return the PRIMARY KEY index of a table -func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114105:22: */ +func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:114115:22: */ var p uintptr for p = (*Table)(unsafe.Pointer(pTab)).FpIndex; p != 0 && !(int32(*(*uint16)(unsafe.Pointer(p + 56 /* &.idxType */))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY); p = (*Index)(unsafe.Pointer(p)).FpNext { } @@ -94580,7 +94585,7 @@ func Xsqlite3PrimaryKeyIndex(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c // for the column iCol in the table (as defined by the CREATE TABLE statement) // find the (first) offset of that column in index pIdx. Or return -1 // if column iCol is not used in index pIdx. -func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114117:20: */ +func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* sqlite3.c:114127:20: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { if int32(iCol) == int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) { @@ -94600,7 +94605,7 @@ func Xsqlite3TableColumnToIndex(tls *libc.TLS, pIdx uintptr, iCol I16) I16 { /* // and only there are VIRTUAL columns to the left. // // If SQLITE_OMIT_GENERATED_COLUMNS, this routine is a no-op macro. -func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114137:20: */ +func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114147:20: */ if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_HasVirtual) != 0 { var i int32 for i = 0; i <= int32(iCol); i++ { @@ -94647,7 +94652,7 @@ func Xsqlite3StorageColumnToTable(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // this routine is a no-op macro. If the pTab does not have any virtual // columns, then this routine is no-op that always return iCol. If iCol // is negative (indicating the ROWID column) then this routine return iCol. -func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114185:20: */ +func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { /* sqlite3.c:114195:20: */ var i int32 var n I16 @@ -94677,7 +94682,7 @@ func Xsqlite3TableColumnToStorage(tls *libc.TLS, pTab uintptr, iCol I16) I16 { / // exists, so that the prepared statement for CREATE TABLE IF NOT EXISTS // will return false for sqlite3_stmt_readonly() even if that statement // is a read-only no-op. -func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114211:13: */ +func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:114221:13: */ var iReg int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) var v uintptr = Xsqlite3GetVdbe(tls, pParse) if v != 0 { @@ -94700,7 +94705,7 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11421 // routines will be called to add more information to this record. // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. -func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:114236:21: */ +func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:114246:21: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -94728,15 +94733,15 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui iDb = int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) zName = Xsqlite3DbStrDup(tls, db, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 11986 /* "sqlite_temp_mast..." */ + return ts + 12008 /* "sqlite_temp_mast..." */ } - return ts + 5803 /* "sqlite_master" */ + return ts + 5825 /* "sqlite_master" */ }()) *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */)) = pName1 goto __2 __1: // The common case - iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+16 /* &pName */) + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+16) if !(iDb < 0) { goto __3 } @@ -94748,7 +94753,7 @@ __3: } // If creating a temp table, the name may not be qualified. Unless // the database name is "temp" anyway. - Xsqlite3ErrorMsg(tls, pParse, ts+12119 /* "temporary table ..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12141, 0) return __4: ; @@ -94776,9 +94781,9 @@ __7: ; if !(Xsqlite3CheckObjectName(tls, pParse, zName, func() uintptr { if isView != 0 { - return ts + 10358 + return ts + 10380 } - return ts + 8739 + return ts + 8761 }(), zName) != 0) { goto __8 } @@ -94795,9 +94800,9 @@ __9: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && isTemp == 1 { - return ts + 11986 + return ts + 12008 } - return ts + 5803 + return ts + 5825 }(), uintptr(0), zDb) != 0) { goto __10 } @@ -94835,7 +94840,7 @@ __13: if !!(noErr != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12160 /* "table %T already..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+12182, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */)))) goto __16 __15: ; @@ -94849,7 +94854,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12184 /* "there is already..." */, libc.VaList(bp+8, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12206, libc.VaList(bp+8, zName)) goto begin_table_error __17: ; @@ -94925,7 +94930,7 @@ __20: goto __22 __21: ; - *(*int32)(unsafe.Pointer(pParse + 124)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) + *(*int32)(unsafe.Pointer(pParse + 132)) = Xsqlite3VdbeAddOp3(tls, v, OP_CreateBtree, iDb, reg2, BTREE_INTKEY) __22: ; Xsqlite3OpenSchemaTable(tls, pParse, iDb) @@ -94952,8 +94957,8 @@ var aCode = [4]U8{ U8(SQLITE_CREATE_TEMP_TABLE), U8(SQLITE_CREATE_VIEW), U8(SQLITE_CREATE_TEMP_VIEW), -} /* sqlite3.c:114283:21 */ -var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:114361:23 */ +} /* sqlite3.c:114293:21 */ +var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* sqlite3.c:114371:23 */ // Set properties of a table column based on the (magical) // name of the column. @@ -94963,10 +94968,10 @@ var nullRow = [6]int8{int8(6), int8(0), int8(0), int8(0), int8(0), int8(0)} /* s // with any application-generated triggers. // Clean up the data structures associated with the RETURNING clause. -func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:114446:13: */ +func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite3.c:114456:13: */ var pHash uintptr pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - Xsqlite3HashInsert(tls, pHash, ts+12219 /* "sqlite_returning" */, uintptr(0)) + Xsqlite3HashInsert(tls, pHash, ts+12241, uintptr(0)) Xsqlite3ExprListDelete(tls, db, (*Returning)(unsafe.Pointer(pRet)).FpReturnEL) Xsqlite3DbFree(tls, db, pRet) } @@ -94985,12 +94990,12 @@ func sqlite3DeleteReturning(tls *libc.TLS, db uintptr, pRet uintptr) { /* sqlite // is attached to a DELETE, INSERT, or UPDATE, so construct it as a // RETURNING trigger instead. It will then be converted into the appropriate // type on the first call to sqlite3TriggersExist(). -func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:114470:21: */ +func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:114480:21: */ var pRet uintptr var pHash uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Parse)(unsafe.Pointer(pParse)).FpNewTrigger != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12236 /* "cannot use RETUR..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12258, 0) } else { } @@ -95000,7 +95005,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql Xsqlite3ExprListDelete(tls, db, pList) return } - *(*uintptr)(unsafe.Pointer(pParse + 124)) = pRet + *(*uintptr)(unsafe.Pointer(pParse + 132)) = pRet (*Returning)(unsafe.Pointer(pRet)).FpParse = pParse (*Returning)(unsafe.Pointer(pRet)).FpReturnEL = pList Xsqlite3ParserAddCleanup(tls, pParse, @@ -95011,7 +95016,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12219 /* "sqlite_returning" */ + (*Returning)(unsafe.Pointer(pRet)).FretTrig.FzName = ts + 12241 /* "sqlite_returning" */ (*Returning)(unsafe.Pointer(pRet)).FretTrig.Fop = U8(TK_RETURNING) (*Returning)(unsafe.Pointer(pRet)).FretTrig.Ftr_tm = U8(TRIGGER_AFTER) (*Returning)(unsafe.Pointer(pRet)).FretTrig.FbReturning = U8(1) @@ -95023,7 +95028,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql (*Returning)(unsafe.Pointer(pRet)).FretTStep.FpExprList = pList pHash = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema + 40 - if Xsqlite3HashInsert(tls, pHash, ts+12219, pRet+8) == + if Xsqlite3HashInsert(tls, pHash, ts+12241, pRet+8) == pRet+8 { Xsqlite3OomFault(tls, db) } @@ -95035,7 +95040,7 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // in a CREATE TABLE statement. sqlite3StartTable() gets called // first to get things going. Then this routine is called for each // column. -func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:114518:21: */ +func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) { /* sqlite3.c:114528:21: */ bp := tls.Alloc(32) defer tls.Free(32) *(*Token)(unsafe.Pointer(bp + 16)) = sName @@ -95057,11 +95062,11 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Table)(unsafe.Pointer(p)).FnCol)+1 > *(*int32)(unsafe.Pointer(db + 112 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12270 /* "too many columns..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12292, libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName)) return } if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { - Xsqlite3DequoteToken(tls, bp+16 /* &sName */) + Xsqlite3DequoteToken(tls, bp+16) } // Because keywords GENERATE ALWAYS can be converted into indentifiers @@ -95069,13 +95074,13 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // with "generated always". Check for this case and omit the surplus // text. if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(16) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12293, 6) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(6)), ts+12315, 6) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(6) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24 /* &sType */)).Fn-- } if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(9) && - Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12300, 9) == 0 { + Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz+uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(9)), ts+12322, 9) == 0 { *(*uint32)(unsafe.Pointer(bp + 24 + 4)) -= uint32(9) for (*Token)(unsafe.Pointer(bp+24)).Fn > uint32(0) && int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp+24)).Fz + uintptr((*Token)(unsafe.Pointer(bp+24)).Fn-uint32(1)))))])&0x01 != 0 { (*Token)(unsafe.Pointer(bp+24 /* &sType */)).Fn-- @@ -95087,7 +95092,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // set the Column.eType field rather than storing the typename after // the column name, in order to save space. if (*Token)(unsafe.Pointer(bp+24)).Fn >= uint32(3) { - Xsqlite3DequoteToken(tls, bp+24 /* &sType */) + Xsqlite3DequoteToken(tls, bp+24) for i = 0; i < SQLITE_N_STDTYPE; i++ { if (*Token)(unsafe.Pointer(bp+24)).Fn == uint32(Xsqlite3StdTypeLen[i]) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(bp+24)).Fz, Xsqlite3StdType[i], int32((*Token)(unsafe.Pointer(bp+24)).Fn)) == 0 { @@ -95107,7 +95112,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) return } if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { - Xsqlite3RenameTokenMap(tls, pParse, z, bp+16 /* &sName */) + Xsqlite3RenameTokenMap(tls, pParse, z, bp+16) } libc.Xmemcpy(tls, z, (*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fz, (*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fn) *(*int8)(unsafe.Pointer(z + uintptr((*Token)(unsafe.Pointer(bp+16 /* &sName */)).Fn))) = int8(0) @@ -95115,7 +95120,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FhName) == int32(hName) && Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*16)).FzCnName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12310 /* "duplicate column..." */, libc.VaList(bp+8, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12332, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -95154,7 +95159,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, sName Token, sType Token) // parsing a CREATE TABLE statement. A "NOT NULL" constraint has // been seen on a column. This routine sets the notNull flag on // the column currently under construction. -func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:114631:21: */ +func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlite3.c:114641:21: */ var p uintptr var pCol uintptr p = (*Parse)(unsafe.Pointer(pParse)).FpNewTable @@ -95201,7 +95206,7 @@ func Xsqlite3AddNotNull(tls *libc.TLS, pParse uintptr, onError int32) { /* sqlit // // If none of the substrings in the above table are found, // SQLITE_AFF_NUMERIC is returned. -func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:114678:21: */ +func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sqlite3.c:114688:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -95249,7 +95254,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq for *(*int8)(unsafe.Pointer(zChar)) != 0 { if int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zChar)))])&0x04 != 0 { // BLOB(k), VARCHAR(k), CHAR(k) -> r=(k/4+1) - Xsqlite3GetInt32(tls, zChar, bp /* &v */) + Xsqlite3GetInt32(tls, zChar, bp) break } zChar++ @@ -95275,7 +95280,7 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. -func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:114755:21: */ +func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:114765:21: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -95287,23 +95292,23 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar var isInit int32 = libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb) != 1) pCol = (*Table)(unsafe.Pointer(p)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(p)).FnCol)-1)*16 if !(Xsqlite3ExprIsConstantOrFunction(tls, pExpr, uint8(isInit)) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12336, /* "default value of..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+12358, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } else if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12381 /* "cannot use DEFAU..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12403, 0) } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. // var x Expr at bp+8, 52 var pDfltExpr uintptr - libc.Xmemset(tls, bp+8 /* &x */, 0, uint32(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).Fop = U8(TK_SPAN) *(*uintptr)(unsafe.Pointer(bp + 8 + 8)) = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).FpLeft = pExpr (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).Fflags = U32(EP_Skip) - pDfltExpr = Xsqlite3ExprDup(tls, db, bp+8 /* &x */, EXPRDUP_REDUCE) + pDfltExpr = Xsqlite3ExprDup(tls, db, bp+8, EXPRDUP_REDUCE) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 + 8))) Xsqlite3ColumnSetExpr(tls, pParse, p, pCol, pDfltExpr) } @@ -95328,7 +95333,7 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar // if the expression is just a TK_STRING with an optional COLLATE clause. // If the expression is anything other than TK_STRING, the expression is // unchanged. -func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:114814:13: */ +func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:114824:13: */ if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_STRING { (*Expr)(unsafe.Pointer(p)).Fop = U8(TK_ID) } else if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLLATE && int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(p)).FpLeft)).Fop) == TK_STRING { @@ -95337,12 +95342,12 @@ func sqlite3StringToId(tls *libc.TLS, p uintptr) { /* sqlite3.c:114814:13: */ } // Tag the given column as being part of the PRIMARY KEY -func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:114825:13: */ +func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { /* sqlite3.c:114835:13: */ *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_PRIMKEY) if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_GENERATED != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12422 /* "generated column..." */, 0) + ts+12444, 0) } } @@ -95362,7 +95367,7 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. -func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:114855:21: */ +func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:114865:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95387,7 +95392,7 @@ __1: goto __2 } Xsqlite3ErrorMsg(tls, pParse, - ts+12474 /* "table \"%s\" has m..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+12496, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto primary_key_exit __2: ; @@ -95476,7 +95481,7 @@ __13: goto __17 } Xsqlite3ErrorMsg(tls, pParse, - ts+12515 /* "AUTOINCREMENT is..." */, 0) + ts+12537, 0) goto __18 __17: Xsqlite3CreateIndex(tls, pParse, uintptr(0), uintptr(0), uintptr(0), pList, onError, uintptr(0), @@ -95493,7 +95498,7 @@ primary_key_exit: } // Add a new CHECK constraint to the table currently under construction. -func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:114932:21: */ +func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:114942:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95514,7 +95519,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt } (*Token)(unsafe.Pointer(bp /* &t */)).Fz = zStart (*Token)(unsafe.Pointer(bp /* &t */)).Fn = uint32((int32(zEnd) - int32((*Token)(unsafe.Pointer(bp)).Fz)) / 1) - Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, bp /* &t */, 1) + Xsqlite3ExprListSetName(tls, pParse, (*Table)(unsafe.Pointer(pTab)).FpCheck, bp, 1) } } else { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pCheckExpr) @@ -95523,7 +95528,7 @@ func Xsqlite3AddCheckConstraint(tls *libc.TLS, pParse uintptr, pCheckExpr uintpt // Set the collation function of the most recently parsed table column // to the CollSeq given. -func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:114966:21: */ +func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* sqlite3.c:114976:21: */ var p uintptr var i int32 var zColl uintptr // Dequoted name of collation sequence @@ -95558,7 +95563,7 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. -func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:114999:21: */ +func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:115009:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -95578,7 +95583,7 @@ __1: if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) == PARSE_MODE_DECLARE_VTAB) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+12571 /* "virtual tables c..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12593, 0) goto generated_done __2: ; @@ -95591,13 +95596,13 @@ __3: if !(pType != 0) { goto __4 } - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12614, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(7) && Xsqlite3_strnicmp(tls, ts+12636, (*Token)(unsafe.Pointer(pType)).Fz, 7) == 0) { goto __5 } // no-op goto __6 __5: - if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12622, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { + if !((*Token)(unsafe.Pointer(pType)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, ts+12644, (*Token)(unsafe.Pointer(pType)).Fz, 6) == 0) { goto __7 } eType = U8(COLFLAG_STORED) @@ -95630,7 +95635,7 @@ __10: goto generated_done generated_error: - Xsqlite3ErrorMsg(tls, pParse, ts+12629, /* "error in generat..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+12651, libc.VaList(bp, (*Column)(unsafe.Pointer(pCol)).FzCnName)) generated_done: Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pExpr) @@ -95653,7 +95658,7 @@ generated_done: // // IMPLEMENTATION-OF: R-34230-56049 SQLite automatically increments // the schema-version whenever the schema changes. -func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115067:21: */ +func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:115077:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -95667,7 +95672,7 @@ func Xsqlite3ChangeCookie(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3 // // The estimate is conservative. It might be larger that what is // really needed. -func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115083:12: */ +func identLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:115093:12: */ var n int32 n = 0 __1: @@ -95702,7 +95707,7 @@ __3: // characters, does not begin with a digit and is not an SQL keyword, // then it is copied to the output buffer exactly as it is. Otherwise, // it is quoted using double-quotes. -func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115104:13: */ +func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* sqlite3.c:115114:13: */ var zIdent uintptr = zSignedIdent var i int32 var j int32 @@ -95738,7 +95743,7 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // Generate a CREATE TABLE statement appropriate for the given // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. -func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115132:13: */ +func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:115142:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -95772,13 +95777,13 @@ __3: ; n = n + identLength(tls, (*Table)(unsafe.Pointer(p)).FzName) if n < 50 { - zSep = ts + 1543 /* "" */ - zSep2 = ts + 12660 /* "," */ - zEnd = ts + 4877 /* ")" */ + zSep = ts + 1565 /* "" */ + zSep2 = ts + 12682 /* "," */ + zEnd = ts + 4899 /* ")" */ } else { - zSep = ts + 12662 /* "\n " */ - zSep2 = ts + 12666 /* ",\n " */ - zEnd = ts + 12671 /* "\n)" */ + zSep = ts + 12684 /* "\n " */ + zSep2 = ts + 12688 /* ",\n " */ + zEnd = ts + 12693 /* "\n)" */ } n = n + (35 + 6*int32((*Table)(unsafe.Pointer(p)).FnCol)) zStmt = Xsqlite3DbMallocRaw(tls, uintptr(0), uint64(n)) @@ -95786,9 +95791,9 @@ __3: Xsqlite3OomFault(tls, db) return uintptr(0) } - Xsqlite3_snprintf(tls, n, zStmt, ts+12674 /* "CREATE TABLE " */, 0) + Xsqlite3_snprintf(tls, n, zStmt, ts+12696, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) - identPut(tls, zStmt, bp+8 /* &k */, (*Table)(unsafe.Pointer(p)).FzName) + identPut(tls, zStmt, bp+8, (*Table)(unsafe.Pointer(p)).FzName) *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') pCol = (*Table)(unsafe.Pointer(p)).FaCol i = 0 @@ -95803,7 +95808,7 @@ __4: Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), zSep, 0) *(*int32)(unsafe.Pointer(bp + 8 /* k */)) += Xsqlite3Strlen30(tls, zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8)))) zSep = zSep2 - identPut(tls, zStmt, bp+8 /* &k */, (*Column)(unsafe.Pointer(pCol)).FzCnName) + identPut(tls, zStmt, bp+8, (*Column)(unsafe.Pointer(pCol)).FzCnName) zType = azType1[int32((*Column)(unsafe.Pointer(pCol)).Faffinity)-SQLITE_AFF_BLOB] len = Xsqlite3Strlen30(tls, zType) @@ -95820,21 +95825,21 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3601 /* "%s" */, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, n-*(*int32)(unsafe.Pointer(bp + 8)), zStmt+uintptr(*(*int32)(unsafe.Pointer(bp + 8))), ts+3623, libc.VaList(bp, zEnd)) return zStmt } var azType1 = [5]uintptr{ - /* SQLITE_AFF_BLOB */ ts + 1543, /* "" */ - /* SQLITE_AFF_TEXT */ ts + 12688, /* " TEXT" */ - /* SQLITE_AFF_NUMERIC */ ts + 12694, /* " NUM" */ - /* SQLITE_AFF_INTEGER */ ts + 12699, /* " INT" */ - /* SQLITE_AFF_REAL */ ts + 12704, /* " REAL" */ -} /* sqlite3.c:115162:23 */ + ts + 1565, + ts + 12710, + ts + 12716, + ts + 12721, + ts + 12726, +} /* sqlite3.c:115172:23 */ // Resize an Index object to hold N columns total. Return SQLITE_OK // on success and SQLITE_NOMEM on an OOM error. -func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:115200:12: */ +func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { /* sqlite3.c:115210:12: */ var zExtra uintptr var nByte int32 if int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) >= N { @@ -95863,7 +95868,7 @@ func resizeIndexObject(tls *libc.TLS, db uintptr, pIdx uintptr, N int32) int32 { } // Estimate the total row width for a table. -func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:115227:13: */ +func estimateTableWidth(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:115237:13: */ var wTable uint32 = uint32(0) var pTabCol uintptr var i int32 @@ -95892,7 +95897,7 @@ __3: } // Estimate the average size of a row for an index. -func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:115241:13: */ +func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:115251:13: */ var wIndex uint32 = uint32(0) var i int32 var aCol uintptr = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol @@ -95912,7 +95917,7 @@ func estimateIndexWidth(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:115241:13: * // Return true if column number x is any of the first nCol entries of aiCol[]. // This is used to determine if the column number x appears in any of the // first nCol entries of an index. -func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:115257:12: */ +func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sqlite3.c:115267:12: */ for libc.PostDecInt32(&nCol, 1) > 0 { if x == int32(*(*I16)(unsafe.Pointer(libc.PostIncUintptr(&aiCol, 2)))) { return 1 @@ -95932,7 +95937,7 @@ func hasColumn(tls *libc.TLS, aiCol uintptr, nCol int32, x int32) int32 { /* sql // This routine differs from hasColumn() in that both the column and the // collating sequence must match for this routine, but for hasColumn() only // the column name must match. -func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:115279:12: */ +func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int32) int32 { /* sqlite3.c:115289:12: */ var i int32 var j int32 @@ -95965,7 +95970,7 @@ func isDupColumn(tls *libc.TLS, pIdx uintptr, nKey int32, pPk uintptr, iCol int3 // // The colNotIdxed mask is AND-ed with the SrcList.a[].colUsed mask // to determine if the index is covering index. -func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:115318:13: */ +func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:115328:13: */ var m Bitmask = uint64(0) var j int32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable @@ -96004,7 +96009,7 @@ func recomputeColumnsNotIndexed(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:1153 // indices with the PRIMARY KEY columns. // // For virtual tables, only (1) is performed. -func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:115358:13: */ +func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:115368:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96031,9 +96036,9 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Convert the P3 operand of the OP_CreateBtree opcode from BTREE_INTKEY // into BTREE_BLOBKEY. - if *(*int32)(unsafe.Pointer(pParse + 124)) != 0 { + if *(*int32)(unsafe.Pointer(pParse + 132)) != 0 { - Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 124)), BTREE_BLOBKEY) + Xsqlite3VdbeChangeP3(tls, v, *(*int32)(unsafe.Pointer(pParse + 132)), BTREE_BLOBKEY) } // Locate the PRIMARY KEY index. Or, if this table was originally @@ -96042,9 +96047,9 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / var pList uintptr // var ipkToken Token at bp, 8 - Xsqlite3TokenInit(tls, bp /* &ipkToken */, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName) + Xsqlite3TokenInit(tls, bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName) pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3ExprAlloc(tls, db, TK_ID, bp /* &ipkToken */, 0)) + Xsqlite3ExprAlloc(tls, db, TK_ID, bp, 0)) if pList == uintptr(0) { *(*U32)(unsafe.Pointer(pTab + 28)) &= libc.Uint32FromInt32(libc.CplInt32(TF_WithoutRowid)) return @@ -96166,7 +96171,7 @@ func convertToWithoutRowidTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { / // Return true if pTab is a virtual table and zName is a shadow table name // for that virtual table. -func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:115517:20: */ +func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uintptr) int32 { /* sqlite3.c:115527:20: */ var nName int32 // Length of zName var pMod uintptr // Module for the virtual table @@ -96199,7 +96204,7 @@ func Xsqlite3IsShadowTableOf(tls *libc.TLS, db uintptr, pTab uintptr, zName uint // exists and has an xShadowName method, then loop over all other ordinary // tables within the same schema looking for shadow tables of pTab, and mark // any shadow tables seen using the TF_Shadow flag. -func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:115540:21: */ +func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:115550:21: */ var nName int32 // Length of pTab->zName var pMod uintptr // Module for the virtual table var k uintptr // For looping through the symbol table @@ -96243,7 +96248,7 @@ func Xsqlite3MarkAllShadowTablesOf(tls *libc.TLS, db uintptr, pTab uintptr) { /* // // zName is temporarily modified while this routine is running, but is // restored to its original value prior to this routine returning. -func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:115576:20: */ +func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { /* sqlite3.c:115586:20: */ var zTail uintptr // Pointer to the last "_" in zName var pTab uintptr // Table that zName is a shadow of zTail = libc.Xstrrchr(tls, zName, '_') @@ -96280,7 +96285,7 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // was called to create a table generated from a // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. -func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:115637:21: */ +func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U32, pSelect uintptr) { /* sqlite3.c:115647:21: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -96311,7 +96316,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // table itself. So mark it read-only. if (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy != 0 { if pSelect != 0 || !(int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM) && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+1543 /* "" */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+1565, 0) return } (*Table)(unsafe.Pointer(p)).Ftnum = (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum @@ -96336,10 +96341,10 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf0>>4) == COLTYPE_CUSTOM { if int32((*Column)(unsafe.Pointer(pCol)).FcolFlags)&COLFLAG_HASTYPE != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12710, /* "unknown datatype..." */ - libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1543 /* "" */))) + ts+12732, + libc.VaList(bp, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName, Xsqlite3ColumnType(tls, pCol, ts+1565))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+12743, /* "missing datatype..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+12765, libc.VaList(bp+24, (*Table)(unsafe.Pointer(p)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) } return @@ -96359,11 +96364,11 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if tabOpts&U32(TF_WithoutRowid) != 0 { if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+12770 /* "AUTOINCREMENT no..." */, 0) + ts+12792, 0) return } if (*Table)(unsafe.Pointer(p)).FtabFlags&U32(TF_HasPrimaryKey) == U32(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12820 /* "PRIMARY KEY miss..." */, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12842, libc.VaList(bp+40, (*Table)(unsafe.Pointer(p)).FzName)) return } *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_WithoutRowid | TF_NoVisibleRowid) @@ -96407,7 +96412,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } } if nNG == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+12852 /* "must have at lea..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+12874, 0) return } } @@ -96440,12 +96445,12 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // Initialize zType for the new view or table. if int32((*Table)(unsafe.Pointer(p)).FeTabType) == TABTYP_NORM { // A regular table - zType = ts + 8739 /* "table" */ - zType2 = ts + 12896 /* "TABLE" */ + zType = ts + 8761 /* "table" */ + zType2 = ts + 12918 /* "TABLE" */ } else { // A view - zType = ts + 10358 /* "view" */ - zType2 = ts + 12902 /* "VIEW" */ + zType = ts + 10380 /* "view" */ + zType2 = ts + 12924 /* "VIEW" */ } // If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT @@ -96493,8 +96498,8 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Table)(unsafe.Pointer(pSelTab)).FnCol = int16(0) (*Table)(unsafe.Pointer(pSelTab)).FaCol = uintptr(0) Xsqlite3DeleteTable(tls, db, pSelTab) - Xsqlite3SelectDestInit(tls, bp+144 /* &dest */, SRT_Coroutine, regYield) - Xsqlite3Select(tls, pParse, pSelect, bp+144 /* &dest */) + Xsqlite3SelectDestInit(tls, bp+144, SRT_Coroutine, regYield) + Xsqlite3Select(tls, pParse, pSelect, bp+144) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } @@ -96517,7 +96522,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } else { var pEnd2 uintptr if tabOpts != 0 { - pEnd2 = pParse + 184 + pEnd2 = pParse + 192 } else { pEnd2 = pEnd } @@ -96526,7 +96531,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + (*Token)(unsafe.Pointer(pEnd2)).Fn) } zStmt = Xsqlite3MPrintf(tls, db, - ts+12907 /* "CREATE %s %.*s" */, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+12929, libc.VaList(bp+48, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -96534,7 +96539,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // the information we've collected. Xsqlite3NestedParse(tls, pParse, - ts+12922, /* "UPDATE %Q.sqlite..." */ + ts+12944, libc.VaList(bp+72, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, @@ -96552,14 +96557,14 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+13020, /* "CREATE TABLE %Q...." */ + ts+13042, libc.VaList(bp+128, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13062 /* "tbl_name='%q' AN..." */, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13084, libc.VaList(bp+136, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -96580,7 +96585,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // then record a pointer to this table in the main database structure // so that INSERT can find the table easily. - if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9261) == 0 { + if libc.Xstrcmp(tls, (*Table)(unsafe.Pointer(p)).FzName, ts+9283) == 0 { (*Schema)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FpSchema)).FpSeqTab = p } @@ -96596,7 +96601,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr } // The parser calls this routine in order to create a new VIEW -func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:115974:21: */ +func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 uintptr, pName2 uintptr, pCNames uintptr, pSelect uintptr, isTemp int32, noErr int32) { /* sqlite3.c:115984:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -96617,7 +96622,7 @@ func Xsqlite3CreateView(tls *libc.TLS, pParse uintptr, pBegin uintptr, pName1 ui if !(int32((*Parse)(unsafe.Pointer(pParse)).FnVar) > 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+13096 /* "parameters are n..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13118, 0) goto create_view_fail __1: ; @@ -96637,9 +96642,9 @@ __2: // depend upon the old buggy behavior. *(*U32)(unsafe.Pointer(p + 28)) |= U32(TF_NoVisibleRowid) - Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp /* &pName */) + Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(p)).FpSchema) - Xsqlite3FixInit(tls, bp+4 /* &sFix */, pParse, iDb, ts+10358 /* "view" */, *(*uintptr)(unsafe.Pointer(bp /* pName */))) + Xsqlite3FixInit(tls, bp+4, pParse, iDb, ts+10380, *(*uintptr)(unsafe.Pointer(bp /* pName */))) if !(Xsqlite3FixSelect(tls, bp+4, pSelect) != 0) { goto __3 } @@ -96697,7 +96702,7 @@ __9: (*Token)(unsafe.Pointer(bp + 56 /* &sEnd */)).Fn = uint32(1) // Use sqlite3EndTable() to add the view to the schema table - Xsqlite3EndTable(tls, pParse, uintptr(0), bp+56 /* &sEnd */, uint32(0), uintptr(0)) + Xsqlite3EndTable(tls, pParse, uintptr(0), bp+56, uint32(0), uintptr(0)) create_view_fail: Xsqlite3SelectDelete(tls, db, pSelect) @@ -96714,7 +96719,7 @@ __10: // The Table structure pTable is really a VIEW. Fill in the names of // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. -func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116066:20: */ +func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:116076:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -96754,7 +96759,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i // CREATE TEMP VIEW ex1 AS SELECT a FROM ex1; // SELECT * FROM temp.ex1; if int32((*Table)(unsafe.Pointer(pTable)).FnCol) < 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+13132 /* "view %s is circu..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13154, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) return 1 } @@ -96829,7 +96834,7 @@ func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) i } // Clear the column names from every VIEW in database idx. -func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:116194:13: */ +func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:116204:13: */ var i uintptr if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(idx)*16)).FpSchema)).FschemaFlags)&DB_UnresetViews == DB_UnresetViews) { @@ -96859,7 +96864,7 @@ func sqliteViewResetAll(tls *libc.TLS, db uintptr, idx int32) { /* sqlite3.c:116 // We must continue looping until all tables and indices with // rootpage==iFrom have been converted to have a rootpage of iTo // in order to be certain that we got the right one. -func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:116228:21: */ +func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo Pgno) { /* sqlite3.c:116238:21: */ var pElem uintptr var pHash uintptr var pDb uintptr @@ -96885,14 +96890,14 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // Also write code to modify the sqlite_schema table and internal schema // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). -func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:116258:13: */ +func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:116268:13: */ bp := tls.Alloc(32) defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) if iTable < 2 { - Xsqlite3ErrorMsg(tls, pParse, ts+13162 /* "corrupt schema" */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13184, 0) } Xsqlite3VdbeAddOp3(tls, v, OP_Destroy, iTable, r1, iDb) Xsqlite3MayAbort(tls, pParse) @@ -96906,7 +96911,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // token for additional information. Xsqlite3NestedParse(tls, pParse, - ts+13177, /* "UPDATE %Q.sqlite..." */ + ts+13199, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb+uintptr(iDb)*16)).FzDbSName, iTable, r1, r1)) Xsqlite3ReleaseTempReg(tls, pParse, r1) } @@ -96915,7 +96920,7 @@ func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { / // Code to update the sqlite_schema tables and internal schema definitions // in case a root-page belonging to another table is moved by the btree layer // is also added (this can happen with an auto-vacuum database). -func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116288:13: */ +func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:116298:13: */ // If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM // is not defined), then it is important to call OP_Destroy on the // table and index root-pages in order, starting with the numerically @@ -96961,7 +96966,7 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. -func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:116337:13: */ +func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:116347:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -96970,17 +96975,17 @@ func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uint for i = 1; i <= 4; i++ { // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40 /* &zTab[0] */, ts+13244 /* "sqlite_stat%d" */, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40, ts+13266, libc.VaList(bp, i)) if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+11138, /* "DELETE FROM %Q.%..." */ - libc.VaList(bp+8, zDbName, bp+40 /* &zTab[0] */, zType, zName)) + ts+11160, + libc.VaList(bp+8, zDbName, bp+40, zType, zName)) } } } // Generate code to drop a table. -func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:116360:21: */ +func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:116370:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -97013,7 +97018,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // move as a result of the drop (can happen in auto-vacuum mode). if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != 0 { Xsqlite3NestedParse(tls, pParse, - ts+13258, /* "DELETE FROM %Q.s..." */ + ts+13280, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -97025,7 +97030,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // database. Xsqlite3NestedParse(tls, pParse, - ts+13303, /* "DELETE FROM %Q.s..." */ + ts+13325, libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { destroyTable(tls, pParse, pTab) @@ -97044,7 +97049,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 // Return TRUE if shadow tables should be read-only in the current // context. -func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:116433:20: */ +func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:116443:20: */ if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_Defensive) != uint64(0) && (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec == 0 && @@ -97055,12 +97060,12 @@ func Xsqlite3ReadOnlyShadowTables(tls *libc.TLS, db uintptr) int32 { /* sqlite3. } // Return true if it is not allowed to drop the given table -func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:116449:12: */ - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+7997, 7) == 0 { - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3224, 4) == 0 { +func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sqlite3.c:116459:12: */ + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+3246, 4) == 0 { return 0 } - if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+6997, 10) == 0 { + if Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName+uintptr(7), ts+7019, 10) == 0 { return 0 } return 1 @@ -97076,7 +97081,7 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. -func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:116468:21: */ +func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:116478:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -97144,9 +97149,9 @@ __7: zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 11986 + return ts + 12008 } - return ts + 5803 + return ts + 5825 }() zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zArg2 = uintptr(0) @@ -97206,7 +97211,7 @@ __18: if !(tableMayNotBeDropped(tls, db, pTab) != 0) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+13370 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13392, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __19: ; @@ -97216,14 +97221,14 @@ __19: if !(isView != 0 && !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW)) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13398 /* "use DROP TABLE t..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13420, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13432 /* "use DROP VIEW to..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13454, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -97238,7 +97243,7 @@ __21: if !!(isView != 0) { goto __23 } - sqlite3ClearStatTables(tls, pParse, iDb, ts+11330 /* "tbl" */, (*Table)(unsafe.Pointer(pTab)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11352, (*Table)(unsafe.Pointer(pTab)).FzName) Xsqlite3FkDropTable(tls, pParse, pName, pTab) __23: ; @@ -97264,7 +97269,7 @@ exit_drop_table: // // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. -func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:116588:21: */ +func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:116598:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -97303,7 +97308,7 @@ __4: goto __5 } Xsqlite3ErrorMsg(tls, pParse, - ts+13464, /* "foreign key on %..." */ + ts+13486, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(iCol)*16)).FzCnName, pTo)) goto fk_end __5: @@ -97316,7 +97321,7 @@ __2: } Xsqlite3ErrorMsg(tls, pParse, - ts+13527 /* "number of column..." */, 0) + ts+13549, 0) goto fk_end goto __7 __6: @@ -97401,7 +97406,7 @@ __21: goto __23 } Xsqlite3ErrorMsg(tls, pParse, - ts+13621, /* "unknown column \"..." */ + ts+13643, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer(pFromCol+8+uintptr(i)*20)).FzEName)) goto fk_end __23: @@ -97487,7 +97492,7 @@ fk_end: // parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE. // The behavior of the most recently created foreign key is adjusted // accordingly. -func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:116720:21: */ +func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { /* sqlite3.c:116730:21: */ var pTab uintptr var pFKey uintptr if libc.AssignUintptr(&pTab, (*Parse)(unsafe.Pointer(pParse)).FpNewTable) == uintptr(0) { @@ -97512,7 +97517,7 @@ func Xsqlite3DeferForeignKey(tls *libc.TLS, pParse uintptr, isDeferred int32) { // root page number of the index. If memRootPage is negative, then // the index already exists and must be cleared before being refilled and // the root page number of the index is taken from pIndex->tnum. -func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:116743:13: */ +func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPage int32) { /* sqlite3.c:116753:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -97561,7 +97566,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa regRecord = Xsqlite3GetTempReg(tls, pParse) Xsqlite3MultiWrite(tls, pParse) - Xsqlite3GenerateIndexKey(tls, pParse, pIndex, iTab, regRecord, 0, bp /* &iPartIdxLabel */, uintptr(0), 0) + Xsqlite3GenerateIndexKey(tls, pParse, pIndex, iTab, regRecord, 0, bp, uintptr(0), 0) Xsqlite3VdbeAddOp2(tls, v, OP_SorterInsert, iSorter, regRecord) Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp /* iPartIdxLabel */))) Xsqlite3VdbeAddOp2(tls, v, OP_Next, iTab, addr1+1) @@ -97624,7 +97629,7 @@ func sqlite3RefillIndex(tls *libc.TLS, pParse uintptr, pIndex uintptr, memRootPa // Increase the allocation size to provide an extra nExtra bytes // of 8-byte aligned space after the Index object and return a // pointer to this extra space in *ppExtra. -func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:116849:22: */ +func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int32, ppExtra uintptr) uintptr { /* sqlite3.c:116859:22: */ var p uintptr // Allocated index object var nByte int32 // Bytes of space for Index object + arrays @@ -97649,7 +97654,7 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // If expression list pList contains an expression that was parsed with // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. -func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:116882:20: */ +func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:116892:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -97658,12 +97663,12 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 for i = 0; i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { if uint32(int32(*(*uint8)(unsafe.Pointer(pList + 8 + uintptr(i)*20 + 12))&0x20>>5)) != 0 { var sf U8 = (*ExprList_item)(unsafe.Pointer(pList + 8 + uintptr(i)*20)).FsortFlags - Xsqlite3ErrorMsg(tls, pParse, ts+13667, /* "unsupported use ..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+13689, libc.VaList(bp, func() uintptr { if int32(sf) == 0 || int32(sf) == 3 { - return ts + 13695 /* "FIRST" */ + return ts + 13717 /* "FIRST" */ } - return ts + 13701 /* "LAST" */ + return ts + 13723 /* "LAST" */ }())) return 1 } @@ -97682,7 +97687,7 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // pList is a list of columns to be indexed. pList will be NULL if this // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. -func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:116910:21: */ +func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:116920:21: */ bp := tls.Alloc(196) defer tls.Free(196) @@ -97797,7 +97802,7 @@ __4: // to search for the table. 'Fix' the table name to this db // before looking up the table. - iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+128 /* &pName */) + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+128) if !(iDb < 0) { goto __7 } @@ -97821,7 +97826,7 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+132 /* &sFix */, pParse, iDb, ts+13706 /* "index" */, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + Xsqlite3FixInit(tls, bp+132, pParse, iDb, ts+13728, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+132, pTblName) != 0) { goto __10 } @@ -97842,7 +97847,7 @@ __11: goto __12 } Xsqlite3ErrorMsg(tls, pParse, - ts+13712, /* "cannot create a ..." */ + ts+13734, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __12: @@ -97869,26 +97874,26 @@ __6: ; pDb = (*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16 - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+7997, 7) == 0 && + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && pTblName != uintptr(0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13762 /* "table %s may not..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13784, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+13790 /* "views may not be..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13812, 0) goto exit_create_index __16: ; if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+13815 /* "virtual tables m..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+13837, 0) goto exit_create_index __17: ; @@ -97915,7 +97920,7 @@ __17: __20: ; - if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13706, (*Table)(unsafe.Pointer(pTab)).FzName)) { + if !(SQLITE_OK != Xsqlite3CheckObjectName(tls, pParse, zName, ts+13728, (*Table)(unsafe.Pointer(pTab)).FzName)) { goto __21 } goto exit_create_index @@ -97930,7 +97935,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+13849 /* "there is already..." */, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13871, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -97942,7 +97947,7 @@ __23: if !!(ifNotExist != 0) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+13883 /* "index %s already..." */, libc.VaList(bp+24, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13905, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -97971,7 +97976,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+13907 /* "sqlite_autoindex..." */, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+13929, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -98000,9 +98005,9 @@ __19: zDb = (*Db)(unsafe.Pointer(pDb)).FzDbSName if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 11986 + return ts + 12008 } - return ts + 5803 + return ts + 5825 }(), uintptr(0), zDb) != 0) { goto __34 } @@ -98033,9 +98038,9 @@ __33: } pCol = (*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1)*16 *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_UNIQUE) - Xsqlite3TokenInit(tls, bp+184 /* &prevCol */, (*Column)(unsafe.Pointer(pCol)).FzCnName) + Xsqlite3TokenInit(tls, bp+184, (*Column)(unsafe.Pointer(pCol)).FzCnName) pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+184 /* &prevCol */, 0)) + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+184, 0)) if !(pList == uintptr(0)) { goto __39 } @@ -98046,7 +98051,7 @@ __39: Xsqlite3ExprListSetSortOrder(tls, pList, sortOrder, -1) goto __38 __37: - Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13706 /* "index" */) + Xsqlite3ExprListCheckLength(tls, pParse, pList, ts+13728) if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __40 } @@ -98089,7 +98094,7 @@ __43: } pIndex = Xsqlite3AllocateIndexObject(tls, db, int16((*ExprList)(unsafe.Pointer(pList)).FnExpr+nExtraCol), - nName+nExtra+1, bp+192 /* &zExtra */) + nName+nExtra+1, bp+192) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __45 } @@ -98164,7 +98169,7 @@ __53: goto __56 } Xsqlite3ErrorMsg(tls, pParse, - ts+13930 /* "expressions proh..." */, 0) + ts+13952, 0) goto exit_create_index __56: ; @@ -98394,7 +98399,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+13991 /* "conflicting ON C..." */, libc.VaList(bp+48, 0)) + ts+14013, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -98450,8 +98455,8 @@ __81: if !(Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0) { goto __101 } - Xsqlite3ErrorMsg(tls, pParse, ts+14033 /* "invalid rootpage" */, 0) - (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 117365) + Xsqlite3ErrorMsg(tls, pParse, ts+14055, 0) + (*Parse)(unsafe.Pointer(pParse)).Frc = Xsqlite3CorruptError(tls, 117375) goto exit_create_index __101: ; @@ -98508,12 +98513,12 @@ __104: __107: ; // A named index with an explicit CREATE INDEX statement - zStmt = Xsqlite3MPrintf(tls, db, ts+14050, /* "CREATE%s INDEX %..." */ + zStmt = Xsqlite3MPrintf(tls, db, ts+14072, libc.VaList(bp+56, func() uintptr { if onError == OE_None { - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ } - return ts + 14070 /* " UNIQUE" */ + return ts + 14092 /* " UNIQUE" */ }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: @@ -98525,7 +98530,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, - ts+14078, /* "INSERT INTO %Q.s..." */ + ts+14100, libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -98541,7 +98546,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14137 /* "name='%q' AND ty..." */, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14159, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -98637,7 +98642,7 @@ __113: // Apart from that, we have little to go on besides intuition as to // how aiRowEst[] should be initialized. The numbers generated here // are based on typical values found in actual indices. -func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:117520:21: */ +func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:117530:21: */ var a uintptr = (*Index)(unsafe.Pointer(pIdx)).FaiRowLogEst var x LogEst var nCopy int32 = func() int32 { @@ -98681,11 +98686,11 @@ func Xsqlite3DefaultRowEst(tls *libc.TLS, pIdx uintptr) { /* sqlite3.c:117520:21 } } -var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:117522:23 */ +var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* sqlite3.c:117532:23 */ // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. -func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:117564:21: */ +func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:117574:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -98720,7 +98725,7 @@ __2: if !!(ifExists != 0) { goto __4 } - Xsqlite3ErrorMsg(tls, pParse, ts+14164 /* "no such index: %..." */, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+14186, libc.VaList(bp, pName+8)) goto __5 __4: Xsqlite3CodeVerifyNamedSchema(tls, pParse, (*SrcItem)(unsafe.Pointer(pName+8)).FzDatabase) @@ -98735,7 +98740,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14182 /* "index associated..." */, libc.VaList(bp+8, 0)) + ts+14204, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -98746,9 +98751,9 @@ __6: zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName zTab = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 11986 + return ts + 12008 } - return ts + 5803 + return ts + 5825 }() if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_DELETE, zTab, uintptr(0), zDb) != 0) { goto __7 @@ -98776,9 +98781,9 @@ __9: } Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, - ts+14255, /* "DELETE FROM %Q.s..." */ + ts+14277, libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) - sqlite3ClearStatTables(tls, pParse, iDb, ts+11326 /* "idx" */, (*Index)(unsafe.Pointer(pIndex)).FzName) + sqlite3ClearStatTables(tls, pParse, iDb, ts+11348, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropIndex, iDb, 0, 0, (*Index)(unsafe.Pointer(pIndex)).FzName, 0) @@ -98804,7 +98809,7 @@ exit_drop_index: // // Otherwise, if the realloc() fails, *pIdx is set to -1, *pnEntry remains // unchanged and a copy of pArray returned. -func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:117646:21: */ +func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry int32, pnEntry uintptr, pIdx uintptr) uintptr { /* sqlite3.c:117656:21: */ var z uintptr var n Sqlite3_int64 = Sqlite3_int64(libc.AssignPtrInt32(pIdx, *(*int32)(unsafe.Pointer(pnEntry)))) if n&(n-int64(1)) == int64(0) { @@ -98831,7 +98836,7 @@ func Xsqlite3ArrayAllocate(tls *libc.TLS, db uintptr, pArray uintptr, szEntry in // need be. // // A new IdList is returned, or NULL if malloc() fails. -func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:117676:23: */ +func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr) uintptr { /* sqlite3.c:117686:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -98849,7 +98854,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u (*IdList)(unsafe.Pointer(pList)).Fa, int32(unsafe.Sizeof(IdList_item{})), pList+4, - bp /* &i */) + bp) if *(*int32)(unsafe.Pointer(bp)) < 0 { Xsqlite3IdListDelete(tls, db, pList) return uintptr(0) @@ -98862,7 +98867,7 @@ func Xsqlite3IdListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u } // Delete an IdList. -func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:117704:21: */ +func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:117714:21: */ var i int32 if pList == uintptr(0) { return @@ -98876,7 +98881,7 @@ func Xsqlite3IdListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3 // Return the index in pList of the identifier named zId. Return -1 // if not found. -func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:117718:20: */ +func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* sqlite3.c:117728:20: */ var i int32 if pList == uintptr(0) { return -1 @@ -98914,7 +98919,7 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // If a memory allocation fails or the SrcList becomes too large, leave // the original SrcList unchanged, return NULL, and leave an error message // in pParse. -func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:117759:24: */ +func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:117769:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -98929,7 +98934,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*SrcList)(unsafe.Pointer(pSrc)).FnSrc+nExtra >= SQLITE_MAX_SRCLIST { - Xsqlite3ErrorMsg(tls, pParse, ts+14315, /* "too many FROM cl..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+14337, libc.VaList(bp, SQLITE_MAX_SRCLIST)) return uintptr(0) } @@ -98996,7 +99001,7 @@ func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra // // Both pTable and pDatabase are assumed to be quoted. They are dequoted // before being added to the SrcList. -func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:117848:24: */ +func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable uintptr, pDatabase uintptr) uintptr { /* sqlite3.c:117858:24: */ var pItem uintptr var db uintptr // Cannot have C without B @@ -99035,7 +99040,7 @@ func Xsqlite3SrcListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pTable } // Assign VdbeCursor index numbers to all tables in a SrcList -func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:117893:21: */ +func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sqlite3.c:117903:21: */ var i int32 var pItem uintptr @@ -99067,7 +99072,7 @@ func Xsqlite3SrcListAssignCursors(tls *libc.TLS, pParse uintptr, pList uintptr) } // Delete an entire SrcList including all its substructure. -func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:117911:21: */ +func Xsqlite3SrcListDelete(tls *libc.TLS, db uintptr, pList uintptr) { /* sqlite3.c:117921:21: */ var i int32 var pItem uintptr if pList == uintptr(0) { @@ -99130,7 +99135,7 @@ __3: // // Return a new SrcList which encodes is the FROM with the new // term added. -func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:117945:24: */ +func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:117955:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99141,12 +99146,12 @@ func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTa if !(!(p != 0) && (pOn != 0 || pUsing != 0)) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+14351, /* "a JOIN clause is..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+14373, libc.VaList(bp, func() uintptr { if pOn != 0 { - return ts + 14387 /* "ON" */ + return ts + 14409 /* "ON" */ } - return ts + 14390 /* "USING" */ + return ts + 14412 /* "USING" */ }())) goto append_from_error __1: @@ -99194,7 +99199,7 @@ append_from_error: // Add an INDEXED BY or NOT INDEXED clause to the most recently added // element of the source-list passed as the second argument. -func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:117996:21: */ +func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexedBy uintptr) { /* sqlite3.c:118006:21: */ if p != 0 && (*Token)(unsafe.Pointer(pIndexedBy)).Fn > uint32(0) { var pItem uintptr @@ -99216,7 +99221,7 @@ func Xsqlite3SrcListIndexedBy(tls *libc.TLS, pParse uintptr, p uintptr, pIndexed // Append the contents of SrcList p2 to SrcList p1 and return the resulting // SrcList. Or, if an error occurs, return NULL. In all cases, p1 and p2 // are deleted by this function. -func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118022:24: */ +func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr) uintptr { /* sqlite3.c:118032:24: */ if p2 != 0 { var pNew uintptr = Xsqlite3SrcListEnlarge(tls, pParse, p1, (*SrcList)(unsafe.Pointer(p2)).FnSrc, 1) @@ -99233,7 +99238,7 @@ func Xsqlite3SrcListAppendList(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uin // Add the list of function arguments to the SrcList entry for a // table-valued-function. -func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118041:21: */ +func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uintptr) { /* sqlite3.c:118051:21: */ if p != 0 { var pItem uintptr = p + 8 + uintptr((*SrcList)(unsafe.Pointer(p)).FnSrc-1)*72 @@ -99257,7 +99262,7 @@ func Xsqlite3SrcListFuncArgs(tls *libc.TLS, pParse uintptr, p uintptr, pList uin // The operator is "natural cross join". The A and B operands are stored // in p->a[0] and p->a[1], respectively. The parser initially stores the // operator with A. This routine shifts that operator over to B. -func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118069:21: */ +func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:118079:21: */ if p != 0 { var i int32 for i = (*SrcList)(unsafe.Pointer(p)).FnSrc - 1; i > 0; i-- { @@ -99268,14 +99273,14 @@ func Xsqlite3SrcListShiftJoinType(tls *libc.TLS, p uintptr) { /* sqlite3.c:11806 } // Generate VDBE code for a BEGIN statement. -func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118082:21: */ +func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* sqlite3.c:118092:21: */ var db uintptr var v uintptr var i int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb - if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14396, uintptr(0), uintptr(0)) != 0 { + if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, ts+14418, uintptr(0), uintptr(0)) != 0 { return } v = Xsqlite3GetVdbe(tls, pParse) @@ -99303,7 +99308,7 @@ func Xsqlite3BeginTransaction(tls *libc.TLS, pParse uintptr, type1 int32) { /* s // Generate VDBE code for a COMMIT or ROLLBACK statement. // Code for ROLLBACK is generated if eType==TK_ROLLBACK. Otherwise // code is generated for a COMMIT. -func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118118:21: */ +func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sqlite3.c:118128:21: */ var v uintptr var isRollback int32 @@ -99311,9 +99316,9 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql if Xsqlite3AuthCheck(tls, pParse, SQLITE_TRANSACTION, func() uintptr { if isRollback != 0 { - return ts + 14402 + return ts + 14424 } - return ts + 14411 + return ts + 14433 }(), uintptr(0), uintptr(0)) != 0 { return } @@ -99325,7 +99330,7 @@ func Xsqlite3EndTransaction(tls *libc.TLS, pParse uintptr, eType int32) { /* sql // This function is called by the parser when it parses a command to create, // release or rollback an SQL savepoint. -func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118140:21: */ +func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { /* sqlite3.c:118150:21: */ var zName uintptr = Xsqlite3NameFromToken(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pName) if zName != 0 { var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -99338,11 +99343,11 @@ func Xsqlite3Savepoint(tls *libc.TLS, pParse uintptr, op int32, pName uintptr) { } } -var az = [3]uintptr{ts + 14396 /* "BEGIN" */, ts + 14418 /* "RELEASE" */, ts + 14402 /* "ROLLBACK" */} /* sqlite3.c:118145:23 */ +var az = [3]uintptr{ts + 14418, ts + 14440, ts + 14424} /* sqlite3.c:118155:23 */ // Make sure the TEMP database is open and available for use. Return // the number of errors. Leave any error messages in the pParse structure. -func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118160:20: */ +func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:118170:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99351,10 +99356,10 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. var rc int32 // var pBt uintptr at bp, 4 - rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp /* &pBt */, 0, flags) + rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, uintptr(0), db, bp, 0, flags) if rc != SQLITE_OK { Xsqlite3ErrorMsg(tls, pParse, - ts+14426 /* "unable to open a..." */, 0) + ts+14448, 0) (*Parse)(unsafe.Pointer(pParse)).Frc = rc return 1 } @@ -99368,13 +99373,13 @@ func Xsqlite3OpenTempDatabase(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3. return 0 } -var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:118165:22 */ +var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB /* sqlite3.c:118175:22 */ // Record the fact that the schema cookie will need to be verified // for database iDb. The code to actually verify the schema cookie // will occur at the end of the top-level VDBE and will be generated // later, by sqlite3FinishCoding(). -func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:118195:13: */ +func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int32) { /* sqlite3.c:118205:13: */ if libc.Bool32((*Parse)(unsafe.Pointer(pToplevel)).FcookieMask&(YDbMask(YDbMask(1))<<iDb) != YDbMask(0)) == 0 { *(*YDbMask)(unsafe.Pointer(pToplevel + 84)) |= YDbMask(YDbMask(1)) << iDb @@ -99384,7 +99389,7 @@ func sqlite3CodeVerifySchemaAtToplevel(tls *libc.TLS, pToplevel uintptr, iDb int } } -func Xsqlite3CodeVerifySchema(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:118207:21: */ +func Xsqlite3CodeVerifySchema(tls *libc.TLS, pParse uintptr, iDb int32) { /* sqlite3.c:118217:21: */ sqlite3CodeVerifySchemaAtToplevel(tls, func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -99395,7 +99400,7 @@ func Xsqlite3CodeVerifySchema(tls *libc.TLS, pParse uintptr, iDb int32) { /* sql // If argument zDb is NULL, then call sqlite3CodeVerifySchema() for each // attached database. Otherwise, invoke it for the database named zDb only. -func Xsqlite3CodeVerifyNamedSchema(tls *libc.TLS, pParse uintptr, zDb uintptr) { /* sqlite3.c:118216:21: */ +func Xsqlite3CodeVerifyNamedSchema(tls *libc.TLS, pParse uintptr, zDb uintptr) { /* sqlite3.c:118226:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnDb; i++ { @@ -99417,7 +99422,7 @@ func Xsqlite3CodeVerifyNamedSchema(tls *libc.TLS, pParse uintptr, zDb uintptr) { // rollback the whole transaction. For operations where all constraints // can be checked before any changes are made to the database, it is never // necessary to undo a write and the checkpoint should not be set. -func Xsqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int32, iDb int32) { /* sqlite3.c:118240:21: */ +func Xsqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int32, iDb int32) { /* sqlite3.c:118250:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -99434,7 +99439,7 @@ func Xsqlite3BeginWriteOperation(tls *libc.TLS, pParse uintptr, setStatement int // inserting multiple rows in a table, or inserting a row and index entries.) // If an abort occurs after some of these writes have completed, then it will // be necessary to undo the completed writes. -func Xsqlite3MultiWrite(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:118254:21: */ +func Xsqlite3MultiWrite(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:118264:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -99458,7 +99463,7 @@ func Xsqlite3MultiWrite(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:118254:21: // particular, it prevents us from writing an effective // implementation of sqlite3AssertMayAbort()) and so we have chosen // to take the safe route and skip the optimization. -func Xsqlite3MayAbort(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:118275:21: */ +func Xsqlite3MayAbort(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:118285:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -99471,7 +99476,7 @@ func Xsqlite3MayAbort(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:118275:21: * // Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT // error. The onError parameter determines which (if any) of the statement // and/or current transaction is rolled back. -func Xsqlite3HaltConstraint(tls *libc.TLS, pParse uintptr, errCode int32, onError int32, p4 uintptr, p4type I8, p5Errmsg U8) { /* sqlite3.c:118285:21: */ +func Xsqlite3HaltConstraint(tls *libc.TLS, pParse uintptr, errCode int32, onError int32, p4 uintptr, p4type I8, p5Errmsg U8) { /* sqlite3.c:118295:21: */ var v uintptr v = Xsqlite3GetVdbe(tls, pParse) @@ -99484,7 +99489,7 @@ func Xsqlite3HaltConstraint(tls *libc.TLS, pParse uintptr, errCode int32, onErro } // Code an OP_Halt due to UNIQUE or PRIMARY KEY constraint violation. -func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx uintptr) { /* sqlite3.c:118307:21: */ +func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx uintptr) { /* sqlite3.c:118317:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -99494,24 +99499,24 @@ func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable - Xsqlite3StrAccumInit(tls, bp+8 /* &errMsg */, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0, + Xsqlite3StrAccumInit(tls, bp+8, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 112))) if (*Index)(unsafe.Pointer(pIdx)).FaColExpr != 0 { - Xsqlite3_str_appendf(tls, bp+8 /* &errMsg */, ts+14496 /* "index '%q'" */, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3_str_appendf(tls, bp+8, ts+14518, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) } else { for j = 0; j < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); j++ { var zCol uintptr zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)))*16)).FzCnName if j != 0 { - Xsqlite3_str_append(tls, bp+8 /* &errMsg */, ts+14507 /* ", " */, 2) + Xsqlite3_str_append(tls, bp+8, ts+14529, 2) } - Xsqlite3_str_appendall(tls, bp+8 /* &errMsg */, (*Table)(unsafe.Pointer(pTab)).FzName) - Xsqlite3_str_append(tls, bp+8 /* &errMsg */, ts+1556 /* "." */, 1) - Xsqlite3_str_appendall(tls, bp+8 /* &errMsg */, zCol) + Xsqlite3_str_appendall(tls, bp+8, (*Table)(unsafe.Pointer(pTab)).FzName) + Xsqlite3_str_append(tls, bp+8, ts+1578, 1) + Xsqlite3_str_appendall(tls, bp+8, zCol) } } - zErr = Xsqlite3StrAccumFinish(tls, bp+8 /* &errMsg */) + zErr = Xsqlite3StrAccumFinish(tls, bp+8) Xsqlite3HaltConstraint(tls, pParse, func() int32 { if int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { @@ -99523,18 +99528,18 @@ func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx } // Code an OP_Halt due to non-unique rowid. -func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab uintptr) { /* sqlite3.c:118343:21: */ +func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab uintptr) { /* sqlite3.c:118353:21: */ bp := tls.Alloc(24) defer tls.Free(24) var zMsg uintptr var rc int32 if int32((*Table)(unsafe.Pointer(pTab)).FiPKey) >= 0 { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11899 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+11921, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*16)).FzCnName)) rc = SQLITE_CONSTRAINT | int32(6)<<8 } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14510 /* "%s.rowid" */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14532, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = SQLITE_CONSTRAINT | int32(10)<<8 } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -99543,7 +99548,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab // Check to see if pIndex uses the collating sequence pColl. Return // true if it does and false if it does not. -func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:118367:12: */ +func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sqlite3.c:118377:12: */ var i int32 for i = 0; i < int32((*Index)(unsafe.Pointer(pIndex)).FnColumn); i++ { @@ -99558,7 +99563,7 @@ func collationMatch(tls *libc.TLS, zColl uintptr, pIndex uintptr) int32 { /* sql // Recompute all indices of pTab that use the collating sequence pColl. // If pColl==0 then recompute all indices of pTab. -func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:118386:13: */ +func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { /* sqlite3.c:118396:13: */ if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { var pIndex uintptr // An index associated with pTab @@ -99575,7 +99580,7 @@ func reindexTable(tls *libc.TLS, pParse uintptr, pTab uintptr, zColl uintptr) { // Recompute all indices of all tables in all databases where the // indices use the collating sequence pColl. If pColl==0 then recompute // all indices everywhere. -func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:118407:13: */ +func reindexDatabases(tls *libc.TLS, pParse uintptr, zColl uintptr) { /* sqlite3.c:118417:13: */ var pDb uintptr // A single database var iDb int32 // The database index number var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -99617,7 +99622,7 @@ __3: // Form 2 rebuilds all indices in all databases that use the named // collating function. Forms 3 and 4 rebuild the named index or all // indices associated with the named table. -func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:118439:21: */ +func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr) { /* sqlite3.c:118449:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -99655,7 +99660,7 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp } Xsqlite3DbFree(tls, db, zColl) } - iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp /* &pObjName */) + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp) if iDb < 0 { return } @@ -99677,14 +99682,14 @@ func Xsqlite3Reindex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintp sqlite3RefillIndex(tls, pParse, pIndex, -1) return } - Xsqlite3ErrorMsg(tls, pParse, ts+14519 /* "unable to identi..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+14541, 0) } // Return a KeyInfo structure that is appropriate for the given Index. // // The caller should invoke sqlite3KeyInfoUnref() on the returned object // when it has finished using it. -func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118499:24: */ +func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr { /* sqlite3.c:118509:24: */ var i int32 var nCol int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnColumn) var nKey int32 = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) @@ -99730,7 +99735,7 @@ func Xsqlite3KeyInfoOfIndex(tls *libc.TLS, pParse uintptr, pIdx uintptr) uintptr } // Create a new CTE object -func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:118543:20: */ +func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintptr, pQuery uintptr, eM10d U8) uintptr { /* sqlite3.c:118553:20: */ var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -99750,7 +99755,7 @@ func Xsqlite3CteNew(tls *libc.TLS, pParse uintptr, pName uintptr, pArglist uintp // Clear information from a Cte object, but do not deallocate storage // for the object itself. -func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:118572:13: */ +func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:118582:13: */ Xsqlite3ExprListDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpCols) Xsqlite3SelectDelete(tls, db, (*Cte)(unsafe.Pointer(pCte)).FpSelect) @@ -99758,7 +99763,7 @@ func cteClear(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:118572:13: } // Free the contents of the CTE object passed as the second argument. -func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:118582:21: */ +func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:118592:21: */ cteClear(tls, db, pCte) Xsqlite3DbFree(tls, db, pCte) @@ -99768,7 +99773,7 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // WITH clause. The CTE described by teh third argument is added to // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. -func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:118594:21: */ +func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:118604:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -99787,7 +99792,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { if Xsqlite3StrICmp(tls, zName, (*Cte)(unsafe.Pointer(pWith+12+uintptr(i)*24)).FzName) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14565 /* "duplicate WITH t..." */, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14587, libc.VaList(bp, zName)) } } } @@ -99811,7 +99816,7 @@ func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) } // Free the contents of the With object passed as the second argument. -func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:118641:21: */ +func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c:118651:21: */ if pWith != 0 { var i int32 for i = 0; i < (*With)(unsafe.Pointer(pWith)).FnCte; i++ { @@ -99841,7 +99846,7 @@ func Xsqlite3WithDelete(tls *libc.TLS, db uintptr, pWith uintptr) { /* sqlite3.c // Invoke the 'collation needed' callback to request a collation sequence // in the encoding enc of name zName, length nName. -func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:118676:13: */ +func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sqlite3.c:118686:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded != 0 { var zExternal uintptr = Xsqlite3DbStrDup(tls, db, zName) @@ -99872,7 +99877,7 @@ func callCollNeeded(tls *libc.TLS, db uintptr, enc int32, zName uintptr) { /* sq // of this collation function (for other text encodings) available. Use one // of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if // possible. -func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:118705:12: */ +func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c:118715:12: */ var pColl2 uintptr var z uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var i int32 @@ -99887,7 +99892,7 @@ func synthCollSeq(tls *libc.TLS, db uintptr, pColl uintptr) int32 { /* sqlite3.c return SQLITE_ERROR } -var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:118709:19 */ +var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sqlite3.c:118719:19 */ // This routine is called on a collation sequence before it is used to // check that it is defined. An undefined collation sequence exists when @@ -99898,7 +99903,7 @@ var aEnc = [3]U8{U8(SQLITE_UTF16BE), U8(SQLITE_UTF16LE), U8(SQLITE_UTF8)} /* sql // request a definition of the collating sequence. If this doesn't work, // an equivalent collating sequence that uses a text encoding different // from the main database is substituted, if one is available. -func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:118732:20: */ +func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { /* sqlite3.c:118742:20: */ if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp == uintptr(0) { var zName uintptr = (*CollSeq)(unsafe.Pointer(pColl)).FzName var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -99922,7 +99927,7 @@ func Xsqlite3CheckCollSeq(tls *libc.TLS, pParse uintptr, pColl uintptr) int32 { // Stored immediately after the three collation sequences is a copy of // the collation sequence name. A pointer to this string is stored in // each collation sequence structure. -func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:118760:16: */ +func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) uintptr { /* sqlite3.c:118770:16: */ var pColl uintptr pColl = Xsqlite3HashFind(tls, db+432, zName) @@ -99967,7 +99972,7 @@ func findCollSeqEntry(tls *libc.TLS, db uintptr, zName uintptr, create int32) ui // cannot be found. // // See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq() -func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:118812:24: */ +func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, create int32) uintptr { /* sqlite3.c:118822:24: */ var pColl uintptr if zName != 0 { @@ -99983,7 +99988,7 @@ func Xsqlite3FindCollSeq(tls *libc.TLS, db uintptr, enc U8, zName uintptr, creat // Change the text encoding for a database connection. This means that // the pDfltColl must change as well. -func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:118834:21: */ +func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:118844:21: */ (*Sqlite3)(unsafe.Pointer(db)).Fenc = enc // EVIDENCE-OF: R-08308-17224 The default collating function for all @@ -100003,7 +100008,7 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // sequence can be found. If no collation is found, leave an error message. // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() -func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:118857:24: */ +func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:118867:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -100025,7 +100030,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14595 /* "no such collatio..." */, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14617, libc.VaList(bp, zName)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_ERROR | int32(1)<<8 } return p @@ -100049,7 +100054,7 @@ func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zN // and generates an error message. // // See also: sqlite3FindCollSeq(), sqlite3GetCollSeq() -func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:118908:24: */ +func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr { /* sqlite3.c:118918:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc var initbusy U8 = (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy @@ -100090,7 +100095,7 @@ func Xsqlite3LocateCollSeq(tls *libc.TLS, pParse uintptr, zName uintptr) uintptr // If nArg==(-2) then any function with a non-null xSFunc is // a perfect match and any function with xSFunc NULL is // a non-match. -func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:118951:12: */ +func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlite3.c:118961:12: */ var match int32 // Wrong number of arguments means "no match" @@ -100126,7 +100131,7 @@ func matchQuality(tls *libc.TLS, p uintptr, nArg int32, enc U8) int32 { /* sqlit // Search a FuncDefHash for a function with the given name. Return // a pointer to the matching FuncDef if found, or 0 if there is no match. -func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:118987:24: */ +func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* sqlite3.c:118997:24: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3BuiltinFunctions)) + uintptr(h)*4)); p != 0; p = *(*uintptr)(unsafe.Pointer(p + 36)) { @@ -100138,7 +100143,7 @@ func Xsqlite3FunctionSearch(tls *libc.TLS, h int32, zFunc uintptr) uintptr { /* } // Insert a new FuncDef into a FuncDefHash hash table. -func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119004:21: */ +func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sqlite3.c:119014:21: */ var i int32 for i = 0; i < nDef; i++ { var pOther uintptr @@ -100176,7 +100181,7 @@ func Xsqlite3InsertBuiltinFuncs(tls *libc.TLS, aDef uintptr, nDef int32) { /* sq // If createFlag is false, then a function with the required name and // number of arguments may be returned even if the eTextRep flag does not // match that requested. -func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119050:24: */ +func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, enc U8, createFlag U8) uintptr { /* sqlite3.c:119060:24: */ var p uintptr // Iterator variable var pBest uintptr = uintptr(0) // Best match found so far var bestScore int32 = 0 // Score of best match @@ -100256,7 +100261,7 @@ func Xsqlite3FindFunction(tls *libc.TLS, db uintptr, zName uintptr, nArg int32, // of the schema hash tables). // // The Schema.cache_size variable is not cleared. -func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119142:21: */ +func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119152:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -100274,13 +100279,13 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119142:21: */ for pElem = (*Hash)(unsafe.Pointer(bp)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { Xsqlite3DeleteTrigger(tls, uintptr(0), (*HashElem)(unsafe.Pointer(pElem)).Fdata) } - Xsqlite3HashClear(tls, bp /* &temp2 */) + Xsqlite3HashClear(tls, bp) Xsqlite3HashInit(tls, pSchema+8) for pElem = (*Hash)(unsafe.Pointer(bp + 16)).Ffirst; pElem != 0; pElem = (*HashElem)(unsafe.Pointer(pElem)).Fnext { var pTab uintptr = (*HashElem)(unsafe.Pointer(pElem)).Fdata Xsqlite3DeleteTable(tls, uintptr(0), pTab) } - Xsqlite3HashClear(tls, bp+16 /* &temp1 */) + Xsqlite3HashClear(tls, bp+16) Xsqlite3HashClear(tls, pSchema+56) (*Schema)(unsafe.Pointer(pSchema)).FpSeqTab = uintptr(0) if int32((*Schema)(unsafe.Pointer(pSchema)).FschemaFlags)&DB_SchemaLoaded != 0 { @@ -100291,7 +100296,7 @@ func Xsqlite3SchemaClear(tls *libc.TLS, p uintptr) { /* sqlite3.c:119142:21: */ // Find and return the schema associated with a BTree. Create // a new one if necessary. -func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:119174:23: */ +func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqlite3.c:119184:23: */ var p uintptr if pBt != 0 { p = Xsqlite3BtreeSchema(tls, pBt, int32(unsafe.Sizeof(Schema{})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3SchemaClear}))) @@ -100338,7 +100343,7 @@ func Xsqlite3SchemaGet(tls *libc.TLS, db uintptr, pBt uintptr) uintptr { /* sqli // pSrc->a[0].pTab Pointer to the Table object // pSrc->a[0].pIndex Pointer to the INDEXED BY index, if there is one // -func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:119225:22: */ +func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr { /* sqlite3.c:119235:22: */ var pItem uintptr = pSrc + 8 /* &.a */ var pTab uintptr @@ -100368,7 +100373,7 @@ func Xsqlite3SrcListLookup(tls *libc.TLS, pParse uintptr, pSrc uintptr) uintptr // 3) The table is a shadow table, the database connection is in // defensive mode, and the current sqlite3_prepare() // is for a top-level SQL statement. -func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:119256:12: */ +func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:119266:12: */ var db uintptr if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB { return libc.Bool32((*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer((*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpMod)).FpModule)).FxUpdate == uintptr(0)) @@ -100387,16 +100392,16 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // Check to make sure the given table is writable. If it is not // writable, generate an error message and return 1. If it is // writable return 0; -func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:119275:20: */ +func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:119285:20: */ bp := tls.Alloc(16) defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+14626 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14648, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { - Xsqlite3ErrorMsg(tls, pParse, ts+14655 /* "cannot modify %s..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14677, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -100405,7 +100410,7 @@ func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int3 // Evaluate a view and store its result in an ephemeral table. The // pWhere argument is an optional WHERE clause that restricts the // set of rows in the view that are to be added to the ephemeral table. -func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:119296:21: */ +func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr, iCur int32) { /* sqlite3.c:119306:21: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -100425,8 +100430,8 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher } pSel = Xsqlite3SelectNew(tls, pParse, uintptr(0), pFrom, pWhere, uintptr(0), uintptr(0), pOrderBy, uint32(SF_IncludeHidden), pLimit) - Xsqlite3SelectDestInit(tls, bp /* &dest */, SRT_EphemTab, iCur) - Xsqlite3Select(tls, pParse, pSel, bp /* &dest */) + Xsqlite3SelectDestInit(tls, bp, SRT_EphemTab, iCur) + Xsqlite3Select(tls, pParse, pSel, bp) Xsqlite3SelectDelete(tls, db, pSel) } @@ -100437,7 +100442,7 @@ func Xsqlite3MaterializeView(tls *libc.TLS, pParse uintptr, pView uintptr, pWher // DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL; // \________/ \________________/ // pTabList pWhere -func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:119435:21: */ +func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:119445:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -100495,7 +100500,7 @@ func Xsqlite3DeleteFrom(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere addrLoop = 0 addrEphOpen = 0 // List of table triggers, if required - libc.Xmemset(tls, bp /* &sContext */, 0, uint32(unsafe.Sizeof(AuthContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(AuthContext{}))) db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 @@ -100576,7 +100581,7 @@ __8: if !(isView != 0) { goto __9 } - Xsqlite3AuthContextPush(tls, pParse, bp /* &sContext */, (*Table)(unsafe.Pointer(pTab)).FzName) + Xsqlite3AuthContextPush(tls, pParse, bp, (*Table)(unsafe.Pointer(pTab)).FzName) __9: ; @@ -100610,7 +100615,7 @@ __12: ; // Resolve the column names in the WHERE clause. - libc.Xmemset(tls, bp+8 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 8 /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp + 8 /* &sNC */)).FpSrcList = pTabList if !(Xsqlite3ResolveExprNames(tls, bp+8, pWhere) != 0) { @@ -100742,7 +100747,7 @@ __24: goto delete_from_cleanup __25: ; - eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+40 /* &aiCurOnePass[0] */) + eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+40) if !(eOnePass != ONEPASS_SINGLE) { goto __26 @@ -100866,7 +100871,7 @@ __43: ; Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(OPFLAG_FORDELETE), - iTabCur, aToOpen, bp+48 /* &iDataCur */, bp+52 /* &iIdxCur */) + iTabCur, aToOpen, bp+48, bp+52) if !(eOnePass == ONEPASS_MULTI) { goto __44 @@ -100943,7 +100948,7 @@ __52: count = libc.Bool32(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0) // True to count changes Xsqlite3GenerateRowDelete(tls, pParse, pTab, pTrigger, *(*int32)(unsafe.Pointer(bp + 48 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 52 /* iIdxCur */)), - iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 40 /* &aiCurOnePass[0] */ + 1*4))) + iKey, nKey, uint8(count), uint8(OE_Default), uint8(eOnePass), *(*int32)(unsafe.Pointer(bp + 40 + 1*4))) __53: ; @@ -100989,12 +100994,12 @@ __60: } Xsqlite3VdbeAddOp2(tls, v, OP_ChngCntRow, memCnt, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+14693 /* "rows deleted" */, uintptr(0)) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+14715, uintptr(0)) __61: ; delete_from_cleanup: - Xsqlite3AuthContextPop(tls, bp /* &sContext */) + Xsqlite3AuthContextPop(tls, bp) Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprDelete(tls, db, pWhere) Xsqlite3DbFree(tls, db, aToOpen) @@ -101044,7 +101049,7 @@ delete_from_cleanup: // starting at iIdxCur) that already points to the index entry to be deleted. // Except, this optimization is disabled if there are BEFORE triggers since // the trigger body might have moved the cursor. -func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:119883:21: */ +func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTrigger uintptr, iDataCur int32, iIdxCur int32, iPk int32, nPk I16, count U8, onconf U8, eMode U8, iIdxNoSeek int32) { /* sqlite3.c:119893:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe var iOld int32 = 0 // First register in OLD.* array var iLabel int32 // Label resolved to end of generated code @@ -101134,7 +101139,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri } return 0 }()) - if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11186) { + if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 || 0 == Xsqlite3_stricmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+11208) { Xsqlite3VdbeAppendP4(tls, v, pTab, -6) } if int32(eMode) != ONEPASS_OFF { @@ -101181,7 +101186,7 @@ func Xsqlite3GenerateRowDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, pTri // // 3. The "iDataCur" cursor must be already be positioned on the row // that is to be deleted. -func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120035:21: */ +func Xsqlite3GenerateRowIndexDelete(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, aRegIdx uintptr, iIdxNoSeek int32) { /* sqlite3.c:120045:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -101219,7 +101224,7 @@ __1: } r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx, iDataCur, 0, 1, - bp /* &iPartIdxLabel */, pPrior, r1) + bp, pPrior, r1) Xsqlite3VdbeAddOp3(tls, v, OP_IdxDelete, iIdxCur+i, r1, func() int32 { if uint32(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x8>>3)) != 0 { @@ -101270,7 +101275,7 @@ __3: // This optimization is helpful when doing a DELETE or an INTEGRITY_CHECK // on a table with multiple indices, and especially with the ROWID or // PRIMARY KEY columns of the index. -func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120100:20: */ +func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iDataCur int32, regOut int32, prefixOnly int32, piPartIdxLabel uintptr, pPrior uintptr, regPrior int32) int32 { /* sqlite3.c:120110:20: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var j int32 var regBase int32 @@ -101326,7 +101331,7 @@ func Xsqlite3GenerateIndexKey(tls *libc.TLS, pParse uintptr, pIdx uintptr, iData // If a prior call to sqlite3GenerateIndexKey() generated a jump-over label // because it was a partial index, then this routine should be called to // resolve that label. -func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:120162:21: */ +func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { /* sqlite3.c:120172:21: */ if iLabel != 0 { Xsqlite3VdbeResolveLabel(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, iLabel) } @@ -101354,7 +101359,7 @@ func Xsqlite3ResolvePartIdxLabel(tls *libc.TLS, pParse uintptr, iLabel int32) { // #include "vdbeInt.h" // Return the collating function associated with a function. -func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:120196:16: */ +func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3.c:120206:16: */ var pOp uintptr pOp = (*Vdbe)(unsafe.Pointer((*Sqlite3_context)(unsafe.Pointer(context)).FpVdbe)).FaOp + uintptr((*Sqlite3_context)(unsafe.Pointer(context)).FiOp-1)*20 @@ -101364,14 +101369,14 @@ func sqlite3GetFuncCollSeq(tls *libc.TLS, context uintptr) uintptr { /* sqlite3. // Indicate that the accumulator load should be skipped on this // iteration of the aggregate loop. -func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:120209:13: */ +func sqlite3SkipAccumulatorLoad(tls *libc.TLS, context uintptr) { /* sqlite3.c:120219:13: */ (*Sqlite3_context)(unsafe.Pointer(context)).FisError = -1 (*Sqlite3_context)(unsafe.Pointer(context)).FskipFlag = U8(1) } // Implementation of the non-aggregate min() and max() functions -func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120218:13: */ +func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120228:13: */ var i int32 var mask int32 // 0 for min() or 0xffffffff for max() var iBest int32 @@ -101401,7 +101406,7 @@ func minmaxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Return the type of the argument. -func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:120248:13: */ +func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:120258:13: */ var i int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) - 1 _ = NotUsed @@ -101412,10 +101417,10 @@ func typeofFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / Xsqlite3_result_text(tls, context, azType2[i], -1, uintptr(0)) } -var azType2 = [5]uintptr{ts + 6115 /* "integer" */, ts + 6110 /* "real" */, ts + 7872 /* "text" */, ts + 7867 /* "blob" */, ts + 6105 /* "null" */} /* sqlite3.c:120253:21 */ +var azType2 = [5]uintptr{ts + 6137, ts + 6132, ts + 7894, ts + 7889, ts + 6127} /* sqlite3.c:120263:21 */ // Implementation of the length() function -func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120273:13: */ +func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120283:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -101464,7 +101469,7 @@ func lengthFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // // IMP: R-23979-26855 The abs(X) function returns the absolute value of // the numeric argument X. -func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120315:13: */ +func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120325:13: */ _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { @@ -101476,7 +101481,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // IMP: R-31676-45509 If X is the integer -9223372036854775808 // then abs(X) throws an integer overflow error since there is no // equivalent positive 64-bit two complement value. - Xsqlite3_result_error(tls, context, ts+14706 /* "integer overflow" */, -1) + Xsqlite3_result_error(tls, context, ts+14728, -1) return } iVal = -iVal @@ -101518,7 +101523,7 @@ func absFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // If both haystack and needle are BLOBs, then the result is one more than // the number of bytes in haystack prior to the first occurrence of needle, // or 0 if needle never occurs in haystack. -func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120364:13: */ +func instrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120374:13: */ var zHaystack uintptr var zNeedle uintptr var nHaystack int32 @@ -101633,7 +101638,7 @@ endInstrOOM: } // Implementation of the printf() function. -func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120432:13: */ +func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120442:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -101649,11 +101654,11 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s (*PrintfArguments)(unsafe.Pointer(bp + 32 /* &x */)).FnArg = argc - 1 (*PrintfArguments)(unsafe.Pointer(bp + 32 /* &x */)).FnUsed = 0 (*PrintfArguments)(unsafe.Pointer(bp + 32 /* &x */)).FapArg = argv + uintptr(1)*4 - Xsqlite3StrAccumInit(tls, bp+8 /* &str */, db, uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 112))) + Xsqlite3StrAccumInit(tls, bp+8, db, uintptr(0), 0, *(*int32)(unsafe.Pointer(db + 112))) (*StrAccum)(unsafe.Pointer(bp + 8 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_SQLFUNC) - Xsqlite3_str_appendf(tls, bp+8 /* &str */, zFormat, libc.VaList(bp, bp+32 /* &x */)) + Xsqlite3_str_appendf(tls, bp+8, zFormat, libc.VaList(bp, bp+32)) n = int32((*StrAccum)(unsafe.Pointer(bp + 8 /* &str */)).FnChar) - Xsqlite3_result_text(tls, context, Xsqlite3StrAccumFinish(tls, bp+8 /* &str */), n, + Xsqlite3_result_text(tls, context, Xsqlite3StrAccumFinish(tls, bp+8), n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault}))) } } @@ -101668,7 +101673,7 @@ func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // If p1 is negative, then we begin abs(p1) from the end of x[]. // // If p2 is negative, return the p2 characters preceding p1. -func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120468:13: */ +func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120478:13: */ var z uintptr var z2 uintptr var len int32 @@ -101776,7 +101781,7 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } // Implementation of the round() function -func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120563:13: */ +func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120573:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -101814,12 +101819,12 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq return +0.5 }())) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14723 /* "%.*f" */, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14745, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return } - Xsqlite3AtoF(tls, zBuf, bp+16 /* &r */, Xsqlite3Strlen30(tls, zBuf), uint8(SQLITE_UTF8)) + Xsqlite3AtoF(tls, zBuf, bp+16, Xsqlite3Strlen30(tls, zBuf), uint8(SQLITE_UTF8)) Xsqlite3_free(tls, zBuf) } Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 16 /* r */))) @@ -101830,7 +101835,7 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // the database handle that malloc() has failed and return NULL. // If nByte is larger than the maximum string or blob length, then // raise an SQLITE_TOOBIG exception and return NULL. -func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:120604:13: */ +func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlite3.c:120614:13: */ var z uintptr var db uintptr = Xsqlite3_context_db_handle(tls, context) @@ -101847,7 +101852,7 @@ func contextMalloc(tls *libc.TLS, context uintptr, nByte I64) uintptr { /* sqlit } // Implementation of the upper() and lower() SQL functions. -func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120625:13: */ +func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120635:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -101868,7 +101873,7 @@ func upperFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } } -func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120644:13: */ +func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120654:13: */ var z1 uintptr var z2 uintptr var i int32 @@ -101897,7 +101902,7 @@ func lowerFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // is. We might as well use the "version()" function as a substitute. // Implementation of random(). Return a random integer. -func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120677:13: */ +func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120687:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -101905,7 +101910,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) _ = NotUsed _ = NotUsed2 - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(Sqlite_int64(0))), bp /* &r */) + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(Sqlite_int64(0))), bp) if *(*Sqlite_int64)(unsafe.Pointer(bp)) < int64(0) { // We need to prevent a random number of 0x8000000000000000 // (or -9223372036854775808) since when you do abs() of that @@ -101921,7 +101926,7 @@ func randomFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) // Implementation of randomblob(N). Return a random blob // that is N bytes long. -func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120703:13: */ +func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120713:13: */ var n Sqlite3_int64 var p uintptr @@ -101939,7 +101944,7 @@ func randomBlob(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the last_insert_rowid() SQL function. The return // value is the same as the sqlite3_last_insert_rowid() API function. -func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120727:13: */ +func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120737:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101954,7 +101959,7 @@ func last_insert_rowid(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 u // IMP: R-32760-32347 The changes() SQL function is a wrapper // around the sqlite3_changes64() C/C++ function and hence follows the // same rules for counting changes. -func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120747:13: */ +func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120757:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101963,7 +101968,7 @@ func changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { // Implementation of the total_changes() SQL function. The return value is // the same as the sqlite3_total_changes64() API function. -func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120761:13: */ +func total_changes(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:120771:13: */ var db uintptr = Xsqlite3_context_db_handle(tls, context) _ = NotUsed _ = NotUsed2 @@ -101978,20 +101983,20 @@ type compareInfo = struct { FmatchOne U8 FmatchSet U8 FnoCase U8 -} /* sqlite3.c:120776:1 */ +} /* sqlite3.c:120786:1 */ // For LIKE and GLOB matching on EBCDIC machines, assume that every // character is exactly one byte in size. Also, provde the Utf8Read() // macro for fast reading of the next character in the common case where // the next character is ASCII. -var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:120796:33 */ +var globInfo = compareInfo{FmatchAll: U8('*'), FmatchOne: U8('?'), FmatchSet: U8('[')} /* sqlite3.c:120806:33 */ // The correct SQL-92 behavior is for the LIKE operator to ignore // case. Thus 'a' LIKE 'A' would be true. -var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:120799:33 */ +var likeInfoNorm = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_'), FnoCase: U8(1)} /* sqlite3.c:120809:33 */ // If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator // is case sensitive causing 'a' LIKE 'A' to be false -var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:120802:33 */ +var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3.c:120812:33 */ // Possible error returns from patternMatch() @@ -102031,7 +102036,7 @@ var likeInfoAlt = compareInfo{FmatchAll: U8('%'), FmatchOne: U8('_')} /* sqlite3 // The comments within this routine usually assume glob matching. // // This routine is usually quick, but can be N**2 in the worst case. -func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:120849:12: */ +func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uintptr, matchOther U32) int32 { /* sqlite3.c:120859:12: */ bp := tls.Alloc(11) defer tls.Free(11) *(*uintptr)(unsafe.Pointer(bp)) = zPattern @@ -102069,7 +102074,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint return SQLITE_MATCH // "*" at the end of the pattern matches } else if c == matchOther { if int32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchSet) == 0 { - c = Xsqlite3Utf8Read(tls, bp /* &zPattern */) + c = Xsqlite3Utf8Read(tls, bp) if c == U32(0) { return SQLITE_NOWILDCARDMATCH } @@ -102108,15 +102113,15 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint var bMatch int32 if noCase != 0 { - *(*int8)(unsafe.Pointer(bp + 8 /* &zStop[0] */)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) - *(*int8)(unsafe.Pointer(bp + 8 /* &zStop[0] */ + 1)) = int8(Xsqlite3UpperToLower[uint8(c)]) - *(*int8)(unsafe.Pointer(bp + 8 /* &zStop[0] */ + 2)) = int8(0) + *(*int8)(unsafe.Pointer(bp + 8)) = int8(c & U32(^(int32(Xsqlite3CtypeMap[uint8(c)]) & 0x20))) + *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(Xsqlite3UpperToLower[uint8(c)]) + *(*int8)(unsafe.Pointer(bp + 8 + 2)) = int8(0) } else { - *(*int8)(unsafe.Pointer(bp + 8 /* &zStop[0] */)) = int8(c) - *(*int8)(unsafe.Pointer(bp + 8 /* &zStop[0] */ + 1)) = int8(0) + *(*int8)(unsafe.Pointer(bp + 8)) = int8(c) + *(*int8)(unsafe.Pointer(bp + 8 + 1)) = int8(0) } for 1 != 0 { - *(*uintptr)(unsafe.Pointer(bp + 4 /* zString */)) += uintptr(libc.Xstrcspn(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* zString */)), bp+8 /* &zStop[0] */)) + *(*uintptr)(unsafe.Pointer(bp + 4 /* zString */)) += uintptr(libc.Xstrcspn(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* zString */)), bp+8)) if int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 4))))) == 0 { break } @@ -102147,7 +102152,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } if c == matchOther { if int32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchSet) == 0 { - c = Xsqlite3Utf8Read(tls, bp /* &zPattern */) + c = Xsqlite3Utf8Read(tls, bp) if c == U32(0) { return SQLITE_NOMATCH } @@ -102156,24 +102161,24 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint var prior_c U32 = U32(0) var seen int32 = 0 var invert int32 = 0 - c = Xsqlite3Utf8Read(tls, bp+4 /* &zString */) + c = Xsqlite3Utf8Read(tls, bp+4) if c == U32(0) { return SQLITE_NOMATCH } - c2 = Xsqlite3Utf8Read(tls, bp /* &zPattern */) + c2 = Xsqlite3Utf8Read(tls, bp) if c2 == U32('^') { invert = 1 - c2 = Xsqlite3Utf8Read(tls, bp /* &zPattern */) + c2 = Xsqlite3Utf8Read(tls, bp) } if c2 == U32(']') { if c == U32(']') { seen = 1 } - c2 = Xsqlite3Utf8Read(tls, bp /* &zPattern */) + c2 = Xsqlite3Utf8Read(tls, bp) } for c2 != 0 && c2 != U32(']') { if c2 == U32('-') && int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != ']' && int32(*(*U8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != 0 && prior_c > U32(0) { - c2 = Xsqlite3Utf8Read(tls, bp /* &zPattern */) + c2 = Xsqlite3Utf8Read(tls, bp) if c >= prior_c && c <= c2 { seen = 1 } @@ -102184,7 +102189,7 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint } prior_c = c2 } - c2 = Xsqlite3Utf8Read(tls, bp /* &zPattern */) + c2 = Xsqlite3Utf8Read(tls, bp) } if c2 == U32(0) || seen^invert == 0 { return SQLITE_NOMATCH @@ -102217,13 +102222,13 @@ func patternCompare(tls *libc.TLS, zPattern uintptr, zString uintptr, pInfo uint // The sqlite3_strglob() interface. Return 0 on a match (like strcmp()) and // non-zero if there is no match. -func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:120982:16: */ +func Xsqlite3_strglob(tls *libc.TLS, zGlobPattern uintptr, zString uintptr) int32 { /* sqlite3.c:120992:16: */ return patternCompare(tls, zGlobPattern, zString, uintptr(unsafe.Pointer(&globInfo)), uint32('[')) } // The sqlite3_strlike() interface. Return 0 on a match and non-zero for // a miss - like strcmp(). -func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:120990:16: */ +func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) int32 { /* sqlite3.c:121000:16: */ return patternCompare(tls, zPattern, zStr, uintptr(unsafe.Pointer(&likeInfoNorm)), esc) } @@ -102241,7 +102246,7 @@ func Xsqlite3_strlike(tls *libc.TLS, zPattern uintptr, zStr uintptr, esc uint32) // // This same function (with a different compareInfo structure) computes // the GLOB operator. -func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121016:13: */ +func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121026:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102264,7 +102269,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql nPat = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) if nPat > *(*int32)(unsafe.Pointer(db + 112 + 8*4)) { - Xsqlite3_result_error(tls, context, ts+14728 /* "LIKE or GLOB pat..." */, -1) + Xsqlite3_result_error(tls, context, ts+14750, -1) return } if argc == 3 { @@ -102276,12 +102281,12 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql } if Xsqlite3Utf8CharLen(tls, *(*uintptr)(unsafe.Pointer(bp)), -1) != 1 { Xsqlite3_result_error(tls, context, - ts+14761 /* "ESCAPE expressio..." */, -1) + ts+14783, -1) return } - escape = Xsqlite3Utf8Read(tls, bp /* &zEsc */) + escape = Xsqlite3Utf8Read(tls, bp) if escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll) || escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchOne) { - libc.Xmemcpy(tls, bp+4 /* &backupInfo */, pInfo, uint32(unsafe.Sizeof(compareInfo{}))) + libc.Xmemcpy(tls, bp+4, pInfo, uint32(unsafe.Sizeof(compareInfo{}))) pInfo = bp + 4 /* &backupInfo */ if escape == U32((*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll) { (*compareInfo)(unsafe.Pointer(pInfo)).FmatchAll = U8(0) @@ -102304,7 +102309,7 @@ func likeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // Implementation of the NULLIF(x,y) function. The result is the first // argument if the arguments are different. The result is NULL if the // arguments are equal to each other. -func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121087:13: */ +func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121097:13: */ var pColl uintptr = sqlite3GetFuncCollSeq(tls, context) _ = NotUsed if Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(argv)), *(*uintptr)(unsafe.Pointer(argv + 1*4)), pColl) != 0 { @@ -102314,7 +102319,7 @@ func nullifFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / // Implementation of the sqlite_version() function. The result is the version // of the SQLite library that is running. -func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121103:13: */ +func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121113:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-48699-48617 This function is an SQL wrapper around the @@ -102325,7 +102330,7 @@ func versionFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr // Implementation of the sqlite_source_id() function. The result is a string // that identifies the particular version of the source code used to build // SQLite. -func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121119:13: */ +func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:121129:13: */ _ = NotUsed _ = NotUsed2 // IMP: R-24470-31136 This function is an SQL wrapper around the @@ -102336,19 +102341,19 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // Implementation of the sqlite_log() function. This is a wrapper around // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. -func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121135:13: */ +func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121145:13: */ bp := tls.Alloc(8) defer tls.Free(8) _ = argc _ = context - Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) + Xsqlite3_log(tls, Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv))), ts+3623, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))))) } // Implementation of the sqlite_compileoption_used() function. // The result is an integer that identifies if the compiler option // was used to build SQLite. -func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121151:13: */ +func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121161:13: */ var zOptName uintptr _ = argc @@ -102363,7 +102368,7 @@ func compileoptionusedFunc(tls *libc.TLS, context uintptr, argc int32, argv uint // Implementation of the sqlite_compileoption_get() function. // The result is a string that identifies the compiler options // used to build SQLite. -func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121175:13: */ +func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121185:13: */ var n int32 _ = argc @@ -102378,14 +102383,14 @@ func compileoptiongetFunc(tls *libc.TLS, context uintptr, argc int32, argv uintp var hexdigits = [16]int8{ int8('0'), int8('1'), int8('2'), int8('3'), int8('4'), int8('5'), int8('6'), int8('7'), int8('8'), int8('9'), int8('A'), int8('B'), int8('C'), int8('D'), int8('E'), int8('F'), -} /* sqlite3.c:121193:19 */ +} /* sqlite3.c:121203:19 */ // Implementation of the QUOTE() function. This function takes a single // argument. If the argument is numeric, the return value is the same as // the argument. If the argument is NULL, the return value is the string // "NULL". Otherwise, the argument is enclosed in single quotes with // single-quote escapes. -func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121205:13: */ +func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121215:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -102399,12 +102404,12 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // var zBuf [50]int8 at bp+16, 50 r1 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16 /* &zBuf[0] */, ts+4845 /* "%!.15g" */, libc.VaList(bp, r1)) - Xsqlite3AtoF(tls, bp+16 /* &zBuf[0] */, bp+68 /* &r2 */, 20, uint8(SQLITE_UTF8)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16, ts+4867, libc.VaList(bp, r1)) + Xsqlite3AtoF(tls, bp+16, bp+68, 20, uint8(SQLITE_UTF8)) if r1 != *(*float64)(unsafe.Pointer(bp + 68)) { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16 /* &zBuf[0] */, ts+14806 /* "%!.20e" */, libc.VaList(bp+8, r1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16, ts+14828, libc.VaList(bp+8, r1)) } - Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, context, bp+16, -1, libc.UintptrFromInt32(-1)) break } @@ -102476,7 +102481,7 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq default: { - Xsqlite3_result_text(tls, context, ts+1544 /* "NULL" */, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+1566, 4, uintptr(0)) break } @@ -102485,21 +102490,21 @@ func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq // The unicode() function. Return the integer unicode code-point value // for the first character of the input string. -func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121281:13: */ +func unicodeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121291:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* z */)) = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) _ = argc if *(*uintptr)(unsafe.Pointer(bp)) != 0 && *(*uint8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 { - Xsqlite3_result_int(tls, context, int32(Xsqlite3Utf8Read(tls, bp /* &z */))) + Xsqlite3_result_int(tls, context, int32(Xsqlite3Utf8Read(tls, bp))) } } // The char() function takes zero or more arguments, each of which is // an integer. It constructs a string where each character of the string // is the unicode character for the corresponding integer argument. -func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121296:13: */ +func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121306:13: */ var z uintptr var zOut uintptr var i int32 @@ -102537,7 +102542,7 @@ func charFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // The hex() function. Interpret the argument as a blob. Return // a hexadecimal rendering as text. -func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121337:13: */ +func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121347:13: */ var i int32 var n int32 var pBlob uintptr @@ -102575,7 +102580,7 @@ func hexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } // The zeroblob(N) function returns a zero-filled blob of size N bytes. -func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121365:13: */ +func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121375:13: */ var n I64 var rc int32 @@ -102594,7 +102599,7 @@ func zeroblobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // them A, B, and C. The result is also a string which is derived // from A by replacing every occurrence of B with C. The match // must be exact. Collating sequences are not used. -func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121388:13: */ +func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121398:13: */ var zStr uintptr // The input string A var zPattern uintptr // The pattern string B var zRep uintptr // The replacement string C @@ -102683,7 +102688,7 @@ func replaceFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // Implementation of the TRIM(), LTRIM(), and RTRIM() functions. // The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both. -func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121481:13: */ +func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121491:13: */ var zIn uintptr // Input string var zCharSet uintptr // Set of characters to trim var nIn uint32 // Number of bytes in input @@ -102786,8 +102791,8 @@ func trimFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql Xsqlite3_result_text(tls, context, zIn, int32(nIn), libc.UintptrFromInt32(-1)) } -var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:121503:27 */ -var azOne = [1]uintptr{uintptr(ts + 10766 /* " " */)} /* sqlite3.c:121504:26 */ +var lenOne = [1]uint32{uint32(1)} /* sqlite3.c:121513:27 */ +var azOne = [1]uintptr{uintptr(ts + 10788 /* " " */)} /* sqlite3.c:121514:26 */ // IMP: R-25361-16150 This function is omitted from SQLite by default. It // is only available if the SQLITE_SOUNDEX compile-time option is used @@ -102796,7 +102801,7 @@ var azOne = [1]uintptr{uintptr(ts + 10766 /* " " */)} /* sqlite3.c:121504:26 */ // // IMP: R-59782-00072 The soundex(X) function returns a string that is the // soundex encoding of the string X. -func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121594:13: */ +func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121604:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -102808,33 +102813,33 @@ func soundexFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* zIn = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) if zIn == uintptr(0) { - zIn = ts + 1543 /* "" */ + zIn = ts + 1565 /* "" */ } for i = 0; *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 && !(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))])&0x02 != 0); i++ { } if *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0 { var prevcode U8 = iCode[int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i))))&0x7f] - *(*int8)(unsafe.Pointer(bp /* &zResult[0] */)) = int8(int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i)))) & ^(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))]) & 0x20)) + *(*int8)(unsafe.Pointer(bp)) = int8(int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i)))) & ^(int32(Xsqlite3CtypeMap[*(*U8)(unsafe.Pointer(zIn + uintptr(i)))]) & 0x20)) for j = 1; j < 4 && *(*U8)(unsafe.Pointer(zIn + uintptr(i))) != 0; i++ { var code int32 = int32(iCode[int32(*(*U8)(unsafe.Pointer(zIn + uintptr(i))))&0x7f]) if code > 0 { if code != int32(prevcode) { prevcode = U8(code) - *(*int8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(libc.PostIncInt32(&j, 1)))) = int8(code + '0') + *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&j, 1)))) = int8(code + '0') } } else { prevcode = U8(0) } } for j < 4 { - *(*int8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(libc.PostIncInt32(&j, 1)))) = int8('0') + *(*int8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&j, 1)))) = int8('0') } - *(*int8)(unsafe.Pointer(bp /* &zResult[0] */ + uintptr(j))) = int8(0) - Xsqlite3_result_text(tls, context, bp /* &zResult[0] */, 4, libc.UintptrFromInt32(-1)) + *(*int8)(unsafe.Pointer(bp + uintptr(j))) = int8(0) + Xsqlite3_result_text(tls, context, bp, 4, libc.UintptrFromInt32(-1)) } else { // IMP: R-64894-50321 The string "?000" is returned if the argument // is NULL or contains no ASCII alphabetic characters. - Xsqlite3_result_text(tls, context, ts+14813 /* "?000" */, 4, uintptr(0)) + Xsqlite3_result_text(tls, context, ts+14835, 4, uintptr(0)) } } @@ -102847,10 +102852,10 @@ var iCode = [128]uint8{ uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), uint8(1), uint8(2), uint8(3), uint8(0), uint8(1), uint8(2), uint8(0), uint8(0), uint8(2), uint8(2), uint8(4), uint8(5), uint8(5), uint8(0), uint8(1), uint8(2), uint8(6), uint8(2), uint8(3), uint8(0), uint8(1), uint8(0), uint8(2), uint8(0), uint8(2), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), -} /* sqlite3.c:121602:30 */ +} /* sqlite3.c:121612:30 */ // A function that loads a shared-library extension then returns NULL. -func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121647:13: */ +func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121657:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -102862,7 +102867,7 @@ func loadExt(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli // Disallow the load_extension() SQL function unless the SQLITE_LoadExtFunc // flag is set. See the sqlite3_enable_load_extension() API. if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_LoadExtFunc) == uint64(0) { - Xsqlite3_result_error(tls, context, ts+11938 /* "not authorized" */, -1) + Xsqlite3_result_error(tls, context, ts+11960, -1) return } @@ -102886,11 +102891,11 @@ type SumCtx1 = struct { Foverflow U8 Fapprox U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:121678:9 */ +} /* sqlite3.c:121688:9 */ // An instance of the following structure holds the context of a // sum() or avg() aggregate computation. -type SumCtx = SumCtx1 /* sqlite3.c:121678:23 */ +type SumCtx = SumCtx1 /* sqlite3.c:121688:23 */ // Routines used to compute the sum, average, and total. // @@ -102900,7 +102905,7 @@ type SumCtx = SumCtx1 /* sqlite3.c:121678:23 */ // SUM might return an integer if it never encounters a floating point // value. TOTAL never fails, but SUM might through an exception if // it overflows an integer. -func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121697:13: */ +func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121707:13: */ var p uintptr var type1 int32 @@ -102922,7 +102927,7 @@ func sumStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli } } -func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121719:13: */ +func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121729:13: */ var p uintptr var type1 int32 @@ -102945,12 +102950,12 @@ func sumInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s } } -func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121744:13: */ +func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121754:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { if (*SumCtx)(unsafe.Pointer(p)).Foverflow != 0 { - Xsqlite3_result_error(tls, context, ts+14706 /* "integer overflow" */, -1) + Xsqlite3_result_error(tls, context, ts+14728, -1) } else if (*SumCtx)(unsafe.Pointer(p)).Fapprox != 0 { Xsqlite3_result_double(tls, context, (*SumCtx)(unsafe.Pointer(p)).FrSum) } else { @@ -102959,7 +102964,7 @@ func sumFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121744:13: */ } } -func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121757:13: */ +func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121767:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) if p != 0 && (*SumCtx)(unsafe.Pointer(p)).Fcnt > int64(0) { @@ -102967,7 +102972,7 @@ func avgFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121757:13: */ } } -func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121764:13: */ +func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121774:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) // (double)0 In case of SQLITE_OMIT_FLOATING_POINT... @@ -102981,14 +102986,14 @@ func totalFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121764:13: */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:121775:9 */ +type CountCtx1 = struct{ Fn I64 } /* sqlite3.c:121785:9 */ // The following structure keeps track of state information for the // count() aggregate function. -type CountCtx = CountCtx1 /* sqlite3.c:121775:25 */ +type CountCtx = CountCtx1 /* sqlite3.c:121785:25 */ // Routines to implement the count() aggregate function. -func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121786:13: */ +func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121796:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(CountCtx{}))) if (argc == 0 || SQLITE_NULL != Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv)))) && p != 0 { @@ -103002,7 +103007,7 @@ func countStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq } -func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121802:13: */ +func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121812:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, context, 0) Xsqlite3_result_int64(tls, context, func() int64 { @@ -103013,7 +103018,7 @@ func countFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121802:13: */ }()) } -func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:121808:13: */ +func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:121818:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(CountCtx{}))) // p is always non-NULL since countStep() will have been called first @@ -103023,7 +103028,7 @@ func countInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql } // Routines to implement min() and max() aggregate functions. -func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121826:13: */ +func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:121836:13: */ var pArg uintptr = *(*uintptr)(unsafe.Pointer(argv)) var pBest uintptr _ = NotUsed @@ -103061,7 +103066,7 @@ func minmaxStep(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { / } } -func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:121864:13: */ +func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqlite3.c:121874:13: */ var pRes uintptr pRes = Xsqlite3_aggregate_context(tls, context, 0) if pRes != 0 { @@ -103074,11 +103079,11 @@ func minMaxValueFinalize(tls *libc.TLS, context uintptr, bValue int32) { /* sqli } } -func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:121875:13: */ +func minMaxValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:121885:13: */ minMaxValueFinalize(tls, context, 1) } -func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121881:13: */ +func minMaxFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:121891:13: */ minMaxValueFinalize(tls, context, 0) } @@ -103094,9 +103099,9 @@ type GroupConcatCtx = struct { FnAccum int32 FnFirstSepLength int32 FpnSepLengths uintptr -} /* sqlite3.c:121906:3 */ +} /* sqlite3.c:121916:3 */ -func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121908:13: */ +func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121918:13: */ var zVal uintptr var pGCC uintptr var zSep uintptr @@ -103161,7 +103166,7 @@ func groupConcatStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } } -func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121979:13: */ +func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:121989:13: */ var pGCC uintptr _ = argc // Suppress unused parameter warning @@ -103203,7 +103208,7 @@ func groupConcatInverse(tls *libc.TLS, context uintptr, argc int32, argv uintptr } } -func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122025:13: */ +func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122035:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { Xsqlite3ResultStrAccum(tls, context, pGCC) @@ -103211,7 +103216,7 @@ func groupConcatFinalize(tls *libc.TLS, context uintptr) { /* sqlite3.c:122025:1 } } -func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122036:13: */ +func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122046:13: */ var pGCC uintptr = Xsqlite3_aggregate_context(tls, context, 0) if pGCC != 0 { var pAccum uintptr = pGCC @@ -103229,8 +103234,8 @@ func groupConcatValue(tls *libc.TLS, context uintptr) { /* sqlite3.c:122036:13: // This routine does per-connection function registration. Most // of the built-in functions above are part of the global function set. // This routine only deals with those that are not global. -func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122060:21: */ - var rc int32 = Xsqlite3_overload_function(tls, db, ts+14818 /* "MATCH" */, 2) +func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { /* sqlite3.c:122070:21: */ + var rc int32 = Xsqlite3_overload_function(tls, db, ts+14840, 2) if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -103240,7 +103245,7 @@ func Xsqlite3RegisterPerConnectionBuiltinFunctions(tls *libc.TLS, db uintptr) { // Re-register the built-in LIKE functions. The caseSensitive // parameter determines whether or not the LIKE operator is case // sensitive. -func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122073:21: */ +func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int32) { /* sqlite3.c:122083:21: */ var pInfo uintptr var flags int32 if caseSensitive != 0 { @@ -103250,14 +103255,14 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 pInfo = uintptr(unsafe.Pointer(&likeInfoNorm)) flags = SQLITE_FUNC_LIKE } - Xsqlite3CreateFunc(tls, db, ts+14824 /* "like" */, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14846, 2, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3CreateFunc(tls, db, ts+14824 /* "like" */, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { + Xsqlite3CreateFunc(tls, db, ts+14846, 3, SQLITE_UTF8, pInfo, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{likeFunc})), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14824, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) - *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14824, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14846, 2, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) + *(*U32)(unsafe.Pointer(Xsqlite3FindFunction(tls, db, ts+14846, 3, uint8(SQLITE_UTF8), uint8(0)) + 4)) |= U32(flags) } // pExpr points to an expression which implements a function. If @@ -103275,7 +103280,7 @@ func Xsqlite3RegisterLikeFunctions(tls *libc.TLS, db uintptr, caseSensitive int3 // the function (default for LIKE). If the function makes the distinction // between uppercase and lowercase (as does GLOB) then *pIsNocase is set to // false. -func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122106:20: */ +func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase uintptr, aWc uintptr) int32 { /* sqlite3.c:122116:20: */ var pDef uintptr var nExpr int32 @@ -103323,9 +103328,179 @@ func Xsqlite3IsLikeFunction(tls *libc.TLS, db uintptr, pExpr uintptr, pIsNocase // Mathematical Constants // Extra math functions that require linking with -lm +// Implementation SQL functions: +// +// ceil(X) +// ceiling(X) +// floor(X) +// +// The sqlite3_user_data() pointer is a pointer to the libm implementation +// of the underlying C function. +func ceilingFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122187:13: */ + + switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { + case SQLITE_INTEGER: + { + Xsqlite3_result_int64(tls, context, Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv)))) + break + + } + case SQLITE_FLOAT: + { + var x uintptr = Xsqlite3_user_data(tls, context) + Xsqlite3_result_double(tls, context, (*struct { + f func(*libc.TLS, float64) float64 + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))))) + break + + } + default: + { + break + + } + } +} + +// On some systems, ceil() and floor() are intrinsic function. You are +// unable to take a pointer to these functions. Hence, we here wrap them +// in our own actual functions. +func xCeil(tls *libc.TLS, x float64) float64 { /* sqlite3.c:122214:15: */ + return libc.Xceil(tls, x) +} + +func xFloor(tls *libc.TLS, x float64) float64 { /* sqlite3.c:122215:15: */ + return libc.Xfloor(tls, x) +} + +// Implementation of SQL functions: +// +// ln(X) - natural logarithm +// log(X) - log X base 10 +// log10(X) - log X base 10 +// log(B,X) - log X base B +func logFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122225:13: */ + var x float64 + var b float64 + var ans float64 + + switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { + case SQLITE_INTEGER: + fallthrough + case SQLITE_FLOAT: + x = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + if x <= 0.0 { + return + } + break + default: + return + } + if argc == 2 { + switch Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { + case SQLITE_INTEGER: + fallthrough + case SQLITE_FLOAT: + b = libc.Xlog(tls, x) + if b <= 0.0 { + return + } + x = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) + if x <= 0.0 { + return + } + break + fallthrough + default: + return + } + ans = libc.Xlog(tls, x) / b + } else { + ans = libc.Xlog(tls, x) + switch int32(Xsqlite3_user_data(tls, context)) { + case 1: + // Convert from natural logarithm to log base 10 + ans = ans * (float64(1.0) / 2.30258509299404568402) + break + fallthrough + case 2: + // Convert from natural logarithm to log base 2 + ans = ans * (float64(1.0) / 0.69314718055994530942) + break + fallthrough + default: + break + } + } + Xsqlite3_result_double(tls, context, ans) +} + +// Functions to converts degrees to radians and radians to degrees. +func degToRad(tls *libc.TLS, x float64) float64 { /* sqlite3.c:122275:15: */ + return x * (float64(3.14159265358979323846) / 180.0) +} + +func radToDeg(tls *libc.TLS, x float64) float64 { /* sqlite3.c:122276:15: */ + return x * (float64(180.0) / 3.14159265358979323846) +} + +// Implementation of 1-argument SQL math functions: +// +// exp(X) - Compute e to the X-th power +func math1Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122283:13: */ + var type0 int32 + var v0 float64 + var ans float64 + var x uintptr + + type0 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + if type0 != SQLITE_INTEGER && type0 != SQLITE_FLOAT { + return + } + v0 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + x = Xsqlite3_user_data(tls, context) + ans = (*struct { + f func(*libc.TLS, float64) float64 + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, v0) + Xsqlite3_result_double(tls, context, ans) +} + +// Implementation of 2-argument SQL math functions: +// +// power(X,Y) - Compute X to the Y-th power +func math2Func(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122305:13: */ + var type0 int32 + var type1 int32 + var v0 float64 + var v1 float64 + var ans float64 + var x uintptr + + type0 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) + if type0 != SQLITE_INTEGER && type0 != SQLITE_FLOAT { + return + } + type1 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) + if type1 != SQLITE_INTEGER && type1 != SQLITE_FLOAT { + return + } + v0 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + v1 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) + x = Xsqlite3_user_data(tls, context) + ans = (*struct { + f func(*libc.TLS, float64, float64) float64 + })(unsafe.Pointer(&struct{ uintptr }{x})).f(tls, v0, v1) + Xsqlite3_result_double(tls, context, ans) +} + +// Implementation of 0-argument pi() function. +func piFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122328:13: */ + + Xsqlite3_result_double(tls, context, 3.14159265358979323846) +} // Implementation of sign(X) function. -func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122332:13: */ +func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:122342:13: */ var type0 int32 var x float64 _ = argc @@ -103353,7 +103528,7 @@ func signFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // a consequence of calling sqlite3_initialize()). // // After this routine runs -func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:122354:21: */ +func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:122364:21: */ Xsqlite3AlterFunctions(tls) Xsqlite3WindowFunctions(tls) Xsqlite3RegisterDateTimeFunctions(tls) @@ -103361,79 +103536,109 @@ func Xsqlite3RegisterBuiltinFunctions(tls *libc.TLS) { /* sqlite3.c:122354:21: * } -var aBuiltinFunc = [69]FuncDef{ +var aBuiltinFunc = [99]FuncDef{ //**** Functions only available with SQLITE_TESTCTRL_INTERNAL_FUNCTIONS **** - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14829 /* "implies_nonnull_..." */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14849 /* "expr_compare" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14862 /* "expr_implies_exp..." */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 14880 /* "affinity" */}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_implies_nonnull_row), FxSFunc: 0, FzName: ts + 14851}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_compare), FxSFunc: 0, FzName: ts + 14871}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_expr_implies_expr), FxSFunc: 0, FzName: ts + 14884}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INTERNAL | SQLITE_FUNC_TEST | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_affinity), FxSFunc: 0, FzName: ts + 14902}, //**** Regular functions **** - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14889 /* "soundex" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14897 /* "load_extension" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14897 /* "load_extension" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14912 /* "sqlite_compileop..." */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14938 /* "sqlite_compileop..." */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 14963 /* "unlikely" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 14972 /* "likelihood" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 14983 /* "likely" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 14990 /* "sqlite_offset" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15004 /* "ltrim" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15004 /* "ltrim" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15010 /* "rtrim" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15010 /* "rtrim" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15016 /* "trim" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15016 /* "trim" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15021 /* "min" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15021 /* "min" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15021 /* "min" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15025 /* "max" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15025 /* "max" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15025 /* "max" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15029 /* "typeof" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15036 /* "length" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15043 /* "instr" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15049 /* "printf" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15056 /* "unicode" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15064 /* "char" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15069 /* "abs" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15073 /* "round" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15073 /* "round" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15079 /* "upper" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15085 /* "lower" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15091 /* "hex" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15095 /* "ifnull" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15102 /* "random" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15109 /* "randomblob" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15120 /* "nullif" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15127 /* "sqlite_version" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15142 /* "sqlite_source_id" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15159 /* "sqlite_log" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15170 /* "quote" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15176 /* "last_insert_rowi..." */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15194 /* "changes" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15202 /* "total_changes" */}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15216 /* "replace" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224 /* "zeroblob" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233 /* "substr" */}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15233 /* "substr" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15240 /* "substring" */}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15240 /* "substring" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15250 /* "sum" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15254 /* "total" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15260 /* "avg" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15264 /* "count" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15264 /* "count" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15270 /* "group_concat" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15270 /* "group_concat" */}, - - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15283 /* "glob" */}, - {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14824 /* "like" */}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14824 /* "like" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15288 /* "coalesce" */}, - {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15288 /* "coalesce" */}, - {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15297 /* "sign" */}, - {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15288 /* "coalesce" */}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15302 /* "iif" */}} /* sqlite3.c:122365:18 */ + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 14911}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14919}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_DIRECTONLY | SQLITE_FUNC_UNSAFE), FxSFunc: 0, FzName: ts + 14919}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14934}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 14960}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 14985}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 14994}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | SQLITE_FUNC_UNLIKELY), FpUserData: uintptr(INLINEFUNC_unlikely), FxSFunc: 0, FzName: ts + 15005}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_OFFSET | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15012}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15026}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15026}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15032}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15032}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15038}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(3), FxSFunc: 0, FzName: ts + 15038}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15043}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15043}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15043}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15047}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FzName: ts + 15047}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_MINMAX | SQLITE_FUNC_ANYORDER), FpUserData: uintptr(1), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FzName: ts + 15047}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_TYPEOF), FxSFunc: 0, FzName: ts + 15051}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_LENGTH), FxSFunc: 0, FzName: ts + 15058}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15065}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15071}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15078}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15086}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15091}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15095}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15095}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15101}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15107}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15113}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15117}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15124}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15131}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 1*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15142}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15149}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_SLOCHNG | SQLITE_UTF8), FxSFunc: 0, FzName: ts + 15164}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15181}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15192}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15198}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15216}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15224}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15238}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15246}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15255}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15255}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15262}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15262}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15272}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15276}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15282}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_COUNT | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15286}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | SQLITE_FUNC_ANYORDER), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15286}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15292}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: ts + 15292}, + + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE), FpUserData: 0, FxSFunc: 0, FzName: ts + 15305}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14846}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | SQLITE_FUNC_LIKE), FpUserData: 0, FxSFunc: 0, FzName: ts + 14846}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15310}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FzName: ts + 15310}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15319}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15324}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15332}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15338}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15344}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15347}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(1), FxSFunc: 0, FzName: ts + 15351}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FpUserData: uintptr(2), FxSFunc: 0, FzName: ts + 15357}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15347}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15362}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15366}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15370}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15376}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15380}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15385}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15390}, + {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15395}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15401}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15405}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15409}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15413}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15418}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15423}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15428}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15434}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15440}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15446}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15451}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8), FpUserData: 0, FxSFunc: 0, FzName: ts + 15459}, + {FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15467}, + {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_FUNC_CONSTANT | SQLITE_UTF8 | 0*SQLITE_FUNC_NEEDCOLL), FxSFunc: 0, FzName: ts + 15470}, + {FnArg: int8(-1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FxSFunc: 0, FzName: ts + 15310}, + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_INLINE | SQLITE_FUNC_CONSTANT | 0), FpUserData: uintptr(INLINEFUNC_iif), FxSFunc: 0, FzName: ts + 15475}} /* sqlite3.c:122375:18 */ //************* End of func.c *********************************************** //************* Begin file fkey.c ******************************************* @@ -103608,7 +103813,7 @@ var aBuiltinFunc = [69]FuncDef{ // then non-zero is returned, and a "foreign key mismatch" error loaded // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. -func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:122715:20: */ +func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:122725:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -103719,7 +103924,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey if !(pIdx != 0) { if !(int32((*Parse)(unsafe.Pointer(pParse)).FdisableTriggers) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+15306, /* "foreign key mism..." */ + ts+15479, libc.VaList(bp, (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FzName, (*FKey)(unsafe.Pointer(pFKey)).FzTo)) } Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, aiCol) @@ -103754,7 +103959,7 @@ func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.1" and "D.1". -func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:122852:13: */ +func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32, isIgnore int32) { /* sqlite3.c:122862:13: */ var i int32 // Iterator variable var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Vdbe to add code to var iCur int32 = (*Parse)(unsafe.Pointer(pParse)).FnTab - 1 // Cursor number to use @@ -103884,7 +104089,7 @@ func fkLookupParent(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr, pIdx // regBase is the first of an array of register that contains the data // for pTab. regBase itself holds the rowid. regBase+1 holds the first // column. regBase+2 holds the second column, and so forth. -func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123005:13: */ +func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int32, iCol I16) uintptr { /* sqlite3.c:123015:13: */ var pExpr uintptr var pCol uintptr var zColl uintptr @@ -103911,7 +104116,7 @@ func exprTableRegister(tls *libc.TLS, pParse uintptr, pTab uintptr, regBase int3 // Return an Expr object that refers to column iCol of table pTab which // has cursor iCur. -func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123037:13: */ +func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCol I16) uintptr { /* sqlite3.c:123047:13: */ var pExpr uintptr = Xsqlite3Expr(tls, db, TK_COLUMN, uintptr(0)) if pExpr != 0 { @@ -103952,7 +104157,7 @@ func exprTableColumn(tls *libc.TLS, db uintptr, pTab uintptr, iCursor int32, iCo // // These operations are identified in the comment at the top of this file // (fkey.c) as "I.2" and "D.2". -func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123085:13: */ +func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pIdx uintptr, pFKey uintptr, aiCol uintptr, regData int32, nIncr int32) { /* sqlite3.c:123095:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -104041,10 +104246,10 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p } // Resolve the references in the WHERE clause. - libc.Xmemset(tls, bp /* &sNameContext */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNameContext */)).FpSrcList = pSrc (*NameContext)(unsafe.Pointer(bp /* &sNameContext */)).FpParse = pParse - Xsqlite3ResolveExprNames(tls, bp /* &sNameContext */, pWhere) + Xsqlite3ResolveExprNames(tls, bp, pWhere) // Create VDBE to loop through the entries in pSrc that match the WHERE // clause. For each row found, increment either the deferred or immediate @@ -104076,7 +104281,7 @@ func fkScanChildren(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, p // "t2". Calling this function with "t2" as the argument would return a // NULL pointer (as there are no FK constraints for which t2 is the parent // table). -func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:123214:21: */ +func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:123224:21: */ return Xsqlite3HashFind(tls, (*Table)(unsafe.Pointer(pTab)).FpSchema+56, (*Table)(unsafe.Pointer(pTab)).FzName) } @@ -104086,7 +104291,7 @@ func Xsqlite3FkReferences(tls *libc.TLS, pTab uintptr) uintptr { /* sqlite3.c:12 // // The Trigger structure or any of its sub-components may be allocated from // the lookaside buffer belonging to database handle dbMem. -func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:123226:13: */ +func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:123236:13: */ if p != 0 { var pStep uintptr = (*Trigger)(unsafe.Pointer(p)).Fstep_list Xsqlite3ExprDelete(tls, dbMem, (*TriggerStep)(unsafe.Pointer(pStep)).FpWhere) @@ -104097,6 +104302,27 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:123 } } +// Clear the apTrigger[] cache of CASCADE triggers for all foreign keys +// in a particular database. This needs to happen when the schema +// changes. +func Xsqlite3FkClearTriggerCache(tls *libc.TLS, db uintptr, iDb int32) { /* sqlite3.c:123252:21: */ + var k uintptr + var pHash uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema + 8 + for k = (*Hash)(unsafe.Pointer(pHash)).Ffirst; k != 0; k = (*HashElem)(unsafe.Pointer(k)).Fnext { + var pTab uintptr = (*HashElem)(unsafe.Pointer(k)).Fdata + var pFKey uintptr + if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM) { + continue + } + for pFKey = *(*uintptr)(unsafe.Pointer(pTab + 44 + 4 /* &.pFKey */)); pFKey != 0; pFKey = (*FKey)(unsafe.Pointer(pFKey)).FpNextFrom { + fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 28))) + *(*uintptr)(unsafe.Pointer(pFKey + 28)) = uintptr(0) + fkTriggerDelete(tls, db, *(*uintptr)(unsafe.Pointer(pFKey + 28 + 1*4))) + *(*uintptr)(unsafe.Pointer(pFKey + 28 + 1*4)) = uintptr(0) + } + } +} + // This function is called to generate code that runs when table pTab is // being dropped from the database. The SrcList passed as the second argument // to this function contains a single entry guaranteed to resolve to @@ -104112,7 +104338,7 @@ func fkTriggerDelete(tls *libc.TLS, dbMem uintptr, p uintptr) { /* sqlite3.c:123 // then the equivalent of "DELETE FROM <tbl>" is executed before dropping // the table from the database. Triggers are disabled while running this // DELETE, but foreign key actions are not. -func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:123254:21: */ +func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uintptr) { /* sqlite3.c:123283:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { var iSkip int32 = 0 @@ -104175,7 +104401,7 @@ func Xsqlite3FkDropTable(tls *libc.TLS, pParse uintptr, pName uintptr, pTab uint // // This function returns true if any of the columns that are part of the // child key for FK constraint *p are modified. -func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:123317:12: */ +func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:123346:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var iChildKey int32 = (*sColMap)(unsafe.Pointer(p + 36 + uintptr(i)*8)).FiFrom @@ -104199,7 +104425,7 @@ func fkChildIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // // This function returns true if any of the columns that are part of the // parent key for FK constraint *p are modified. -func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:123344:12: */ +func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, bChngRowid int32) int32 { /* sqlite3.c:123373:12: */ var i int32 for i = 0; i < (*FKey)(unsafe.Pointer(p)).FnCol; i++ { var zKey uintptr = (*sColMap)(unsafe.Pointer(p + 36 + uintptr(i)*8)).FzCol @@ -104223,7 +104449,7 @@ func fkParentIsModified(tls *libc.TLS, pTab uintptr, p uintptr, aChange uintptr, // Return true if the parser passed as the first argument is being // used to code a trigger that is really a "SET NULL" action belonging // to trigger pFKey. -func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:123373:12: */ +func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sqlite3.c:123402:12: */ var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -104258,7 +104484,7 @@ func isSetNullAction(tls *libc.TLS, pParse uintptr, pFKey uintptr) int32 { /* sq // the original record is deleted from the table using the calling convention // described for DELETE. Then again after the original record is deleted // but before the new record is inserted using the INSERT convention. -func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:123406:21: */ +func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, regNew int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:123435:21: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -104460,7 +104686,7 @@ func Xsqlite3FkCheck(tls *libc.TLS, pParse uintptr, pTab uintptr, regOld int32, // This function is called before generating code to update or delete a // row contained in table pTab. -func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:123609:20: */ +func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sqlite3.c:123638:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -104480,7 +104706,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql } for p = Xsqlite3FkReferences(tls, pTab); p != 0; p = (*FKey)(unsafe.Pointer(p)).FpNextTo { *(*uintptr)(unsafe.Pointer(bp /* pIdx */)) = uintptr(0) - Xsqlite3FkLocateIndex(tls, pParse, pTab, p, bp /* &pIdx */, uintptr(0)) + Xsqlite3FkLocateIndex(tls, pParse, pTab, p, bp, uintptr(0)) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { for i = 0; i < int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIdx */)))).FnKeyCol); i++ { @@ -104519,7 +104745,7 @@ func Xsqlite3FkOldmask(tls *libc.TLS, pParse uintptr, pTab uintptr) U32 { /* sql // not "NO ACTION" (i.e. is CASCADE, SET DEFAULT or SET NULL). // // Or, assuming some other foreign key processing is required, 1. -func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:123659:20: */ +func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uintptr, chngRowid int32) int32 { /* sqlite3.c:123688:20: */ var eRet int32 = 1 // Value to return if bHaveFK is true var bHaveFK int32 = 0 // If FK processing is required if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Fflags&uint64(SQLITE_ForeignKeys) != 0 && int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_NORM { @@ -104587,7 +104813,7 @@ func Xsqlite3FkRequired(tls *libc.TLS, pParse uintptr, pTab uintptr, aChange uin // The returned pointer is cached as part of the foreign key object. It // is eventually freed along with the rest of the foreign key object by // sqlite3FkDelete(). -func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:123727:16: */ +func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pChanges uintptr) uintptr { /* sqlite3.c:123756:16: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -104619,8 +104845,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, } for i = 0; i < (*FKey)(unsafe.Pointer(pFKey)).FnCol; i++ { - *(*Token)(unsafe.Pointer(bp + 24 /* tOld */)) = Token{Fz: ts + 6314 /* "old" */, Fn: uint32(3)} // Literal "old" token - *(*Token)(unsafe.Pointer(bp + 32 /* tNew */)) = Token{Fz: ts + 6310 /* "new" */, Fn: uint32(3)} // Literal "new" token + *(*Token)(unsafe.Pointer(bp + 24 /* tOld */)) = Token{Fz: ts + 6336, Fn: uint32(3)} // Literal "old" token + *(*Token)(unsafe.Pointer(bp + 32 /* tNew */)) = Token{Fz: ts + 6332, Fn: uint32(3)} // Literal "new" token // var tFromCol Token at bp+16, 8 // Name of column in child table // var tToCol Token at bp+8, 8 @@ -104634,14 +104860,14 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, iFromCol = (*sColMap)(unsafe.Pointer(pFKey + 36)).FiFrom } - Xsqlite3TokenInit(tls, bp+8, /* &tToCol */ + Xsqlite3TokenInit(tls, bp+8, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(func() int32 { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIdx */)))).FaiColumn + uintptr(i)*2))) } return int32((*Table)(unsafe.Pointer(pTab)).FiPKey) }())*16)).FzCnName) - Xsqlite3TokenInit(tls, bp+16 /* &tFromCol */, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol+uintptr(iFromCol)*16)).FzCnName) + Xsqlite3TokenInit(tls, bp+16, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol+uintptr(iFromCol)*16)).FzCnName) // Create the expression "OLD.zToCol = zFromCol". It is important // that the "OLD.zToCol" term is on the LHS of the = operator, so @@ -104649,9 +104875,9 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // parent table are used for the comparison. pEq = Xsqlite3PExpr(tls, pParse, TK_EQ, Xsqlite3PExpr(tls, pParse, TK_DOT, - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+24 /* &tOld */, 0), - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+8 /* &tToCol */, 0)), - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16 /* &tFromCol */, 0)) + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+24, 0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+8, 0)), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+16, 0)) pWhere = Xsqlite3ExprAnd(tls, pParse, pWhere, pEq) // For ON UPDATE, construct the next term of the WHEN clause. @@ -104661,11 +104887,11 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, if pChanges != 0 { pEq = Xsqlite3PExpr(tls, pParse, TK_IS, Xsqlite3PExpr(tls, pParse, TK_DOT, - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+24 /* &tOld */, 0), - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+8 /* &tToCol */, 0)), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+24, 0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+8, 0)), Xsqlite3PExpr(tls, pParse, TK_DOT, - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+32 /* &tNew */, 0), - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+8 /* &tToCol */, 0))) + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+32, 0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+8, 0))) pWhen = Xsqlite3ExprAnd(tls, pParse, pWhen, pEq) } @@ -104673,8 +104899,8 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, var pNew uintptr if action == OE_Cascade { pNew = Xsqlite3PExpr(tls, pParse, TK_DOT, - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+32 /* &tNew */, 0), - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+8 /* &tToCol */, 0)) + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+32, 0), + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+8, 0)) } else if action == OE_SetDflt { var pCol uintptr = (*Table)(unsafe.Pointer((*FKey)(unsafe.Pointer(pFKey)).FpFrom)).FaCol + uintptr(iFromCol)*16 var pDflt uintptr @@ -104693,7 +104919,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, pNew = Xsqlite3ExprAlloc(tls, db, TK_NULL, uintptr(0), 0) } pList = Xsqlite3ExprListAppend(tls, pParse, pList, pNew) - Xsqlite3ExprListSetName(tls, pParse, pList, bp+16 /* &tFromCol */, 0) + Xsqlite3ExprListSetName(tls, pParse, pList, bp+16, 0) } } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 4 /* aiCol */))) @@ -104708,13 +104934,13 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, (*Token)(unsafe.Pointer(bp + 40 /* &tFrom */)).Fz = zFrom (*Token)(unsafe.Pointer(bp + 40 /* &tFrom */)).Fn = uint32(nFrom) - pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5056 /* "FOREIGN KEY cons..." */) + pRaise = Xsqlite3Expr(tls, db, TK_RAISE, ts+5078) if pRaise != 0 { (*Expr)(unsafe.Pointer(pRaise)).FaffExpr = int8(OE_Abort) } pSelect = Xsqlite3SelectNew(tls, pParse, Xsqlite3ExprListAppend(tls, pParse, uintptr(0), pRaise), - Xsqlite3SrcListAppend(tls, pParse, uintptr(0), bp+40 /* &tFrom */, uintptr(0)), + Xsqlite3SrcListAppend(tls, pParse, uintptr(0), bp+40, uintptr(0)), pWhere, uintptr(0), uintptr(0), uintptr(0), uint32(0), uintptr(0)) pWhere = uintptr(0) @@ -104789,7 +105015,7 @@ func fkActionTrigger(tls *libc.TLS, pParse uintptr, pTab uintptr, pFKey uintptr, // This function is called when deleting or updating a row to implement // any required CASCADE, SET NULL or SET DEFAULT actions. -func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:123919:21: */ +func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uintptr, regOld int32, aChange uintptr, bChngRowid int32) { /* sqlite3.c:123948:21: */ // If foreign-key support is enabled, iterate through all FKs that // refer to table pTab. If there is an action associated with the FK // for this operation (either update or delete), invoke the associated @@ -104810,7 +105036,7 @@ func Xsqlite3FkActions(tls *libc.TLS, pParse uintptr, pTab uintptr, pChanges uin // Free all memory associated with foreign key definitions attached to // table pTab. Remove the deleted foreign keys from the Schema.fkeyHash // hash table. -func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:123951:21: */ +func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:123980:21: */ var pFKey uintptr // Iterator variable var pNext uintptr // Copy of pFKey->pNextFrom @@ -104870,7 +105096,7 @@ func Xsqlite3FkDelete(tls *libc.TLS, db uintptr, pTab uintptr) { /* sqlite3.c:12 // // If pTab is a WITHOUT ROWID table, then it is the PRIMARY KEY index // for that table that is actually opened. -func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124017:21: */ +func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTab uintptr, opcode int32) { /* sqlite3.c:124046:21: */ var v uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -104912,7 +105138,7 @@ func Xsqlite3OpenTable(tls *libc.TLS, pParse uintptr, iCur int32, iDb int32, pTa // Memory for the buffer containing the column index affinity string // is managed along with the rest of the Index structure. It will be // released when sqlite3DeleteIndex() is called. -func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124064:27: */ +func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { /* sqlite3.c:124093:27: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { // The first time a column affinity string for a particular index is // required, it is allocated and populated here. It is then stored as @@ -104991,7 +105217,7 @@ func Xsqlite3IndexAffinityStr(tls *libc.TLS, db uintptr, pIdx uintptr) uintptr { // register set as the OP_MakeRecord. If iReg>0 then register iReg is // the first of a series of registers that will form the new record. // Apply the type checking to that array of registers. -func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:124143:21: */ +func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { /* sqlite3.c:124172:21: */ var i int32 var j int32 var zColAff uintptr @@ -105049,7 +105275,7 @@ func Xsqlite3TableAffinity(tls *libc.TLS, v uintptr, pTab uintptr, iReg int32) { // have been opened at any point in the VDBE program. This is used to see if // a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can // run without using a temporary table for the results of the SELECT. -func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:124204:12: */ +func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:124233:12: */ var v uintptr = Xsqlite3GetVdbe(tls, p) var i int32 var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -105085,7 +105311,7 @@ func readsTable(tls *libc.TLS, p uintptr, iDb int32, pTab uintptr) int32 { /* sq // This walker callback will compute the union of colFlags flags for all // referenced columns in a CHECK constraint or generated column expression. -func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:124241:12: */ +func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:124270:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { *(*U16)(unsafe.Pointer(pWalker + 20)) |= U16(int32((*Column)(unsafe.Pointer((*Table1)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pWalker + 24)))).FaCol + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiColumn)*16)).FcolFlags)) @@ -105098,7 +105324,7 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // or VIRTUAL columns have not yet been initialized. This routine goes // back and computes the values for those columns based on the previously // computed normal columns. -func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:124257:21: */ +func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:124286:21: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -105170,7 +105396,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in var x int32 *(*U16)(unsafe.Pointer(pCol + 12)) |= U16(COLFLAG_BUSY) (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FeCode = U16(0) - Xsqlite3WalkExpr(tls, bp+8 /* &w */, Xsqlite3ColumnExpr(tls, pTab, pCol)) + Xsqlite3WalkExpr(tls, bp+8, Xsqlite3ColumnExpr(tls, pTab, pCol)) *(*U16)(unsafe.Pointer(pCol + 12)) &= libc.Uint16FromInt32(libc.CplInt32(COLFLAG_BUSY)) if int32((*Walker)(unsafe.Pointer(bp+8)).FeCode)&COLFLAG_NOTAVAIL != 0 { pRedo = pCol @@ -105185,7 +105411,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } if pRedo != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+7837 /* "generated column..." */, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7859, libc.VaList(bp, (*Column)(unsafe.Pointer(pRedo)).FzCnName)) } (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 } @@ -105211,7 +105437,7 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in // // The 2nd register is the one that is returned. That is all the // insert routine needs to know about. -func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:124381:12: */ +func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 { /* sqlite3.c:124410:12: */ var memId int32 = 0 // Register holding maximum rowid if (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0) && @@ -105265,7 +105491,7 @@ func autoIncBegin(tls *libc.TLS, pParse uintptr, iDb int32, pTab uintptr) int32 // This routine generates code that will initialize all of the // register used by the autoincrement tracker. -func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:124432:21: */ +func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:124461:21: */ var p uintptr // Information about an AUTOINCREMENT var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var pDb uintptr // Database only autoinc table @@ -105305,7 +105531,7 @@ func Xsqlite3AutoincrementBegin(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:12 } } -var iLn1 int32 = 0 /* sqlite3.c:124446:22 */ +var iLn1 int32 = 0 /* sqlite3.c:124475:22 */ var autoInc = [12]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_Null)}, /* 1 */ {Fopcode: U8(OP_Rewind), Fp2: int8(10)}, @@ -105319,7 +105545,7 @@ var autoInc = [12]VdbeOpList{ /* 9 */ {Fopcode: U8(OP_Next), Fp2: int8(2)}, /* 10 */ {Fopcode: U8(OP_Integer)}, /* 11 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:124447:29 */ +} /* sqlite3.c:124476:29 */ // Update the maximum rowid for an autoincrement calculation. // @@ -105327,7 +105553,7 @@ var autoInc = [12]VdbeOpList{ // new rowid that is about to be inserted. If that new rowid is // larger than the maximum rowid in the memId memory cell, then the // memory cell is updated. -func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:124493:13: */ +func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { /* sqlite3.c:124522:13: */ if memId > 0 { Xsqlite3VdbeAddOp2(tls, (*Parse)(unsafe.Pointer(pParse)).FpVdbe, OP_MemMax, memId, regRowid) } @@ -105338,7 +105564,7 @@ func autoIncStep(tls *libc.TLS, pParse uintptr, memId int32, regRowid int32) { / // Every statement that might do an INSERT into an autoincrement // table (either directly or through triggers) needs to call this // routine just before the "exit" code. -func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:124506:29: */ +func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:124535:29: */ var p uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -105369,16 +105595,16 @@ func autoIncrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:124506:29: * } } -var iLn2 int32 = 0 /* sqlite3.c:124513:22 */ +var iLn2 int32 = 0 /* sqlite3.c:124542:22 */ var autoIncEnd = [5]VdbeOpList{ /* 0 */ {Fopcode: U8(OP_NotNull), Fp2: int8(2)}, /* 1 */ {Fopcode: U8(OP_NewRowid)}, /* 2 */ {Fopcode: U8(OP_MakeRecord), Fp2: int8(2)}, /* 3 */ {Fopcode: U8(OP_Insert)}, /* 4 */ {Fopcode: U8(OP_Close)}, -} /* sqlite3.c:124514:29 */ +} /* sqlite3.c:124543:29 */ -func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:124543:21: */ +func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:124572:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpAinc != 0 { autoIncrementEnd(tls, pParse) } @@ -105479,7 +105705,7 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1245 // transfer values form intermediate table into <table> // end loop // D: cleanup -func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:124662:21: */ +func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:124691:21: */ bp := tls.Alloc(148) defer tls.Free(148) @@ -105615,7 +105841,7 @@ __4: // Figure out if we have any triggers and if the table being // inserted into is a view - pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_INSERT, uintptr(0), bp+72 /* &tmask */) + pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_INSERT, uintptr(0), bp+72) isView = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) // If pTab is really a view, make sure it has been initialized. @@ -105749,7 +105975,7 @@ __23: goto __24 } Xsqlite3ErrorMsg(tls, pParse, - ts+15351, /* "cannot INSERT in..." */ + ts+15524, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto insert_cleanup __24: @@ -105774,7 +106000,7 @@ __20: bIdListInOrder = U8(0) goto __27 __26: - Xsqlite3ErrorMsg(tls, pParse, ts+15392, /* "table %S has no ..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+15565, libc.VaList(bp+8, pTabList+8, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*8)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup @@ -105803,7 +106029,7 @@ __11: regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) addrTop = Xsqlite3VdbeCurrentAddr(tls, v) + 1 Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, addrTop) - Xsqlite3SelectDestInit(tls, bp+76 /* &dest */, SRT_Coroutine, regYield) + Xsqlite3SelectDestInit(tls, bp+76, SRT_Coroutine, regYield) (*SelectDest)(unsafe.Pointer(bp + 76 /* &dest */)).FiSdst = func() int32 { if bIdListInOrder != 0 { return regData @@ -105811,7 +106037,7 @@ __11: return 0 }() (*SelectDest)(unsafe.Pointer(bp + 76 /* &dest */)).FnSdst = int32((*Table)(unsafe.Pointer(pTab)).FnCol) - rc = Xsqlite3Select(tls, pParse, pSelect, bp+76 /* &dest */) + rc = Xsqlite3Select(tls, pParse, pSelect, bp+76) regFromSelect = (*SelectDest)(unsafe.Pointer(bp + 76 /* &dest */)).FiSdst if !(rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 || (*Parse)(unsafe.Pointer(pParse)).FnErr != 0) { goto __30 @@ -105859,7 +106085,7 @@ __32: ; goto __29 __28: - libc.Xmemset(tls, bp+104 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+104, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 104 /* &sNC */)).FpParse = pParse srcTab = -1 @@ -105944,7 +106170,7 @@ __42: goto __47 } Xsqlite3ErrorMsg(tls, pParse, - ts+15424, /* "table %S has %d ..." */ + ts+15597, libc.VaList(bp+24, pTabList+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden, nColumn)) goto insert_cleanup __47: @@ -105954,7 +106180,7 @@ __36: if !(pColumn != uintptr(0) && nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15476 /* "%d values for %d..." */, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15649, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -105976,7 +106202,7 @@ __49: goto __50 } nIdx = Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(0), -1, uintptr(0), - bp+136 /* &iDataCur */, bp+140 /* &iIdxCur */) + bp+136, bp+140) aRegIdx = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(int32(0)))*uint32(nIdx+2))) if !(aRegIdx == uintptr(0)) { goto __51 @@ -106010,7 +106236,7 @@ __50: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __56 } - Xsqlite3ErrorMsg(tls, pParse, ts+15501, /* "UPSERT not imple..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+15674, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: @@ -106018,7 +106244,7 @@ __56: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) { goto __57 } - Xsqlite3ErrorMsg(tls, pParse, ts+15547 /* "cannot UPSERT a ..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+15720, 0) goto insert_cleanup __57: ; @@ -106428,7 +106654,7 @@ __115: *(*int32)(unsafe.Pointer(bp + 144 /* isReplace */)) = 0 // True to use OPFLAG_SEEKRESULT Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 136 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 140 /* iIdxCur */)), - regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+144 /* &isReplace */, uintptr(0), pUpsert) + regIns, 0, uint8(libc.Bool32(ipkColumn >= 0)), uint8(onError), endOfLoop, bp+144, uintptr(0), pUpsert) Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) // Set the OPFLAG_USESEEKRESULT flag if either (a) there are no REPLACE @@ -106504,7 +106730,7 @@ __122: } Xsqlite3VdbeAddOp2(tls, v, OP_ChngCntRow, regRowCount, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+15568 /* "rows inserted" */, uintptr(0)) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+15741, uintptr(0)) __123: ; @@ -106528,7 +106754,7 @@ insert_cleanup: // Set bit 0x01 of pWalker->eCode if pWalker->eCode to 0 and if this // expression node references any of the // columns that are being modifed by an UPDATE statement. -func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125415:12: */ +func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:125444:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { if int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) >= 0 { @@ -106555,19 +106781,19 @@ func checkConstraintExprNode(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // The operation of this routine is the same - return true if an only if // the expression uses one or more of columns identified by the second and // third arguments. -func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:125444:20: */ +func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng uintptr, chngRowid int32) int32 { /* sqlite3.c:125473:20: */ bp := tls.Alloc(28) defer tls.Free(28) // var w Walker at bp, 28 - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{checkConstraintExprNode})) *(*uintptr)(unsafe.Pointer(bp + 24)) = aiChng - Xsqlite3WalkExpr(tls, bp /* &w */, pExpr) + Xsqlite3WalkExpr(tls, bp, pExpr) if !(chngRowid != 0) { *(*U16)(unsafe.Pointer(bp + 20)) &= libc.Uint16FromInt32(libc.CplInt32(CKCNSTRNT_ROWID)) @@ -106588,7 +106814,7 @@ func Xsqlite3ExprReferencesUpdatedColumn(tls *libc.TLS, pExpr uintptr, aiChng ui type IndexListTerm1 = struct { Fp uintptr Fix int32 -} /* sqlite3.c:125477:9 */ +} /* sqlite3.c:125506:9 */ // The sqlite3GenerateConstraintChecks() routine usually wants to visit // the indexes of a table in the order provided in the Table->pIndex list. @@ -106599,7 +106825,7 @@ type IndexListTerm1 = struct { // The IndexIterator object is used to walk through all of the indexes // of a table in either Index.pNext order, or in some other order established // by an array of IndexListTerm objects. -type IndexListTerm = IndexListTerm1 /* sqlite3.c:125477:30 */ +type IndexListTerm = IndexListTerm1 /* sqlite3.c:125506:30 */ type IndexIterator1 = struct { FeType int32 Fi int32 @@ -106607,12 +106833,12 @@ type IndexIterator1 = struct { Flx struct{ FpIdx uintptr } F__ccgo_pad1 [4]byte } -} /* sqlite3.c:125478:9 */ +} /* sqlite3.c:125507:9 */ -type IndexIterator = IndexIterator1 /* sqlite3.c:125478:30 */ +type IndexIterator = IndexIterator1 /* sqlite3.c:125507:30 */ // Return the first index on the list -func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:125502:14: */ +func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:125531:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { *(*int32)(unsafe.Pointer(pIx)) = (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pIter + 8 + 4 /* &.aIdx */)))).Fix @@ -106625,7 +106851,7 @@ func indexIteratorFirst(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* } // Return the next index from the list. Return NULL when out of indexes -func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:125514:14: */ +func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* sqlite3.c:125543:14: */ if (*IndexIterator)(unsafe.Pointer(pIter)).FeType != 0 { var i int32 = libc.PreIncInt32(&(*IndexIterator)(unsafe.Pointer(pIter)).Fi, 1) if i >= *(*int32)(unsafe.Pointer(pIter + 8)) { @@ -106731,7 +106957,7 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // Or if overrideError==OE_Default, then the pParse->onError parameter // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. -func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:125621:21: */ +func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:125650:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -106848,7 +107074,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt fallthrough case OE_Fail: { - var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11899 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, + var zMsg uintptr = Xsqlite3MPrintf(tls, db, ts+11921, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, (*Column)(unsafe.Pointer(pCol)).FzCnName)) Xsqlite3VdbeAddOp3(tls, v, OP_HaltIfNull, SQLITE_CONSTRAINT|int32(5)<<8, onError, iReg) @@ -107059,6 +107285,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt goto __4 goto __6 __6: + } } @@ -107142,7 +107369,8 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // the UNIQUE constraints have run. if onError == OE_Replace && onError != int32(overrideError) && - (*Table)(unsafe.Pointer(pTab)).FpIndex != 0 { + (*Table)(unsafe.Pointer(pTab)).FpIndex != 0 && + !(upsertIpkDelay != 0) { ipkTop = Xsqlite3VdbeAddOp0(tls, v, OP_Goto) + 1 } @@ -107256,7 +107484,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // // This loop also handles the case of the PRIMARY KEY index for a // WITHOUT ROWID table. - for pIdx = indexIteratorFirst(tls, bp+16 /* &sIdxIter */, bp+32 /* &ix */); pIdx != 0; pIdx = indexIteratorNext(tls, bp+16 /* &sIdxIter */, bp+32 /* &ix */) { + for pIdx = indexIteratorFirst(tls, bp+16, bp+32); pIdx != 0; pIdx = indexIteratorNext(tls, bp+16, bp+32) { var regIdx int32 // Range of registers hold conent for pIdx var regR int32 // Range of registers holding conflicting PK var iThisCur int32 // Cursor for this UNIQUE index @@ -107588,7 +107816,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // number is iCur, and register regData contains the new record for the // PK index. This function adds code to invoke the pre-update hook, // if one is registered. -func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:126477:13: */ +func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur int32, regData int32) { /* sqlite3.c:126508:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var r int32 = Xsqlite3GetTempReg(tls, pParse) @@ -107605,7 +107833,7 @@ func codeWithoutRowidPreupdate(tls *libc.TLS, pParse uintptr, pTab uintptr, iCur // // The arguments to this routine should be the same as the first six // arguments to sqlite3GenerateConstraintChecks. -func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:126505:21: */ +func Xsqlite3CompleteInsertion(tls *libc.TLS, pParse uintptr, pTab uintptr, iDataCur int32, iIdxCur int32, regNewData int32, aRegIdx uintptr, update_flags int32, appendBias int32, useSeekResult int32) { /* sqlite3.c:126536:21: */ var v uintptr // Prepared statements under construction var pIdx uintptr // An index being inserted or updated var pik_flags U8 // flag values passed to the btree insert @@ -107637,7 +107865,6 @@ __1: return uint8(0) }() if int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY && !((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) { - pik_flags = U8(int32(pik_flags) | OPFLAG_NCHANGE) pik_flags = U8(int32(pik_flags) | update_flags&OPFLAG_SAVEPOSITION) if update_flags == 0 { @@ -107709,7 +107936,7 @@ __3: // // If pTab is a virtual table, then this routine is a no-op and the // *piDataCur and *piIdxCur values are left uninitialized. -func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:126594:20: */ +func Xsqlite3OpenTableAndIndices(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, p5 U8, iBase int32, aToOpen uintptr, piDataCur uintptr, piIdxCur uintptr) int32 { /* sqlite3.c:126624:20: */ var i int32 var iDb int32 var iDataCur int32 @@ -107787,7 +108014,7 @@ __3: // * The same onError processing (OE_Abort, OE_Ignore, etc) // * The same collating sequence on each column // * The index has the exact same WHERE clause -func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:126673:12: */ +func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* sqlite3.c:126703:12: */ var i int32 if int32((*Index)(unsafe.Pointer(pDest)).FnKeyCol) != int32((*Index)(unsafe.Pointer(pSrc)).FnKeyCol) || int32((*Index)(unsafe.Pointer(pDest)).FnColumn) != int32((*Index)(unsafe.Pointer(pSrc)).FnColumn) { @@ -107845,7 +108072,7 @@ func xferCompatibleIndex(tls *libc.TLS, pDest uintptr, pSrc uintptr) int32 { /* // is no chance that the xfer optimization can be applied. // // This optimization is particularly useful at making VACUUM run faster. -func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:126734:12: */ +func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uintptr, onError int32, iDbDest int32) int32 { /* sqlite3.c:126764:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pEList uintptr // The result set of the SELECT var pSrc uintptr // The table in the FROM clause of SELECT @@ -108231,7 +108458,7 @@ func xferOptimization(tls *libc.TLS, pParse uintptr, pDest uintptr, pSelect uint // the xCallback() function is called. pArg becomes the first // argument to xCallback(). If xCallback=NULL then no callback // is invoked, even for queries. -func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:127150:16: */ +func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_callback, pArg uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:127180:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -108252,13 +108479,13 @@ func Xsqlite3_exec(tls *libc.TLS, db uintptr, zSql uintptr, xCallback Sqlite3_ca if !!(Xsqlite3SafetyCheckOk(tls, db) != 0) { goto __1 } - return Xsqlite3MisuseError(tls, 127163) + return Xsqlite3MisuseError(tls, 127193) __1: ; if !(zSql == uintptr(0)) { goto __2 } - zSql = ts + 1543 /* "" */ + zSql = ts + 1565 /* "" */ __2: ; @@ -108272,7 +108499,7 @@ __3: azVals = uintptr(0) *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp /* &pStmt */, bp+4 /* &zLeftover */) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp, bp+4) if !(rc != SQLITE_OK) { goto __5 @@ -108441,7 +108668,7 @@ __26: // This is the function signature used for all extension entry points. It // is also defined in the file "loadext.c". -type Sqlite3_loadext_entry = uintptr /* sqlite3.c:127637:13 */ +type Sqlite3_loadext_entry = uintptr /* sqlite3.c:127667:13 */ // The following macros redefine the API routines so that they are // redirected through the global sqlite3_api structure. @@ -108768,7 +108995,7 @@ var sqlite3Apis = Sqlite3_api_routines{ Ftotal_changes64: 0, // Version 3.37.0 and later Fautovacuum_pages: 0, -} /* sqlite3.c:128076:35 */ +} /* sqlite3.c:128106:35 */ // True if x is the directory separator character @@ -108782,7 +109009,7 @@ var sqlite3Apis = Sqlite3_api_routines{ // If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). -func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128453:12: */ +func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128483:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -108826,7 +109053,7 @@ __1: if !(pzErrMsg != 0) { goto __3 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11938 /* "not authorized" */, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+11960, 0) __3: ; return SQLITE_ERROR @@ -108836,7 +109063,7 @@ __2: if zProc != 0 { zEntry = zProc } else { - zEntry = ts + 15582 /* "sqlite3_extensio..." */ + zEntry = ts + 15755 /* "sqlite3_extensio..." */ } // tag-20210611-1. Some dlopen() implementations will segfault if given @@ -108856,7 +109083,7 @@ __5: if !(ii < int32(uint32(unsafe.Sizeof(azEndings))/uint32(unsafe.Sizeof(uintptr(0)))) && handle == uintptr(0)) { goto __7 } - zAltFile = Xsqlite3_mprintf(tls, ts+11899 /* "%s.%s" */, libc.VaList(bp, zFile, azEndings[ii])) + zAltFile = Xsqlite3_mprintf(tls, ts+11921, libc.VaList(bp, zFile, azEndings[ii])) if !(zAltFile == uintptr(0)) { goto __8 } @@ -108902,7 +109129,7 @@ __9: return SQLITE_NOMEM __11: ; - libc.Xmemcpy(tls, zAltEntry, ts+15605 /* "sqlite3_" */, uint32(8)) + libc.Xmemcpy(tls, zAltEntry, ts+15778, uint32(8)) iFile = ncFile - 1 __12: if !(iFile >= 0 && !(int32(*(*int8)(unsafe.Pointer(zFile + uintptr(iFile)))) == '/')) { @@ -108916,7 +109143,7 @@ __13: __14: ; iFile++ - if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15614, 3) == 0) { + if !(Xsqlite3_strnicmp(tls, zFile+uintptr(iFile), ts+15787, 3) == 0) { goto __15 } iFile = iFile + 3 @@ -108940,7 +109167,7 @@ __17: goto __18 __18: ; - libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15618 /* "_init" */, uint32(6)) + libc.Xmemcpy(tls, zAltEntry+uintptr(iEntry), ts+15791, uint32(6)) zEntry = zAltEntry xInit = Xsqlite3OsDlSym(tls, pVfs, handle, zEntry) __10: @@ -108958,7 +109185,7 @@ __10: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15624 /* "no entry point [..." */, libc.VaList(bp+16, zEntry, zFile)) + ts+15797, libc.VaList(bp+16, zEntry, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; @@ -108985,7 +109212,7 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15667 /* "error during ini..." */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15840, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) @@ -109025,7 +109252,7 @@ extension_not_found: } // zErrmsg would be NULL if not so Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), - ts+15699 /* "unable to open s..." */, libc.VaList(bp+40, FILENAME_MAX, zFile)) + ts+15872, libc.VaList(bp+40, FILENAME_MAX, zFile)) Xsqlite3OsDlError(tls, pVfs, int32(nMsg-uint64(1)), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; @@ -109035,10 +109262,10 @@ __28: } var azEndings = [1]uintptr{ - ts + 15736, /* "so" */ -} /* sqlite3.c:128471:21 */ + ts + 15909, +} /* sqlite3.c:128501:21 */ -func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128604:16: */ +func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:128634:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) rc = sqlite3LoadExtension(tls, db, zFile, zProc, pzErrMsg) @@ -109049,7 +109276,7 @@ func Xsqlite3_load_extension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uin // Call this routine when the database connection is closing in order // to clean up loaded extensions -func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:128622:21: */ +func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:128652:21: */ var i int32 for i = 0; i < (*Sqlite3)(unsafe.Pointer(db)).FnExtension; i++ { @@ -109060,7 +109287,7 @@ func Xsqlite3CloseExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:128622:21 // Enable or disable extension loading. Extension loading is disabled by // default so as not to open security holes in older applications. -func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:128635:16: */ +func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:128665:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if onoff != 0 { *(*U64)(unsafe.Pointer(db + 28)) |= uint64(SQLITE_LoadExtension | SQLITE_LoadExtFunc) @@ -109079,15 +109306,15 @@ func Xsqlite3_enable_load_extension(tls *libc.TLS, db uintptr, onoff int32) int3 type sqlite3AutoExtList = struct { FnExt U32 FaExt uintptr -} /* sqlite3.c:128655:9 */ +} /* sqlite3.c:128685:9 */ // The following object holds the list of automatically loaded // extensions. // // This list is shared across threads. The SQLITE_MUTEX_STATIC_MAIN // mutex must be held while accessing this list. -type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:128655:35 */ -var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:128659:3 */ +type Sqlite3AutoExtList = sqlite3AutoExtList /* sqlite3.c:128685:35 */ +var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:128689:3 */ // The "wsdAutoext" macro will resolve to the autoextension // state vector. If writable static data is unsupported on the target, @@ -109097,7 +109324,7 @@ var sqlite3Autoext = sqlite3AutoExtList{} /* sqlite3.c:128659:3 */ // Register a statically linked extension that is automatically // loaded by every new database connection. -func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:128681:16: */ +func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:128711:16: */ var rc int32 = SQLITE_OK rc = Xsqlite3_initialize(tls) if rc != 0 { @@ -109138,7 +109365,7 @@ func Xsqlite3_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c: // // Return 1 if xInit was found on the list and removed. Return 0 if xInit // was not on the list. -func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:128728:16: */ +func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sqlite3.c:128758:16: */ var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var i int32 var n int32 = 0 @@ -109157,7 +109384,7 @@ func Xsqlite3_cancel_auto_extension(tls *libc.TLS, xInit uintptr) int32 { /* sql } // Reset the automatic extension loading mechanism. -func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:128753:17: */ +func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:128783:17: */ if Xsqlite3_initialize(tls) == SQLITE_OK { var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) @@ -109172,7 +109399,7 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:128753:17: */ // Load all automatic extensions. // // If anything goes wrong, set an error in the database connection. -func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:128775:21: */ +func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:128805:21: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -109203,7 +109430,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:128775 f func(*libc.TLS, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xInit})).f(tls, db, bp+8, pThunk)) != 0 { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15739 /* "automatic extens..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) + ts+15912, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) @@ -109248,68 +109475,68 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:128775 // or that return single-column results where the name of the // result column is different from the name of the pragma var pragCName = [57]uintptr{ - /* 0 */ ts + 4977, /* "id" */ // Used by: foreign_key_list - /* 1 */ ts + 15778, /* "seq" */ - /* 2 */ ts + 8739, /* "table" */ - /* 3 */ ts + 15782, /* "from" */ - /* 4 */ ts + 15787, /* "to" */ - /* 5 */ ts + 15790, /* "on_update" */ - /* 6 */ ts + 15800, /* "on_delete" */ - /* 7 */ ts + 15810, /* "match" */ - /* 8 */ ts + 15816, /* "cid" */ // Used by: table_xinfo - /* 9 */ ts + 15820, /* "name" */ - /* 10 */ ts + 15825, /* "type" */ - /* 11 */ ts + 15830, /* "notnull" */ - /* 12 */ ts + 15838, /* "dflt_value" */ - /* 13 */ ts + 15849, /* "pk" */ - /* 14 */ ts + 15852, /* "hidden" */ - // table_info reuses 8 - /* 15 */ ts + 15859, /* "schema" */ // Used by: table_list - /* 16 */ ts + 15820, /* "name" */ - /* 17 */ ts + 15825, /* "type" */ - /* 18 */ ts + 15866, /* "ncol" */ - /* 19 */ ts + 15871, /* "wr" */ - /* 20 */ ts + 15874, /* "strict" */ - /* 21 */ ts + 15881, /* "seqno" */ // Used by: index_xinfo - /* 22 */ ts + 15816, /* "cid" */ - /* 23 */ ts + 15820, /* "name" */ - /* 24 */ ts + 15887, /* "desc" */ - /* 25 */ ts + 15892, /* "coll" */ - /* 26 */ ts + 15897, /* "key" */ - /* 27 */ ts + 15820, /* "name" */ // Used by: function_list - /* 28 */ ts + 15901, /* "builtin" */ - /* 29 */ ts + 15825, /* "type" */ - /* 30 */ ts + 15909, /* "enc" */ - /* 31 */ ts + 15913, /* "narg" */ - /* 32 */ ts + 15918, /* "flags" */ - /* 33 */ ts + 11330, /* "tbl" */ // Used by: stats - /* 34 */ ts + 11326, /* "idx" */ - /* 35 */ ts + 15924, /* "wdth" */ - /* 36 */ ts + 15929, /* "hght" */ - /* 37 */ ts + 15934, /* "flgs" */ - /* 38 */ ts + 15778, /* "seq" */ // Used by: index_list - /* 39 */ ts + 15820, /* "name" */ - /* 40 */ ts + 15939, /* "unique" */ - /* 41 */ ts + 15946, /* "origin" */ - /* 42 */ ts + 15953, /* "partial" */ - /* 43 */ ts + 8739, /* "table" */ // Used by: foreign_key_check - /* 44 */ ts + 15961, /* "rowid" */ - /* 45 */ ts + 4980, /* "parent" */ - /* 46 */ ts + 15967, /* "fkid" */ - // index_info reuses 21 - /* 47 */ ts + 15778, /* "seq" */ // Used by: database_list - /* 48 */ ts + 15820, /* "name" */ - /* 49 */ ts + 15972, /* "file" */ - /* 50 */ ts + 15977, /* "busy" */ // Used by: wal_checkpoint - /* 51 */ ts + 15982, /* "log" */ - /* 52 */ ts + 15986, /* "checkpointed" */ - // collation_list reuses 38 - /* 53 */ ts + 15999, /* "database" */ // Used by: lock_status - /* 54 */ ts + 16008, /* "status" */ - /* 55 */ ts + 16015, /* "cache_size" */ // Used by: default_cache_size - // module_list pragma_list reuses 9 - /* 56 */ ts + 16026, /* "timeout" */ // Used by: busy_timeout -} /* sqlite3.c:128916:19 */ + ts + 4999, + ts + 15951, + ts + 8761, + ts + 15955, + ts + 15960, + ts + 15963, + ts + 15973, + ts + 15983, + ts + 15989, + ts + 15993, + ts + 15998, + ts + 16003, + ts + 16011, + ts + 16022, + ts + 16025, + + ts + 16032, + ts + 15993, + ts + 15998, + ts + 16039, + ts + 16044, + ts + 16047, + ts + 16054, + ts + 15989, + ts + 15993, + ts + 16060, + ts + 16065, + ts + 16070, + ts + 15993, + ts + 16074, + ts + 15998, + ts + 16082, + ts + 16086, + ts + 16091, + ts + 11352, + ts + 11348, + ts + 16097, + ts + 16102, + ts + 16107, + ts + 15951, + ts + 15993, + ts + 16112, + ts + 16119, + ts + 16126, + ts + 8761, + ts + 16134, + ts + 5002, + ts + 16140, + + ts + 15951, + ts + 15993, + ts + 16145, + ts + 16150, + ts + 15347, + ts + 16155, + + ts + 16168, + ts + 16177, + ts + 16184, + + ts + 16195, +} /* sqlite3.c:128946:19 */ // Definitions of all built-in pragmas type PragmaName1 = struct { @@ -109319,247 +109546,247 @@ type PragmaName1 = struct { FiPragCName U8 FnPragCName U8 FiArg U64 -} /* sqlite3.c:128981:9 */ +} /* sqlite3.c:129011:9 */ // Definitions of all built-in pragmas -type PragmaName = PragmaName1 /* sqlite3.c:128988:3 */ +type PragmaName = PragmaName1 /* sqlite3.c:129018:3 */ var aPragmaName = [66]PragmaName{ - { /* zName: */ FzName: ts + 16034, /* "analysis_limit" */ + { /* zName: */ FzName: ts + 16203, /* ePragTyp: */ FePragTyp: U8(PragTyp_ANALYSIS_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16049, /* "application_id" */ + { /* zName: */ FzName: ts + 16218, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_APPLICATION_ID)}, - { /* zName: */ FzName: ts + 16064, /* "auto_vacuum" */ + { /* zName: */ FzName: ts + 16233, /* ePragTyp: */ FePragTyp: U8(PragTyp_AUTO_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16076, /* "automatic_index" */ + { /* zName: */ FzName: ts + 16245, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_AutoIndex)}, - { /* zName: */ FzName: ts + 16092, /* "busy_timeout" */ + { /* zName: */ FzName: ts + 16261, /* ePragTyp: */ FePragTyp: U8(PragTyp_BUSY_TIMEOUT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(56), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16015, /* "cache_size" */ + { /* zName: */ FzName: ts + 16184, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16105, /* "cache_spill" */ + { /* zName: */ FzName: ts + 16274, /* ePragTyp: */ FePragTyp: U8(PragTyp_CACHE_SPILL), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16117, /* "case_sensitive_l..." */ + { /* zName: */ FzName: ts + 16286, /* ePragTyp: */ FePragTyp: U8(PragTyp_CASE_SENSITIVE_LIKE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16137, /* "cell_size_check" */ + { /* zName: */ FzName: ts + 16306, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CellSizeCk)}, - { /* zName: */ FzName: ts + 16153, /* "checkpoint_fullf..." */ + { /* zName: */ FzName: ts + 16322, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_CkptFullFSync)}, - { /* zName: */ FzName: ts + 16174, /* "collation_list" */ + { /* zName: */ FzName: ts + 16343, /* ePragTyp: */ FePragTyp: U8(PragTyp_COLLATION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(2)}, - { /* zName: */ FzName: ts + 16189, /* "compile_options" */ + { /* zName: */ FzName: ts + 16358, /* ePragTyp: */ FePragTyp: U8(PragTyp_COMPILE_OPTIONS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16205, /* "count_changes" */ + { /* zName: */ FzName: ts + 16374, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: U64(uint64(0x00001)) << 32}, - { /* zName: */ FzName: ts + 16219, /* "data_version" */ + { /* zName: */ FzName: ts + 16388, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_DATA_VERSION)}, - { /* zName: */ FzName: ts + 16232, /* "database_list" */ + { /* zName: */ FzName: ts + 16401, /* ePragTyp: */ FePragTyp: U8(PragTyp_DATABASE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0), /* ColNames: */ FiPragCName: U8(47), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16246, /* "default_cache_si..." */ + { /* zName: */ FzName: ts + 16415, /* ePragTyp: */ FePragTyp: U8(PragTyp_DEFAULT_CACHE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1), /* ColNames: */ FiPragCName: U8(55), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16265, /* "defer_foreign_ke..." */ + { /* zName: */ FzName: ts + 16434, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_DeferFKs)}, - { /* zName: */ FzName: ts + 16284, /* "empty_result_cal..." */ + { /* zName: */ FzName: ts + 16453, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_NullCallback)}, - { /* zName: */ FzName: ts + 16307, /* "encoding" */ + { /* zName: */ FzName: ts + 16476, /* ePragTyp: */ FePragTyp: U8(PragTyp_ENCODING), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16316, /* "foreign_key_chec..." */ + { /* zName: */ FzName: ts + 16485, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(43), FnPragCName: U8(4)}, - { /* zName: */ FzName: ts + 16334, /* "foreign_key_list" */ + { /* zName: */ FzName: ts + 16503, /* ePragTyp: */ FePragTyp: U8(PragTyp_FOREIGN_KEY_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), FnPragCName: U8(8)}, - { /* zName: */ FzName: ts + 16351, /* "foreign_keys" */ + { /* zName: */ FzName: ts + 16520, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ForeignKeys)}, - { /* zName: */ FzName: ts + 16364, /* "freelist_count" */ + { /* zName: */ FzName: ts + 16533, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_ReadOnly | PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16379, /* "full_column_name..." */ + { /* zName: */ FzName: ts + 16548, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullColNames)}, - { /* zName: */ FzName: ts + 16397, /* "fullfsync" */ + { /* zName: */ FzName: ts + 16566, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_FullFSync)}, - { /* zName: */ FzName: ts + 16407, /* "function_list" */ + { /* zName: */ FzName: ts + 16576, /* ePragTyp: */ FePragTyp: U8(PragTyp_FUNCTION_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(27), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16421, /* "hard_heap_limit" */ + { /* zName: */ FzName: ts + 16590, /* ePragTyp: */ FePragTyp: U8(PragTyp_HARD_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16437, /* "ignore_check_con..." */ + { /* zName: */ FzName: ts + 16606, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_IgnoreChecks)}, - { /* zName: */ FzName: ts + 16462, /* "incremental_vacu..." */ + { /* zName: */ FzName: ts + 16631, /* ePragTyp: */ FePragTyp: U8(PragTyp_INCREMENTAL_VACUUM), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16481, /* "index_info" */ + { /* zName: */ FzName: ts + 16650, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16492, /* "index_list" */ + { /* zName: */ FzName: ts + 16661, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(38), FnPragCName: U8(5)}, - { /* zName: */ FzName: ts + 16503, /* "index_xinfo" */ + { /* zName: */ FzName: ts + 16672, /* ePragTyp: */ FePragTyp: U8(PragTyp_INDEX_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(21), FnPragCName: U8(6), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16515, /* "integrity_check" */ + { /* zName: */ FzName: ts + 16684, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16531, /* "journal_mode" */ + { /* zName: */ FzName: ts + 16700, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16544, /* "journal_size_lim..." */ + { /* zName: */ FzName: ts + 16713, /* ePragTyp: */ FePragTyp: U8(PragTyp_JOURNAL_SIZE_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16563, /* "legacy_alter_tab..." */ + { /* zName: */ FzName: ts + 16732, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_LegacyAlter)}, - { /* zName: */ FzName: ts + 16582, /* "locking_mode" */ + { /* zName: */ FzName: ts + 16751, /* ePragTyp: */ FePragTyp: U8(PragTyp_LOCKING_MODE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16595, /* "max_page_count" */ + { /* zName: */ FzName: ts + 16764, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16610, /* "mmap_size" */ + { /* zName: */ FzName: ts + 16779, /* ePragTyp: */ FePragTyp: U8(PragTyp_MMAP_SIZE)}, - { /* zName: */ FzName: ts + 16620, /* "module_list" */ + { /* zName: */ FzName: ts + 16789, /* ePragTyp: */ FePragTyp: U8(PragTyp_MODULE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16632, /* "optimize" */ + { /* zName: */ FzName: ts + 16801, /* ePragTyp: */ FePragTyp: U8(PragTyp_OPTIMIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result1 | PragFlg_NeedSchema)}, - { /* zName: */ FzName: ts + 16641, /* "page_count" */ + { /* zName: */ FzName: ts + 16810, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_COUNT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq)}, - { /* zName: */ FzName: ts + 16652, /* "page_size" */ + { /* zName: */ FzName: ts + 16821, /* ePragTyp: */ FePragTyp: U8(PragTyp_PAGE_SIZE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16662, /* "pragma_list" */ + { /* zName: */ FzName: ts + 16831, /* ePragTyp: */ FePragTyp: U8(PragTyp_PRAGMA_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0), /* ColNames: */ FiPragCName: U8(9), FnPragCName: U8(1)}, - { /* zName: */ FzName: ts + 16674, /* "query_only" */ + { /* zName: */ FzName: ts + 16843, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_QueryOnly)}, - { /* zName: */ FzName: ts + 16685, /* "quick_check" */ + { /* zName: */ FzName: ts + 16854, /* ePragTyp: */ FePragTyp: U8(PragTyp_INTEGRITY_CHECK), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_Result1 | PragFlg_SchemaOpt)}, - { /* zName: */ FzName: ts + 16697, /* "read_uncommitted" */ + { /* zName: */ FzName: ts + 16866, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReadUncommit)}, - { /* zName: */ FzName: ts + 16714, /* "recursive_trigge..." */ + { /* zName: */ FzName: ts + 16883, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_RecTriggers)}, - { /* zName: */ FzName: ts + 16733, /* "reverse_unordere..." */ + { /* zName: */ FzName: ts + 16902, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ReverseOrder)}, - { /* zName: */ FzName: ts + 16759, /* "schema_version" */ + { /* zName: */ FzName: ts + 16928, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_SCHEMA_VERSION)}, - { /* zName: */ FzName: ts + 16774, /* "secure_delete" */ + { /* zName: */ FzName: ts + 16943, /* ePragTyp: */ FePragTyp: U8(PragTyp_SECURE_DELETE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16788, /* "short_column_nam..." */ + { /* zName: */ FzName: ts + 16957, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_ShortColNames)}, - { /* zName: */ FzName: ts + 16807, /* "shrink_memory" */ + { /* zName: */ FzName: ts + 16976, /* ePragTyp: */ FePragTyp: U8(PragTyp_SHRINK_MEMORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns)}, - { /* zName: */ FzName: ts + 16821, /* "soft_heap_limit" */ + { /* zName: */ FzName: ts + 16990, /* ePragTyp: */ FePragTyp: U8(PragTyp_SOFT_HEAP_LIMIT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16837, /* "synchronous" */ + { /* zName: */ FzName: ts + 17006, /* ePragTyp: */ FePragTyp: U8(PragTyp_SYNCHRONOUS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result0 | PragFlg_SchemaReq | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16849, /* "table_info" */ + { /* zName: */ FzName: ts + 17018, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16860, /* "table_list" */ + { /* zName: */ FzName: ts + 17029, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_LIST), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1), /* ColNames: */ FiPragCName: U8(15), FnPragCName: U8(6)}, - { /* zName: */ FzName: ts + 16871, /* "table_xinfo" */ + { /* zName: */ FzName: ts + 17040, /* ePragTyp: */ FePragTyp: U8(PragTyp_TABLE_INFO), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema | PragFlg_Result1 | PragFlg_SchemaOpt), /* ColNames: */ FiPragCName: U8(8), FnPragCName: U8(7), /* iArg: */ FiArg: uint64(1)}, - { /* zName: */ FzName: ts + 16883, /* "temp_store" */ + { /* zName: */ FzName: ts + 17052, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16894, /* "temp_store_direc..." */ + { /* zName: */ FzName: ts + 17063, /* ePragTyp: */ FePragTyp: U8(PragTyp_TEMP_STORE_DIRECTORY), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1)}, - { /* zName: */ FzName: ts + 16915, /* "threads" */ + { /* zName: */ FzName: ts + 17084, /* ePragTyp: */ FePragTyp: U8(PragTyp_THREADS), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0)}, - { /* zName: */ FzName: ts + 16923, /* "trusted_schema" */ + { /* zName: */ FzName: ts + 17092, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_TrustedSchema)}, - { /* zName: */ FzName: ts + 16938, /* "user_version" */ + { /* zName: */ FzName: ts + 17107, /* ePragTyp: */ FePragTyp: U8(PragTyp_HEADER_VALUE), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NoColumns1 | PragFlg_Result0), /* iArg: */ FiArg: uint64(BTREE_USER_VERSION)}, - { /* zName: */ FzName: ts + 16951, /* "wal_autocheckpoi..." */ + { /* zName: */ FzName: ts + 17120, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_AUTOCHECKPOINT)}, - { /* zName: */ FzName: ts + 16970, /* "wal_checkpoint" */ + { /* zName: */ FzName: ts + 17139, /* ePragTyp: */ FePragTyp: U8(PragTyp_WAL_CHECKPOINT), /* ePragFlg: */ FmPragFlg: U8(PragFlg_NeedSchema), /* ColNames: */ FiPragCName: U8(50), FnPragCName: U8(3)}, - { /* zName: */ FzName: ts + 16985, /* "writable_schema" */ + { /* zName: */ FzName: ts + 17154, /* ePragTyp: */ FePragTyp: U8(PragTyp_FLAG), /* ePragFlg: */ FmPragFlg: U8(PragFlg_Result0 | PragFlg_NoColumns1), /* iArg: */ FiArg: uint64(SQLITE_WriteSchema | SQLITE_NoSchemaError)}, -} /* sqlite3.c:128989:25 */ +} /* sqlite3.c:129019:25 */ // Number of pragmas: 68 on by default, 78 total. @@ -109575,7 +109802,7 @@ var aPragmaName = [66]PragmaName{ // should be passed into sqlite3BtreeSetSafetyLevel(). The is done // to support legacy SQL code. The safety level used to be boolean // and older scripts may have used numbers 0 for OFF and 1 for ON. -func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:129523:11: */ +func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* sqlite3.c:129553:11: */ // on no off false yes true extra full var i int32 var n int32 @@ -109592,13 +109819,13 @@ func getSafetyLevel(tls *libc.TLS, z uintptr, omitFull int32, dflt U8) U8 { /* s return dflt } -var zText = *(*[25]int8)(unsafe.Pointer(ts + 17001 /* "onoffalseyestrue..." */)) /* sqlite3.c:129525:21 */ -var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:129526:19 */ -var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:129527:19 */ -var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:129528:19 */ +var zText = *(*[25]int8)(unsafe.Pointer(ts + 17170)) /* sqlite3.c:129555:21 */ +var iOffset = [8]U8{U8(0), U8(1), U8(2), U8(4), U8(9), U8(12), U8(15), U8(20)} /* sqlite3.c:129556:19 */ +var iLength = [8]U8{U8(2), U8(2), U8(3), U8(5), U8(3), U8(4), U8(5), U8(4)} /* sqlite3.c:129557:19 */ +var iValue = [8]U8{U8(1), U8(0), U8(0), U8(0), U8(1), U8(1), U8(3), U8(2)} /* sqlite3.c:129558:19 */ // Interpret the given string as a boolean value. -func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:129548:19: */ +func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:129578:19: */ return U8(libc.Bool32(int32(getSafetyLevel(tls, z, 1, dflt)) != 0)) } @@ -109607,12 +109834,12 @@ func Xsqlite3GetBoolean(tls *libc.TLS, z uintptr, dflt U8) U8 { /* sqlite3.c:129 // the rest of the file if PRAGMAs are omitted from the build. // Interpret the given string as a locking mode value. -func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129561:12: */ +func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129591:12: */ if z != 0 { - if 0 == Xsqlite3StrICmp(tls, z, ts+17026) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17195) { return PAGER_LOCKINGMODE_EXCLUSIVE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17036) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17205) { return PAGER_LOCKINGMODE_NORMAL } } @@ -109623,15 +109850,15 @@ func getLockingMode(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129561:12: */ // // The following strings, "none", "full" and "incremental" are // acceptable, as are their numeric equivalents: 0, 1 and 2 respectively. -func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129576:12: */ +func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129606:12: */ var i int32 - if 0 == Xsqlite3StrICmp(tls, z, ts+7885) { + if 0 == Xsqlite3StrICmp(tls, z, ts+7907) { return BTREE_AUTOVACUUM_NONE } - if 0 == Xsqlite3StrICmp(tls, z, ts+17043) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17212) { return BTREE_AUTOVACUUM_FULL } - if 0 == Xsqlite3StrICmp(tls, z, ts+17048) { + if 0 == Xsqlite3StrICmp(tls, z, ts+17217) { return BTREE_AUTOVACUUM_INCR } i = Xsqlite3Atoi(tls, z) @@ -109646,12 +109873,12 @@ func getAutoVacuum(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129576:12: */ // Interpret the given string as a temp db location. Return 1 for file // backed temporary databases, 2 for the Red-Black tree in memory database // and 0 to use the compile-time default. -func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129592:12: */ +func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129622:12: */ if int32(*(*int8)(unsafe.Pointer(z))) >= '0' && int32(*(*int8)(unsafe.Pointer(z))) <= '2' { return int32(*(*int8)(unsafe.Pointer(z))) - '0' - } else if Xsqlite3StrICmp(tls, z, ts+15972) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+16145) == 0 { return 1 - } else if Xsqlite3StrICmp(tls, z, ts+17060) == 0 { + } else if Xsqlite3StrICmp(tls, z, ts+17229) == 0 { return 2 } else { return 0 @@ -109661,13 +109888,13 @@ func getTempStore(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:129592:12: */ // Invalidate temp storage, either when the temp storage is changed // from default, or when 'file' and the temp_store_directory has changed -func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:129610:12: */ +func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:129640:12: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt != uintptr(0) { if !(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) || Xsqlite3BtreeTxnState(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) != SQLITE_TXN_NONE { Xsqlite3ErrorMsg(tls, pParse, - ts+17067 /* "temporary storag..." */, 0) + ts+17236, 0) return SQLITE_ERROR } Xsqlite3BtreeClose(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpBt) @@ -109680,7 +109907,7 @@ func invalidateTempStorage(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1 // If the TEMP database is open, close it and mark the database schema // as needing reloading. This must be done when using the SQLITE_TEMP_STORE // or DEFAULT_TEMP_STORE pragmas. -func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:129634:12: */ +func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int32 { /* sqlite3.c:129664:12: */ var ts int32 = getTempStore(tls, zStorageType) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == ts { @@ -109694,7 +109921,7 @@ func changeTempStorage(tls *libc.TLS, pParse uintptr, zStorageType uintptr) int3 } // Set result column names for a pragma. -func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:129649:13: */ +func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* sqlite3.c:129679:13: */ var n U8 = (*PragmaName)(unsafe.Pointer(pPragma)).FnPragCName Xsqlite3VdbeSetNumCols(tls, v, func() int32 { if int32(n) == 0 { @@ -109728,17 +109955,17 @@ func setPragmaResultColumnNames(tls *libc.TLS, v uintptr, pPragma uintptr) { /* } // Generate code to return a single integer value. -func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:129668:13: */ +func returnSingleInt(tls *libc.TLS, v uintptr, value I64) { /* sqlite3.c:129698:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = value - Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, 1, 0, bp /* &value */, -14) + Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, 1, 0, bp, -14) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) } // Generate code to return a single text value. -func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:129676:13: */ +func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:129706:13: */ if zValue != 0 { Xsqlite3VdbeLoadString(tls, v, 1, zValue) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 1, 1) @@ -109747,7 +109974,7 @@ func returnSingleText(tls *libc.TLS, v uintptr, zValue uintptr) { /* sqlite3.c:1 // Set the safety_level and pager flags for pager iDb. Or if iDb<0 // set these values for all pagers. -func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:129692:13: */ +func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:129722:13: */ if (*Sqlite3)(unsafe.Pointer(db)).FautoCommit != 0 { var pDb uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaDb var n int32 = (*Sqlite3)(unsafe.Pointer(db)).FnDb @@ -109763,23 +109990,23 @@ func setAllPagerFlags(tls *libc.TLS, db uintptr) { /* sqlite3.c:129692:13: */ } // Return a human-readable name for a constraint resolution action. -func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:129720:19: */ +func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:129750:19: */ var zName uintptr switch int32(action) { case OE_SetNull: - zName = ts + 17129 /* "SET NULL" */ + zName = ts + 17298 /* "SET NULL" */ break case OE_SetDflt: - zName = ts + 17138 /* "SET DEFAULT" */ + zName = ts + 17307 /* "SET DEFAULT" */ break case OE_Cascade: - zName = ts + 17150 /* "CASCADE" */ + zName = ts + 17319 /* "CASCADE" */ break case OE_Restrict: - zName = ts + 17158 /* "RESTRICT" */ + zName = ts + 17327 /* "RESTRICT" */ break default: - zName = ts + 17167 /* "NO ACTION" */ + zName = ts + 17336 /* "NO ACTION" */ break } return zName @@ -109788,7 +110015,7 @@ func actionName(tls *libc.TLS, action U8) uintptr { /* sqlite3.c:129720:19: */ // Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants // defined in pager.h. This function returns the associated lowercase // journal-mode name. -func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:129740:27: */ +func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c:129770:27: */ if eMode == int32(uint32(unsafe.Sizeof(azModeName))/uint32(unsafe.Sizeof(uintptr(0)))) { return uintptr(0) @@ -109797,11 +110024,11 @@ func Xsqlite3JournalModename(tls *libc.TLS, eMode int32) uintptr { /* sqlite3.c: } var azModeName = [6]uintptr{ - ts + 17177 /* "delete" */, ts + 17184 /* "persist" */, ts + 17192 /* "off" */, ts + 17196 /* "truncate" */, ts + 17060 /* "memory" */, ts + 17205, /* "wal" */ -} /* sqlite3.c:129741:15 */ + ts + 17346, ts + 17353, ts + 17361, ts + 17365, ts + 17229, ts + 17374, +} /* sqlite3.c:129771:15 */ // Locate a pragma in the aPragmaName[] array. -func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:129762:25: */ +func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:129792:25: */ var upr int32 var lwr int32 var mid int32 = 0 @@ -109828,7 +110055,7 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:129762:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. -func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:129783:13: */ +func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:129813:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -109843,13 +110070,13 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh continue } if (*FuncDef)(unsafe.Pointer(p)).FxValue != uintptr(0) { - zType = ts + 17209 /* "w" */ + zType = ts + 17378 /* "w" */ } else if (*FuncDef)(unsafe.Pointer(p)).FxFinalize != uintptr(0) { - zType = ts + 17211 /* "a" */ + zType = ts + 17380 /* "a" */ } else { - zType = ts + 7397 /* "s" */ + zType = ts + 7419 /* "s" */ } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17213, /* "sissii" */ + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17382, libc.VaList(bp, (*FuncDef)(unsafe.Pointer(p)).FzName, isBuiltin, zType, azEnc[(*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK)], int32((*FuncDef)(unsafe.Pointer(p)).FnArg), @@ -109857,15 +110084,15 @@ func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, sh } } -var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:129791:22 */ -var azEnc = [4]uintptr{uintptr(0), ts + 17220 /* "utf8" */, ts + 17225 /* "utf16le" */, ts + 17233 /* "utf16be" */} /* sqlite3.c:129798:23 */ +var mask U32 = U32(SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS | SQLITE_FUNC_INTERNAL) /* sqlite3.c:129821:22 */ +var azEnc = [4]uintptr{uintptr(0), ts + 17389, ts + 17394, ts + 17402 /* "utf16be" */} /* sqlite3.c:129828:23 */ // Helper subroutine for PRAGMA integrity_check: // // Generate code to output a single-column result row with a value of the // string held in register 3. Decrement the result count in register 1 // and halt if the maximum number of result rows have been issued. -func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:129835:12: */ +func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:129865:12: */ var addr int32 Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, 3, 1) addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, 1, Xsqlite3VdbeCurrentAddr(tls, v)+2, 1) @@ -109887,7 +110114,7 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1298 // If the left side is "database.id" then pId1 is the database name // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. -func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:129859:21: */ +func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:129889:21: */ bp := tls.Alloc(568) defer tls.Free(568) @@ -110106,7 +110333,7 @@ __1: // Interpret the [schema.] part of the pragma statement. iDb is the // index of the database this pragma is being applied to in db.aDb[]. - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440 /* &pId */) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+440) if !(iDb < 0) { goto __2 } @@ -110134,7 +110361,7 @@ __4: if !(minusFlag != 0) { goto __5 } - zRight = Xsqlite3MPrintf(tls, db, ts+17241 /* "-%T" */, libc.VaList(bp, pValue)) + zRight = Xsqlite3MPrintf(tls, db, ts+17410, libc.VaList(bp, pValue)) goto __6 __5: zRight = Xsqlite3NameFromToken(tls, db, pValue) @@ -110167,19 +110394,19 @@ __7: // second element of the array is the name of the pragma and the third // element is the argument to the pragma or NULL if the pragma has no // argument. - *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */ + 1*4)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */ + 2*4)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */ + 3*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 444)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 444 + 1*4)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 444 + 2*4)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 444 + 3*4)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+444 /* aFcntl */) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+444) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 444)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 444))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) goto pragma_out __8: ; @@ -110189,8 +110416,8 @@ __8: if !(*(*uintptr)(unsafe.Pointer(bp + 444)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3601 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444 /* &aFcntl[0] */))) + Xsqlite3ErrorMsg(tls, pParse, ts+3623, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 444)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 444))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -110777,7 +111004,7 @@ __18: if !(zRight != 0) { goto __63 } - if !(Xsqlite3_stricmp(tls, zRight, ts+17245) == 0) { + if !(Xsqlite3_stricmp(tls, zRight, ts+17414) == 0) { goto __64 } b = 2 @@ -110866,7 +111093,7 @@ __71: // PRAGMA [schema.]locking_mode // PRAGMA [schema.]locking_mode = (normal|exclusive) __20: - zRet = ts + 17036 /* "normal" */ + zRet = ts + 17205 /* "normal" */ eMode = getLockingMode(tls, zRight) if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0) && eMode == -1) { @@ -110907,7 +111134,7 @@ __78: if !(eMode == PAGER_LOCKINGMODE_EXCLUSIVE) { goto __83 } - zRet = ts + 17026 /* "exclusive" */ + zRet = ts + 17195 /* "exclusive" */ __83: ; returnSingleText(tls, v, zRet) @@ -111003,7 +111230,7 @@ __22: if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+468 /* &iLimit */) + Xsqlite3DecOrHexToI64(tls, zRight, bp+468) if !(*(*I64)(unsafe.Pointer(bp + 468)) < int64(-1)) { goto __98 } @@ -111177,7 +111404,7 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+484 /* &sz */) + Xsqlite3DecOrHexToI64(tls, zRight, bp+484) if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 484)) < int64(0)) { goto __112 } @@ -111211,7 +111438,7 @@ __116: __111: ; *(*Sqlite3_int64)(unsafe.Pointer(bp + 484 /* sz */)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+484 /* &sz */) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+484) if !(rc == SQLITE_OK) { goto __118 } @@ -111268,11 +111495,11 @@ __123: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __125 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+492 /* &res */) + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+492) if !(rc != SQLITE_OK || *(*int32)(unsafe.Pointer(bp + 492)) == 0) { goto __126 } - Xsqlite3ErrorMsg(tls, pParse, ts+17250 /* "not a writable d..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+17419, 0) goto pragma_out __126: ; @@ -111290,7 +111517,7 @@ __127: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+16, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -111318,7 +111545,7 @@ __130: goto __132 } Xsqlite3ErrorMsg(tls, pParse, - ts+17275 /* "Safety level may..." */, 0) + ts+17444, 0) goto __133 __132: if !(iDb != 1) { @@ -111374,7 +111601,7 @@ __139: __141: ; if !(mask&uint64(SQLITE_WriteSchema) != uint64(0) && - Xsqlite3_stricmp(tls, zRight, ts+17328) == 0) { + Xsqlite3_stricmp(tls, zRight, ts+17497) == 0) { goto __142 } // IMP: R-60817-01178 If the argument is "RESET" then schema @@ -111488,13 +111715,13 @@ __155: Xsqlite3VdbeMultiLoad(tls, v, 1, func() uintptr { if (*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0 { - return ts + 17334 /* "issisii" */ + return ts + 17503 /* "issisii" */ } - return ts + 17342 /* "issisi" */ + return ts + 17511 /* "issisi" */ }(), libc.VaList(bp+24, i-nHidden, (*Column)(unsafe.Pointer(pCol)).FzCnName, - Xsqlite3ColumnType(tls, pCol, ts+1543 /* "" */), + Xsqlite3ColumnType(tls, pCol, ts+1565), func() int32 { if uint32(int32(*(*uint8)(unsafe.Pointer(pCol + 4))&0xf>>0)) != 0 { return 1 @@ -111575,12 +111802,12 @@ __170: if !(int32((*Table)(unsafe.Pointer(pTab1)).FnCol) == 0) { goto __171 } - zSql = Xsqlite3MPrintf(tls, db, ts+17349 /* "SELECT*FROM\"%w\"" */, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) + zSql = Xsqlite3MPrintf(tls, db, ts+17518, libc.VaList(bp+80, (*Table)(unsafe.Pointer(pTab1)).FzName)) if !(zSql != 0) { goto __172 } *(*uintptr)(unsafe.Pointer(bp + 496 /* pDummy */)) = uintptr(0) - Xsqlite3_prepare(tls, db, zSql, -1, bp+496 /* &pDummy */, uintptr(0)) + Xsqlite3_prepare(tls, db, zSql, -1, bp+496, uintptr(0)) Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 496 /* pDummy */))) Xsqlite3DbFree(tls, db, zSql) __172: @@ -111615,29 +111842,29 @@ __176: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VIEW) { goto __177 } - zType = ts + 10358 /* "view" */ + zType = ts + 10380 /* "view" */ goto __178 __177: if !(int32((*Table)(unsafe.Pointer(pTab2)).FeTabType) == TABTYP_VTAB) { goto __179 } - zType = ts + 12614 /* "virtual" */ + zType = ts + 12636 /* "virtual" */ goto __180 __179: if !((*Table)(unsafe.Pointer(pTab2)).FtabFlags&U32(TF_Shadow) != 0) { goto __181 } - zType = ts + 17365 /* "shadow" */ + zType = ts + 17534 /* "shadow" */ goto __182 __181: - zType = ts + 8739 /* "table" */ + zType = ts + 8761 /* "table" */ __182: ; __180: ; __178: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17372, /* "sssiii" */ + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17541, libc.VaList(bp+88, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii4)*16)).FzDbSName, Xsqlite3PreferredTableName(tls, (*Table)(unsafe.Pointer(pTab2)).FzName), zType, @@ -111707,7 +111934,7 @@ __189: goto __191 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17379 /* "iisX" */, libc.VaList(bp+136, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17548, libc.VaList(bp+136, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -111717,7 +111944,7 @@ __189: if !((*PragmaName)(unsafe.Pointer(pPragma)).FiArg != 0) { goto __192 } - Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17384, /* "isiX" */ + Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17553, libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*4)), libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol)))) @@ -111754,12 +111981,12 @@ __195: if !(pIdx1 != 0) { goto __197 } - *(*[3]uintptr)(unsafe.Pointer(bp + 500 /* azOrigin */)) = [3]uintptr{ts + 17389 /* "c" */, ts + 17391 /* "u" */, ts + 15849 /* "pk" */} - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17393, /* "isisi" */ + *(*[3]uintptr)(unsafe.Pointer(bp + 500 /* azOrigin */)) = [3]uintptr{ts + 17558, ts + 17560, ts + 16022} + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17562, libc.VaList(bp+184, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, libc.Bool32(int32((*Index)(unsafe.Pointer(pIdx1)).FonError) != OE_None), - *(*uintptr)(unsafe.Pointer(bp + 500 /* &azOrigin[0] */ + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), + *(*uintptr)(unsafe.Pointer(bp + 500 + uintptr(uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 56))&0x3>>0)))*4)), libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0)))) goto __196 __196: @@ -111789,7 +112016,7 @@ __198: __201: ; - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17399, /* "iss" */ + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17568, libc.VaList(bp+224, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*16)).FpBt))) @@ -111812,7 +112039,7 @@ __202: goto __204 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17403 /* "is" */, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17572, libc.VaList(bp+248, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __203 __203: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -111878,7 +112105,7 @@ __214: goto __216 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7397 /* "s" */, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7419, libc.VaList(bp+264, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __215 __215: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -111895,7 +112122,7 @@ __217: if !(i6 < int32(uint32(unsafe.Sizeof(aPragmaName))/uint32(unsafe.Sizeof(PragmaName{})))) { goto __219 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7397 /* "s" */, libc.VaList(bp+272, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+7419, libc.VaList(bp+272, aPragmaName[i6].FzName)) goto __218 __218: i6++ @@ -111931,7 +112158,7 @@ __225: if !(j2 < (*FKey)(unsafe.Pointer(pFK)).FnCol) { goto __227 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17406, /* "iissssss" */ + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17575, libc.VaList(bp+280, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, @@ -111939,7 +112166,7 @@ __225: (*sColMap)(unsafe.Pointer(pFK+36+uintptr(j2)*8)).FzCol, actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25 + 1))), // ON UPDATE actionName(tls, *(*U8)(unsafe.Pointer(pFK + 25))), - ts+17415 /* "NONE" */)) + ts+17584)) goto __226 __226: j2++ @@ -112016,7 +112243,7 @@ __237: ; *(*uintptr)(unsafe.Pointer(bp + 512 /* pIdx2 */)) = uintptr(0) Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pParent)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pParent)).FzName) - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+512 /* &pIdx2 */, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+512, uintptr(0)) if !(x1 == 0) { goto __238 } @@ -112071,7 +112298,7 @@ __244: if !(pParent != 0) { goto __247 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+512 /* &pIdx2 */, bp+516 /* &aiCols */) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+512, bp+516) __247: ; @@ -112140,7 +112367,7 @@ __255: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regResult+1) __256: ; - Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17420 /* "siX" */, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) + Xsqlite3VdbeMultiLoad(tls, v, regResult+2, ts+17589, libc.VaList(bp+344, (*FKey)(unsafe.Pointer(pFK1)).FzTo, i8-1)) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 516 /* aiCols */))) @@ -112406,7 +112633,7 @@ __283: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17424 /* "*** in database ..." */, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17593, libc.VaList(bp+360, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*16)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -112440,7 +112667,7 @@ __293: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab9) } Xsqlite3OpenTableAndIndices(tls, pParse, pTab9, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+524 /* &iDataCur */, bp+528 /* &iIdxCur */) + 1, uintptr(0), bp+524, bp+528) // reg[7] counts the number of entries in the table. // reg[8+i] counts the number of entries in the i-th index Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) @@ -112508,7 +112735,7 @@ __303: goto __304 } jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17448 /* "NULL value in %s..." */, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17617, libc.VaList(bp+368, (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer(pCol1)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) if !(bStrict != 0 && int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4) != COLTYPE_ANY) { @@ -112530,7 +112757,7 @@ __304: jmp2 = Xsqlite3VdbeAddOp3(tls, v, OP_IsNullOrType, 3, 0, int32(Xsqlite3StdTypeMap[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28])) - zErr = Xsqlite3MPrintf(tls, db, ts+17468, /* "non-%s value in ..." */ + zErr = Xsqlite3MPrintf(tls, db, ts+17637, libc.VaList(bp+384, Xsqlite3StdType[(int32(*(*uint8)(unsafe.Pointer(pCol1 + 4))&0xf0>>4)-1)&0xf<<28>>28], (*Table)(unsafe.Pointer(pTab9)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab9)).FaCol+uintptr(j4)*16)).FzCnName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) @@ -112574,7 +112801,7 @@ __312: SQLITE_JUMPIFNULL) Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 - zErr1 = Xsqlite3MPrintf(tls, db, ts+17490, /* "CHECK constraint..." */ + zErr1 = Xsqlite3MPrintf(tls, db, ts+17659, libc.VaList(bp+408, (*Table)(unsafe.Pointer(pTab9)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) @@ -112601,16 +112828,16 @@ __314: goto __315 __317: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 524 /* iDataCur */)), 0, 0, bp+532, /* &jmp3 */ + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 524 /* iDataCur */)), 0, 0, bp+532, pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 8+j4, 1) // increment entry count // Verify that an index entry exists for the current table row jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, *(*int32)(unsafe.Pointer(bp + 528))+j4, ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17520 /* "row " */) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17689) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) - Xsqlite3VdbeLoadString(tls, v, 4, ts+17525 /* " missing from in..." */) + Xsqlite3VdbeLoadString(tls, v, 4, ts+17694) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) jmp5 = Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 4, 3, 3) @@ -112650,7 +112877,7 @@ __321: Xsqlite3VdbeJumpHere(tls, v, jmp6) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, *(*int32)(unsafe.Pointer(bp + 528))+j4, uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) - Xsqlite3VdbeLoadString(tls, v, 3, ts+17546 /* "non-unique entry..." */) + Xsqlite3VdbeLoadString(tls, v, 3, ts+17715) Xsqlite3VdbeGoto(tls, v, jmp5) Xsqlite3VdbeResolveLabel(tls, v, uniqOk) __318: @@ -112672,7 +112899,7 @@ __313: if !!(isQuick != 0) { goto __323 } - Xsqlite3VdbeLoadString(tls, v, 2, ts+17573 /* "wrong # of entri..." */) + Xsqlite3VdbeLoadString(tls, v, 2, ts+17742) j4 = 0 pIdx5 = (*Table)(unsafe.Pointer(pTab9)).FpIndex __324: @@ -112723,7 +112950,7 @@ __265: } (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = 1 - *(*int32)(unsafe.Pointer(bp + 520)) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*20)).Fp4type = int8(-1) - *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17602 /* "ok" */ + *(*uintptr)(unsafe.Pointer(aOp2 + 2*20 + 16)) = ts + 17771 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*20)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 5*20 + 16)) = Xsqlite3ErrStr(tls, SQLITE_CORRUPT) __328: @@ -112801,7 +113028,7 @@ __335: if !!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0) { goto __337 } - Xsqlite3ErrorMsg(tls, pParse, ts+17605 /* "unsupported enco..." */, libc.VaList(bp+416, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17774, libc.VaList(bp+416, zRight)) __337: ; __332: @@ -112913,19 +113140,19 @@ __48: if !(zRight != 0) { goto __344 } - if !(Xsqlite3StrICmp(tls, zRight, ts+17043) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17212) == 0) { goto __345 } eMode2 = SQLITE_CHECKPOINT_FULL goto __346 __345: - if !(Xsqlite3StrICmp(tls, zRight, ts+17630) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17799) == 0) { goto __347 } eMode2 = SQLITE_CHECKPOINT_RESTART goto __348 __347: - if !(Xsqlite3StrICmp(tls, zRight, ts+17196) == 0) { + if !(Xsqlite3StrICmp(tls, zRight, ts+17365) == 0) { goto __349 } eMode2 = SQLITE_CHECKPOINT_TRUNCATE @@ -113112,7 +113339,7 @@ __364: __366: ; - zSubSql = Xsqlite3MPrintf(tls, db, ts+17638, /* "ANALYZE \"%w\".\"%w..." */ + zSubSql = Xsqlite3MPrintf(tls, db, ts+17807, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab10)).FzName)) if !(opMask&U32(0x01) != 0) { goto __367 @@ -113263,9 +113490,9 @@ type EncName = struct { FzName uintptr Fenc U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:131430:18 */ +} /* sqlite3.c:131460:18 */ -var iLn3 int32 = 0 /* sqlite3.c:129988:22 */ +var iLn3 int32 = 0 /* sqlite3.c:130018:22 */ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_DEFAULT_CACHE_SIZE)}, // 1 @@ -113276,16 +113503,16 @@ var getCacheSize = [9]VdbeOpList{ {Fopcode: U8(OP_Integer), Fp2: int8(1)}, // 6 {Fopcode: U8(OP_Noop)}, {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:129989:29 */ -var iLn4 int32 = 0 /* sqlite3.c:130257:26 */ +} /* sqlite3.c:130019:29 */ +var iLn4 int32 = 0 /* sqlite3.c:130287:26 */ var setMeta6 = [5]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1), Fp3: int8(BTREE_LARGEST_ROOT_PAGE)}, {Fopcode: U8(OP_If), Fp1: int8(1)}, // 2 {Fopcode: U8(OP_Halt), Fp2: int8(OE_Abort)}, // 3 {Fopcode: U8(OP_SetCookie), Fp2: int8(BTREE_INCR_VACUUM)}, // 4 -} /* sqlite3.c:130258:33 */ -var iLn5 int32 = 0 /* sqlite3.c:131380:24 */ +} /* sqlite3.c:130288:33 */ +var iLn5 int32 = 0 /* sqlite3.c:131410:24 */ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_AddImm), Fp1: int8(1)}, // 0 {Fopcode: U8(OP_IfNotZero), Fp1: int8(1), Fp2: int8(4)}, // 1 @@ -113294,27 +113521,27 @@ var endCode = [7]VdbeOpList{ {Fopcode: U8(OP_Halt)}, // 4 {Fopcode: U8(OP_String8), Fp2: int8(3)}, // 5 {Fopcode: U8(OP_Goto), Fp2: int8(3)}, // 6 -} /* sqlite3.c:131381:31 */ +} /* sqlite3.c:131411:31 */ var encnames1 = [9]EncName{ - {FzName: ts + 17656 /* "UTF8" */, Fenc: U8(SQLITE_UTF8)}, - {FzName: ts + 17661 /* "UTF-8" */, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] - {FzName: ts + 17667 /* "UTF-16le" */, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] - {FzName: ts + 17676 /* "UTF-16be" */, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] - {FzName: ts + 17685 /* "UTF16le" */, Fenc: U8(SQLITE_UTF16LE)}, - {FzName: ts + 17693 /* "UTF16be" */, Fenc: U8(SQLITE_UTF16BE)}, - {FzName: ts + 17701 /* "UTF-16" */}, // SQLITE_UTF16NATIVE - {FzName: ts + 17708 /* "UTF16" */}, // SQLITE_UTF16NATIVE + {FzName: ts + 17825, Fenc: U8(SQLITE_UTF8)}, + {FzName: ts + 17830, Fenc: U8(SQLITE_UTF8)}, // Must be element [1] + {FzName: ts + 17836, Fenc: U8(SQLITE_UTF16LE)}, // Must be element [2] + {FzName: ts + 17845, Fenc: U8(SQLITE_UTF16BE)}, // Must be element [3] + {FzName: ts + 17854, Fenc: U8(SQLITE_UTF16LE)}, + {FzName: ts + 17862, Fenc: U8(SQLITE_UTF16BE)}, + {FzName: ts + 17870}, + {FzName: ts + 17877}, {}, -} /* sqlite3.c:131433:7 */ +} /* sqlite3.c:131463:7 */ var setCookie = [2]VdbeOpList{ {Fopcode: U8(OP_Transaction), Fp2: int8(1)}, // 0 {Fopcode: U8(OP_SetCookie)}, // 1 -} /* sqlite3.c:131513:31 */ +} /* sqlite3.c:131543:31 */ var readCookie = [3]VdbeOpList{ {Fopcode: U8(OP_Transaction)}, // 0 {Fopcode: U8(OP_ReadCookie), Fp2: int8(1)}, // 1 {Fopcode: U8(OP_ResultRow), Fp1: int8(1), Fp2: int8(1)}, -} /* sqlite3.c:131528:31 */ +} /* sqlite3.c:131558:31 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. @@ -113326,24 +113553,24 @@ type PragmaVtab1 = struct { FnHidden U8 FiHidden U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:131888:9 */ +} /* sqlite3.c:131918:9 */ // **************************************************************************** // // Implementation of an eponymous virtual table that runs a pragma. // -type PragmaVtab = PragmaVtab1 /* sqlite3.c:131888:27 */ +type PragmaVtab = PragmaVtab1 /* sqlite3.c:131918:27 */ type PragmaVtabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpPragma uintptr FiRowid Sqlite_int64 FazArg [2]uintptr -} /* sqlite3.c:131889:9 */ +} /* sqlite3.c:131919:9 */ -type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:131889:33 */ +type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:131919:33 */ // Pragma virtual table module xConnect method. -func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:131907:12: */ +func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:131937:12: */ bp := tls.Alloc(256) defer tls.Free(256) @@ -113359,8 +113586,8 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv _ = argc _ = argv - Xsqlite3StrAccumInit(tls, bp+32 /* &acc */, uintptr(0), bp+56 /* &zBuf[0] */, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+17714 /* "CREATE TABLE x" */) + Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), bp+56, int32(unsafe.Sizeof([200]int8{})), 0) + Xsqlite3_str_appendall(tls, bp+32, ts+17883) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -113368,7 +113595,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+17729 /* "%c\"%s\"" */, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32, ts+17898, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -113381,22 +113608,22 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+17736 /* "(\"%s\"" */, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32, ts+17905, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&PragFlg_Result1 != 0 { - Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+17742 /* ",arg HIDDEN" */) + Xsqlite3_str_appendall(tls, bp+32, ts+17911) j++ } if int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg)&(PragFlg_SchemaOpt|PragFlg_SchemaReq) != 0 { - Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+17754 /* ",schema HIDDEN" */) + Xsqlite3_str_appendall(tls, bp+32, ts+17923) j++ } - Xsqlite3_str_append(tls, bp+32 /* &acc */, ts+4877 /* ")" */, 1) - Xsqlite3StrAccumFinish(tls, bp+32 /* &acc */) + Xsqlite3_str_append(tls, bp+32, ts+4899, 1) + Xsqlite3StrAccumFinish(tls, bp+32) - rc = Xsqlite3_declare_vtab(tls, db, bp+56 /* &zBuf[0] */) + rc = Xsqlite3_declare_vtab(tls, db, bp+56) if rc == SQLITE_OK { pTab = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtab{}))) if pTab == uintptr(0) { @@ -113409,7 +113636,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -113417,7 +113644,7 @@ __3: } // Pragma virtual table module xDisconnect method. -func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:131969:12: */ +func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:131999:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -113429,7 +113656,7 @@ func pragmaVtabDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:131 // query planner to give == constraints on as many hidden parameters as // possible, and especially on the first hidden parameter. So return a // high cost if hidden parameters are unconstrained. -func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:131982:12: */ +func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:132012:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -113444,8 +113671,8 @@ func pragmaVtabBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { / return SQLITE_OK } pConstraint = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint - *(*int32)(unsafe.Pointer(bp /* &seen[0] */)) = 0 - *(*int32)(unsafe.Pointer(bp /* &seen[0] */ + 1*4)) = 0 + *(*int32)(unsafe.Pointer(bp)) = 0 + *(*int32)(unsafe.Pointer(bp + 1*4)) = 0 i = 0 __1: if !(i < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { @@ -113463,7 +113690,7 @@ __1: } j = (*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn - int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) - *(*int32)(unsafe.Pointer(bp /* &seen[0] */ + uintptr(j)*4)) = i + 1 + *(*int32)(unsafe.Pointer(bp + uintptr(j)*4)) = i + 1 } goto __2 @@ -113494,7 +113721,7 @@ __3: } // Create a new cursor for the pragma virtual table -func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132019:12: */ +func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:132049:12: */ var pCsr uintptr pCsr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtabCursor{}))) if pCsr == uintptr(0) { @@ -113507,7 +113734,7 @@ func pragmaVtabOpen(tls *libc.TLS, pVtab uintptr, ppCursor uintptr) int32 { /* s } // Clear all content from pragma virtual table cursor. -func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132030:13: */ +func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132060:13: */ var i int32 Xsqlite3_finalize(tls, (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma) (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma = uintptr(0) @@ -113518,7 +113745,7 @@ func pragmaVtabCursorClear(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:132030:13 } // Close a pragma virtual table cursor -func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132041:12: */ +func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132071:12: */ var pCsr uintptr = cur pragmaVtabCursorClear(tls, pCsr) Xsqlite3_free(tls, pCsr) @@ -113526,7 +113753,7 @@ func pragmaVtabClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:132041:12: } // Advance the pragma virtual table cursor to the next row -func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132049:12: */ +func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132079:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -113542,7 +113769,7 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132 } // Pragma virtual table module xFilter method. -func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132067:12: */ +func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:132097:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -113572,7 +113799,7 @@ __1: var zText uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if zText != 0 { - *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, zText)) + *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, zText)) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + uintptr(j)*4)) == uintptr(0) { return SQLITE_NOMEM } @@ -113587,37 +113814,37 @@ __2: goto __3 __3: ; - Xsqlite3StrAccumInit(tls, bp+32 /* &acc */, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 112 + 1*4))) - Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+17769 /* "PRAGMA " */) + Xsqlite3StrAccumInit(tls, bp+32, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 112 + 1*4))) + Xsqlite3_str_appendall(tls, bp+32, ts+17938) if *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)) != 0 { - Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+17777 /* "%Q." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17946, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pCsr + 16 + 1*4)))) } - Xsqlite3_str_appendall(tls, bp+32 /* &acc */, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) + Xsqlite3_str_appendall(tls, bp+32, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer(pCsr + 16)) != 0 { - Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+17781 /* "=%Q" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) + Xsqlite3_str_appendf(tls, bp+32, ts+17950, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pCsr + 16)))) } - zSql = Xsqlite3StrAccumFinish(tls, bp+32 /* &acc */) + zSql = Xsqlite3StrAccumFinish(tls, bp+32) if zSql == uintptr(0) { return SQLITE_NOMEM } rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, pCsr+4, uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { - (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) } // Pragma virtual table module xEof method. -func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132117:12: */ +func pragmaVtabEof(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:132147:12: */ var pCsr uintptr = pVtabCursor return libc.Bool32((*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FpPragma == uintptr(0)) } // The xColumn method simply returns the corresponding column from // the PRAGMA. -func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:132125:12: */ +func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:132155:12: */ var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab if i < int32((*PragmaVtab)(unsafe.Pointer(pTab)).FiHidden) { @@ -113629,7 +113856,7 @@ func pragmaVtabColumn(tls *libc.TLS, pVtabCursor uintptr, ctx uintptr, i int32) } // Pragma virtual table module xRowid method. -func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:132143:12: */ +func pragmaVtabRowid(tls *libc.TLS, pVtabCursor uintptr, p uintptr) int32 { /* sqlite3.c:132173:12: */ var pCsr uintptr = pVtabCursor *(*Sqlite_int64)(unsafe.Pointer(p)) = (*PragmaVtabCursor)(unsafe.Pointer(pCsr)).FiRowid return SQLITE_OK @@ -113647,12 +113874,12 @@ var pragmaVtabModule = Sqlite3_module{ // xCreate - create a table FxEof: 0, // xEof FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:132150:29 */ +} /* sqlite3.c:132180:29 */ // Check to see if zTabName is really the name of a pragma. If it is, // then register an eponymous virtual table for that pragma and return // a pointer to the Module object for the new virtual table. -func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:132182:23: */ +func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintptr { /* sqlite3.c:132212:23: */ var pName uintptr pName = pragmaLocate(tls, zName+uintptr(7)) @@ -113685,7 +113912,7 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. -func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:132219:13: */ +func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:132249:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -113696,39 +113923,39 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) // A error message has already been generated. Do not overwrite it } else if (*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask) != 0 { *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = Xsqlite3MPrintf(tls, db, - ts+17785 /* "error in %s %s a..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), + ts+17954, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azObj)), *(*uintptr)(unsafe.Pointer(azObj + 1*4)), azAlterType[(*InitData)(unsafe.Pointer(pData)).FmInitFlags&U32(INITFLAG_AlterMask)-U32(1)], zExtra)) (*InitData)(unsafe.Pointer(pData)).Frc = SQLITE_ERROR } else if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_WriteSchema) != 0 { - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 132242) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 132272) } else { var z uintptr var zObj uintptr if *(*uintptr)(unsafe.Pointer(azObj + 1*4)) != 0 { zObj = *(*uintptr)(unsafe.Pointer(azObj + 1*4)) } else { - zObj = ts + 4928 /* "?" */ + zObj = ts + 4950 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+17813 /* "malformed databa..." */, libc.VaList(bp+32, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+17982, libc.VaList(bp+32, zObj)) if zExtra != 0 && *(*int8)(unsafe.Pointer(zExtra)) != 0 { - z = Xsqlite3MPrintf(tls, db, ts+17844 /* "%z - %s" */, libc.VaList(bp+40, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+18013, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z - (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 132249) + (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 132279) } } var azAlterType = [3]uintptr{ - ts + 17852, /* "rename" */ - ts + 17859, /* "drop column" */ - ts + 17871, /* "add column" */ -} /* sqlite3.c:132230:23 */ + ts + 18021, + ts + 18028, + ts + 18040, +} /* sqlite3.c:132260:23 */ // Check to see if any sibling index (another index on the same table) // of pIndex has the same root page number, and if it does, return true. // This would indicate a corrupt schema. -func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:132258:20: */ +func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* sqlite3.c:132288:20: */ var p uintptr for p = (*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIndex)).FpTable)).FpIndex; p != 0; p = (*Index)(unsafe.Pointer(p)).FpNext { if (*Index)(unsafe.Pointer(p)).Ftnum == (*Index)(unsafe.Pointer(pIndex)).Ftnum && p != pIndex { @@ -113750,7 +113977,7 @@ func Xsqlite3IndexHasDuplicateRootPage(tls *libc.TLS, pIndex uintptr) int32 { /* // argv[3] = root page number for table or index. 0 for trigger or view. // argv[4] = SQL text for the CREATE statement. // -func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:132292:20: */ +func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr, NotUsed uintptr) int32 { /* sqlite3.c:132322:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -113795,13 +114022,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), db+164) == 0 || (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > (*InitData)(unsafe.Pointer(pData)).FmxPage && (*InitData)(unsafe.Pointer(pData)).FmxPage > Pgno(0) { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14033 /* "invalid rootpage" */) + corruptSchema(tls, pData, argv, ts+14055) } } libc.SetBitFieldPtr8Uint32(db+164+8, uint32(0), 0, 0x1) (*Sqlite3)(unsafe.Pointer(db)).Finit.FazInit = argv *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) - sqlite3Prepare(tls, db, *(*uintptr)(unsafe.Pointer(argv + 4*4)), -1, uint32(0), uintptr(0), bp /* &pStmt */, uintptr(0)) + sqlite3Prepare(tls, db, *(*uintptr)(unsafe.Pointer(argv + 4*4)), -1, uint32(0), uintptr(0), bp, uintptr(0)) rc = (*Sqlite3)(unsafe.Pointer(db)).FerrCode (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = saved_iDb @@ -113833,13 +114060,13 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr var pIndex uintptr pIndex = Xsqlite3FindIndex(tls, db, *(*uintptr)(unsafe.Pointer(argv + 1*4)), (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName) if pIndex == uintptr(0) { - corruptSchema(tls, pData, argv, ts+17882 /* "orphan index" */) + corruptSchema(tls, pData, argv, ts+18051) } else if Xsqlite3GetUInt32(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4)), pIndex+44) == 0 || (*Index)(unsafe.Pointer(pIndex)).Ftnum < Pgno(2) || (*Index)(unsafe.Pointer(pIndex)).Ftnum > (*InitData)(unsafe.Pointer(pData)).FmxPage || Xsqlite3IndexHasDuplicateRootPage(tls, pIndex) != 0 { if Xsqlite3Config.FbExtraSchemaChecks != 0 { - corruptSchema(tls, pData, argv, ts+14033 /* "invalid rootpage" */) + corruptSchema(tls, pData, argv, ts+14055) } } } @@ -113852,7 +114079,7 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // database. iDb==1 should never be used. iDb>=2 is used for // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. -func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:132395:20: */ +func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:132425:20: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -113882,17 +114109,17 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl // table name will be inserted automatically by the parser so we can just // use the abbreviation "x" here. The parser will also automatically tag // the schema table as read-only. - *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */)) = ts + 8739 /* "table" */ - *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { + *(*uintptr)(unsafe.Pointer(bp + 16)) = ts + 8761 /* "table" */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 11986 + return ts + 12008 } - return ts + 5803 + return ts + 5825 }()) - *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 1*4)) - *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 3*4)) = ts + 7806 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 4*4)) = ts + 17895 /* "CREATE TABLE x(t..." */ - *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 5*4)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 + 2*4)) = *(*uintptr)(unsafe.Pointer(bp + 16 + 1*4)) + *(*uintptr)(unsafe.Pointer(bp + 16 + 3*4)) = ts + 7828 /* "1" */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 4*4)) = ts + 18064 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 + 5*4)) = uintptr(0) (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).Fdb = db (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FiDb = iDb (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).Frc = SQLITE_OK @@ -113900,7 +114127,7 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FmInitFlags = mFlags (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FnInitRow = U32(0) (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FmxPage = Pgno(0) - Xsqlite3InitCallback(tls, bp+40 /* &initData */, 5, bp+16 /* azArg */, uintptr(0)) + Xsqlite3InitCallback(tls, bp+40, 5, bp+16, uintptr(0)) *(*U32)(unsafe.Pointer(db + 24)) &= U32(mask) if !((*InitData)(unsafe.Pointer(bp+40)).Frc != 0) { goto __1 @@ -113973,10 +114200,10 @@ __7: if !((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_ResetDatabase) != uint64(0)) { goto __8 } - libc.Xmemset(tls, bp+68 /* &meta[0] */, 0, uint32(unsafe.Sizeof([5]int32{}))) + libc.Xmemset(tls, bp+68, 0, uint32(unsafe.Sizeof([5]int32{}))) __8: ; - (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = *(*int32)(unsafe.Pointer(bp + 68 /* &meta[0] */)) + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = *(*int32)(unsafe.Pointer(bp + 68)) // If opening a non-empty database, check the text encoding. For the // main database, set sqlite3.enc to the encoding of the main database. @@ -114004,7 +114231,7 @@ __10: goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, - ts+11613 /* "attached databas..." */) + ts+11635) rc = SQLITE_ERROR goto initone_error_out __13: @@ -114018,7 +114245,7 @@ __9: if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size == 0) { goto __14 } - size = Xsqlite3AbsInt32(tls, *(*int32)(unsafe.Pointer(bp + 68 /* &meta[0] */ + 2*4))) + size = Xsqlite3AbsInt32(tls, *(*int32)(unsafe.Pointer(bp + 68 + 2*4))) if !(size == 0) { goto __15 } @@ -114034,7 +114261,7 @@ __14: // file_format==2 Version 3.1.3. // ALTER TABLE ADD COLUMN // file_format==3 Version 3.1.4. // ditto but with non-NULL defaults // file_format==4 Version 3.3.0. // DESC indices. Boolean constants - (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(*(*int32)(unsafe.Pointer(bp + 68 /* &meta[0] */ + 1*4))) + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(*(*int32)(unsafe.Pointer(bp + 68 + 1*4))) if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) == 0) { goto __16 } @@ -114044,7 +114271,7 @@ __16: if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) > SQLITE_MAX_FILE_FORMAT) { goto __17 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+17967 /* "unsupported file..." */) + Xsqlite3SetString(tls, pzErrMsg, db, ts+18136) rc = SQLITE_ERROR goto initone_error_out __17: @@ -114066,7 +114293,7 @@ __18: (*InitData)(unsafe.Pointer(bp + 40 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, - ts+17991, /* "SELECT*FROM\"%w\"...." */ + ts+18160, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zSchemaTabName)) xAuth = (*Sqlite3)(unsafe.Pointer(db)).FxAuth @@ -114153,7 +114380,7 @@ __25: // // After a database is initialized, the DB_SchemaLoaded bit is set // bit is set in the flags field of the Db structure. -func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:132634:20: */ +func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:132664:20: */ var i int32 var rc int32 var commit_internal int32 = libc.BoolInt32(!((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags&U32(DBFLAG_SchemaChange) != 0)) @@ -114185,7 +114412,7 @@ func Xsqlite3Init(tls *libc.TLS, db uintptr, pzErrMsg uintptr) int32 { /* sqlite // This routine is a no-op if the database schema is already initialized. // Otherwise, the schema is loaded. An error code is returned. -func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:132666:20: */ +func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:132696:20: */ var rc int32 = SQLITE_OK var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -114204,7 +114431,7 @@ func Xsqlite3ReadSchema(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:1326 // Check schema cookies in all databases. If any cookie is out // of date set pParse->rc to SQLITE_SCHEMA. If all schema cookies // make no changes to pParse->rc. -func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:132688:13: */ +func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:132718:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114238,7 +114465,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:132688:13: */ // Read the schema cookie from the database. If it does not match the // value stored as part of the in-memory schema representation, // set Parse.rc to SQLITE_SCHEMA. - Xsqlite3BtreeGetMeta(tls, pBt, BTREE_SCHEMA_VERSION, bp /* &cookie */) + Xsqlite3BtreeGetMeta(tls, pBt, BTREE_SCHEMA_VERSION, bp) if *(*int32)(unsafe.Pointer(bp)) != (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FpSchema)).Fschema_cookie { Xsqlite3ResetOneSchema(tls, db, iDb) @@ -114257,7 +114484,7 @@ func schemaIsValid(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:132688:13: */ // // If the same database is attached more than once, the first // attached database is returned. -func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:132738:20: */ +func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { /* sqlite3.c:132768:20: */ var i int32 = -32768 // If pSchema is NULL, then return -32768. This happens when code in @@ -114284,7 +114511,7 @@ func Xsqlite3SchemaToIndex(tls *libc.TLS, db uintptr, pSchema uintptr) int32 { / } // Free all memory allocations in the pParse object -func Xsqlite3ParserReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:132768:21: */ +func Xsqlite3ParserReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:132798:21: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb for (*Parse)(unsafe.Pointer(pParse)).FpCleanup != 0 { var pCleanup uintptr = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -114337,7 +114564,7 @@ func Xsqlite3ParserReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:132768:21 // return value thereafter. Something like this: // // pObj = sqlite3ParserAddCleanup(pParse, destructor, pObj); -func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:132816:21: */ +func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, pPtr uintptr) uintptr { /* sqlite3.c:132846:21: */ var pCleanup uintptr = Xsqlite3DbMallocRaw(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(ParseCleanup{}))) if pCleanup != 0 { (*ParseCleanup)(unsafe.Pointer(pCleanup)).FpNext = (*Parse)(unsafe.Pointer(pParse)).FpCleanup @@ -114354,7 +114581,7 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p } // Compile the UTF-8 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:132840:12: */ +func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:132870:12: */ bp := tls.Alloc(288) defer tls.Free(288) @@ -114372,8 +114599,8 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF *(*uintptr)(unsafe.Pointer(bp + 284 /* zErrMsg */)) = uintptr(0) rc = SQLITE_OK // Parsing context - libc.Xmemset(tls, bp+16 /* &sParse */, 0, uint32(uintptr(0)+144)) - libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+184)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+184)) + libc.Xmemset(tls, bp+16, 0, uint32(uintptr(0)+152)) + libc.Xmemset(tls, bp+16+uintptr(uint32(uintptr(0)+192)), 0, uint32(unsafe.Sizeof(Parse{}))-uint32(uintptr(0)+192)) (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpReprepare = pReprepare // assert( !db->mallocFailed ); // not true with SQLITE_USE_ALLOCA @@ -114430,7 +114657,7 @@ __3: goto __7 } zDb = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(i)*16)).FzDbSName - Xsqlite3ErrorWithMsg(tls, db, rc, ts+18025 /* "database schema ..." */, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+18194, libc.VaList(bp, zDb)) goto end_prepare __7: @@ -114458,7 +114685,7 @@ __2: if !(nBytes > mxLen) { goto __10 } - Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18055 /* "statement too lo..." */, 0) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_TOOBIG, ts+18224, 0) rc = Xsqlite3ApiExit(tls, db, SQLITE_TOOBIG) goto end_prepare __10: @@ -114467,7 +114694,7 @@ __10: if !(zSqlCopy != 0) { goto __11 } - Xsqlite3RunParser(tls, bp+16 /* &sParse */, zSqlCopy, bp+284 /* &zErrMsg */) + Xsqlite3RunParser(tls, bp+16, zSqlCopy, bp+284) (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail = zSql + uintptr((int32((*Parse)(unsafe.Pointer(bp+16)).FzTail)-int32(zSqlCopy))/1) Xsqlite3DbFree(tls, db, zSqlCopy) goto __12 @@ -114477,7 +114704,7 @@ __12: ; goto __9 __8: - Xsqlite3RunParser(tls, bp+16 /* &sParse */, zSql, bp+284 /* &zErrMsg */) + Xsqlite3RunParser(tls, bp+16, zSql, bp+284) __9: ; @@ -114504,10 +114731,10 @@ __15: if !((*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(bp+16)).Frc != SQLITE_DONE) { goto __16 } - if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0) { + if !((*Parse)(unsafe.Pointer(bp+16)).FcheckSchema != 0 && int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __18 } - schemaIsValid(tls, bp+16 /* &sParse */) + schemaIsValid(tls, bp+16) __18: ; if !((*Parse)(unsafe.Pointer(bp+16)).FpVdbe != 0) { @@ -114521,7 +114748,7 @@ __19: if !(*(*uintptr)(unsafe.Pointer(bp + 284)) != 0) { goto __20 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3601 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 284 /* zErrMsg */)))) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3623, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 284 /* zErrMsg */)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 284 /* zErrMsg */))) goto __21 __20: @@ -114551,17 +114778,17 @@ __23: end_prepare: - Xsqlite3ParserReset(tls, bp+16 /* &sParse */) + Xsqlite3ParserReset(tls, bp+16) return rc } -func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:132981:12: */ +func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pOld uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133011:12: */ var rc int32 var cnt int32 = 0 *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 132998) + return Xsqlite3MisuseError(tls, 133028) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) @@ -114572,6 +114799,9 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // reset is considered a permanent error. rc = sqlite3Prepare(tls, db, zSql, nBytes, prepFlags, pOld, ppStmt, pzTail) + if rc == SQLITE_OK || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { + break + } } Xsqlite3BtreeLeaveAll(tls, db) rc = Xsqlite3ApiExit(tls, db, rc) @@ -114587,7 +114817,7 @@ func sqlite3LockAndPrepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32 // if the statement cannot be recompiled because another connection has // locked the sqlite3_schema table, return SQLITE_LOCKED. If any other error // occurs, return SQLITE_SCHEMA. -func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133027:20: */ +func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133058:20: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114603,7 +114833,7 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133027:20: db = Xsqlite3VdbeDb(tls, p) prepFlags = Xsqlite3VdbePrepareFlags(tls, p) - rc = sqlite3LockAndPrepare(tls, db, zSql, -1, uint32(prepFlags), p, bp /* &pNew */, uintptr(0)) + rc = sqlite3LockAndPrepare(tls, db, zSql, -1, uint32(prepFlags), p, bp, uintptr(0)) if rc != 0 { if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) @@ -114626,14 +114856,14 @@ func Xsqlite3Reprepare(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:133027:20: // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133066:16: */ +func Xsqlite3_prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133097:16: */ var rc int32 rc = sqlite3LockAndPrepare(tls, db, zSql, nBytes, uint32(0), uintptr(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133078:16: */ +func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133109:16: */ var rc int32 // EVIDENCE-OF: R-37923-12173 The sqlite3_prepare_v2() interface works // exactly the same as sqlite3_prepare_v3() with a zero prepFlags @@ -114646,7 +114876,7 @@ func Xsqlite3_prepare_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, return rc } -func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133096:16: */ +func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133127:16: */ var rc int32 // EVIDENCE-OF: R-56861-42673 sqlite3_prepare_v3() differs from // sqlite3_prepare_v2() only in having the extra prepFlags parameter, @@ -114663,7 +114893,7 @@ func Xsqlite3_prepare_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, } // Compile the UTF-16 encoded SQL statement zSql into a statement handle. -func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133124:12: */ +func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133155:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -114676,7 +114906,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) if !(Xsqlite3SafetyCheckOk(tls, db) != 0) || zSql == uintptr(0) { - return Xsqlite3MisuseError(tls, 133145) + return Xsqlite3MisuseError(tls, 133176) } if nBytes >= 0 { var sz int32 @@ -114688,7 +114918,7 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) zSql8 = Xsqlite3Utf16to8(tls, db, zSql, nBytes, uint8(SQLITE_UTF16LE)) if zSql8 != 0 { - rc = sqlite3LockAndPrepare(tls, db, zSql8, -1, prepFlags, uintptr(0), ppStmt, bp /* &zTail8 */) + rc = sqlite3LockAndPrepare(tls, db, zSql8, -1, prepFlags, uintptr(0), ppStmt, bp) } if *(*uintptr)(unsafe.Pointer(bp)) != 0 && pzTail != 0 { @@ -114711,21 +114941,21 @@ func sqlite3Prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, pre // sqlite3_step(). In the new version, the original SQL text is retained // and the statement is automatically recompiled if an schema change // occurs. -func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133182:16: */ +func Xsqlite3_prepare16(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133213:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(0), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133194:16: */ +func Xsqlite3_prepare16_v2(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133225:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL), ppStmt, pzTail) // VERIFY: F13021 return rc } -func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133206:16: */ +func Xsqlite3_prepare16_v3(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags uint32, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:133237:16: */ var rc int32 rc = sqlite3Prepare16(tls, db, zSql, nBytes, uint32(SQLITE_PREPARE_SAVESQL)|prepFlags&uint32(SQLITE_PREPARE_MASK), @@ -114759,7 +114989,7 @@ type DistinctCtx1 = struct { F__ccgo_pad1 [2]byte FtabTnct int32 FaddrTnct int32 -} /* sqlite3.c:133247:9 */ +} /* sqlite3.c:133278:9 */ //************* End of prepare.c ******************************************** //************* Begin file select.c ***************************************** @@ -114780,7 +115010,7 @@ type DistinctCtx1 = struct { // An instance of the following object is used to record information about // how to process the DISTINCT keyword, to simplify passing that information // into the selectInnerLoop() routine. -type DistinctCtx = DistinctCtx1 /* sqlite3.c:133247:28 */ +type DistinctCtx = DistinctCtx1 /* sqlite3.c:133278:28 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -114810,7 +115040,7 @@ type SortCtx1 = struct { FsortFlags U8 F__ccgo_pad1 [3]byte FpDeferredRowLoad uintptr -} /* sqlite3.c:133273:9 */ +} /* sqlite3.c:133304:9 */ // An instance of the following object is used to record information about // the ORDER BY (or GROUP BY) clause of query is being coded. @@ -114828,19 +115058,19 @@ type SortCtx1 = struct { // When the sorter-reference optimization is used, there is one entry in the // aDefer[] array for each database table that may be read as values are // extracted from the sorter. -type SortCtx = SortCtx1 /* sqlite3.c:133273:24 */ +type SortCtx = SortCtx1 /* sqlite3.c:133304:24 */ type RowLoadInfo1 = struct { FregResult int32 FecelFlags U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:133273:9 */ +} /* sqlite3.c:133304:9 */ // Delete all the content of a Select structure. Deallocate the structure // itself depending on the value of bFree // // If bFree==1, call sqlite3DbFree() on the p object. // If bFree==0, Leave the first Select object unfreed -func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:133303:13: */ +func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3.c:133334:13: */ for p != 0 { var pPrior uintptr = (*Select)(unsafe.Pointer(p)).FpPrior Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(p)).FpEList) @@ -114869,7 +115099,7 @@ func clearSelect(tls *libc.TLS, db uintptr, p uintptr, bFree int32) { /* sqlite3 } // Initialize a SelectDest structure. -func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:133332:21: */ +func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int32) { /* sqlite3.c:133363:21: */ (*SelectDest)(unsafe.Pointer(pDest)).FeDest = U8(eDest) (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm = iParm (*SelectDest)(unsafe.Pointer(pDest)).FiSDParm2 = 0 @@ -114880,7 +115110,7 @@ func Xsqlite3SelectDestInit(tls *libc.TLS, pDest uintptr, eDest int32, iParm int // Allocate a new Select structure and return a pointer to that // structure. -func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:133346:23: */ +func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintptr, pWhere uintptr, pGroupBy uintptr, pHaving uintptr, pOrderBy uintptr, selFlags U32, pLimit uintptr) uintptr { /* sqlite3.c:133377:23: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -114930,14 +115160,14 @@ func Xsqlite3SelectNew(tls *libc.TLS, pParse uintptr, pEList uintptr, pSrc uintp } // Delete the given Select structure and all of its substructures. -func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:133404:21: */ +func Xsqlite3SelectDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:133435:21: */ if p != 0 { clearSelect(tls, db, p, 1) } } // Return a pointer to the right-most SELECT statement in a compound. -func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:133411:15: */ +func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:133442:15: */ for (*Select)(unsafe.Pointer(p)).FpNext != 0 { p = (*Select)(unsafe.Pointer(p)).FpNext } @@ -114959,7 +115189,7 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:133411:15: * // // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. -func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:133433:20: */ +func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:133464:20: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -114969,11 +115199,11 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC var p uintptr var i int32 var j int32 - *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */)) = pA - *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + 1*4)) = pB - *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + 2*4)) = pC + *(*uintptr)(unsafe.Pointer(bp + 32)) = pA + *(*uintptr)(unsafe.Pointer(bp + 32 + 1*4)) = pB + *(*uintptr)(unsafe.Pointer(bp + 32 + 2*4)) = pC for i = 0; i < 3 && *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + uintptr(i)*4)) != 0; i++ { - p = *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + uintptr(i)*4)) + p = *(*uintptr)(unsafe.Pointer(bp + 32 + uintptr(i)*4)) for j = 0; j < int32(uint32(unsafe.Sizeof(aKeyword))/uint32(unsafe.Sizeof(struct { Fi U8 FnChar U8 @@ -114996,24 +115226,24 @@ func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC } } if jointype&(JT_INNER|JT_OUTER) == JT_INNER|JT_OUTER || jointype&JT_ERROR != 0 { - var zSp uintptr = ts + 10766 /* " " */ + var zSp uintptr = ts + 10788 /* " " */ if pC == uintptr(0) { zSp++ } Xsqlite3ErrorMsg(tls, pParse, - ts+18074 /* "unknown or unsup..." */, libc.VaList(bp, pA, pB, zSp, pC)) + ts+18243, libc.VaList(bp, pA, pB, zSp, pC)) jointype = JT_INNER } else if jointype&JT_OUTER != 0 && jointype&(JT_LEFT|JT_RIGHT) != JT_LEFT { Xsqlite3ErrorMsg(tls, pParse, - ts+18118 /* "RIGHT and FULL O..." */, 0) + ts+18287, 0) jointype = JT_INNER } return jointype } -var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18173 /* "naturaleftouteri..." */)) /* sqlite3.c:133438:21 */ +var zKeyText = *(*[34]int8)(unsafe.Pointer(ts + 18342)) /* sqlite3.c:133469:21 */ var aKeyword = [7]struct { Fi U8 FnChar U8 @@ -115026,11 +115256,11 @@ var aKeyword = [7]struct { /* full */ {Fi: U8(19), FnChar: U8(4), Fcode: U8(JT_LEFT | JT_RIGHT | JT_OUTER)}, /* inner */ {Fi: U8(23), FnChar: U8(5), Fcode: U8(JT_INNER)}, /* cross */ {Fi: U8(28), FnChar: U8(5), Fcode: U8(JT_INNER | JT_CROSS)}, -} /* sqlite3.c:133443:5 */ +} /* sqlite3.c:133474:5 */ // Return the index of a column in a table. Return -1 if the column // is not contained in the table. -func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:133494:20: */ +func Xsqlite3ColumnIndex(tls *libc.TLS, pTab uintptr, zCol uintptr) int32 { /* sqlite3.c:133525:20: */ var i int32 var h U8 = Xsqlite3StrIHash(tls, zCol) var pCol uintptr @@ -115064,7 +115294,7 @@ __3: // of the matching column and return TRUE. // // If not found, return FALSE. -func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:133513:12: */ +func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piTab uintptr, piCol uintptr, bIgnoreHidden int32) int32 { /* sqlite3.c:133544:12: */ var i int32 // For looping over tables in pSrc var iCol int32 // Index of column matching zCol @@ -115092,7 +115322,7 @@ func tableAndColumnIndex(tls *libc.TLS, pSrc uintptr, N int32, zCol uintptr, piT // where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the // (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is // column iColRight of tab2. -func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:133551:13: */ +func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iColLeft int32, iRight int32, iColRight int32, isOuterJoin int32, ppWhere uintptr) { /* sqlite3.c:133582:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pE1 uintptr var pE2 uintptr @@ -115137,7 +115367,7 @@ func addWhereTerm(tls *libc.TLS, pParse uintptr, pSrc uintptr, iLeft int32, iCol // defer the handling of t1.x=5, it will be processed immediately // after the t1 loop and rows with t1.x!=5 will never appear in // the output, which is incorrect. -func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:133613:21: */ +func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:133644:21: */ for p != 0 { *(*U32)(unsafe.Pointer(p + 4)) |= U32(EP_FromJoin) @@ -115161,7 +115391,7 @@ func Xsqlite3SetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c: // an ordinary term that omits the EP_FromJoin mark. // // This happens when a LEFT JOIN is simplified into an ordinary JOIN. -func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:133639:13: */ +func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:133670:13: */ for p != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FromJoin) != U32(0) && (iTable < 0 || (*Expr)(unsafe.Pointer(p)).FiRightJoinTable == iTable) { @@ -115196,7 +115426,7 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:133639 // also attached to the left entry. // // This routine returns the number of errors encountered. -func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:133676:12: */ +func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:133707:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -115228,7 +115458,7 @@ __1: if int32((*SrcItem)(unsafe.Pointer(pRight)).Ffg.Fjointype)&JT_NATURAL != 0 { if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 || (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18207 /* "a NATURAL join m..." */, libc.VaList(bp, 0)) + ts+18376, libc.VaList(bp, 0)) return 1 } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { @@ -115252,7 +115482,7 @@ __1: // Disallow both ON and USING clauses in the same join if (*SrcItem)(unsafe.Pointer(pRight)).FpOn != 0 && (*SrcItem)(unsafe.Pointer(pRight)).FpUsing != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18257 /* "cannot have both..." */, 0) + ts+18426, 0) return 1 } @@ -115287,7 +115517,7 @@ __1: if iRightCol < 0 || !(tableAndColumnIndex(tls, pSrc, i+1, zName, bp+24, bp+28, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18312 /* "cannot join usin..." */, libc.VaList(bp+8, zName)) + ts+18481, libc.VaList(bp+8, zName)) return 1 } addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), i+1, iRightCol, @@ -115310,11 +115540,11 @@ __3: // An instance of this object holds information (beyond pParse and pSelect) // needed to load the next result row that is to be added to the sorter. -type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:133768:28 */ +type RowLoadInfo = RowLoadInfo1 /* sqlite3.c:133799:28 */ // This routine does the work of loading query data into an array of // registers so that it can be added to the sorter. -func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:133782:13: */ +func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uintptr) { /* sqlite3.c:133813:13: */ Xsqlite3ExprCodeExprList(tls, pParse, (*Select)(unsafe.Pointer(pSelect)).FpEList, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FregResult, 0, (*RowLoadInfo)(unsafe.Pointer(pInfo)).FecelFlags) } @@ -115323,7 +115553,7 @@ func innerLoopLoadRow(tls *libc.TLS, pParse uintptr, pSelect uintptr, pInfo uint // added into the sorter. // // Return the register in which the result is stored. -func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:133803:12: */ +func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regBase int32, nBase int32) int32 { /* sqlite3.c:133834:12: */ var nOBSat int32 = (*SortCtx)(unsafe.Pointer(pSort)).FnOBSat var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var regOut int32 = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -115336,7 +115566,7 @@ func makeSorterRecord(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uint // Generate code that will push the record in registers regData // through regData+nData-1 onto the sorter. -func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:133824:13: */ +func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintptr, regData int32, regOrigData int32, nData int32, nPrefixReg int32) { /* sqlite3.c:133855:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Stmt under construction var bSeq int32 = libc.Bool32(int32((*SortCtx)(unsafe.Pointer(pSort)).FsortFlags)&SORTFLAG_UseSorter == 0) var nExpr int32 = (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(pSort)).FpOrderBy)).FnExpr // No. of ORDER BY terms @@ -115479,7 +115709,7 @@ func pushOntoSorter(tls *libc.TLS, pParse uintptr, pSort uintptr, pSelect uintpt } // Add code to implement the OFFSET -func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:133966:13: */ +func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* sqlite3.c:133997:13: */ if iOffset > 0 { Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, iOffset, iContinue, 1) @@ -115527,7 +115757,7 @@ func codeOffset(tls *libc.TLS, v uintptr, iOffset int32, iContinue int32) { /* s // how many elements there are in the array of registers and (b) the // collation sequences that should be used for the comparisons if // eTnctType is WHERE_DISTINCT_ORDERED. -func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134020:12: */ +func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, addrRepeat int32, pEList uintptr, regElem int32) int32 { /* sqlite3.c:134051:12: */ var iRet int32 = 0 var nResultCol int32 = (*ExprList)(unsafe.Pointer(pEList)).FnExpr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -115608,7 +115838,7 @@ func codeDistinct(tls *libc.TLS, pParse uintptr, eTnctType int32, iTab int32, ad // The ephemeral table is not needed. But we do need register // iVal to be initialized to NULL. So change the OP_OpenEphemeral // into an OP_Null on the iVal register. -func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:134104:13: */ +func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int32, iOpenEphAddr int32) { /* sqlite3.c:134135:13: */ if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 && (eTnctType == WHERE_DISTINCT_UNIQUE || eTnctType == WHERE_DISTINCT_ORDERED) { var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -115636,7 +115866,7 @@ func fixDistinctOpenEph(tls *libc.TLS, pParse uintptr, eTnctType int32, iVal int // are evaluated in order to get the data for this row. If srcTab is // zero or more, then data is pulled from srcTab and p->pEList is used only // to get the number of columns and the collation sequence for each column. -func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:134226:13: */ +func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSort uintptr, pDistinct uintptr, pDest uintptr, iContinue int32, iBreak int32) { /* sqlite3.c:134257:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -115745,7 +115975,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo (*SortCtx)(unsafe.Pointer(pSort)).FpDeferredRowLoad = bp /* &sRowLoadInfo */ regOrig = 0 } else { - innerLoopLoadRow(tls, pParse, p, bp /* &sRowLoadInfo */) + innerLoopLoadRow(tls, pParse, p, bp) } } @@ -115992,7 +116222,7 @@ func selectInnerLoop(tls *libc.TLS, pParse uintptr, p uintptr, srcTab int32, pSo // Allocate a KeyInfo object sufficient for an index of N key columns and // X extra columns. -func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:134620:24: */ +func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { /* sqlite3.c:134651:24: */ var nExtra int32 = int32(uint32(N+X)*(uint32(unsafe.Sizeof(uintptr(0)))+uint32(1)) - uint32(unsafe.Sizeof(uintptr(0)))) var p uintptr = Xsqlite3DbMallocRawNN(tls, db, uint64(uint32(unsafe.Sizeof(KeyInfo{}))+uint32(nExtra))) if p != 0 { @@ -116010,7 +116240,7 @@ func Xsqlite3KeyInfoAlloc(tls *libc.TLS, db uintptr, N int32, X int32) uintptr { } // Deallocate a KeyInfo object -func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:134640:21: */ +func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:134671:21: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef-- @@ -116021,7 +116251,7 @@ func Xsqlite3KeyInfoUnref(tls *libc.TLS, p uintptr) { /* sqlite3.c:134640:21: */ } // Make a new pointer to a KeyInfo object -func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134651:24: */ +func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134682:24: */ if p != 0 { (*KeyInfo)(unsafe.Pointer(p)).FnRef++ @@ -116041,7 +116271,7 @@ func Xsqlite3KeyInfoRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:134651: // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for seeing that this structure is eventually // freed. -func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:134683:24: */ +func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, iStart int32, nExtra int32) uintptr { /* sqlite3.c:134714:24: */ var nExpr int32 var pInfo uintptr var pItem uintptr @@ -116075,20 +116305,20 @@ func Xsqlite3KeyInfoFromExprList(tls *libc.TLS, pParse uintptr, pList uintptr, i } // Name of the connection operator, used for error messages. -func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:134710:27: */ +func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:134741:27: */ var z uintptr switch id { case TK_ALL: - z = ts + 18376 /* "UNION ALL" */ + z = ts + 18545 /* "UNION ALL" */ break case TK_INTERSECT: - z = ts + 18386 /* "INTERSECT" */ + z = ts + 18555 /* "INTERSECT" */ break case TK_EXCEPT: - z = ts + 18396 /* "EXCEPT" */ + z = ts + 18565 /* "EXCEPT" */ break default: - z = ts + 18403 /* "UNION" */ + z = ts + 18572 /* "UNION" */ break } return z @@ -116102,11 +116332,11 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:134710 // // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. -func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:134732:13: */ +func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:134763:13: */ bp := tls.Alloc(8) defer tls.Free(8) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18409 /* "USE TEMP B-TREE ..." */, libc.VaList(bp, zUsage)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18578, libc.VaList(bp, zUsage)) } // Assign expression b to lvalue a. A second, no-op, version of this macro @@ -116119,7 +116349,7 @@ func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite // then the results were placed in a sorter. After the loop is terminated // we need to run the sorter and output the results. The following // routine generates the code needed to do that. -func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:134758:13: */ +func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, nColumn int32, pDest uintptr) { /* sqlite3.c:134789:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The prepared statement var addrBreak int32 = (*SortCtx)(unsafe.Pointer(pSort)).FlabelDone // Jump here to exit loop var addrContinue int32 = Xsqlite3VdbeMakeLabel(tls, pParse) // Jump here for next cycle @@ -116295,7 +116525,7 @@ func generateSortTail(tls *libc.TLS, pParse uintptr, p uintptr, pSort uintptr, n // // This routine has either 3 or 6 parameters depending on whether or not // the SQLITE_ENABLE_COLUMN_METADATA compile-time option is used. -func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:134983:19: */ +func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, pzOrigTab uintptr, pzOrigCol uintptr) uintptr { /* sqlite3.c:135014:19: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -116362,7 +116592,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pS)).FpSrc (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpNext = pNC (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse - zType = columnTypeImpl(tls, bp /* &sNC */, p, bp+32 /* &zOrigDb */, bp+36 /* &zOrigTab */, bp+40 /* &zOrigCol */) + zType = columnTypeImpl(tls, bp, p, bp+32, bp+36, bp+40) } } else { // A real table or a CTE table @@ -116372,8 +116602,8 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, } if iCol < 0 { - zType = ts + 1090 /* "INTEGER" */ - *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = ts + 15961 /* "rowid" */ + zType = ts + 1112 /* "INTEGER" */ + *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = ts + 16134 /* "rowid" */ } else { *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName zType = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, uintptr(0)) @@ -116402,7 +116632,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, (*NameContext)(unsafe.Pointer(bp + 44 /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pS)).FpSrc (*NameContext)(unsafe.Pointer(bp + 44 /* &sNC */)).FpNext = pNC (*NameContext)(unsafe.Pointer(bp + 44 /* &sNC */)).FpParse = (*NameContext)(unsafe.Pointer(pNC)).FpParse - zType = columnTypeImpl(tls, bp+44 /* &sNC */, p, bp+32 /* &zOrigDb */, bp+36 /* &zOrigTab */, bp+40 /* &zOrigCol */) + zType = columnTypeImpl(tls, bp+44, p, bp+32, bp+36, bp+40) break } @@ -116419,7 +116649,7 @@ func columnTypeImpl(tls *libc.TLS, pNC uintptr, pExpr uintptr, pzOrigDb uintptr, // Generate code that will tell the VDBE the declaration types of columns // in the result set. -func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:135134:13: */ +func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList uintptr) { /* sqlite3.c:135165:13: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -116436,7 +116666,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList *(*uintptr)(unsafe.Pointer(bp + 32 /* zOrigDb */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 36 /* zOrigTab */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 40 /* zOrigCol */)) = uintptr(0) - zType = columnTypeImpl(tls, bp /* &sNC */, p, bp+32 /* &zOrigDb */, bp+36 /* &zOrigTab */, bp+40 /* &zOrigCol */) + zType = columnTypeImpl(tls, bp, p, bp+32, bp+36, bp+40) // The vdbe must make its own copy of the column-type and other // column specific strings, in case the schema is reset before this @@ -116476,7 +116706,7 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // full=ON, short=ANY: If the result refers directly to a table column, // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. -func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:135201:21: */ +func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:135232:21: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -116528,13 +116758,13 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } if iCol < 0 { - zCol = ts + 15961 /* "rowid" */ + zCol = ts + 16134 /* "rowid" */ } else { zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } if fullName != 0 { var zName uintptr = uintptr(0) - zName = Xsqlite3MPrintf(tls, db, ts+11899 /* "%s.%s" */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) + zName = Xsqlite3MPrintf(tls, db, ts+11921, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, zCol)) Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zName, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault}))) } else { Xsqlite3VdbeSetColName(tls, v, i, COLNAME_NAME, zCol, libc.UintptrFromInt32(-1)) @@ -116542,7 +116772,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer(pEList + 8 + uintptr(i)*20)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18432 /* "column%d" */, libc.VaList(bp+16, i+1)) + z = Xsqlite3MPrintf(tls, db, ts+18601, libc.VaList(bp+16, i+1)) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -116572,7 +116802,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // when modifying this routine to avoid breaking legacy. // // See Also: sqlite3GenerateColumnNames() -func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:135294:20: */ +func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:135325:20: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -116590,7 +116820,7 @@ func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, // Hash table of column names var pTab uintptr - Xsqlite3HashInit(tls, bp+32 /* &ht */) + Xsqlite3HashInit(tls, bp+32) if pEList != 0 { nCol = (*ExprList)(unsafe.Pointer(pEList)).FnExpr aCol = Xsqlite3DbMallocZero(tls, db, uint64(uint32(unsafe.Sizeof(Column{}))*uint32(nCol))) @@ -116633,7 +116863,7 @@ __1: if iCol >= 0 { zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(iCol)*16)).FzCnName } else { - zName = ts + 15961 /* "rowid" */ + zName = ts + 16134 /* "rowid" */ } } else if int32((*Expr)(unsafe.Pointer(pColExpr)).Fop) == TK_ID { @@ -116646,7 +116876,7 @@ __1: if zName != 0 && !(Xsqlite3IsTrueOrFalse(tls, zName) != 0) { zName = Xsqlite3DbStrDup(tls, db, zName) } else { - zName = Xsqlite3MPrintf(tls, db, ts+18432 /* "column%d" */, libc.VaList(bp, i+1)) + zName = Xsqlite3MPrintf(tls, db, ts+18601, libc.VaList(bp, i+1)) } // Make sure the column name is unique. If the name is not unique, @@ -116661,9 +116891,9 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18441 /* "%.*z:%u" */, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48 /* cnt */)), 1))) + zName = Xsqlite3MPrintf(tls, db, ts+18610, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 48 /* cnt */)), 1))) if *(*U32)(unsafe.Pointer(bp + 48)) > U32(3) { - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48 /* &cnt */) + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+48) } } (*Column)(unsafe.Pointer(pCol)).FzCnName = zName @@ -116682,7 +116912,7 @@ __2: goto __3 __3: ; - Xsqlite3HashClear(tls, bp+32 /* &ht */) + Xsqlite3HashClear(tls, bp+32) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { for j = 0; j < i; j++ { Xsqlite3DbFree(tls, db, (*Column)(unsafe.Pointer(aCol+uintptr(j)*16)).FzCnName) @@ -116704,7 +116934,7 @@ __3: // // This routine requires that all identifiers in the SELECT // statement be resolved. -func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:135401:21: */ +func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab uintptr, pSelect uintptr, aff int8) { /* sqlite3.c:135432:21: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -116720,7 +116950,7 @@ func Xsqlite3SelectAddColumnTypeAndCollation(tls *libc.TLS, pParse uintptr, pTab if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return } - libc.Xmemset(tls, bp /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp /* &sNC */)).FpSrcList = (*Select)(unsafe.Pointer(pSelect)).FpSrc a = (*Select)(unsafe.Pointer(pSelect)).FpEList + 8 /* &.a */ i = 0 @@ -116735,7 +116965,7 @@ __1: var m I64 *(*U32)(unsafe.Pointer(pTab + 28)) |= U32(int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_NOINSERT) p = (*ExprList_item)(unsafe.Pointer(a + uintptr(i)*20)).FpExpr - zType = columnTypeImpl(tls, bp /* &sNC */, p, uintptr(0), uintptr(0), uintptr(0)) + zType = columnTypeImpl(tls, bp, p, uintptr(0), uintptr(0), uintptr(0)) // pCol->szEst = ... // Column size est for SELECT tables never used (*Column)(unsafe.Pointer(pCol)).Faffinity = Xsqlite3ExprAffinity(tls, p) if zType != 0 { @@ -116773,7 +117003,7 @@ __3: // Given a SELECT statement, generate a Table structure that describes // the result set of that SELECT. -func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:135456:22: */ +func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, aff int8) uintptr { /* sqlite3.c:135487:22: */ var pTab uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var savedFlags U64 @@ -116808,7 +117038,7 @@ func Xsqlite3ResultSetOfSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, a // Get a VDBE for the given parser context. Create a new one if necessary. // If an error occurs, return NULL and leave a message in pParse. -func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:135489:21: */ +func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:135520:21: */ if (*Parse)(unsafe.Pointer(pParse)).FpVdbe != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpVdbe } @@ -116840,7 +117070,7 @@ func Xsqlite3GetVdbe(tls *libc.TLS, pParse uintptr) uintptr { /* sqlite3.c:13548 // redefined. The UNION ALL operator uses this property to force // the reuse of the same limit and offset registers across multiple // SELECT statements. -func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:135525:13: */ +func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int32) { /* sqlite3.c:135556:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -116897,7 +117127,7 @@ func computeLimitRegisters(tls *libc.TLS, pParse uintptr, p uintptr, iBreak int3 // // The collating sequence for the compound select is taken from the // left-most term of the select that has a collating sequence. -func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:135582:16: */ +func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:135613:16: */ var pRet uintptr if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { pRet = multiSelectCollSeq(tls, pParse, (*Select)(unsafe.Pointer(p)).FpPrior, iCol) @@ -116921,7 +117151,7 @@ func multiSelectCollSeq(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) ui // Space to hold the KeyInfo structure is obtained from malloc. The calling // function is responsible for ensuring that this structure is eventually // freed. -func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:135608:16: */ +func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra int32) uintptr { /* sqlite3.c:135639:16: */ var pOrderBy uintptr = (*Select)(unsafe.Pointer(p)).FpOrderBy var nOrderBy int32 if pOrderBy != uintptr(0) { @@ -116990,7 +117220,7 @@ func multiSelectOrderByKeyInfo(tls *libc.TLS, pParse uintptr, p uintptr, nExtra // with a positive value, then the first OFFSET outputs are discarded rather // than being sent to pDest. The LIMIT count does not begin until after OFFSET // rows have been skipped. -func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:135674:13: */ +func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) { /* sqlite3.c:135705:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -117026,7 +117256,7 @@ func generateWithRecursiveQuery(tls *libc.TLS, pParse uintptr, p uintptr, pDest if !((*Select)(unsafe.Pointer(p)).FpWin != 0) { goto __1 } - Xsqlite3ErrorMsg(tls, pParse, ts+18449 /* "cannot use windo..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18618, 0) return __1: ; @@ -117093,7 +117323,7 @@ __7: } __8: ; - Xsqlite3SelectDestInit(tls, bp /* &destQueue */, eDest, iQueue) + Xsqlite3SelectDestInit(tls, bp, eDest, iQueue) // Allocate cursors for Current, Queue, and Distinct. regCurrent = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) @@ -117136,7 +117366,7 @@ __12: if !((*Select)(unsafe.Pointer(pFirstRec)).FselFlags&U32(SF_Aggregate) != 0) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+18498 /* "recursive aggreg..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18667, 0) goto end_of_recursive_query __15: ; @@ -117158,8 +117388,8 @@ __14: // Store the results of the setup-query in Queue. pSetup = (*Select)(unsafe.Pointer(pFirstRec)).FpPrior (*Select)(unsafe.Pointer(pSetup)).FpNext = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18540 /* "SETUP" */, 0) - rc = Xsqlite3Select(tls, pParse, pSetup, bp /* &destQueue */) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18709, 0) + rc = Xsqlite3Select(tls, pParse, pSetup, bp) (*Select)(unsafe.Pointer(pSetup)).FpNext = p if !(rc != 0) { goto __17 @@ -117201,8 +117431,8 @@ __20: // Execute the recursive SELECT taking the single row in Current as // the value for the recursive-table. Store the results in the Queue. (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = uintptr(0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18546 /* "RECURSIVE STEP" */, 0) - Xsqlite3Select(tls, pParse, p, bp /* &destQueue */) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18715, 0) + Xsqlite3Select(tls, pParse, p, bp) (*Select)(unsafe.Pointer(pFirstRec)).FpPrior = pSetup @@ -117231,7 +117461,7 @@ end_of_recursive_query: // clause occurs within scalar expression (ex: "SELECT (VALUES(1),(2),(3))"). // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. -func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:135850:12: */ +func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:135881:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -117251,11 +117481,11 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) p = (*Select)(unsafe.Pointer(p)).FpPrior nRow = nRow + bShowAll } - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18561 /* "SCAN %d CONSTANT..." */, libc.VaList(bp, nRow, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18730, libc.VaList(bp, nRow, func() uintptr { if nRow == 1 { - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ } - return ts + 18584 /* "S" */ + return ts + 18753 /* "S" */ }())) for p != 0 { selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, 1, 1) @@ -117271,7 +117501,7 @@ func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Return true if the SELECT statement which is known to be the recursive // part of a recursive CTE still has its anchor terms attached. If the // anchor terms have already been removed, then return false. -func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:135887:12: */ +func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:135918:12: */ for p != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) { p = (*Select)(unsafe.Pointer(p)).FpPrior } @@ -117307,7 +117537,7 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:135887:12: */ // // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. -func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:135923:12: */ +func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:135954:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -117375,7 +117605,7 @@ __1: if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) != 0) { goto __2 } - rc = multiSelectValues(tls, pParse, p, bp+16 /* &dest */) + rc = multiSelectValues(tls, pParse, p, bp+16) if !(rc >= 0) { goto __3 } @@ -117392,7 +117622,7 @@ __2: if !((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Recursive) != U32(0) && hasAnchor(tls, p) != 0) { goto __4 } - generateWithRecursiveQuery(tls, pParse, p, bp+16 /* &dest */) + generateWithRecursiveQuery(tls, pParse, p, bp+16) goto __5 __4: @@ -117407,8 +117637,8 @@ __6: if !((*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0)) { goto __8 } - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18586 /* "COMPOUND QUERY" */, 0) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18601 /* "LEFT-MOST SUBQUE..." */, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18755, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18770, 0) __8: ; @@ -117432,7 +117662,7 @@ __10: (*Select)(unsafe.Pointer(pPrior)).FiOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(pPrior)).FpLimit = (*Select)(unsafe.Pointer(p)).FpLimit - rc = Xsqlite3Select(tls, pParse, pPrior, bp+16 /* &dest */) + rc = Xsqlite3Select(tls, pParse, pPrior, bp+16) (*Select)(unsafe.Pointer(pPrior)).FpLimit = uintptr(0) if !(rc != 0) { goto __14 @@ -117457,9 +117687,9 @@ __16: ; __15: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18376 /* "UNION ALL" */, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18545, 0) - rc = Xsqlite3Select(tls, pParse, p, bp+16 /* &dest */) + rc = Xsqlite3Select(tls, pParse, p, bp+16) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior @@ -117508,9 +117738,9 @@ __20: // Code the SELECT statements to our left - Xsqlite3SelectDestInit(tls, bp+48 /* &uniondest */, priorOp, unionTab) + Xsqlite3SelectDestInit(tls, bp+48, priorOp, unionTab) - rc = Xsqlite3Select(tls, pParse, pPrior, bp+48 /* &uniondest */) + rc = Xsqlite3Select(tls, pParse, pPrior, bp+48) if !(rc != 0) { goto __21 } @@ -117533,9 +117763,9 @@ __23: pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 48 /* &uniondest */)).FeDest = op - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18620 /* "%s USING TEMP B-..." */, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18789, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) - rc = Xsqlite3Select(tls, pParse, p, bp+48 /* &uniondest */) + rc = Xsqlite3Select(tls, pParse, p, bp+48) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior @@ -117563,7 +117793,7 @@ __24: Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, unionTab, iBreak) iStart = Xsqlite3VdbeCurrentAddr(tls, v) selectInnerLoop(tls, pParse, p, unionTab, - uintptr(0), uintptr(0), bp+16 /* &dest */, iCont, iBreak) + uintptr(0), uintptr(0), bp+16, iCont, iBreak) Xsqlite3VdbeResolveLabel(tls, v, iCont) Xsqlite3VdbeAddOp2(tls, v, OP_Next, unionTab, iStart) Xsqlite3VdbeResolveLabel(tls, v, iBreak) @@ -117587,9 +117817,9 @@ __13: *(*U32)(unsafe.Pointer(findRightmost(tls, p) + 4)) |= U32(SF_UsesEphemeral) // Code the SELECTs to our left into temporary table "tab1". - Xsqlite3SelectDestInit(tls, bp+76 /* &intersectdest */, SRT_Union, tab1) + Xsqlite3SelectDestInit(tls, bp+76, SRT_Union, tab1) - rc = Xsqlite3Select(tls, pParse, pPrior, bp+76 /* &intersectdest */) + rc = Xsqlite3Select(tls, pParse, pPrior, bp+76) if !(rc != 0) { goto __26 } @@ -117605,9 +117835,9 @@ __26: pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) (*SelectDest)(unsafe.Pointer(bp + 76 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18620 /* "%s USING TEMP B-..." */, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18789, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) - rc = Xsqlite3Select(tls, pParse, p, bp+76 /* &intersectdest */) + rc = Xsqlite3Select(tls, pParse, p, bp+76) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior @@ -117639,7 +117869,7 @@ __28: Xsqlite3ReleaseTempReg(tls, pParse, r1) selectInnerLoop(tls, pParse, p, tab1, - uintptr(0), uintptr(0), bp+16 /* &dest */, iCont1, iBreak1) + uintptr(0), uintptr(0), bp+16, iCont1, iBreak1) Xsqlite3VdbeResolveLabel(tls, v, iCont1) Xsqlite3VdbeAddOp2(tls, v, OP_Next, tab1, iStart1) Xsqlite3VdbeResolveLabel(tls, v, iBreak1) @@ -117770,15 +118000,15 @@ __44: // Error message for when two or more terms of a compound select have different // size result sets. -func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:136279:21: */ +func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:136310:21: */ bp := tls.Alloc(8) defer tls.Free(8) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Values) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18641 /* "all VALUES must ..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+18810, 0) } else { Xsqlite3ErrorMsg(tls, pParse, - ts+18687, /* "SELECTs to the l..." */ + ts+18856, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) } } @@ -117801,7 +118031,7 @@ func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) // // If the LIMIT found in p->iLimit is reached, jump immediately to // iBreak. -func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:136309:12: */ +func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uintptr, pDest uintptr, regReturn int32, regPrev int32, pKeyInfo uintptr, iBreak int32) int32 { /* sqlite3.c:136340:12: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var iContinue int32 var addr int32 @@ -117997,7 +118227,7 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // actually called using Gosub and they do not Return. EofA and EofB loop // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. -func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136517:12: */ +func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:136548:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -118158,9 +118388,9 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Separate the left and the right query from one another (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) (*Select)(unsafe.Pointer(pPrior)).FpNext = uintptr(0) - Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7098 /* "ORDER" */) + Xsqlite3ResolveOrderGroupBy(tls, pParse, p, (*Select)(unsafe.Pointer(p)).FpOrderBy, ts+7120) if (*Select)(unsafe.Pointer(pPrior)).FpPrior == uintptr(0) { - Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7098 /* "ORDER" */) + Xsqlite3ResolveOrderGroupBy(tls, pParse, pPrior, (*Select)(unsafe.Pointer(pPrior)).FpOrderBy, ts+7120) } // Compute the limit registers @@ -118186,10 +118416,10 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) regAddrB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regOutA = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regOutB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) - Xsqlite3SelectDestInit(tls, bp+8 /* &destA */, SRT_Coroutine, regAddrA) - Xsqlite3SelectDestInit(tls, bp+36 /* &destB */, SRT_Coroutine, regAddrB) + Xsqlite3SelectDestInit(tls, bp+8, SRT_Coroutine, regAddrA) + Xsqlite3SelectDestInit(tls, bp+36, SRT_Coroutine, regAddrB) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18769 /* "MERGE (%s)" */, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18938, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) // Generate a coroutine to evaluate the SELECT statement to the // left of the compound operator - the "A" select. @@ -118197,8 +118427,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regAddrA, 0, addrSelectA) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18780 /* "LEFT" */, 0) - Xsqlite3Select(tls, pParse, pPrior, bp+8 /* &destA */) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18949, 0) + Xsqlite3Select(tls, pParse, pPrior, bp+8) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -118211,8 +118441,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) savedOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18785 /* "RIGHT" */, 0) - Xsqlite3Select(tls, pParse, p, bp+36 /* &destB */) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18954, 0) + Xsqlite3Select(tls, pParse, p, bp+36) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset Xsqlite3VdbeEndCoroutine(tls, v, regAddrB) @@ -118221,7 +118451,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // select as the next output row of the compound select. addrOutA = generateOutputSubroutine(tls, pParse, - p, bp+8 /* &destA */, pDest, regOutA, + p, bp+8, pDest, regOutA, regPrev, pKeyDup, labelEnd) // Generate a subroutine that outputs the current row of the B @@ -118229,7 +118459,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) if op == TK_ALL || op == TK_UNION { addrOutB = generateOutputSubroutine(tls, pParse, - p, bp+36 /* &destB */, pDest, regOutB, + p, bp+36, pDest, regOutB, regPrev, pKeyDup, labelEnd) } Xsqlite3KeyInfoUnref(tls, pKeyDup) @@ -118332,14 +118562,14 @@ type SubstContext1 = struct { FiNewTable int32 FisLeftJoin int32 FpEList uintptr -} /* sqlite3.c:136829:9 */ +} /* sqlite3.c:136860:9 */ // An instance of the SubstContext object describes an substitution edit // to be performed on a parse tree. // // All references to columns in table iTable are to be replaced by corresponding // expressions in pEList. -type SubstContext = SubstContext1 /* sqlite3.c:136835:3 */ +type SubstContext = SubstContext1 /* sqlite3.c:136866:3 */ // Scan through the expression pExpr. Replace every reference to // a column in table number iTable with a copy of the iColumn-th @@ -118352,7 +118582,7 @@ type SubstContext = SubstContext1 /* sqlite3.c:136835:3 */ // FORM clause entry is iTable. This routine makes the necessary // changes to pExpr so that it refers directly to the source table // of the subquery rather the result set of the subquery. -func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:136854:13: */ +func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite3.c:136885:13: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -118376,7 +118606,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite } else { var db uintptr = (*Parse)(unsafe.Pointer((*SubstContext)(unsafe.Pointer(pSubst)).FpParse)).Fdb if (*SubstContext)(unsafe.Pointer(pSubst)).FisLeftJoin != 0 && int32((*Expr)(unsafe.Pointer(pCopy)).Fop) != TK_COLUMN { - libc.Xmemset(tls, bp /* &ifNullRow */, 0, uint32(unsafe.Sizeof(Expr{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Expr{}))) (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).Fop = U8(TK_IF_NULL_ROW) (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).FpLeft = pCopy (*Expr)(unsafe.Pointer(bp /* &ifNullRow */)).FiTable = (*SubstContext)(unsafe.Pointer(pSubst)).FiNewTable @@ -118407,7 +118637,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite if pColl != 0 { return (*CollSeq)(unsafe.Pointer(pColl)).FzName } - return ts + 1070 + return ts + 1092 }()) } *(*U32)(unsafe.Pointer(pExpr + 4)) &= libc.Uint32FromInt32(libc.CplInt32(EP_Collate)) @@ -118435,7 +118665,7 @@ func substExpr(tls *libc.TLS, pSubst uintptr, pExpr uintptr) uintptr { /* sqlite return pExpr } -func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:136939:13: */ +func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c:136970:13: */ var i int32 if pList == uintptr(0) { return @@ -118445,7 +118675,7 @@ func substExprList(tls *libc.TLS, pSubst uintptr, pList uintptr) { /* sqlite3.c: } } -func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:136949:13: */ +func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* sqlite3.c:136980:13: */ var pSrc uintptr var pItem uintptr var i int32 @@ -118488,7 +118718,7 @@ func substSelect(tls *libc.TLS, pSubst uintptr, p uintptr, doPrior int32) { /* s // // This routine scans the entire SELECT statement and recomputes the // pSrcItem->colUsed mask. -func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:136984:12: */ +func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137015:12: */ var pItem uintptr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLUMN { return WRC_Continue @@ -118504,7 +118734,7 @@ func recomputeColumnsUsedExpr(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int return WRC_Continue } -func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:136993:13: */ +func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* sqlite3.c:137024:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -118513,7 +118743,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* if (*SrcItem)(unsafe.Pointer(pSrcItem)).FpTab == uintptr(0) { return } - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{recomputeColumnsUsedExpr})) @@ -118522,7 +118752,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* }{Xsqlite3SelectWalkNoop})) *(*uintptr)(unsafe.Pointer(bp + 24)) = pSrcItem (*SrcItem)(unsafe.Pointer(pSrcItem)).FcolUsed = uint64(0) - Xsqlite3WalkSelect(tls, bp /* &w */, pSelect) + Xsqlite3WalkSelect(tls, bp, pSelect) } // Assign new cursor numbers to each of the items in pSrc. For each @@ -118536,7 +118766,7 @@ func recomputeColumnsUsed(tls *libc.TLS, pSelect uintptr, pSrcItem uintptr) { /* // // If pSrc contains any sub-selects, call this routine recursively // on the FROM clause of each such sub-select, with iExcept set to -1. -func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137022:13: */ +func srclistRenumberCursors(tls *libc.TLS, pParse uintptr, aCsrMap uintptr, pSrc uintptr, iExcept int32) { /* sqlite3.c:137053:13: */ var i int32 var pItem uintptr i = 0 @@ -118569,7 +118799,7 @@ __3: } // *piCursor is a cursor number. Change it if it needs to be mapped. -func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:137048:13: */ +func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { /* sqlite3.c:137079:13: */ var aCsrMap uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var iCsr int32 = *(*int32)(unsafe.Pointer(piCursor)) if iCsr < *(*int32)(unsafe.Pointer(aCsrMap)) && *(*int32)(unsafe.Pointer(aCsrMap + uintptr(iCsr+1)*4)) > 0 { @@ -118579,7 +118809,7 @@ func renumberCursorDoMapping(tls *libc.TLS, pWalker uintptr, piCursor uintptr) { // Expression walker callback used by renumberCursors() to update // Expr objects to match newly assigned cursor numbers. -func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137060:12: */ +func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137091:12: */ var op int32 = int32((*Expr)(unsafe.Pointer(pExpr)).Fop) if op == TK_COLUMN || op == TK_IF_NULL_ROW { renumberCursorDoMapping(tls, pWalker, pExpr+28) @@ -118606,14 +118836,14 @@ func renumberCursorsCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* // * the array entries for all cursor numbers that do *not* appear in // FROM clauses of the select statement as described above are // initialized to zero. -func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:137089:13: */ +func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aCsrMap uintptr) { /* sqlite3.c:137120:13: */ bp := tls.Alloc(28) defer tls.Free(28) // var w Walker at bp, 28 srclistRenumberCursors(tls, pParse, aCsrMap, (*Select)(unsafe.Pointer(p)).FpSrc, iExcept) - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) *(*uintptr)(unsafe.Pointer(bp + 24)) = aCsrMap (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -118621,7 +118851,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3SelectWalkNoop})) - Xsqlite3WalkSelect(tls, bp /* &w */, p) + Xsqlite3WalkSelect(tls, bp, p) } // This routine attempts to flatten subqueries as a performance optimization. @@ -118776,7 +119006,7 @@ func renumberCursors(tls *libc.TLS, pParse uintptr, p uintptr, iExcept int32, aC // // All of the expression analysis must occur on both the outer query and // the subquery before this routine runs. -func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:137260:12: */ +func flattenSubquery(tls *libc.TLS, pParse uintptr, p uintptr, iFrom int32, isAgg int32) int32 { /* sqlite3.c:137291:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -119157,7 +119387,7 @@ __1: (*SubstContext)(unsafe.Pointer(bp /* &x */)).FiNewTable = iNewParent (*SubstContext)(unsafe.Pointer(bp /* &x */)).FisLeftJoin = isLeftJoin (*SubstContext)(unsafe.Pointer(bp /* &x */)).FpEList = (*Select)(unsafe.Pointer(pSub)).FpEList - substSelect(tls, bp /* &x */, pParent, 0) + substSelect(tls, bp, pParent, 0) } // The flattened query is a compound if either the inner or the @@ -119192,8 +119422,8 @@ __3: // Finially, delete what is left of the subquery and return // success. - Xsqlite3AggInfoPersistWalkerInit(tls, bp+20 /* &w */, pParse) - Xsqlite3WalkSelect(tls, bp+20 /* &w */, pSub1) + Xsqlite3AggInfoPersistWalkerInit(tls, bp+20, pParse) + Xsqlite3WalkSelect(tls, bp+20, pSub1) Xsqlite3SelectDelete(tls, db, pSub1) return 1 @@ -119201,7 +119431,7 @@ __3: // A structure to keep track of all of the column values that are fixed to // a known value due to WHERE clause constraints of the form COLUMN=VALUE. -type WhereConst = WhereConst1 /* sqlite3.c:137684:27 */ +type WhereConst = WhereConst1 /* sqlite3.c:137715:27 */ // Add a new entry to the pConst object. Except, do not add duplicate // pColumn entires. Also, do not add if doing so would not be appropriate. @@ -119209,7 +119439,7 @@ type WhereConst = WhereConst1 /* sqlite3.c:137684:27 */ // The caller guarantees the pColumn is a column and pValue is a constant. // This routine has to do some additional checks before completing the // insert. -func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:137702:13: */ +func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, pExpr uintptr) { /* sqlite3.c:137733:13: */ var i int32 if (*Expr)(unsafe.Pointer(pColumn)).Fflags&U32(EP_FixedCol) != U32(0) { @@ -119251,7 +119481,7 @@ func constInsert(tls *libc.TLS, pConst uintptr, pColumn uintptr, pValue uintptr, // is a constant expression and where the term must be true because it // is part of the AND-connected terms of the expression. For each term // found, add it to the pConst structure. -func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:137750:13: */ +func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3.c:137781:13: */ var pRight uintptr var pLeft uintptr if pExpr == uintptr(0) { @@ -119286,7 +119516,7 @@ func findConstInWhere(tls *libc.TLS, pConst uintptr, pExpr uintptr) { /* sqlite3 // then overwrite it with the corresponding value. Except, do not do so // if argument bIgnoreAffBlob is non-zero and the affinity of pExpr // is SQLITE_AFF_BLOB. -func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:137781:12: */ +func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintptr, bIgnoreAffBlob int32) int32 { /* sqlite3.c:137812:12: */ var i int32 if *(*U8)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(pConst)).FpOomFault)) != 0 { return WRC_Prune @@ -119340,7 +119570,7 @@ func propagateConstantExprRewriteOne(tls *libc.TLS, pConst uintptr, pExpr uintpt // uses an affinity other than TEXT and one of its immediate // children is a column that matches one of the columns in // pWalker->u.pConst. -func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137830:12: */ +func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:137861:12: */ var pConst uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) if (*WhereConst)(unsafe.Pointer(pConst)).FbHasAffBlob != 0 { @@ -119407,7 +119637,7 @@ func propagateConstantExprRewrite(tls *libc.TLS, pWalker uintptr, pExpr uintptr) // operators ==, <=, <, >=, >, or IS in a way that will cause the correct // type conversions to occur. See logic associated with the bHasAffBlob flag // for details. -func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:137901:12: */ +func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:137932:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -119423,9 +119653,9 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql (*WhereConst)(unsafe.Pointer(bp /* &x */)).FnChng = 0 (*WhereConst)(unsafe.Pointer(bp /* &x */)).FapExpr = uintptr(0) (*WhereConst)(unsafe.Pointer(bp /* &x */)).FbHasAffBlob = 0 - findConstInWhere(tls, bp /* &x */, (*Select)(unsafe.Pointer(p)).FpWhere) + findConstInWhere(tls, bp, (*Select)(unsafe.Pointer(p)).FpWhere) if (*WhereConst)(unsafe.Pointer(bp)).FnConst != 0 { - libc.Xmemset(tls, bp+24 /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp+24, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FpParse = pParse (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -119436,7 +119666,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FxSelectCallback2 = uintptr(0) (*Walker)(unsafe.Pointer(bp + 24 /* &w */)).FwalkerDepth = 0 *(*uintptr)(unsafe.Pointer(bp + 24 + 24)) = bp /* &x */ - Xsqlite3WalkExpr(tls, bp+24 /* &w */, (*Select)(unsafe.Pointer(p)).FpWhere) + Xsqlite3WalkExpr(tls, bp+24, (*Select)(unsafe.Pointer(p)).FpWhere) Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer((*WhereConst)(unsafe.Pointer(bp /* &x */)).FpParse)).Fdb, (*WhereConst)(unsafe.Pointer(bp /* &x */)).FapExpr) nChng = nChng + (*WhereConst)(unsafe.Pointer(bp)).FnChng } @@ -119460,7 +119690,7 @@ func propagateConstants(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sql // // * the sub-query uses only one distinct window frame, and // * that the window frame has a PARTITION BY clase. -func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:137952:12: */ +func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uintptr) int32 { /* sqlite3.c:137983:12: */ return Xsqlite3ExprIsConstantOrGroupBy(tls, pParse, pExpr, (*Window)(unsafe.Pointer((*Select)(unsafe.Pointer(pSubq)).FpWin)).FpPartition) } @@ -119531,7 +119761,7 @@ func pushDownWindowCheck(tls *libc.TLS, pParse uintptr, pSubq uintptr, pExpr uin // // Return 0 if no changes are made and non-zero if one or more WHERE clause // terms are duplicated into the subquery. -func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138030:12: */ +func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uintptr, iCursor int32, isLeftJoin int32) int32 { /* sqlite3.c:138061:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -119586,7 +119816,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin (*SubstContext)(unsafe.Pointer(bp /* &x */)).FiNewTable = iCursor (*SubstContext)(unsafe.Pointer(bp /* &x */)).FisLeftJoin = 0 (*SubstContext)(unsafe.Pointer(bp /* &x */)).FpEList = (*Select)(unsafe.Pointer(pSubq)).FpEList - pNew = substExpr(tls, bp /* &x */, pNew) + pNew = substExpr(tls, bp, pNew) if (*Select)(unsafe.Pointer(pSubq)).FpWin != 0 && 0 == pushDownWindowCheck(tls, pParse, pSubq, pNew) { // Restriction 6c has prevented push-down in this case Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pNew) @@ -119618,7 +119848,7 @@ func pushDownWhereTerms(tls *libc.TLS, pParse uintptr, pSubq uintptr, pWhere uin // This routine must be called after aggregate functions have been // located but before their arguments have been subjected to aggregate // analysis. -func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:138132:11: */ +func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 { /* sqlite3.c:138163:11: */ var eRet int32 = WHERE_ORDERBY_NORMAL // Return value var pEList uintptr // Arguments to agg function var zFunc uintptr // Name of aggregate function pFunc @@ -119634,12 +119864,12 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 } zFunc = *(*uintptr)(unsafe.Pointer(pFunc + 8)) - if Xsqlite3StrICmp(tls, zFunc, ts+15021) == 0 { + if Xsqlite3StrICmp(tls, zFunc, ts+15043) == 0 { eRet = WHERE_ORDERBY_MIN if Xsqlite3ExprCanBeNull(tls, (*ExprList_item)(unsafe.Pointer(pEList+8)).FpExpr) != 0 { sortFlags = U8(KEYINFO_ORDER_BIGNULL) } - } else if Xsqlite3StrICmp(tls, zFunc, ts+15025) == 0 { + } else if Xsqlite3StrICmp(tls, zFunc, ts+15047) == 0 { eRet = WHERE_ORDERBY_MAX sortFlags = U8(KEYINFO_ORDER_DESC) } else { @@ -119668,7 +119898,7 @@ func minMaxQuery(tls *libc.TLS, db uintptr, pFunc uintptr, ppMinMax uintptr) U8 // this routine returns NULL when it could have returned a table pointer. // But returning the pointer when NULL should have been returned can // result in incorrect answers and/or crashes. So, when in doubt, return NULL. -func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:138187:14: */ +func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqlite3.c:138218:14: */ var pTab uintptr var pExpr uintptr @@ -119708,7 +119938,7 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // was such a clause and the named index cannot be found, return // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. -func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:138225:20: */ +func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:138256:20: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -119719,7 +119949,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0 && Xsqlite3StrICmp(tls, (*Index)(unsafe.Pointer(pIdx)).FzName, zIndexedBy) != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { } if !(pIdx != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+18791 /* "no such index: %..." */, libc.VaList(bp, zIndexedBy, 0)) + Xsqlite3ErrorMsg(tls, pParse, ts+18960, libc.VaList(bp, zIndexedBy, 0)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) return SQLITE_ERROR } @@ -119747,7 +119977,7 @@ func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // This transformation is only needed for EXCEPT, INTERSECT, and UNION. // The UNION ALL operator works fine with multiSelectOrderBy() even when // there are COLLATE terms in the ORDER BY. -func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:138267:12: */ +func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:138298:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -119797,8 +120027,8 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) if pNew == uintptr(0) { return WRC_Abort } - libc.Xmemset(tls, bp /* &dummy */, 0, uint32(unsafe.Sizeof(Token{}))) - pNewSrc = Xsqlite3SrcListAppendFromTerm(tls, pParse, uintptr(0), uintptr(0), uintptr(0), bp /* &dummy */, pNew, uintptr(0), uintptr(0)) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Token{}))) + pNewSrc = Xsqlite3SrcListAppendFromTerm(tls, pParse, uintptr(0), uintptr(0), uintptr(0), bp, pNew, uintptr(0), uintptr(0)) if pNewSrc == uintptr(0) { return WRC_Abort } @@ -119826,12 +120056,12 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // Check to see if the FROM clause term pFrom has table-valued function // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. -func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:138332:12: */ +func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:138363:12: */ bp := tls.Alloc(8) defer tls.Free(8) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x4>>2)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18809 /* "'%s' is not a fu..." */, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+18978, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) return 1 } return 0 @@ -119845,7 +120075,7 @@ func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* s // // If a non-NULL value is returned, set *ppContext to point to the With // object that the returned CTE belongs to. -func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:138351:19: */ +func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) uintptr { /* sqlite3.c:138382:19: */ var zName uintptr = (*SrcItem)(unsafe.Pointer(pItem)).FzName var p uintptr @@ -119880,7 +120110,7 @@ func searchWith(tls *libc.TLS, pWith uintptr, pItem uintptr, ppContext uintptr) // // If bFree is true, do not continue to use the pWith pointer after // calling this routine, Instead, use only the return value. -func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:138390:21: */ +func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) uintptr { /* sqlite3.c:138421:21: */ if pWith != 0 { if bFree != 0 { pWith = Xsqlite3ParserAddCleanup(tls, pParse, @@ -119913,7 +120143,7 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 0 if no match is found. // Return 1 if a match is found. // Return 2 if an error condition is detected. -func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:138421:12: */ +func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:138452:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -119942,7 +120172,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // (2) This is the first term in the FROM clause of an UPDATE. return 0 } - pCte = searchWith(tls, (*Parse)(unsafe.Pointer(pParse)).FpWith, pFrom, bp+48 /* &pWith */) + pCte = searchWith(tls, (*Parse)(unsafe.Pointer(pParse)).FpWith, pFrom, bp+48) if pCte != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTab uintptr @@ -119996,7 +120226,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom *(*U32)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pFrom)).FpSelect + 4)) |= U32(SF_CopyCte) if uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x2>>1)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+18832 /* "no such index: \"..." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19001, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pFrom + 64)))) return 2 } libc.SetBitFieldPtr16Uint32(pFrom+36+4, uint32(1), 7, 0x80) @@ -120023,7 +120253,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+36+4, uint32(1), 5, 0x20) if (*Select)(unsafe.Pointer(pRecTerm)).FselFlags&U32(SF_Recursive) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18852 /* "multiple referen..." */, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+19021, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4)) |= U32(SF_Recursive) @@ -120039,7 +120269,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pRecTerm = (*Select)(unsafe.Pointer(pRecTerm)).FpPrior } - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 18895 /* "circular referen..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19064 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 48 /* pWith */)) if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { @@ -120065,7 +120295,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom pEList = (*Select)(unsafe.Pointer(pLeft)).FpEList if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if pEList != 0 && (*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr { - Xsqlite3ErrorMsg(tls, pParse, ts+18918, /* "table %s has %d ..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+19087, libc.VaList(bp+24, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 @@ -120076,9 +120306,9 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom Xsqlite3ColumnsFromExprList(tls, pParse, pEList, pTab+34, pTab+4) if bMayRecursive != 0 { if (*Select)(unsafe.Pointer(pSel)).FselFlags&U32(SF_Recursive) != 0 { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 18956 /* "multiple recursi..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19125 /* "multiple recursi..." */ } else { - (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 18990 /* "recursive refere..." */ + (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 19159 /* "recursive refere..." */ } Xsqlite3WalkSelect(tls, pWalker, pSel) } @@ -120095,7 +120325,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // This function is used as the xSelectCallback2() callback by // sqlite3SelectExpand() when walking a SELECT tree to resolve table // names and other FROM clause elements. -func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:138605:21: */ +func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:138636:21: */ var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse if (*Parse)(unsafe.Pointer(pParse)).FpWith != 0 && (*Select)(unsafe.Pointer(p)).FpPrior == uintptr(0) { var pWith uintptr = (*Select)(unsafe.Pointer(findRightmost(tls, p))).FpWith @@ -120111,7 +120341,7 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // allocates and populates the SrcList_item.pTab object. If successful, // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. -func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:138624:20: */ +func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:138655:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -120126,7 +120356,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 if (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias != 0 { (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3DbStrDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SrcItem)(unsafe.Pointer(pFrom)).FzAlias) } else { - (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19028 /* "subquery_%u" */, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) + (*Table)(unsafe.Pointer(pTab)).FzName = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+19197, libc.VaList(bp, (*Select)(unsafe.Pointer(pSel)).FselId)) } for (*Select)(unsafe.Pointer(pSel)).FpPrior != 0 { pSel = (*Select)(unsafe.Pointer(pSel)).FpPrior @@ -120165,7 +120395,7 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // If found, expand each "*" to be every column in every table // and TABLE.* to be every column in TABLE. // -func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:138676:12: */ +func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:138707:12: */ bp := tls.Alloc(80) defer tls.Free(80) @@ -120253,7 +120483,7 @@ __1: return WRC_Abort } if (*Table)(unsafe.Pointer(pTab)).FnTabRef >= U32(0xffff) { - Xsqlite3ErrorMsg(tls, pParse, ts+19040, /* "too many referen..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+19209, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) (*SrcItem)(unsafe.Pointer(pFrom)).FpTab = uintptr(0) return WRC_Abort @@ -120272,7 +120502,7 @@ __1: if int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW { if (*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_EnableView) == uint64(0) && (*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*16)).FpSchema { - Xsqlite3ErrorMsg(tls, pParse, ts+19079, /* "access to view \"..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+19248, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, *(*uintptr)(unsafe.Pointer(pTab + 44)), 0) @@ -120280,7 +120510,7 @@ __1: uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 36 + 4))&0x40>>6)) != 0 && *(*uintptr)(unsafe.Pointer(pTab + 44 + 8)) != uintptr(0) && int32((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 8)))).FeVtabRisk) > libc.Bool32((*Sqlite3)(unsafe.Pointer(db)).Fflags&uint64(SQLITE_TrustedSchema) != uint64(0)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19110, /* "unsafe use of vi..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+19279, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } @@ -120395,7 +120625,7 @@ __3: if iDb >= 0 { zSchemaName = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName } else { - zSchemaName = ts + 19143 /* "*" */ + zSchemaName = ts + 19312 /* "*" */ } } for j = 0; j < int32((*Table)(unsafe.Pointer(pTab)).FnCol); j++ { @@ -120444,15 +120674,15 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+11899 /* "%s.%s" */, libc.VaList(bp+24, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+11921, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { pExpr = pRight } pNew = Xsqlite3ExprListAppend(tls, pParse, pNew, pExpr) - Xsqlite3TokenInit(tls, bp+72 /* &sColname */, zColname) - Xsqlite3ExprListSetName(tls, pParse, pNew, bp+72 /* &sColname */, 0) + Xsqlite3TokenInit(tls, bp+72, zColname) + Xsqlite3ExprListSetName(tls, pParse, pNew, bp+72, 0) if pNew != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_NestedFrom) != U32(0) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var pX uintptr = pNew + 8 + uintptr((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1)*20 Xsqlite3DbFree(tls, db, (*ExprList_item)(unsafe.Pointer(pX)).FzEName) @@ -120460,7 +120690,7 @@ __3: (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3DbStrDup(tls, db, (*ExprList_item)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList+8+uintptr(j)*20)).FzEName) } else { - (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19145, /* "%s.%s.%s" */ + (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19314, libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } @@ -120480,9 +120710,9 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19154 /* "no such table: %..." */, libc.VaList(bp+64, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19323, libc.VaList(bp+64, zTName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+19172 /* "no tables specif..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19341, 0) } } } @@ -120492,7 +120722,7 @@ __3: } if (*Select)(unsafe.Pointer(p)).FpEList != 0 { if (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr > *(*int32)(unsafe.Pointer(db + 112 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+19192 /* "too many columns..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19361, 0) return WRC_Abort } if elistFlags&U32(EP_HasFunc|EP_Subquery) != U32(0) { @@ -120513,7 +120743,7 @@ __3: // If anything goes wrong, an error message is written into pParse. // The calling function can detect the problem by looking at pParse->nErr // and/or pParse->db->mallocFailed. -func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139002:13: */ +func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139033:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -120528,7 +120758,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq f func(*libc.TLS, uintptr, uintptr) int32 }{convertCompoundSelectToSubquery})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = uintptr(0) - Xsqlite3WalkSelect(tls, bp /* &w */, pSelect) + Xsqlite3WalkSelect(tls, bp, pSelect) } (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -120537,7 +120767,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq f func(*libc.TLS, uintptr, uintptr) }{Xsqlite3SelectPopWith})) (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(0) - Xsqlite3WalkSelect(tls, bp /* &w */, pSelect) + Xsqlite3WalkSelect(tls, bp, pSelect) } // This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo() @@ -120551,7 +120781,7 @@ func sqlite3SelectExpand(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sq // by selectExpander() but the type and collation information was omitted // at that point because identifiers had not yet been resolved. This // routine is called after identifier resolution. -func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139032:13: */ +func selectAddSubqueryTypeInfo(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlite3.c:139063:13: */ var pParse uintptr var i int32 var pTabList uintptr @@ -120599,7 +120829,7 @@ __3: // SELECT statement. // // Use this routine after name resolution. -func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139067:13: */ +func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:139098:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -120615,7 +120845,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3ExprWalkNoop})) (*Walker)(unsafe.Pointer(bp /* &w */)).FpParse = pParse - Xsqlite3WalkSelect(tls, bp /* &w */, pSelect) + Xsqlite3WalkSelect(tls, bp, pSelect) } // This routine sets up a SELECT statement for processing. The @@ -120628,7 +120858,7 @@ func sqlite3SelectAddTypeInfo(tls *libc.TLS, pParse uintptr, pSelect uintptr) { // * Identifiers in expression are matched to tables. // // This routine acts recursively on all subqueries within the SELECT. -func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:139091:21: */ +func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintptr) { /* sqlite3.c:139122:21: */ if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { return @@ -120653,7 +120883,7 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // intermediate results while calculating an aggregate. This // routine generates code that stores NULLs in all of those memory // cells. -func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:139114:13: */ +func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:139145:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -120680,13 +120910,13 @@ __1: if *(*uintptr)(unsafe.Pointer(pE + 20)) == uintptr(0) || (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pE + 20)))).FnExpr != 1 { Xsqlite3ErrorMsg(tls, pParse, - ts+19223 /* "DISTINCT aggrega..." */, 0) + ts+19392, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct = -1 } else { var pKeyInfo uintptr = Xsqlite3KeyInfoFromExprList(tls, pParse, *(*uintptr)(unsafe.Pointer(pE + 20)), 0, 0) (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistAddr = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, (*AggInfo_func)(unsafe.Pointer(pFunc)).FiDistinct, 0, 0, pKeyInfo, -9) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19274 /* "USE TEMP B-TREE ..." */, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19443, libc.VaList(bp, (*FuncDef)(unsafe.Pointer((*AggInfo_func)(unsafe.Pointer(pFunc)).FpFunc)).FzName)) } } @@ -120702,7 +120932,7 @@ __3: // Invoke the OP_AggFinalize opcode for every aggregate function // in the AggInfo structure. -func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:139158:13: */ +func finalizeAggFunctions(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:139189:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var pF uintptr @@ -120741,7 +120971,7 @@ __3: // in pAggInfo, then only populate the pAggInfo->nAccumulator accumulator // registers if register regAcc contains 0. The caller will take care // of setting and clearing regAcc. -func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:139181:13: */ +func updateAccumulator(tls *libc.TLS, pParse uintptr, regAcc int32, pAggInfo uintptr, eDistinctType int32) { /* sqlite3.c:139212:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 var regHit int32 = 0 @@ -120882,25 +121112,25 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). -func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:139283:13: */ +func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:139314:13: */ bp := tls.Alloc(24) defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = libc.Bool32(pIdx != uintptr(0) && ((*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0) || !(int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY))) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19307, /* "SCAN %s%s%s" */ + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+19476, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if bCover != 0 { - return ts + 19319 /* " USING COVERING ..." */ + return ts + 19488 /* " USING COVERING ..." */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), func() uintptr { if bCover != 0 { return (*Index)(unsafe.Pointer(pIdx)).FzName } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }())) } } @@ -120914,7 +121144,7 @@ func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintpt // sub-expression matches the criteria for being moved to the WHERE // clause. If so, add it to the WHERE clause and replace the sub-expression // within the HAVING expression with a constant "1". -func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:139312:12: */ +func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:139343:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_AND { var pS uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) // This routine is called before the HAVING clause of the current @@ -120928,7 +121158,7 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_FromJoin|EP_IsFalse) == U32(EP_IsFalse)) == 0 && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { var db uintptr = (*Parse)(unsafe.Pointer((*Walker)(unsafe.Pointer(pWalker)).FpParse)).Fdb - var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7806 /* "1" */) + var pNew uintptr = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7828) if pNew != 0 { var pWhere uintptr = (*Select)(unsafe.Pointer(pS)).FpWhere { @@ -120960,25 +121190,25 @@ func havingToWhereExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // A term of the HAVING expression is eligible for transfer if it consists // entirely of constants and expressions that are also GROUP BY terms that // use the "BINARY" collation sequence. -func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:139356:13: */ +func havingToWhere(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:139387:13: */ bp := tls.Alloc(28) defer tls.Free(28) // var sWalker Walker at bp, 28 - libc.Xmemset(tls, bp /* &sWalker */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FpParse = pParse (*Walker)(unsafe.Pointer(bp /* &sWalker */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{havingToWhereExprCb})) *(*uintptr)(unsafe.Pointer(bp + 24)) = p - Xsqlite3WalkExpr(tls, bp /* &sWalker */, (*Select)(unsafe.Pointer(p)).FpHaving) + Xsqlite3WalkExpr(tls, bp, (*Select)(unsafe.Pointer(p)).FpHaving) } // Check to see if the pThis entry of pTabList is a self-join of a prior view. // If it is, then return the SrcList_item for the prior view. If it is not, // then return 0. -func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:139376:16: */ +func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* sqlite3.c:139407:16: */ var pItem uintptr if (*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pThis)).FpSelect)).FselFlags&U32(SF_PushDown) != 0 { @@ -121019,7 +121249,7 @@ func isSelfJoinView(tls *libc.TLS, pTabList uintptr, pThis uintptr) uintptr { /* } // Deallocate a single AggInfo object -func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:139411:13: */ +func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:139442:13: */ Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaCol) Xsqlite3DbFree(tls, db, (*AggInfo)(unsafe.Pointer(p)).FaFunc) Xsqlite3DbFreeNN(tls, db, p) @@ -121036,7 +121266,7 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:139411:13: // // This routine does NOT free the Select structure passed in. The // calling function needs to do that. -func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:139519:20: */ +func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:139550:20: */ bp := tls.Alloc(164) defer tls.Free(164) @@ -121235,7 +121465,7 @@ __7: goto __10 } Xsqlite3ErrorMsg(tls, pParse, - ts+19342, /* "target object/al..." */ + ts+19511, libc.VaList(bp, func() uintptr { if (*SrcItem)(unsafe.Pointer(p0)).FzAlias != 0 { return (*SrcItem)(unsafe.Pointer(p0)).FzAlias @@ -121277,7 +121507,7 @@ __12: ; pTabList = (*Select)(unsafe.Pointer(p)).FpSrc isAgg = libc.Bool32((*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) != U32(0)) - libc.Xmemset(tls, bp+48 /* &sSort */, 0, uint32(unsafe.Sizeof(SortCtx{}))) + libc.Xmemset(tls, bp+48, 0, uint32(unsafe.Sizeof(SortCtx{}))) (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy // Try to do various optimizations (flattening subqueries, and strength @@ -121321,7 +121551,7 @@ __17: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) != (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19396, /* "expected %d colu..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+19565, libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: @@ -121495,7 +121725,7 @@ __30: if !((*SrcItem)(unsafe.Pointer(pItem1)).FcolUsed == uint64(0) && (*SrcItem)(unsafe.Pointer(pItem1)).FzName != uintptr(0)) { goto __33 } - Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1543 /* "" */, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) + Xsqlite3AuthCheck(tls, pParse, SQLITE_READ, (*SrcItem)(unsafe.Pointer(pItem1)).FzName, ts+1565, (*SrcItem)(unsafe.Pointer(pItem1)).FzDatabase) __33: ; @@ -121516,7 +121746,7 @@ __34: // (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit // more conservative than necessary, but much easier than enforcing // an exact limit. - *(*int32)(unsafe.Pointer(pParse + 204)) += Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 212)) += Xsqlite3SelectExprHeight(tls, p) // Make copies of constant WHERE-clause terms in the outer query down // inside the subquery. This can help the subquery to run more efficiently. @@ -121560,9 +121790,9 @@ __36: Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn, 0, addrTop) (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop - Xsqlite3SelectDestInit(tls, bp+88 /* &dest */, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19436 /* "CO-ROUTINE %!S" */, libc.VaList(bp+32, pItem1)) - Xsqlite3Select(tls, pParse, pSub1, bp+88 /* &dest */) + Xsqlite3SelectDestInit(tls, bp+88, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19605, libc.VaList(bp+32, pItem1)) + Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+36+4, uint32(1), 4, 0x10) (*SrcItem)(unsafe.Pointer(pItem1)).FregResult = (*SelectDest)(unsafe.Pointer(bp + 88 /* &dest */)).FiSdst @@ -121623,9 +121853,9 @@ __45: ; __46: ; - Xsqlite3SelectDestInit(tls, bp+88 /* &dest */, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19451 /* "MATERIALIZE %!S" */, libc.VaList(bp+40, pItem1)) - Xsqlite3Select(tls, pParse, pSub1, bp+88 /* &dest */) + Xsqlite3SelectDestInit(tls, bp+88, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19620, libc.VaList(bp+40, pItem1)) + Xsqlite3Select(tls, pParse, pSub1, bp+88) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __47 @@ -121659,7 +121889,7 @@ __38: goto select_end __49: ; - *(*int32)(unsafe.Pointer(pParse + 204)) -= Xsqlite3SelectExprHeight(tls, p) + *(*int32)(unsafe.Pointer(pParse + 212)) -= Xsqlite3SelectExprHeight(tls, p) (*Parse)(unsafe.Pointer(pParse)).FzAuthContext = zSavedAuthContext goto __31 __31: @@ -121849,7 +122079,7 @@ __66: Xsqlite3VdbeResolveLabel(tls, v, addrGosub) (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FlabelOBLopt = 0 - selectInnerLoop(tls, pParse, p, -1, bp+48 /* &sSort */, bp+116 /* &sDistinct */, pDest, iCont, iBreak) + selectInnerLoop(tls, pParse, p, -1, bp+48, bp+116, pDest, iCont, iBreak) Xsqlite3VdbeResolveLabel(tls, v, iCont) Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) @@ -121858,7 +122088,7 @@ __66: __67: // Use the standard inner loop. - selectInnerLoop(tls, pParse, p, -1, bp+48 /* &sSort */, bp+116 /* &sDistinct */, pDest, + selectInnerLoop(tls, pParse, p, -1, bp+48, bp+116, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) @@ -121986,7 +122216,7 @@ __83: __84: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId - libc.Xmemset(tls, bp+128 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+128, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 128 /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp + 128 /* &sNC */)).FpSrcList = pTabList *(*uintptr)(unsafe.Pointer(bp + 128 + 8)) = pAggInfo @@ -121999,8 +122229,8 @@ __84: return 0 }() (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy = pGroupBy - Xsqlite3ExprAnalyzeAggList(tls, bp+128 /* &sNC */, pEList) - Xsqlite3ExprAnalyzeAggList(tls, bp+128 /* &sNC */, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy) + Xsqlite3ExprAnalyzeAggList(tls, bp+128, pEList) + Xsqlite3ExprAnalyzeAggList(tls, bp+128, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy) if !(pHaving != 0) { goto __85 } @@ -122012,14 +122242,14 @@ __84: pWhere = (*Select)(unsafe.Pointer(p)).FpWhere __86: ; - Xsqlite3ExprAnalyzeAggregates(tls, bp+128 /* &sNC */, pHaving) + Xsqlite3ExprAnalyzeAggregates(tls, bp+128, pHaving) __85: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator = (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn if !((*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(0) && (*Select)(unsafe.Pointer(p)).FpHaving == uintptr(0) && (*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1) { goto __87 } - minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+160 /* &pMinMaxOrderBy */) + minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+160) goto __88 __87: minMaxFlag = U8(WHERE_ORDERBY_NORMAL) @@ -122033,12 +122263,12 @@ __89: pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*20)).FpFExpr *(*int32)(unsafe.Pointer(bp + 128 + 24)) |= NC_InAggFunc - Xsqlite3ExprAnalyzeAggList(tls, bp+128 /* &sNC */, *(*uintptr)(unsafe.Pointer(pExpr + 20))) + Xsqlite3ExprAnalyzeAggList(tls, bp+128, *(*uintptr)(unsafe.Pointer(pExpr + 20))) if !((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_WinFunc) != U32(0)) { goto __92 } - Xsqlite3ExprAnalyzeAggregates(tls, bp+128 /* &sNC */, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) + Xsqlite3ExprAnalyzeAggregates(tls, bp+128, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 44)))).FpFilter) __92: ; *(*int32)(unsafe.Pointer(bp + 128 + 24)) &= libc.CplInt32(NC_InAggFunc) @@ -122146,9 +122376,9 @@ __98: explainTempTable(tls, pParse, func() uintptr { if (*DistinctCtx)(unsafe.Pointer(bp+116)).FisTnct != 0 && (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Distinct) == U32(0) { - return ts + 19467 /* "DISTINCT" */ + return ts + 19636 /* "DISTINCT" */ } - return ts + 19476 /* "GROUP BY" */ + return ts + 19645 /* "GROUP BY" */ }()) groupBySort = 1 @@ -122329,8 +122559,8 @@ __116: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regOutputRow) finalizeAggFunctions(tls, pParse, pAggInfo) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrOutputRow+1, SQLITE_JUMPIFNULL) - selectInnerLoop(tls, pParse, p, -1, bp+48, /* &sSort */ - bp+116 /* &sDistinct */, pDest, + selectInnerLoop(tls, pParse, p, -1, bp+48, + bp+116, pDest, addrOutputRow+1, addrSetAbort) Xsqlite3VdbeAddOp1(tls, v, OP_Return, regOutputRow) @@ -122561,7 +122791,7 @@ __59: if !(int32((*DistinctCtx)(unsafe.Pointer(bp+116)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __141 } - explainTempTable(tls, pParse, ts+19467 /* "DISTINCT" */) + explainTempTable(tls, pParse, ts+19636) __141: ; @@ -122573,12 +122803,12 @@ __141: explainTempTable(tls, pParse, func() uintptr { if (*SortCtx)(unsafe.Pointer(bp+48)).FnOBSat > 0 { - return ts + 19485 /* "RIGHT PART OF OR..." */ + return ts + 19654 /* "RIGHT PART OF OR..." */ } - return ts + 19508 /* "ORDER BY" */ + return ts + 19677 /* "ORDER BY" */ }()) - generateSortTail(tls, pParse, p, bp+48 /* &sSort */, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) + generateSortTail(tls, pParse, p, bp+48, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) __142: ; @@ -122630,7 +122860,7 @@ type TabResult1 = struct { FnColumn U32 FnData U32 Frc int32 -} /* sqlite3.c:140779:9 */ +} /* sqlite3.c:140810:9 */ //************* End of select.c ********************************************* //************* Begin file table.c ****************************************** @@ -122654,12 +122884,12 @@ type TabResult1 = struct { // This structure is used to pass data from sqlite3_get_table() through // to the callback function is uses to build the result. -type TabResult = TabResult1 /* sqlite3.c:140787:3 */ +type TabResult = TabResult1 /* sqlite3.c:140818:3 */ // This routine is called once for each row in the result table. Its job // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. -func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:140794:12: */ +func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:140825:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -122708,7 +122938,7 @@ __7: if !(i < nCol) { goto __9 } - z = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) + z = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(colv + uintptr(i)*4)))) if !(z == uintptr(0)) { goto __10 } @@ -122730,7 +122960,7 @@ __5: } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(p)).FzErrMsg) (*TabResult)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+19517 /* "sqlite3_get_tabl..." */, 0) + ts+19686, 0) (*TabResult)(unsafe.Pointer(p)).Frc = SQLITE_ERROR return 1 __11: @@ -122790,7 +123020,7 @@ malloc_failed: // from malloc(). But the caller cannot free this memory directly. // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. -func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:140868:16: */ +func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:140899:16: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -122829,7 +123059,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp if (*TabResult)(unsafe.Pointer(bp+8)).FzErrMsg != 0 { if pzErrMsg != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErrMsg))) - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg)) } Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg) } @@ -122862,7 +123092,7 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp } // This routine frees the space the sqlite3_get_table() malloced. -func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:140937:17: */ +func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:140968:17: */ if azResult != 0 { var i int32 var n int32 @@ -122893,7 +123123,7 @@ func Xsqlite3_free_table(tls *libc.TLS, azResult uintptr) { /* sqlite3.c:140937: // #include "sqliteInt.h" // Delete a linked list of TriggerStep structures. -func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:140972:21: */ +func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) { /* sqlite3.c:141003:21: */ for pTriggerStep != 0 { var pTmp uintptr = pTriggerStep pTriggerStep = (*TriggerStep)(unsafe.Pointer(pTriggerStep)).FpNext @@ -122922,7 +123152,7 @@ func Xsqlite3DeleteTriggerStep(tls *libc.TLS, db uintptr, pTriggerStep uintptr) // To state it another way: This routine returns a list of all triggers // that fire off of pTab. The list will include any TEMP triggers on // pTab as well as the triggers lised in pTab->pTrigger. -func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141003:24: */ +func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { /* sqlite3.c:141034:24: */ var pTmpSchema uintptr // Schema of the pTab table var pList uintptr // List of triggers to return var p uintptr // Loop variable for TEMP triggers @@ -122960,7 +123190,7 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // in pParse->pNewTrigger. After the trigger actions have been parsed, the // sqlite3FinishTrigger() function is called to complete the trigger // construction process. -func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:141059:21: */ +func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:141090:21: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -122990,7 +123220,7 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 if !((*Token)(unsafe.Pointer(pName2)).Fn > uint32(0)) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+19582 /* "temporary trigge..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19751, 0) goto trigger_cleanup __3: ; @@ -122999,7 +123229,7 @@ __3: goto __2 __1: // Figure out the db that the trigger will be created in - iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+32 /* &pName */) + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+32) if !(iDb < 0) { goto __4 } @@ -123051,7 +123281,7 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+36 /* &sFix */, pParse, iDb, ts+19628 /* "trigger" */, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3FixInit(tls, bp+36, pParse, iDb, ts+19797, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(Xsqlite3FixSrcList(tls, bp+36, pTableName) != 0) { goto __9 } @@ -123069,7 +123299,7 @@ __10: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VTAB) { goto __11 } - Xsqlite3ErrorMsg(tls, pParse, ts+19636 /* "cannot create tr..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19805, 0) goto trigger_orphan_error __11: ; @@ -123084,7 +123314,7 @@ __11: goto trigger_cleanup __12: ; - if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19628, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { + if !(Xsqlite3CheckObjectName(tls, pParse, zName, ts+19797, (*Table)(unsafe.Pointer(pTab)).FzName) != 0) { goto __13 } goto trigger_cleanup @@ -123100,7 +123330,7 @@ __13: if !!(noErr != 0) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19677 /* "trigger %T alrea..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19846, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -123114,10 +123344,10 @@ __14: ; // Do not create a trigger on a system table - if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+7997, 7) == 0) { + if !(Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8019, 7) == 0) { goto __18 } - Xsqlite3ErrorMsg(tls, pParse, ts+19703 /* "cannot create tr..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+19872, 0) goto trigger_cleanup __18: ; @@ -123127,12 +123357,12 @@ __18: if !(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW && tr_tm != TK_INSTEAD) { goto __19 } - Xsqlite3ErrorMsg(tls, pParse, ts+19741, /* "cannot create %s..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+19910, libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { - return ts + 19778 /* "BEFORE" */ + return ts + 19947 /* "BEFORE" */ } - return ts + 19785 /* "AFTER" */ + return ts + 19954 /* "AFTER" */ }(), pTableName+8 /* &.a */)) goto trigger_orphan_error __19: @@ -123141,7 +123371,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19791 /* "cannot create IN..." */, libc.VaList(bp+24, pTableName+8)) + ts+19960, libc.VaList(bp+24, pTableName+8)) goto trigger_orphan_error __20: ; @@ -123171,9 +123401,9 @@ __23: ; if !(Xsqlite3AuthCheck(tls, pParse, SQLITE_INSERT, func() uintptr { if !(0 != 0) && iTabDb == 1 { - return ts + 11986 + return ts + 12008 } - return ts + 5803 + return ts + 5825 }(), uintptr(0), zDb) != 0) { goto __24 } @@ -123267,7 +123497,7 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. -func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:141266:21: */ +func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:141297:21: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -123306,8 +123536,8 @@ __2: goto __2 __3: ; - Xsqlite3TokenInit(tls, bp+40 /* &nameToken */, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+48 /* &sFix */, pParse, iDb, ts+19628 /* "trigger" */, bp+40 /* &nameToken */) + Xsqlite3TokenInit(tls, bp+40, (*Trigger)(unsafe.Pointer(pTrig)).FzName) + Xsqlite3FixInit(tls, bp+48, pParse, iDb, ts+19797, bp+40) if !(Xsqlite3FixTriggerStep(tls, bp+48, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0 || Xsqlite3FixExpr(tls, bp+48, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0) { goto __4 @@ -123344,13 +123574,13 @@ __8: Xsqlite3NestedParse(tls, pParse, - ts+19837, /* "INSERT INTO %Q.s..." */ + ts+20006, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, zName, (*Trigger)(unsafe.Pointer(pTrig)).Ftable, z)) Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+19912 /* "type='trigger' A..." */, libc.VaList(bp+32, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+20081, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -123391,7 +123621,7 @@ triggerfinish_cleanup: // Duplicate a range of text from an SQL statement, then convert all // whitespace characters into ordinary space characters. -func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141354:13: */ +func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141385:13: */ var z uintptr = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) var i int32 if z != 0 { @@ -123409,7 +123639,7 @@ func triggerSpanDup(tls *libc.TLS, db uintptr, zStart uintptr, zEnd uintptr) uin // // The parser calls this routine when it finds a SELECT statement in // body of a TRIGGER. -func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141368:28: */ +func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141399:28: */ var pTriggerStep uintptr = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(TriggerStep{}))) if pTriggerStep == uintptr(0) { Xsqlite3SelectDelete(tls, db, pSelect) @@ -123426,7 +123656,7 @@ func Xsqlite3TriggerSelectStep(tls *libc.TLS, db uintptr, pSelect uintptr, zStar // holds both the TriggerStep object and the TriggerStep.target.z string. // // If an OOM error occurs, NULL is returned and db->mallocFailed is set. -func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141392:20: */ +func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141423:20: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123450,7 +123680,7 @@ func triggerStepAllocate(tls *libc.TLS, pParse uintptr, op U8, pName uintptr, zS // // The parser calls this routine when it sees an INSERT inside the // body of a trigger. -func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141424:28: */ +func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pColumn uintptr, pSelect uintptr, orconf U8, pUpsert uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141455:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123482,7 +123712,7 @@ func Xsqlite3TriggerInsertStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements an UPDATE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees an UPDATE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141469:28: */ +func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pFrom uintptr, pEList uintptr, pWhere uintptr, orconf U8, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141500:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123511,7 +123741,7 @@ func Xsqlite3TriggerUpdateStep(tls *libc.TLS, pParse uintptr, pTableName uintptr // Construct a trigger step that implements a DELETE statement and return // a pointer to that trigger step. The parser calls this routine when it // sees a DELETE statement inside the body of a CREATE TRIGGER. -func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141509:28: */ +func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr, pWhere uintptr, zStart uintptr, zEnd uintptr) uintptr { /* sqlite3.c:141540:28: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTriggerStep uintptr @@ -123530,7 +123760,7 @@ func Xsqlite3TriggerDeleteStep(tls *libc.TLS, pParse uintptr, pTableName uintptr } // Recursively delete a Trigger structure -func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:141536:21: */ +func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sqlite3.c:141567:21: */ if pTrigger == uintptr(0) || (*Trigger)(unsafe.Pointer(pTrigger)).FbReturning != 0 { return } @@ -123550,7 +123780,7 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // same job as this routine except it takes a pointer to the trigger // instead of the trigger name. // -func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:141554:21: */ +func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:141585:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123616,7 +123846,7 @@ __5: if !!(noErr != 0) { goto __9 } - Xsqlite3ErrorMsg(tls, pParse, ts+19941 /* "no such trigger:..." */, libc.VaList(bp, pName+8)) + Xsqlite3ErrorMsg(tls, pParse, ts+20110, libc.VaList(bp, pName+8)) goto __10 __9: Xsqlite3CodeVerifyNamedSchema(tls, pParse, zDb) @@ -123634,12 +123864,12 @@ drop_trigger_cleanup: // Return a pointer to the Table structure for the table that a trigger // is set on. -func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:141596:14: */ +func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:141627:14: */ return Xsqlite3HashFind(tls, (*Trigger)(unsafe.Pointer(pTrigger)).FpTabSchema+8, (*Trigger)(unsafe.Pointer(pTrigger)).Ftable) } // Drop a trigger given a pointer to that trigger. -func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:141604:21: */ +func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:141635:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -123657,9 +123887,9 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*16)).FzDbSName var zTab uintptr = func() uintptr { if !(0 != 0) && iDb == 1 { - return ts + 11986 + return ts + 12008 } - return ts + 5803 + return ts + 5825 }() if iDb == 1 { code = SQLITE_DROP_TEMP_TRIGGER @@ -123672,7 +123902,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / // Generate code to destroy the database record of the trigger. if libc.AssignUintptr(&v, Xsqlite3GetVdbe(tls, pParse)) != uintptr(0) { Xsqlite3NestedParse(tls, pParse, - ts+19961, /* "DELETE FROM %Q.s..." */ + ts+20130, libc.VaList(bp, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp4(tls, v, OP_DropTrigger, iDb, 0, 0, (*Trigger)(unsafe.Pointer(pTrigger)).FzName, 0) @@ -123680,7 +123910,7 @@ func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { / } // Remove a trigger from the hash tables of the sqlite* pointer. -func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:141642:21: */ +func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) { /* sqlite3.c:141673:21: */ var pTrigger uintptr var pHash uintptr @@ -123711,7 +123941,7 @@ func Xsqlite3UnlinkAndDeleteTrigger(tls *libc.TLS, db uintptr, iDb int32, zName // wildcard that matches anything. Likewise if pEList==NULL then // it matches anything so always return true. Return false only // if there is no match. -func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:141676:12: */ +func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { /* sqlite3.c:141707:12: */ var e int32 if pIdList == uintptr(0) || pEList == uintptr(0) { return 1 @@ -123728,7 +123958,7 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // one trigger that must be fired when an operation of type 'op' is // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. -func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:141691:24: */ +func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:141722:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -123791,12 +124021,12 @@ __9: goto __15 } Xsqlite3ErrorMsg(tls, pParse, - ts+20023, /* "%s RETURNING is ..." */ + ts+20192, libc.VaList(bp, func() uintptr { if op == TK_DELETE { - return ts + 20071 /* "DELETE" */ + return ts + 20240 /* "DELETE" */ } - return ts + 20078 /* "UPDATE" */ + return ts + 20247 /* "UPDATE" */ }())) __15: ; @@ -123855,7 +124085,7 @@ __17: // referring to a target in another database. An exception is when the // trigger is in TEMP in which case it can refer to any other database it // wants. -func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:141765:24: */ +func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintptr { /* sqlite3.c:141796:24: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // SrcList to be returned var zName uintptr = Xsqlite3DbStrDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FzTarget) @@ -123880,7 +124110,7 @@ func Xsqlite3TriggerStepSrc(tls *libc.TLS, pParse uintptr, pStep uintptr) uintpt // Return true if the pExpr term from the RETURNING clause argument // list is of the form "*". Raise an error if the terms if of the // form "table.*". -func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:141796:12: */ +func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sqlite3.c:141827:12: */ if int32((*Expr)(unsafe.Pointer(pTerm)).Fop) == TK_ASTERISK { return 1 @@ -123892,7 +124122,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pTerm)).FpRight)).Fop) != TK_ASTERISK { return 0 } - Xsqlite3ErrorMsg(tls, pParse, ts+20085 /* "RETURNING may no..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+20254, 0) return 1 } @@ -123901,7 +124131,7 @@ func isAsteriskTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr) int32 { /* sql // // This routine makes a copy of the pList, and at the same time expands // any "*" wildcards to be the complete set of columns from pTab. -func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:141816:17: */ +func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab uintptr) uintptr { /* sqlite3.c:141847:17: */ var pNew uintptr = uintptr(0) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var i int32 @@ -123942,7 +124172,7 @@ func sqlite3ExpandReturning(tls *libc.TLS, pParse uintptr, pList uintptr, pTab u // Generate code for the RETURNING trigger. Unlike other triggers // that invoke a subprogram in the bytecode, the code for RETURNING // is generated in-line. -func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:141859:13: */ +func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, regIn int32) { /* sqlite3.c:141890:13: */ bp := tls.Alloc(188) defer tls.Free(188) @@ -123954,25 +124184,25 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // var sFrom SrcList at bp+76, 80 - pReturning = *(*uintptr)(unsafe.Pointer(pParse + 124)) + pReturning = *(*uintptr)(unsafe.Pointer(pParse + 132)) - libc.Xmemset(tls, bp /* &sSelect */, 0, uint32(unsafe.Sizeof(Select{}))) - libc.Xmemset(tls, bp+76 /* &sFrom */, 0, uint32(unsafe.Sizeof(SrcList{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Select{}))) + libc.Xmemset(tls, bp+76, 0, uint32(unsafe.Sizeof(SrcList{}))) (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpEList = Xsqlite3ExprListDup(tls, db, (*Returning)(unsafe.Pointer(pReturning)).FpReturnEL, 0) (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpSrc = bp + 76 /* &sFrom */ (*SrcList)(unsafe.Pointer(bp + 76 /* &sFrom */)).FnSrc = 1 (*SrcItem)(unsafe.Pointer(bp + 76 + 8)).FpTab = pTab (*SrcItem)(unsafe.Pointer(bp + 76 + 8)).FiCursor = -1 - Xsqlite3SelectPrep(tls, pParse, bp /* &sSelect */, uintptr(0)) + Xsqlite3SelectPrep(tls, pParse, bp, uintptr(0)) if int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0 && (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { - Xsqlite3GenerateColumnNames(tls, pParse, bp /* &sSelect */) + Xsqlite3GenerateColumnNames(tls, pParse, bp) } Xsqlite3ExprListDelete(tls, db, (*Select)(unsafe.Pointer(bp /* &sSelect */)).FpEList) pNew = sqlite3ExpandReturning(tls, pParse, (*Returning)(unsafe.Pointer(pReturning)).FpReturnEL, pTab) - if pNew != 0 { + if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { // var sNC NameContext at bp+156, 32 - libc.Xmemset(tls, bp+156 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+156, 0, uint32(unsafe.Sizeof(NameContext{}))) if (*Returning)(unsafe.Pointer(pReturning)).FnRetCol == 0 { (*Returning)(unsafe.Pointer(pReturning)).FnRetCol = (*ExprList)(unsafe.Pointer(pNew)).FnExpr (*Returning)(unsafe.Pointer(pReturning)).FiRetCur = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) @@ -123982,7 +124212,8 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab (*NameContext)(unsafe.Pointer(bp + 156 /* &sNC */)).FncFlags = NC_UBaseReg (*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = (*Trigger)(unsafe.Pointer(pTrigger)).Fop (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = pTab - if Xsqlite3ResolveExprListNames(tls, bp+156, pNew) == SQLITE_OK { + if Xsqlite3ResolveExprListNames(tls, bp+156, pNew) == SQLITE_OK && + !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { var i int32 var nCol int32 = (*ExprList)(unsafe.Pointer(pNew)).FnExpr var reg int32 = (*Parse)(unsafe.Pointer(pParse)).FnMem + 1 @@ -123990,21 +124221,22 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab (*Returning)(unsafe.Pointer(pReturning)).FiRetReg = reg for i = 0; i < nCol; i++ { var pCol uintptr = (*ExprList_item)(unsafe.Pointer(pNew + 8 + uintptr(i)*20)).FpExpr + // Due to !db->mallocFailed ~9 lines above Xsqlite3ExprCodeFactorable(tls, pParse, pCol, reg+i) } Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, reg, i, reg+i) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, reg+i+1) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, (*Returning)(unsafe.Pointer(pReturning)).FiRetCur, reg+i, reg+i+1) } - Xsqlite3ExprListDelete(tls, db, pNew) - (*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = U8(0) - (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = uintptr(0) } + Xsqlite3ExprListDelete(tls, db, pNew) + (*Parse)(unsafe.Pointer(pParse)).FeTriggerOp = U8(0) + (*Parse)(unsafe.Pointer(pParse)).FpTriggerTab = uintptr(0) } // Generate VDBE code for the statements inside the body of a single // trigger. -func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:141927:12: */ +func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:141961:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -124034,7 +124266,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf if (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan != 0 { Xsqlite3VdbeAddOp4(tls, v, OP_Trace, 0x7fffffff, 1, 0, - Xsqlite3MPrintf(tls, db, ts+5990 /* "-- %s" */, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), + Xsqlite3MPrintf(tls, db, ts+6012, libc.VaList(bp, (*TriggerStep)(unsafe.Pointer(pStep)).FzSpan)), -7) } @@ -124076,8 +124308,8 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // var sDest SelectDest at bp+8, 28 var pSelect uintptr = Xsqlite3SelectDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect, 0) - Xsqlite3SelectDestInit(tls, bp+8 /* &sDest */, SRT_Discard, 0) - Xsqlite3Select(tls, pParse, pSelect, bp+8 /* &sDest */) + Xsqlite3SelectDestInit(tls, bp+8, SRT_Discard, 0) + Xsqlite3Select(tls, pParse, pSelect, bp+8) Xsqlite3SelectDelete(tls, db, pSelect) break @@ -124091,7 +124323,7 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf // Parse context structure pFrom has just been used to create a sub-vdbe // (trigger program). If an error has occurred, transfer error information // from pFrom to pTo. -func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:142031:13: */ +func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3.c:142065:13: */ if (*Parse)(unsafe.Pointer(pTo)).FnErr == 0 { (*Parse)(unsafe.Pointer(pTo)).FzErrMsg = (*Parse)(unsafe.Pointer(pFrom)).FzErrMsg @@ -124104,7 +124336,7 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. -func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:142047:19: */ +func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:142081:19: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -124149,7 +124381,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if !(pSubParse != 0) { return uintptr(0) } - libc.Xmemset(tls, bp+8 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 8 /* &sNC */)).FpParse = pSubParse (*Parse)(unsafe.Pointer(pSubParse)).Fdb = db (*Parse)(unsafe.Pointer(pSubParse)).FpTriggerTab = pTab @@ -124164,7 +124396,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FzName != 0 { Xsqlite3VdbeChangeP4(tls, v, -1, - Xsqlite3MPrintf(tls, db, ts+20127 /* "-- TRIGGER %s" */, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) + Xsqlite3MPrintf(tls, db, ts+20296, libc.VaList(bp, (*Trigger)(unsafe.Pointer(pTrigger)).FzName)), -7) } // If one was specified, code the WHEN clause. If it evaluates to false @@ -124211,7 +124443,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt // trigger pTrigger with default ON CONFLICT algorithm orconf. If no such // TriggerPrg object exists, a new object is allocated and populated before // being returned. -func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:142162:19: */ +func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:142196:19: */ var pRoot uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -124239,7 +124471,7 @@ func getRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr // table pTab. The reg, orconf and ignoreJump parameters passed to this // function are the same as those described in the header function for // sqlite3CodeRowTrigger() -func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:142196:21: */ +func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:142230:21: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) // Main VM var pPrg uintptr pPrg = getRowTrigger(tls, pParse, p, pTab, orconf) @@ -124299,7 +124531,7 @@ func Xsqlite3CodeRowTriggerDirect(tls *libc.TLS, pParse uintptr, p uintptr, pTab // trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump // is the instruction that control should jump to if a trigger program // raises an IGNORE exception. -func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:142268:21: */ +func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op int32, pChanges uintptr, tr_tm int32, pTab uintptr, reg int32, orconf int32, ignoreJump int32) { /* sqlite3.c:142302:21: */ var p uintptr // Used to iterate through pTrigger list for p = pTrigger; p != 0; p = (*Trigger)(unsafe.Pointer(p)).FpNext { @@ -124347,7 +124579,7 @@ func Xsqlite3CodeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, op // included in the returned mask if the TRIGGER_BEFORE bit is set in the // tr_tm parameter. Similarly, values accessed by AFTER triggers are only // included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm. -func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:142338:20: */ +func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pChanges uintptr, isNew int32, tr_tm int32, pTab uintptr, orconf int32) U32 { /* sqlite3.c:142372:20: */ var op int32 if pChanges != 0 { op = TK_UPDATE @@ -124404,7 +124636,7 @@ func Xsqlite3TriggerColmask(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pCh // (not a virtual table) then the value might have been stored as an // integer. In that case, add an OP_RealAffinity opcode to make sure // it has been converted into REAL. -func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:142436:21: */ +func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg int32) { /* sqlite3.c:142470:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -124415,7 +124647,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg Xsqlite3ValueFromExpr(tls, Xsqlite3VdbeDb(tls, v), Xsqlite3ColumnExpr(tls, pTab, pCol), enc, - uint8((*Column)(unsafe.Pointer(pCol)).Faffinity), bp /* &pValue */) + uint8((*Column)(unsafe.Pointer(pCol)).Faffinity), bp) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { Xsqlite3VdbeAppendP4(tls, v, *(*uintptr)(unsafe.Pointer(bp /* pValue */)), -11) } @@ -124434,7 +124666,7 @@ func Xsqlite3ColumnDefault(tls *libc.TLS, v uintptr, pTab uintptr, i int32, iReg // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:142469:12: */ +func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:142503:12: */ var iIdxCol I16 = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2)) // Cannot index rowid if int32(iIdxCol) >= 0 { @@ -124455,7 +124687,7 @@ func indexColumnIsBeingUpdated(tls *libc.TLS, pIdx uintptr, iCol int32, aXRef ui // aXRef[j] will be non-negative if column j of the original table is // being updated. chngRowid will be true if the rowid of the table is // being updated. -func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:142499:12: */ +func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chngRowid int32) int32 { /* sqlite3.c:142533:12: */ if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere == uintptr(0) { return 0 } @@ -124467,7 +124699,7 @@ func indexWhereClauseMightChange(tls *libc.TLS, pIdx uintptr, aXRef uintptr, chn // Expr.iColumn set to value (iCol+1). The resolver will modify the // expression to be a TK_COLUMN reading column iCol of the first // table in the source-list (pSrc->a[0]). -func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:142515:13: */ +func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlite3.c:142549:13: */ var pRet uintptr = Xsqlite3PExpr(tls, pParse, TK_ROW, uintptr(0), uintptr(0)) if pRet != 0 { (*Expr)(unsafe.Pointer(pRet)).FiColumn = YnVar(iCol + 1) @@ -124511,7 +124743,7 @@ func exprRowColumn(tls *libc.TLS, pParse uintptr, iCol int32) uintptr { /* sqlit // records with automatically assigned integer keys For intkey tables, the // rowid value in <other-columns> is used as the integer key, and the // remaining fields make up the table record. -func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:142559:13: */ +func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pChanges uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pLimit uintptr) { /* sqlite3.c:142593:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -124576,14 +124808,14 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC if pSelect != 0 { *(*U32)(unsafe.Pointer(pSelect + 4)) |= U32(SF_OrderByReqd) } - Xsqlite3SelectDestInit(tls, bp /* &dest */, eDest, iEph) + Xsqlite3SelectDestInit(tls, bp, eDest, iEph) (*SelectDest)(unsafe.Pointer(bp /* &dest */)).FiSDParm2 = func() int32 { if pPk != 0 { return int32((*Index)(unsafe.Pointer(pPk)).FnKeyCol) } return -1 }() - Xsqlite3Select(tls, pParse, pSelect, bp /* &dest */) + Xsqlite3Select(tls, pParse, pSelect, bp) Xsqlite3SelectDelete(tls, db, pSelect) } @@ -124594,7 +124826,7 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // onError | pChanges | pWhere // \_______________________/ // pTabList -func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:142656:21: */ +func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:142690:21: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -124692,7 +124924,7 @@ func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui regRowSet = 0 regKey = 0 // composite PRIMARY KEY value - libc.Xmemset(tls, bp+16 /* &sContext */, 0, uint32(unsafe.Sizeof(AuthContext{}))) + libc.Xmemset(tls, bp+16, 0, uint32(unsafe.Sizeof(AuthContext{}))) db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !((*Parse)(unsafe.Pointer(pParse)).FnErr != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __1 @@ -124713,7 +124945,7 @@ __2: // Figure out if we have any triggers and if the table being // updated is a view. - pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_UPDATE, pChanges, bp+24 /* &tmask */) + pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_UPDATE, pChanges, bp+24) isView = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FeTabType) == TABTYP_VIEW) // If there was a FROM clause, set nChangeFrom to the number of expressions @@ -124811,7 +125043,7 @@ __13: ; // Initialize the name-context - libc.Xmemset(tls, bp+28 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+28, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 28 /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp + 28 /* &sNC */)).FpSrcList = pTabList *(*uintptr)(unsafe.Pointer(bp + 28 + 8)) = pUpsert @@ -124874,7 +125106,7 @@ __25: } Xsqlite3ErrorMsg(tls, pParse, - ts+20141, /* "cannot UPDATE ge..." */ + ts+20310, libc.VaList(bp, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(j)*16)).FzCnName)) goto update_cleanup __27: @@ -124906,7 +125138,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20177 /* "no such column: ..." */, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20346, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer(pChanges+8+uintptr(i)*20)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -124917,7 +125149,7 @@ __28: rc = Xsqlite3AuthCheck(tls, pParse, SQLITE_UPDATE, (*Table)(unsafe.Pointer(pTab)).FzName, func() uintptr { if j < 0 { - return ts + 7581 /* "ROWID" */ + return ts + 7603 /* "ROWID" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*16)).FzCnName }(), @@ -125135,7 +125367,7 @@ __58: if !(isView != 0) { goto __61 } - Xsqlite3AuthContextPush(tls, pParse, bp+16 /* &sContext */, (*Table)(unsafe.Pointer(pTab)).FzName) + Xsqlite3AuthContextPush(tls, pParse, bp+16, (*Table)(unsafe.Pointer(pTab)).FzName) __61: ; @@ -125307,7 +125539,7 @@ __79: // Fall back to ONEPASS_OFF if where.c has selected a ONEPASS_MULTI // strategy that uses an index for which one or more columns are being // updated. - eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+60 /* &aiCurOnePass[0] */) + eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+60) bFinishSeek = Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) if !(eOnePass != ONEPASS_SINGLE) { goto __80 @@ -125316,7 +125548,7 @@ __79: if !(eOnePass == ONEPASS_MULTI) { goto __81 } - iCur = *(*int32)(unsafe.Pointer(bp + 60 /* &aiCurOnePass[0] */ + 1*4)) + iCur = *(*int32)(unsafe.Pointer(bp + 60 + 1*4)) if !(iCur >= 0 && iCur != iDataCur && *(*U8)(unsafe.Pointer(aToOpen + uintptr(iCur-iBaseCur))) != 0) { goto __82 } @@ -125792,7 +126024,7 @@ __141: // Do constraint checks. Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, iDataCur, iIdxCur, - regNewRowid, regOldRowid, chngKey, uint8(onError), labelContinue, bp+68, /* &bReplace */ + regNewRowid, regOldRowid, chngKey, uint8(onError), labelContinue, bp+68, aXRef, uintptr(0)) // If REPLACE conflict handling may have been used, or if the PK of the @@ -125949,12 +126181,12 @@ __168: } Xsqlite3VdbeAddOp2(tls, v, OP_ChngCntRow, regRowCount, 1) Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+20196 /* "rows updated" */, uintptr(0)) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, ts+20365, uintptr(0)) __169: ; update_cleanup: - Xsqlite3AuthContextPop(tls, bp+16 /* &sContext */) + Xsqlite3AuthContextPop(tls, bp+16) Xsqlite3DbFree(tls, db, aXRef) // Also frees aRegIdx[] and aToOpen[] Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprListDelete(tls, db, pChanges) @@ -125985,7 +126217,7 @@ update_cleanup: // The "onepass" strategy does not use an ephemeral table. Instead, it // stores the same values (A, B and C above) in a register array and // makes a single invocation of VUpdate. -func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:143548:13: */ +func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintptr, pChanges uintptr, pRowid uintptr, aXRef uintptr, pWhere uintptr, onError int32) { /* sqlite3.c:143582:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -126085,7 +126317,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt Xsqlite3VdbeAddOp2(tls, v, OP_SCopy, regArg+2+int32(iPk), regArg+1) } - eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp /* &aDummy[0] */) + eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp) // There is no ONEPASS_MULTI on virtual tables @@ -126157,7 +126389,7 @@ func updateVirtualTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pTab uintpt // #include "sqliteInt.h" // Free a list of Upsert objects -func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:143734:29: */ +func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:143768:29: */ for ok := true; ok; ok = p != 0 { var pNext uintptr = (*Upsert)(unsafe.Pointer(p)).FpNextUpsert Xsqlite3ExprListDelete(tls, db, (*Upsert)(unsafe.Pointer(p)).FpUpsertTarget) @@ -126170,14 +126402,14 @@ func upsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:143734:29 } } -func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:143746:21: */ +func Xsqlite3UpsertDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:143780:21: */ if p != 0 { upsertDelete(tls, db, p) } } // Duplicate an Upsert object. -func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:143754:23: */ +func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:143788:23: */ if p == uintptr(0) { return uintptr(0) } @@ -126190,7 +126422,7 @@ func Xsqlite3UpsertDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite } // Create a new Upsert object. -func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:143768:23: */ +func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere uintptr, pSet uintptr, pWhere uintptr, pNext uintptr) uintptr { /* sqlite3.c:143802:23: */ var pNew uintptr pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Upsert{}))) if pNew == uintptr(0) { @@ -126216,7 +126448,7 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // // Return SQLITE_OK if everything works, or an error code is something // is wrong. -func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:143803:20: */ +func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:143837:20: */ bp := tls.Alloc(168) defer tls.Free(168) @@ -126235,7 +126467,7 @@ func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr // Resolve all symbolic names in the conflict-target clause, which // includes both the list of columns and the optional partial-index // WHERE clause. - libc.Xmemset(tls, bp+16 /* &sNC */, 0, uint32(unsafe.Sizeof(NameContext{}))) + libc.Xmemset(tls, bp+16, 0, uint32(unsafe.Sizeof(NameContext{}))) (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpParse = pParse (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpSrcList = pTabList __1: @@ -126243,11 +126475,11 @@ __1: goto __3 } { - rc = Xsqlite3ResolveExprListNames(tls, bp+16 /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) + rc = Xsqlite3ResolveExprListNames(tls, bp+16, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) if rc != 0 { return rc } - rc = Xsqlite3ResolveExprNames(tls, bp+16 /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) + rc = Xsqlite3ResolveExprNames(tls, bp+16, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) if rc != 0 { return rc } @@ -126270,11 +126502,11 @@ __1: // operator and sCol[1] will be the TK_COLUMN operator. Code below // will populate the specific collation and column number values // prior to comparing against the conflict-target expression. - libc.Xmemset(tls, bp+48 /* &sCol[0] */, 0, uint32(unsafe.Sizeof([2]Expr{}))) - (*Expr)(unsafe.Pointer(bp + 48 /* &sCol */)).Fop = U8(TK_COLLATE) - (*Expr)(unsafe.Pointer(bp + 48 /* &sCol */)).FpLeft = bp + 48 + 1*52 - (*Expr)(unsafe.Pointer(bp + 48 /* &sCol */ + 1*52)).Fop = U8(TK_COLUMN) - (*Expr)(unsafe.Pointer(bp + 48 /* &sCol */ + 1*52)).FiTable = (*SrcItem)(unsafe.Pointer(pTabList + 8)).FiCursor + libc.Xmemset(tls, bp+48, 0, uint32(unsafe.Sizeof([2]Expr{}))) + (*Expr)(unsafe.Pointer(bp + 48)).Fop = U8(TK_COLLATE) + (*Expr)(unsafe.Pointer(bp + 48)).FpLeft = bp + 48 + 1*52 + (*Expr)(unsafe.Pointer(bp + 48 + 1*52)).Fop = U8(TK_COLUMN) + (*Expr)(unsafe.Pointer(bp + 48 + 1*52)).FiTable = (*SrcItem)(unsafe.Pointer(pTabList + 8)).FiCursor // Check for matches against other indexes for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { @@ -126304,12 +126536,12 @@ __1: pExpr = (*ExprList_item)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 + uintptr(ii)*20)).FpExpr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { - (*Expr)(unsafe.Pointer(bp + 48 /* &sCol */)).FpLeft = pExpr + (*Expr)(unsafe.Pointer(bp + 48)).FpLeft = pExpr pExpr = bp + 48 } } else { - (*Expr)(unsafe.Pointer(bp + 48 /* &sCol */)).FpLeft = bp + 48 + 1*52 - (*Expr)(unsafe.Pointer(bp + 48 /* &sCol */ + 1*52)).FiColumn = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(ii)*2)) + (*Expr)(unsafe.Pointer(bp + 48)).FpLeft = bp + 48 + 1*52 + (*Expr)(unsafe.Pointer(bp + 48 + 1*52)).FiColumn = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(ii)*2)) pExpr = bp + 48 } for jj = 0; jj < nn; jj++ { @@ -126334,12 +126566,12 @@ __1: // var zWhich [16]int8 at bp+152, 16 if nClause == 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0) { - *(*int8)(unsafe.Pointer(bp + 152 /* &zWhich[0] */)) = int8(0) + *(*int8)(unsafe.Pointer(bp + 152)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+152 /* &zWhich[0] */, ts+20209 /* "%r " */, libc.VaList(bp, nClause+1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+152, ts+20378, libc.VaList(bp, nClause+1)) } Xsqlite3ErrorMsg(tls, pParse, - ts+20213 /* "%sON CONFLICT cl..." */, libc.VaList(bp+8, bp+152 /* &zWhich[0] */)) + ts+20382, libc.VaList(bp+8, bp+152)) return SQLITE_ERROR } @@ -126358,7 +126590,7 @@ __3: // Return true if pUpsert is the last ON CONFLICT clause with a // conflict target, or if pUpsert is followed by another ON CONFLICT // clause that targets the INTEGER PRIMARY KEY. -func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:143930:20: */ +func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3.c:143964:20: */ var pNext uintptr if pUpsert == uintptr(0) { return 0 @@ -126380,7 +126612,7 @@ func Xsqlite3UpsertNextIsIPK(tls *libc.TLS, pUpsert uintptr) int32 { /* sqlite3. // a particular index pIdx, return a pointer to the particular ON CONFLICT // clause that applies to the index. Or, if the index is not subject to // any ON CONFLICT clause, return NULL. -func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:143946:23: */ +func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr { /* sqlite3.c:143980:23: */ for pUpsert != 0 && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != uintptr(0) && (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx != pIdx { @@ -126396,7 +126628,7 @@ func Xsqlite3UpsertOfIndex(tls *libc.TLS, pUpsert uintptr, pIdx uintptr) uintptr // currently points to the conflicting table row. Otherwise, if pIdx // is not NULL, then pIdx is the constraint that failed and iCur is a // cursor points to the conflicting row. -func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:143966:21: */ +func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab uintptr, pIdx uintptr, iCur int32) { /* sqlite3.c:144000:21: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pSrc uintptr // FROM clause for the UPDATE @@ -126430,7 +126662,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab i = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, iDataCur, 0, iPk, nPk) Xsqlite3VdbeAddOp4(tls, v, OP_Halt, SQLITE_CORRUPT, OE_Abort, 0, - ts+12040 /* "corrupt database" */, -1) + ts+12062, -1) Xsqlite3MayAbort(tls, pParse) Xsqlite3VdbeJumpHere(tls, v, i) } @@ -126476,7 +126708,7 @@ func Xsqlite3UpsertDoUpdate(tls *libc.TLS, pParse uintptr, pUpsert uintptr, pTab // // The execSqlF() routine does the same thing, except it accepts // a format string as its third argument -func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:144063:12: */ +func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { /* sqlite3.c:144097:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -126485,7 +126717,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { var rc int32 // printf("SQL: [%s]\n", zSql); fflush(stdout); - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp, uintptr(0)) if rc != SQLITE_OK { return rc } @@ -126498,7 +126730,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { // then run VACUUM to get those statements to execute at inappropriate // times. if zSubSql != 0 && - (libc.Xstrncmp(tls, zSubSql, ts+20286, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20290, uint32(3)) == 0) { + (libc.Xstrncmp(tls, zSubSql, ts+20455, uint32(3)) == 0 || libc.Xstrncmp(tls, zSubSql, ts+20459, uint32(3)) == 0) { rc = execSql(tls, db, pzErrMsg, zSubSql) if rc != SQLITE_OK { break @@ -126516,7 +126748,7 @@ func execSql(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr) int32 { return rc } -func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:144093:12: */ +func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uintptr) int32 { /* sqlite3.c:144127:12: */ var z uintptr var ap Va_list _ = ap @@ -126560,7 +126792,7 @@ func execSqlF(tls *libc.TLS, db uintptr, pzErrMsg uintptr, zSql uintptr, va uint // And a power loss in between deleting the original and renaming the // transient would cause the database file to appear to be deleted // following reboot. -func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:144136:21: */ +func Xsqlite3Vacuum(tls *libc.TLS, pParse uintptr, pNm uintptr, pInto uintptr) { /* sqlite3.c:144170:21: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pNm @@ -126587,7 +126819,7 @@ __2: } // Default behavior: Report an error if the argument to VACUUM is // not recognized - iDb = Xsqlite3TwoPartName(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pNm */)), *(*uintptr)(unsafe.Pointer(bp /* pNm */)), bp /* &pNm */) + iDb = Xsqlite3TwoPartName(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* pNm */)), *(*uintptr)(unsafe.Pointer(bp /* pNm */)), bp) if !(iDb < 0) { goto __4 } @@ -126617,7 +126849,7 @@ build_vacuum_end: } // This routine implements the OP_Vacuum opcode of the VDBE. -func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:144174:36: */ +func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:144208:36: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -126648,14 +126880,14 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p if !!(int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) != 0) { goto __1 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20294 /* "cannot VACUUM fr..." */) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20463) return SQLITE_ERROR // IMP: R-12218-18073 __1: ; if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive > 1) { goto __2 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20334 /* "cannot VACUUM - ..." */) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20503) return SQLITE_ERROR // IMP: R-15610-35227 __2: ; @@ -126666,7 +126898,7 @@ __2: if !(Xsqlite3_value_type(tls, pOut) != SQLITE_TEXT) { goto __5 } - Xsqlite3SetString(tls, pzErrMsg, db, ts+20377 /* "non-text filenam..." */) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20546) return SQLITE_ERROR __5: ; @@ -126675,7 +126907,7 @@ __5: *(*uint32)(unsafe.Pointer(db + 56)) |= uint32(SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE) goto __4 __3: - zOut = ts + 1543 /* "" */ + zOut = ts + 1565 /* "" */ __4: ; @@ -126711,7 +126943,7 @@ __4: // time to parse and run the PRAGMA to turn journalling off than it does // to write the journal header file. nDb = (*Sqlite3)(unsafe.Pointer(db)).FnDb - rc = execSqlF(tls, db, pzErrMsg, ts+20395 /* "ATTACH %Q AS vac..." */, libc.VaList(bp, zOut)) + rc = execSqlF(tls, db, pzErrMsg, ts+20564, libc.VaList(bp, zOut)) (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = saved_openFlags if !(rc != SQLITE_OK) { goto __6 @@ -126732,7 +126964,7 @@ __6: goto __8 } rc = SQLITE_ERROR - Xsqlite3SetString(tls, pzErrMsg, db, ts+20418 /* "output file alre..." */) + Xsqlite3SetString(tls, pzErrMsg, db, ts+20587) goto end_of_vacuum __8: ; @@ -126748,7 +126980,7 @@ __7: // Begin a transaction and take an exclusive lock on the main database // file. This is done before the sqlite3BtreeGetPageSize(pMain) call below, // to ensure that we do not try to change the page-size on a WAL database. - rc = execSql(tls, db, pzErrMsg, ts+14396 /* "BEGIN" */) + rc = execSql(tls, db, pzErrMsg, ts+14418) if !(rc != SQLITE_OK) { goto __9 } @@ -126800,7 +127032,7 @@ __12: (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(nDb) // force new CREATE statements into vacuum_db rc = execSqlF(tls, db, pzErrMsg, - ts+20445, /* "SELECT sql FROM ..." */ + ts+20614, libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 @@ -126810,7 +127042,7 @@ __13: ; rc = execSqlF(tls, db, pzErrMsg, - ts+20553, /* "SELECT sql FROM ..." */ + ts+20722, libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 @@ -126825,7 +127057,7 @@ __14: // the contents to the temporary database. rc = execSqlF(tls, db, pzErrMsg, - ts+20607, /* "SELECT'INSERT IN..." */ + ts+20776, libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 24)) &= libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum)) @@ -126842,7 +127074,7 @@ __15: // from the schema table. rc = execSqlF(tls, db, pzErrMsg, - ts+20758, /* "INSERT INTO vacu..." */ + ts+20927, libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 @@ -126866,7 +127098,7 @@ __17: } // GetMeta() and UpdateMeta() cannot fail in this context because // we already have page 1 loaded into cache and marked dirty. - Xsqlite3BtreeGetMeta(tls, pMain, int32(aCopy[i]), bp+48 /* &meta */) + Xsqlite3BtreeGetMeta(tls, pMain, int32(aCopy[i]), bp+48) rc = Xsqlite3BtreeUpdateMeta(tls, pTemp, int32(aCopy[i]), *(*U32)(unsafe.Pointer(bp + 48))+U32(aCopy[i+1])) if !(rc != SQLITE_OK) { goto __20 @@ -126955,7 +127187,7 @@ var aCopy = [10]uint8{ uint8(BTREE_TEXT_ENCODING), uint8(0), // Preserve the text encoding uint8(BTREE_USER_VERSION), uint8(0), // Preserve the user version uint8(BTREE_APPLICATION_ID), uint8(0), // Preserve the application id -} /* sqlite3.c:144367:32 */ +} /* sqlite3.c:144401:32 */ // Construct and install a Module object for a virtual table. When this // routine is called, it is guaranteed that all appropriate locks are held @@ -126963,7 +127195,7 @@ var aCopy = [10]uint8{ // // If there already exists a module with zName, replace it with the new one. // If pModule==0, then delete the module zName if it exists. -func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:144479:23: */ +func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) uintptr { /* sqlite3.c:144513:23: */ var pMod uintptr var pDel uintptr var zCopy uintptr @@ -127003,7 +127235,7 @@ func Xsqlite3VtabCreateModule(tls *libc.TLS, db uintptr, zName uintptr, pModule // The actual function that does the work of creating a new module. // This function implements the sqlite3_create_module() and // sqlite3_create_module_v2() interfaces. -func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:144527:12: */ +func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:144561:12: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -127017,18 +127249,18 @@ func createModule(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAu } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:144548:16: */ +func Xsqlite3_create_module(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr) int32 { /* sqlite3.c:144582:16: */ return createModule(tls, db, zName, pModule, pAux, uintptr(0)) } // External API function used to create a new virtual-table module. -func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:144563:16: */ +func Xsqlite3_create_module_v2(tls *libc.TLS, db uintptr, zName uintptr, pModule uintptr, pAux uintptr, xDestroy uintptr) int32 { /* sqlite3.c:144597:16: */ return createModule(tls, db, zName, pModule, pAux, xDestroy) } // External API to drop all virtual-table modules, except those named // on the azNames list. -func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:144580:16: */ +func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { /* sqlite3.c:144614:16: */ var pThis uintptr var pNext uintptr for pThis = (*Hash)(unsafe.Pointer(db + 388)).Ffirst; pThis != 0; pThis = pNext { @@ -127049,7 +127281,7 @@ func Xsqlite3_drop_modules(tls *libc.TLS, db uintptr, azNames uintptr) int32 { / // Decrement the reference count on a Module object. Destroy the // module when the reference count reaches zero. -func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:144602:21: */ +func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:144636:21: */ (*Module)(unsafe.Pointer(pMod)).FnRefModule-- if (*Module)(unsafe.Pointer(pMod)).FnRefModule == 0 { @@ -127067,14 +127299,14 @@ func Xsqlite3VtabModuleUnref(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlit // // If a disconnect is attempted while a virtual table is locked, // the disconnect is deferred until all locks have been removed. -func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:144622:21: */ +func Xsqlite3VtabLock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:144656:21: */ (*VTable)(unsafe.Pointer(pVTab)).FnRef++ } // pTab is a pointer to a Table structure representing a virtual-table. // Return a pointer to the VTable object used by connection db to access // this virtual-table, if one has been created, or NULL otherwise. -func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:144632:23: */ +func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sqlite3.c:144666:23: */ var pVtab uintptr for pVtab = *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.p */)); pVtab != 0 && (*VTable)(unsafe.Pointer(pVtab)).Fdb != db; pVtab = (*VTable)(unsafe.Pointer(pVtab)).FpNext { @@ -127084,7 +127316,7 @@ func Xsqlite3GetVTable(tls *libc.TLS, db uintptr, pTab uintptr) uintptr { /* sql // Decrement the ref-count on a virtual table object. When the ref-count // reaches zero, call the xDisconnect() method to delete the object. -func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:144643:21: */ +func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:144677:21: */ var db uintptr = (*VTable)(unsafe.Pointer(pVTab)).Fdb (*VTable)(unsafe.Pointer(pVTab)).FnRef-- @@ -127105,7 +127337,7 @@ func Xsqlite3VtabUnlock(tls *libc.TLS, pVTab uintptr) { /* sqlite3.c:144643:21: // database connections to be disconnected at the next opportunity. // Except, if argument db is not NULL, then the entry associated with // connection db is left in the p->u.vtab.p list. -func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144669:15: */ +func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:144703:15: */ var pRet uintptr = uintptr(0) var pVTable uintptr @@ -127142,7 +127374,7 @@ func vtabDisconnectAll(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite // used when closing database connection db to free all of its VTable // objects without disturbing the rest of the Schema object (which may // be being used by other shared-cache connections). -func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144712:21: */ +func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144746:21: */ var ppVTab uintptr for ppVTab = p + 44 + 8; *(*uintptr)(unsafe.Pointer(ppVTab)) != 0; ppVTab = *(*uintptr)(unsafe.Pointer(ppVTab)) + 24 { @@ -127173,7 +127405,7 @@ func Xsqlite3VtabDisconnect(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c // // As a result, a sqlite3.pDisconnect cannot be accessed simultaneously // by multiple threads. It is thread-safe. -func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:144750:21: */ +func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:144784:21: */ var p uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpDisconnect if p != 0 { @@ -127199,7 +127431,7 @@ func Xsqlite3VtabUnlockList(tls *libc.TLS, db uintptr) { /* sqlite3.c:144750:21: // structure being xDisconnected and free). Any other VTable structures // in the list are moved to the sqlite3.pDisconnect list of the associated // database connection. -func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144781:21: */ +func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:144815:21: */ if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FpnBytesFreed == uintptr(0) { vtabDisconnectAll(tls, uintptr(0), p) @@ -127219,7 +127451,7 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1447 // The string is not copied - the pointer is stored. The // string will be freed automatically when the table is // deleted. -func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:144799:13: */ +func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:144833:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127229,7 +127461,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp nBytes = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32(2+*(*int32)(unsafe.Pointer(pTable + 44)))) if *(*int32)(unsafe.Pointer(pTable + 44))+3 >= *(*int32)(unsafe.Pointer(db + 112 + 2*4)) { - Xsqlite3ErrorMsg(tls, pParse, ts+12270 /* "too many columns..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12292, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName)) } azModuleArg = Xsqlite3DbRealloc(tls, db, *(*uintptr)(unsafe.Pointer(pTable + 44 + 4 /* &.azArg */)), uint64(nBytes)) if azModuleArg == uintptr(0) { @@ -127245,7 +127477,7 @@ func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintp // The parser calls this routine when it first sees a CREATE VIRTUAL TABLE // statement. The module name has been parsed, but the optional list // of parameters that follow the module name are still pending. -func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:144825:21: */ +func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pModuleName uintptr, ifNotExists int32) { /* sqlite3.c:144859:21: */ var pTable uintptr // The new virtual table var db uintptr // Database connection @@ -127280,7 +127512,7 @@ func Xsqlite3VtabBeginParse(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName // This routine takes the module argument that has been accumulating // in pParse->zArg[] and appends it to the list of arguments on the // virtual table currently under construction in pParse->pTable. -func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:144874:13: */ +func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:144908:13: */ if (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz != 0 && (*Parse)(unsafe.Pointer(pParse)).FpNewTable != 0 { var z uintptr = (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz var n int32 = int32((*Parse)(unsafe.Pointer(pParse)).FsArg.Fn) @@ -127291,7 +127523,7 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:144874:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. -func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:144887:21: */ +func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:144921:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -127326,7 +127558,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s if pEnd != 0 { (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fn = uint32((int32((*Token)(unsafe.Pointer(pEnd)).Fz)-int32((*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz))/1) + (*Token)(unsafe.Pointer(pEnd)).Fn } - zStmt = Xsqlite3MPrintf(tls, db, ts+20888 /* "CREATE VIRTUAL T..." */, libc.VaList(bp, pParse+176)) + zStmt = Xsqlite3MPrintf(tls, db, ts+21057, libc.VaList(bp, pParse+184)) // A slot for the record has already been allocated in the // schema table. We just need to update that slot with all @@ -127338,7 +127570,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s iDb = Xsqlite3SchemaToIndex(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSchema) Xsqlite3NestedParse(tls, pParse, - ts+20912, /* "UPDATE %Q.sqlite..." */ + ts+21081, libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*16)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, @@ -127348,7 +127580,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21011 /* "name=%Q AND sql=..." */, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21180, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -127375,7 +127607,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s // The parser calls this routine when it sees the first token // of an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:144970:21: */ +func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:145004:21: */ addArgumentToVtab(tls, pParse) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fz = uintptr(0) (*Parse)(unsafe.Pointer(pParse)).FsArg.Fn = uint32(0) @@ -127383,8 +127615,8 @@ func Xsqlite3VtabArgInit(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:144970:21 // The parser calls this routine for each token after the first token // in an argument to the module name in a CREATE VIRTUAL TABLE statement. -func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:144980:21: */ - var pArg uintptr = pParse + 240 +func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:145014:21: */ + var pArg uintptr = pParse + 248 if (*Token)(unsafe.Pointer(pArg)).Fz == uintptr(0) { (*Token)(unsafe.Pointer(pArg)).Fz = (*Token)(unsafe.Pointer(p)).Fz (*Token)(unsafe.Pointer(pArg)).Fn = (*Token)(unsafe.Pointer(p)).Fn @@ -127397,7 +127629,7 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // Invoke a virtual table constructor (either xCreate or xConnect). The // pointer to the function to invoke is passed as the fourth parameter // to this procedure. -func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:144996:12: */ +func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:145030:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -127418,7 +127650,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, for pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx; pCtx != 0; pCtx = (*VtabCtx)(unsafe.Pointer(pCtx)).FpPrior { if (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab == pTab { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, - ts+21030 /* "vtable construct..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+21199, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return SQLITE_LOCKED } } @@ -127458,9 +127690,9 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, if SQLITE_OK != rc { if *(*uintptr)(unsafe.Pointer(bp + 48)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21072 /* "vtable construct..." */, libc.VaList(bp+8, zModuleName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21241, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3601 /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3623, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */))) } Xsqlite3DbFree(tls, db, pVTable) @@ -127472,7 +127704,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 if (*VtabCtx)(unsafe.Pointer(bp+32)).FbDeclared == 0 { - var zFormat uintptr = ts + 21102 /* "vtable construct..." */ + var zFormat uintptr = ts + 21271 /* "vtable construct..." */ *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR @@ -127488,12 +127720,12 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, *(*uintptr)(unsafe.Pointer(pTab + 44 + 8 /* &.p */)) = pVTable for iCol = 0; iCol < int32((*Table)(unsafe.Pointer(pTab)).FnCol); iCol++ { - var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1543 /* "" */) + var zType uintptr = Xsqlite3ColumnType(tls, (*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*16, ts+1565) var nType int32 var i int32 = 0 nType = Xsqlite3Strlen30(tls, zType) for i = 0; i < nType; i++ { - if 0 == Xsqlite3_strnicmp(tls, ts+15852, zType+uintptr(i), 6) && + if 0 == Xsqlite3_strnicmp(tls, ts+16025, zType+uintptr(i), 6) && (i == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i-1)))) == ' ') && (int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == 0 || int32(*(*int8)(unsafe.Pointer(zType + uintptr(i+6)))) == ' ') { break @@ -127533,7 +127765,7 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // and an error left in pParse. // // This call is a no-op if table pTab is not a virtual table. -func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:145132:20: */ +func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:145166:20: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -127552,13 +127784,13 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 if !(pMod != 0) { var zModule uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pTab + 44 + 4 /* &.azArg */)))) - Xsqlite3ErrorMsg(tls, pParse, ts+21148 /* "no such module: ..." */, libc.VaList(bp, zModule)) + Xsqlite3ErrorMsg(tls, pParse, ts+21317, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) - rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp+16 /* &zErr */) + rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp+16) if rc != SQLITE_OK { - Xsqlite3ErrorMsg(tls, pParse, ts+3601 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3623, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */))) @@ -127569,7 +127801,7 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 // Grow the db->aVTrans[] array so that there is room for at least one // more v-table. Return SQLITE_NOMEM if a malloc fails, or SQLITE_OK otherwise. -func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145168:12: */ +func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145202:12: */ var ARRAY_INCR int32 = 5 // Grow the sqlite3.aVTrans array if required @@ -127589,7 +127821,7 @@ func growVTrans(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145168:12: */ // Add the virtual table pVTab to the array sqlite3.aVTrans[]. Space should // have already been reserved using growVTrans(). -func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:145191:13: */ +func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:145225:13: */ // Add pVtab to the end of sqlite3.aVTrans *(*uintptr)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaVTrans + uintptr(libc.PostIncInt32(&(*Sqlite3)(unsafe.Pointer(db)).FnVTrans, 1))*4)) = pVTab Xsqlite3VtabLock(tls, pVTab) @@ -127601,7 +127833,7 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:145191 // If an error occurs, *pzErr is set to point to an English language // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. -func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:145205:20: */ +func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:145239:20: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -127620,7 +127852,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // invoke it now. If the module has not been registered, return an // error. Otherwise, do nothing. if pMod == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate == uintptr(0) || (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxDestroy == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21148 /* "no such module: ..." */, libc.VaList(bp, zMod)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21317, libc.VaList(bp, zMod)) rc = SQLITE_ERROR } else { rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxCreate, pzErr) @@ -127641,7 +127873,7 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // This function is used to set the schema of a virtual table. It is only // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. -func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:145246:16: */ +func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:145280:16: */ bp := tls.Alloc(280) defer tls.Free(280) @@ -127658,11 +127890,11 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 if !(pCtx != 0) || (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared != 0 { Xsqlite3Error(tls, db, SQLITE_MISUSE) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - return Xsqlite3MisuseError(tls, 145264) + return Xsqlite3MisuseError(tls, 145298) } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab - libc.Xmemset(tls, bp+8 /* &sParse */, 0, uint32(unsafe.Sizeof(Parse{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(Parse{}))) (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FeParseMode = U8(PARSE_MODE_DECLARE_VTAB) (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).Fdb = db // We should never be able to reach this point while loading the @@ -127705,7 +127937,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 } else { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 276)) != 0 { - return ts + 3601 /* "%s" */ + return ts + 3623 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 276 /* zErr */)))) @@ -127718,7 +127950,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpVdbe) } Xsqlite3DeleteTable(tls, db, (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpNewTable) - Xsqlite3ParserReset(tls, bp+8 /* &sParse */) + Xsqlite3ParserReset(tls, bp+8) (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(initBusy) rc = Xsqlite3ApiExit(tls, db, rc) @@ -127731,7 +127963,7 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 // when a DROP TABLE is mentioned. // // This call is a no-op if zTab is not a virtual table. -func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:145339:20: */ +func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) int32 { /* sqlite3.c:145373:20: */ var rc int32 = SQLITE_OK var pTab uintptr @@ -127776,7 +128008,7 @@ func Xsqlite3VtabCallDestroy(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr) // the offset of the method to call in the sqlite3_module structure. // // The array is cleared after invoking the callbacks. -func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:145383:13: */ +func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:145417:13: */ var i int32 if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -127806,7 +128038,7 @@ func callFinaliser(tls *libc.TLS, db uintptr, offset int32) { /* sqlite3.c:14538 // SQLITE_OK if all xSync operations are successful. // // If an error message is available, leave it in p->zErrMsg. -func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:145411:20: */ +func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:145445:20: */ var i int32 var rc int32 = SQLITE_OK var aVTrans uintptr = (*Sqlite3)(unsafe.Pointer(db)).FaVTrans @@ -127828,14 +128060,14 @@ func Xsqlite3VtabSync(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c // Invoke the xRollback method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145433:20: */ +func Xsqlite3VtabRollback(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145467:20: */ callFinaliser(tls, db, int32(uintptr(0)+68)) return SQLITE_OK } // Invoke the xCommit method of all virtual tables in the // sqlite3.aVTrans array. Then clear the array itself. -func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145442:20: */ +func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145476:20: */ callFinaliser(tls, db, int32(uintptr(0)+64)) return SQLITE_OK } @@ -127846,7 +128078,7 @@ func Xsqlite3VtabCommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145442:2 // // If the xBegin call is successful, place the sqlite3_vtab pointer // in the sqlite3.aVTrans array. -func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:145455:20: */ +func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqlite3.c:145489:20: */ var rc int32 = SQLITE_OK var pModule uintptr @@ -127907,7 +128139,7 @@ func Xsqlite3VtabBegin(tls *libc.TLS, db uintptr, pVTab uintptr) int32 { /* sqli // processing is abandoned and the error returned to the caller of this // function immediately. If all calls to virtual table methods are successful, // SQLITE_OK is returned. -func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:145515:20: */ +func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32) int32 { /* sqlite3.c:145549:20: */ var rc int32 = SQLITE_OK if (*Sqlite3)(unsafe.Pointer(db)).FaVTrans != 0 { @@ -127955,7 +128187,7 @@ func Xsqlite3VtabSavepoint(tls *libc.TLS, db uintptr, op int32, iSavepoint int32 // Return either the pDef argument (indicating no change) or a // new FuncDef structure that is marked as ephemeral using the // SQLITE_FUNC_EPHEM flag. -func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:145563:24: */ +func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg int32, pExpr uintptr) uintptr { /* sqlite3.c:145597:24: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128022,7 +128254,7 @@ func Xsqlite3VtabOverloadFunction(tls *libc.TLS, db uintptr, pDef uintptr, nArg // array so that an OP_VBegin will get generated for it. Add pTab to the // array if it is missing. If pTab is already in the array, this routine // is a no-op. -func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:145633:21: */ +func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:145667:21: */ var pToplevel uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { return (*Parse)(unsafe.Pointer(pParse)).FpToplevel @@ -128061,7 +128293,7 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. -func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:145667:20: */ +func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:145701:20: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -128095,9 +128327,9 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName)) addModuleArgument(tls, pParse, pTab, uintptr(0)) addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName)) - rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp+8 /* &zErr */) + rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp+8) if rc != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+3601 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3623, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))) Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) } @@ -128106,7 +128338,7 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) // Erase the eponymous virtual table instance associated with // virtual table module pMod, if it exists. -func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145705:21: */ +func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { /* sqlite3.c:145739:21: */ var pTab uintptr = (*Module)(unsafe.Pointer(pMod)).FpEpoTab if pTab != uintptr(0) { // Mark the table as Ephemeral prior to deleting it, so that the @@ -128123,19 +128355,19 @@ func Xsqlite3VtabEponymousTableClear(tls *libc.TLS, db uintptr, pMod uintptr) { // // The results of this routine are undefined unless it is called from // within an xUpdate method. -func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145724:16: */ +func Xsqlite3_vtab_on_conflict(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:145758:16: */ return int32(aMap[int32((*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict)-1]) } var aMap = [5]uint8{ uint8(SQLITE_ROLLBACK), uint8(SQLITE_ABORT), uint8(SQLITE_FAIL), uint8(SQLITE_IGNORE), uint8(SQLITE_REPLACE), -} /* sqlite3.c:145725:30 */ +} /* sqlite3.c:145759:30 */ // Call from within the xCreate() or xConnect() methods to provide // the SQLite core with additional information about the behavior // of the virtual table being implemented. -func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:145742:16: */ +func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:145776:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -128144,7 +128376,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) p = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx if !(p != 0) { - rc = Xsqlite3MisuseError(tls, 145753) + rc = Xsqlite3MisuseError(tls, 145787) } else { ap = va @@ -128172,7 +128404,7 @@ func Xsqlite3_vtab_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 fallthrough default: { - rc = Xsqlite3MisuseError(tls, 145771) + rc = Xsqlite3MisuseError(tls, 145805) break } @@ -128275,23 +128507,23 @@ type WhereClause1 = struct { // a separate source file for easier editing. // Forward references -type WhereClause = WhereClause1 /* sqlite3.c:145831:28 */ +type WhereClause = WhereClause1 /* sqlite3.c:145865:28 */ type WhereMaskSet1 = struct { FbVarSelect int32 Fn int32 Fix [64]int32 } /* sqlite3.c:14311:9 */ -type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:145832:29 */ +type WhereMaskSet = WhereMaskSet1 /* sqlite3.c:145866:29 */ type WhereOrInfo1 = struct { Fwc WhereClause Findexable Bitmask -} /* sqlite3.c:145833:9 */ +} /* sqlite3.c:145867:9 */ -type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:145833:28 */ -type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:145834:9 */ +type WhereOrInfo = WhereOrInfo1 /* sqlite3.c:145867:28 */ +type WhereAndInfo1 = struct{ Fwc WhereClause } /* sqlite3.c:145868:9 */ -type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:145834:29 */ +type WhereAndInfo = WhereAndInfo1 /* sqlite3.c:145868:29 */ type WhereLevel1 = struct { FiLeftJoin int32 FiTabCur int32 @@ -128320,7 +128552,7 @@ type WhereLevel1 = struct { FnotReady Bitmask } /* sqlite3.c:14311:9 */ -type WhereLevel = WhereLevel1 /* sqlite3.c:145835:27 */ +type WhereLevel = WhereLevel1 /* sqlite3.c:145869:27 */ type WhereLoop1 = struct { Fprereq Bitmask FmaskSelf Bitmask @@ -128348,7 +128580,7 @@ type WhereLoop1 = struct { FaLTermSpace [3]uintptr } /* sqlite3.c:14311:9 */ -type WhereLoop = WhereLoop1 /* sqlite3.c:145836:26 */ +type WhereLoop = WhereLoop1 /* sqlite3.c:145870:26 */ type WherePath1 = struct { FmaskLoop Bitmask FrevLoop Bitmask @@ -128358,9 +128590,9 @@ type WherePath1 = struct { FisOrdered I8 F__ccgo_pad1 [1]byte FaLoop uintptr -} /* sqlite3.c:145837:9 */ +} /* sqlite3.c:145871:9 */ -type WherePath = WherePath1 /* sqlite3.c:145837:26 */ +type WherePath = WherePath1 /* sqlite3.c:145871:26 */ type WhereTerm1 = struct { FpExpr uintptr FpWC uintptr @@ -128381,7 +128613,7 @@ type WhereTerm1 = struct { FprereqAll Bitmask } /* sqlite3.c:14311:9 */ -type WhereTerm = WhereTerm1 /* sqlite3.c:145838:26 */ +type WhereTerm = WhereTerm1 /* sqlite3.c:145872:26 */ type WhereLoopBuilder1 = struct { FpWInfo uintptr FpWC uintptr @@ -128394,9 +128626,9 @@ type WhereLoopBuilder1 = struct { FbldFlags2 uint8 F__ccgo_pad1 [2]byte FiPlanLimit uint32 -} /* sqlite3.c:145839:9 */ +} /* sqlite3.c:145873:9 */ -type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:145839:33 */ +type WhereLoopBuilder = WhereLoopBuilder1 /* sqlite3.c:145873:33 */ type WhereScan1 = struct { FpOrigWC uintptr FpWC uintptr @@ -128411,23 +128643,23 @@ type WhereScan1 = struct { FaiCur [11]int32 FaiColumn [11]I16 F__ccgo_pad2 [2]byte -} /* sqlite3.c:145840:9 */ +} /* sqlite3.c:145874:9 */ -type WhereScan = WhereScan1 /* sqlite3.c:145840:26 */ +type WhereScan = WhereScan1 /* sqlite3.c:145874:26 */ type WhereOrCost1 = struct { Fprereq Bitmask FrRun LogEst FnOut LogEst -} /* sqlite3.c:145839:9 */ +} /* sqlite3.c:145873:9 */ -type WhereOrCost = WhereOrCost1 /* sqlite3.c:145841:28 */ +type WhereOrCost = WhereOrCost1 /* sqlite3.c:145875:28 */ type WhereOrSet1 = struct { Fn U16 F__ccgo_pad1 [2]byte Fa [3]WhereOrCost -} /* sqlite3.c:145839:9 */ +} /* sqlite3.c:145873:9 */ -type WhereOrSet = WhereOrSet1 /* sqlite3.c:145842:27 */ +type WhereOrSet = WhereOrSet1 /* sqlite3.c:145876:27 */ // This object contains information needed to implement a single nested // loop in WHERE clause. @@ -128449,7 +128681,7 @@ type InLoop = struct { FnPrefix int32 FeEndLoopOp U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:145881:7 */ +} /* sqlite3.c:145915:7 */ // Allowed values for WhereLoopBuider.bldFlags @@ -128497,7 +128729,7 @@ type WhereExprMod1 = struct { // of an index rather than an expression or a virtual column. All // such transformations need to be undone at the end of WHERE clause // processing. -type WhereExprMod = WhereExprMod1 /* sqlite3.c:146245:29 */ +type WhereExprMod = WhereExprMod1 /* sqlite3.c:146279:29 */ // Bitmasks for the operators on WhereTerm objects. These are all // operators that are of interest to the query planner. An @@ -128519,13 +128751,13 @@ type WhereExprMod = WhereExprMod1 /* sqlite3.c:146245:29 */ //************* Continuing where we left off in wherecode.c ***************** // Return the name of the i-th column of the pIdx index. -func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:146426:19: */ +func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* sqlite3.c:146460:19: */ i = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) if i == -2 { - return ts + 21167 /* "<expr>" */ + return ts + 21336 /* "<expr>" */ } if i == -1 { - return ts + 15961 /* "rowid" */ + return ts + 16134 /* "rowid" */ } return (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FpTable)).FaCol + uintptr(i)*16)).FzCnName } @@ -128536,39 +128768,39 @@ func explainIndexColumnName(tls *libc.TLS, pIdx uintptr, i int32) uintptr { /* s // at a time. This routine adds a new term to the end of the expression. // Terms are separated by AND so add the "AND" text for second and subsequent // terms only. -func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:146441:13: */ +func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, iTerm int32, bAnd int32, zOp uintptr) { /* sqlite3.c:146475:13: */ var i int32 if bAnd != 0 { - Xsqlite3_str_append(tls, pStr, ts+21174 /* " AND " */, 5) + Xsqlite3_str_append(tls, pStr, ts+21343, 5) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21180 /* "(" */, 1) + Xsqlite3_str_append(tls, pStr, ts+21349, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12660 /* "," */, 1) + Xsqlite3_str_append(tls, pStr, ts+12682, 1) } Xsqlite3_str_appendall(tls, pStr, explainIndexColumnName(tls, pIdx, iTerm+i)) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4877 /* ")" */, 1) + Xsqlite3_str_append(tls, pStr, ts+4899, 1) } Xsqlite3_str_append(tls, pStr, zOp, 1) if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+21180 /* "(" */, 1) + Xsqlite3_str_append(tls, pStr, ts+21349, 1) } for i = 0; i < nTerm; i++ { if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+12660 /* "," */, 1) + Xsqlite3_str_append(tls, pStr, ts+12682, 1) } - Xsqlite3_str_append(tls, pStr, ts+4928 /* "?" */, 1) + Xsqlite3_str_append(tls, pStr, ts+4950, 1) } if nTerm > 1 { - Xsqlite3_str_append(tls, pStr, ts+4877 /* ")" */, 1) + Xsqlite3_str_append(tls, pStr, ts+4899, 1) } } @@ -128584,7 +128816,7 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // string similar to: // // "a=? AND b>?" -func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:146485:13: */ +func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:146519:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -128597,29 +128829,29 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. if int32(nEq) == 0 && (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT) == U32(0) { return } - Xsqlite3_str_append(tls, pStr, ts+21182 /* " (" */, 2) + Xsqlite3_str_append(tls, pStr, ts+21351, 2) for i = 0; i < int32(nEq); i++ { var z uintptr = explainIndexColumnName(tls, pIndex, i) if i != 0 { - Xsqlite3_str_append(tls, pStr, ts+21174 /* " AND " */, 5) + Xsqlite3_str_append(tls, pStr, ts+21343, 5) } Xsqlite3_str_appendf(tls, pStr, func() uintptr { if i >= int32(nSkip) { - return ts + 21185 /* "%s=?" */ + return ts + 21354 /* "%s=?" */ } - return ts + 21190 /* "ANY(%s)" */ + return ts + 21359 /* "ANY(%s)" */ }(), libc.VaList(bp, z)) } j = i if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_BTM_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21198 /* ">" */) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 2 /* &.nBtm */))), j, i, ts+21367) i = 1 } if (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags&U32(WHERE_TOP_LIMIT) != 0 { - explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21200 /* "<" */) + explainAppendTerm(tls, pStr, pIndex, int32(*(*U16)(unsafe.Pointer(pLoop + 24 + 4 /* &.nTop */))), j, i, ts+21369) } - Xsqlite3_str_append(tls, pStr, ts+4877 /* ")" */, 1) + Xsqlite3_str_append(tls, pStr, ts+4899, 1) } // This function is a no-op unless currently processing an EXPLAIN QUERY PLAN @@ -128629,7 +128861,7 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. -func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:146519:20: */ +func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:146553:20: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -128662,13 +128894,13 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr flags&U32(WHERE_VIRTUALTABLE) == U32(0) && int32(*(*U16)(unsafe.Pointer(pLoop + 24))) > 0 || int32(wctrlFlags)&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX) != 0) - Xsqlite3StrAccumInit(tls, bp+48 /* &str */, db, bp+72 /* &zBuf[0] */, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) + Xsqlite3StrAccumInit(tls, bp+48, db, bp+72, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) (*StrAccum)(unsafe.Pointer(bp + 48 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+48 /* &str */, ts+21202 /* "%s %S" */, libc.VaList(bp, func() uintptr { + Xsqlite3_str_appendf(tls, bp+48, ts+21371, libc.VaList(bp, func() uintptr { if isSearch != 0 { - return ts + 21208 /* "SEARCH" */ + return ts + 21377 /* "SEARCH" */ } - return ts + 21215 /* "SCAN" */ + return ts + 21384 /* "SCAN" */ }(), pItem)) if flags&U32(WHERE_IPK|WHERE_VIRTUALTABLE) == U32(0) { var zFmt uintptr = uintptr(0) @@ -128678,41 +128910,41 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr if !((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FtabFlags&U32(TF_WithoutRowid) == U32(0)) && int32(*(*uint16)(unsafe.Pointer(pIdx + 56))&0x3>>0) == SQLITE_IDXTYPE_PRIMARYKEY { if isSearch != 0 { - zFmt = ts + 10814 /* "PRIMARY KEY" */ + zFmt = ts + 10836 /* "PRIMARY KEY" */ } } else if flags&U32(WHERE_PARTIALIDX) != 0 { - zFmt = ts + 21220 /* "AUTOMATIC PARTIA..." */ + zFmt = ts + 21389 /* "AUTOMATIC PARTIA..." */ } else if flags&U32(WHERE_AUTO_INDEX) != 0 { - zFmt = ts + 21253 /* "AUTOMATIC COVERI..." */ + zFmt = ts + 21422 /* "AUTOMATIC COVERI..." */ } else if flags&U32(WHERE_IDX_ONLY) != 0 { - zFmt = ts + 21278 /* "COVERING INDEX %..." */ + zFmt = ts + 21447 /* "COVERING INDEX %..." */ } else { - zFmt = ts + 21296 /* "INDEX %s" */ + zFmt = ts + 21465 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+48 /* &str */, ts+21305 /* " USING " */, 7) - Xsqlite3_str_appendf(tls, bp+48 /* &str */, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) - explainIndexRange(tls, bp+48 /* &str */, pLoop) + Xsqlite3_str_append(tls, bp+48, ts+21474, 7) + Xsqlite3_str_appendf(tls, bp+48, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) + explainIndexRange(tls, bp+48, pLoop) } } else if flags&U32(WHERE_IPK) != U32(0) && flags&U32(WHERE_CONSTRAINT) != U32(0) { var zRangeOp uintptr if flags&U32(WHERE_COLUMN_EQ|WHERE_COLUMN_IN) != 0 { - zRangeOp = ts + 21313 /* "=" */ + zRangeOp = ts + 21482 /* "=" */ } else if flags&U32(WHERE_BOTH_LIMIT) == U32(WHERE_BOTH_LIMIT) { - zRangeOp = ts + 21315 /* ">? AND rowid<" */ + zRangeOp = ts + 21484 /* ">? AND rowid<" */ } else if flags&U32(WHERE_BTM_LIMIT) != 0 { - zRangeOp = ts + 21198 /* ">" */ + zRangeOp = ts + 21367 /* ">" */ } else { - zRangeOp = ts + 21200 /* "<" */ + zRangeOp = ts + 21369 /* "<" */ } - Xsqlite3_str_appendf(tls, bp+48, /* &str */ - ts+21329 /* " USING INTEGER P..." */, libc.VaList(bp+24, zRangeOp)) + Xsqlite3_str_appendf(tls, bp+48, + ts+21498, libc.VaList(bp+24, zRangeOp)) } else if flags&U32(WHERE_VIRTUALTABLE) != U32(0) { - Xsqlite3_str_appendf(tls, bp+48 /* &str */, ts+21367, /* " VIRTUAL TABLE I..." */ + Xsqlite3_str_appendf(tls, bp+48, ts+21536, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pLoop + 24)), *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.idxStr */)))) } - zMsg = Xsqlite3StrAccumFinish(tls, bp+48 /* &str */) + zMsg = Xsqlite3StrAccumFinish(tls, bp+48) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -7) @@ -128760,7 +128992,7 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr // The TERM_LIKECOND marking indicates that the term should be coded inside // a conditional such that is only evaluated on the second pass of a // LIKE-optimization loop, when scanning BLOBs instead of strings. -func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:146686:13: */ +func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:146720:13: */ var nLoop int32 = 0 for int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags)&TERM_CODED == 0 && @@ -128793,7 +129025,7 @@ func disableTerm(tls *libc.TLS, pLevel uintptr, pTerm uintptr) { /* sqlite3.c:14 // // This routine makes its own copy of zAff so that the caller is free // to modify zAff after this routine returns. -func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:146724:13: */ +func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff uintptr) { /* sqlite3.c:146758:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if zAff == uintptr(0) { @@ -128826,7 +129058,7 @@ func codeApplyAffinity(tls *libc.TLS, pParse uintptr, base int32, n int32, zAff // // * the comparison will be performed with no affinity, or // * the affinity change in zAff is guaranteed not to change the value. -func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:146761:13: */ +func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr) { /* sqlite3.c:146795:13: */ var i int32 for i = 0; i < n; i++ { var p uintptr = Xsqlite3VectorFieldSubexpr(tls, pRight, i) @@ -128864,7 +129096,7 @@ func updateRangeAffinityStr(tls *libc.TLS, pRight uintptr, n int32, zAff uintptr // The reduced pX is different from the original (obviously) and thus is // only used for indexing, to improve performance. The original unaltered // IN expression must also be run on each output row for correctness. -func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:146807:13: */ +func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pLoop uintptr, pX uintptr) uintptr { /* sqlite3.c:146841:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr pNew = Xsqlite3ExprDup(tls, db, pX, 0) @@ -128939,7 +129171,7 @@ func removeUnindexableInClauseTerms(tls *libc.TLS, pParse uintptr, iEq int32, pL // For a constraint of the form X=expr, the expression is evaluated in // straight-line code. For constraints of the form X IN (...) // this routine sets up a loop that will iterate over all values of X. -func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:146896:12: */ +func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintptr, iEq int32, bRev int32, iTarget int32) int32 { /* sqlite3.c:146930:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -128986,14 +129218,14 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp *(*int32)(unsafe.Pointer(bp /* iTab */)) = 0 if !((*Expr)(unsafe.Pointer(pX)).Fflags&U32(EP_xIsSelect) != U32(0)) || (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pX + 20)))).FpEList)).FnExpr == 1 { - eType = Xsqlite3FindInIndex(tls, pParse, pX, uint32(IN_INDEX_LOOP), uintptr(0), uintptr(0), bp /* &iTab */) + eType = Xsqlite3FindInIndex(tls, pParse, pX, uint32(IN_INDEX_LOOP), uintptr(0), uintptr(0), bp) } else { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb pX = removeUnindexableInClauseTerms(tls, pParse, iEq, pLoop, pX) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { aiMap = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(uint32(unsafe.Sizeof(int32(0)))*uint32(nEq))) - eType = Xsqlite3FindInIndex(tls, pParse, pX, uint32(IN_INDEX_LOOP), uintptr(0), aiMap, bp /* &iTab */) + eType = Xsqlite3FindInIndex(tls, pParse, pX, uint32(IN_INDEX_LOOP), uintptr(0), aiMap, bp) (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FiTable = *(*int32)(unsafe.Pointer(bp /* iTab */)) } Xsqlite3ExprDelete(tls, db, pX) @@ -129132,7 +129364,7 @@ func codeEqualityTerm(tls *libc.TLS, pParse uintptr, pTerm uintptr, pLevel uintp // no conversion should be attempted before using a t2.b value as part of // a key to search the index. Hence the first byte in the returned affinity // string in this example would be set to SQLITE_AFF_BLOB. -func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:147092:12: */ +func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev int32, nExtraReg int32, pzAff uintptr) int32 { /* sqlite3.c:147126:12: */ var nEq U16 // The number of == or IN constraints to code var nSkip U16 // Number of left-most columns to skip var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // The vm under construction @@ -129248,7 +129480,7 @@ func codeAllEqualityTerms(tls *libc.TLS, pParse uintptr, pLevel uintptr, bRev in // on. For each table column, if the column is the i'th column of the // index, then the corresponding array entry is set to (i+1). If the column // does not appear in the index at all, the array entry is set to 0. -func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:147465:13: */ +func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, iIdxCur int32) { /* sqlite3.c:147499:13: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parse context var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe // Vdbe to generate code within @@ -129289,7 +129521,7 @@ func codeDeferredSeek(tls *libc.TLS, pWInfo uintptr, pIdx uintptr, iCur int32, i // If the expression is not a vector, then nReg must be passed 1. In // this case, generate code to evaluate the expression and leave the // result in register iReg. -func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:147509:13: */ +func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg int32) { /* sqlite3.c:147543:13: */ if p != 0 && Xsqlite3ExprIsVector(tls, p) != 0 { if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_xIsSelect) != U32(0) { @@ -129317,10 +129549,10 @@ func codeExprOrVector(tls *libc.TLS, pParse uintptr, p uintptr, iReg int32, nReg // An instance of the IdxExprTrans object carries information about a // mapping from an expression on table columns into a column in an index // down through the Walker. -type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:147549:3 */ +type IdxExprTrans = IdxExprTrans1 /* sqlite3.c:147583:3 */ // Preserve pExpr on the WhereETrans list of the WhereInfo. -func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:147554:13: */ +func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:147588:13: */ var pNew uintptr pNew = Xsqlite3DbMallocRaw(tls, (*IdxExprTrans)(unsafe.Pointer(pTrans)).Fdb, uint64(unsafe.Sizeof(WhereExprMod{}))) if pNew == uintptr(0) { @@ -129337,7 +129569,7 @@ func preserveExpr(tls *libc.TLS, pTrans uintptr, pExpr uintptr) { /* sqlite3.c:1 // // If pExpr matches, then transform it into a reference to the index column // that contains the value of pExpr. -func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:147570:12: */ +func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:147604:12: */ var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 24)) if Xsqlite3ExprCompare(tls, uintptr(0), pExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FpIdxExpr, (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur) == 0 { preserveExpr(tls, pX, pExpr) @@ -129357,7 +129589,7 @@ func whereIndexExprTransNode(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* // A walker node callback that translates a column reference to a table // into a corresponding column reference of an index. -func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:147592:12: */ +func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:147626:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_COLUMN { var pX uintptr = *(*uintptr)(unsafe.Pointer(p + 24)) if (*Expr)(unsafe.Pointer(pExpr)).FiTable == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCur && int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn) == (*IdxExprTrans)(unsafe.Pointer(pX)).FiTabCol { @@ -129379,7 +129611,7 @@ func whereIndexExprTransColumn(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { // 2019-10-24: Updated to also translate references to a VIRTUAL column in // the table into references to the corresponding (stored) column of the // index. -func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:147617:13: */ +func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int32, pWInfo uintptr) { /* sqlite3.c:147651:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -129397,7 +129629,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int return } pTab = (*Index)(unsafe.Pointer(pIdx)).FpTable - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 /* &x */ (*IdxExprTrans)(unsafe.Pointer(bp + 28 /* &x */)).FiTabCur = iTabCur (*IdxExprTrans)(unsafe.Pointer(bp + 28 /* &x */)).FiIdxCur = iIdxCur @@ -129433,9 +129665,9 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int continue } (*IdxExprTrans)(unsafe.Pointer(bp + 28 /* &x */)).FiIdxCol = iIdxCol - Xsqlite3WalkExpr(tls, bp /* &w */, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpWhere) - Xsqlite3WalkExprList(tls, bp /* &w */, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) - Xsqlite3WalkExprList(tls, bp /* &w */, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) + Xsqlite3WalkExpr(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpWhere) + Xsqlite3WalkExprList(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy) + Xsqlite3WalkExprList(tls, bp, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet) } } @@ -129444,7 +129676,7 @@ func whereIndexExprTrans(tls *libc.TLS, pIdx uintptr, iTabCur int32, iIdxCur int // WHERE clause terms on the query, and if any of those terms must be // true because pTruth is true, then mark those WHERE clause terms as // coded. -func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:147681:13: */ +func whereApplyPartialIndexConstraints(tls *libc.TLS, pTruth uintptr, iTabCur int32, pWC uintptr) { /* sqlite3.c:147715:13: */ var i int32 var pTerm uintptr for int32((*Expr)(unsafe.Pointer(pTruth)).Fop) == TK_AND { @@ -129479,7 +129711,7 @@ __3: // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. -func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:147706:24: */ +func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:147740:24: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -129716,12 +129948,12 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI r1 = libc.AssignPtrInt32(bp+12 /* rTemp */, Xsqlite3GetTempReg(tls, pParse)) codeExprOrVector(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, r1, 1) - op = int32(*(*U8)(unsafe.Pointer(bp + 8 /* &aMoveOp[0] */ + uintptr((int32((*Expr)(unsafe.Pointer(pX)).Fop)-TK_GT-1)&0x3|0x1)))) + op = int32(*(*U8)(unsafe.Pointer(bp + 8 + uintptr((int32((*Expr)(unsafe.Pointer(pX)).Fop)-TK_GT-1)&0x3|0x1)))) } else { - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, bp+12 /* &rTemp */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, bp+12) disableTerm(tls, pLevel, pStart) - op = int32(*(*U8)(unsafe.Pointer(bp + 8 /* &aMoveOp[0] */ + uintptr(int32((*Expr)(unsafe.Pointer(pX)).Fop)-TK_GT)))) + op = int32(*(*U8)(unsafe.Pointer(bp + 8 + uintptr(int32((*Expr)(unsafe.Pointer(pX)).Fop)-TK_GT)))) } Xsqlite3VdbeAddOp3(tls, v, op, iCur, addrBrk, r1) @@ -129886,7 +130118,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // and store the values of those terms in an array of registers // starting at regBase. - regBase = codeAllEqualityTerms(tls, pParse, pLevel, bRev, nExtraReg, bp+16 /* &zStartAff */) + regBase = codeAllEqualityTerms(tls, pParse, pLevel, bRev, nExtraReg, bp+16) if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 && nTop != 0 { zEndAff = Xsqlite3DbStrDup(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16))+uintptr(nEq)) @@ -130287,7 +130519,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // Run a separate WHERE clause for each term of the OR clause. After // eliminating duplicates from other WHERE clauses, the action for each // sub-WHERE clause is to to invoke the main loop body as a subroutine. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21394 /* "MULTI-INDEX OR" */, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21563, 0) for ii = 0; ii < (*WhereClause)(unsafe.Pointer(pOrWc)).FnTerm; ii++ { var pOrTerm uintptr = (*WhereClause)(unsafe.Pointer(pOrWc)).Fa + uintptr(ii)*48 if (*WhereTerm)(unsafe.Pointer(pOrTerm)).FleftCursor == iCur || int32((*WhereTerm)(unsafe.Pointer(pOrTerm)).FeOperator)&WO_AND != 0 { @@ -130306,7 +130538,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI pOrExpr = pAndExpr } // Loop through table entries that match term pOrTerm. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21409 /* "INDEX %d" */, libc.VaList(bp, ii+1)) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+21578, libc.VaList(bp, ii+1)) pSubWInfo = Xsqlite3WhereBegin(tls, pParse, pOrTab, pOrExpr, uintptr(0), uintptr(0), uint16(WHERE_OR_SUBCLAUSE), iCovCur) @@ -130594,7 +130826,7 @@ __4: *(*Expr)(unsafe.Pointer(bp + 20 /* sEAlt */)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) (*Expr)(unsafe.Pointer(bp + 20 /* &sEAlt */)).FpLeft = (*Expr)(unsafe.Pointer(pE)).FpLeft - Xsqlite3ExprIfFalse(tls, pParse, bp+20 /* &sEAlt */, addrCont, SQLITE_JUMPIFNULL) + Xsqlite3ExprIfFalse(tls, pParse, bp+20, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 10)) |= U16(TERM_CODED) } @@ -130654,24 +130886,24 @@ var aStartOp = [8]U8{ U8(OP_SeekLT), // 5: (start_constraints && !startEq && bRev) U8(OP_SeekGE), // 6: (start_constraints && startEq && !bRev) U8(OP_SeekLE), // 7: (start_constraints && startEq && bRev) -} /* sqlite3.c:148055:21 */ +} /* sqlite3.c:148089:21 */ var aEndOp = [4]U8{ U8(OP_IdxGE), // 0: (end_constraints && !bRev && !endEq) U8(OP_IdxGT), // 1: (end_constraints && !bRev && endEq) U8(OP_IdxLE), // 2: (end_constraints && bRev && !endEq) U8(OP_IdxLT), // 3: (end_constraints && bRev && endEq) -} /* sqlite3.c:148065:21 */ -var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:148760:21 */ -var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:148761:21 */ +} /* sqlite3.c:148099:21 */ +var aStep = [2]U8{U8(OP_Next), U8(OP_Prev)} /* sqlite3.c:148794:21 */ +var aStart = [2]U8{U8(OP_Rewind), U8(OP_Last)} /* sqlite3.c:148795:21 */ // Deallocate all memory associated with a WhereOrInfo object. -func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:148970:13: */ +func whereOrInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:149004:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } // Deallocate all memory associated with a WhereAndInfo object. -func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:148978:13: */ +func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:149012:13: */ Xsqlite3WhereClauseClear(tls, p) Xsqlite3DbFree(tls, db, p) } @@ -130693,7 +130925,7 @@ func whereAndInfoDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:148 // WhereTerms. All pointers to WhereTerms should be invalidated after // calling this routine. Such pointers may be reinitialized by referencing // the pWC->a[] array. -func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:149002:12: */ +func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 { /* sqlite3.c:149036:12: */ var pTerm uintptr var idx int32 @@ -130732,14 +130964,14 @@ func whereClauseInsert(tls *libc.TLS, pWC uintptr, p uintptr, wtFlags U16) int32 // Return TRUE if the given operator is one of the operators that is // allowed for an indexable WHERE clause term. The allowed operators are // "=", "<", ">", "<=", ">=", "IN", "IS", and "IS NULL" -func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:149043:12: */ +func allowedOp(tls *libc.TLS, op int32) int32 { /* sqlite3.c:149077:12: */ return libc.Bool32(op == TK_IN || op >= TK_EQ && op <= TK_GE || op == TK_ISNULL || op == TK_IS) } // Commute a comparison operator. Expressions of the form "X op Y" // are converted into "Y op X". -func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:149055:12: */ +func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3.c:149089:12: */ if int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).Fop) == TK_VECTOR || int32((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpRight)).Fop) == TK_VECTOR || Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight) != Xsqlite3BinaryCompareCollSeq(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, (*Expr)(unsafe.Pointer(pExpr)).FpLeft) { @@ -130759,7 +130991,7 @@ func exprCommute(tls *libc.TLS, pParse uintptr, pExpr uintptr) U16 { /* sqlite3. } // Translate from TK_xx operator to WO_xx bitmask. -func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:149078:12: */ +func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:149112:12: */ var c U16 if op == TK_IN { @@ -130786,7 +131018,7 @@ func operatorMask(tls *libc.TLS, op int32) U16 { /* sqlite3.c:149078:12: */ // that virtual tables cannot participate in the LIKE optimization.) The // collating sequence for the column on the LHS must be appropriate for // the operator. -func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:149116:12: */ +func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr, pisComplete uintptr, pnoCase uintptr) int32 { /* sqlite3.c:149150:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -130887,13 +131119,13 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr var isNum int32 // var rDummy float64 at bp+4, 8 - isNum = Xsqlite3AtoF(tls, zNew, bp+4 /* &rDummy */, iTo, uint8(SQLITE_UTF8)) + isNum = Xsqlite3AtoF(tls, zNew, bp+4, iTo, uint8(SQLITE_UTF8)) if isNum <= 0 { if iTo == 1 && int32(*(*int8)(unsafe.Pointer(zNew))) == '-' { isNum = +1 } else { *(*int8)(unsafe.Pointer(zNew + uintptr(iTo-1)))++ - isNum = Xsqlite3AtoF(tls, zNew, bp+4 /* &rDummy */, iTo, uint8(SQLITE_UTF8)) + isNum = Xsqlite3AtoF(tls, zNew, bp+4, iTo, uint8(SQLITE_UTF8)) *(*int8)(unsafe.Pointer(zNew + uintptr(iTo-1)))-- } } @@ -130958,7 +131190,7 @@ func isLikeOrGlob(tls *libc.TLS, pParse uintptr, pExpr uintptr, ppPrefix uintptr // of virtual table in forms (5) or (7) then return 2. // // If the expression matches none of the patterns above, return 0. -func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:149295:12: */ +func isAuxiliaryVtabOperator(tls *libc.TLS, db uintptr, pExpr uintptr, peOp2 uintptr, ppLeft uintptr, ppRight uintptr) int32 { /* sqlite3.c:149329:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -131063,18 +131295,18 @@ type Op2 = struct { FzOp uintptr FeOp2 uint8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:149303:18 */ +} /* sqlite3.c:149337:18 */ var aOp = [4]Op2{ - {FzOp: ts + 15810 /* "match" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, - {FzOp: ts + 15283 /* "glob" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, - {FzOp: ts + 14824 /* "like" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, - {FzOp: ts + 21418 /* "regexp" */, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, -} /* sqlite3.c:149306:7 */ + {FzOp: ts + 15983, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_MATCH)}, + {FzOp: ts + 15305, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_GLOB)}, + {FzOp: ts + 14846, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_LIKE)}, + {FzOp: ts + 21587, FeOp2: uint8(SQLITE_INDEX_CONSTRAINT_REGEXP)}, +} /* sqlite3.c:149340:7 */ // If the pBase expression originated in the ON or USING clause of // a join, then transfer the appropriate markings over to derived. -func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:149407:13: */ +func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* sqlite3.c:149441:13: */ if pDerived != 0 { *(*U32)(unsafe.Pointer(pDerived + 4)) |= (*Expr)(unsafe.Pointer(pBase)).Fflags & U32(EP_FromJoin) (*Expr)(unsafe.Pointer(pDerived)).FiRightJoinTable = (*Expr)(unsafe.Pointer(pBase)).FiRightJoinTable @@ -131082,7 +131314,7 @@ func transferJoinMarkings(tls *libc.TLS, pDerived uintptr, pBase uintptr) { /* s } // Mark term iChild as being a child of term iParent -func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:149417:13: */ +func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { /* sqlite3.c:149451:13: */ (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*48)).FiParent = iParent (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iChild)*48)).FtruthProb = (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr(iParent)*48)).FtruthProb (*WhereTerm)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).Fa+uintptr(iParent)*48)).FnChild++ @@ -131091,7 +131323,7 @@ func markTermAsChild(tls *libc.TLS, pWC uintptr, iChild int32, iParent int32) { // Return the N-th AND-connected subterm of pTerm. Or if pTerm is not // a conjunction, then return just pTerm when N==0. If N is exceeds // the number of available subterms, return NULL. -func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:149428:18: */ +func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3.c:149462:18: */ if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator) != WO_AND { if N == 0 { return pTerm @@ -131122,7 +131354,7 @@ func whereNthSubterm(tls *libc.TLS, pTerm uintptr, N int32) uintptr { /* sqlite3 // The following is NOT generated: // // x<y OR x>y --> x!=y -func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:149458:13: */ +func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintptr, pTwo uintptr) { /* sqlite3.c:149492:13: */ var eOp U16 = U16(int32((*WhereTerm)(unsafe.Pointer(pOne)).FeOperator) | int32((*WhereTerm)(unsafe.Pointer(pTwo)).FeOperator)) var db uintptr // Database connection (for malloc) var pNew uintptr // New virtual expression @@ -131255,7 +131487,7 @@ func whereCombineDisjuncts(tls *libc.TLS, pSrc uintptr, pWC uintptr, pOne uintpt // // If none of cases 1, 2, or 3 apply, then leave the eOperator set to // zero. This term is not useful for search. -func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:149585:13: */ +func exprAnalyzeOrTerm(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:149619:13: */ var pWInfo uintptr = (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo // WHERE clause processing context var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse // Parser context var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection @@ -131574,7 +131806,7 @@ __3: // for the LHS anyplace else in the WHERE clause where the LHS column occurs. // This is an optimization. No harm comes from returning 0. But if 1 is // returned when it should not be, then incorrect answers might result. -func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:149859:12: */ +func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:149893:12: */ var aff1 int8 var aff2 int8 var pColl uintptr @@ -131603,7 +131835,7 @@ func termIsEquivalence(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* // Recursively walk the expressions of a SELECT statement and generate // a bitmask indicating which tables are used in that expression // tree. -func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:149882:16: */ +func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* sqlite3.c:149916:16: */ var mask Bitmask = uint64(0) for pS != 0 { var pSrc uintptr = (*Select)(unsafe.Pointer(pS)).FpSrc @@ -131638,7 +131870,7 @@ func exprSelectUsage(tls *libc.TLS, pMaskSet uintptr, pS uintptr) Bitmask { /* s // If pExpr is a TK_COLUMN column reference, then this routine always returns // true even if that particular column is not indexed, because the column // might be added to an automatic index later. -func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:149919:28: */ +func exprMightBeIndexed2(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr) int32 { /* sqlite3.c:149953:28: */ var pIdx uintptr var i int32 var iCur int32 @@ -131676,7 +131908,7 @@ __3: return 0 } -func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:149943:12: */ +func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol uintptr, pExpr uintptr, op int32) int32 { /* sqlite3.c:149977:12: */ // If this expression is a vector to the left or right of a // inequality constraint (>, <, >= or <=), perform the processing // on the first element of the vector. @@ -131717,7 +131949,7 @@ func exprMightBeIndexed(tls *libc.TLS, pFrom uintptr, mPrereq Bitmask, aiCurCol // needs to be freed with the WhereClause) and TERM_VIRTUAL (because it // is a commuted copy of a prior term.) The original term has nChild=1 // and the copy has idxParent set to the index of the original term. -func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:149991:13: */ +func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* sqlite3.c:150025:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -131772,7 +132004,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s extraRight = x - uint64(1) // ON clause terms may not be used with an index // on left table of a LEFT JOIN. Ticket #3015 if prereqAll>>1 >= x { - Xsqlite3ErrorMsg(tls, pParse, ts+21425 /* "ON clause refere..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21594, 0) return } } @@ -131798,9 +132030,9 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } if exprMightBeIndexed(tls, pSrc, prereqLeft, bp, pLeft, op) != 0 { - (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor = *(*int32)(unsafe.Pointer(bp /* &aiCurCol[0] */)) + (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor = *(*int32)(unsafe.Pointer(bp)) - *(*int32)(unsafe.Pointer(pTerm + 24)) = *(*int32)(unsafe.Pointer(bp /* &aiCurCol[0] */ + 1*4)) + *(*int32)(unsafe.Pointer(pTerm + 24)) = *(*int32)(unsafe.Pointer(bp + 1*4)) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(int32(operatorMask(tls, op)) & int32(opMask)) } if op == TK_IS { @@ -131841,9 +132073,9 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s pNew = pTerm } *(*U16)(unsafe.Pointer(pNew + 10)) |= U16(int32(exprCommute(tls, pParse, pDup))) - (*WhereTerm)(unsafe.Pointer(pNew)).FleftCursor = *(*int32)(unsafe.Pointer(bp /* &aiCurCol[0] */)) + (*WhereTerm)(unsafe.Pointer(pNew)).FleftCursor = *(*int32)(unsafe.Pointer(bp)) - *(*int32)(unsafe.Pointer(pNew + 24)) = *(*int32)(unsafe.Pointer(bp /* &aiCurCol[0] */ + 1*4)) + *(*int32)(unsafe.Pointer(pNew + 24)) = *(*int32)(unsafe.Pointer(bp + 1*4)) (*WhereTerm)(unsafe.Pointer(pNew)).FprereqRight = prereqLeft | extraRight (*WhereTerm)(unsafe.Pointer(pNew)).FprereqAll = prereqAll @@ -131853,7 +132085,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s 0 == Xsqlite3ExprCanBeNull(tls, pLeft) { (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_TRUEFALSE) - *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6622 /* "false" */ + *(*uintptr)(unsafe.Pointer(pExpr + 8)) = ts + 6644 /* "false" */ *(*U32)(unsafe.Pointer(pExpr + 4)) |= U32(EP_IsFalse) (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqAll = uint64(0) (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator = U16(0) @@ -131956,7 +132188,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } zCollSeqName = func() uintptr { if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 21466 /* "NOCASE" */ + return ts + 21635 /* "NOCASE" */ } return uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)) }() @@ -132029,7 +132261,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s } else if int32((*WhereClause)(unsafe.Pointer(pWC)).Fop) == TK_AND { *(*uintptr)(unsafe.Pointer(bp + 28 /* pRight */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 24 /* pLeft */)) = uintptr(0) - var res int32 = isAuxiliaryVtabOperator(tls, db, pExpr, bp+20 /* &eOp2 */, bp+24 /* &pLeft */, bp+28 /* &pRight */) + var res int32 = isAuxiliaryVtabOperator(tls, db, pExpr, bp+20, bp+24, bp+28) for libc.PostDecInt32(&res, 1) > 0 { var idxNew int32 var pNewTerm uintptr @@ -132075,7 +132307,7 @@ func exprAnalyze(tls *libc.TLS, pSrc uintptr, pWC uintptr, idxTerm int32) { /* s *(*Bitmask)(unsafe.Pointer(pTerm + 32)) |= extraRight } -var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:150143:21 */ +var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:150177:21 */ // ************************************************************************** // @@ -132098,7 +132330,7 @@ var ops = [2]U8{U8(TK_GE), U8(TK_LE)} /* sqlite3.c:150143:21 */ // In the previous sentence and in the diagram, "slot[]" refers to // the WhereClause.a[] array. The slot[] array grows as needed to contain // all terms of the WHERE clause. -func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:150436:21: */ +func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* sqlite3.c:150470:21: */ var pE2 uintptr = Xsqlite3ExprSkipCollateAndLikely(tls, pExpr) (*WhereClause)(unsafe.Pointer(pWC)).Fop = op @@ -132114,7 +132346,7 @@ func Xsqlite3WhereSplit(tls *libc.TLS, pWC uintptr, pExpr uintptr, op U8) { /* s } // Initialize a preallocated WhereClause structure. -func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:150452:21: */ +func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sqlite3.c:150486:21: */ (*WhereClause)(unsafe.Pointer(pWC)).FpWInfo = pWInfo (*WhereClause)(unsafe.Pointer(pWC)).FhasOr = U8(0) (*WhereClause)(unsafe.Pointer(pWC)).FpOuter = uintptr(0) @@ -132126,7 +132358,7 @@ func Xsqlite3WhereClauseInit(tls *libc.TLS, pWC uintptr, pWInfo uintptr) { /* sq // Deallocate a WhereClause structure. The WhereClause structure // itself is not freed. This routine is the inverse of // sqlite3WhereClauseInit(). -func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:150469:21: */ +func Xsqlite3WhereClauseClear(tls *libc.TLS, pWC uintptr) { /* sqlite3.c:150503:21: */ var i int32 var a uintptr var db uintptr = (*Parse)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse)).Fdb @@ -132163,7 +132395,7 @@ __3: // These routines walk (recursively) an expression tree and generate // a bitmask indicating which tables are used in that expression // tree. -func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:150494:24: */ +func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:150528:24: */ var mask Bitmask if int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return Xsqlite3WhereGetMask(tls, pMaskSet, (*Expr)(unsafe.Pointer(p)).FiTable) @@ -132199,14 +132431,14 @@ func Xsqlite3WhereExprUsageNN(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmas return mask } -func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:150523:24: */ +func Xsqlite3WhereExprUsage(tls *libc.TLS, pMaskSet uintptr, p uintptr) Bitmask { /* sqlite3.c:150557:24: */ if p != 0 { return Xsqlite3WhereExprUsageNN(tls, pMaskSet, p) } return uint64(0) } -func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:150526:24: */ +func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) Bitmask { /* sqlite3.c:150560:24: */ var i int32 var mask Bitmask = uint64(0) if pList != 0 { @@ -132223,7 +132455,7 @@ func Xsqlite3WhereExprListUsage(tls *libc.TLS, pMaskSet uintptr, pList uintptr) // end of the WHERE clause. We do not want to analyze these new // virtual terms, so start analyzing at the end and work forward // so that the added virtual terms are never processed. -func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:150546:21: */ +func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* sqlite3.c:150580:21: */ var i int32 for i = (*WhereClause)(unsafe.Pointer(pWC)).FnTerm - 1; i >= 0; i-- { exprAnalyze(tls, pTabList, pWC, i) @@ -132235,7 +132467,7 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // // Each function argument translates into an equality constraint against // a HIDDEN column in the table. -func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:150563:21: */ +func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:150597:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -132260,7 +132492,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC k++ } if k >= int32((*Table)(unsafe.Pointer(pTab)).FnCol) { - Xsqlite3ErrorMsg(tls, pParse, ts+21473, /* "too many argumen..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+21642, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName, j)) return } @@ -132313,7 +132545,7 @@ func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC type HiddenIndexInfo1 = struct { FpWC uintptr FpParse uintptr -} /* sqlite3.c:150634:9 */ +} /* sqlite3.c:150668:9 */ //************* End of whereexpr.c ****************************************** //************* Begin file where.c ****************************************** @@ -132343,16 +132575,16 @@ type HiddenIndexInfo1 = struct { // This object is not an API and can be changed from one release to the // next. As long as allocateIndexInfo() and sqlite3_vtab_collation() // agree on the structure, all will be well. -type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:150634:32 */ +type HiddenIndexInfo = HiddenIndexInfo1 /* sqlite3.c:150668:32 */ // Return the estimated number of output rows from a WHERE clause -func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:150646:23: */ +func Xsqlite3WhereOutputRowCount(tls *libc.TLS, pWInfo uintptr) LogEst { /* sqlite3.c:150680:23: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut } // Return one of the WHERE_DISTINCT_xxxxx values to indicate how this // WHERE clause returns outputs for DISTINCT processing. -func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150654:20: */ +func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150688:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct) } @@ -132362,7 +132594,7 @@ func Xsqlite3WhereIsDistinct(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // terms means that no sorting is needed at all. A return that // is positive but less than the number of ORDER BY terms means that // block sorting is required. -func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150666:20: */ +func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150700:20: */ return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) } @@ -132387,7 +132619,7 @@ func Xsqlite3WhereIsOrdered(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c: // Returning the continuation the second inner loop is an optimization // that might make the code run a little faster, but should not change // the final answer. -func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150693:20: */ +func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150727:20: */ var pInner uintptr if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&0x4>>2) != 0) { // The ORDER BY LIMIT optimization does not apply. Jump to the @@ -132408,7 +132640,7 @@ func Xsqlite3WhereOrderByLimitOptLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* // Any extra OP_Goto that is coded here is an optimization. The // correct answer should be obtained regardless. This OP_Goto just // makes the answer appear faster. -func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:150716:21: */ +func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { /* sqlite3.c:150750:21: */ var pInner uintptr var i int32 if !(int32(*(*uint8)(unsafe.Pointer(pWInfo + 48))&0x4>>2) != 0) { @@ -132429,14 +132661,14 @@ func Xsqlite3WhereMinMaxOptEarlyOut(tls *libc.TLS, v uintptr, pWInfo uintptr) { // Return the VDBE address or label to jump to in order to continue // immediately with the next row of a WHERE clause. -func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150735:20: */ +func Xsqlite3WhereContinueLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150769:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiContinue } // Return the VDBE address or label to jump to in order to break // out of a WHERE loop. -func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150744:20: */ +func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150778:20: */ return (*WhereInfo)(unsafe.Pointer(pWInfo)).FiBreak } @@ -132455,19 +132687,19 @@ func Xsqlite3WhereBreakLabel(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c // // aiCur[0] and aiCur[1] both get -1 if the where-clause logic is // unable to use the ONEPASS optimization. -func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:150765:20: */ +func Xsqlite3WhereOkOnePass(tls *libc.TLS, pWInfo uintptr, aiCur uintptr) int32 { /* sqlite3.c:150799:20: */ libc.Xmemcpy(tls, aiCur, pWInfo+20, uint32(unsafe.Sizeof(int32(0)))*uint32(2)) return int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FeOnePass) } // Return TRUE if the WHERE loop uses the OP_DeferredSeek opcode to move // the data cursor to the row selected by the index cursor. -func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150781:20: */ +func Xsqlite3WhereUsesDeferredSeek(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:150815:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x1 >> 0) } // Move the content of pSrc into pDest -func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:150788:13: */ +func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:150822:13: */ (*WhereOrSet)(unsafe.Pointer(pDest)).Fn = (*WhereOrSet)(unsafe.Pointer(pSrc)).Fn libc.Xmemcpy(tls, pDest+4, pSrc+4, uint32((*WhereOrSet)(unsafe.Pointer(pDest)).Fn)*uint32(unsafe.Sizeof(WhereOrCost{}))) } @@ -132477,7 +132709,7 @@ func whereOrMove(tls *libc.TLS, pDest uintptr, pSrc uintptr) { /* sqlite3.c:1507 // The new entry might overwrite an existing entry, or it might be // appended, or it might be discarded. Do whatever is the right thing // so that pSet keeps the N_OR_COST best entries seen so far. -func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:150800:12: */ +func whereOrInsert(tls *libc.TLS, pSet uintptr, prereq Bitmask, rRun LogEst, nOut LogEst) int32 { /* sqlite3.c:150834:12: */ var i U16 var p uintptr i = (*WhereOrSet)(unsafe.Pointer(pSet)).Fn @@ -132554,7 +132786,7 @@ __13: // Return the bitmask for the given cursor number. Return 0 if // iCursor is not in the set. -func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:150837:24: */ +func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmask { /* sqlite3.c:150871:24: */ var i int32 for i = 0; i < (*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn; i++ { @@ -132571,14 +132803,14 @@ func Xsqlite3WhereGetMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) Bitmas // tables in the FROM clause is limited by a test early in the // sqlite3WhereBegin() routine. So we know that the pMaskSet->ix[] // array will never overflow. -func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:150856:13: */ +func createMask(tls *libc.TLS, pMaskSet uintptr, iCursor int32) { /* sqlite3.c:150890:13: */ *(*int32)(unsafe.Pointer(pMaskSet + 8 + uintptr(libc.PostIncInt32(&(*WhereMaskSet)(unsafe.Pointer(pMaskSet)).Fn, 1))*4)) = iCursor } // If the right-hand branch of the expression is a TK_COLUMN, then return // a pointer to the right-hand branch. Otherwise, return NULL. -func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:150865:13: */ +func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:150899:13: */ p = Xsqlite3ExprSkipCollateAndLikely(tls, (*Expr)(unsafe.Pointer(p)).FpRight) if p != uintptr(0) && int32((*Expr)(unsafe.Pointer(p)).Fop) == TK_COLUMN && !((*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_FixedCol) != U32(0)) { return p @@ -132589,7 +132821,7 @@ func whereRightSubexprIsColumn(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: // Advance to the next WhereTerm that matches according to the criteria // established when the pScan object was initialized by whereScanInit(). // Return NULL if there are no more matching WhereTerms. -func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:150878:18: */ +func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:150912:18: */ var iCur int32 // The cursor on the LHS of the term var iColumn I16 // The column on the LHS of the term. -1 for IPK var pX uintptr // An expression being tested @@ -132693,7 +132925,7 @@ func whereScanNext(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:150878:1 // It is factored out into a separate tail-recursion subroutine so that // the normal whereScanInit() routine, which is a high-runner, does not // need to push registers onto the stack as part of its prologue. -func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:150980:34: */ +func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c:151014:34: */ (*WhereScan)(unsafe.Pointer(pScan)).Fidxaff = Xsqlite3ExprAffinity(tls, (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr) return whereScanNext(tls, pScan) } @@ -132715,7 +132947,7 @@ func whereScanInitIndexExpr(tls *libc.TLS, pScan uintptr) uintptr { /* sqlite3.c // // If X is not the INTEGER PRIMARY KEY then X must be compatible with // index pIdx. -func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:151004:18: */ +func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColumn int32, opMask U32, pIdx uintptr) uintptr { /* sqlite3.c:151038:18: */ (*WhereScan)(unsafe.Pointer(pScan)).FpOrigWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpWC = pWC (*WhereScan)(unsafe.Pointer(pScan)).FpIdxExpr = uintptr(0) @@ -132770,7 +133002,7 @@ func whereScanInit(tls *libc.TLS, pScan uintptr, pWC uintptr, iCur int32, iColum // the form "X <op> Y" where Y is a column in another table if no terms of // the form "X <op> <const-expr>" exist. If no terms with a constant RHS // exist, try to return a term that does not use WO_EQUIV. -func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:151068:26: */ +func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32, notReady Bitmask, op U32, pIdx uintptr) uintptr { /* sqlite3.c:151102:26: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -132778,7 +133010,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 var p uintptr // var scan WhereScan at bp, 96 - p = whereScanInit(tls, bp /* &scan */, pWC, iCur, iColumn, op, pIdx) + p = whereScanInit(tls, bp, pWC, iCur, iColumn, op, pIdx) op = op & U32(WO_EQ|WO_IS) for p != 0 { if (*WhereTerm)(unsafe.Pointer(p)).FprereqRight¬Ready == uint64(0) { @@ -132790,7 +133022,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 pResult = p } } - p = whereScanNext(tls, bp /* &scan */) + p = whereScanNext(tls, bp) } return pResult } @@ -132800,7 +133032,7 @@ func Xsqlite3WhereFindTerm(tls *libc.TLS, pWC uintptr, iCur int32, iColumn int32 // // If such an expression is found, its index in pList->a[] is returned. If // no expression is found, -1 is returned. -func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:151102:12: */ +func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:151136:12: */ var i int32 var zColl uintptr = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(iCol)*4)) @@ -132821,7 +133053,7 @@ func findIndexCol(tls *libc.TLS, pParse uintptr, pList uintptr, iBase int32, pId } // Return TRUE if the iCol-th column of index pIdx is NOT NULL -func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:151132:12: */ +func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqlite3.c:151166:12: */ var j int32 j = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(iCol)*2))) @@ -132842,7 +133074,7 @@ func indexColumnNotNull(tls *libc.TLS, pIdx uintptr, iCol int32) int32 { /* sqli // // A DISTINCT list is redundant if any subset of the columns in the // DISTINCT list are collectively unique and individually non-null. -func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:151155:12: */ +func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC uintptr, pDistinct uintptr) int32 { /* sqlite3.c:151189:12: */ var pTab uintptr var pIdx uintptr var i int32 @@ -132912,7 +133144,7 @@ func isDistinctRedundant(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWC ui } // Estimate the logarithm of the input value to base 2. -func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:151219:15: */ +func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:151253:15: */ if int32(N) <= 10 { return int16(0) } @@ -132929,7 +133161,7 @@ func estLog(tls *libc.TLS, N LogEst) LogEst { /* sqlite3.c:151219:15: */ // cursor iTabCur are transformed into OP_Sequence opcode for the // iAutoidxCur cursor, in order to generate unique rowids for the // automatic index being generated. -func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:151235:13: */ +func translateColumnToCopy(tls *libc.TLS, pParse uintptr, iStart int32, iTabCur int32, iRegister int32, iAutoidxCur int32) { /* sqlite3.c:151269:13: */ var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var pOp uintptr = Xsqlite3VdbeGetOp(tls, v, iStart) var iEnd int32 = Xsqlite3VdbeCurrentAddr(tls, v) @@ -132972,7 +133204,7 @@ __3: // Return TRUE if the WHERE clause term pTerm is of a form where it // could be used with an index to access pSrc, assuming an appropriate // index existed. -func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:151317:12: */ +func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitmask) int32 { /* sqlite3.c:151351:12: */ var aff int8 if (*WhereTerm)(unsafe.Pointer(pTerm)).FleftCursor != (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor { return 0 @@ -133006,7 +133238,7 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // Generate code to construct the Index object for an automatic index // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. -func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:151351:13: */ +func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:151385:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -133091,7 +133323,7 @@ __4: goto __6 } Xsqlite3_log(tls, SQLITE_WARNING|int32(1)<<8, - ts+21509 /* "automatic index ..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, + ts+21678, libc.VaList(bp, (*Table)(unsafe.Pointer(pTable)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTable)).FaCol+uintptr(iCol)*16)).FzCnName)) sentWarning = U8(1) __6: @@ -133164,7 +133396,7 @@ __13: ; // Construct the Index object to describe this index - pIdx = Xsqlite3AllocateIndexObject(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, int16(nKeyCol+1), 0, bp+16 /* &zNotUsed */) + pIdx = Xsqlite3AllocateIndexObject(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, int16(nKeyCol+1), 0, bp+16) if !(pIdx == uintptr(0)) { goto __14 } @@ -133172,7 +133404,7 @@ __13: __14: ; *(*uintptr)(unsafe.Pointer(pLoop + 24 + 8 /* &.pIndex */)) = pIdx - (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21535 /* "auto-index" */ + (*Index)(unsafe.Pointer(pIdx)).FzName = ts + 21704 /* "auto-index" */ (*Index)(unsafe.Pointer(pIdx)).FpTable = pTable n = 0 idxCols = uint64(0) @@ -133333,7 +133565,7 @@ end_auto_index_create: // Allocate and populate an sqlite3_index_info structure. It is the // responsibility of the caller to eventually release the structure // by passing the pointer returned by this function to sqlite3_free(). -func allocateIndexInfo(tls *libc.TLS, pParse uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pOrderBy uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:151564:27: */ +func allocateIndexInfo(tls *libc.TLS, pParse uintptr, pWC uintptr, mUnusable Bitmask, pSrc uintptr, pOrderBy uintptr, pmNoOmit uintptr) uintptr { /* sqlite3.c:151598:27: */ var i int32 var j int32 var nTerm int32 @@ -133406,7 +133638,7 @@ __3: (uint32(unsafe.Sizeof(sqlite3_index_constraint{}))+uint32(unsafe.Sizeof(sqlite3_index_constraint_usage{})))*uint32(nTerm)+ uint32(unsafe.Sizeof(sqlite3_index_orderby{}))*uint32(nOrderBy)+uint32(unsafe.Sizeof(HiddenIndexInfo1{})))) if pIdxInfo == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+6028 /* "out of memory" */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+6050, 0) return uintptr(0) } pHidden = pIdxInfo + 1*64 @@ -133520,7 +133752,7 @@ __6: // Whether or not an error is returned, it is the responsibility of the // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. -func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:151721:12: */ +func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:151755:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -133535,9 +133767,9 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb) } else if !(int32((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) + Xsqlite3ErrorMsg(tls, pParse, ts+3623, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3601 /* "%s" */, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3623, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -133556,7 +133788,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 // into the aSample[] array - it is an index into a virtual set of samples // based on the contents of aSample[] and the number of fields in record // pRec. -func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:151758:12: */ +func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, roundUp int32, aStat uintptr) int32 { /* sqlite3.c:151792:12: */ var aSample uintptr = (*Index)(unsafe.Pointer(pIdx)).FaSample var iCol int32 // Index of required stats in anEq[] etc. var i int32 // Index of first sample >= pRec @@ -133695,7 +133927,7 @@ func whereKeyStats(tls *libc.TLS, pParse uintptr, pIdx uintptr, pRec uintptr, ro // then the return value is the likelihood multiplied by the number of // input rows. Otherwise, this function assumes that an "IS NOT NULL" term // has a likelihood of 0.50, and any other term a likelihood of 0.25. -func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:151950:15: */ +func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sqlite3.c:151984:15: */ var nRet LogEst = nNew if pTerm != 0 { if int32((*WhereTerm)(unsafe.Pointer(pTerm)).FtruthProb) <= 0 { @@ -133708,7 +133940,7 @@ func whereRangeAdjust(tls *libc.TLS, pTerm uintptr, nNew LogEst) LogEst { /* sql } // Return the affinity for a single column of an index. -func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:151967:21: */ +func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol int32) int8 { /* sqlite3.c:152001:21: */ if !(int32((*Index)(unsafe.Pointer(pIdx)).FzColAff) != 0) { if Xsqlite3IndexAffinityStr(tls, db, pIdx) == uintptr(0) { @@ -133752,7 +133984,7 @@ func Xsqlite3IndexColumnAffinity(tls *libc.TLS, db uintptr, pIdx uintptr, iCol i // // If an error occurs, an SQLite error code is returned. Otherwise, // SQLITE_OK. -func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:152014:12: */ +func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr, pbDone uintptr) int32 { /* sqlite3.c:152048:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -133771,11 +134003,11 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper pColl = Xsqlite3LocateCollSeq(tls, pParse, *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FazColl + uintptr(nEq)*4))) if pLower != 0 { - rc = Xsqlite3Stat4ValueFromExpr(tls, pParse, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pLower)).FpExpr)).FpRight, aff, bp /* &p1 */) + rc = Xsqlite3Stat4ValueFromExpr(tls, pParse, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pLower)).FpExpr)).FpRight, aff, bp) nLower = 0 } if pUpper != 0 && rc == SQLITE_OK { - rc = Xsqlite3Stat4ValueFromExpr(tls, pParse, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pUpper)).FpExpr)).FpRight, aff, bp+4 /* &p2 */) + rc = Xsqlite3Stat4ValueFromExpr(tls, pParse, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pUpper)).FpExpr)).FpRight, aff, bp+4) if *(*uintptr)(unsafe.Pointer(bp + 4)) != 0 { nUpper = 0 } else { @@ -133787,7 +134019,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper var i int32 var nDiff int32 for i = 0; rc == SQLITE_OK && i < (*Index)(unsafe.Pointer(p)).FnSample; i++ { - rc = Xsqlite3Stat4Column(tls, db, (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaSample+uintptr(i)*20)).Fp, (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaSample+uintptr(i)*20)).Fn, nEq, bp+8 /* &pVal */) + rc = Xsqlite3Stat4Column(tls, db, (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaSample+uintptr(i)*20)).Fp, (*IndexSample)(unsafe.Pointer((*Index)(unsafe.Pointer(p)).FaSample+uintptr(i)*20)).Fn, nEq, bp+8) if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp)) != 0 { var res int32 = Xsqlite3MemCompare(tls, *(*uintptr)(unsafe.Pointer(bp /* p1 */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* pVal */)), pColl) if res >= 0 { @@ -133867,7 +134099,7 @@ func whereRangeSkipScanEst(tls *libc.TLS, pParse uintptr, pLower uintptr, pUpper // used, a single range inequality reduces the search space by a factor of 4. // and a pair of constraints (x>? AND x<?) reduces the expected number of // rows visited by a factor of 64. -func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr) int32 { /* sqlite3.c:152126:12: */ +func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower uintptr, pUpper uintptr, pLoop uintptr) int32 { /* sqlite3.c:152160:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -133921,8 +134153,8 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u } else { // Note: this call could be optimized away - since the same values must // have been requested when testing key $P in whereEqualScanEst(). - whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 0, bp /* &a[0] */) - iLower = *(*TRowcnt)(unsafe.Pointer(bp /* &a[0] */)) + whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 0, bp) + iLower = *(*TRowcnt)(unsafe.Pointer(bp)) iUpper = *(*TRowcnt)(unsafe.Pointer(bp)) + *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) } @@ -133947,14 +134179,14 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u // var n int32 at bp+12, 4 // Values extracted from pExpr var pExpr uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pLower)).FpExpr)).FpRight - rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+8 /* &pRec */, pExpr, nBtm, nEq, bp+12 /* &n */) + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+8, pExpr, nBtm, nEq, bp+12) if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 12)) != 0 { var iNew TRowcnt var mask U16 = U16(int32(WO_EQ)<<(TK_GT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ)) if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 12)) { mask = U16(int32(WO_EQ)<<(TK_LE-TK_EQ) | int32(WO_EQ)<<(TK_LT-TK_EQ)) } - iLwrIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 0, bp /* &a[0] */) + iLwrIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 0, bp) iNew = *(*TRowcnt)(unsafe.Pointer(bp)) + func() uint32 { if int32((*WhereTerm)(unsafe.Pointer(pLower)).FeOperator)&int32(mask) != 0 { return *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) @@ -133974,14 +134206,14 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u // var n int32 at bp+16, 4 // Values extracted from pExpr var pExpr uintptr = (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pUpper)).FpExpr)).FpRight - rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+8 /* &pRec */, pExpr, nTop, nEq, bp+16 /* &n */) + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp+8, pExpr, nTop, nEq, bp+16) if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 16)) != 0 { var iNew TRowcnt var mask U16 = U16(int32(WO_EQ)<<(TK_GT-TK_EQ) | int32(WO_EQ)<<(TK_LE-TK_EQ)) if Xsqlite3ExprVectorSize(tls, pExpr) > *(*int32)(unsafe.Pointer(bp + 16)) { mask = U16(int32(WO_EQ)<<(TK_LE-TK_EQ) | int32(WO_EQ)<<(TK_LT-TK_EQ)) } - iUprIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 1, bp /* &a[0] */) + iUprIdx = whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pRec */)), 1, bp) iNew = *(*TRowcnt)(unsafe.Pointer(bp)) + func() uint32 { if int32((*WhereTerm)(unsafe.Pointer(pUpper)).FeOperator)&int32(mask) != 0 { return *(*TRowcnt)(unsafe.Pointer(bp + 1*4)) @@ -134017,7 +134249,7 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u } } else { *(*int32)(unsafe.Pointer(bp + 20 /* bDone */)) = 0 - rc = whereRangeSkipScanEst(tls, pParse, pLower, pUpper, pLoop, bp+20 /* &bDone */) + rc = whereRangeSkipScanEst(tls, pParse, pLower, pUpper, pLoop, bp+20) if *(*int32)(unsafe.Pointer(bp + 20)) != 0 { return rc } @@ -134063,7 +134295,7 @@ func whereRangeScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pLower u // required for string comparison, or if unable to allocate memory // for a UTF conversion required for comparison. The error is stored // in the pParse structure. -func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr uintptr, pnRow uintptr) int32 { /* sqlite3.c:152307:12: */ +func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr uintptr, pnRow uintptr) int32 { /* sqlite3.c:152341:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -134088,7 +134320,7 @@ func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr ui return SQLITE_OK } - rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp /* &pRec */, pExpr, 1, nEq-1, bp+4 /* &bOk */) + rc = Xsqlite3Stat4ProbeSetValue(tls, pParse, p, bp, pExpr, 1, nEq-1, bp+4) (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpRec = *(*uintptr)(unsafe.Pointer(bp /* pRec */)) if rc != SQLITE_OK { return rc @@ -134098,9 +134330,9 @@ func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr ui } (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid = nEq - whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp /* pRec */)), 0, bp+8 /* &a[0] */) + whereKeyStats(tls, pParse, p, *(*uintptr)(unsafe.Pointer(bp /* pRec */)), 0, bp+8) - *(*TRowcnt)(unsafe.Pointer(pnRow)) = *(*TRowcnt)(unsafe.Pointer(bp + 8 /* &a[0] */ + 1*4)) + *(*TRowcnt)(unsafe.Pointer(pnRow)) = *(*TRowcnt)(unsafe.Pointer(bp + 8 + 1*4)) return rc } @@ -134119,7 +134351,7 @@ func whereEqualScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pExpr ui // required for string comparison, or if unable to allocate memory // for a UTF conversion required for comparison. The error is stored // in the pParse structure. -func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintptr, pnRow uintptr) int32 { /* sqlite3.c:152371:12: */ +func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintptr, pnRow uintptr) int32 { /* sqlite3.c:152405:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -134134,7 +134366,7 @@ func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintp for i = 0; rc == SQLITE_OK && i < (*ExprList)(unsafe.Pointer(pList)).FnExpr; i++ { *(*TRowcnt)(unsafe.Pointer(bp /* nEst */)) = TRowcnt(nRow0) - rc = whereEqualScanEst(tls, pParse, pBuilder, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*20)).FpExpr, bp /* &nEst */) + rc = whereEqualScanEst(tls, pParse, pBuilder, (*ExprList_item)(unsafe.Pointer(pList+8+uintptr(i)*20)).FpExpr, bp) nRowEst = nRowEst + *(*TRowcnt)(unsafe.Pointer(bp)) (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FnRecValid = nRecValid } @@ -134152,7 +134384,7 @@ func whereInScanEst(tls *libc.TLS, pParse uintptr, pBuilder uintptr, pList uintp // Convert bulk memory into a valid WhereLoop that can be passed // to whereLoopClear harmlessly. -func whereLoopInit(tls *libc.TLS, p uintptr) { /* sqlite3.c:152518:13: */ +func whereLoopInit(tls *libc.TLS, p uintptr) { /* sqlite3.c:152552:13: */ (*WhereLoop)(unsafe.Pointer(p)).FaLTerm = p + 56 /* &.aLTermSpace */ (*WhereLoop)(unsafe.Pointer(p)).FnLTerm = U16(0) (*WhereLoop)(unsafe.Pointer(p)).FnLSlot = U16(int32(uint32(unsafe.Sizeof([3]uintptr{})) / uint32(unsafe.Sizeof(uintptr(0))))) @@ -134160,7 +134392,7 @@ func whereLoopInit(tls *libc.TLS, p uintptr) { /* sqlite3.c:152518:13: */ } // Clear the WhereLoop.u union. Leave WhereLoop.pLTerm intact. -func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:152528:13: */ +func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:152562:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FwsFlags&U32(WHERE_VIRTUALTABLE|WHERE_AUTO_INDEX) != 0 { if (*WhereLoop)(unsafe.Pointer(p)).FwsFlags&U32(WHERE_VIRTUALTABLE) != U32(0) && *(*U8)(unsafe.Pointer(p + 24 + 4)) != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(p + 24 + 8 /* &.idxStr */))) @@ -134175,7 +134407,7 @@ func whereLoopClearUnion(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:15 } // Deallocate internal memory used by a WhereLoop object -func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:152545:13: */ +func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:152579:13: */ if (*WhereLoop)(unsafe.Pointer(p)).FaLTerm != p+56 { Xsqlite3DbFreeNN(tls, db, (*WhereLoop)(unsafe.Pointer(p)).FaLTerm) } @@ -134184,7 +134416,7 @@ func whereLoopClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:152545: } // Increase the memory allocation for pLoop->aLTerm[] to be at least n. -func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:152554:12: */ +func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* sqlite3.c:152588:12: */ var paNew uintptr if int32((*WhereLoop)(unsafe.Pointer(p)).FnLSlot) >= n { return SQLITE_OK @@ -134204,7 +134436,7 @@ func whereLoopResize(tls *libc.TLS, db uintptr, p uintptr, n int32) int32 { /* s } // Transfer content from the second pLoop into the first. -func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:152570:12: */ +func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 { /* sqlite3.c:152604:12: */ whereLoopClearUnion(tls, db, pTo) if whereLoopResize(tls, db, pTo, int32((*WhereLoop)(unsafe.Pointer(pFrom)).FnLTerm)) != 0 { libc.Xmemset(tls, pTo, 0, uint32(uintptr(0)+44)) @@ -134221,13 +134453,13 @@ func whereLoopXfer(tls *libc.TLS, db uintptr, pTo uintptr, pFrom uintptr) int32 } // Delete a WhereLoop object -func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:152589:13: */ +func whereLoopDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:152623:13: */ whereLoopClear(tls, db, p) Xsqlite3DbFreeNN(tls, db, p) } // Free a WhereInfo structure -func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:152597:13: */ +func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:152631:13: */ var i int32 for i = 0; i < int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel); i++ { @@ -134248,7 +134480,7 @@ func whereInfoFree(tls *libc.TLS, db uintptr, pWInfo uintptr) { /* sqlite3.c:152 } // Undo all Expr node modifications -func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:152619:13: */ +func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:152653:13: */ for (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods != 0 { var p uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods (*WhereInfo)(unsafe.Pointer(pWInfo)).FpExprMods = (*WhereExprMod)(unsafe.Pointer(p)).FpNext @@ -134274,7 +134506,7 @@ func whereUndoExprMods(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:152619:13: // deserve a lower cost even if it is a proper subset of Y. Constraint (5) // was added because a covering index probably deserves to have a lower cost // than a non-covering index even if it is a proper subset. -func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:152647:12: */ +func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { /* sqlite3.c:152681:12: */ var i int32 var j int32 if int32((*WhereLoop)(unsafe.Pointer(pX)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pX)).FnSkip) >= int32((*WhereLoop)(unsafe.Pointer(pY)).FnLTerm)-int32((*WhereLoop)(unsafe.Pointer(pY)).FnSkip) { @@ -134318,7 +134550,7 @@ func whereLoopCheaperProperSubset(tls *libc.TLS, pX uintptr, pY uintptr) int32 { // To say "WhereLoop X is a proper subset of Y" means that X uses fewer // WHERE clause terms than Y and that every WHERE clause term used by X is // also used by Y. -func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:152685:13: */ +func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlite3.c:152719:13: */ if (*WhereLoop)(unsafe.Pointer(pTemplate)).FwsFlags&U32(WHERE_INDEXED) == U32(0) { return } @@ -134377,7 +134609,7 @@ func whereLoopAdjustCost(tls *libc.TLS, p uintptr, pTemplate uintptr) { /* sqlit // If pTemplate cannot replace any existing element of the list but needs // to be added to the list as a new entry, then return a pointer to the // tail of the list. -func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:152726:18: */ +func whereLoopFindLesser(tls *libc.TLS, ppPrev uintptr, pTemplate uintptr) uintptr { /* sqlite3.c:152760:18: */ var p uintptr p = *(*uintptr)(unsafe.Pointer(ppPrev)) __1: @@ -134466,7 +134698,7 @@ __3: // (2) They have the same iSortIdx. // (3) The template has same or fewer dependencies than the current loop // (4) The template has the same or lower cost than the current loop -func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:152814:12: */ +func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { /* sqlite3.c:152848:12: */ var ppPrev uintptr var p uintptr var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo @@ -134573,7 +134805,7 @@ func whereLoopInsert(tls *libc.TLS, pBuilder uintptr, pTemplate uintptr) int32 { // "x" column is boolean or else -1 or 0 or 1 is a common default value // on the "x" column and so in that case only cap the output row estimate // at 1/2 instead of 1/4. -func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:152951:13: */ +func whereLoopOutputAdjust(tls *libc.TLS, pWC uintptr, pLoop uintptr, nRow LogEst) { /* sqlite3.c:152985:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -134669,7 +134901,7 @@ __3: // // then this function would be invoked with nEq=1. The value returned in // this case is 3. -func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:153021:12: */ +func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr, nEq int32, pTerm uintptr) int32 { /* sqlite3.c:153055:12: */ var nCmp int32 = Xsqlite3ExprVectorSize(tls, (*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr)).FpLeft) var i int32 @@ -134737,7 +134969,7 @@ func whereRangeVectorLen(tls *libc.TLS, pParse uintptr, iCur int32, pIdx uintptr // // If pProbe->idxType==SQLITE_IDXTYPE_IPK, that means pIndex is // a fake index used for the INTEGER PRIMARY KEY. -func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:153095:12: */ +func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProbe uintptr, nInMul LogEst) int32 { /* sqlite3.c:153129:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -134786,12 +135018,12 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb saved_wsFlags = (*WhereLoop)(unsafe.Pointer(pNew)).FwsFlags saved_prereq = (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq saved_nOut = (*WhereLoop)(unsafe.Pointer(pNew)).FnOut - pTerm = whereScanInit(tls, bp /* &scan */, (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, int32(saved_nEq), + pTerm = whereScanInit(tls, bp, (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC, (*SrcItem)(unsafe.Pointer(pSrc)).FiCursor, int32(saved_nEq), uint32(opMask), pProbe) (*WhereLoop)(unsafe.Pointer(pNew)).FrSetup = int16(0) rSize = *(*LogEst)(unsafe.Pointer((*Index)(unsafe.Pointer(pProbe)).FaiRowLogEst)) rLogSize = estLog(tls, rSize) - for ; rc == SQLITE_OK && pTerm != uintptr(0); pTerm = whereScanNext(tls, bp /* &scan */) { + for ; rc == SQLITE_OK && pTerm != uintptr(0); pTerm = whereScanNext(tls, bp) { var eOp U16 = (*WhereTerm)(unsafe.Pointer(pTerm)).FeOperator // Shorthand for pTerm->eOperator var rCostIdx LogEst var nOutUnadjusted LogEst // nOut before IN() and WHERE adjustments @@ -134971,9 +135203,9 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb var pExpr uintptr = (*WhereTerm)(unsafe.Pointer(pTerm)).FpExpr if int32(eOp)&(WO_EQ|WO_ISNULL|WO_IS) != 0 { - rc = whereEqualScanEst(tls, pParse, pBuilder, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+96 /* &nOut */) + rc = whereEqualScanEst(tls, pParse, pBuilder, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+96) } else { - rc = whereInScanEst(tls, pParse, pBuilder, *(*uintptr)(unsafe.Pointer(pExpr + 20)), bp+96 /* &nOut */) + rc = whereInScanEst(tls, pParse, pBuilder, *(*uintptr)(unsafe.Pointer(pExpr + 20)), bp+96) } if rc == SQLITE_NOTFOUND { rc = SQLITE_OK @@ -135097,7 +135329,7 @@ func whereLoopAddBtreeIndex(tls *libc.TLS, pBuilder uintptr, pSrc uintptr, pProb // Return False if pBuilder does not contain an ORDER BY clause or // if there is no way for pIndex to be useful in implementing that // ORDER BY clause. -func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:153495:12: */ +func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, iCursor int32) int32 { /* sqlite3.c:153529:12: */ var pOB uintptr var aColExpr uintptr var ii int32 @@ -135139,7 +135371,7 @@ func indexMightHelpWithOrderBy(tls *libc.TLS, pBuilder uintptr, pIndex uintptr, // Check to see if a partial index with pPartIndexWhere can be used // in the current query. Return true if it can be and false if not. -func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:153529:12: */ +func whereUsablePartialIndex(tls *libc.TLS, iTab int32, isLeft int32, pWC uintptr, pWhere uintptr) int32 { /* sqlite3.c:153563:12: */ var i int32 var pTerm uintptr var pParse uintptr = (*WhereInfo)(unsafe.Pointer((*WhereClause)(unsafe.Pointer(pWC)).FpWInfo)).FpParse @@ -135214,7 +135446,7 @@ __3: // bias the scoring in favor of using an index, since the worst-case // performance of using an index is far better than the worst-case performance // of a full table scan. -func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:153593:12: */ +func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { /* sqlite3.c:153627:12: */ bp := tls.Alloc(98) defer tls.Free(98) @@ -135254,7 +135486,7 @@ func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { // fake index the first in a chain of Index objects with all of the real // indices to follow var pFirst uintptr // First of real indices on the table - libc.Xmemset(tls, bp /* &sPk */, 0, uint32(unsafe.Sizeof(Index{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Index{}))) (*Index)(unsafe.Pointer(bp /* &sPk */)).FnKeyCol = U16(1) (*Index)(unsafe.Pointer(bp /* &sPk */)).FnColumn = U16(1) (*Index)(unsafe.Pointer(bp /* &sPk */)).FaiColumn = bp + 92 /* &aiColumnPk */ @@ -135263,8 +135495,8 @@ func whereLoopAddBtree(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask) int32 { (*Index)(unsafe.Pointer(bp /* &sPk */)).FpTable = pTab (*Index)(unsafe.Pointer(bp /* &sPk */)).FszIdxRow = (*Table)(unsafe.Pointer(pTab)).FszTabRow libc.SetBitFieldPtr16Uint32(bp+56, uint32(SQLITE_IDXTYPE_IPK), 0, 0x3) - *(*LogEst)(unsafe.Pointer(bp + 94 /* &aiRowEstPk[0] */)) = (*Table)(unsafe.Pointer(pTab)).FnRowLogEst - *(*LogEst)(unsafe.Pointer(bp + 94 /* &aiRowEstPk[0] */ + 1*2)) = int16(0) + *(*LogEst)(unsafe.Pointer(bp + 94)) = (*Table)(unsafe.Pointer(pTab)).FnRowLogEst + *(*LogEst)(unsafe.Pointer(bp + 94 + 1*2)) = int16(0) pFirst = (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FpIndex if int32(*(*uint16)(unsafe.Pointer(pSrc + 36 + 4))&0x1>>0) == 0 { // The real indices of the table are only considered if the @@ -135516,7 +135748,7 @@ __3: // // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. -func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr) int32 { /* sqlite3.c:153868:12: */ +func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr) int32 { /* sqlite3.c:153902:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -135606,7 +135838,7 @@ __4: j >= (*WhereClause)(unsafe.Pointer(pWC)).FnTerm || *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(iTerm)*4)) != uintptr(0) || int32((*sqlite3_index_constraint)(unsafe.Pointer(pIdxCons)).Fusable) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21546 /* "%s.xBestIndex ma..." */, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21715, libc.VaList(bp, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -135654,7 +135886,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*4)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21546 /* "%s.xBestIndex ma..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21715, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -135695,7 +135927,7 @@ __6: // sequence associated with element iCons of the sqlite3_index_info.aConstraint // array. Or, if iCons is out of range or there is no active xBestIndex // call, return NULL. -func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:154028:23: */ +func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintptr { /* sqlite3.c:154062:23: */ var pHidden uintptr = pIdxInfo + 1*64 var zRet uintptr = uintptr(0) if iCons >= 0 && iCons < (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint { @@ -135738,7 +135970,7 @@ func Xsqlite3_vtab_collation(tls *libc.TLS, pIdxInfo uintptr, iCons int32) uintp // Conversely, all tables in mUnusable must be scanned after the current // virtual table, so any terms for which the prerequisites overlap with // mUnusable should always be configured as "not-usable" for xBestIndex. -func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:154068:12: */ +func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:154102:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -135762,7 +135994,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus pSrc = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pNew)).FiTab)*72 p = allocateIndexInfo(tls, pParse, pWC, mUnusable, pSrc, (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpOrderBy, - bp /* &mNoOmit */) + bp) if p == uintptr(0) { return SQLITE_NOMEM } @@ -135778,7 +136010,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // First call xBestIndex() with all constraints usable. - rc = whereLoopAddVirtualOne(tls, pBuilder, mPrereq, libc.Uint64(libc.Uint64FromInt32(-1)), uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4 /* &bIn */) + rc = whereLoopAddVirtualOne(tls, pBuilder, mPrereq, libc.Uint64(libc.Uint64FromInt32(-1)), uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4) // If the call to xBestIndex() with all terms enabled produced a plan // that does not require any source tables (IOW: a plan with mBest==0) @@ -135796,7 +136028,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus if *(*int32)(unsafe.Pointer(bp + 4)) != 0 { rc = whereLoopAddVirtualOne(tls, - pBuilder, mPrereq, libc.Uint64(libc.Uint64FromInt32(-1)), uint16(WO_IN), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4 /* &bIn */) + pBuilder, mPrereq, libc.Uint64(libc.Uint64FromInt32(-1)), uint16(WO_IN), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4) mBestNoIn = (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq & ^mPrereq if mBestNoIn == uint64(0) { @@ -135826,7 +136058,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus } rc = whereLoopAddVirtualOne(tls, - pBuilder, mPrereq, mNext|mPrereq, uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4 /* &bIn */) + pBuilder, mPrereq, mNext|mPrereq, uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4) if (*WhereLoop)(unsafe.Pointer(pNew)).Fprereq == mPrereq { seenZero = 1 if *(*int32)(unsafe.Pointer(bp + 4)) == 0 { @@ -135841,7 +136073,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus if rc == SQLITE_OK && seenZero == 0 { rc = whereLoopAddVirtualOne(tls, - pBuilder, mPrereq, mPrereq, uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4 /* &bIn */) + pBuilder, mPrereq, mPrereq, uint16(0), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4) if *(*int32)(unsafe.Pointer(bp + 4)) == 0 { seenZeroNoIN = 1 } @@ -135853,7 +136085,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus if rc == SQLITE_OK && seenZeroNoIN == 0 { rc = whereLoopAddVirtualOne(tls, - pBuilder, mPrereq, mPrereq, uint16(WO_IN), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4 /* &bIn */) + pBuilder, mPrereq, mPrereq, uint16(WO_IN), p, *(*U16)(unsafe.Pointer(bp /* mNoOmit */)), bp+4) } } @@ -135867,7 +136099,7 @@ func whereLoopAddVirtual(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnus // Add WhereLoop entries to handle OR terms. This works for either // btrees or virtual tables. -func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:154191:12: */ +func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable Bitmask) int32 { /* sqlite3.c:154225:12: */ bp := tls.Alloc(564) defer tls.Free(564) @@ -135891,7 +136123,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable pWC = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC pWCEnd = (*WhereClause)(unsafe.Pointer(pWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer(pWC)).FnTerm)*48 pNew = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew - libc.Xmemset(tls, bp /* &sSum */, 0, uint32(unsafe.Sizeof(WhereOrSet{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(WhereOrSet{}))) pItem = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpTabList + 8 + uintptr((*WhereLoop)(unsafe.Pointer(pNew)).FiTab)*72 iCur = (*SrcItem)(unsafe.Pointer(pItem)).FiCursor @@ -135924,28 +136156,28 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } (*WhereOrSet)(unsafe.Pointer(bp + 40 /* &sCur */)).Fn = U16(0) if int32((*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem)).FpTab)).FeTabType) == TABTYP_VTAB { - rc = whereLoopAddVirtual(tls, bp+488 /* &sSubBuild */, mPrereq, mUnusable) + rc = whereLoopAddVirtual(tls, bp+488, mPrereq, mUnusable) } else { - rc = whereLoopAddBtree(tls, bp+488 /* &sSubBuild */, mPrereq) + rc = whereLoopAddBtree(tls, bp+488, mPrereq) } if rc == SQLITE_OK { - rc = whereLoopAddOr(tls, bp+488 /* &sSubBuild */, mPrereq, mUnusable) + rc = whereLoopAddOr(tls, bp+488, mPrereq, mUnusable) } if int32((*WhereOrSet)(unsafe.Pointer(bp+40)).Fn) == 0 { (*WhereOrSet)(unsafe.Pointer(bp /* &sSum */)).Fn = U16(0) break } else if once != 0 { - whereOrMove(tls, bp /* &sSum */, bp+40 /* &sCur */) + whereOrMove(tls, bp, bp+40) once = 0 } else { // var sPrev WhereOrSet at bp+524, 40 - whereOrMove(tls, bp+524 /* &sPrev */, bp /* &sSum */) + whereOrMove(tls, bp+524, bp) (*WhereOrSet)(unsafe.Pointer(bp /* &sSum */)).Fn = U16(0) for i = 0; i < int32((*WhereOrSet)(unsafe.Pointer(bp+524 /* &sPrev */)).Fn); i++ { for j = 0; j < int32((*WhereOrSet)(unsafe.Pointer(bp+40 /* &sCur */)).Fn); j++ { - whereOrInsert(tls, bp /* &sSum */, (*WhereOrCost)(unsafe.Pointer(bp+524+4+uintptr(i)*12)).Fprereq|(*WhereOrCost)(unsafe.Pointer(bp+40+4+uintptr(j)*12)).Fprereq, + whereOrInsert(tls, bp, (*WhereOrCost)(unsafe.Pointer(bp+524+4+uintptr(i)*12)).Fprereq|(*WhereOrCost)(unsafe.Pointer(bp+40+4+uintptr(j)*12)).Fprereq, Xsqlite3LogEstAdd(tls, (*WhereOrCost)(unsafe.Pointer(bp+524+4+uintptr(i)*12)).FrRun, (*WhereOrCost)(unsafe.Pointer(bp+40+4+uintptr(j)*12)).FrRun), Xsqlite3LogEstAdd(tls, (*WhereOrCost)(unsafe.Pointer(bp+524+4+uintptr(i)*12)).FnOut, (*WhereOrCost)(unsafe.Pointer(bp+40+4+uintptr(j)*12)).FnOut)) } @@ -135991,7 +136223,7 @@ func whereLoopAddOr(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUnusable } // Add all WhereLoop objects for all tables -func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:154317:12: */ +func whereLoopAddAll(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:154351:12: */ var pWInfo uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWInfo var mPrereq Bitmask = uint64(0) var mPrior Bitmask = uint64(0) @@ -136043,7 +136275,7 @@ __1: if rc != 0 || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { if rc == SQLITE_DONE { // We hit the query planner search limit set by iPlanLimit - Xsqlite3_log(tls, SQLITE_WARNING, ts+21572 /* "abbreviated quer..." */, 0) + Xsqlite3_log(tls, SQLITE_WARNING, ts+21741, 0) rc = SQLITE_OK } else { goto __3 @@ -136079,7 +136311,7 @@ __3: // as equivalent rows are grouped together. Thus for GROUP BY and DISTINCT // the pOrderBy terms can be matched in any order. With ORDER BY, the // pOrderBy terms must be matched in strict left-to-right order. -func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:154395:11: */ +func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, pPath uintptr, wctrlFlags U16, nLoop U16, pLast uintptr, pRevMask uintptr) I8 { /* sqlite3.c:154429:11: */ var revSet U8 // True if rev is known var rev U8 // Composite sort order var revIdx U8 // Index sort order @@ -136447,7 +136679,7 @@ func wherePathSatisfiesOrderBy(tls *libc.TLS, pWInfo uintptr, pOrderBy uintptr, // // SELECT * FROM t1 GROUP BY x,y ORDER BY x,y; -- IsSorted()==1 // SELECT * FROM t1 GROUP BY y,x ORDER BY y,x; -- IsSorted()==0 -func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:154740:20: */ +func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:154774:20: */ return int32(*(*uint8)(unsafe.Pointer(pWInfo + 48)) & 0x8 >> 3) } @@ -136455,7 +136687,7 @@ func Xsqlite3WhereIsSorted(tls *libc.TLS, pWInfo uintptr) int32 { /* sqlite3.c:1 // Return the cost of sorting nRow rows, assuming that the keys have // nOrderby columns and that the first nSorted columns are already in // order. -func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:154763:15: */ +func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32, nSorted int32) LogEst { /* sqlite3.c:154797:15: */ // TUNING: Estimated cost of a full external sort, where N is // the number of rows to sort is: // @@ -136502,7 +136734,7 @@ func whereSortingCost(tls *libc.TLS, pWInfo uintptr, nRow LogEst, nOrderBy int32 // // Return SQLITE_OK on success or SQLITE_NOMEM of a memory allocation // error occurs. -func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:154816:12: */ +func wherePathSolver(tls *libc.TLS, pWInfo uintptr, nRowEst LogEst) int32 { /* sqlite3.c:154850:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -136670,7 +136902,7 @@ __3: if int32(isOrdered) < 0 { isOrdered = wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, (*WhereInfo)(unsafe.Pointer(pWInfo)).FwctrlFlags, - uint16(iLoop), pWLoop, bp /* &revMask */) + uint16(iLoop), pWLoop, bp) } else { *(*Bitmask)(unsafe.Pointer(bp /* revMask */)) = (*WherePath)(unsafe.Pointer(pFrom)).FrevLoop } @@ -136817,7 +137049,7 @@ __3: } if nFrom == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+21607 /* "no query solutio..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+21776, 0) Xsqlite3DbFreeNN(tls, db, pSpace) return SQLITE_ERROR } @@ -136844,7 +137076,7 @@ __3: // var notUsed Bitmask at bp+8, 8 var rc int32 = int32(wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet, pFrom, - uint16(WHERE_DISTINCTBY), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+8 /* ¬Used */)) + uint16(WHERE_DISTINCTBY), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+8)) if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpResultSet)).FnExpr { (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_ORDERED) } @@ -136866,7 +137098,7 @@ __3: wsFlags&U32(WHERE_IPK|WHERE_COLUMN_IN) != U32(WHERE_IPK|WHERE_COLUMN_IN) { *(*Bitmask)(unsafe.Pointer(bp + 16 /* m */)) = uint64(0) var rc int32 = int32(wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, pFrom, - uint16(WHERE_ORDERBY_LIMIT), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+16 /* &m */)) + uint16(WHERE_ORDERBY_LIMIT), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+16)) if rc == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 2, 0x4) @@ -136884,7 +137116,7 @@ __3: int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnOBSat) == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr && nLoop > 0 { *(*Bitmask)(unsafe.Pointer(bp + 24 /* revMask */)) = uint64(0) var nOrder int32 = int32(wherePathSatisfiesOrderBy(tls, pWInfo, (*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy, - pFrom, uint16(0), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+24 /* &revMask */)) + pFrom, uint16(0), uint16(nLoop-1), *(*uintptr)(unsafe.Pointer((*WherePath)(unsafe.Pointer(pFrom)).FaLoop + uintptr(nLoop-1)*4)), bp+24)) if nOrder == (*ExprList)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpOrderBy)).FnExpr { libc.SetBitFieldPtr8Uint32(pWInfo+48, uint32(1), 3, 0x8) @@ -136909,7 +137141,7 @@ __3: // Return non-zero on success, if this query can be handled by this // no-frills query planner. Return zero if this query needs the // general-purpose query planner. -func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155208:12: */ +func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155242:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -136942,9 +137174,9 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155208: pLoop = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpNew (*WhereLoop)(unsafe.Pointer(pLoop)).FwsFlags = U32(0) (*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip = U16(0) - pTerm = whereScanInit(tls, bp /* &scan */, pWC, iCur, -1, uint32(WO_EQ|WO_IS), uintptr(0)) + pTerm = whereScanInit(tls, bp, pWC, iCur, -1, uint32(WO_EQ|WO_IS), uintptr(0)) for pTerm != 0 && (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight != 0 { - pTerm = whereScanNext(tls, bp /* &scan */) + pTerm = whereScanNext(tls, bp) } if pTerm != 0 { @@ -136969,9 +137201,9 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155208: opMask = WO_EQ } for j = 0; j < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); j++ { - pTerm = whereScanInit(tls, bp /* &scan */, pWC, iCur, j, uint32(opMask), pIdx) + pTerm = whereScanInit(tls, bp, pWC, iCur, j, uint32(opMask), pIdx) for pTerm != 0 && (*WhereTerm)(unsafe.Pointer(pTerm)).FprereqRight != 0 { - pTerm = whereScanNext(tls, bp /* &scan */) + pTerm = whereScanNext(tls, bp) } if pTerm == uintptr(0) { break @@ -137016,7 +137248,7 @@ func whereShortCut(tls *libc.TLS, pBuilder uintptr) int32 { /* sqlite3.c:155208: } // Helper function for exprIsDeterministic(). -func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:155299:12: */ +func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:155333:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_FUNCTION && libc.Bool32((*Expr)(unsafe.Pointer(pExpr)).Fflags&U32(EP_ConstFunc) != U32(0)) == 0 { (*Walker)(unsafe.Pointer(pWalker)).FeCode = U16(0) return WRC_Abort @@ -137027,13 +137259,13 @@ func exprNodeIsDeterministic(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int3 // Return true if the expression contains no non-deterministic SQL // functions. Do not consider non-deterministic SQL functions that are // part of sub-select statements. -func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:155312:12: */ +func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:155346:12: */ bp := tls.Alloc(28) defer tls.Free(28) // var w Walker at bp, 28 - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FeCode = U16(1) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -137041,7 +137273,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:155312:1 (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{Xsqlite3SelectWalkFail})) - Xsqlite3WalkExpr(tls, bp /* &w */, p) + Xsqlite3WalkExpr(tls, bp, p) return int32((*Walker)(unsafe.Pointer(bp /* &w */)).FeCode) } @@ -137131,7 +137363,7 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:155312:1 // the first cursor in an array of cursors for all indices. iIdxCur should // be used to compute the appropriate cursor depending on which index is // used. -func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:155432:26: */ +func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:155466:26: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -137184,7 +137416,7 @@ func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere // Variable initialization db = (*Parse)(unsafe.Pointer(pParse)).Fdb - libc.Xmemset(tls, bp+8 /* &sWLB */, 0, uint32(unsafe.Sizeof(WhereLoopBuilder{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof(WhereLoopBuilder{}))) // An ORDER/GROUP BY clause of more than 63 terms cannot be optimized @@ -137211,7 +137443,7 @@ __2: if !((*SrcList)(unsafe.Pointer(pTabList)).FnSrc > int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8))) { goto __3 } - Xsqlite3ErrorMsg(tls, pParse, ts+21625 /* "at most %d table..." */, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) + Xsqlite3ErrorMsg(tls, pParse, ts+21794, libc.VaList(bp, int32(uint32(unsafe.Sizeof(Bitmask(0)))*uint32(8)))) return uintptr(0) __3: ; @@ -137286,7 +137518,7 @@ __7: (*WhereInfo)(unsafe.Pointer(pWInfo)).FeDistinct = U8(WHERE_DISTINCT_UNIQUE) __8: ; - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21653 /* "SCAN CONSTANT RO..." */, 0) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+21822, 0) goto __6 __5: // Assign a bit from the bitmask to every term in the FROM clause. @@ -137391,7 +137623,7 @@ __18: if !(nTabList != 1 || whereShortCut(tls, bp+8) == 0) { goto __22 } - rc = whereLoopAddAll(tls, bp+8 /* &sWLB */) + rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { goto __23 } @@ -137418,7 +137650,7 @@ __25: goto __25 __26: ; - rc = whereLoopAddAll(tls, bp+8 /* &sWLB */) + rc = whereLoopAddAll(tls, bp+8) if !(rc != 0) { goto __27 } @@ -137599,7 +137831,7 @@ __37: ; __33: ; - *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 128)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) + *(*U32)(unsafe.Pointer((*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse + 136)) += U32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnRowOut) // If the caller is an UPDATE or DELETE statement that is requesting // to use a one-pass algorithm, determine if this is appropriate. @@ -137911,7 +138143,7 @@ __92: // Generate the end of the WHERE loop. See comments on // sqlite3WhereBegin() for additional information. -func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:156032:21: */ +func Xsqlite3WhereEnd(tls *libc.TLS, pWInfo uintptr) { /* sqlite3.c:156066:21: */ var pParse uintptr = (*WhereInfo)(unsafe.Pointer(pWInfo)).FpParse var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -138309,7 +138541,7 @@ __6: // window frame has been coerced to: // // ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156470:13: */ +func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156504:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) if p != 0 { *(*I64)(unsafe.Pointer(p))++ @@ -138318,7 +138550,7 @@ func row_numberStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156480:13: */ +func row_numberValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156514:13: */ var p uintptr = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(I64(0)))) Xsqlite3_result_int64(tls, pCtx, func() int64 { if p != 0 { @@ -138334,13 +138566,13 @@ type CallCount = struct { FnValue I64 FnStep I64 FnTotal I64 -} /* sqlite3.c:156489:1 */ +} /* sqlite3.c:156523:1 */ // Implementation of built-in window function dense_rank(). Assumes that // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156501:13: */ +func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156535:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138350,7 +138582,7 @@ func dense_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156512:13: */ +func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156546:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138368,9 +138600,9 @@ func dense_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156512:13: type NthValueCtx = struct { FnStep I64 FpValue uintptr -} /* sqlite3.c:156529:1 */ +} /* sqlite3.c:156563:1 */ -func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156533:13: */ +func nth_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156567:13: */ var p uintptr var fVal float64 var iVal I64 @@ -138433,10 +138665,10 @@ __1: error_out: Xsqlite3_result_error(tls, - pCtx, ts+21671 /* "second argument ..." */, -1) + pCtx, ts+21840, -1) } -func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156574:13: */ +func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156608:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -138446,7 +138678,7 @@ func nth_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156574:13 } } -func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156586:13: */ +func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156620:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue == uintptr(0) { @@ -138459,7 +138691,7 @@ func first_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) _ = apArg } -func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156602:13: */ +func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156636:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NthValueCtx{}))) if p != 0 && (*NthValueCtx)(unsafe.Pointer(p)).FpValue != 0 { @@ -138473,7 +138705,7 @@ func first_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156602: // the window frame has been set to: // // RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW -func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156620:13: */ +func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156654:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138486,7 +138718,7 @@ func rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s _ = apArg } -func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156636:13: */ +func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156670:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138499,7 +138731,7 @@ func rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156636:13: */ // the window frame has been set to: // // GROUPS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING -func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156651:13: */ +func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156685:13: */ var p uintptr _ = nArg _ = apArg @@ -138509,7 +138741,7 @@ func percent_rankStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr } } -func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156664:13: */ +func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156698:13: */ var p uintptr _ = nArg _ = apArg @@ -138517,7 +138749,7 @@ func percent_rankInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156675:13: */ +func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156709:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(CallCount{}))) if p != 0 { @@ -138535,7 +138767,7 @@ func percent_rankValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156675:13 // the window frame has been set to: // // GROUPS BETWEEN 1 FOLLOWING AND UNBOUNDED FOLLOWING -func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156696:13: */ +func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156730:13: */ var p uintptr _ = nArg _ = apArg @@ -138545,7 +138777,7 @@ func cume_distStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156709:13: */ +func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156743:13: */ var p uintptr _ = nArg _ = apArg @@ -138553,7 +138785,7 @@ func cume_distInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { (*CallCount)(unsafe.Pointer(p)).FnStep++ } -func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156720:13: */ +func cume_distValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156754:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 { @@ -138567,13 +138799,13 @@ type NtileCtx = struct { FnTotal I64 FnParam I64 FiRow I64 -} /* sqlite3.c:156733:1 */ +} /* sqlite3.c:156767:1 */ // Implementation of ntile(). This assumes that the window frame has // been coerced to: // // ROWS CURRENT ROW AND UNBOUNDED FOLLOWING -func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156745:13: */ +func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156779:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) @@ -138582,14 +138814,14 @@ func ntileStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* (*NtileCtx)(unsafe.Pointer(p)).FnParam = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apArg))) if (*NtileCtx)(unsafe.Pointer(p)).FnParam <= int64(0) { Xsqlite3_result_error(tls, - pCtx, ts+21727 /* "argument of ntil..." */, -1) + pCtx, ts+21896, -1) } } (*NtileCtx)(unsafe.Pointer(p)).FnTotal++ } } -func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156765:13: */ +func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156799:13: */ var p uintptr _ = nArg _ = apArg @@ -138597,7 +138829,7 @@ func ntileInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* s (*NtileCtx)(unsafe.Pointer(p)).FiRow++ } -func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156776:13: */ +func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156810:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(NtileCtx{}))) if p != 0 && (*NtileCtx)(unsafe.Pointer(p)).FnParam > int64(0) { @@ -138622,10 +138854,10 @@ func ntileValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156776:13: */ type LastValueCtx = struct { FpVal uintptr FnVal int32 -} /* sqlite3.c:156803:1 */ +} /* sqlite3.c:156837:1 */ // Implementation of last_value(). -func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156811:13: */ +func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156845:13: */ var p uintptr _ = nArg p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) @@ -138640,7 +138872,7 @@ func last_valueStepFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) } } -func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156829:13: */ +func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:156863:13: */ var p uintptr _ = nArg _ = apArg @@ -138654,7 +138886,7 @@ func last_valueInvFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { } } -func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156846:13: */ +func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156880:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, 0) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -138662,7 +138894,7 @@ func last_valueValueFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156846:13: } } -func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156853:13: */ +func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156887:13: */ var p uintptr p = Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(LastValueCtx{}))) if p != 0 && (*LastValueCtx)(unsafe.Pointer(p)).FpVal != 0 { @@ -138678,17 +138910,17 @@ func last_valueFinalizeFunc(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:156853:1 // comparison of the zName pointer. Example: // // if( pFuncDef->zName==row_valueName ){ ... } -var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21772 /* "row_number" */)) /* sqlite3.c:156871:19 */ -var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 21783 /* "dense_rank" */)) /* sqlite3.c:156872:19 */ -var rankName = *(*[5]int8)(unsafe.Pointer(ts + 21794 /* "rank" */)) /* sqlite3.c:156873:19 */ -var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 21799 /* "percent_rank" */)) /* sqlite3.c:156874:19 */ -var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 21812 /* "cume_dist" */)) /* sqlite3.c:156875:19 */ -var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 21822 /* "ntile" */)) /* sqlite3.c:156876:19 */ -var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 21828 /* "last_value" */)) /* sqlite3.c:156877:19 */ -var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 21839 /* "nth_value" */)) /* sqlite3.c:156878:19 */ -var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 21849 /* "first_value" */)) /* sqlite3.c:156879:19 */ -var leadName = *(*[5]int8)(unsafe.Pointer(ts + 21861 /* "lead" */)) /* sqlite3.c:156880:19 */ -var lagName = *(*[4]int8)(unsafe.Pointer(ts + 21866 /* "lag" */)) /* sqlite3.c:156881:19 */ +var row_numberName = *(*[11]int8)(unsafe.Pointer(ts + 21941)) /* sqlite3.c:156905:19 */ +var dense_rankName = *(*[11]int8)(unsafe.Pointer(ts + 21952)) /* sqlite3.c:156906:19 */ +var rankName = *(*[5]int8)(unsafe.Pointer(ts + 21963)) /* sqlite3.c:156907:19 */ +var percent_rankName = *(*[13]int8)(unsafe.Pointer(ts + 21968)) /* sqlite3.c:156908:19 */ +var cume_distName = *(*[10]int8)(unsafe.Pointer(ts + 21981)) /* sqlite3.c:156909:19 */ +var ntileName = *(*[6]int8)(unsafe.Pointer(ts + 21991)) /* sqlite3.c:156910:19 */ +var last_valueName = *(*[11]int8)(unsafe.Pointer(ts + 21997)) /* sqlite3.c:156911:19 */ +var nth_valueName = *(*[10]int8)(unsafe.Pointer(ts + 22008)) /* sqlite3.c:156912:19 */ +var first_valueName = *(*[12]int8)(unsafe.Pointer(ts + 22018)) /* sqlite3.c:156913:19 */ +var leadName = *(*[5]int8)(unsafe.Pointer(ts + 22030)) /* sqlite3.c:156914:19 */ +var lagName = *(*[4]int8)(unsafe.Pointer(ts + 22035 /* "lag" */)) /* sqlite3.c:156915:19 */ // No-op implementations of xStep() and xFinalize(). Used as place-holders // for built-in window functions that never call those interfaces. @@ -138697,7 +138929,7 @@ var lagName = *(*[4]int8)(unsafe.Pointer(ts + 21866 /* "lag" */)) // noopStepFunc() is never called, and so it is marked with NO_TEST to // let the test coverage routine know not to expect this function to be // invoked. -func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:156892:13: */ //NO_TEST +func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:156926:13: */ //NO_TEST _ = p //NO_TEST _ = n //NO_TEST _ = a //NO_TEST @@ -138705,7 +138937,7 @@ func noopStepFunc(tls *libc.TLS, p uintptr, n int32, a uintptr) { /* sqlite3.c:1 } //NO_TEST -func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:156902:13: */ +func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:156936:13: */ _ = p /*no-op*/ } @@ -138720,7 +138952,7 @@ func noopValueFunc(tls *libc.TLS, p uintptr) { /* sqlite3.c:156902:13: */ // xInverse. // Register those built-in window functions that are not also aggregates. -func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:156933:21: */ +func Xsqlite3WindowFunctions(tls *libc.TLS) { /* sqlite3.c:156967:21: */ Xsqlite3InsertBuiltinFuncs(tls, uintptr(unsafe.Pointer(&aWindowFuncs)), int32(uint32(unsafe.Sizeof(aWindowFuncs))/uint32(unsafe.Sizeof(FuncDef{})))) } @@ -138739,9 +138971,9 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(1), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, {FnArg: int8(2), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}, - {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:156934:18 */ + {FnArg: int8(3), FfuncFlags: U32(SQLITE_FUNC_BUILTIN | SQLITE_UTF8 | SQLITE_FUNC_WINDOW | 0), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:156968:18 */ -func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:156954:15: */ +func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:156988:15: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -138752,7 +138984,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin } } if p == uintptr(0) { - Xsqlite3ErrorMsg(tls, pParse, ts+21870 /* "no such window: ..." */, libc.VaList(bp, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+22039, libc.VaList(bp, zName)) } return p } @@ -138772,7 +139004,7 @@ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uin // * If the function is a built-in window function that requires the // window to be coerced (see "BUILT-IN WINDOW FUNCTIONS" at the top // of this file), pWin is updated here. -func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:156982:21: */ +func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uintptr, pFunc uintptr) { /* sqlite3.c:157016:21: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -138796,12 +139028,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin ((*Window)(unsafe.Pointer(pWin)).FpStart != 0 || (*Window)(unsafe.Pointer(pWin)).FpEnd != 0) && ((*Window)(unsafe.Pointer(pWin)).FpOrderBy == uintptr(0) || (*ExprList)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOrderBy)).FnExpr != 1) { Xsqlite3ErrorMsg(tls, pParse, - ts+21889 /* "RANGE with offse..." */, 0) + ts+22058, 0) } else if (*FuncDef)(unsafe.Pointer(pFunc)).FfuncFlags&U32(SQLITE_FUNC_WINDOW) != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Window)(unsafe.Pointer(pWin)).FpFilter != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+21960 /* "FILTER clause ma..." */, 0) + ts+22129, 0) } else { *(*[8]WindowUpdate)(unsafe.Pointer(bp /* aUp */)) = [8]WindowUpdate{ {FzFunc: uintptr(unsafe.Pointer(&row_numberName)), FeFrmType: TK_ROWS, FeStart: TK_UNBOUNDED, FeEnd: TK_CURRENT}, @@ -138819,12 +139051,12 @@ func Xsqlite3WindowUpdate(tls *libc.TLS, pParse uintptr, pList uintptr, pWin uin Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(pWin)).FpStart) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(pWin)).FpEnd) (*Window)(unsafe.Pointer(pWin)).FpEnd = libc.AssignPtrUintptr(pWin+24, uintptr(0)) - (*Window)(unsafe.Pointer(pWin)).FeFrmType = U8((*WindowUpdate)(unsafe.Pointer(bp /* &aUp */ + uintptr(i)*16)).FeFrmType) - (*Window)(unsafe.Pointer(pWin)).FeStart = U8((*WindowUpdate)(unsafe.Pointer(bp /* &aUp */ + uintptr(i)*16)).FeStart) - (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp /* &aUp */ + uintptr(i)*16)).FeEnd) + (*Window)(unsafe.Pointer(pWin)).FeFrmType = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*16)).FeFrmType) + (*Window)(unsafe.Pointer(pWin)).FeStart = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*16)).FeStart) + (*Window)(unsafe.Pointer(pWin)).FeEnd = U8((*WindowUpdate)(unsafe.Pointer(bp + uintptr(i)*16)).FeEnd) (*Window)(unsafe.Pointer(pWin)).FeExclude = U8(0) if int32((*Window)(unsafe.Pointer(pWin)).FeStart) == TK_FOLLOWING { - (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7806 /* "1" */) + (*Window)(unsafe.Pointer(pWin)).FpStart = Xsqlite3Expr(tls, db, TK_INTEGER, ts+7828) } break } @@ -138839,16 +139071,16 @@ type WindowUpdate = struct { FeFrmType int32 FeStart int32 FeEnd int32 -} /* sqlite3.c:157017:7 */ +} /* sqlite3.c:157051:7 */ // Context object passed through sqlite3WalkExprList() to // selectWindowRewriteExprCb() by selectWindowRewriteEList(). -type WindowRewrite = WindowRewrite1 /* sqlite3.c:157057:30 */ +type WindowRewrite = WindowRewrite1 /* sqlite3.c:157091:30 */ // Callback function used by selectWindowRewriteEList(). If necessary, // this function appends to the output expression-list and updates // expression (*ppExpr) in place. -func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157071:12: */ +func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157105:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse @@ -138947,7 +139179,7 @@ func selectWindowRewriteExprCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) in return WRC_Continue } -func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:157153:12: */ +func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr) int32 { /* sqlite3.c:157187:12: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pWalker + 24)) var pSave uintptr = (*WindowRewrite1)(unsafe.Pointer(p)).FpSubSelect if pSave == pSelect { @@ -138971,7 +139203,7 @@ func selectWindowRewriteSelectCb(tls *libc.TLS, pWalker uintptr, pSelect uintptr // with a TK_COLUMN that reads the (N-1)th element of table // pWin->iEphCsr, where N is the number of elements in (*ppSub) after // appending the new one. -func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:157180:13: */ +func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc uintptr, pEList uintptr, pTab uintptr, ppSub uintptr) { /* sqlite3.c:157214:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -138979,8 +139211,8 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc // var sRewrite WindowRewrite at bp+28, 20 - libc.Xmemset(tls, bp /* &sWalker */, 0, uint32(unsafe.Sizeof(Walker{}))) - libc.Xmemset(tls, bp+28 /* &sRewrite */, 0, uint32(unsafe.Sizeof(WindowRewrite{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp+28, 0, uint32(unsafe.Sizeof(WindowRewrite{}))) (*WindowRewrite)(unsafe.Pointer(bp + 28 /* &sRewrite */)).FpSub = *(*uintptr)(unsafe.Pointer(ppSub)) (*WindowRewrite)(unsafe.Pointer(bp + 28 /* &sRewrite */)).FpWin = pWin @@ -138996,14 +139228,14 @@ func selectWindowRewriteEList(tls *libc.TLS, pParse uintptr, pWin uintptr, pSrc }{selectWindowRewriteSelectCb})) *(*uintptr)(unsafe.Pointer(bp + 24)) = bp + 28 /* &sRewrite */ - Xsqlite3WalkExprList(tls, bp /* &sWalker */, pEList) + Xsqlite3WalkExprList(tls, bp, pEList) *(*uintptr)(unsafe.Pointer(ppSub)) = (*WindowRewrite)(unsafe.Pointer(bp + 28 /* &sRewrite */)).FpSub } // Append a copy of each expression in expression-list pAppend to // expression list pList. Return a pointer to the result list. -func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:157214:17: */ +func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend uintptr, bIntToNull int32) uintptr { /* sqlite3.c:157248:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -139049,7 +139281,7 @@ func exprListAppendList(tls *libc.TLS, pParse uintptr, pList uintptr, pAppend ui // due to the extra subquery layer that was added. // // See also the incrAggDepth() routine in resolve.c -func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157256:12: */ +func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157290:12: */ if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) >= (*Walker)(unsafe.Pointer(pWalker)).FwalkerDepth { (*Expr)(unsafe.Pointer(pExpr)).Fop2++ @@ -139057,14 +139289,14 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt return WRC_Continue } -func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157265:12: */ +func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:157299:12: */ bp := tls.Alloc(8) defer tls.Free(8) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION && (*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, - ts+7890 /* "misuse of aggreg..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) + ts+7912, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(pExpr + 8)))) } return WRC_Continue } @@ -139074,7 +139306,7 @@ func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr // rewrites the SELECT statement so that window function xStep functions // are invoked in the correct order as described under "SELECT REWRITING" // at the top of this file. -func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:157281:20: */ +func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:157315:20: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -139101,14 +139333,14 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* if pTab == uintptr(0) { return Xsqlite3ErrorToParser(tls, db, SQLITE_NOMEM) } - Xsqlite3AggInfoPersistWalkerInit(tls, bp /* &w */, pParse) - Xsqlite3WalkSelect(tls, bp /* &w */, p) + Xsqlite3AggInfoPersistWalkerInit(tls, bp, pParse) + Xsqlite3WalkSelect(tls, bp, p) if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_Aggregate) == U32(0) { (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{disallowAggregatesInOrderByCb})) (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback = uintptr(0) - Xsqlite3WalkExprList(tls, bp /* &w */, (*Select)(unsafe.Pointer(p)).FpOrderBy) + Xsqlite3WalkExprList(tls, bp, (*Select)(unsafe.Pointer(p)).FpOrderBy) } (*Select)(unsafe.Pointer(p)).FpSrc = uintptr(0) @@ -139139,8 +139371,8 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* (*Window)(unsafe.Pointer(pMWin)).FiEphCsr = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) *(*int32)(unsafe.Pointer(pParse + 40)) += 3 - selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*Select)(unsafe.Pointer(p)).FpEList, pTab, bp+28 /* &pSublist */) - selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*Select)(unsafe.Pointer(p)).FpOrderBy, pTab, bp+28 /* &pSublist */) + selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*Select)(unsafe.Pointer(p)).FpEList, pTab, bp+28) + selectWindowRewriteEList(tls, pParse, pMWin, pSrc, (*Select)(unsafe.Pointer(p)).FpOrderBy, pTab, bp+28) (*Window)(unsafe.Pointer(pMWin)).FnBufferCol = func() int32 { if *(*uintptr)(unsafe.Pointer(bp + 28)) != 0 { return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 28)))).FnExpr @@ -139163,7 +139395,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* pArgs = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 20)) if (*FuncDef)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpFunc)).FfuncFlags&U32(SQLITE_FUNC_SUBTYPE) != 0 { - selectWindowRewriteEList(tls, pParse, pMWin, pSrc, pArgs, pTab, bp+28 /* &pSublist */) + selectWindowRewriteEList(tls, pParse, pMWin, pSrc, pArgs, pTab, bp+28) (*Window)(unsafe.Pointer(pWin)).FiArgCol = func() int32 { if *(*uintptr)(unsafe.Pointer(bp + 28)) != 0 { return (*ExprList)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 28)))).FnExpr @@ -139196,7 +139428,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // keep everything legal in this case. if *(*uintptr)(unsafe.Pointer(bp + 28)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(bp + 28 /* pSublist */)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3Expr(tls, db, TK_INTEGER, ts+7399 /* "0" */)) + Xsqlite3Expr(tls, db, TK_INTEGER, ts+7421)) } pSub = Xsqlite3SelectNew(tls, @@ -139223,7 +139455,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* *(*U32)(unsafe.Pointer(pTab + 28)) |= U32(TF_Ephemeral) (*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpSrc + 8)).FpTab = pTab pTab = pTab2 - libc.Xmemset(tls, bp /* &w */, 0, uint32(unsafe.Sizeof(Walker{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Walker{}))) (*Walker)(unsafe.Pointer(bp /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{sqlite3WindowExtraAggFuncDepth})) @@ -139233,7 +139465,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* (*Walker)(unsafe.Pointer(bp /* &w */)).FxSelectCallback2 = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) }{Xsqlite3WalkerDepthDecrease})) - Xsqlite3WalkSelect(tls, bp /* &w */, pSub) + Xsqlite3WalkSelect(tls, bp, pSub) } } else { Xsqlite3SelectDelete(tls, db, pSub) @@ -139261,7 +139493,7 @@ func Xsqlite3WindowRewrite(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* // Unlink the Window object from the Select to which it is attached, // if it is attached. -func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:157445:21: */ +func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:157479:21: */ if (*Window)(unsafe.Pointer(p)).FppThis != 0 { *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(p)).FppThis)) = (*Window)(unsafe.Pointer(p)).FpNextWin if (*Window)(unsafe.Pointer(p)).FpNextWin != 0 { @@ -139272,7 +139504,7 @@ func Xsqlite3WindowUnlinkFromSelect(tls *libc.TLS, p uintptr) { /* sqlite3.c:157 } // Free the Window object passed as the second argument. -func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:157456:21: */ +func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:157490:21: */ if p != 0 { Xsqlite3WindowUnlinkFromSelect(tls, p) Xsqlite3ExprDelete(tls, db, (*Window)(unsafe.Pointer(p)).FpFilter) @@ -139287,7 +139519,7 @@ func Xsqlite3WindowDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1 } // Free the linked list of Window objects starting at the second argument. -func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:157473:21: */ +func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:157507:21: */ for p != 0 { var pNext uintptr = (*Window)(unsafe.Pointer(p)).FpNextWin Xsqlite3WindowDelete(tls, db, p) @@ -139300,7 +139532,7 @@ func Xsqlite3WindowListDelete(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3 // constant, change it to NULL. The fact that it is then a non-negative // integer will be caught later. But it is important not to leave // variable values in the expression tree. -func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:157488:13: */ +func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* sqlite3.c:157522:13: */ if 0 == Xsqlite3ExprIsConstant(tls, pExpr) { if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { Xsqlite3RenameExprUnmap(tls, pParse, pExpr) @@ -139312,7 +139544,7 @@ func sqlite3WindowOffsetExpr(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintp } // Allocate and return a new Window object describing a Window Definition. -func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:157500:23: */ +func Xsqlite3WindowAlloc(tls *libc.TLS, pParse uintptr, eType int32, eStart int32, pStart uintptr, eEnd int32, pEnd uintptr, eExclude U8) uintptr { /* sqlite3.c:157534:23: */ var pWin uintptr var bImplicitFrame int32 pWin = uintptr(0) @@ -139345,7 +139577,7 @@ __1: eStart == TK_FOLLOWING && (eEnd == TK_PRECEDING || eEnd == TK_CURRENT)) { goto __2 } - Xsqlite3ErrorMsg(tls, pParse, ts+22023 /* "unsupported fram..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22192, 0) goto windowAllocErr __2: ; @@ -139381,7 +139613,7 @@ windowAllocErr: // Attach PARTITION and ORDER BY clauses pPartition and pOrderBy to window // pWin. Also, if parameter pBase is not NULL, set pWin->zBase to the // equivalent nul-terminated string. -func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:157572:23: */ +func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartition uintptr, pOrderBy uintptr, pBase uintptr) uintptr { /* sqlite3.c:157606:23: */ if pWin != 0 { (*Window)(unsafe.Pointer(pWin)).FpPartition = pPartition (*Window)(unsafe.Pointer(pWin)).FpOrderBy = pOrderBy @@ -139400,7 +139632,7 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // stored in the linked list starting at pWin->pNextWin. This function // either updates *pWin according to the base specification, or else // leaves an error in pParse. -func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:157599:21: */ +func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:157633:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -139411,15 +139643,15 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint var zErr uintptr = uintptr(0) // Check for errors if (*Window)(unsafe.Pointer(pWin)).FpPartition != 0 { - zErr = ts + 22055 /* "PARTITION clause" */ + zErr = ts + 22224 /* "PARTITION clause" */ } else if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 && (*Window)(unsafe.Pointer(pWin)).FpOrderBy != 0 { - zErr = ts + 22072 /* "ORDER BY clause" */ + zErr = ts + 22241 /* "ORDER BY clause" */ } else if int32((*Window)(unsafe.Pointer(pExist)).FbImplicitFrame) == 0 { - zErr = ts + 22088 /* "frame specificat..." */ + zErr = ts + 22257 /* "frame specificat..." */ } if zErr != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+22108 /* "cannot override ..." */, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) + ts+22277, libc.VaList(bp, zErr, (*Window)(unsafe.Pointer(pWin)).FzBase)) } else { (*Window)(unsafe.Pointer(pWin)).FpPartition = Xsqlite3ExprListDup(tls, db, (*Window)(unsafe.Pointer(pExist)).FpPartition, 0) if (*Window)(unsafe.Pointer(pExist)).FpOrderBy != 0 { @@ -139434,7 +139666,7 @@ func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uint } // Attach window object pWin to expression p. -func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:157633:21: */ +func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr) { /* sqlite3.c:157667:21: */ if p != 0 { *(*uintptr)(unsafe.Pointer(p + 44)) = pWin @@ -139442,7 +139674,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr (*Window)(unsafe.Pointer(pWin)).FpOwner = p if (*Expr)(unsafe.Pointer(p)).Fflags&U32(EP_Distinct) != 0 && int32((*Window)(unsafe.Pointer(pWin)).FeFrmType) != TK_FILTER { Xsqlite3ErrorMsg(tls, pParse, - ts+22141 /* "DISTINCT is not ..." */, 0) + ts+22310, 0) } } else { Xsqlite3WindowDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pWin) @@ -139453,7 +139685,7 @@ func Xsqlite3WindowAttach(tls *libc.TLS, pParse uintptr, p uintptr, pWin uintptr // to be processed as part of SELECT statement pSel). The window is linked // in if either (a) there are no other windows already linked to this // SELECT, or (b) the windows already linked use a compatible window frame. -func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:157656:21: */ +func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3.c:157690:21: */ if pSel != 0 { if uintptr(0) == (*Select)(unsafe.Pointer(pSel)).FpWin || 0 == Xsqlite3WindowCompare(tls, uintptr(0), (*Select)(unsafe.Pointer(pSel)).FpWin, pWin, 0) { (*Window)(unsafe.Pointer(pWin)).FpNextWin = (*Select)(unsafe.Pointer(pSel)).FpWin @@ -139473,7 +139705,7 @@ func Xsqlite3WindowLink(tls *libc.TLS, pSel uintptr, pWin uintptr) { /* sqlite3. // Return 0 if the two window objects are identical, 1 if they are // different, or 2 if it cannot be determined if the objects are identical // or not. Identical window objects can be processed in a single scan. -func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:157678:20: */ +func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr, bFilter int32) int32 { /* sqlite3.c:157712:20: */ var res int32 if p1 == uintptr(0) || p2 == uintptr(0) { return 1 @@ -139513,7 +139745,7 @@ func Xsqlite3WindowCompare(tls *libc.TLS, pParse uintptr, p1 uintptr, p2 uintptr // This is called by code in select.c before it calls sqlite3WhereBegin() // to begin iterating through the sub-query results. It is used to allocate // and initialize registers and cursors used by sqlite3WindowCodeStep(). -func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:157712:21: */ +func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:157746:21: */ var nEphExpr int32 = (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer((*SrcItem)(unsafe.Pointer((*Select)(unsafe.Pointer(pSelect)).FpSrc + 8)).FpSelect)).FpEList)).FnExpr var pMWin uintptr = (*Select)(unsafe.Pointer(pSelect)).FpWin var pWin uintptr @@ -139589,14 +139821,14 @@ func Xsqlite3WindowCodeInit(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* // evaluated and the result left in register reg. This function generates VM // code to check that the value is a non-negative integer and throws an // exception if it is not. -func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:157799:13: */ +func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { /* sqlite3.c:157833:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regZero int32 = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, regZero) if eCond >= WINDOW_STARTING_NUM { var regString int32 = Xsqlite3GetTempReg(tls, pParse) - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1543 /* "" */, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1565, -1) Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, Xsqlite3VdbeCurrentAddr(tls, v)+2, reg) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_AFF_NUMERIC|SQLITE_JUMPIFNULL)) @@ -139618,17 +139850,17 @@ func windowCheckValue(tls *libc.TLS, pParse uintptr, reg int32, eCond int32) { / } var azErr = [5]uintptr{ - ts + 22188, /* "frame starting o..." */ - ts + 22241, /* "frame ending off..." */ - ts + 21671, /* "second argument ..." */ - ts + 22292, /* "frame starting o..." */ - ts + 22344, /* "frame ending off..." */ -} /* sqlite3.c:157800:21 */ -var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:157807:14 */ + ts + 22357, + ts + 22410, + ts + 21840, + ts + 22461, + ts + 22513, +} /* sqlite3.c:157834:21 */ +var aOp1 = [5]int32{OP_Ge, OP_Ge, OP_Gt, OP_Ge, OP_Ge} /* sqlite3.c:157841:14 */ // Return the number of arguments passed to the window-function associated // with the object passed as the only argument to this function. -func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:157846:12: */ +func windowArgCount(tls *libc.TLS, pWin uintptr) int32 { /* sqlite3.c:157880:12: */ var pList uintptr pList = *(*uintptr)(unsafe.Pointer((*Window)(unsafe.Pointer(pWin)).FpOwner + 20)) @@ -139652,19 +139884,19 @@ type WindowCodeArg1 = struct { Fstart WindowCsrAndReg Fcurrent WindowCsrAndReg Fend WindowCsrAndReg -} /* sqlite3.c:157853:9 */ +} /* sqlite3.c:157887:9 */ -type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:157853:30 */ +type WindowCodeArg = WindowCodeArg1 /* sqlite3.c:157887:30 */ type WindowCsrAndReg1 = struct { Fcsr int32 Freg int32 -} /* sqlite3.c:157853:9 */ +} /* sqlite3.c:157887:9 */ -type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:157854:32 */ +type WindowCsrAndReg = WindowCsrAndReg1 /* sqlite3.c:157888:32 */ // Generate VM code to read the window frames peer values from cursor csr into // an array of registers starting at reg. -func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:157938:13: */ +func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* sqlite3.c:157972:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var pOrderBy uintptr = (*Window)(unsafe.Pointer(pMWin)).FpOrderBy if pOrderBy != 0 { @@ -139700,7 +139932,7 @@ func windowReadPeerValues(tls *libc.TLS, p uintptr, csr int32, reg int32) { /* s // // If argument regPartSize is non-zero, then it is a register containing the // number of rows in the current partition. -func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:157975:13: */ +func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse int32, reg int32) { /* sqlite3.c:158009:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pWin uintptr @@ -139807,7 +140039,7 @@ func windowAggStep(tls *libc.TLS, p uintptr, pMWin uintptr, csr int32, bInverse // (bFin==1) for each window function in the linked list starting at // pMWin. Or, for built-in window-functions that do not use the standard // API, generate the equivalent VM code. -func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:158092:13: */ +func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:158126:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = Xsqlite3GetVdbe(tls, pParse) @@ -139843,7 +140075,7 @@ func windowAggFinal(tls *libc.TLS, p uintptr, bFin int32) { /* sqlite3.c:158092: // p->pMWin list by doing a full scan of the current window frame. Store the // results in the Window.regResult registers, ready to return the upper // layer. -func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:158131:13: */ +func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:158165:13: */ var pWin uintptr var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin @@ -139950,7 +140182,7 @@ func windowFullScan(tls *libc.TLS, p uintptr) { /* sqlite3.c:158131:13: */ // first_value() // lag() // lead() -func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:158237:13: */ +func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:158271:13: */ var pMWin uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpMWin var v uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpVdbe @@ -140033,7 +140265,7 @@ func windowReturnOneRow(tls *libc.TLS, p uintptr) { /* sqlite3.c:158237:13: */ // in the linked list passed as the second argument to NULL. And perform // any equivalent initialization required by any built-in window functions // in the list. -func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:158314:12: */ +func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sqlite3.c:158348:12: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) var regArg int32 var nArg int32 = 0 @@ -140068,7 +140300,7 @@ func windowInitAccum(tls *libc.TLS, pParse uintptr, pMWin uintptr) int32 { /* sq // Return true if the current frame should be cached in the ephemeral table, // even if there are no xInverse() calls required. -func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:158346:12: */ +func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:158380:12: */ var pWin uintptr if (*Window)(unsafe.Pointer(pMWin)).FregStartRowid != 0 { return 1 @@ -140093,7 +140325,7 @@ func windowCacheFrame(tls *libc.TLS, pMWin uintptr) int32 { /* sqlite3.c:158346: // If the two arrays are not equal, the contents of regNew is copied to // regOld and control falls through. Otherwise, if the contents of the arrays // are equal, an OP_Goto is executed. The address of the OP_Goto is returned. -func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:158372:13: */ +func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int32, regOld int32, addr int32) { /* sqlite3.c:158406:13: */ var v uintptr = Xsqlite3GetVdbe(tls, pParse) if pOrderBy != 0 { var nVal int32 = (*ExprList)(unsafe.Pointer(pOrderBy)).FnExpr @@ -140130,7 +140362,7 @@ func windowIfNewPeer(tls *libc.TLS, pParse uintptr, pOrderBy uintptr, regNew int // A special type of arithmetic is used such that if csr1.peerVal is not // a numeric type (real or integer), then the result of the addition // or subtraction is a a copy of csr1.peerVal. -func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:158418:13: */ +func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal int32, csr2 int32, lbl int32) { /* sqlite3.c:158452:13: */ var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse var v uintptr = Xsqlite3GetVdbe(tls, pParse) var pOrderBy uintptr = (*Window)(unsafe.Pointer((*WindowCodeArg)(unsafe.Pointer(p)).FpMWin)).FpOrderBy // ORDER BY clause for window @@ -140226,7 +140458,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // the add/subtract is skipped for these, as required. If reg1 is a NULL, // then the arithmetic is performed, but since adding or subtracting from // NULL is always NULL anyway, this case is handled as required too. - Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1543 /* "" */, -1) + Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, regString, 0, ts+1565, -1) addrGe = Xsqlite3VdbeAddOp3(tls, v, OP_Ge, regString, 0, reg1) if op == OP_Ge && arith == OP_Add || op == OP_Le && arith == OP_Subtract { @@ -140253,7 +140485,7 @@ func windowCodeRangeTest(tls *libc.TLS, p uintptr, op int32, csr1 int32, regVal // generates VM code for a single RETURN_ROW, AGGSTEP or AGGINVERSE // operation. Refer to the header comment for sqlite3WindowCodeStep() for // details. -func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:158551:12: */ +func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOnEof int32) int32 { /* sqlite3.c:158585:12: */ var csr int32 var reg int32 var pParse uintptr = (*WindowCodeArg)(unsafe.Pointer(p)).FpParse @@ -140401,7 +140633,7 @@ func windowCodeOp(tls *libc.TLS, p uintptr, op int32, regCountdown int32, jumpOn // Allocate and return a duplicate of the Window object indicated by the // third argument. Set the Window.pOwner field of the new object to // pOwner. -func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:158700:23: */ +func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uintptr { /* sqlite3.c:158734:23: */ var pNew uintptr = uintptr(0) if p != 0 { pNew = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Window{}))) @@ -140432,7 +140664,7 @@ func Xsqlite3WindowDup(tls *libc.TLS, db uintptr, pOwner uintptr, p uintptr) uin // Return a copy of the linked list of Window objects passed as the // second argument. -func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:158733:23: */ +func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:158767:23: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -140457,14 +140689,14 @@ func Xsqlite3WindowListDup(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sq // // If an OOM error occurs, this function sets the Parse.db.mallocFailed // flag and returns zero. -func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:158755:12: */ +func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:158789:12: */ bp := tls.Alloc(4) defer tls.Free(4) var ret int32 = 0 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb *(*uintptr)(unsafe.Pointer(bp /* pVal */)) = uintptr(0) - Xsqlite3ValueFromExpr(tls, db, pExpr, (*Sqlite3)(unsafe.Pointer(db)).Fenc, uint8(SQLITE_AFF_NUMERIC), bp /* &pVal */) + Xsqlite3ValueFromExpr(tls, db, pExpr, (*Sqlite3)(unsafe.Pointer(db)).Fenc, uint8(SQLITE_AFF_NUMERIC), bp) if *(*uintptr)(unsafe.Pointer(bp)) != 0 && Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(bp))) > 0 { ret = 1 } @@ -140805,7 +141037,7 @@ func windowExprGtZero(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* s // // The text above leaves out many details. Refer to the code and comments // below for a more complete picture. -func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:159102:21: */ +func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uintptr, regGosub int32, addrGosub int32) { /* sqlite3.c:159136:21: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -140834,7 +141066,7 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin lblWhereEnd = Xsqlite3VdbeMakeLabel(tls, pParse) // Fill in the context object - libc.Xmemset(tls, bp /* &s */, 0, uint32(unsafe.Sizeof(WindowCodeArg{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(WindowCodeArg{}))) (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FpParse = pParse (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FpMWin = pMWin (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).FpVdbe = v @@ -140984,10 +141216,10 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin var addrGe int32 = Xsqlite3VdbeAddOp3(tls, v, op, regStart, 0, regEnd) // NeverNull because bound <expr> // values previously checked - windowAggFinal(tls, bp /* &s */, 0) + windowAggFinal(tls, bp, 0) Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, 1) - windowReturnOneRow(tls, bp /* &s */) + windowReturnOneRow(tls, bp) Xsqlite3VdbeAddOp1(tls, v, OP_ResetSorter, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr) Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, lblWhereEnd) Xsqlite3VdbeJumpHere(tls, v, addrGe) @@ -141021,44 +141253,44 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin windowIfNewPeer(tls, pParse, pOrderBy, regNewPeer, regPeer, lblWhereEnd) } if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_FOLLOWING { - windowCodeOp(tls, bp /* &s */, WINDOW_AGGSTEP, 0, 0) + windowCodeOp(tls, bp, WINDOW_AGGSTEP, 0, 0) if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) != TK_UNBOUNDED { if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { var lbl int32 = Xsqlite3VdbeMakeLabel(tls, pParse) var addrNext int32 = Xsqlite3VdbeCurrentAddr(tls, v) - windowCodeRangeTest(tls, bp /* &s */, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, regEnd, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Fcsr, lbl) - windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 0) - windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, 0, 0) + windowCodeRangeTest(tls, bp, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, regEnd, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Fcsr, lbl) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrNext) Xsqlite3VdbeResolveLabel(tls, v, lbl) } else { - windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, regEnd, 0) - windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 0) + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, regEnd, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) } } } else if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_PRECEDING { var bRPS int32 = libc.Bool32(int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_PRECEDING && int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE) - windowCodeOp(tls, bp /* &s */, WINDOW_AGGSTEP, regEnd, 0) + windowCodeOp(tls, bp, WINDOW_AGGSTEP, regEnd, 0) if bRPS != 0 { - windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) } - windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, 0, 0) + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) if !(bRPS != 0) { - windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) } } else { var addr int32 = 0 - windowCodeOp(tls, bp /* &s */, WINDOW_AGGSTEP, 0, 0) + windowCodeOp(tls, bp, WINDOW_AGGSTEP, 0, 0) if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) != TK_UNBOUNDED { if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { var lbl int32 = 0 addr = Xsqlite3VdbeCurrentAddr(tls, v) if regEnd != 0 { lbl = Xsqlite3VdbeMakeLabel(tls, pParse) - windowCodeRangeTest(tls, bp /* &s */, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, regEnd, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Fcsr, lbl) + windowCodeRangeTest(tls, bp, OP_Ge, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fcurrent.Fcsr, regEnd, (*WindowCodeArg)(unsafe.Pointer(bp /* &s */)).Fend.Fcsr, lbl) } - windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, 0, 0) - windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 0) + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) if regEnd != 0 { Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addr) Xsqlite3VdbeResolveLabel(tls, v, lbl) @@ -141068,8 +141300,8 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin addr = Xsqlite3VdbeAddOp3(tls, v, OP_IfPos, regEnd, 0, 1) } - windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, 0, 0) - windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 0) + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) if regEnd != 0 { Xsqlite3VdbeJumpHere(tls, v, addr) } @@ -141092,45 +141324,45 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_PRECEDING { var bRPS int32 = libc.Bool32(int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_PRECEDING && int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE) - windowCodeOp(tls, bp /* &s */, WINDOW_AGGSTEP, regEnd, 0) + windowCodeOp(tls, bp, WINDOW_AGGSTEP, regEnd, 0) if bRPS != 0 { - windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 0) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) } - windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, 0, 0) + windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 0) } else if int32((*Window)(unsafe.Pointer(pMWin)).FeStart) == TK_FOLLOWING { var addrStart int32 var addrBreak1 int32 var addrBreak2 int32 var addrBreak3 int32 - windowCodeOp(tls, bp /* &s */, WINDOW_AGGSTEP, 0, 0) + windowCodeOp(tls, bp, WINDOW_AGGSTEP, 0, 0) if int32((*Window)(unsafe.Pointer(pMWin)).FeFrmType) == TK_RANGE { addrStart = Xsqlite3VdbeCurrentAddr(tls, v) - addrBreak2 = windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 1) - addrBreak1 = windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, 0, 1) + addrBreak2 = windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 1) + addrBreak1 = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 1) } else if int32((*Window)(unsafe.Pointer(pMWin)).FeEnd) == TK_UNBOUNDED { addrStart = Xsqlite3VdbeCurrentAddr(tls, v) - addrBreak1 = windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, regStart, 1) - addrBreak2 = windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, 0, 1) + addrBreak1 = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, regStart, 1) + addrBreak2 = windowCodeOp(tls, bp, WINDOW_AGGINVERSE, 0, 1) } else { addrStart = Xsqlite3VdbeCurrentAddr(tls, v) - addrBreak1 = windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, regEnd, 1) - addrBreak2 = windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 1) + addrBreak1 = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, regEnd, 1) + addrBreak2 = windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 1) } Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrStart) Xsqlite3VdbeJumpHere(tls, v, addrBreak2) addrStart = Xsqlite3VdbeCurrentAddr(tls, v) - addrBreak3 = windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, 0, 1) + addrBreak3 = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 1) Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrStart) Xsqlite3VdbeJumpHere(tls, v, addrBreak1) Xsqlite3VdbeJumpHere(tls, v, addrBreak3) } else { var addrBreak int32 var addrStart int32 - windowCodeOp(tls, bp /* &s */, WINDOW_AGGSTEP, 0, 0) + windowCodeOp(tls, bp, WINDOW_AGGSTEP, 0, 0) addrStart = Xsqlite3VdbeCurrentAddr(tls, v) - addrBreak = windowCodeOp(tls, bp /* &s */, WINDOW_RETURN_ROW, 0, 1) - windowCodeOp(tls, bp /* &s */, WINDOW_AGGINVERSE, regStart, 0) + addrBreak = windowCodeOp(tls, bp, WINDOW_RETURN_ROW, 0, 1) + windowCodeOp(tls, bp, WINDOW_AGGINVERSE, regStart, 0) Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, addrStart) Xsqlite3VdbeJumpHere(tls, v, addrBreak) } @@ -141201,16 +141433,16 @@ func Xsqlite3WindowCodeStep(tls *libc.TLS, pParse uintptr, p uintptr, pWInfo uin type TrigEvent = struct { Fa int32 Fb uintptr -} /* sqlite3.c:159502:1 */ +} /* sqlite3.c:159536:1 */ type FrameBound = struct { FeType int32 FpExpr uintptr -} /* sqlite3.c:159504:1 */ +} /* sqlite3.c:159538:1 */ // Disable lookaside memory allocation for objects that might be // shared across database connections. -func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:159510:13: */ +func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:159544:13: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb (*Parse)(unsafe.Pointer(pParse)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ @@ -141220,7 +141452,7 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:159510:13: * // For a compound SELECT statement, make sure p->pPrior->pNext==p for // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. -func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:159543:15: */ +func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:159577:15: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -141239,19 +141471,19 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit } cnt++ if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != 0 || (*Select)(unsafe.Pointer(pLoop)).FpLimit != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22394, /* "%s clause should..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+22563, libc.VaList(bp, func() uintptr { if (*Select)(unsafe.Pointer(pLoop)).FpOrderBy != uintptr(0) { - return ts + 19508 /* "ORDER BY" */ + return ts + 19677 /* "ORDER BY" */ } - return ts + 22436 /* "LIMIT" */ + return ts + 22605 /* "LIMIT" */ }(), Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(pNext)).Fop)))) break } } if (*Select)(unsafe.Pointer(p)).FselFlags&U32(SF_MultiValue) == U32(0) && libc.AssignInt32(&mxSelect, *(*int32)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb + 112 + 4*4))) > 0 && cnt > mxSelect { - Xsqlite3ErrorMsg(tls, pParse, ts+22442 /* "too many terms i..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22611, 0) } } @@ -141259,7 +141491,7 @@ func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlit // Attach a With object describing the WITH clause to a Select // object describing the query for which the WITH clause is a prefix. -func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:159574:17: */ +func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith uintptr) uintptr { /* sqlite3.c:159608:17: */ if pSelect != 0 { (*Select)(unsafe.Pointer(pSelect)).FpWith = pWith parserDoubleLinkSelect(tls, pParse, pSelect) @@ -141273,7 +141505,7 @@ func attachWithToSelect(tls *libc.TLS, pParse uintptr, pSelect uintptr, pWith ui // Construct a new Expr object from a single identifier. Use the // new Expr to populate pOut. Set the span of pOut to be the identifier // that created the expression. -func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:159589:15: */ +func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sqlite3.c:159623:15: */ bp := tls.Alloc(8) defer tls.Free(8) *(*Token)(unsafe.Pointer(bp)) = t @@ -141304,7 +141536,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq } (*Expr)(unsafe.Pointer(p)).FnHeight = 1 if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { - return Xsqlite3RenameTokenMap(tls, pParse, p, bp /* &t */) + return Xsqlite3RenameTokenMap(tls, pParse, p, bp) } } return p @@ -141313,7 +141545,7 @@ func tokenExpr(tls *libc.TLS, pParse uintptr, op int32, t Token) uintptr { /* sq // A routine to convert a binary TK_IS or TK_ISNOT expression into a // unary TK_ISNULL or TK_NOTNULL expression. -func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:159624:15: */ +func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, op int32) { /* sqlite3.c:159658:15: */ var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if pA != 0 && pY != 0 && int32((*Expr)(unsafe.Pointer(pY)).Fop) == TK_NULL && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { (*Expr)(unsafe.Pointer(pA)).Fop = U8(op) @@ -141327,14 +141559,14 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // list of identifiers. Report an error if the ID list contains // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. -func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:159638:19: */ +func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:159672:19: */ bp := tls.Alloc(16) defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if (hasCollate != 0 || sortOrder != -1) && int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22476, /* "syntax error aft..." */ + Xsqlite3ErrorMsg(tls, pParse, ts+22645, libc.VaList(bp, (*Token)(unsafe.Pointer(pIdToken)).Fn, (*Token)(unsafe.Pointer(pIdToken)).Fz)) } Xsqlite3ExprListSetName(tls, pParse, p, pIdToken, 1) @@ -141401,7 +141633,7 @@ func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdT type YYMINORTYPE = struct { Fyyinit int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:159929:3 */ +} /* sqlite3.c:159963:3 */ //************ End control #defines ****************************************** // Define the yytestcase() macro to be a no-op if is not already defined @@ -141667,7 +141899,7 @@ var yy_action = [2037]uint16{ /* 2010 */ uint16(109), uint16(29), uint16(560), uint16(388), uint16(138), uint16(1172), uint16(259), uint16(170), uint16(260), uint16(1232), /* 2020 */ uint16(1232), uint16(919), uint16(1232), uint16(1232), uint16(1232), uint16(1232), uint16(1232), uint16(1232), uint16(1232), uint16(1232), /* 2030 */ uint16(1232), uint16(1232), uint16(1589), uint16(1232), uint16(1232), uint16(1232), uint16(1588), -} /* sqlite3.c:160023:27 */ +} /* sqlite3.c:160057:27 */ var yy_lookahead = [2221]uint16{ /* 0 */ uint16(192), uint16(273), uint16(274), uint16(275), uint16(192), uint16(192), uint16(273), uint16(274), uint16(275), uint16(192), /* 10 */ uint16(218), uint16(215), uint16(192), uint16(218), uint16(192), uint16(212), uint16(234), uint16(235), uint16(205), uint16(19), @@ -141892,7 +142124,7 @@ var yy_lookahead = [2221]uint16{ /* 2200 */ uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), /* 2210 */ uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), uint16(318), /* 2220 */ uint16(318), -} /* sqlite3.c:160229:25 */ +} /* sqlite3.c:160263:25 */ var yy_shift_ofst = [572]uint16{ /* 0 */ uint16(1423), uint16(1409), uint16(1454), uint16(1192), uint16(1192), uint16(610), uint16(1252), uint16(1410), uint16(1517), uint16(1684), /* 10 */ uint16(1684), uint16(1684), uint16(276), uint16(0), uint16(0), uint16(180), uint16(1015), uint16(1684), uint16(1684), uint16(1684), @@ -141952,7 +142184,7 @@ var yy_shift_ofst = [572]uint16{ /* 550 */ uint16(1977), uint16(1978), uint16(1979), uint16(1982), uint16(1990), uint16(1983), uint16(1984), uint16(1985), uint16(1986), uint16(1988), /* 560 */ uint16(1989), uint16(1987), uint16(1887), uint16(1876), uint16(1878), uint16(1892), uint16(1896), uint16(1992), uint16(1991), uint16(1998), /* 570 */ uint16(2006), uint16(2014), -} /* sqlite3.c:160457:33 */ +} /* sqlite3.c:160491:33 */ var yy_reduce_ofst = [407]int16{ /* 0 */ int16(109), int16(113), int16(272), int16(760), int16(-178), int16(-176), int16(-192), int16(-183), int16(-180), int16(-134), /* 10 */ int16(213), int16(220), int16(371), int16(-208), int16(-205), int16(-272), int16(-197), int16(611), int16(632), int16(765), @@ -141995,7 +142227,7 @@ var yy_reduce_ofst = [407]int16{ /* 380 */ int16(1650), int16(1578), int16(1619), int16(1623), int16(1625), int16(1624), int16(1674), int16(1685), int16(1686), int16(1691), /* 390 */ int16(1692), int16(1693), int16(1612), int16(1613), int16(1617), int16(1675), int16(1668), int16(1673), int16(1676), int16(1677), /* 400 */ int16(1680), int16(1666), int16(1669), int16(1678), int16(1681), int16(1683), int16(1687), -} /* sqlite3.c:160520:20 */ +} /* sqlite3.c:160554:20 */ var yy_default = [572]uint16{ /* 0 */ uint16(1633), uint16(1633), uint16(1633), uint16(1462), uint16(1230), uint16(1341), uint16(1230), uint16(1230), uint16(1230), uint16(1462), /* 10 */ uint16(1462), uint16(1462), uint16(1230), uint16(1371), uint16(1371), uint16(1515), uint16(1263), uint16(1230), uint16(1230), uint16(1230), @@ -142055,7 +142287,7 @@ var yy_default = [572]uint16{ /* 550 */ uint16(1230), uint16(1230), uint16(1230), uint16(1230), uint16(1230), uint16(1230), uint16(1230), uint16(1230), uint16(1230), uint16(1230), /* 560 */ uint16(1230), uint16(1606), uint16(1322), uint16(1413), uint16(1230), uint16(1412), uint16(1416), uint16(1252), uint16(1230), uint16(1242), /* 570 */ uint16(1230), uint16(1230), -} /* sqlite3.c:160563:27 */ +} /* sqlite3.c:160597:27 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -142256,7 +142488,7 @@ var yyFallback = [184]uint16{ uint16(0), // ERROR => nothing uint16(0), // SPACE => nothing uint16(0), // ILLEGAL => nothing -} /* sqlite3.c:160640:25 */ +} /* sqlite3.c:160674:25 */ // The following structure represents a single element of the // parser's stack. Information stored includes: @@ -142277,9 +142509,9 @@ type yyStackEntry = struct { Fstateno uint16 Fmajor uint16 Fminor YYMINORTYPE -} /* sqlite3.c:160844:1 */ +} /* sqlite3.c:160878:1 */ -type YyStackEntry = yyStackEntry /* sqlite3.c:160851:29 */ +type YyStackEntry = yyStackEntry /* sqlite3.c:160885:29 */ // The state of the parser is completely contained in an instance of // the following structure @@ -142288,9 +142520,9 @@ type yyParser = struct { FpParse uintptr Fyystack [100]YyStackEntry FyystackEnd uintptr -} /* sqlite3.c:160855:1 */ +} /* sqlite3.c:160889:1 */ -type YyParser = yyParser /* sqlite3.c:160874:25 */ +type YyParser = yyParser /* sqlite3.c:160908:25 */ // #include <assert.h> @@ -142300,7 +142532,7 @@ type YyParser = yyParser /* sqlite3.c:160874:25 */ // grammar. // Initialize a new parser that has already been allocated. -func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:161687:21: */ +func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { /* sqlite3.c:161721:21: */ var yypParser uintptr = yypRawParser (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse (*YyParser)(unsafe.Pointer(yypParser)).Fyytos = yypParser + 8 /* &.yystack */ @@ -142315,7 +142547,7 @@ func Xsqlite3ParserInit(tls *libc.TLS, yypRawParser uintptr, pParse uintptr) { / // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:161745:13: */ +func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor uintptr) { /* sqlite3.c:161779:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse switch int32(yymajor) { @@ -142474,7 +142706,7 @@ func yy_destructor(tls *libc.TLS, yypParser uintptr, yymajor uint16, yypminor ui // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:161870:13: */ +func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:161904:13: */ var yytos uintptr yytos = libc.PostDecUintptr(&(*YyParser)(unsafe.Pointer(pParser)).Fyytos, 12) @@ -142482,7 +142714,7 @@ func yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:161870:1 } // Clear all secondary memory allocations from the parser -func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:161888:21: */ +func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:161922:21: */ var pParser uintptr = p for (*YyParser)(unsafe.Pointer(pParser)).Fyytos > pParser+8 { yy_pop_parser_stack(tls, pParser) @@ -142505,7 +142737,7 @@ func Xsqlite3ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:161888:21: // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:161968:21: */ +func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint16 { /* sqlite3.c:162002:21: */ var i int32 if int32(stateno) > YY_MAX_SHIFT { @@ -142545,7 +142777,7 @@ func yy_find_shift_action(tls *libc.TLS, iLookAhead uint16, stateno uint16) uint // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:162033:21: */ +func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uint16 { /* sqlite3.c:162067:21: */ var i int32 i = int32(yy_reduce_ofst[stateno]) @@ -142556,7 +142788,7 @@ func yy_find_reduce_action(tls *libc.TLS, stateno uint16, iLookAhead uint16) uin } // The following routine is called if the stack overflows. -func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:162062:13: */ +func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:162096:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse for (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > yypParser+8 { @@ -142566,7 +142798,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:162062:13: // stack every overflows //******* Begin %stack_overflow code ***************************************** - Xsqlite3ErrorMsg(tls, pParse, ts+22514 /* "parser stack ove..." */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+22683, 0) //******* End %stack_overflow code ******************************************* (*YyParser)(unsafe.Pointer(yypParser)).FpParse = pParse @@ -142575,7 +142807,7 @@ func yyStackOverflow(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:162062:13: // Print tracing information for a SHIFT action // Perform a shift action. -func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:162105:13: */ +func yy_shift(tls *libc.TLS, yypParser uintptr, yyNewState uint16, yyMajor uint16, yyMinor Token) { /* sqlite3.c:162139:13: */ var yytos uintptr (*YyParser)(unsafe.Pointer(yypParser)).Fyytos += 12 if (*YyParser)(unsafe.Pointer(yypParser)).Fyytos > (*YyParser)(unsafe.Pointer(yypParser)).FyystackEnd { @@ -142997,7 +143229,7 @@ var yyRuleInfoLhs = [401]uint16{ uint16(302), // (398) anylist ::= anylist LP anylist RP uint16(302), // (399) anylist ::= anylist ANY uint16(265), // (400) with ::= -} /* sqlite3.c:162146:25 */ +} /* sqlite3.c:162180:25 */ // For rule J, yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -143403,7 +143635,7 @@ var yyRuleInfoNRhs = [401]int8{ int8(-4), // (398) anylist ::= anylist LP anylist RP int8(-2), // (399) anylist ::= anylist ANY int8(0), // (400) with ::= -} /* sqlite3.c:162552:26 */ +} /* sqlite3.c:162586:26 */ // Forward Declaration @@ -143415,7 +143647,7 @@ var yyRuleInfoNRhs = [401]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:162968:21: */ +func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:163002:21: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -143554,30 +143786,30 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(22): /* table_option_set ::= table_option_set COMMA table_option */ { - *(*U32)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) | *(*U32)(unsafe.Pointer(yymsp + 4)) + *(*U32)(unsafe.Pointer(bp + 40)) = *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) | *(*U32)(unsafe.Pointer(yymsp + 4)) } - *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*U32)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*U32)(unsafe.Pointer(bp + 40)) break case uint32(23): /* table_option ::= WITHOUT nm */ { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+15961, 5) == 0 { + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(5) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16134, 5) == 0 { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(TF_WithoutRowid | TF_NoVisibleRowid) } else { *(*U32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22536 /* "unknown table op..." */, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + Xsqlite3ErrorMsg(tls, pParse, ts+22705, libc.VaList(bp, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } break case uint32(24): /* table_option ::= nm */ { - if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+15874, 6) == 0 { - *(*U32)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = U32(TF_Strict) + if (*Token)(unsafe.Pointer(yymsp+4)).Fn == uint32(6) && Xsqlite3_strnicmp(tls, (*Token)(unsafe.Pointer(yymsp+4)).Fz, ts+16047, 6) == 0 { + *(*U32)(unsafe.Pointer(bp + 40)) = U32(TF_Strict) } else { - *(*U32)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = U32(0) - Xsqlite3ErrorMsg(tls, pParse, ts+22536 /* "unknown table op..." */, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) + *(*U32)(unsafe.Pointer(bp + 40)) = U32(0) + Xsqlite3ErrorMsg(tls, pParse, ts+22705, libc.VaList(bp+16, (*Token)(unsafe.Pointer(yymsp+4)).Fn, (*Token)(unsafe.Pointer(yymsp+4)).Fz)) } } - *(*U32)(unsafe.Pointer(yymsp + 4)) = *(*U32)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*U32)(unsafe.Pointer(yymsp + 4)) = *(*U32)(unsafe.Pointer(bp + 40)) break case uint32(25): /* columnname ::= nm typetoken */ { @@ -143870,7 +144102,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(84): /* cmd ::= select */ { *(*SelectDest)(unsafe.Pointer(bp + 48 /* dest */)) = SelectDest{FeDest: U8(SRT_Output)} - Xsqlite3Select(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), bp+48 /* &dest */) + Xsqlite3Select(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), bp+48) Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + 4))) } break @@ -143903,7 +144135,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in (*Token)(unsafe.Pointer(bp + 76 /* &x */)).Fn = uint32(0) parserDoubleLinkSelect(tls, pParse, pRhs) - pFrom = Xsqlite3SrcListAppendFromTerm(tls, pParse, uintptr(0), uintptr(0), uintptr(0), bp+76 /* &x */, pRhs, uintptr(0), uintptr(0)) + pFrom = Xsqlite3SrcListAppendFromTerm(tls, pParse, uintptr(0), uintptr(0), uintptr(0), bp+76, pRhs, uintptr(0), uintptr(0)) pRhs = Xsqlite3SelectNew(tls, pParse, uintptr(0), pFrom, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(0), uintptr(0)) } if pRhs != 0 { @@ -144109,21 +144341,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(115): /* fullname ::= nm */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+4, uintptr(0)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+4, uintptr(0)) if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && *(*uintptr)(unsafe.Pointer(bp + 40)) != 0 { Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40))+8)).FzName, yymsp+4) } } - *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(116): /* fullname ::= nm DOT nm */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-2)*12+4, yymsp+4) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-2)*12+4, yymsp+4) if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME && *(*uintptr)(unsafe.Pointer(bp + 40)) != 0 { Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40))+8)).FzName, yymsp+4) } } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(117): /* xfullname ::= nm */ { @@ -144310,7 +144542,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in case uint32(157): /* cmd ::= with UPDATE orconf xfullname indexed_opt SET setlist from where_opt_ret */ { Xsqlite3SrcListIndexedBy(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4) - Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22563 /* "set list" */) + Xsqlite3ExprListCheckLength(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), ts+22732) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = Xsqlite3SrcListAppendList(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4))) Xsqlite3Update(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4)), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*12 + 4)), uintptr(0), uintptr(0), uintptr(0)) } @@ -144328,10 +144560,10 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(160): /* setlist ::= nm EQ expr */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 4))) - Xsqlite3ExprListSetName(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)), yymsp+libc.UintptrFromInt32(-2)*12+4, 1) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 4))) + Xsqlite3ExprListSetName(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40)), yymsp+libc.UintptrFromInt32(-2)*12+4, 1) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(161): /* setlist ::= LP idlist RP EQ expr */ { @@ -144419,9 +144651,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3RenameTokenMap(tls, pParse, temp2, yymsp+4) Xsqlite3RenameTokenMap(tls, pParse, temp1, yymsp+libc.UintptrFromInt32(-2)*12+4) } - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp2) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp2) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(181): /* expr ::= nm DOT nm DOT nm */ { @@ -144433,9 +144665,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3RenameTokenMap(tls, pParse, temp3, yymsp+4) Xsqlite3RenameTokenMap(tls, pParse, temp2, yymsp+libc.UintptrFromInt32(-2)*12+4) } - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp4) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp4) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(182): fallthrough // term ::= NULL|FLOAT|BLOB @@ -144446,9 +144678,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(184): /* term ::= INTEGER */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, yymsp+4, 1) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, yymsp+4, 1) } - *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(185): /* expr ::= VARIABLE */ { @@ -144463,7 +144695,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(bp + 84 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 4)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22572 /* "near \"%T\": synta..." */, libc.VaList(bp+32, bp+84 /* &t */)) + Xsqlite3ErrorMsg(tls, pParse, ts+22741, libc.VaList(bp+32, bp+84)) *(*uintptr)(unsafe.Pointer(yymsp + 4)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 4)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) @@ -144487,35 +144719,35 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(188): /* expr ::= ID|INDEXED LP distinct exprlist RP */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(189): /* expr ::= ID|INDEXED LP STAR RP */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-3)*12+4, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-3)*12+4, 0) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(190): /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), yymsp+libc.UintptrFromInt32(-5)*12+4, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4))) - Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), yymsp+libc.UintptrFromInt32(-5)*12+4, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4))) + Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(191): /* expr ::= ID|INDEXED LP STAR RP filter_over */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-4)*12+4, 0) - Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+libc.UintptrFromInt32(-4)*12+4, 0) + Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 40)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(192): /* term ::= CTIME_KW */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+4, 0) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), yymsp+4, 0) } - *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(193): /* expr ::= LP nexprlist COMMA expr RP */ { @@ -144667,9 +144899,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3ExprUnmapAndDelete(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4))) *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = Xsqlite3Expr(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, func() uintptr { if *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)) != 0 { - return ts + 7806 /* "1" */ + return ts + 7828 /* "1" */ } - return ts + 7399 /* "0" */ + return ts + 7421 /* "0" */ }()) } else { var pRHS uintptr = (*ExprList_item)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) + 8)).FpExpr @@ -144875,7 +145107,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in (*Token)(unsafe.Pointer(bp + 92 /* &all */)).Fz = (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)).Fz (*Token)(unsafe.Pointer(bp + 92 /* &all */)).Fn = uint32((int32((*Token)(unsafe.Pointer(yymsp+4)).Fz)-int32((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*12+4)).Fz))/1) + (*Token)(unsafe.Pointer(yymsp+4)).Fn - Xsqlite3FinishTrigger(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), bp+92 /* &all */) + Xsqlite3FinishTrigger(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), bp+92) } break case uint32(256): /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ @@ -144950,46 +145182,46 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in *(*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*Token)(unsafe.Pointer(yymsp + 4)) Xsqlite3ErrorMsg(tls, pParse, - ts+22596 /* "qualified table ..." */, 0) + ts+22765, 0) } break case uint32(268): /* tridxby ::= INDEXED BY nm */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22691 /* "the INDEXED BY c..." */, 0) + ts+22860, 0) } break case uint32(269): /* tridxby ::= NOT INDEXED */ { Xsqlite3ErrorMsg(tls, pParse, - ts+22775 /* "the NOT INDEXED ..." */, 0) + ts+22944, 0) } break case uint32(270): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3TriggerUpdateStep(tls, pParse, yymsp+libc.UintptrFromInt32(-6)*12+4, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*12 + 4))), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-8)*12+4)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3TriggerUpdateStep(tls, pParse, yymsp+libc.UintptrFromInt32(-6)*12+4, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*12 + 4))), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-8)*12+4)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(271): /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3TriggerInsertStep(tls, pParse, yymsp+libc.UintptrFromInt32(-4)*12+4, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*12 + 4))), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) //yylhsminor.yy95-overwrites-yymsp[-6].minor.yy64 + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3TriggerInsertStep(tls, pParse, yymsp+libc.UintptrFromInt32(-4)*12+4, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*12 + 4))), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) //yylhsminor.yy95-overwrites-yymsp[-6].minor.yy64 } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(272): /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3TriggerDeleteStep(tls, pParse, yymsp+libc.UintptrFromInt32(-3)*12+4, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-5)*12+4)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3TriggerDeleteStep(tls, pParse, yymsp+libc.UintptrFromInt32(-3)*12+4, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-5)*12+4)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(273): /* trigger_cmd ::= scanpt select scanpt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3TriggerSelectStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) /*yylhsminor.yy95-overwrites-yymsp[-1].minor.yy303*/ + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3TriggerSelectStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + 4))) /*yylhsminor.yy95-overwrites-yymsp[-1].minor.yy303*/ } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(274): /* expr ::= RAISE LP IGNORE RP */ { @@ -145147,27 +145379,27 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(308): /* windowdefn_list ::= windowdefn */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 4)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + 4)) } - *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(309): /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ { Xsqlite3WindowChain(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4))) (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + 4)))).FpNextWin = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 4)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + 4)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(310): /* windowdefn ::= nm AS LP window RP */ { if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) != 0 { (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)))).FzName = Xsqlite3DbStrNDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-4)*12+4)).Fz, uint64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-4)*12+4)).Fn)) } - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(311): /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */ { @@ -145176,9 +145408,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(312): /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), yymsp+libc.UintptrFromInt32(-5)*12+4) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), yymsp+libc.UintptrFromInt32(-5)*12+4) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(313): /* window ::= ORDER BY sortlist frame_opt */ { @@ -145187,23 +145419,23 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(314): /* window ::= nm ORDER BY sortlist frame_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)), yymsp+libc.UintptrFromInt32(-4)*12+4) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(315): fallthrough // window ::= frame_opt case uint32(334): /* filter_over ::= over_clause */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 4)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + 4)) } - *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(316): /* window ::= nm frame_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), uintptr(0), uintptr(0), yymsp+libc.UintptrFromInt32(-1)*12+4) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 4)), uintptr(0), uintptr(0), yymsp+libc.UintptrFromInt32(-1)*12+4) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(317): /* frame_opt ::= */ { @@ -145212,23 +145444,23 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(318): /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*12+4)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*12+4)).FpExpr, TK_CURRENT, uintptr(0), *(*U8)(unsafe.Pointer(yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*12+4)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*12+4)).FpExpr, TK_CURRENT, uintptr(0), *(*U8)(unsafe.Pointer(yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(319): /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*12+4)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*12+4)).FpExpr, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*12+4)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*12+4)).FpExpr, *(*U8)(unsafe.Pointer(yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*12+4)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*12+4)).FpExpr, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*12+4)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*12+4)).FpExpr, *(*U8)(unsafe.Pointer(yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(321): fallthrough // frame_bound_s ::= frame_bound case uint32(323): /* frame_bound_e ::= frame_bound */ { - *(*FrameBound)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = *(*FrameBound)(unsafe.Pointer(yymsp + 4)) + *(*FrameBound)(unsafe.Pointer(bp + 40)) = *(*FrameBound)(unsafe.Pointer(yymsp + 4)) } - *(*FrameBound)(unsafe.Pointer(yymsp + 4)) = *(*FrameBound)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*FrameBound)(unsafe.Pointer(yymsp + 4)) = *(*FrameBound)(unsafe.Pointer(bp + 40)) break case uint32(322): fallthrough // frame_bound_s ::= UNBOUNDED PRECEDING @@ -145236,17 +145468,17 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in fallthrough case uint32(326): /* frame_bound ::= CURRENT ROW */ { - (*FrameBound)(unsafe.Pointer(bp + 40 /* &yylhsminor */)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12)).Fmajor) - (*FrameBound)(unsafe.Pointer(bp + 40 /* &yylhsminor */)).FpExpr = uintptr(0) + (*FrameBound)(unsafe.Pointer(bp + 40)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12)).Fmajor) + (*FrameBound)(unsafe.Pointer(bp + 40)).FpExpr = uintptr(0) } - *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*FrameBound)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*FrameBound)(unsafe.Pointer(bp + 40)) break case uint32(325): /* frame_bound ::= expr PRECEDING|FOLLOWING */ { - (*FrameBound)(unsafe.Pointer(bp + 40 /* &yylhsminor */)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) - (*FrameBound)(unsafe.Pointer(bp + 40 /* &yylhsminor */)).FpExpr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) + (*FrameBound)(unsafe.Pointer(bp + 40)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) + (*FrameBound)(unsafe.Pointer(bp + 40)).FpExpr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) } - *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*FrameBound)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*FrameBound)(unsafe.Pointer(bp + 40)) break case uint32(327): /* frame_exclude_opt ::= */ { @@ -145282,21 +145514,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in } else { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4))) } - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 4)) + *(*uintptr)(unsafe.Pointer(bp + 40)) = *(*uintptr)(unsafe.Pointer(yymsp + 4)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(335): /* filter_over ::= filter_clause */ { - *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Window{}))) + *(*uintptr)(unsafe.Pointer(bp + 40)) = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Window{}))) if *(*uintptr)(unsafe.Pointer(bp + 40)) != 0 { - (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)))).FeFrmType = U8(TK_FILTER) - (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)))).FpFilter = *(*uintptr)(unsafe.Pointer(yymsp + 4)) + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FeFrmType = U8(TK_FILTER) + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40)))).FpFilter = *(*uintptr)(unsafe.Pointer(yymsp + 4)) } else { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + 4))) } } - *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp + 40)) break case uint32(336): /* over_clause ::= OVER LP window RP */ { @@ -145404,7 +145636,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:164520:13: */ +func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:164554:13: */ bp := tls.Alloc(16) defer tls.Free(16) *(*Token)(unsafe.Pointer(bp + 8)) = yyminor @@ -145414,9 +145646,9 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To _ = yymajor // Silence some compiler warnings if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22572 /* "near \"%T\": synta..." */, libc.VaList(bp, bp+8 /* &yyminor */)) + Xsqlite3ErrorMsg(tls, pParse, ts+22741, libc.VaList(bp, bp+8)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+22860 /* "incomplete input" */, 0) + Xsqlite3ErrorMsg(tls, pParse, ts+23029, 0) } //*********** End %syntax_error code ***************************************** @@ -145424,7 +145656,7 @@ func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor To } // The following is executed when the parser accepts -func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:164544:13: */ +func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:164578:13: */ var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse @@ -145454,7 +145686,7 @@ func yy_accept(tls *libc.TLS, yypParser uintptr) { /* sqlite3.c:164544:13: */ // // Outputs: // None. -func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:164585:21: */ +func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:164619:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -145491,7 +145723,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { return } else { - *(*Token)(unsafe.Pointer(bp /* &yyminorunion */)) = yyminor + *(*Token)(unsafe.Pointer(bp)) = yyminor // If the YYNOERRORRECOVERY macro is defined, then do not attempt to // do any kind of error recovery. Instead, simply invoke the syntax // error routine and continue going as if nothing had happened. @@ -145499,7 +145731,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Applications can set this macro (for example inside %include) if // they intend to abandon the parse upon the first syntax error seen. yy_syntax_error(tls, yypParser, yymajor, yyminor) - yy_destructor(tls, yypParser, uint16(yymajor), bp /* &yyminorunion */) + yy_destructor(tls, yypParser, uint16(yymajor), bp) break } } @@ -145508,7 +145740,7 @@ func Xsqlite3Parser(tls *libc.TLS, yyp uintptr, yymajor int32, yyminor Token) { // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:164802:20: */ +func Xsqlite3ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:164836:20: */ return int32(yyFallback[iToken]) } @@ -145559,7 +145791,7 @@ var aiClass = [256]uint8{ /* Dx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* Ex */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(30), /* Fx */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), -} /* sqlite3.c:164874:28 */ +} /* sqlite3.c:164908:28 */ // The charMap() macro maps alphabetic characters (only) into their // lower-case ASCII equivalent. On ASCII machines, this is just @@ -145645,7 +145877,7 @@ var zKWText = [666]int8{ int8('W'), int8('S'), int8('U'), int8('N'), int8('B'), int8('O'), int8('U'), int8('N'), int8('D'), int8('E'), int8('D'), int8('U'), int8('N'), int8('I'), int8('O'), int8('N'), int8('U'), int8('S'), int8('I'), int8('N'), int8('G'), int8('V'), int8('A'), int8('C'), int8('U'), int8('U'), int8('M'), int8('V'), int8('I'), int8('E'), int8('W'), int8('I'), int8('N'), int8('D'), int8('O'), int8('W'), int8('B'), int8('Y'), int8('I'), int8('N'), int8('I'), int8('T'), int8('I'), int8('A'), int8('L'), int8('L'), int8('Y'), int8('P'), int8('R'), int8('I'), int8('M'), int8('A'), int8('R'), int8('Y'), -} /* sqlite3.c:164990:19 */ +} /* sqlite3.c:165024:19 */ // aKWHash[i] is the hash value for the i-th keyword var aKWHash = [127]uint8{ uint8(84), uint8(92), uint8(134), uint8(82), uint8(105), uint8(29), uint8(0), uint8(0), uint8(94), uint8(0), uint8(85), uint8(72), uint8(0), @@ -145658,7 +145890,7 @@ var aKWHash = [127]uint8{ uint8(50), uint8(124), uint8(0), uint8(100), uint8(0), uint8(18), uint8(121), uint8(144), uint8(56), uint8(130), uint8(139), uint8(88), uint8(83), uint8(37), uint8(30), uint8(126), uint8(0), uint8(0), uint8(108), uint8(51), uint8(131), uint8(128), uint8(0), uint8(34), uint8(0), uint8(0), uint8(132), uint8(0), uint8(98), uint8(38), uint8(39), uint8(0), uint8(20), uint8(45), uint8(117), uint8(93), -} /* sqlite3.c:165030:28 */ +} /* sqlite3.c:165064:28 */ // aKWNext[] forms the hash collision chain. If aKWHash[i]==0 // then the i-th keyword has no more hash collisions. Otherwise, // the next keyword with the same hash is aKWHash[i]-1. @@ -145675,7 +145907,7 @@ var aKWNext = [147]uint8{ uint8(112), uint8(21), uint8(7), uint8(67), uint8(0), uint8(79), uint8(96), uint8(118), uint8(0), uint8(0), uint8(68), uint8(0), uint8(0), uint8(99), uint8(44), uint8(0), uint8(55), uint8(0), uint8(76), uint8(0), uint8(95), uint8(32), uint8(33), uint8(57), uint8(25), uint8(0), uint8(102), uint8(0), uint8(0), uint8(87), -} /* sqlite3.c:165045:28 */ +} /* sqlite3.c:165079:28 */ // aKWLen[i] is the length (in bytes) of the i-th keyword var aKWLen = [147]uint8{ uint8(7), uint8(7), uint8(5), uint8(4), uint8(6), uint8(4), uint8(5), uint8(3), uint8(6), uint8(7), uint8(3), uint8(6), uint8(6), @@ -145690,7 +145922,7 @@ var aKWLen = [147]uint8{ uint8(4), uint8(4), uint8(6), uint8(7), uint8(5), uint8(9), uint8(4), uint8(4), uint8(5), uint8(2), uint8(5), uint8(8), uint8(6), uint8(4), uint8(9), uint8(5), uint8(8), uint8(4), uint8(3), uint8(9), uint8(5), uint8(5), uint8(6), uint8(4), uint8(6), uint8(2), uint8(2), uint8(9), uint8(3), uint8(7), -} /* sqlite3.c:165060:28 */ +} /* sqlite3.c:165094:28 */ // aKWOffset[i] is the index into zKWText[] of the start of // the text for the i-th keyword. var aKWOffset = [147]uint16{ @@ -145706,7 +145938,7 @@ var aKWOffset = [147]uint16{ uint16(520), uint16(523), uint16(527), uint16(532), uint16(539), uint16(544), uint16(553), uint16(557), uint16(560), uint16(565), uint16(567), uint16(571), uint16(579), uint16(585), uint16(588), uint16(597), uint16(602), uint16(610), uint16(610), uint16(614), uint16(623), uint16(628), uint16(633), uint16(639), uint16(642), uint16(645), uint16(648), uint16(650), uint16(655), uint16(659), -} /* sqlite3.c:165076:33 */ +} /* sqlite3.c:165110:33 */ // aKWCode[i] is the parser symbol code for the i-th keyword var aKWCode = [147]uint8{ uint8(TK_REINDEX), uint8(TK_INDEXED), uint8(TK_INDEX), uint8(TK_DESC), uint8(TK_ESCAPE), @@ -145739,7 +145971,7 @@ var aKWCode = [147]uint8{ uint8(TK_ROW), uint8(TK_UNBOUNDED), uint8(TK_UNION), uint8(TK_USING), uint8(TK_VACUUM), uint8(TK_VIEW), uint8(TK_WINDOW), uint8(TK_DO), uint8(TK_BY), uint8(TK_INITIALLY), uint8(TK_ALL), uint8(TK_PRIMARY), -} /* sqlite3.c:165091:28 */ +} /* sqlite3.c:165125:28 */ // Hash table decoded: // 0: INSERT @@ -145872,7 +146104,7 @@ var aKWCode = [147]uint8{ // Check to see if z[0..n-1] is a keyword. If it is, write the // parser symbol code for that keyword into *pType. Always // return the integer n (the length of the token). -func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:165255:12: */ +func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sqlite3.c:165289:12: */ var i int32 var j int32 var zKW uintptr @@ -146050,16 +146282,16 @@ func keywordCode(tls *libc.TLS, z uintptr, n int32, pType uintptr) int32 { /* sq return n } -func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:165429:20: */ +func Xsqlite3KeywordCode(tls *libc.TLS, z uintptr, n int32) int32 { /* sqlite3.c:165463:20: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* id */)) = TK_ID - keywordCode(tls, z, n, bp /* &id */) + keywordCode(tls, z, n, bp) return *(*int32)(unsafe.Pointer(bp /* id */)) } -func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:165435:16: */ +func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintptr) int32 { /* sqlite3.c:165469:16: */ if i < 0 || i >= SQLITE_N_KEYWORD { return SQLITE_ERROR } @@ -146068,11 +146300,11 @@ func Xsqlite3_keyword_name(tls *libc.TLS, i int32, pzName uintptr, pnName uintpt return SQLITE_OK } -func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:165441:16: */ +func Xsqlite3_keyword_count(tls *libc.TLS) int32 { /* sqlite3.c:165475:16: */ return SQLITE_N_KEYWORD } -func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:165442:16: */ +func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { /* sqlite3.c:165476:16: */ return libc.Bool32(TK_ID != Xsqlite3KeywordCode(tls, zName, nName)) } @@ -146095,13 +146327,13 @@ func Xsqlite3_keyword_check(tls *libc.TLS, zName uintptr, nName int32) int32 { / // But the feature is undocumented. // Make the IdChar function accessible from ctime.c and alter.c -func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:165489:20: */ +func Xsqlite3IsIdChar(tls *libc.TLS, c U8) int32 { /* sqlite3.c:165523:20: */ return libc.Bool32(int32(Xsqlite3CtypeMap[c])&0x46 != 0) } // Return the id of the next token in string (*pz). Before returning, set // (*pz) to point to the byte following the parsed token. -func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:165496:12: */ +func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:165530:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -146109,7 +146341,7 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:165496:12: */ // var t int32 at bp, 4 // Token type to return for ok := true; ok; ok = *(*int32)(unsafe.Pointer(bp)) == TK_SPACE { - z += uintptr(Xsqlite3GetToken(tls, z, bp /* &t */)) + z += uintptr(Xsqlite3GetToken(tls, z, bp)) } if *(*int32)(unsafe.Pointer(bp)) == TK_ID || *(*int32)(unsafe.Pointer(bp)) == TK_STRING || @@ -146151,30 +146383,30 @@ func getToken(tls *libc.TLS, pz uintptr) int32 { /* sqlite3.c:165496:12: */ // // * the previous token was TK_RP, and // * the next token is TK_LP. -func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:165545:12: */ +func analyzeWindowKeyword(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:165579:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z var t int32 - t = getToken(tls, bp /* &z */) + t = getToken(tls, bp) if t != TK_ID { return TK_ID } - t = getToken(tls, bp /* &z */) + t = getToken(tls, bp) if t != TK_AS { return TK_ID } return TK_WINDOW } -func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:165553:12: */ +func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:165587:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z if lastToken == TK_RP { - var t int32 = getToken(tls, bp /* &z */) + var t int32 = getToken(tls, bp) if t == TK_LP || t == TK_ID { return TK_OVER } @@ -146182,7 +146414,7 @@ func analyzeOverKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sq return TK_ID } -func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:165560:12: */ +func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* sqlite3.c:165594:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = z @@ -146195,7 +146427,7 @@ func analyzeFilterKeyword(tls *libc.TLS, z uintptr, lastToken int32) int32 { /* // Return the length (in bytes) of the token that begins at z[0]. // Store the token type in *tokenType before returning. -func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:165572:20: */ +func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sqlite3.c:165606:20: */ var i int32 var c int32 switch int32(aiClass[*(*uint8)(unsafe.Pointer(z))]) { // Switch on the character-class of the first byte @@ -146558,7 +146790,7 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq // then an and attempt is made to write an error message into // memory obtained from sqlite3_malloc() and to make *pzErrMsg point to that // error message. -func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:165867:20: */ +func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:165901:20: */ bp := tls.Alloc(1256) defer tls.Free(1256) @@ -146587,7 +146819,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin pParentParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse for 1 != 0 { - n = Xsqlite3GetToken(tls, zSql, bp+1252 /* &tokenType */) + n = Xsqlite3GetToken(tls, zSql, bp+1252) mxSqlLen = mxSqlLen - n if mxSqlLen < 0 { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_TOOBIG @@ -146624,7 +146856,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin *(*int32)(unsafe.Pointer(bp + 1252 /* tokenType */)) = analyzeFilterKeyword(tls, zSql+6, lastTokenParsed) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+22877 /* "unrecognized tok..." */, libc.VaList(bp, n, zSql)) + Xsqlite3ErrorMsg(tls, pParse, ts+23046, libc.VaList(bp, n, zSql)) break } } @@ -146644,12 +146876,12 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM } if (*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK && (*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_DONE && (*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0) { - (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3601 /* "%s" */, libc.VaList(bp+16, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3623, libc.VaList(bp+16, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg != 0 { *(*uintptr)(unsafe.Pointer(pzErrMsg)) = (*Parse)(unsafe.Pointer(pParse)).FzErrMsg - Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+22904, /* "%s in \"%s\"" */ + Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+23073, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pzErrMsg)), (*Parse)(unsafe.Pointer(pParse)).FzTail)) (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = uintptr(0) nErr++ @@ -146757,7 +146989,7 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin // If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed // to recognize the end of a trigger can be omitted. All we have to do // is look for a semicolon that is not part of an string or comment. -func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:166271:16: */ +func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:166305:16: */ var state U8 = U8(0) // Current state, using numbers defined in header comment var token U8 @@ -146860,7 +147092,7 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:166271: fallthrough case 'C': { - if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+22915, 6) == 0 { + if nId == 6 && Xsqlite3_strnicmp(tls, zSql, ts+23084, 6) == 0 { token = U8(TkCREATE) } else { token = U8(TkOTHER) @@ -146873,11 +147105,11 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:166271: fallthrough case 'T': { - if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19628, 7) == 0 { + if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+19797, 7) == 0 { token = U8(TkTRIGGER) - } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+22922, 4) == 0 { + } else if nId == 4 && Xsqlite3_strnicmp(tls, zSql, ts+23091, 4) == 0 { token = U8(TkTEMP) - } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+22927, 9) == 0 { + } else if nId == 9 && Xsqlite3_strnicmp(tls, zSql, ts+23096, 9) == 0 { token = U8(TkTEMP) } else { token = U8(TkOTHER) @@ -146890,9 +147122,9 @@ func Xsqlite3_complete(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:166271: fallthrough case 'E': { - if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+22937, 3) == 0 { + if nId == 3 && Xsqlite3_strnicmp(tls, zSql, ts+23106, 3) == 0 { token = U8(TkEND) - } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+22941, 7) == 0 { + } else if nId == 7 && Xsqlite3_strnicmp(tls, zSql, ts+23110, 7) == 0 { token = U8(TkEXPLAIN) } else { token = U8(TkOTHER) @@ -146934,12 +147166,12 @@ var trans = [8][8]U8{ /* 5 TRIGGER: */ {U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, /* 6 SEMI: */ {U8(6), U8(6), U8(5), U8(5), U8(5), U8(5), U8(5), U8(7)}, /* 7 END: */ {U8(1), U8(7), U8(5), U8(5), U8(5), U8(5), U8(5), U8(5)}, -} /* sqlite3.c:166279:19 */ +} /* sqlite3.c:166313:19 */ // This routine is the same as the sqlite3_complete() routine described // above, except that the parameter is required to be UTF-16 encoded, not // UTF-8. -func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:166436:16: */ +func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:166470:16: */ var pVal uintptr var zSql8 uintptr var rc int32 @@ -146966,7 +147198,7 @@ func Xsqlite3_complete16(tls *libc.TLS, zSql uintptr) int32 { /* sqlite3.c:16643 // This is an extension initializer that is a no-op and always // succeeds, except that it fails if the fault-simulation is set // to 500. -func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166588:12: */ +func sqlite3TestExtInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:166622:12: */ _ = db return Xsqlite3FaultSim(tls, 500) } @@ -146978,11 +147210,11 @@ var sqlite3BuiltinExtensions = [4]uintptr{ 0, 0, 0, -} /* sqlite3.c:166618:12 */ +} /* sqlite3.c:166652:12 */ // IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns // a pointer to the to the sqlite3_version[] string constant. -func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:166665:23: */ +func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:166699:23: */ return uintptr(unsafe.Pointer(&Xsqlite3_version)) } @@ -146995,14 +147227,14 @@ func Xsqlite3_libversion(tls *libc.TLS) uintptr { /* sqlite3.c:166665:23: */ // IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function // returns an integer equal to SQLITE_VERSION_NUMBER. -func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:166678:16: */ +func Xsqlite3_libversion_number(tls *libc.TLS) int32 { /* sqlite3.c:166712:16: */ return SQLITE_VERSION_NUMBER } // IMPLEMENTATION-OF: R-20790-14025 The sqlite3_threadsafe() function returns // zero if and only if SQLite was compiled with mutexing code omitted due to // the SQLITE_THREADSAFE compile-time option being set to 0. -func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:166684:16: */ +func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:166718:16: */ return SQLITE_THREADSAFE } @@ -147015,14 +147247,14 @@ func Xsqlite3_threadsafe(tls *libc.TLS) int32 { /* sqlite3.c:166684:16: */ // temporary files. // // See also the "PRAGMA temp_store_directory" SQL command. -var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:166715:17 */ +var Xsqlite3_temp_directory uintptr = uintptr(0) /* sqlite3.c:166749:17 */ // If the following global variable points to a string which is the // name of a directory, then that directory will be used to store // all database files specified with a relative pathname. // // See also the "PRAGMA data_store_directory" SQL command. -var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:166724:17 */ +var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:166758:17 */ // Initialize SQLite. // @@ -147053,7 +147285,7 @@ var Xsqlite3_data_directory uintptr = uintptr(0) /* sqlite3.c:166724:17 */ // // * Recursive calls to this routine from thread X return immediately // without blocking. -func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:166757:16: */ +func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:166791:16: */ var pMainMtx uintptr // The main static mutex var rc int32 // Result code @@ -147179,7 +147411,7 @@ func Xsqlite3_initialize(tls *libc.TLS) int32 { /* sqlite3.c:166757:16: */ // routine is not threadsafe. But it is safe to invoke this routine // on when SQLite is already shut down. If SQLite is already shut down // when this routine is invoked, then this routine is a harmless no-op. -func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:166932:16: */ +func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:166966:16: */ if Xsqlite3Config.FisInit != 0 { Xsqlite3_os_end(tls) @@ -147218,7 +147450,7 @@ func Xsqlite3_shutdown(tls *libc.TLS) int32 { /* sqlite3.c:166932:16: */ // database connections or memory allocations. This routine is not // threadsafe. Failure to heed these warnings can lead to unpredictable // behavior. -func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:166986:16: */ +func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:167020:16: */ var ap Va_list _ = ap var rc int32 = SQLITE_OK @@ -147226,7 +147458,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // sqlite3_config() shall return SQLITE_MISUSE if it is invoked while // the SQLite library is in use. if Xsqlite3Config.FisInit != 0 { - return Xsqlite3MisuseError(tls, 166992) + return Xsqlite3MisuseError(tls, 167026) } ap = va @@ -147496,7 +147728,7 @@ func Xsqlite3_config(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:1 // space for the lookaside memory is obtained from sqlite3_malloc(). // If pStart is not NULL then it is sz*cnt bytes of memory to use for // the lookaside memory. -func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:167304:12: */ +func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32) int32 { /* sqlite3.c:167338:12: */ var pStart uintptr var szAlloc Sqlite3_int64 = Sqlite3_int64(sz) * Sqlite3_int64(cnt) var nBig int32 // Number of full-size slots @@ -147594,13 +147826,13 @@ func setupLookaside(tls *libc.TLS, db uintptr, pBuf uintptr, sz int32, cnt int32 } // Return the mutex associated with a database connection. -func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:167404:26: */ +func Xsqlite3_db_mutex(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:167438:26: */ return (*Sqlite3)(unsafe.Pointer(db)).Fmutex } // Free up as much memory as we can from the given database // connection. -func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167418:16: */ +func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167452:16: */ var i int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -147619,7 +147851,7 @@ func Xsqlite3_db_release_memory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c: // Flush any dirty pages in the pager-cache for any attached database // to disk. -func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167442:16: */ +func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167476:16: */ var i int32 var rc int32 = SQLITE_OK var bSeenBusy int32 = 0 @@ -147648,7 +147880,7 @@ func Xsqlite3_db_cacheflush(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1674 } // Configuration settings for an individual database connection -func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:167471:16: */ +func Xsqlite3_db_config(tls *libc.TLS, db uintptr, op int32, va uintptr) int32 { /* sqlite3.c:167505:16: */ var ap Va_list _ = ap var rc int32 @@ -147727,11 +147959,11 @@ var aFlagOp = [16]struct { {Fop: SQLITE_DBCONFIG_DQS_DML, Fmask: U32(SQLITE_DqsDML)}, {Fop: SQLITE_DBCONFIG_LEGACY_FILE_FORMAT, Fmask: U32(SQLITE_LegacyFileFmt)}, {Fop: SQLITE_DBCONFIG_TRUSTED_SCHEMA, Fmask: U32(SQLITE_TrustedSchema)}, -} /* sqlite3.c:167494:9 */ +} /* sqlite3.c:167528:9 */ // This is the default collating function named "BINARY" which is always // available. -func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:167546:12: */ +func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:167580:12: */ var rc int32 var n int32 _ = NotUsed @@ -147753,7 +147985,7 @@ func binCollFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKe // This is the collating function named "RTRIM" which is always // available. Ignore trailing spaces. -func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:167569:12: */ +func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:167603:12: */ var pK1 uintptr = pKey1 var pK2 uintptr = pKey2 for nKey1 != 0 && int32(*(*U8)(unsafe.Pointer(pK1 + uintptr(nKey1-1)))) == ' ' { @@ -147766,7 +147998,7 @@ func rtrimCollFunc(tls *libc.TLS, pUser uintptr, nKey1 int32, pKey1 uintptr, nKe } // Return true if CollSeq is the default built-in BINARY. -func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:167584:20: */ +func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:167618:20: */ return libc.Bool32(p == uintptr(0) || (*CollSeq)(unsafe.Pointer(p)).FxCmp == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 @@ -147780,7 +148012,7 @@ func Xsqlite3IsBinary(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:167584:20: // extends only to the 26 characters used in the English language. // // At the moment there is only a UTF-8 implementation. -func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:167598:12: */ +func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* sqlite3.c:167632:12: */ var r int32 = Xsqlite3_strnicmp(tls, pKey1, pKey2, func() int32 { if nKey1 < nKey2 { @@ -147796,39 +148028,39 @@ func nocaseCollatingFunc(tls *libc.TLS, NotUsed uintptr, nKey1 int32, pKey1 uint } // Return the ROWID of the most recent insert -func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:167615:25: */ +func Xsqlite3_last_insert_rowid(tls *libc.TLS, db uintptr) Sqlite_int64 { /* sqlite3.c:167649:25: */ return (*Sqlite3)(unsafe.Pointer(db)).FlastRowid } // Set the value returned by the sqlite3_last_insert_rowid() API function. -func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:167628:17: */ +func Xsqlite3_set_last_insert_rowid(tls *libc.TLS, db uintptr, iRowid Sqlite3_int64) { /* sqlite3.c:167662:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = iRowid Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) } // Return the number of changes in the most recent call to sqlite3_exec(). -func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:167643:26: */ +func Xsqlite3_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:167677:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnChange } -func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167652:16: */ +func Xsqlite3_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167686:16: */ return int32(Xsqlite3_changes64(tls, db)) } // Return the number of changes since the database handle was opened. -func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:167659:26: */ +func Xsqlite3_total_changes64(tls *libc.TLS, db uintptr) Sqlite3_int64 { /* sqlite3.c:167693:26: */ return (*Sqlite3)(unsafe.Pointer(db)).FnTotalChange } -func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167668:16: */ +func Xsqlite3_total_changes(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167702:16: */ return int32(Xsqlite3_total_changes64(tls, db)) } // Close all open savepoints. This function only manipulates fields of the // database handle object, it does not close any savepoints that may be open // at the b-tree/pager level. -func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:167677:21: */ +func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:167711:21: */ for (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint != 0 { var pTmp uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint (*Sqlite3)(unsafe.Pointer(db)).FpSavepoint = (*Savepoint)(unsafe.Pointer(pTmp)).FpNext @@ -147843,7 +148075,7 @@ func Xsqlite3CloseSavepoints(tls *libc.TLS, db uintptr) { /* sqlite3.c:167677:21 // if this is not the last copy of the function, do not invoke it. Multiple // copies of a single function are created when create_function() is called // with SQLITE_ANY as the encoding. -func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:167694:13: */ +func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:167728:13: */ var pDestructor uintptr pDestructor = *(*uintptr)(unsafe.Pointer(p + 36)) @@ -147858,7 +148090,7 @@ func functionDestroy(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:167694 // Disconnect all sqlite3_vtab objects that belong to database connection // db. This is called when db is being closed. -func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:167711:13: */ +func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:167745:13: */ var i int32 var p uintptr Xsqlite3BtreeEnterAll(tls, db) @@ -147885,7 +148117,7 @@ func disconnectAllVtab(tls *libc.TLS, db uintptr) { /* sqlite3.c:167711:13: */ // Return TRUE if database connection db has unfinalized prepared // statements or unfinished sqlite3_backup objects. -func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167742:12: */ +func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167776:12: */ var j int32 if (*Sqlite3)(unsafe.Pointer(db)).FpVdbe != 0 { @@ -147901,14 +148133,14 @@ func connectionIsBusy(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167742:12: } // Close an existing SQLite database -func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:167756:12: */ +func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlite3.c:167790:12: */ if !(db != 0) { // EVIDENCE-OF: R-63257-11740 Calling sqlite3_close() or // sqlite3_close_v2() with a NULL pointer argument is a harmless no-op. return SQLITE_OK } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 167763) + return Xsqlite3MisuseError(tls, 167797) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if int32((*Sqlite3)(unsafe.Pointer(db)).FmTrace)&SQLITE_TRACE_CLOSE != 0 { @@ -147932,7 +148164,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // SQLITE_BUSY if the connection can not be closed immediately. if !(forceZombie != 0) && connectionIsBusy(tls, db) != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+22949 /* "unable to close ..." */, 0) + ts+23118, 0) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return SQLITE_BUSY } @@ -147945,7 +148177,7 @@ func sqlite3Close(tls *libc.TLS, db uintptr, forceZombie int32) int32 { /* sqlit // Return the transaction state for a single databse, or the maximum // transaction state over all attached databases if zSchema is null. -func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:167810:16: */ +func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* sqlite3.c:167844:16: */ var iDb int32 var nDb int32 var iTxn int32 = -1 @@ -147982,11 +148214,11 @@ func Xsqlite3_txn_state(tls *libc.TLS, db uintptr, zSchema uintptr) int32 { /* s // version forces the connection to become a zombie if there are // unclosed resources, and arranges for deallocation when the last // prepare statement or sqlite3_backup closes. -func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167845:16: */ +func Xsqlite3_close(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167879:16: */ return sqlite3Close(tls, db, 0) } -func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167846:16: */ +func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167880:16: */ return sqlite3Close(tls, db, 1) } @@ -147996,7 +148228,7 @@ func Xsqlite3_close_v2(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:167846:16 // has been a prior call to sqlite3_close(db) or sqlite3_close_v2(db)) and // every sqlite3_stmt has now been finalized and every sqlite3_backup has // finished, then free all resources. -func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:167857:21: */ +func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c:167891:21: */ var i uintptr // Hash table iterator var j int32 @@ -148106,7 +148338,7 @@ func Xsqlite3LeaveMutexAndCloseZombie(tls *libc.TLS, db uintptr) { /* sqlite3.c: // breaker") and made to return tripCode if there are any further // attempts to use that cursor. Read cursors remain open and valid // but are "saved" in case the table pages are moved around. -func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:167980:21: */ +func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3.c:168014:21: */ var i int32 var inTrans int32 = 0 var schemaChange int32 @@ -148156,24 +148388,24 @@ func Xsqlite3RollbackAll(tls *libc.TLS, db uintptr, tripCode int32) { /* sqlite3 // Return a static string that describes the kind of error specified in the // argument. -func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:168141:27: */ - var zErr uintptr = ts + 23017 /* "unknown error" */ +func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:168175:27: */ + var zErr uintptr = ts + 23186 /* "unknown error" */ switch rc { case SQLITE_ABORT | int32(2)<<8: { - zErr = ts + 23031 /* "abort due to ROL..." */ + zErr = ts + 23200 /* "abort due to ROL..." */ break } case SQLITE_ROW: { - zErr = ts + 23053 /* "another row avai..." */ + zErr = ts + 23222 /* "another row avai..." */ break } case SQLITE_DONE: { - zErr = ts + 23075 /* "no more rows ava..." */ + zErr = ts + 23244 /* "no more rows ava..." */ break } @@ -148191,36 +148423,36 @@ func Xsqlite3ErrStr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:168141:27: * } var aMsg = [29]uintptr{ - /* SQLITE_OK */ ts + 23098, /* "not an error" */ - /* SQLITE_ERROR */ ts + 23111, /* "SQL logic error" */ + ts + 23267, + ts + 23280, /* SQLITE_INTERNAL */ uintptr(0), - /* SQLITE_PERM */ ts + 23127, /* "access permissio..." */ - /* SQLITE_ABORT */ ts + 23152, /* "query aborted" */ - /* SQLITE_BUSY */ ts + 23166, /* "database is lock..." */ - /* SQLITE_LOCKED */ ts + 23185, /* "database table i..." */ - /* SQLITE_NOMEM */ ts + 6028, /* "out of memory" */ - /* SQLITE_READONLY */ ts + 23210, /* "attempt to write..." */ - /* SQLITE_INTERRUPT */ ts + 23247, /* "interrupted" */ - /* SQLITE_IOERR */ ts + 23259, /* "disk I/O error" */ - /* SQLITE_CORRUPT */ ts + 23274, /* "database disk im..." */ - /* SQLITE_NOTFOUND */ ts + 23307, /* "unknown operatio..." */ - /* SQLITE_FULL */ ts + 23325, /* "database or disk..." */ - /* SQLITE_CANTOPEN */ ts + 23350, /* "unable to open d..." */ - /* SQLITE_PROTOCOL */ ts + 23379, /* "locking protocol" */ + ts + 23296, + ts + 23321, + ts + 23335, + ts + 23354, + ts + 6050, + ts + 23379, + ts + 23416, + ts + 23428, + ts + 23443, + ts + 23476, + ts + 23494, + ts + 23519, + ts + 23548, /* SQLITE_EMPTY */ uintptr(0), - /* SQLITE_SCHEMA */ ts + 5758, /* "database schema ..." */ - /* SQLITE_TOOBIG */ ts + 5254, /* "string or blob t..." */ - /* SQLITE_CONSTRAINT */ ts + 23396, /* "constraint faile..." */ - /* SQLITE_MISMATCH */ ts + 23414, /* "datatype mismatc..." */ - /* SQLITE_MISUSE */ ts + 23432, /* "bad parameter or..." */ + ts + 5780, + ts + 5276, + ts + 23565, + ts + 23583, + ts + 23601, /* SQLITE_NOLFS */ uintptr(0), - /* SQLITE_AUTH */ ts + 23466, /* "authorization de..." */ + ts + 23635, /* SQLITE_FORMAT */ uintptr(0), - /* SQLITE_RANGE */ ts + 23487, /* "column index out..." */ - /* SQLITE_NOTADB */ ts + 23513, /* "file is not a da..." */ - /* SQLITE_NOTICE */ ts + 23536, /* "notification mes..." */ - /* SQLITE_WARNING */ ts + 23557, /* "warning message" */ -} /* sqlite3.c:168142:20 */ + ts + 23656, + ts + 23682, + ts + 23705, + ts + 23726, +} /* sqlite3.c:168176:20 */ // This routine implements a busy callback that sleeps and tries // again until a timeout value is reached. The timeout value is @@ -148229,7 +148461,7 @@ var aMsg = [29]uintptr{ // // Return non-zero to retry the lock. Return zero to stop trying // and cause SQLite to return SQLITE_BUSY. -func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:168211:12: */ +func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { /* sqlite3.c:168245:12: */ var db uintptr = ptr var tmout int32 = (*Sqlite3)(unsafe.Pointer(db)).FbusyTimeout var delay int32 @@ -148252,8 +148484,8 @@ func sqliteDefaultBusyCallback(tls *libc.TLS, ptr uintptr, count int32) int32 { return 1 } -var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:168218:19 */ -var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:168220:19 */ +var delays = [12]U8{U8(1), U8(2), U8(5), U8(10), U8(15), U8(20), U8(25), U8(25), U8(25), U8(50), U8(50), U8(100)} /* sqlite3.c:168252:19 */ +var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), U8(103), U8(128), U8(178), U8(228)} /* sqlite3.c:168254:19 */ // Invoke the given busy handler. // @@ -148262,7 +148494,7 @@ var totals = [12]U8{U8(0), U8(1), U8(3), U8(8), U8(18), U8(33), U8(53), U8(78), // // If this routine returns non-zero, the lock is retried. If it // returns 0, the operation aborts with an SQLITE_BUSY error. -func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:168263:20: */ +func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:168297:20: */ var rc int32 if (*BusyHandler)(unsafe.Pointer(p)).FxBusyHandler == uintptr(0) || (*BusyHandler)(unsafe.Pointer(p)).FnBusy < 0 { return 0 @@ -148280,7 +148512,7 @@ func Xsqlite3InvokeBusyHandler(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:16 // This routine sets the busy callback for an Sqlite database to the // given callback function with the given argument. -func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:168279:16: */ +func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintptr) int32 { /* sqlite3.c:168313:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FxBusyHandler = xBusy (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FpBusyArg = pArg @@ -148293,7 +148525,7 @@ func Xsqlite3_busy_handler(tls *libc.TLS, db uintptr, xBusy uintptr, pArg uintpt // This routine sets the progress callback for an Sqlite database to the // given callback function with the given argument. The progress callback will // be invoked every nOps opcodes. -func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:168302:17: */ +func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress uintptr, pArg uintptr) { /* sqlite3.c:168336:17: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if nOps > 0 { (*Sqlite3)(unsafe.Pointer(db)).FxProgress = xProgress @@ -148309,7 +148541,7 @@ func Xsqlite3_progress_handler(tls *libc.TLS, db uintptr, nOps int32, xProgress // This routine installs a default busy handler that waits for the // specified number of milliseconds before returning 0. -func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:168333:16: */ +func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlite3.c:168367:16: */ if ms > 0 { Xsqlite3_busy_handler(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 @@ -148323,7 +148555,7 @@ func Xsqlite3_busy_timeout(tls *libc.TLS, db uintptr, ms int32) int32 { /* sqlit } // Cause any pending operation to stop at its earliest opportunity. -func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:168350:17: */ +func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:168384:17: */ libc.AtomicStoreNInt32(db+300, int32(1), 0) } @@ -148331,7 +148563,7 @@ func Xsqlite3_interrupt(tls *libc.TLS, db uintptr) { /* sqlite3.c:168350:17: */ // that it is designed to be called by internal code. The difference is // that if a malloc() fails in sqlite3_create_function(), an error code // is returned and the mallocFailed flag cleared. -func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:168367:20: */ +func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, enc int32, pUserData uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, pDestructor uintptr) int32 { /* sqlite3.c:168401:20: */ var p uintptr var extraFlags int32 @@ -148341,7 +148573,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i libc.Bool32(xValue == uintptr(0)) != libc.Bool32(xInverse == uintptr(0)) || (nArg < -1 || nArg > SQLITE_MAX_FUNCTION_ARG) || 255 < Xsqlite3Strlen30(tls, zFunctionName) { - return Xsqlite3MisuseError(tls, 168392) + return Xsqlite3MisuseError(tls, 168426) } extraFlags = enc & (SQLITE_DETERMINISTIC | SQLITE_DIRECTONLY | SQLITE_SUBTYPE | SQLITE_INNOCUOUS) @@ -148399,7 +148631,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i if p != 0 && (*FuncDef)(unsafe.Pointer(p)).FfuncFlags&U32(SQLITE_FUNC_ENCMASK) == U32(enc) && int32((*FuncDef)(unsafe.Pointer(p)).FnArg) == nArg { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23573 /* "unable to delete..." */, 0) + ts+23742, 0) return SQLITE_BUSY } else { @@ -148446,7 +148678,7 @@ func Xsqlite3CreateFunc(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg i // sqlite3_create_function() // sqlite3_create_function_v2() // sqlite3_create_window_function() -func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:168501:12: */ +func createFunctionApi(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:168535:12: */ var rc int32 var pArg uintptr rc = SQLITE_ERROR @@ -148488,22 +148720,22 @@ out: } // Create new user functions. -func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:168552:16: */ +func Xsqlite3_create_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:168586:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), uintptr(0)) } -func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:168565:16: */ +func Xsqlite3_create_function_v2(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr, xDestroy uintptr) int32 { /* sqlite3.c:168599:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, xSFunc, xStep, xFinal, uintptr(0), uintptr(0), xDestroy) } -func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:168579:16: */ +func Xsqlite3_create_window_function(tls *libc.TLS, db uintptr, zFunc uintptr, nArg int32, enc int32, p uintptr, xStep uintptr, xFinal uintptr, xValue uintptr, xInverse uintptr, xDestroy uintptr) int32 { /* sqlite3.c:168613:16: */ return createFunctionApi(tls, db, zFunc, nArg, enc, p, uintptr(0), xStep, xFinal, xValue, xInverse, xDestroy) } -func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:168596:16: */ +func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr, nArg int32, eTextRep int32, p uintptr, xSFunc uintptr, xStep uintptr, xFinal uintptr) int32 { /* sqlite3.c:168630:16: */ var rc int32 var zFunc8 uintptr @@ -148523,7 +148755,7 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // SQL function that use this routine so that the functions will exist // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. -func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:168632:13: */ +func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:168666:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -148532,7 +148764,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs _ = NotUsed _ = NotUsed2 zErr = Xsqlite3_mprintf(tls, - ts+23636 /* "unable to use fu..." */, libc.VaList(bp, zName)) + ts+23805, libc.VaList(bp, zName)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } @@ -148547,7 +148779,7 @@ func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUs // should call this routine to make sure the global function exists. // A global function must exist in order for name resolution to work // properly. -func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:168658:16: */ +func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg int32) int32 { /* sqlite3.c:168692:16: */ var rc int32 var zCopy uintptr @@ -148573,7 +148805,7 @@ func Xsqlite3_overload_function(tls *libc.TLS, db uintptr, zName uintptr, nArg i // A NULL trace function means that no tracing is executes. A non-NULL // trace is a pointer to a function that is invoked at the start of each // SQL statement. -func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:168691:17: */ +func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uintptr { /* sqlite3.c:168725:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -148591,7 +148823,7 @@ func Xsqlite3_trace(tls *libc.TLS, db uintptr, xTrace uintptr, pArg uintptr) uin } // Register a trace callback using the version-2 interface. -func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:168712:16: */ +func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, pArg uintptr) int32 { /* sqlite3.c:168746:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if mTrace == uint32(0) { xTrace = uintptr(0) @@ -148612,7 +148844,7 @@ func Xsqlite3_trace_v2(tls *libc.TLS, db uintptr, mTrace uint32, xTrace uintptr, // A NULL profile function means that no profiling is executes. A non-NULL // profile is a pointer to a function that is invoked at the conclusion of // each SQL statement that is run. -func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:168742:17: */ +func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) uintptr { /* sqlite3.c:168776:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -148630,7 +148862,7 @@ func Xsqlite3_profile(tls *libc.TLS, db uintptr, xProfile uintptr, pArg uintptr) // Register a function to be invoked when a transaction commits. // If the invoked function returns non-zero, then the commit becomes a // rollback. -func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168772:17: */ +func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168806:17: */ var pOld uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -148643,7 +148875,7 @@ func Xsqlite3_commit_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168797:17: */ +func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168831:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -148656,7 +148888,7 @@ func Xsqlite3_update_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uin // Register a callback to be invoked each time a transaction is rolled // back by this database connection. -func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168822:17: */ +func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168856:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -148669,7 +148901,7 @@ func Xsqlite3_rollback_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg u // Register a callback to be invoked each time a row is updated, // inserted or deleted using this database connection. -func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168848:17: */ +func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168882:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpPreUpdateArg @@ -148681,7 +148913,7 @@ func Xsqlite3_preupdate_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg // Register a function to be invoked prior to each autovacuum that // determines the number of pages to vacuum. -func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:168868:16: */ +func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr, xDestructor uintptr) int32 { /* sqlite3.c:168902:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*Sqlite3)(unsafe.Pointer(db)).FxAutovacDestr})).f(tls, (*Sqlite3)(unsafe.Pointer(db)).FpAutovacPagesArg) @@ -148697,7 +148929,7 @@ func Xsqlite3_autovacuum_pages(tls *libc.TLS, db uintptr, xCallback uintptr, pAr // Invoke sqlite3_wal_checkpoint if the number of frames in the log file // is greater than sqlite3.pWalArg cast to an integer (the value configured by // wal_autocheckpoint()). -func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:168899:20: */ +func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb uintptr, nFrame int32) int32 { /* sqlite3.c:168933:20: */ if nFrame >= int32(pClientData) { Xsqlite3BeginBenignMalloc(tls) Xsqlite3_wal_checkpoint(tls, db, zDb) @@ -148715,7 +148947,7 @@ func Xsqlite3WalDefaultHook(tls *libc.TLS, pClientData uintptr, db uintptr, zDb // registered using sqlite3_wal_hook(). Likewise, registering a callback // using sqlite3_wal_hook() disables the automatic checkpoint mechanism // configured by this function. -func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:168925:16: */ +func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 { /* sqlite3.c:168959:16: */ if nFrame > 0 { Xsqlite3_wal_hook(tls, db, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) int32 @@ -148728,7 +148960,7 @@ func Xsqlite3_wal_autocheckpoint(tls *libc.TLS, db uintptr, nFrame int32) int32 // Register a callback to be invoked each time a transaction is written // into the write-ahead-log by this database connection. -func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168946:17: */ +func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintptr) uintptr { /* sqlite3.c:168980:17: */ var pRet uintptr Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pRet = (*Sqlite3)(unsafe.Pointer(db)).FpWalArg @@ -148739,7 +148971,7 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt } // Checkpoint database zDb. -func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:168973:16: */ +func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:169007:16: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -148768,7 +149000,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in } if iDb < 0 { rc = SQLITE_ERROR - Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23687 /* "unknown database..." */, libc.VaList(bp, zDb)) + Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, ts+23856, libc.VaList(bp, zDb)) } else { (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 rc = Xsqlite3Checkpoint(tls, db, iDb, eMode, pnLog, pnCkpt) @@ -148789,7 +149021,7 @@ func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode in // Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points // to contains a zero-length string, all attached databases are // checkpointed. -func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:169037:16: */ +func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:169071:16: */ // EVIDENCE-OF: R-41613-20553 The sqlite3_wal_checkpoint(D,X) is equivalent to // sqlite3_wal_checkpoint_v2(D,X,SQLITE_CHECKPOINT_PASSIVE,0,0). return Xsqlite3_wal_checkpoint_v2(tls, db, zDb, SQLITE_CHECKPOINT_PASSIVE, uintptr(0), uintptr(0)) @@ -148813,7 +149045,7 @@ func Xsqlite3_wal_checkpoint(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* // // Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL, RESTART // or TRUNCATE. -func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:169064:20: */ +func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:169098:20: */ var rc int32 = SQLITE_OK // Return code var i int32 // Used to iterate through attached dbs var bBusy int32 = 0 // True if SQLITE_BUSY has been encountered @@ -148855,19 +149087,19 @@ func Xsqlite3Checkpoint(tls *libc.TLS, db uintptr, iDb int32, eMode int32, pnLog // 2 2 memory (return 1) // 2 0 memory (return 1) // 3 any memory (return 1) -func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169110:20: */ +func Xsqlite3TempInMemory(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169144:20: */ return libc.Bool32(int32((*Sqlite3)(unsafe.Pointer(db)).Ftemp_store) == 2) } // Return UTF-8 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169131:23: */ +func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169165:23: */ var z uintptr if !(db != 0) { return Xsqlite3ErrStr(tls, SQLITE_NOMEM) } if !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 169137)) + return Xsqlite3ErrStr(tls, Xsqlite3MisuseError(tls, 169171)) } Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -148890,7 +149122,7 @@ func Xsqlite3_errmsg(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169131:23 // Return UTF-16 encoded English language explanation of the most recent // error. -func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169159:23: */ +func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169193:23: */ var z uintptr if !(db != 0) { return uintptr(uintptr(unsafe.Pointer(&outOfMem))) @@ -148919,18 +149151,18 @@ func Xsqlite3_errmsg16(tls *libc.TLS, db uintptr) uintptr { /* sqlite3.c:169159: var outOfMem = [14]U16{ U16('o'), U16('u'), U16('t'), U16(' '), U16('o'), U16('f'), U16(' '), U16('m'), U16('e'), U16('m'), U16('o'), U16('r'), U16('y'), U16(0), -} /* sqlite3.c:169160:20 */ +} /* sqlite3.c:169194:20 */ var misuse = [34]U16{ U16('b'), U16('a'), U16('d'), U16(' '), U16('p'), U16('a'), U16('r'), U16('a'), U16('m'), U16('e'), U16('t'), U16('e'), U16('r'), U16(' '), U16('o'), U16('r'), U16(' '), U16('o'), U16('t'), U16('h'), U16('e'), U16('r'), U16(' '), U16('A'), U16('P'), U16('I'), U16(' '), U16('m'), U16('i'), U16('s'), U16('u'), U16('s'), U16('e'), U16(0), -} /* sqlite3.c:169163:20 */ +} /* sqlite3.c:169197:20 */ // Return the most recent error code generated by an SQLite routine. If NULL is // passed to this function, we assume a malloc() failed during sqlite3_open(). -func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169201:16: */ +func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169235:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169203) + return Xsqlite3MisuseError(tls, 169237) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -148938,9 +149170,9 @@ func Xsqlite3_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169201:16: return (*Sqlite3)(unsafe.Pointer(db)).FerrCode & (*Sqlite3)(unsafe.Pointer(db)).FerrMask } -func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169210:16: */ +func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169244:16: */ if db != 0 && !(Xsqlite3SafetyCheckSickOrOk(tls, db) != 0) { - return Xsqlite3MisuseError(tls, 169212) + return Xsqlite3MisuseError(tls, 169246) } if !(db != 0) || (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { return SQLITE_NOMEM @@ -148948,7 +149180,7 @@ func Xsqlite3_extended_errcode(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1 return (*Sqlite3)(unsafe.Pointer(db)).FerrCode } -func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169219:16: */ +func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:169253:16: */ if db != 0 { return (*Sqlite3)(unsafe.Pointer(db)).FiSysErrno } @@ -148958,13 +149190,13 @@ func Xsqlite3_system_errno(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:16921 // Return a string that describes the kind of error specified in the // argument. For now, this simply calls the internal sqlite3ErrStr() // function. -func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169228:23: */ +func Xsqlite3_errstr(tls *libc.TLS, rc int32) uintptr { /* sqlite3.c:169262:23: */ return Xsqlite3ErrStr(tls, rc) } // Create a new collating function for database "db". The name is zName // and the encoding is enc. -func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:169236:12: */ +func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:169270:12: */ var pColl uintptr var enc2 int32 @@ -148977,7 +149209,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint enc2 = SQLITE_UTF16LE } if enc2 < SQLITE_UTF8 || enc2 > SQLITE_UTF16BE { - return Xsqlite3MisuseError(tls, 169260) + return Xsqlite3MisuseError(tls, 169294) } // Check if this call is removing or replacing an existing collation @@ -148987,7 +149219,7 @@ func createCollation(tls *libc.TLS, db uintptr, zName uintptr, enc U8, pCtx uint if pColl != 0 && (*CollSeq)(unsafe.Pointer(pColl)).FxCmp != 0 { if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeActive != 0 { Xsqlite3ErrorWithMsg(tls, db, SQLITE_BUSY, - ts+23708 /* "unable to delete..." */, 0) + ts+23877, 0) return SQLITE_BUSY } Xsqlite3ExpirePreparedStatements(tls, db, 0) @@ -149040,7 +149272,7 @@ var aHardLimit = [12]int32{ SQLITE_MAX_VARIABLE_NUMBER, // IMP: R-38091-32352 SQLITE_MAX_TRIGGER_DEPTH, SQLITE_MAX_WORKER_THREADS, -} /* sqlite3.c:169313:18 */ +} /* sqlite3.c:169347:18 */ // Make sure the hard limits are set to reasonable values @@ -149052,7 +149284,7 @@ var aHardLimit = [12]int32{ // A new lower limit does not shrink existing constructs. // It merely prevents new constructs that exceed the limit // from forming. -func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:169376:16: */ +func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) int32 { /* sqlite3.c:169410:16: */ var oldLimit int32 // EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME @@ -149067,6 +149299,8 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in 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 } *(*int32)(unsafe.Pointer(db + 112 + uintptr(limitId)*4)) = newLimit } @@ -149097,7 +149331,7 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // may be set to point to a buffer containing an English language error // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). -func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:169446:20: */ +func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:169482:20: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -149130,7 +149364,7 @@ func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags u if !((flags&uint32(SQLITE_OPEN_URI) != 0 || Xsqlite3Config.FbOpenUri != 0) && - nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+23776, uint32(5)) == 0) { + nUri >= 5 && libc.Xmemcmp(tls, zUri, ts+23945, uint32(5)) == 0) { goto __1 } // Input character index iOut = 0 // Output character index @@ -149178,10 +149412,10 @@ __8: goto __8 __9: ; - if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+23782, zUri+7, uint32(9)) != 0)) { + if !(iIn != 7 && (iIn != 16 || libc.Xmemcmp(tls, ts+23951, zUri+7, uint32(9)) != 0)) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23792, /* "invalid uri auth..." */ + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23961, libc.VaList(bp, iIn-7, zUri+7)) rc = SQLITE_ERROR goto parse_uri_out @@ -149303,7 +149537,7 @@ __27: zVal = zOpt + uintptr(nOpt+1) nVal = Xsqlite3Strlen30(tls, zVal) - if !(nOpt == 3 && libc.Xmemcmp(tls, ts+23820, zOpt, uint32(3)) == 0) { + if !(nOpt == 3 && libc.Xmemcmp(tls, ts+23989, zOpt, uint32(3)) == 0) { goto __29 } zVfs = zVal @@ -149314,17 +149548,17 @@ __29: mask = 0 limit = 0 - if !(nOpt == 5 && libc.Xmemcmp(tls, ts+23824, zOpt, uint32(5)) == 0) { + if !(nOpt == 5 && libc.Xmemcmp(tls, ts+23993, zOpt, uint32(5)) == 0) { goto __31 } mask = SQLITE_OPEN_SHAREDCACHE | SQLITE_OPEN_PRIVATECACHE aMode = uintptr(unsafe.Pointer(&aCacheMode)) limit = mask - zModeType = ts + 23824 /* "cache" */ + zModeType = ts + 23993 /* "cache" */ __31: ; - if !(nOpt == 4 && libc.Xmemcmp(tls, ts+23830, zOpt, uint32(4)) == 0) { + if !(nOpt == 4 && libc.Xmemcmp(tls, ts+23999, zOpt, uint32(4)) == 0) { goto __32 } @@ -149332,7 +149566,7 @@ __31: SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY aMode = uintptr(unsafe.Pointer(&aOpenMode)) limit = int32(uint32(mask) & flags) - zModeType = ts + 3210 /* "access" */ + zModeType = ts + 3232 /* "access" */ __32: ; @@ -149363,7 +149597,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23835 /* "no such %s mode:..." */, libc.VaList(bp+16, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24004, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -149371,7 +149605,7 @@ __38: if !(mode&libc.CplInt32(SQLITE_OPEN_MEMORY) > limit) { goto __39 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23855, /* "%s mode not allo..." */ + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24024, libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out @@ -149414,7 +149648,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23879 /* "no such vfs: %s" */, libc.VaList(bp+48, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+24048, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -149434,24 +149668,24 @@ __43: type OpenMode = struct { Fz uintptr Fmode int32 -} /* sqlite3.c:169588:9 */ +} /* sqlite3.c:169624:9 */ var aCacheMode = [3]OpenMode{ - {Fz: ts + 23895 /* "shared" */, Fmode: SQLITE_OPEN_SHAREDCACHE}, - {Fz: ts + 23902 /* "private" */, Fmode: SQLITE_OPEN_PRIVATECACHE}, + {Fz: ts + 24064, Fmode: SQLITE_OPEN_SHAREDCACHE}, + {Fz: ts + 24071, Fmode: SQLITE_OPEN_PRIVATECACHE}, {}, -} /* sqlite3.c:169597:34 */ +} /* sqlite3.c:169633:34 */ var aOpenMode = [5]OpenMode{ - {Fz: ts + 23910 /* "ro" */, Fmode: SQLITE_OPEN_READONLY}, - {Fz: ts + 23913 /* "rw" */, Fmode: SQLITE_OPEN_READWRITE}, - {Fz: ts + 23916 /* "rwc" */, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, - {Fz: ts + 17060 /* "memory" */, Fmode: SQLITE_OPEN_MEMORY}, + {Fz: ts + 24079, Fmode: SQLITE_OPEN_READONLY}, + {Fz: ts + 24082, Fmode: SQLITE_OPEN_READWRITE}, + {Fz: ts + 24085, Fmode: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE}, + {Fz: ts + 17229, Fmode: SQLITE_OPEN_MEMORY}, {}, -} /* sqlite3.c:169609:34 */ +} /* sqlite3.c:169645:34 */ // This routine does the core work of extracting URI parameters from a // database filename for the sqlite3_uri_parameter() interface. -func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:169683:19: */ +func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:169719:19: */ zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) for zFilename != uintptr(0) && *(*int8)(unsafe.Pointer(zFilename)) != 0 { var x int32 = libc.Xstrcmp(tls, zFilename, zParam) @@ -149467,7 +149701,7 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // This routine does the work of opening a database on behalf of // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. -func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:169701:12: */ +func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:169737:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*uint32)(unsafe.Pointer(bp + 8)) = flags @@ -149619,10 +149853,10 @@ __12: createCollation(tls, db, uintptr(unsafe.Pointer(&Xsqlite3StrBINARY)), uint8(SQLITE_UTF16LE), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{binCollFunc})), uintptr(0)) - createCollation(tls, db, ts+21466 /* "NOCASE" */, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+21635, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{nocaseCollatingFunc})), uintptr(0)) - createCollation(tls, db, ts+23920 /* "RTRIM" */, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + createCollation(tls, db, ts+24089, uint8(SQLITE_UTF8), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32 }{rtrimCollFunc})), uintptr(0)) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { @@ -149651,10 +149885,10 @@ __15: if !(int32(1)<<(*(*uint32)(unsafe.Pointer(bp + 8))&uint32(7))&0x46 == 0) { goto __16 } - rc = Xsqlite3MisuseError(tls, 169914) // IMP: R-18321-05872 + rc = Xsqlite3MisuseError(tls, 169950) // IMP: R-18321-05872 goto __17 __16: - rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8 /* &flags */, db, bp+12 /* &zOpen */, bp+16 /* &zErrMsg */) + rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8, db, bp+12, bp+16) __17: ; if !(rc != SQLITE_OK) { @@ -149668,7 +149902,7 @@ __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 16)) != 0 { - return ts + 3601 /* "%s" */ + return ts + 3623 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrMsg */)))) @@ -149706,9 +149940,9 @@ __22: // The default safety_level for the main database is FULL; for the temp // database it is OFF. This matches the pager layer defaults. - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6305 /* "main" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FzDbSName = ts + 6327 /* "main" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).Fsafety_level = U8(SQLITE_DEFAULT_SYNCHRONOUS + 1) - (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 22922 /* "temp" */ + (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).FzDbSName = ts + 23091 /* "temp" */ (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + 1*16)).Fsafety_level = U8(PAGER_SYNCHRONOUS_OFF) (*Sqlite3)(unsafe.Pointer(db)).FeOpenState = U8(SQLITE_STATE_OPEN) @@ -149732,7 +149966,9 @@ __24: if !(rc == SQLITE_OK && i < int32(uint32(unsafe.Sizeof(sqlite3BuiltinExtensions))/uint32(unsafe.Sizeof(uintptr(0))))) { goto __26 } - rc = (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + uintptr(i)*4)))(tls, db) + rc = (*struct { + f func(*libc.TLS, uintptr) int32 + })(unsafe.Pointer(&struct{ uintptr }{sqlite3BuiltinExtensions[i]})).f(tls, db) goto __25 __25: i++ @@ -149805,17 +150041,17 @@ __32: } // Open a new database handle. -func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:170036:16: */ +func Xsqlite3_open(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:170072:16: */ return openDatabase(tls, zFilename, ppDb, uint32(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE), uintptr(0)) } -func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:170043:16: */ +func Xsqlite3_open_v2(tls *libc.TLS, filename uintptr, ppDb uintptr, flags int32, zVfs uintptr) int32 { /* sqlite3.c:170079:16: */ return openDatabase(tls, filename, ppDb, uint32(flags), zVfs) } // Open a new database handle. -func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:170056:16: */ +func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* sqlite3.c:170092:16: */ var zFilename8 uintptr // zFilename encoded in UTF-8 instead of UTF-16 var pVal uintptr var rc int32 @@ -149826,7 +150062,7 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* return rc } if zFilename == uintptr(0) { - zFilename = ts + 23926 /* "\x00\x00" */ + zFilename = ts + 24095 /* "\x00\x00" */ } pVal = Xsqlite3ValueNew(tls, uintptr(0)) Xsqlite3ValueSetStr(tls, pVal, -1, zFilename, uint8(SQLITE_UTF16LE), uintptr(0)) @@ -149847,12 +150083,12 @@ func Xsqlite3_open16(tls *libc.TLS, zFilename uintptr, ppDb uintptr) int32 { /* } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:170095:16: */ +func Xsqlite3_create_collation(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:170131:16: */ return Xsqlite3_create_collation_v2(tls, db, zName, enc, pCtx, xCompare, uintptr(0)) } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:170108:16: */ +func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr, xDel uintptr) int32 { /* sqlite3.c:170144:16: */ var rc int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -149864,7 +150100,7 @@ func Xsqlite3_create_collation_v2(tls *libc.TLS, db uintptr, zName uintptr, enc } // Register a new collation sequence with the database handle db. -func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:170133:16: */ +func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc int32, pCtx uintptr, xCompare uintptr) int32 { /* sqlite3.c:170169:16: */ var rc int32 = SQLITE_OK var zName8 uintptr @@ -149882,7 +150118,7 @@ func Xsqlite3_create_collation16(tls *libc.TLS, db uintptr, zName uintptr, enc i // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:170163:16: */ +func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded uintptr) int32 { /* sqlite3.c:170199:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = xCollNeeded (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = uintptr(0) @@ -149893,7 +150129,7 @@ func Xsqlite3_collation_needed(tls *libc.TLS, db uintptr, pCollNeededArg uintptr // Register a collation sequence factory callback with the database handle // db. Replace any previously installed collation sequence factory. -func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:170184:16: */ +func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintptr, xCollNeeded16 uintptr) int32 { /* sqlite3.c:170220:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FxCollNeeded16 = xCollNeeded16 @@ -149904,7 +150140,7 @@ func Xsqlite3_collation_needed16(tls *libc.TLS, db uintptr, pCollNeededArg uintp // This function is now an anachronism. It used to be used to recover from a // malloc() failure, but SQLite now does this automatically. -func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:170206:16: */ +func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:170242:16: */ return SQLITE_OK } @@ -149912,7 +150148,7 @@ func Xsqlite3_global_recover(tls *libc.TLS) int32 { /* sqlite3.c:170206:16: */ // mode. Return TRUE if it is and FALSE if not. Autocommit mode is on // by default. Autocommit is disabled by a BEGIN statement and reenabled // by the next COMMIT or ROLLBACK. -func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170217:16: */ +func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170253:16: */ return int32((*Sqlite3)(unsafe.Pointer(db)).FautoCommit) } @@ -149925,28 +150161,28 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:170 // // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. -func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:170238:20: */ +func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:170274:20: */ bp := tls.Alloc(24) defer tls.Free(24) - Xsqlite3_log(tls, iErr, ts+23929, /* "%s at line %d of..." */ + Xsqlite3_log(tls, iErr, ts+24098, libc.VaList(bp, zType, lineno, uintptr(20)+Xsqlite3_sourceid(tls))) return iErr } -func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:170243:20: */ +func Xsqlite3CorruptError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:170279:20: */ - return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+23954 /* "database corrupt..." */) + return Xsqlite3ReportError(tls, SQLITE_CORRUPT, lineno, ts+24123) } -func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:170247:20: */ +func Xsqlite3MisuseError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:170283:20: */ - return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+23974 /* "misuse" */) + return Xsqlite3ReportError(tls, SQLITE_MISUSE, lineno, ts+24143) } -func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:170251:20: */ +func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:170287:20: */ - return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+23981 /* "cannot open file" */) + return Xsqlite3ReportError(tls, SQLITE_CANTOPEN, lineno, ts+24150) } // This is a convenience routine that makes sure that all thread-specific @@ -149954,12 +150190,12 @@ func Xsqlite3CantopenError(tls *libc.TLS, lineno int32) int32 { /* sqlite3.c:170 // // SQLite no longer uses thread-specific data so this routine is now a // no-op. It is retained for historical compatibility. -func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:170282:17: */ +func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:170318:17: */ } // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. -func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:170290:16: */ +func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:170326:16: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -149987,7 +150223,7 @@ func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, // Ensure the database schema has been loaded Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) - rc = Xsqlite3Init(tls, db, bp+24 /* &zErrMsg */) + rc = Xsqlite3Init(tls, db, bp+24) if !(SQLITE_OK != rc) { goto __1 } @@ -150073,7 +150309,7 @@ __4: autoinc = libc.Bool32(int32((*Table)(unsafe.Pointer(pTab)).FiPKey) == iCol && (*Table)(unsafe.Pointer(pTab)).FtabFlags&U32(TF_Autoincrement) != U32(0)) goto __13 __12: - zDataType = ts + 1090 /* "INTEGER" */ + zDataType = ts + 1112 /* "INTEGER" */ primarykey = 1 __13: ; @@ -150125,14 +150361,14 @@ __19: goto __20 } Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+23998 /* "no such table co..." */, libc.VaList(bp, zTableName, + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24167, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 24)) != 0 { - return ts + 3601 /* "%s" */ + return ts + 3623 /* "%s" */ } return uintptr(0) }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)))) @@ -150143,7 +150379,7 @@ __20: } // Sleep for a little while. Return the amount of time slept. -func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:170408:16: */ +func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:170444:16: */ var pVfs uintptr var rc int32 pVfs = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -150158,7 +150394,7 @@ func Xsqlite3_sleep(tls *libc.TLS, ms int32) int32 { /* sqlite3.c:170408:16: */ } // Enable or disable the extended result codes. -func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:170424:16: */ +func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int32 { /* sqlite3.c:170460:16: */ Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) (*Sqlite3)(unsafe.Pointer(db)).FerrMask = func() int32 { if onoff != 0 { @@ -150171,7 +150407,7 @@ func Xsqlite3_extended_result_codes(tls *libc.TLS, db uintptr, onoff int32) int3 } // Invoke the xFileControl method on a particular database. -func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:170437:16: */ +func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:170473:16: */ var rc int32 = SQLITE_ERROR var pBtree uintptr @@ -150216,7 +150452,7 @@ func Xsqlite3_file_control(tls *libc.TLS, db uintptr, zDbName uintptr, op int32, } // Interface to the testing logic. -func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:170487:16: */ +func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlite3.c:170523:16: */ var rc int32 = 0 var ap Va_list _ = ap @@ -150549,12 +150785,16 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit case SQLITE_TESTCTRL_IMPOSTER: { var db uintptr = libc.VaUintptr(&ap) + var iDb int32 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) - (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(Xsqlite3FindDbName(tls, db, libc.VaUintptr(&ap))) - (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(libc.AssignBitFieldPtr8Uint32(db+164+8, uint32(libc.VaInt32(&ap)), 1, 1, 0x2)) - (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum = Pgno(libc.VaInt32(&ap)) - if int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > Pgno(0) { - Xsqlite3ResetAllSchemasOfConnection(tls, db) + iDb = Xsqlite3FindDbName(tls, db, libc.VaUintptr(&ap)) + if iDb >= 0 { + (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(iDb) + (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(libc.AssignBitFieldPtr8Uint32(db+164+8, uint32(libc.VaInt32(&ap)), 1, 1, 0x2)) + (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum = Pgno(libc.VaInt32(&ap)) + if int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0 && (*Sqlite3)(unsafe.Pointer(db)).Finit.FnewTnum > Pgno(0) { + Xsqlite3ResetAllSchemasOfConnection(tls, db) + } } Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) break @@ -150638,7 +150878,7 @@ func Xsqlite3_test_control(tls *libc.TLS, op int32, va uintptr) int32 { /* sqlit // backwards for the first byte following four consecutive zero bytes. // // This only works if the filename passed in was obtained from the Pager. -func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:170941:19: */ +func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:170981:19: */ for int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-1)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-2)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-3)))) != 0 || int32(*(*int8)(unsafe.Pointer(zName + libc.UintptrFromInt32(-4)))) != 0 { zName-- } @@ -150647,7 +150887,7 @@ func databaseName(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:170941:19 // Append text z[] to the end of p[]. Return a pointer to the first // character after then zero terminator on the new text in p[]. -func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:170952:13: */ +func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:170992:13: */ var n Size_t = libc.Xstrlen(tls, z) libc.Xmemcpy(tls, p, z, n+Size_t(1)) return p + uintptr(n) + uintptr(1) @@ -150660,7 +150900,7 @@ func appendText(tls *libc.TLS, p uintptr, z uintptr) uintptr { /* sqlite3.c:1709 // // Memory layout must be compatible with that generated by the pager // and expected by sqlite3_uri_parameter() and databaseName(). -func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:170967:17: */ +func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr, zWal uintptr, nParam int32, azParam uintptr) uintptr { /* sqlite3.c:171007:17: */ var nByte Sqlite3_int64 var i int32 var pResult uintptr @@ -150691,7 +150931,7 @@ func Xsqlite3_create_filename(tls *libc.TLS, zDatabase uintptr, zJournal uintptr // Free memory obtained from sqlite3_create_filename(). It is a severe // error to call this routine with any parameter other than a pointer // previously obtained from sqlite3_create_filename() or a NULL pointer. -func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:171003:17: */ +func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:171043:17: */ if p == uintptr(0) { return } @@ -150708,7 +150948,7 @@ func Xsqlite3_free_filename(tls *libc.TLS, p uintptr) { /* sqlite3.c:171003:17: // query parameter we seek. This routine returns the value of the zParam // parameter if it exists. If the parameter does not exist, this routine // returns a NULL pointer. -func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171021:23: */ +func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* sqlite3.c:171061:23: */ if zFilename == uintptr(0) || zParam == uintptr(0) { return uintptr(0) } @@ -150717,7 +150957,7 @@ func Xsqlite3_uri_parameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) ui } // Return a pointer to the name of Nth query parameter of the filename. -func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:171030:23: */ +func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sqlite3.c:171070:23: */ if zFilename == uintptr(0) || N < 0 { return uintptr(0) } @@ -150734,7 +150974,7 @@ func Xsqlite3_uri_key(tls *libc.TLS, zFilename uintptr, N int32) uintptr { /* sq } // Return a boolean value for a query parameter. -func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:171044:16: */ +func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt int32) int32 { /* sqlite3.c:171084:16: */ var z uintptr = Xsqlite3_uri_parameter(tls, zFilename, zParam) bDflt = libc.Bool32(bDflt != 0) if z != 0 { @@ -150744,7 +150984,7 @@ func Xsqlite3_uri_boolean(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDfl } // Return a 64-bit integer value for a query parameter. -func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:171053:26: */ +func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:171093:26: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -150765,14 +151005,14 @@ func Xsqlite3_uri_int64(tls *libc.TLS, zFilename uintptr, zParam uintptr, bDflt // passing free() a pointer that was not obtained from malloc() - it is // an error that we cannot easily detect but that will likely cause memory // corruption. -func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:171076:23: */ +func Xsqlite3_filename_database(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:171116:23: */ if zFilename == uintptr(0) { return uintptr(0) } return databaseName(tls, zFilename) } -func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:171080:23: */ +func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:171120:23: */ if zFilename == uintptr(0) { return uintptr(0) } @@ -150785,7 +151025,7 @@ func Xsqlite3_filename_journal(tls *libc.TLS, zFilename uintptr) uintptr { /* sq return zFilename + uintptr(1) } -func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:171090:23: */ +func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite3.c:171130:23: */ zFilename = Xsqlite3_filename_journal(tls, zFilename) if zFilename != 0 { zFilename += uintptr(Xsqlite3Strlen30(tls, zFilename) + 1) @@ -150794,7 +151034,7 @@ func Xsqlite3_filename_wal(tls *libc.TLS, zFilename uintptr) uintptr { /* sqlite } // Return the Btree pointer identified by zDbName. Return NULL if not found. -func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:171103:22: */ +func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:171143:22: */ var iDb int32 if zDbName != 0 { iDb = Xsqlite3FindDbName(tls, db, zDbName) @@ -150809,7 +151049,7 @@ func Xsqlite3DbNameToBtree(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return the filename of the database associated with a database // connection. -func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:171112:23: */ +func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { /* sqlite3.c:171152:23: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -150820,7 +151060,7 @@ func Xsqlite3_db_filename(tls *libc.TLS, db uintptr, zDbName uintptr) uintptr { // Return 1 if database is read-only or 0 if read/write. Return -1 if // no such database exists. -func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:171128:16: */ +func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* sqlite3.c:171168:16: */ var pBt uintptr pBt = Xsqlite3DbNameToBtree(tls, db, zDbName) if pBt != 0 { @@ -150831,7 +151071,7 @@ func Xsqlite3_db_readonly(tls *libc.TLS, db uintptr, zDbName uintptr) int32 { /* // Obtain a snapshot handle for the snapshot of database zDb currently // being read by handle db. -func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:171145:16: */ +func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot uintptr) int32 { /* sqlite3.c:171185:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150854,7 +151094,7 @@ func Xsqlite3_snapshot_get(tls *libc.TLS, db uintptr, zDb uintptr, ppSnapshot ui } // Open a read-transaction on the snapshot idendified by pSnapshot. -func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:171181:16: */ +func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot uintptr) int32 { /* sqlite3.c:171221:16: */ var rc int32 = SQLITE_ERROR Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -150897,7 +151137,7 @@ func Xsqlite3_snapshot_open(tls *libc.TLS, db uintptr, zDb uintptr, pSnapshot ui // Recover as many snapshots as possible from the wal file associated with // schema zDb of database db. -func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:171237:16: */ +func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:171277:16: */ var rc int32 = SQLITE_ERROR var iDb int32 @@ -150918,7 +151158,7 @@ func Xsqlite3_snapshot_recover(tls *libc.TLS, db uintptr, zDb uintptr) int32 { / } // Free a snapshot handle obtained from sqlite3_snapshot_get(). -func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:171268:17: */ +func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:171308:17: */ Xsqlite3_free(tls, pSnapshot) } @@ -150927,7 +151167,7 @@ func Xsqlite3_snapshot_free(tls *libc.TLS, pSnapshot uintptr) { /* sqlite3.c:171 // // The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix // is not required for a match. -func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:171281:16: */ +func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sqlite3.c:171321:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -150937,9 +151177,9 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql var azCompileOpt uintptr - azCompileOpt = Xsqlite3CompileOptions(tls, bp /* &nOpt */) + azCompileOpt = Xsqlite3CompileOptions(tls, bp) - if Xsqlite3_strnicmp(tls, zOptName, ts+24026, 7) == 0 { + if Xsqlite3_strnicmp(tls, zOptName, ts+24195, 7) == 0 { zOptName += uintptr(7) } n = Xsqlite3Strlen30(tls, zOptName) @@ -150957,14 +151197,14 @@ func Xsqlite3_compileoption_used(tls *libc.TLS, zOptName uintptr) int32 { /* sql // Return the N-th compile-time option string. If N is out of range, // return a NULL pointer. -func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:171314:23: */ +func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:171354:23: */ bp := tls.Alloc(4) defer tls.Free(4) // var nOpt int32 at bp, 4 var azCompileOpt uintptr - azCompileOpt = Xsqlite3CompileOptions(tls, bp /* &nOpt */) + azCompileOpt = Xsqlite3CompileOptions(tls, bp) if N >= 0 && N < *(*int32)(unsafe.Pointer(bp)) { return *(*uintptr)(unsafe.Pointer(azCompileOpt + uintptr(N)*4)) } @@ -151002,11 +151242,11 @@ func Xsqlite3_compileoption_get(tls *libc.TLS, N int32) uintptr { /* sqlite3.c:1 // for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection // is not NULL. This variable may only accessed while the STATIC_MAIN // mutex is held. -var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:171366:16 */ +var sqlite3BlockedList uintptr = uintptr(0) /* sqlite3.c:171406:16 */ // Remove connection db from the blocked connections list. If connection // db is not currently a part of the list, this function is a no-op. -func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:171409:13: */ +func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:171449:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = *(*uintptr)(unsafe.Pointer(pp)) + 548 { @@ -151019,7 +151259,7 @@ func removeFromBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:171409:13: // Add connection db to the blocked connections list. It is assumed // that it is not already a part of the list. -func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:171424:13: */ +func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:171464:13: */ var pp uintptr for pp = uintptr(unsafe.Pointer(&sqlite3BlockedList)); *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*Sqlite3)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FxUnlockNotify != (*Sqlite3)(unsafe.Pointer(db)).FxUnlockNotify; pp = *(*uintptr)(unsafe.Pointer(pp)) + 548 { @@ -151029,13 +151269,13 @@ func addToBlockedList(tls *libc.TLS, db uintptr) { /* sqlite3.c:171424:13: */ } // Obtain the STATIC_MAIN mutex. -func enterMutex(tls *libc.TLS) { /* sqlite3.c:171439:13: */ +func enterMutex(tls *libc.TLS) { /* sqlite3.c:171479:13: */ Xsqlite3_mutex_enter(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } // Release the STATIC_MAIN mutex. -func leaveMutex(tls *libc.TLS) { /* sqlite3.c:171447:13: */ +func leaveMutex(tls *libc.TLS) { /* sqlite3.c:171487:13: */ Xsqlite3_mutex_leave(tls, Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN)) } @@ -151059,7 +151299,7 @@ func leaveMutex(tls *libc.TLS) { /* sqlite3.c:171447:13: */ // Each call to this routine overrides any prior callbacks registered // on the same "db". If xNotify==0 then any prior callbacks are immediately // cancelled. -func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:171474:16: */ +func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uintptr) int32 { /* sqlite3.c:171514:16: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp)) = pArg @@ -151102,7 +151342,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { if rc != 0 { - return ts + 24034 /* "database is dead..." */ + return ts + 24203 /* "database is dead..." */ } return uintptr(0) }(), 0) @@ -151114,7 +151354,7 @@ func Xsqlite3_unlock_notify(tls *libc.TLS, db uintptr, xNotify uintptr, pArg uin // associated with connection db. The operation will return SQLITE_LOCKED // to the user because it requires a lock that will not be available // until connection pBlocker concludes its current transaction. -func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:171524:21: */ +func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* sqlite3.c:171564:21: */ enterMutex(tls) if (*Sqlite3)(unsafe.Pointer(db)).FpBlockingConnection == uintptr(0) && (*Sqlite3)(unsafe.Pointer(db)).FpUnlockConnection == uintptr(0) { addToBlockedList(tls, db) @@ -151140,7 +151380,7 @@ func Xsqlite3ConnectionBlocked(tls *libc.TLS, db uintptr, pBlocker uintptr) { /* // 3) If the two steps above mean that pBlockingConnection==0 and // pUnlockConnection==0, remove the entry from the blocked connections // list. -func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:171552:21: */ +func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:171592:21: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -151244,7 +151484,7 @@ func Xsqlite3ConnectionUnlocked(tls *libc.TLS, db uintptr) { /* sqlite3.c:171552 // This is called when the database connection passed as an argument is // being closed. The connection is removed from the blocked list. -func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:171651:21: */ +func Xsqlite3ConnectionClosed(tls *libc.TLS, db uintptr) { /* sqlite3.c:171691:21: */ Xsqlite3ConnectionUnlocked(tls, db) enterMutex(tls) removeFromBlockedList(tls, db) @@ -151861,7 +152101,7 @@ var jsonIsSpace = [256]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:191253:19 */ +} /* sqlite3.c:191293:19 */ // Some of the testcase() macros in this file are problematic for gcov // in that they generate false-miss errors randomly. This is a gcov problem, @@ -151878,7 +152118,7 @@ type JsonString1 = struct { FbErr U8 FzSpace [100]int8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:191310:9 */ +} /* sqlite3.c:191350:9 */ // Some of the testcase() macros in this file are problematic for gcov // in that they generate false-miss errors randomly. This is a gcov problem, @@ -151886,7 +152126,7 @@ type JsonString1 = struct { // problematic test cases for production builds. // Objects -type JsonString = JsonString1 /* sqlite3.c:191310:27 */ +type JsonString = JsonString1 /* sqlite3.c:191350:27 */ type JsonNode1 = struct { FeType U8 FjnFlags U8 @@ -151894,9 +152134,9 @@ type JsonNode1 = struct { F__ccgo_pad1 [1]byte Fn U32 Fu struct{ FzJContent uintptr } -} /* sqlite3.c:191311:9 */ +} /* sqlite3.c:191351:9 */ -type JsonNode = JsonNode1 /* sqlite3.c:191311:25 */ +type JsonNode = JsonNode1 /* sqlite3.c:191351:25 */ type JsonParse1 = struct { FnNode U32 FnAlloc U32 @@ -151908,9 +152148,9 @@ type JsonParse1 = struct { FiDepth U16 FnJson int32 FiHold U32 -} /* sqlite3.c:191312:9 */ +} /* sqlite3.c:191352:9 */ -type JsonParse = JsonParse1 /* sqlite3.c:191312:26 */ +type JsonParse = JsonParse1 /* sqlite3.c:191352:26 */ // JSON type values @@ -151918,8 +152158,8 @@ type JsonParse = JsonParse1 /* sqlite3.c:191312:26 */ // Names of the various JSON types: var jsonType = [8]uintptr{ - ts + 6105 /* "null" */, ts + 6617 /* "true" */, ts + 6622 /* "false" */, ts + 6115 /* "integer" */, ts + 6110 /* "real" */, ts + 7872 /* "text" */, ts + 24057 /* "array" */, ts + 24063, /* "object" */ -} /* sqlite3.c:191345:19 */ + ts + 6127, ts + 6639, ts + 6644, ts + 6137, ts + 6132, ts + 7894, ts + 24226, ts + 24232, +} /* sqlite3.c:191385:19 */ // Maximum nesting depth of JSON for this implementation. // @@ -151933,7 +152173,7 @@ var jsonType = [8]uintptr{ // // Set the JsonString object to an empty string -func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:191406:13: */ +func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:191446:13: */ (*JsonString)(unsafe.Pointer(p)).FzBuf = p + 26 /* &.zSpace */ (*JsonString)(unsafe.Pointer(p)).FnAlloc = U64(unsafe.Sizeof([100]int8{})) (*JsonString)(unsafe.Pointer(p)).FnUsed = uint64(0) @@ -151941,7 +152181,7 @@ func jsonZero(tls *libc.TLS, p uintptr) { /* sqlite3.c:191406:13: */ } // Initialize the JsonString object -func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:191415:13: */ +func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:191455:13: */ (*JsonString)(unsafe.Pointer(p)).FpCtx = pCtx (*JsonString)(unsafe.Pointer(p)).FbErr = U8(0) jsonZero(tls, p) @@ -151949,7 +152189,7 @@ func jsonInit(tls *libc.TLS, p uintptr, pCtx uintptr) { /* sqlite3.c:191415:13: // Free all allocated memory and reset the JsonString object back to its // initial state. -func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:191425:13: */ +func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:191465:13: */ if !(int32((*JsonString)(unsafe.Pointer(p)).FbStatic) != 0) { Xsqlite3_free(tls, (*JsonString)(unsafe.Pointer(p)).FzBuf) } @@ -151957,7 +152197,7 @@ func jsonReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:191425:13: */ } // Report an out-of-memory (OOM) condition -func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:191433:13: */ +func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:191473:13: */ (*JsonString)(unsafe.Pointer(p)).FbErr = U8(1) Xsqlite3_result_error_nomem(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx) jsonReset(tls, p) @@ -151965,7 +152205,7 @@ func jsonOom(tls *libc.TLS, p uintptr) { /* sqlite3.c:191433:13: */ // Enlarge pJson->zBuf so that it can hold at least N more bytes. // Return zero on success. Return non-zero on an OOM error -func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:191442:12: */ +func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:191482:12: */ var nTotal U64 if U64(N) < (*JsonString)(unsafe.Pointer(p)).FnAlloc { nTotal = (*JsonString)(unsafe.Pointer(p)).FnAlloc * uint64(2) @@ -151998,7 +152238,7 @@ func jsonGrow(tls *libc.TLS, p uintptr, N U32) int32 { /* sqlite3.c:191442:12: * } // Append N bytes from zIn onto the end of the JsonString string. -func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:191469:13: */ +func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:191509:13: */ if N == U32(0) { return } @@ -152010,7 +152250,7 @@ func jsonAppendRaw(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c: } // Append formatted text (not to exceed N bytes) to the JsonString. -func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:191478:13: */ +func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:191518:13: */ var ap Va_list _ = ap if (*JsonString)(unsafe.Pointer(p)).FnUsed+U64(N) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(N)) != 0 { @@ -152023,7 +152263,7 @@ func jsonPrintf(tls *libc.TLS, N int32, p uintptr, zFormat uintptr, va uintptr) } // Append a single character -func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:191489:13: */ +func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:191529:13: */ if (*JsonString)(unsafe.Pointer(p)).FnUsed >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, uint32(1)) != 0 { return } @@ -152032,7 +152272,7 @@ func jsonAppendChar(tls *libc.TLS, p uintptr, c int8) { /* sqlite3.c:191489:13: // Append a comma separator to the output buffer, if the previous // character is not '[' or '{'. -func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:191497:13: */ +func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:191537:13: */ var c int8 if (*JsonString)(unsafe.Pointer(p)).FnUsed == uint64(0) { return @@ -152047,7 +152287,7 @@ func jsonAppendSeparator(tls *libc.TLS, p uintptr) { /* sqlite3.c:191497:13: */ // under construction. Enclose the string in "..." and escape // any double-quotes or backslash characters contained within the // string. -func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:191509:13: */ +func jsonAppendString(tls *libc.TLS, p uintptr, zIn uintptr, N U32) { /* sqlite3.c:191549:13: */ var i U32 var c uint8 if !(zIn == uintptr(0) || U64(N)+(*JsonString)(unsafe.Pointer(p)).FnUsed+uint64(2) >= (*JsonString)(unsafe.Pointer(p)).FnAlloc && jsonGrow(tls, p, N+U32(2)) != 0) { @@ -152098,7 +152338,7 @@ __10: *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0') *(*int8)(unsafe.Pointer((*JsonString)(unsafe.Pointer(p)).FzBuf + uintptr(libc.PostIncUint64(&(*JsonString)(unsafe.Pointer(p)).FnUsed, 1)))) = int8('0' + int32(c)>>4) - c = uint8(*(*int8)(unsafe.Pointer(ts + 24070 /* "0123456789abcdef" */ + uintptr(int32(c)&0xf)))) + c = uint8(*(*int8)(unsafe.Pointer(ts + 24239 + uintptr(int32(c)&0xf)))) __8: ; __6: @@ -152118,15 +152358,15 @@ __4: var aSpecial = [32]int8{ int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8('b'), int8('t'), int8('n'), int8(0), int8('f'), int8('r'), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), int8(0), -} /* sqlite3.c:191520:25 */ +} /* sqlite3.c:191560:25 */ // Append a function parameter value to the JSON string under // construction. -func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:191552:13: */ +func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:191592:13: */ switch Xsqlite3_value_type(tls, pValue) { case SQLITE_NULL: { - jsonAppendRaw(tls, p, ts+6105 /* "null" */, uint32(4)) + jsonAppendRaw(tls, p, ts+6127, uint32(4)) break } @@ -152155,7 +152395,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 default: { if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { - Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24087 /* "JSON cannot hold..." */, -1) + Xsqlite3_result_error(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, ts+24256, -1) (*JsonString)(unsafe.Pointer(p)).FbErr = U8(2) jsonReset(tls, p) } @@ -152166,7 +152406,7 @@ func jsonAppendValue(tls *libc.TLS, p uintptr, pValue uintptr) { /* sqlite3.c:19 } // Make the JSON in p the result of the SQL function. -func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:191592:13: */ +func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:191632:13: */ if int32((*JsonString)(unsafe.Pointer(p)).FbErr) == 0 { Xsqlite3_result_text64(tls, (*JsonString)(unsafe.Pointer(p)).FpCtx, (*JsonString)(unsafe.Pointer(p)).FzBuf, (*JsonString)(unsafe.Pointer(p)).FnUsed, func() uintptr { @@ -152193,7 +152433,7 @@ func jsonResult(tls *libc.TLS, p uintptr) { /* sqlite3.c:191592:13: */ // Appended elements are not counted. The value returned is the number // by which the JsonNode counter should increment in order to go to the // next peer value. -func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:191615:12: */ +func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:191655:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FeType) >= JSON_ARRAY { return (*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1) } @@ -152202,7 +152442,7 @@ func jsonNodeSize(tls *libc.TLS, pNode uintptr) U32 { /* sqlite3.c:191615:12: */ // Reclaim all memory allocated by a JsonParse object. But do not // delete the JsonParse object itself. -func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:191623:13: */ +func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:191663:13: */ Xsqlite3_free(tls, (*JsonParse)(unsafe.Pointer(pParse)).FaNode) (*JsonParse)(unsafe.Pointer(pParse)).FaNode = uintptr(0) (*JsonParse)(unsafe.Pointer(pParse)).FnNode = U32(0) @@ -152212,7 +152452,7 @@ func jsonParseReset(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:191623:13: */ } // Free a JsonParse object that was obtained from sqlite3_malloc(). -func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:191635:13: */ +func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:191675:13: */ jsonParseReset(tls, pParse) Xsqlite3_free(tls, pParse) } @@ -152220,7 +152460,7 @@ func jsonParseFree(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:191635:13: */ // Convert the JsonNode pNode into a pure JSON string and // append to pOut. Subsubstructure is also included. Return // the number of JsonNode objects that are encoded. -func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:191645:13: */ +func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr) { /* sqlite3.c:191685:13: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&(JNODE_REPLACE|JNODE_PATCH) != 0 { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_REPLACE != 0 && aReplace != uintptr(0) { @@ -152235,19 +152475,19 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr default: { - jsonAppendRaw(tls, pOut, ts+6105 /* "null" */, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6127, uint32(4)) break } case JSON_TRUE: { - jsonAppendRaw(tls, pOut, ts+6617 /* "true" */, uint32(4)) + jsonAppendRaw(tls, pOut, ts+6639, uint32(4)) break } case JSON_FALSE: { - jsonAppendRaw(tls, pOut, ts+6622 /* "false" */, uint32(5)) + jsonAppendRaw(tls, pOut, ts+6644, uint32(5)) break } @@ -152322,29 +152562,29 @@ func jsonRenderNode(tls *libc.TLS, pNode uintptr, pOut uintptr, aReplace uintptr } // Return a JsonNode and all its descendents as a JSON string. -func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:191734:13: */ +func jsonReturnJson(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:191774:13: */ bp := tls.Alloc(128) defer tls.Free(128) // var s JsonString at bp, 128 - jsonInit(tls, bp /* &s */, pCtx) - jsonRenderNode(tls, pNode, bp /* &s */, aReplace) - jsonResult(tls, bp /* &s */) + jsonInit(tls, bp, pCtx) + jsonRenderNode(tls, pNode, bp, aReplace) + jsonResult(tls, bp) Xsqlite3_result_subtype(tls, pCtx, uint32(JSON_SUBTYPE)) } // Translate a single byte of Hex into an integer. // This routine only works if h really is a valid hexadecimal // character: 0..9a..fA..F -func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:191751:11: */ +func jsonHexToInt(tls *libc.TLS, h int32) U8 { /* sqlite3.c:191791:11: */ h = h + 9*(1&(h>>6)) return U8(h & 0xf) } // Convert a 4-byte hex string into an integer -func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:191764:12: */ +func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:191804:12: */ var v U32 v = U32(int32(jsonHexToInt(tls, int32(*(*int8)(unsafe.Pointer(z)))))<<12 + @@ -152355,7 +152595,7 @@ func jsonHexToInt4(tls *libc.TLS, z uintptr) U32 { /* sqlite3.c:191764:12: */ } // Make the JsonNode the return value of the function. -func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:191780:13: */ +func jsonReturn(tls *libc.TLS, pNode uintptr, pCtx uintptr, aReplace uintptr) { /* sqlite3.c:191820:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -152478,7 +152718,7 @@ int_as_real: __6: ; z1 = *(*uintptr)(unsafe.Pointer(pNode + 8)) - Xsqlite3AtoF(tls, z1, bp /* &r */, Xsqlite3Strlen30(tls, z1), uint8(SQLITE_UTF8)) + Xsqlite3AtoF(tls, z1, bp, Xsqlite3Strlen30(tls, z1), uint8(SQLITE_UTF8)) Xsqlite3_result_double(tls, pCtx, *(*float64)(unsafe.Pointer(bp /* r */))) goto __1 @@ -152636,7 +152876,7 @@ __1: // A macro to hint to the compiler that a function should not be // inlined. -func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:191953:26: */ +func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:191993:26: */ var nNew U32 var pNew uintptr @@ -152658,7 +152898,7 @@ func jsonParseAddNodeExpand(tls *libc.TLS, pParse uintptr, eType U32, n U32, zCo // Create a new JsonNode instance based on the arguments and append that // instance to the JsonParse. Return the index in pParse->aNode[] of the // new node, or -1 if a memory allocation fails. -func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:191980:12: */ +func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent uintptr) int32 { /* sqlite3.c:192020:12: */ var p uintptr if (*JsonParse)(unsafe.Pointer(pParse)).FaNode == uintptr(0) || (*JsonParse)(unsafe.Pointer(pParse)).FnNode >= (*JsonParse)(unsafe.Pointer(pParse)).FnAlloc { return jsonParseAddNodeExpand(tls, pParse, eType, n, zContent) @@ -152673,7 +152913,7 @@ func jsonParseAddNode(tls *libc.TLS, pParse uintptr, eType U32, n U32, zContent } // Return true if z[] begins with 4 (or more) hexadecimal digits -func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:192002:12: */ +func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:192042:12: */ var i int32 for i = 0; i < 4; i++ { if !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i))))])&0x08 != 0) { @@ -152689,7 +152929,7 @@ func jsonIs4Hex(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:192002:12: */ // Return negative for a syntax error. Special cases: return -2 if the // first non-whitespace character is '}' and return -3 if the first // non-whitespace character is ']'. -func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:192016:12: */ +func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:192056:12: */ var c int8 var j U32 var iThis int32 @@ -152823,17 +153063,17 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 } return int32(j + U32(1)) } else if int32(c) == 'n' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6105, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6127, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(4)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) return int32(i + U32(4)) } else if int32(c) == 't' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6617, uint32(4)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6639, uint32(4)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(4)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_TRUE), uint32(0), uintptr(0)) return int32(i + U32(4)) } else if int32(c) == 'f' && - libc.Xstrncmp(tls, z+uintptr(i), ts+6622, uint32(5)) == 0 && + libc.Xstrncmp(tls, z+uintptr(i), ts+6644, uint32(5)) == 0 && !(int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr(i+U32(5)))))])&0x06 != 0) { jsonParseAddNode(tls, pParse, uint32(JSON_FALSE), uint32(0), uintptr(0)) return int32(i + U32(5)) @@ -152916,7 +153156,7 @@ func jsonParseValue(tls *libc.TLS, pParse uintptr, i U32) int32 { /* sqlite3.c:1 // pParse. // // pParse is uninitialized when this routine is called. -func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:192177:12: */ +func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 { /* sqlite3.c:192217:12: */ var i int32 libc.Xmemset(tls, pParse, 0, uint32(unsafe.Sizeof(JsonParse{}))) if zJson == uintptr(0) { @@ -152941,7 +153181,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 if (*JsonParse)(unsafe.Pointer(pParse)).Foom != 0 { Xsqlite3_result_error_nomem(tls, pCtx) } else { - Xsqlite3_result_error(tls, pCtx, ts+24116 /* "malformed JSON" */, -1) + Xsqlite3_result_error(tls, pCtx, ts+24285, -1) } } jsonParseReset(tls, pParse) @@ -152952,7 +153192,7 @@ func jsonParse(tls *libc.TLS, pParse uintptr, pCtx uintptr, zJson uintptr) int32 // Mark node i of pParse as being a child of iParent. Call recursively // to fill in all the descendants of node i. -func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:192210:13: */ +func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) { /* sqlite3.c:192250:13: */ var pNode uintptr = (*JsonParse)(unsafe.Pointer(pParse)).FaNode + uintptr(i)*12 var j U32 *(*U32)(unsafe.Pointer((*JsonParse)(unsafe.Pointer(pParse)).FaUp + uintptr(i)*4)) = iParent @@ -152983,7 +153223,7 @@ func jsonParseFillInParentage(tls *libc.TLS, pParse uintptr, i U32, iParent U32) } // Compute the parentage of all nodes in a completed parse. -func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:192237:12: */ +func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:192277:12: */ var aUp uintptr aUp = libc.AssignPtrUintptr(pParse+16, Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(U32(0)))*(*JsonParse)(unsafe.Pointer(pParse)).FnNode))) @@ -153003,7 +153243,7 @@ func jsonParseFindParents(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:19 // is no longer valid, parse the JSON again and return the new parse, // and also register the new parse so that it will be available for // future sqlite3_get_auxdata() calls. -func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:192263:18: */ +func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) uintptr { /* sqlite3.c:192303:18: */ var zJson uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) var nJson int32 = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv))) var p uintptr @@ -153060,7 +153300,7 @@ func jsonParseCached(tls *libc.TLS, pCtx uintptr, argv uintptr, pErrCtx uintptr) // Compare the OBJECT label at pNode against zKey,nKey. Return true on // a match. -func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:192325:12: */ +func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int32 { /* sqlite3.c:192365:12: */ if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_RAW != 0 { if (*JsonNode)(unsafe.Pointer(pNode)).Fn != nKey { @@ -153083,7 +153323,7 @@ func jsonLabelCompare(tls *libc.TLS, pNode uintptr, zKey uintptr, nKey U32) int3 // If pApnd!=0, then try to append new nodes to complete zPath if it is // possible to do so and if no existing node corresponds to zPath. If // new nodes are appended *pApnd is set to 1. -func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:192348:17: */ +func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:192388:17: */ var i U32 var j U32 var nKey U32 @@ -153258,7 +153498,7 @@ func jsonLookupStep(tls *libc.TLS, pParse uintptr, iRoot U32, zPath uintptr, pAp // Append content to pParse that will complete zPath. Return a pointer // to the inserted node, or return NULL if the append fails. -func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:192500:17: */ +func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pzErr uintptr) uintptr { /* sqlite3.c:192540:17: */ *(*int32)(unsafe.Pointer(pApnd)) = 1 if int32(*(*int8)(unsafe.Pointer(zPath))) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_NULL), uint32(0), uintptr(0)) @@ -153269,7 +153509,7 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt } if int32(*(*int8)(unsafe.Pointer(zPath))) == '.' { jsonParseAddNode(tls, pParse, uint32(JSON_OBJECT), uint32(0), uintptr(0)) - } else if libc.Xstrncmp(tls, zPath, ts+24131, uint32(3)) == 0 { + } else if libc.Xstrncmp(tls, zPath, ts+24300, uint32(3)) == 0 { jsonParseAddNode(tls, pParse, uint32(JSON_ARRAY), uint32(0), uintptr(0)) } else { return uintptr(0) @@ -153282,11 +153522,11 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). -func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:192526:13: */ +func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:192566:13: */ bp := tls.Alloc(8) defer tls.Free(8) - return Xsqlite3_mprintf(tls, ts+24135 /* "JSON path error ..." */, libc.VaList(bp, zErr)) + return Xsqlite3_mprintf(tls, ts+24304, libc.VaList(bp, zErr)) } // Do a node lookup using zPath. Return a pointer to the node on success. @@ -153297,7 +153537,7 @@ func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:192 // // If pApnd!=NULL then try to append missing nodes and set *pApnd = 1 if // nodes are appended. -func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:192540:17: */ +func jsonLookup(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintptr, pCtx uintptr) uintptr { /* sqlite3.c:192580:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -153322,7 +153562,7 @@ __1: __2: ; zPath++ - pNode = jsonLookupStep(tls, pParse, uint32(0), zPath, pApnd, bp /* &zErr */) + pNode = jsonLookupStep(tls, pParse, uint32(0), zPath, pApnd, bp) if !(*(*uintptr)(unsafe.Pointer(bp)) == uintptr(0)) { goto __3 } @@ -153349,18 +153589,18 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). -func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:192577:13: */ +func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:192617:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24161, /* "json_%s() needs ..." */ + var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24330, libc.VaList(bp, zFuncName)) Xsqlite3_result_error(tls, pCtx, zMsg, -1) Xsqlite3_free(tls, zMsg) } // Mark all NULL entries in the Object passed in as JNODE_REMOVE. -func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:192590:13: */ +func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:192630:13: */ var i int32 var n int32 @@ -153391,7 +153631,7 @@ func jsonRemoveAllNulls(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:192590:13: // corresponding to the SQL value input. Mostly this means putting // double-quotes around strings and returning the unquoted string "null" // when given a NULL input. -func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192679:13: */ +func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192719:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153399,30 +153639,30 @@ func jsonQuoteFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq _ = argc - jsonInit(tls, bp /* &jx */, ctx) - jsonAppendValue(tls, bp /* &jx */, *(*uintptr)(unsafe.Pointer(argv))) - jsonResult(tls, bp /* &jx */) + jsonInit(tls, bp, ctx) + jsonAppendValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv))) + jsonResult(tls, bp) Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } // Implementation of the json_array(VALUE,...) function. Return a JSON // array that contains all values given in arguments. Or if any argument // is a BLOB, throw an error. -func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192698:13: */ +func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192738:13: */ bp := tls.Alloc(128) defer tls.Free(128) var i int32 // var jx JsonString at bp, 128 - jsonInit(tls, bp /* &jx */, ctx) - jsonAppendChar(tls, bp /* &jx */, int8('[')) + jsonInit(tls, bp, ctx) + jsonAppendChar(tls, bp, int8('[')) for i = 0; i < argc; i++ { - jsonAppendSeparator(tls, bp /* &jx */) - jsonAppendValue(tls, bp /* &jx */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) + jsonAppendSeparator(tls, bp) + jsonAppendValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) } - jsonAppendChar(tls, bp /* &jx */, int8(']')) - jsonResult(tls, bp /* &jx */) + jsonAppendChar(tls, bp, int8(']')) + jsonResult(tls, bp) Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -153431,7 +153671,7 @@ func jsonArrayFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // // Return the number of elements in the top-level JSON array. // Return 0 if the input is not a well-formed JSON array. -func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192725:13: */ +func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192765:13: */ var p uintptr // The parse var n Sqlite3_int64 = int64(0) var i U32 @@ -153466,7 +153706,7 @@ func jsonArrayLengthFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { // PATH element. If there are multiple PATHs, then return a JSON array // with the result from each path. Throw an error if the JSON or any PATH // is malformed. -func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192764:13: */ +func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192804:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153484,8 +153724,8 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* if p == uintptr(0) { return } - jsonInit(tls, bp /* &jx */, ctx) - jsonAppendChar(tls, bp /* &jx */, int8('[')) + jsonInit(tls, bp, ctx) + jsonAppendChar(tls, bp, int8('[')) for i = 1; i < argc; i++ { zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) pNode = jsonLookup(tls, p, zPath, uintptr(0), ctx) @@ -153493,26 +153733,26 @@ func jsonExtractFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* break } if argc > 2 { - jsonAppendSeparator(tls, bp /* &jx */) + jsonAppendSeparator(tls, bp) if pNode != 0 { - jsonRenderNode(tls, pNode, bp /* &jx */, uintptr(0)) + jsonRenderNode(tls, pNode, bp, uintptr(0)) } else { - jsonAppendRaw(tls, bp /* &jx */, ts+6105 /* "null" */, uint32(4)) + jsonAppendRaw(tls, bp, ts+6127, uint32(4)) } } else if pNode != 0 { jsonReturn(tls, pNode, ctx, uintptr(0)) } } if argc > 2 && i == argc { - jsonAppendChar(tls, bp /* &jx */, int8(']')) - jsonResult(tls, bp /* &jx */) + jsonAppendChar(tls, bp, int8(']')) + jsonResult(tls, bp) Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } - jsonReset(tls, bp /* &jx */) + jsonReset(tls, bp) } // This is the RFC 7396 MergePatch algorithm. -func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:192805:17: */ +func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) uintptr { /* sqlite3.c:192845:17: */ var i U32 var j U32 var iRoot U32 @@ -153585,7 +153825,7 @@ func jsonMergePatch(tls *libc.TLS, pParse uintptr, iTarget U32, pPatch uintptr) // Implementation of the json_mergepatch(JSON1,JSON2) function. Return a JSON // object that is the result of running the RFC 7396 MergePatch() algorithm // on the two arguments. -func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192887:13: */ +func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192927:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -153600,24 +153840,24 @@ func jsonPatchFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq return } if jsonParse(tls, bp+32, ctx, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4)))) != 0 { - jsonParseReset(tls, bp /* &x */) + jsonParseReset(tls, bp) return } - pResult = jsonMergePatch(tls, bp /* &x */, uint32(0), (*JsonParse)(unsafe.Pointer(bp+32 /* &y */)).FaNode) + pResult = jsonMergePatch(tls, bp, uint32(0), (*JsonParse)(unsafe.Pointer(bp+32 /* &y */)).FaNode) if pResult != 0 { jsonReturnJson(tls, pResult, ctx, uintptr(0)) } else { Xsqlite3_result_error_nomem(tls, ctx) } - jsonParseReset(tls, bp /* &x */) - jsonParseReset(tls, bp+32 /* &y */) + jsonParseReset(tls, bp) + jsonParseReset(tls, bp+32) } // Implementation of the json_object(NAME,VALUE,...) function. Return a JSON // object that contains all name/value given in arguments. Or if any name // is not a string or if any value is a BLOB, throw an error. -func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192919:13: */ +func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192959:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -153629,26 +153869,26 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s if argc&1 != 0 { Xsqlite3_result_error(tls, ctx, - ts+24204 /* "json_object() re..." */, -1) + ts+24373, -1) return } - jsonInit(tls, bp /* &jx */, ctx) - jsonAppendChar(tls, bp /* &jx */, int8('{')) + jsonInit(tls, bp, ctx) + jsonAppendChar(tls, bp, int8('{')) for i = 0; i < argc; i = i + 2 { if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) != SQLITE_TEXT { - Xsqlite3_result_error(tls, ctx, ts+24255 /* "json_object() la..." */, -1) - jsonReset(tls, bp /* &jx */) + Xsqlite3_result_error(tls, ctx, ts+24424, -1) + jsonReset(tls, bp) return } - jsonAppendSeparator(tls, bp /* &jx */) + jsonAppendSeparator(tls, bp) z = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) n = U32(Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4)))) - jsonAppendString(tls, bp /* &jx */, z, n) - jsonAppendChar(tls, bp /* &jx */, int8(':')) - jsonAppendValue(tls, bp /* &jx */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i+1)*4))) + jsonAppendString(tls, bp, z, n) + jsonAppendChar(tls, bp, int8(':')) + jsonAppendValue(tls, bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(i+1)*4))) } - jsonAppendChar(tls, bp /* &jx */, int8('}')) - jsonResult(tls, bp /* &jx */) + jsonAppendChar(tls, bp, int8('}')) + jsonResult(tls, bp) Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } @@ -153656,7 +153896,7 @@ func jsonObjectFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s // // Remove the named elements from JSON and return the result. malformed // JSON or PATH arguments result in an error. -func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192961:13: */ +func jsonRemoveFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193001:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -153691,7 +153931,7 @@ __3: goto remove_done __6: ; - pNode = jsonLookup(tls, bp /* &x */, zPath, uintptr(0), ctx) + pNode = jsonLookup(tls, bp, zPath, uintptr(0), ctx) if !((*JsonParse)(unsafe.Pointer(bp)).FnErr != 0) { goto __7 } @@ -153718,14 +153958,14 @@ __5: __9: ; remove_done: - jsonParseReset(tls, bp /* &x */) + jsonParseReset(tls, bp) } // json_replace(JSON, PATH, VALUE, ...) // // Replace the value at PATH with VALUE. If PATH does not already exist, // this routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:192994:13: */ +func jsonReplaceFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193034:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -153744,7 +153984,7 @@ __1: if !(argc&1 == 0) { goto __2 } - jsonWrongNumArgs(tls, ctx, ts+15216 /* "replace" */) + jsonWrongNumArgs(tls, ctx, ts+15238) return __2: ; @@ -153761,7 +154001,7 @@ __4: goto __6 } zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) - pNode = jsonLookup(tls, bp /* &x */, zPath, uintptr(0), ctx) + pNode = jsonLookup(tls, bp, zPath, uintptr(0), ctx) if !((*JsonParse)(unsafe.Pointer(bp)).FnErr != 0) { goto __7 } @@ -153795,7 +154035,7 @@ __9: __10: ; replace_err: - jsonParseReset(tls, bp /* &x */) + jsonParseReset(tls, bp) } // json_set(JSON, PATH, VALUE, ...) @@ -153808,7 +154048,7 @@ replace_err: // // Create PATH and initialize it to VALUE. If PATH already exists, this // routine is a no-op. If JSON or PATH is malformed, throw an error. -func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193045:13: */ +func jsonSetFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193085:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -153833,9 +154073,9 @@ __1: } jsonWrongNumArgs(tls, ctx, func() uintptr { if bIsSet != 0 { - return ts + 24289 /* "set" */ + return ts + 24458 /* "set" */ } - return ts + 24293 /* "insert" */ + return ts + 24462 /* "insert" */ }()) return __2: @@ -153854,7 +154094,7 @@ __4: } zPath = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) *(*int32)(unsafe.Pointer(bp + 32 /* bApnd */)) = 0 - pNode = jsonLookup(tls, bp /* &x */, zPath, bp+32 /* &bApnd */, ctx) + pNode = jsonLookup(tls, bp, zPath, bp+32, ctx) if !((*JsonParse)(unsafe.Pointer(bp)).Foom != 0) { goto __7 } @@ -153898,7 +154138,7 @@ __12: __13: ; jsonSetDone: - jsonParseReset(tls, bp /* &x */) + jsonParseReset(tls, bp) } // json_type(JSON) @@ -153906,7 +154146,7 @@ jsonSetDone: // // Return the top-level "type" of a JSON string. Throw an error if // either the JSON or PATH inputs are not well-formed. -func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193098:13: */ +func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193138:13: */ var p uintptr // The parse var zPath uintptr var pNode uintptr @@ -153930,7 +154170,7 @@ func jsonTypeFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sql // // Return 1 if JSON is a well-formed JSON string according to RFC-7159. // Return 0 otherwise. -func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193126:13: */ +func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193166:13: */ var p uintptr // The parse _ = argc p = jsonParseCached(tls, ctx, argv, uintptr(0)) @@ -153944,7 +154184,7 @@ func jsonValidFunc(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq // json_group_array(VALUE) // // Return a JSON array composed of all values in the aggregate. -func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193146:13: */ +func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193186:13: */ var pStr uintptr _ = argc pStr = Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(JsonString{}))) @@ -153960,7 +154200,7 @@ func jsonArrayStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sq } } -func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:193165:13: */ +func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:193205:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -153985,16 +154225,16 @@ func jsonArrayCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c: (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24300 /* "[]" */, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24469, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193187:13: */ +func jsonArrayValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193227:13: */ jsonArrayCompute(tls, ctx, 0) } -func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193190:13: */ +func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193230:13: */ jsonArrayCompute(tls, ctx, 1) } @@ -154002,7 +154242,7 @@ func jsonArrayFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193190:13: */ // It works by removing the first element of the group by searching forward // to the first comma (",") that is not within a string and deleting all // text through that comma. -func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193201:13: */ +func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193241:13: */ var i uint32 var inStr int32 = 0 var nNest int32 = 0 @@ -154044,7 +154284,7 @@ func jsonGroupInverse(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* // json_group_obj(NAME,VALUE) // // Return a JSON object composed of all names and values in the aggregate. -func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193249:13: */ +func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* sqlite3.c:193289:13: */ var pStr uintptr var z uintptr var n U32 @@ -154066,7 +154306,7 @@ func jsonObjectStep(tls *libc.TLS, ctx uintptr, argc int32, argv uintptr) { /* s } } -func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:193274:13: */ +func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c:193314:13: */ var pStr uintptr pStr = Xsqlite3_aggregate_context(tls, ctx, 0) if pStr != 0 { @@ -154090,16 +154330,16 @@ func jsonObjectCompute(tls *libc.TLS, ctx uintptr, isFinal int32) { /* sqlite3.c (*JsonString)(unsafe.Pointer(pStr)).FnUsed-- } } else { - Xsqlite3_result_text(tls, ctx, ts+24303 /* "{}" */, 2, uintptr(0)) + Xsqlite3_result_text(tls, ctx, ts+24472, 2, uintptr(0)) } Xsqlite3_result_subtype(tls, ctx, uint32(JSON_SUBTYPE)) } -func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193295:13: */ +func jsonObjectValue(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193335:13: */ jsonObjectCompute(tls, ctx, 0) } -func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193298:13: */ +func jsonObjectFinal(tls *libc.TLS, ctx uintptr) { /* sqlite3.c:193338:13: */ jsonObjectCompute(tls, ctx, 1) } @@ -154119,16 +154359,16 @@ type JsonEachCursor1 = struct { FzJson uintptr FzRoot uintptr FsParse JsonParse -} /* sqlite3.c:193308:9 */ +} /* sqlite3.c:193348:9 */ // *************************************************************************** // // The json_each virtual table // -type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:193308:31 */ +type JsonEachCursor = JsonEachCursor1 /* sqlite3.c:193348:31 */ // Constructor for the json_each virtual table -func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:193323:12: */ +func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:193363:12: */ var pNew uintptr var rc int32 @@ -154143,7 +154383,7 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u _ = pAux rc = Xsqlite3_declare_vtab(tls, db, - ts+24306 /* "CREATE TABLE x(k..." */) + ts+24475) if rc == SQLITE_OK { pNew = libc.AssignPtrUintptr(ppVtab, Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -154156,13 +154396,13 @@ func jsonEachConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv u } // destructor for json_each virtual table -func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:193365:12: */ +func jsonEachDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:193405:12: */ Xsqlite3_free(tls, pVtab) return SQLITE_OK } // constructor for a JsonEachCursor object for json_each(). -func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:193371:12: */ +func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:193411:12: */ var pCur uintptr _ = p @@ -154176,7 +154416,7 @@ func jsonEachOpenEach(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql } // constructor for a JsonEachCursor object for json_tree(). -func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:193383:12: */ +func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sqlite3.c:193423:12: */ var rc int32 = jsonEachOpenEach(tls, p, ppCursor) if rc == SQLITE_OK { var pCur uintptr = *(*uintptr)(unsafe.Pointer(ppCursor)) @@ -154187,7 +154427,7 @@ func jsonEachOpenTree(tls *libc.TLS, p uintptr, ppCursor uintptr) int32 { /* sql // Reset a JsonEachCursor back to its original state. Free any memory // held. -func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193394:13: */ +func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193434:13: */ Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzJson) Xsqlite3_free(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot) jsonParseReset(tls, p+32) @@ -154200,7 +154440,7 @@ func jsonEachCursorReset(tls *libc.TLS, p uintptr) { /* sqlite3.c:193394:13: */ } // Destructor for a jsonEachCursor object -func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193407:12: */ +func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193447:12: */ var p uintptr = cur jsonEachCursorReset(tls, p) Xsqlite3_free(tls, cur) @@ -154209,13 +154449,13 @@ func jsonEachClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193407:12: * // Return TRUE if the jsonEachCursor object has been advanced off the end // of the JSON object -func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193416:12: */ +func jsonEachEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193456:12: */ var p uintptr = cur return libc.Bool32((*JsonEachCursor)(unsafe.Pointer(p)).Fi >= (*JsonEachCursor)(unsafe.Pointer(p)).FiEnd) } // Advance the cursor to the next element for json_tree() -func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193422:12: */ +func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193462:12: */ var p uintptr = cur if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { if int32((*JsonNode)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode+uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*12)).FjnFlags)&JNODE_LABEL != 0 { @@ -154266,7 +154506,7 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:193422:12: */ } // Append the name of the path for element i to pStr -func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:193466:13: */ +func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:193506:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -154283,19 +154523,19 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pUp = (*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr(iUp)*12 if int32((*JsonNode)(unsafe.Pointer(pUp)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, pStr, ts+24389 /* "[%d]" */, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) + jsonPrintf(tls, 30, pStr, ts+24558, libc.VaList(bp, *(*U32)(unsafe.Pointer(pUp + 8)))) } else { if int32((*JsonNode)(unsafe.Pointer(pNode)).FjnFlags)&JNODE_LABEL == 0 { pNode -= 12 } - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24394 /* ".%.*s" */, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pNode)).Fn+U32(1)), pStr, ts+24563, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pNode + 8))+uintptr(1))) } } // Return the value of a column -func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:193496:12: */ +func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:193536:12: */ bp := tls.Alloc(280) defer tls.Free(280) @@ -154374,23 +154614,23 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { // var x JsonString at bp+24, 128 - jsonInit(tls, bp+24 /* &x */, ctx) + jsonInit(tls, bp+24, ctx) if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { - jsonEachComputePath(tls, p, bp+24 /* &x */, (*JsonEachCursor)(unsafe.Pointer(p)).Fi) + jsonEachComputePath(tls, p, bp+24, (*JsonEachCursor)(unsafe.Pointer(p)).Fi) } else { if (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot != 0 { - jsonAppendRaw(tls, bp+24 /* &x */, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot, uint32(int32(libc.Xstrlen(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot)))) + jsonAppendRaw(tls, bp+24, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot, uint32(int32(libc.Xstrlen(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot)))) } else { - jsonAppendChar(tls, bp+24 /* &x */, int8('$')) + jsonAppendChar(tls, bp+24, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+24 /* &x */, ts+24389 /* "[%d]" */, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24, ts+24558, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24 /* &x */, ts+24394 /* ".%.*s" */, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24, ts+24563, libc.VaList(bp+8, (*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2), *(*uintptr)(unsafe.Pointer(pThis + 8))+uintptr(1))) } } - jsonResult(tls, bp+24 /* &x */) + jsonResult(tls, bp+24) break } @@ -154399,9 +154639,9 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { // var x JsonString at bp+152, 128 - jsonInit(tls, bp+152 /* &x */, ctx) - jsonEachComputePath(tls, p, bp+152 /* &x */, *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4))) - jsonResult(tls, bp+152 /* &x */) + jsonInit(tls, bp+152, ctx) + jsonEachComputePath(tls, p, bp+152, *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4))) + jsonResult(tls, bp+152) break } @@ -154411,7 +154651,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* { var zRoot uintptr = (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot if zRoot == uintptr(0) { - zRoot = ts + 24400 /* "$" */ + zRoot = ts + 24569 /* "$" */ } Xsqlite3_result_text(tls, ctx, zRoot, -1, uintptr(0)) break @@ -154429,7 +154669,7 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } // Return the current rowid value -func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:193597:12: */ +func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3.c:193637:12: */ var p uintptr = cur *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = Sqlite_int64((*JsonEachCursor)(unsafe.Pointer(p)).FiRowid) return SQLITE_OK @@ -154439,7 +154679,7 @@ func jsonEachRowid(tls *libc.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite // column. Without such a constraint, the table cannot operate. idxNum is // 1 if the constraint is found, 3 if the constraint and zRoot are found, // and 0 otherwise. -func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:193608:12: */ +func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:193648:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -154454,7 +154694,7 @@ func jsonEachBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* // columns in the table _ = tab - *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */)) = libc.AssignPtrInt32(bp+1*4, -1) + *(*int32)(unsafe.Pointer(bp)) = libc.AssignPtrInt32(bp+1*4, -1) pConstraint = (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 __1: @@ -154473,7 +154713,7 @@ __1: if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { unusableMask = unusableMask | iMask } else if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) == SQLITE_INDEX_CONSTRAINT_EQ { - *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */ + uintptr(iCol)*4)) = i + *(*int32)(unsafe.Pointer(bp + uintptr(iCol)*4)) = i idxMask = idxMask | iMask } @@ -154498,13 +154738,13 @@ __3: (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 0 } else { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1.0 - i = *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */)) + i = *(*int32)(unsafe.Pointer(bp)) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) if *(*int32)(unsafe.Pointer(bp + 1*4)) < 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 // Only JSON supplied. Plan 1 } else { - i = *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */ + 1*4)) + i = *(*int32)(unsafe.Pointer(bp + 1*4)) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = 2 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(i)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 3 // Both JSON and ROOT are supplied. Plan 3 @@ -154514,7 +154754,7 @@ __3: } // Start a search on a new JSON string -func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:193667:12: */ +func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:193707:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -154543,7 +154783,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar var rc int32 = SQLITE_NOMEM if int32((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.Foom) == 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) - (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24116 /* "malformed JSON" */, 0) + (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+24285, 0) if (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg != 0 { rc = SQLITE_ERROR } @@ -154570,7 +154810,7 @@ func jsonEachFilter(tls *libc.TLS, cur uintptr, idxNum int32, idxStr uintptr, ar if int32(*(*int8)(unsafe.Pointer(zRoot))) != '$' { *(*uintptr)(unsafe.Pointer(bp /* zErr */)) = zRoot } else { - pNode = jsonLookupStep(tls, p+32, uint32(0), (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot+uintptr(1), uintptr(0), bp /* &zErr */) + pNode = jsonLookupStep(tls, p+32, uint32(0), (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot+uintptr(1), uintptr(0), bp) } if *(*uintptr)(unsafe.Pointer(bp)) != 0 { Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).FzErrMsg) @@ -154619,7 +154859,7 @@ var jsonEachModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:193748:23 */ +} /* sqlite3.c:193788:23 */ // The methods of the json_tree virtual table. var jsonTreeModule = Sqlite3_module{ // xCreate @@ -154633,7 +154873,7 @@ var jsonTreeModule = Sqlite3_module{ // xCreate FxEof: 0, // xEof - check for end of scan FxColumn: 0, // xColumn - read data FxRowid: 0, // xShadowName -} /* sqlite3.c:193776:23 */ +} /* sqlite3.c:193816:23 */ // *************************************************************************** // @@ -154642,7 +154882,7 @@ var jsonTreeModule = Sqlite3_module{ // xCreate // functions and the virtual table implemented by this file. // -func Xsqlite3Json1Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:193810:20: */ +func Xsqlite3Json1Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:193850:20: */ var rc int32 = SQLITE_OK var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(aFunc))/uint32(unsafe.Sizeof(struct { @@ -154684,22 +154924,22 @@ var aFunc = [15]struct { Fflag int32 FxFunc uintptr }{ - {FzName: ts + 24402 /* "json" */, FnArg: 1, FxFunc: 0}, - {FzName: ts + 24407 /* "json_array" */, FnArg: -1, FxFunc: 0}, - {FzName: ts + 24418 /* "json_array_lengt..." */, FnArg: 1, FxFunc: 0}, - {FzName: ts + 24418 /* "json_array_lengt..." */, FnArg: 2, FxFunc: 0}, - {FzName: ts + 24436 /* "json_extract" */, FnArg: -1, FxFunc: 0}, - {FzName: ts + 24449 /* "json_insert" */, FnArg: -1, FxFunc: 0}, - {FzName: ts + 24461 /* "json_object" */, FnArg: -1, FxFunc: 0}, - {FzName: ts + 24473 /* "json_patch" */, FnArg: 2, FxFunc: 0}, - {FzName: ts + 24484 /* "json_quote" */, FnArg: 1, FxFunc: 0}, - {FzName: ts + 24495 /* "json_remove" */, FnArg: -1, FxFunc: 0}, - {FzName: ts + 24507 /* "json_replace" */, FnArg: -1, FxFunc: 0}, - {FzName: ts + 24520 /* "json_set" */, FnArg: -1, Fflag: 1, FxFunc: 0}, - {FzName: ts + 24529 /* "json_type" */, FnArg: 1, FxFunc: 0}, - {FzName: ts + 24529 /* "json_type" */, FnArg: 2, FxFunc: 0}, - {FzName: ts + 24539 /* "json_valid" */, FnArg: 1, FxFunc: 0}, -} /* sqlite3.c:193818:5 */ + {FzName: ts + 24571 /* "json" */, FnArg: 1, FxFunc: 0}, + {FzName: ts + 24576 /* "json_array" */, FnArg: -1, FxFunc: 0}, + {FzName: ts + 24587 /* "json_array_lengt..." */, FnArg: 1, FxFunc: 0}, + {FzName: ts + 24587 /* "json_array_lengt..." */, FnArg: 2, FxFunc: 0}, + {FzName: ts + 24605 /* "json_extract" */, FnArg: -1, FxFunc: 0}, + {FzName: ts + 24618 /* "json_insert" */, FnArg: -1, FxFunc: 0}, + {FzName: ts + 24630 /* "json_object" */, FnArg: -1, FxFunc: 0}, + {FzName: ts + 24642 /* "json_patch" */, FnArg: 2, FxFunc: 0}, + {FzName: ts + 24653 /* "json_quote" */, FnArg: 1, FxFunc: 0}, + {FzName: ts + 24664 /* "json_remove" */, FnArg: -1, FxFunc: 0}, + {FzName: ts + 24676 /* "json_replace" */, FnArg: -1, FxFunc: 0}, + {FzName: ts + 24689 /* "json_set" */, FnArg: -1, Fflag: 1, FxFunc: 0}, + {FzName: ts + 24698 /* "json_type" */, FnArg: 1, FxFunc: 0}, + {FzName: ts + 24698 /* "json_type" */, FnArg: 2, FxFunc: 0}, + {FzName: ts + 24708 /* "json_valid" */, FnArg: 1, FxFunc: 0}, +} /* sqlite3.c:193858:5 */ var aAgg = [2]struct { FzName uintptr FnArg int32 @@ -154707,19 +154947,19 @@ var aAgg = [2]struct { FxFinal uintptr FxValue uintptr }{ - {FzName: ts + 24550 /* "json_group_array" */, FnArg: 1, + {FzName: ts + 24719 /* "json_group_array" */, FnArg: 1, FxStep: 0, FxFinal: 0, FxValue: 0}, - {FzName: ts + 24567 /* "json_group_objec..." */, FnArg: 2, + {FzName: ts + 24736 /* "json_group_objec..." */, FnArg: 2, FxStep: 0, FxFinal: 0, FxValue: 0}, -} /* sqlite3.c:193847:5 */ +} /* sqlite3.c:193887:5 */ var aMod = [2]struct { FzName uintptr FpModule uintptr }{ - {FzName: ts + 24585 /* "json_each" */, FpModule: 0}, - {FzName: ts + 24595 /* "json_tree" */, FpModule: 0}, -} /* sqlite3.c:193857:5 */ -var enc int32 = SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS /* sqlite3.c:193862:20 */ // In the SQLite core + {FzName: ts + 24754 /* "json_each" */, FpModule: 0}, + {FzName: ts + 24764 /* "json_tree" */, FpModule: 0}, +} /* sqlite3.c:193897:5 */ +var enc int32 = SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS /* sqlite3.c:193902:20 */ // In the SQLite core // If building separately, we will need some setup that is normally // found in sqliteInt.h @@ -154764,7 +155004,7 @@ type Rtree1 = struct { FpDeleteParent uintptr FpWriteAux uintptr FaHash [97]uintptr -} /* sqlite3.c:194015:9 */ +} /* sqlite3.c:194055:9 */ // In the SQLite core @@ -154778,7 +155018,7 @@ type Rtree1 = struct { // The following macro is used to suppress compiler warnings. -type Rtree = Rtree1 /* sqlite3.c:194015:22 */ +type Rtree = Rtree1 /* sqlite3.c:194055:22 */ type RtreeCursor1 = struct { Fbase Sqlite3_vtab_cursor FatEOF U8 @@ -154796,9 +155036,9 @@ type RtreeCursor1 = struct { FsPoint RtreeSearchPoint FaNode [5]uintptr FanQueue [41]U32 -} /* sqlite3.c:194016:9 */ +} /* sqlite3.c:194056:9 */ -type RtreeCursor = RtreeCursor1 /* sqlite3.c:194016:28 */ +type RtreeCursor = RtreeCursor1 /* sqlite3.c:194056:28 */ type RtreeNode1 = struct { FpParent uintptr FiNode I64 @@ -154806,43 +155046,43 @@ type RtreeNode1 = struct { FisDirty int32 FzData uintptr FpNext uintptr -} /* sqlite3.c:194015:9 */ +} /* sqlite3.c:194055:9 */ -type RtreeNode = RtreeNode1 /* sqlite3.c:194017:26 */ +type RtreeNode = RtreeNode1 /* sqlite3.c:194057:26 */ type RtreeCell1 = struct { FiRowid I64 FaCoord [10]RtreeCoord -} /* sqlite3.c:194018:9 */ +} /* sqlite3.c:194058:9 */ -type RtreeCell = RtreeCell1 /* sqlite3.c:194018:26 */ +type RtreeCell = RtreeCell1 /* sqlite3.c:194058:26 */ type RtreeConstraint1 = struct { FiCoord int32 Fop int32 Fu struct{ FrValue RtreeDValue } FpInfo uintptr -} /* sqlite3.c:194016:9 */ +} /* sqlite3.c:194056:9 */ -type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:194019:32 */ +type RtreeConstraint = RtreeConstraint1 /* sqlite3.c:194059:32 */ type RtreeMatchArg1 = struct { FiSize U32 Fcb RtreeGeomCallback FnParam int32 FapSqlParam uintptr FaParam [1]RtreeDValue -} /* sqlite3.c:194020:9 */ +} /* sqlite3.c:194060:9 */ -type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:194020:30 */ +type RtreeMatchArg = RtreeMatchArg1 /* sqlite3.c:194060:30 */ type RtreeGeomCallback1 = struct { FxGeom uintptr FxQueryFunc uintptr FxDestructor uintptr FpContext uintptr -} /* sqlite3.c:194020:9 */ +} /* sqlite3.c:194060:9 */ -type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:194021:34 */ -type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:194018:9 */ +type RtreeGeomCallback = RtreeGeomCallback1 /* sqlite3.c:194061:34 */ +type RtreeCoord1 = struct{ Ff RtreeValue } /* sqlite3.c:194058:9 */ -type RtreeCoord = RtreeCoord1 /* sqlite3.c:194022:26 */ +type RtreeCoord = RtreeCoord1 /* sqlite3.c:194062:26 */ type RtreeSearchPoint1 = struct { FrScore RtreeDValue Fid Sqlite3_int64 @@ -154850,17 +155090,17 @@ type RtreeSearchPoint1 = struct { FeWithin U8 FiCell U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:194016:9 */ +} /* sqlite3.c:194056:9 */ -type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:194023:33 */ +type RtreeSearchPoint = RtreeSearchPoint1 /* sqlite3.c:194063:33 */ // Possible values for Rtree.eCoordType: // If SQLITE_RTREE_INT_ONLY is defined, then this virtual table will // only deal with integer coordinates. No floating point operations // will be done. -type RtreeDValue = float64 /* sqlite3.c:194120:18 */ // High accuracy coordinate -type RtreeValue = float32 /* sqlite3.c:194121:17 */ +type RtreeDValue = float64 /* sqlite3.c:194160:18 */ // High accuracy coordinate +type RtreeValue = float32 /* sqlite3.c:194161:17 */ // What version of GCC is being used. 0 means GCC is not being used . // Note that the GCC_VERSION macro will also be set correctly when using @@ -154886,34 +155126,34 @@ type RtreeValue = float32 /* sqlite3.c:194121:17 */ // Functions to deserialize a 16 bit integer, 32 bit real number and // 64 bit integer. The deserialized value is returned. -func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:194405:12: */ +func readInt16(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:194445:12: */ return int32(*(*U8)(unsafe.Pointer(p)))<<8 + int32(*(*U8)(unsafe.Pointer(p + 1))) } -func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:194408:13: */ +func readCoord(tls *libc.TLS, p uintptr, pCoord uintptr) { /* sqlite3.c:194448:13: */ // p is always 4-byte aligned *(*U32)(unsafe.Pointer(pCoord)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(p))) } -func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:194425:12: */ +func readInt64(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:194465:12: */ bp := tls.Alloc(8) defer tls.Free(8) // var x U64 at bp, 8 - libc.Xmemcpy(tls, bp /* &x */, p, uint32(8)) + libc.Xmemcpy(tls, bp, p, uint32(8)) return I64(libc.X__builtin_bswap64(tls, *(*U64)(unsafe.Pointer(bp /* x */)))) } // Functions to serialize a 16 bit integer, 32 bit real number and // 64 bit integer. The value returned is the number of bytes written // to the argument buffer (always 2, 4 and 8 respectively). -func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:194457:13: */ +func writeInt16(tls *libc.TLS, p uintptr, i int32) { /* sqlite3.c:194497:13: */ *(*U8)(unsafe.Pointer(p)) = U8(i >> 8 & 0xFF) *(*U8)(unsafe.Pointer(p + 1)) = U8(i >> 0 & 0xFF) } -func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:194461:12: */ +func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:194501:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -154922,22 +155162,22 @@ func writeCoord(tls *libc.TLS, p uintptr, pCoord uintptr) int32 { /* sqlite3.c:1 // p is always 4-byte aligned *(*U32)(unsafe.Pointer(bp /* i */)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCoord /* .Fu */))) - libc.Xmemcpy(tls, p, bp /* &i */, uint32(4)) + libc.Xmemcpy(tls, p, bp, uint32(4)) return 4 } -func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:194484:12: */ +func writeInt64(tls *libc.TLS, p uintptr, i I64) int32 { /* sqlite3.c:194524:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*I64)(unsafe.Pointer(bp)) = i *(*I64)(unsafe.Pointer(bp /* i */)) = I64(libc.X__builtin_bswap64(tls, U64(*(*I64)(unsafe.Pointer(bp /* i */))))) - libc.Xmemcpy(tls, p, bp /* &i */, uint32(8)) + libc.Xmemcpy(tls, p, bp, uint32(8)) return 8 } // Increment the reference count of node p. -func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:194509:13: */ +func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:194549:13: */ if p != 0 { (*RtreeNode)(unsafe.Pointer(p)).FnRef++ @@ -154945,20 +155185,20 @@ func nodeReference(tls *libc.TLS, p uintptr) { /* sqlite3.c:194509:13: */ } // Clear the content of node p (set all bytes to 0x00). -func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:194519:13: */ +func nodeZero(tls *libc.TLS, pRtree uintptr, p uintptr) { /* sqlite3.c:194559:13: */ libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(p)).FzData+2, 0, uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-2)) (*RtreeNode)(unsafe.Pointer(p)).FisDirty = 1 } // Given a node number iNode, return the corresponding key to use // in the Rtree.aHash table. -func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:194528:21: */ +func nodeHash(tls *libc.TLS, iNode I64) uint32 { /* sqlite3.c:194568:21: */ return uint32(iNode) % uint32(HASHSIZE) } // Search the node hash table for node iNode. If found, return a pointer // to it. Otherwise, return 0. -func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:194536:18: */ +func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlite3.c:194576:18: */ var p uintptr for p = *(*uintptr)(unsafe.Pointer(pRtree + 112 + uintptr(nodeHash(tls, iNode))*4)); p != 0 && (*RtreeNode)(unsafe.Pointer(p)).FiNode != iNode; p = (*RtreeNode)(unsafe.Pointer(p)).FpNext { } @@ -154966,7 +155206,7 @@ func nodeHashLookup(tls *libc.TLS, pRtree uintptr, iNode I64) uintptr { /* sqlit } // Add node pNode to the node hash table. -func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:194545:13: */ +func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:194585:13: */ var iHash int32 iHash = int32(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) @@ -154975,7 +155215,7 @@ func nodeHashInsert(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c } // Remove node pNode from the node hash table. -func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:194556:13: */ +func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c:194596:13: */ var pp uintptr if (*RtreeNode)(unsafe.Pointer(pNode)).FiNode != int64(0) { pp = pRtree + 112 + uintptr(nodeHash(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode))*4 @@ -154990,7 +155230,7 @@ func nodeHashDelete(tls *libc.TLS, pRtree uintptr, pNode uintptr) { /* sqlite3.c // indicating that node has not yet been assigned a node number. It is // assigned a node number when nodeWrite() is called to write the // node contents out to the database. -func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:194572:18: */ +func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite3.c:194612:18: */ var pNode uintptr pNode = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(RtreeNode{}))+uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize))) if pNode != 0 { @@ -155006,7 +155246,7 @@ func nodeNew(tls *libc.TLS, pRtree uintptr, pParent uintptr) uintptr { /* sqlite } // Clear the Rtree.pNodeBlob object -func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:194590:13: */ +func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:194630:13: */ if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob != 0 && int32((*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans) == 0 && (*Rtree)(unsafe.Pointer(pRtree)).FnCursor == U32(0) { var pBlob uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob = uintptr(0) @@ -155015,7 +155255,7 @@ func nodeBlobReset(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:194590:13: */ } // Obtain a reference to an r-tree node. -func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:194601:12: */ +func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:194641:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -155047,11 +155287,11 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } } if (*Rtree)(unsafe.Pointer(pRtree)).FpNodeBlob == uintptr(0) { - var zTab uintptr = Xsqlite3_mprintf(tls, ts+24605 /* "%s_node" */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + var zTab uintptr = Xsqlite3_mprintf(tls, ts+24774, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zTab == uintptr(0) { return SQLITE_NOMEM } - rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24613 /* "data" */, iNode, 0, + rc = Xsqlite3_blob_open(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, zTab, ts+24782, iNode, 0, pRtree+72) Xsqlite3_free(tls, zTab) } @@ -155125,7 +155365,7 @@ func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNo } // Overwrite cell iCell of node pNode with the contents of pCell. -func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:194714:13: */ +func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iCell int32) { /* sqlite3.c:194754:13: */ var ii int32 var p uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) p += uintptr(writeInt64(tls, p, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid)) @@ -155136,7 +155376,7 @@ func nodeOverwriteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintp } // Remove the cell with index iCell from node pNode. -func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:194732:13: */ +func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { /* sqlite3.c:194772:13: */ var pDst uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FzData + uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell) var pSrc uintptr = pDst + uintptr((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) var nByte int32 = (readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) - iCell - 1) * int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) @@ -155149,7 +155389,7 @@ func nodeDeleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) { // is successful, return SQLITE_OK. // // If there is not enough free space in pNode, return SQLITE_FULL. -func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:194747:12: */ +func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:194787:12: */ var nCell int32 // Current number of cells in pNode var nMaxCell int32 // Maximum number of cells for pNode @@ -155166,7 +155406,7 @@ func nodeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) } // If the node is dirty, write it out to the database. -func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:194771:12: */ +func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:194811:12: */ var rc int32 = SQLITE_OK if (*RtreeNode)(unsafe.Pointer(pNode)).FisDirty != 0 { var p uintptr = (*Rtree)(unsafe.Pointer(pRtree)).FpWriteNode @@ -155190,7 +155430,7 @@ func nodeWrite(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3. // Release a reference to a node. If the node is dirty and the reference // count drops to zero, the node data is written to the database. -func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:194797:12: */ +func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:194837:12: */ var rc int32 = SQLITE_OK if pNode != 0 { @@ -155216,19 +155456,19 @@ func nodeRelease(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite // Return the 64-bit integer value associated with cell iCell of // node pNode. If pNode is a leaf node, this is a rowid. If it is // an internal node, then the 64-bit integer is a child page number. -func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:194826:12: */ +func nodeGetRowid(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32) I64 { /* sqlite3.c:194866:12: */ return readInt64(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell)) } // Return coordinate iCoord from cell iCell in node pNode. -func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:194838:13: */ +func nodeGetCoord(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iCoord int32, pCoord uintptr) { /* sqlite3.c:194878:13: */ readCoord(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+uintptr(12+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*iCell+4*iCoord), pCoord) } // Deserialize cell iCell of node pNode. Populate the structure pointed // to by pCell with the results. -func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:194852:13: */ +func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCell uintptr) { /* sqlite3.c:194892:13: */ var pData uintptr var pCoord uintptr var ii int32 = 0 @@ -155244,23 +155484,23 @@ func nodeGetCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, pCel } // Rtree virtual table module xCreate method. -func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:194883:12: */ +func rtreeCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:194923:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // Rtree virtual table module xConnect method. -func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:194896:12: */ +func rtreeConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:194936:12: */ return rtreeInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } // Increment the r-tree reference count. -func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:194909:13: */ +func rtreeReference(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:194949:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy++ } // Decrement the r-tree reference count. When the reference count reaches // zero the structure is deleted. -func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:194917:13: */ +func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:194957:13: */ (*Rtree)(unsafe.Pointer(pRtree)).FnBusy-- if (*Rtree)(unsafe.Pointer(pRtree)).FnBusy == U32(0) { (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) @@ -155282,13 +155522,13 @@ func rtreeRelease(tls *libc.TLS, pRtree uintptr) { /* sqlite3.c:194917:13: */ } // Rtree virtual table module xDisconnect method. -func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:194941:12: */ +func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:194981:12: */ rtreeRelease(tls, pVtab) return SQLITE_OK } // Rtree virtual table module xDestroy method. -func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:194949:12: */ +func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:194989:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -155296,7 +155536,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:194949:12: var rc int32 var zCreate uintptr = Xsqlite3_mprintf(tls, - ts+24618, /* "DROP TABLE '%q'...." */ + ts+24787, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) @@ -155315,7 +155555,7 @@ func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:194949:12: } // Rtree virtual table module xOpen method. -func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:194977:12: */ +func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite3.c:195017:12: */ var rc int32 = SQLITE_NOMEM var pRtree uintptr = pVTab var pCsr uintptr @@ -155333,7 +155573,7 @@ func rtreeOpen(tls *libc.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* sqlite } // Reset a cursor back to its initial state. -func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:194998:13: */ +func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:195038:13: */ var pRtree uintptr = (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var ii int32 var pStmt uintptr @@ -155363,7 +155603,7 @@ func resetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:194998:13: */ } // Rtree virtual table module xClose method. -func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195026:12: */ +func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195066:12: */ var pRtree uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab var pCsr uintptr = cur @@ -155379,7 +155619,7 @@ func rtreeClose(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195026:12: */ // // Return non-zero if the cursor does not currently point to a valid // record (i.e if the scan has finished), or zero otherwise. -func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195044:12: */ +func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195084:12: */ var pCsr uintptr = cur return int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FatEOF) } @@ -155396,7 +155636,7 @@ func rtreeEof(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:195044:12: */ // Check the RTree node or entry given by pCellData and p against the MATCH // constraint pConstraint. -func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:195099:12: */ +func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCellData uintptr, pSearch uintptr, prScore uintptr, peWithin uintptr) int32 { /* sqlite3.c:195139:12: */ bp := tls.Alloc(88) defer tls.Free(88) @@ -155415,66 +155655,66 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe if eInt == 0 { switch nCoord { case 10: - readCoord(tls, pCellData+uintptr(36), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 9*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData+uintptr(32), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 8*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(36), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 9*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(32), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 8*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) fallthrough case 8: - readCoord(tls, pCellData+uintptr(28), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 7*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData+uintptr(24), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 6*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(28), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 7*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(24), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 6*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) fallthrough case 6: - readCoord(tls, pCellData+uintptr(20), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 5*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData+uintptr(16), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 4*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(20), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 5*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(16), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 4*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) fallthrough case 4: - readCoord(tls, pCellData+uintptr(12), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 3*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData+uintptr(8), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 2*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(12), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 3*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(8), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 2*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) fallthrough default: - readCoord(tls, pCellData+uintptr(4), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 1*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData, bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(4), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 1*8)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) + readCoord(tls, pCellData, bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4)) = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) } } else { switch nCoord { case 10: - readCoord(tls, pCellData+uintptr(36), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 9*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData+uintptr(32), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 8*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(36), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 9*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(32), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 8*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) fallthrough case 8: - readCoord(tls, pCellData+uintptr(28), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 7*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData+uintptr(24), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 6*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(28), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 7*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(24), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 6*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) fallthrough case 6: - readCoord(tls, pCellData+uintptr(20), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 5*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData+uintptr(16), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 4*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(20), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 5*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(16), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 4*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) fallthrough case 4: - readCoord(tls, pCellData+uintptr(12), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 3*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData+uintptr(8), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 2*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(12), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 3*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData+uintptr(8), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 2*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) fallthrough default: - readCoord(tls, pCellData+uintptr(4), bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */ + 1*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) - readCoord(tls, pCellData, bp /* &c */) - *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 /* &aCoord[0] */)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) + readCoord(tls, pCellData+uintptr(4), bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4 + 1*8)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) + readCoord(tls, pCellData, bp) + *(*Sqlite3_rtree_dbl)(unsafe.Pointer(bp + 4)) = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) } } if (*RtreeConstraint)(unsafe.Pointer(pConstraint)).Fop == RTREE_MATCH { @@ -155482,7 +155722,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe rc = (*struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{*(*uintptr)(unsafe.Pointer(pConstraint + 8 /* &.u */))})).f(tls, pInfo, - nCoord, bp+4 /* &aCoord[0] */, bp+84 /* &eWithin */) + nCoord, bp+4, bp+84) if *(*int32)(unsafe.Pointer(bp + 84)) == 0 { *(*int32)(unsafe.Pointer(peWithin)) = NOT_WITHIN } @@ -155508,7 +155748,7 @@ func rtreeCallbackConstraint(tls *libc.TLS, pConstraint uintptr, eInt int32, pCe // Check the internal RTree node given by pCellData against constraint p. // If this constraint cannot be satisfied by any child within the node, // set *peWithin to NOT_WITHIN. -func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:195175:13: */ +func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:195215:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -155528,11 +155768,11 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint { // var c RtreeCoord at bp, 4 /* Coordinate decoded */ - *(*U32)(unsafe.Pointer(bp /* &c */)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) + *(*U32)(unsafe.Pointer(bp)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) if eInt != 0 { - val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) + val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) } else { - val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) + val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) } } @@ -155542,11 +155782,11 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint { // var c RtreeCoord at bp+4, 4 /* Coordinate decoded */ - *(*U32)(unsafe.Pointer(bp + 4 /* &c */)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) + *(*U32)(unsafe.Pointer(bp + 4)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) if eInt != 0 { - val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 4 /* &c */))) + val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 4))) } else { - val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 4 /* &c */))) + val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 4))) } } @@ -155562,11 +155802,11 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint { // var c RtreeCoord at bp+8, 4 /* Coordinate decoded */ - *(*U32)(unsafe.Pointer(bp + 8 /* &c */)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) + *(*U32)(unsafe.Pointer(bp + 8)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) if eInt != 0 { - val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 8 /* &c */))) + val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 8))) } else { - val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 8 /* &c */))) + val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 8))) } } @@ -155581,11 +155821,11 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint { // var c RtreeCoord at bp+12, 4 /* Coordinate decoded */ - *(*U32)(unsafe.Pointer(bp + 12 /* &c */)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) + *(*U32)(unsafe.Pointer(bp + 12)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) if eInt != 0 { - val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 12 /* &c */))) + val = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp + 12))) } else { - val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 12 /* &c */))) + val = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp + 12))) } } @@ -155606,7 +155846,7 @@ func rtreeNonleafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uint // // The op is given by p->op. The xN is p->iCoord-th coordinate in // pCellData. $val is given by p->u.rValue. -func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:195232:13: */ +func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr, peWithin uintptr) { /* sqlite3.c:195272:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -155617,11 +155857,11 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr { // var c RtreeCoord at bp, 4 /* Coordinate decoded */ - *(*U32)(unsafe.Pointer(bp /* &c */)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) + *(*U32)(unsafe.Pointer(bp)) = libc.X__builtin_bswap32(tls, *(*U32)(unsafe.Pointer(pCellData))) if eInt != 0 { - xN = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp /* &c */))) + xN = Sqlite3_rtree_dbl(*(*int32)(unsafe.Pointer(bp))) } else { - xN = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp /* &c */))) + xN = Sqlite3_rtree_dbl(*(*RtreeValue)(unsafe.Pointer(bp))) } } @@ -155661,7 +155901,7 @@ func rtreeLeafConstraint(tls *libc.TLS, p uintptr, eInt int32, pCellData uintptr // One of the cells in node pNode is guaranteed to have a 64-bit // integer value equal to iRowid. Return the index of this cell. -func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:195262:12: */ +func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, piIndex uintptr) int32 { /* sqlite3.c:195302:12: */ var ii int32 var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) @@ -155677,7 +155917,7 @@ func nodeRowidIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, iRowid I64, pi // Return the index of the cell containing a pointer to node pNode // in its parent. If pNode is the root node, return -1. -func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:195285:12: */ +func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintptr) int32 { /* sqlite3.c:195325:12: */ var pParent uintptr = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent if pParent != 0 { return nodeRowidIndex(tls, pRtree, pParent, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode, piIndex) @@ -155696,7 +155936,7 @@ func nodeParentIndex(tls *libc.TLS, pRtree uintptr, pNode uintptr, piIndex uintp // iLevel values coming first. In this way, if rScore is the same for all // SearchPoints, then iLevel becomes the deciding factor and the result // is a depth-first search, which is the desired default behavior. -func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:195305:12: */ +func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* sqlite3.c:195345:12: */ if (*RtreeSearchPoint)(unsafe.Pointer(pA)).FrScore < (*RtreeSearchPoint)(unsafe.Pointer(pB)).FrScore { return -1 } @@ -155713,7 +155953,7 @@ func rtreeSearchPointCompare(tls *libc.TLS, pA uintptr, pB uintptr) int32 { /* s } // Interchange two search points in a cursor. -func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:195319:13: */ +func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlite3.c:195359:13: */ var t = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*20)) *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(i)*20)) = *(*RtreeSearchPoint)(unsafe.Pointer((*RtreeCursor)(unsafe.Pointer(p)).FaPoint + uintptr(j)*20)) @@ -155733,7 +155973,7 @@ func rtreeSearchPointSwap(tls *libc.TLS, p uintptr, i int32, j int32) { /* sqlit } // Return the search point with the lowest current score. -func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:195340:25: */ +func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:195380:25: */ if (*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint != 0 { return pCur + 40 } @@ -155744,7 +155984,7 @@ func rtreeSearchPointFirst(tls *libc.TLS, pCur uintptr) uintptr { /* sqlite3.c:1 } // Get the RtreeNode for the search point with the lowest score. -func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:195347:18: */ +func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintptr { /* sqlite3.c:195387:18: */ var id Sqlite3_int64 var ii int32 = 1 - int32((*RtreeCursor)(unsafe.Pointer(pCur)).FbPoint) @@ -155761,7 +156001,7 @@ func rtreeNodeOfFirstSearchPoint(tls *libc.TLS, pCur uintptr, pRC uintptr) uintp } // Push a new element onto the priority queue -func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:195363:25: */ +func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:195403:25: */ var i int32 var j int32 var pNew uintptr @@ -155795,7 +156035,7 @@ func rtreeEnqueue(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) ui // Allocate a new RtreeSearchPoint and return a pointer to it. Return // NULL if malloc fails. -func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:195398:25: */ +func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel U8) uintptr { /* sqlite3.c:195438:25: */ var pNew uintptr var pFirst uintptr pFirst = rtreeSearchPointFirst(tls, pCur) @@ -155831,7 +156071,7 @@ func rtreeSearchPointNew(tls *libc.TLS, pCur uintptr, rScore RtreeDValue, iLevel } // Remove the search point with the lowest current score. -func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:195466:13: */ +func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:195506:13: */ var i int32 var j int32 var k int32 @@ -155879,7 +156119,7 @@ func rtreeSearchPointPop(tls *libc.TLS, p uintptr) { /* sqlite3.c:195466:13: */ // contains an entry suitable for returning as a result-set row, // or until the RtreeSearchPoint queue is empty, indicating that the // query has completed. -func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:195514:12: */ +func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:195554:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -155898,7 +156138,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:195514:12 eInt = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for libc.AssignUintptr(&p, rtreeSearchPointFirst(tls, pCur)) != uintptr(0) && int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiLevel) > 0 { var pCellData uintptr - pNode = rtreeNodeOfFirstSearchPoint(tls, pCur, bp /* &rc */) + pNode = rtreeNodeOfFirstSearchPoint(tls, pCur, bp) if *(*int32)(unsafe.Pointer(bp)) != 0 { return *(*int32)(unsafe.Pointer(bp /* rc */)) } @@ -155912,14 +156152,14 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:195514:12 var pConstraint uintptr = (*RtreeCursor)(unsafe.Pointer(pCur)).FaConstraint + uintptr(ii)*20 if (*RtreeConstraint)(unsafe.Pointer(pConstraint)).Fop >= RTREE_MATCH { *(*int32)(unsafe.Pointer(bp /* rc */)) = rtreeCallbackConstraint(tls, pConstraint, eInt, pCellData, p, - bp+4 /* &rScore */, bp+12 /* &eWithin */) + bp+4, bp+12) if *(*int32)(unsafe.Pointer(bp)) != 0 { return *(*int32)(unsafe.Pointer(bp /* rc */)) } } else if int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiLevel) == 1 { - rtreeLeafConstraint(tls, pConstraint, eInt, pCellData, bp+12 /* &eWithin */) + rtreeLeafConstraint(tls, pConstraint, eInt, pCellData, bp+12) } else { - rtreeNonleafConstraint(tls, pConstraint, eInt, pCellData, bp+12 /* &eWithin */) + rtreeNonleafConstraint(tls, pConstraint, eInt, pCellData, bp+12) } if *(*int32)(unsafe.Pointer(bp + 12)) == NOT_WITHIN { (*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell++ @@ -155972,7 +156212,7 @@ func rtreeStepToLeaf(tls *libc.TLS, pCur uintptr) int32 { /* sqlite3.c:195514:12 } // Rtree virtual table module xNext method. -func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:195595:12: */ +func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:195635:12: */ var pCsr uintptr = pVtabCursor var rc int32 = SQLITE_OK @@ -155988,14 +156228,14 @@ func rtreeNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:195595:1 } // Rtree virtual table module xRowid method. -func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:195613:12: */ +func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:195653:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pCsr uintptr = pVtabCursor var p uintptr = rtreeSearchPointFirst(tls, pCsr) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK - var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp /* &rc */) + var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && p != 0 { *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = nodeGetRowid(tls, (*RtreeCursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell)) } @@ -156003,7 +156243,7 @@ func rtreeRowid(tls *libc.TLS, pVtabCursor uintptr, pRowid uintptr) int32 { /* s } // Rtree virtual table module xColumn method. -func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195627:12: */ +func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:195667:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -156013,7 +156253,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // var c RtreeCoord at bp+4, 4 *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK - var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp /* &rc */) + var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp) if *(*int32)(unsafe.Pointer(bp)) != 0 { return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -156024,12 +156264,12 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq if i == 0 { Xsqlite3_result_int64(tls, ctx, nodeGetRowid(tls, pRtree, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell))) } else if i <= int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { - nodeGetCoord(tls, pRtree, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell), i-1, bp+4 /* &c */) + nodeGetCoord(tls, pRtree, pNode, int32((*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell), i-1, bp+4) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { - Xsqlite3_result_double(tls, ctx, float64(*(*RtreeValue)(unsafe.Pointer(bp + 4 /* &c */)))) + Xsqlite3_result_double(tls, ctx, float64(*(*RtreeValue)(unsafe.Pointer(bp + 4)))) } else { - Xsqlite3_result_int(tls, ctx, *(*int32)(unsafe.Pointer(bp + 4 /* &c */))) + Xsqlite3_result_int(tls, ctx, *(*int32)(unsafe.Pointer(bp + 4))) } } else { if !(int32((*RtreeCursor)(unsafe.Pointer(pCsr)).FbAuxValid) != 0) { @@ -156064,7 +156304,7 @@ func rtreeColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sq // return SQLITE_OK. If there is no such record in the table, set // *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf // to zero and return an SQLite error code. -func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:195681:12: */ +func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piNode uintptr) int32 { /* sqlite3.c:195721:12: */ var rc int32 *(*uintptr)(unsafe.Pointer(ppLeaf)) = uintptr(0) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpReadRowid, 1, iRowid) @@ -156085,12 +156325,12 @@ func findLeafNode(tls *libc.TLS, pRtree uintptr, iRowid I64, ppLeaf uintptr, piN // as the second argument for a MATCH constraint. The value passed as the // first argument to this function is the right-hand operand to the MATCH // operator. -func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:195707:12: */ +func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { /* sqlite3.c:195747:12: */ var pBlob uintptr var pSrc uintptr // BLOB returned by geometry function var pInfo uintptr // Callback information - pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24700 /* "RtreeMatchArg" */) + pSrc = Xsqlite3_value_pointer(tls, pValue, ts+24869) if pSrc == uintptr(0) { return SQLITE_ERROR } @@ -156117,7 +156357,7 @@ func deserializeGeometry(tls *libc.TLS, pValue uintptr, pCons uintptr) int32 { / } // Rtree virtual table module xFilter method. -func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195737:12: */ +func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:195777:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -156144,7 +156384,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt var eType int32 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv))) if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT && Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) == float64(iRowid) { - rc = findLeafNode(tls, pRtree, iRowid, bp /* &pLeaf */, bp+4 /* &iNode */) + rc = findLeafNode(tls, pRtree, iRowid, bp, bp+4) } else { rc = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)) = uintptr(0) @@ -156155,7 +156395,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt *(*uintptr)(unsafe.Pointer(pCsr + 60)) = *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)) (*RtreeSearchPoint)(unsafe.Pointer(p)).Fid = *(*I64)(unsafe.Pointer(bp + 4 /* iNode */)) (*RtreeSearchPoint)(unsafe.Pointer(p)).FeWithin = U8(PARTLY_WITHIN) - rc = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)), iRowid, bp+12 /* &iCell */) + rc = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)), iRowid, bp+12) (*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell = U8(*(*int32)(unsafe.Pointer(bp + 12 /* iCell */))) } else { @@ -156164,7 +156404,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt } else { // Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array // with the configured constraints. - rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp+16 /* &pRoot */) + rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp+16) if rc == SQLITE_OK && argc > 0 { (*RtreeCursor)(unsafe.Pointer(pCsr)).FaConstraint = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(RtreeConstraint{}))*uint32(argc))) (*RtreeCursor)(unsafe.Pointer(pCsr)).FnConstraint = argc @@ -156260,7 +156500,7 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // The second of each pair of bytes identifies the coordinate column // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. -func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195890:12: */ +func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:195930:12: */ bp := tls.Alloc(49) defer tls.Free(49) @@ -156273,7 +156513,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql var iIdx int32 = 0 // var zIdxStr [41]int8 at bp+8, 41 - libc.Xmemset(tls, bp+8 /* &zIdxStr[0] */, 0, uint32(unsafe.Sizeof([41]int8{}))) + libc.Xmemset(tls, bp+8, 0, uint32(unsafe.Sizeof([41]int8{}))) // Check if there exists a MATCH constraint - even an unusable one. If there // is, do not consider the lookup-by-rowid plan as using such a plan would @@ -156345,8 +156585,8 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql break } if op != 0 { - *(*int8)(unsafe.Pointer(bp + 8 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = int8(op) - *(*int8)(unsafe.Pointer(bp + 8 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = int8((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn - 1 + '0') + *(*int8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&iIdx, 1)))) = int8(op) + *(*int8)(unsafe.Pointer(bp + 8 + uintptr(libc.PostIncInt32(&iIdx, 1)))) = int8((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn - 1 + '0') (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).FargvIndex = iIdx / 2 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).Fomit = uint8(1) } @@ -156355,7 +156595,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 - if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3601, libc.VaList(bp, bp+8))) { + if iIdx > 0 && uintptr(0) == libc.AssignPtrUintptr(pIdxInfo+24, Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, bp+8))) { return SQLITE_NOMEM } @@ -156367,7 +156607,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql } // Return the N-dimensional volumn of the cell stored in *p. -func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:195979:20: */ +func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:196019:20: */ var area RtreeDValue = RtreeDValue(1) if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { @@ -156410,7 +156650,7 @@ func cellArea(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3 // Return the margin length of cell p. The margin length is the sum // of the objects size in each dimension. -func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:196009:20: */ +func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlite3.c:196049:20: */ var margin RtreeDValue = RtreeDValue(0) var ii int32 = int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) - 2 for ok := true; ok; ok = ii >= 0 { @@ -156431,7 +156671,7 @@ func cellMargin(tls *libc.TLS, pRtree uintptr, p uintptr) RtreeDValue { /* sqlit } // Store the union of cells p1 and p2 in p1. -func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:196022:13: */ +func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlite3.c:196062:13: */ var ii int32 = 0 if int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_REAL32 { for ok := true; ok; ok = ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2) { @@ -156470,7 +156710,7 @@ func cellUnion(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) { /* sqlit // Return true if the area covered by p2 is a subset of the area covered // by p1. False otherwise. -func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:196043:12: */ +func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:196083:12: */ var ii int32 var isInt int32 = libc.Bool32(int32((*Rtree)(unsafe.Pointer(pRtree)).FeCoordType) == RTREE_COORD_INT32) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim2); ii = ii + 2 { @@ -156485,20 +156725,20 @@ func cellContains(tls *libc.TLS, pRtree uintptr, p1 uintptr, p2 uintptr) int32 { } // Return the amount cell p would grow by if it were unioned with pCell. -func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:196061:20: */ +func cellGrowth(tls *libc.TLS, pRtree uintptr, p uintptr, pCell uintptr) RtreeDValue { /* sqlite3.c:196101:20: */ bp := tls.Alloc(48) defer tls.Free(48) var area RtreeDValue // var cell RtreeCell at bp, 48 - libc.Xmemcpy(tls, bp /* &cell */, p, uint32(unsafe.Sizeof(RtreeCell{}))) - area = cellArea(tls, pRtree, bp /* &cell */) - cellUnion(tls, pRtree, bp /* &cell */, pCell) + libc.Xmemcpy(tls, bp, p, uint32(unsafe.Sizeof(RtreeCell{}))) + area = cellArea(tls, pRtree, bp) + cellUnion(tls, pRtree, bp, pCell) return cellArea(tls, pRtree, bp) - area } -func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:196070:20: */ +func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell int32) RtreeDValue { /* sqlite3.c:196110:20: */ var ii int32 var overlap RtreeDValue = 0.0 for ii = 0; ii < nCell; ii++ { @@ -156573,14 +156813,14 @@ func cellOverlap(tls *libc.TLS, pRtree uintptr, p uintptr, aCell uintptr, nCell // This function implements the ChooseLeaf algorithm from Gutman[84]. // ChooseSubTree in r*tree terminology. -func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:196102:12: */ +func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, ppLeaf uintptr) int32 { /* sqlite3.c:196142:12: */ bp := tls.Alloc(56) defer tls.Free(56) var rc int32 var ii int32 *(*uintptr)(unsafe.Pointer(bp /* pNode */)) = uintptr(0) - rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp /* &pNode */) + rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp) for ii = 0; rc == SQLITE_OK && ii < (*Rtree)(unsafe.Pointer(pRtree)).FiDepth-iHeight; ii++ { var iCell int32 @@ -156603,9 +156843,9 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp var bBest int32 = 0 var growth RtreeDValue var area RtreeDValue - nodeGetCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pNode */)), iCell, bp+4 /* &cell */) - growth = cellGrowth(tls, pRtree, bp+4 /* &cell */, pCell) - area = cellArea(tls, pRtree, bp+4 /* &cell */) + nodeGetCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pNode */)), iCell, bp+4) + growth = cellGrowth(tls, pRtree, bp+4, pCell) + area = cellArea(tls, pRtree, bp+4) if iCell == 0 || growth < fMinGrowth || growth == fMinGrowth && area < fMinArea { bBest = 1 } @@ -156617,7 +156857,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp } Xsqlite3_free(tls, aCell) - rc = nodeAcquire(tls, pRtree, iBest, *(*uintptr)(unsafe.Pointer(bp /* pNode */)), bp+52 /* &pChild */) + rc = nodeAcquire(tls, pRtree, iBest, *(*uintptr)(unsafe.Pointer(bp /* pNode */)), bp+52) nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pNode */))) *(*uintptr)(unsafe.Pointer(bp /* pNode */)) = *(*uintptr)(unsafe.Pointer(bp + 52 /* pChild */)) } @@ -156629,7 +156869,7 @@ func sChooseLeaf(tls *libc.TLS, pRtree uintptr, pCell uintptr, iHeight int32, pp // A cell with the same content as pCell has just been inserted into // the node pNode. This function updates the bounding box cells in // all ancestor elements. -func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196162:12: */ +func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) int32 { /* sqlite3.c:196202:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -156647,16 +156887,16 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in return SQLITE_CORRUPT | int32(1)<<8 } - rc = nodeParentIndex(tls, pRtree, p, bp /* &iCell */) + rc = nodeParentIndex(tls, pRtree, p, bp) if rc != SQLITE_OK { return SQLITE_CORRUPT | int32(1)<<8 } - nodeGetCell(tls, pRtree, pParent, *(*int32)(unsafe.Pointer(bp /* iCell */)), bp+4 /* &cell */) + nodeGetCell(tls, pRtree, pParent, *(*int32)(unsafe.Pointer(bp /* iCell */)), bp+4) if !(cellContains(tls, pRtree, bp+4, pCell) != 0) { - cellUnion(tls, pRtree, bp+4 /* &cell */, pCell) - nodeOverwriteCell(tls, pRtree, pParent, bp+4 /* &cell */, *(*int32)(unsafe.Pointer(bp /* iCell */))) + cellUnion(tls, pRtree, bp+4, pCell) + nodeOverwriteCell(tls, pRtree, pParent, bp+4, *(*int32)(unsafe.Pointer(bp /* iCell */))) } p = pParent @@ -156665,7 +156905,7 @@ func sAdjustTree(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr) in } // Write mapping (iRowid->iNode) to the <rtree>_rowid table. -func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:196200:12: */ +func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlite3_int64) int32 { /* sqlite3.c:196240:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1, iRowid) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2, iNode) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid) @@ -156673,7 +156913,7 @@ func rowidWrite(tls *libc.TLS, pRtree uintptr, iRowid Sqlite3_int64, iNode Sqlit } // Write mapping (iNode->iPar) to the <rtree>_parent table. -func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:196210:12: */ +func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite3_int64) int32 { /* sqlite3.c:196250:12: */ Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 1, iNode) Xsqlite3_bind_int64(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent, 2, iPar) Xsqlite3_step(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteParent) @@ -156695,7 +156935,7 @@ func parentWrite(tls *libc.TLS, pRtree uintptr, iNode Sqlite3_int64, iPar Sqlite // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:196237:13: */ +func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, aSpare uintptr) { /* sqlite3.c:196277:13: */ if nIdx > 1 { var iLeft int32 = 0 var iRight int32 = 0 @@ -156743,7 +156983,7 @@ func sSortByDistance(tls *libc.TLS, aIdx uintptr, nIdx int32, aDistance uintptr, // // The aSpare array is used as temporary working space by the // sorting algorithm. -func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:196303:13: */ +func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, iDim int32, aCell uintptr, aSpare uintptr) { /* sqlite3.c:196343:13: */ if nIdx > 1 { var iLeft int32 = 0 @@ -156799,7 +157039,7 @@ func sSortByDimension(tls *libc.TLS, pRtree uintptr, aIdx uintptr, nIdx int32, i } // Implementation of the R*-tree variant of SplitNode from Beckman[1990]. -func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:196362:12: */ +func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32, pLeft uintptr, pRight uintptr, pBboxLeft uintptr, pBboxRight uintptr) int32 { /* sqlite3.c:196402:12: */ bp := tls.Alloc(96) defer tls.Free(96) @@ -156845,18 +157085,18 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 var overlap RtreeDValue var area RtreeDValue - libc.Xmemcpy(tls, bp /* &left */, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*4)))))*48, uint32(unsafe.Sizeof(RtreeCell{}))) - libc.Xmemcpy(tls, bp+48 /* &right */, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*4)) + uintptr(nCell-1)*4)))*48, uint32(unsafe.Sizeof(RtreeCell{}))) + libc.Xmemcpy(tls, bp, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*4)))))*48, uint32(unsafe.Sizeof(RtreeCell{}))) + libc.Xmemcpy(tls, bp+48, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*4)) + uintptr(nCell-1)*4)))*48, uint32(unsafe.Sizeof(RtreeCell{}))) for kk = 1; kk < nCell-1; kk++ { if kk < nLeft { - cellUnion(tls, pRtree, bp /* &left */, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*4)) + uintptr(kk)*4)))*48) + cellUnion(tls, pRtree, bp, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*4)) + uintptr(kk)*4)))*48) } else { - cellUnion(tls, pRtree, bp+48 /* &right */, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*4)) + uintptr(kk)*4)))*48) + cellUnion(tls, pRtree, bp+48, aCell+uintptr(*(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aaSorted + uintptr(ii)*4)) + uintptr(kk)*4)))*48) } } margin = margin + cellMargin(tls, pRtree, bp) margin = margin + cellMargin(tls, pRtree, bp+48) - overlap = cellOverlap(tls, pRtree, bp /* &left */, bp+48 /* &right */, 1) + overlap = cellOverlap(tls, pRtree, bp, bp+48, 1) area = cellArea(tls, pRtree, bp) + cellArea(tls, pRtree, bp+48) if nLeft == ((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize-4)/int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)/3 || overlap < fBestOverlap || @@ -156898,7 +157138,7 @@ func splitNodeStartree(tls *libc.TLS, pRtree uintptr, aCell uintptr, nCell int32 return SQLITE_OK } -func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:196460:12: */ +func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:196500:12: */ var xSetMapping uintptr xSetMapping = func() uintptr { if iHeight == 0 { @@ -156932,7 +157172,7 @@ func updateMapping(tls *libc.TLS, pRtree uintptr, iRowid I64, pNode uintptr, iHe })(unsafe.Pointer(&struct{ uintptr }{xSetMapping})).f(tls, pRtree, iRowid, (*RtreeNode)(unsafe.Pointer(pNode)).FiNode) } -func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:196484:12: */ +func sSplitNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:196524:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -157016,7 +157256,7 @@ __7: libc.Xmemset(tls, (*RtreeNode)(unsafe.Pointer(pRight)).FzData, 0, uint32((*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) rc = splitNodeStartree(tls, pRtree, aCell, nCell, pLeft, pRight, - bp /* &leftbbox */, bp+48 /* &rightbbox */) + bp, bp+48) if !(rc != SQLITE_OK) { goto __8 } @@ -157042,7 +157282,7 @@ __9: if !((*RtreeNode)(unsafe.Pointer(pNode)).FiNode == int64(1)) { goto __10 } - rc = rtreeInsertCell(tls, pRtree, (*RtreeNode)(unsafe.Pointer(pLeft)).FpParent, bp /* &leftbbox */, iHeight+1) + rc = rtreeInsertCell(tls, pRtree, (*RtreeNode)(unsafe.Pointer(pLeft)).FpParent, bp, iHeight+1) if !(rc != SQLITE_OK) { goto __12 } @@ -157052,12 +157292,12 @@ __12: goto __11 __10: pParent = (*RtreeNode)(unsafe.Pointer(pLeft)).FpParent - rc = nodeParentIndex(tls, pRtree, pLeft, bp+96 /* &iCell */) + rc = nodeParentIndex(tls, pRtree, pLeft, bp+96) if !(rc == SQLITE_OK) { goto __13 } - nodeOverwriteCell(tls, pRtree, pParent, bp /* &leftbbox */, *(*int32)(unsafe.Pointer(bp + 96 /* iCell */))) - rc = sAdjustTree(tls, pRtree, pParent, bp /* &leftbbox */) + nodeOverwriteCell(tls, pRtree, pParent, bp, *(*int32)(unsafe.Pointer(bp + 96 /* iCell */))) + rc = sAdjustTree(tls, pRtree, pParent, bp) __13: ; @@ -157167,7 +157407,7 @@ splitnode_out: // rowid of the row to delete, which can be used to find the leaf on which // the entry resides (argument pLeaf). Once the leaf is located, this // function is called to determine its ancestry. -func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:196632:12: */ +func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqlite3.c:196672:12: */ var rc int32 = SQLITE_OK var pChild uintptr = pLeaf for rc == SQLITE_OK && (*RtreeNode)(unsafe.Pointer(pChild)).FiNode != int64(1) && (*RtreeNode)(unsafe.Pointer(pChild)).FpParent == uintptr(0) { @@ -157202,7 +157442,7 @@ func fixLeafParent(tls *libc.TLS, pRtree uintptr, pLeaf uintptr) int32 { /* sqli return rc } -func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:196667:12: */ +func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int32 { /* sqlite3.c:196707:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -157212,7 +157452,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int // var iCell int32 at bp, 4 // Remove the entry in the parent cell. - rc = nodeParentIndex(tls, pRtree, pNode, bp /* &iCell */) + rc = nodeParentIndex(tls, pRtree, pNode, bp) if rc == SQLITE_OK { pParent = (*RtreeNode)(unsafe.Pointer(pNode)).FpParent (*RtreeNode)(unsafe.Pointer(pNode)).FpParent = uintptr(0) @@ -157252,7 +157492,7 @@ func removeNode(tls *libc.TLS, pRtree uintptr, pNode uintptr, iHeight int32) int return SQLITE_OK } -func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196717:12: */ +func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196757:12: */ bp := tls.Alloc(100) defer tls.Free(100) @@ -157264,17 +157504,17 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql var nCell int32 = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) // var box RtreeCell at bp, 48 // Bounding box for pNode - nodeGetCell(tls, pRtree, pNode, 0, bp /* &box */) + nodeGetCell(tls, pRtree, pNode, 0, bp) for *(*int32)(unsafe.Pointer(bp + 96 /* ii */)) = 1; *(*int32)(unsafe.Pointer(bp + 96 /* ii */)) < nCell; *(*int32)(unsafe.Pointer(bp + 96 /* ii */))++ { // var cell RtreeCell at bp+48, 48 - nodeGetCell(tls, pRtree, pNode, *(*int32)(unsafe.Pointer(bp + 96 /* ii */)), bp+48 /* &cell */) - cellUnion(tls, pRtree, bp /* &box */, bp+48 /* &cell */) + nodeGetCell(tls, pRtree, pNode, *(*int32)(unsafe.Pointer(bp + 96 /* ii */)), bp+48) + cellUnion(tls, pRtree, bp, bp+48) } (*RtreeCell)(unsafe.Pointer(bp /* &box */)).FiRowid = (*RtreeNode)(unsafe.Pointer(pNode)).FiNode - rc = nodeParentIndex(tls, pRtree, pNode, bp+96 /* &ii */) + rc = nodeParentIndex(tls, pRtree, pNode, bp+96) if rc == SQLITE_OK { - nodeOverwriteCell(tls, pRtree, pParent, bp /* &box */, *(*int32)(unsafe.Pointer(bp + 96 /* ii */))) + nodeOverwriteCell(tls, pRtree, pParent, bp, *(*int32)(unsafe.Pointer(bp + 96 /* ii */))) rc = fixBoundingBox(tls, pRtree, pParent) } } @@ -157283,7 +157523,7 @@ func fixBoundingBox(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sql // Delete the cell at index iCell of node pNode. After removing the // cell, adjust the r-tree data structure if required. -func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:196744:12: */ +func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeight int32) int32 { /* sqlite3.c:196784:12: */ var pParent uintptr var rc int32 @@ -157312,7 +157552,7 @@ func deleteCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, iCell int32, iHeig return rc } -func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:196775:12: */ +func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:196815:12: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -157328,7 +157568,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei var rc int32 = SQLITE_OK var n int32 - libc.Xmemset(tls, bp /* &aCenterCoord[0] */, 0, uint32(unsafe.Sizeof(RtreeDValue(0)))*uint32(RTREE_MAX_DIMENSIONS)) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(RtreeDValue(0)))*uint32(RTREE_MAX_DIMENSIONS)) nCell = readInt16(tls, (*RtreeNode)(unsafe.Pointer(pNode)).FzData+2) + 1 n = (nCell + 1) & libc.CplInt32(1) @@ -157366,7 +157606,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei } } for iDim = 0; iDim < int32((*Rtree)(unsafe.Pointer(pRtree)).FnDim); iDim++ { - *(*RtreeDValue)(unsafe.Pointer(bp /* &aCenterCoord[0] */ + uintptr(iDim)*8)) = *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8)) / (float64(nCell) * RtreeDValue(2)) + *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8)) = *(*RtreeDValue)(unsafe.Pointer(bp + uintptr(iDim)*8)) / (float64(nCell) * RtreeDValue(2)) } for ii = 0; ii < nCell; ii++ { @@ -157410,7 +157650,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // var pInsert uintptr at bp+40, 4 var p uintptr = aCell + uintptr(*(*int32)(unsafe.Pointer(aOrder + uintptr(ii)*4)))*48 - rc = sChooseLeaf(tls, pRtree, p, iHeight, bp+40 /* &pInsert */) + rc = sChooseLeaf(tls, pRtree, p, iHeight, bp+40) if rc == SQLITE_OK { var rc2 int32 rc = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 40 /* pInsert */)), p, iHeight) @@ -157427,7 +157667,7 @@ func sReinsert(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHei // Insert cell pCell into node pNode. Node pNode is the head of a // subtree iHeight high (leaf nodes have iHeight==0). -func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:196880:12: */ +func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr, iHeight int32) int32 { /* sqlite3.c:196920:12: */ var rc int32 = SQLITE_OK if iHeight > 0 { var pChild uintptr = nodeHashLookup(tls, pRtree, (*RtreeCell)(unsafe.Pointer(pCell)).FiRowid) @@ -157457,7 +157697,7 @@ func rtreeInsertCell(tls *libc.TLS, pRtree uintptr, pNode uintptr, pCell uintptr return rc } -func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196915:12: */ +func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { /* sqlite3.c:196955:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -157470,14 +157710,14 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / // var cell RtreeCell at bp, 48 - nodeGetCell(tls, pRtree, pNode, ii, bp /* &cell */) + nodeGetCell(tls, pRtree, pNode, ii, bp) // Find a node to store this cell in. pNode->iNode currently contains // the height of the sub-tree headed by the cell. - rc = sChooseLeaf(tls, pRtree, bp /* &cell */, int32((*RtreeNode)(unsafe.Pointer(pNode)).FiNode), bp+48 /* &pInsert */) + rc = sChooseLeaf(tls, pRtree, bp, int32((*RtreeNode)(unsafe.Pointer(pNode)).FiNode), bp+48) if rc == SQLITE_OK { var rc2 int32 - rc = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pInsert */)), bp /* &cell */, int32((*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) + rc = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pInsert */)), bp, int32((*RtreeNode)(unsafe.Pointer(pNode)).FiNode)) rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pInsert */))) if rc == SQLITE_OK { rc = rc2 @@ -157488,7 +157728,7 @@ func reinsertNodeContent(tls *libc.TLS, pRtree uintptr, pNode uintptr) int32 { / } // Select a currently unused rowid for a new r-tree record. -func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:196944:12: */ +func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sqlite3.c:196984:12: */ var rc int32 Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 1) Xsqlite3_bind_null(tls, (*Rtree)(unsafe.Pointer(pRtree)).FpWriteRowid, 2) @@ -157499,7 +157739,7 @@ func rtreeNewRowid(tls *libc.TLS, pRtree uintptr, piRowid uintptr) int32 { /* sq } // Remove the entry with rowid=iDelete from the r-tree structure. -func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:196957:12: */ +func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int32 { /* sqlite3.c:196997:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -157510,18 +157750,18 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 *(*uintptr)(unsafe.Pointer(bp /* pRoot */)) = uintptr(0) // Root node of rtree structure // Obtain a reference to the root node to initialize Rtree.iDepth - rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp /* &pRoot */) + rc = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp) // Obtain a reference to the leaf node that contains the entry // about to be deleted. if rc == SQLITE_OK { - rc = findLeafNode(tls, pRtree, iDelete, bp+4 /* &pLeaf */, uintptr(0)) + rc = findLeafNode(tls, pRtree, iDelete, bp+4, uintptr(0)) } // Delete the cell in question from the leaf node. if rc == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp + 4)) != 0 { var rc2 int32 - rc = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 4 /* pLeaf */)), iDelete, bp+8 /* &iCell */) + rc = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 4 /* pLeaf */)), iDelete, bp+8) if rc == SQLITE_OK { rc = deleteCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 4 /* pLeaf */)), *(*int32)(unsafe.Pointer(bp + 8 /* iCell */)), 0) } @@ -157549,7 +157789,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 var rc2 int32 *(*uintptr)(unsafe.Pointer(bp + 12 /* pChild */)) = uintptr(0) var iChild I64 = nodeGetRowid(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pRoot */)), 0) - rc = nodeAcquire(tls, pRtree, iChild, *(*uintptr)(unsafe.Pointer(bp /* pRoot */)), bp+12 /* &pChild */) // tag-20210916a + rc = nodeAcquire(tls, pRtree, iChild, *(*uintptr)(unsafe.Pointer(bp /* pRoot */)), bp+12) // tag-20210916a if rc == SQLITE_OK { rc = removeNode(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 12 /* pChild */)), (*Rtree)(unsafe.Pointer(pRtree)).FiDepth-1) } @@ -157588,7 +157828,7 @@ func rtreeDeleteRowid(tls *libc.TLS, pRtree uintptr, iDelete Sqlite3_int64) int3 // Convert an sqlite3_value into an RtreeValue (presumably a float) // while taking care to round toward negative or positive, respectively. -func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:197054:19: */ +func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:197094:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) > d { @@ -157602,7 +157842,7 @@ func rtreeValueDown(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:197054:1 return f } -func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:197062:19: */ +func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:197102:19: */ var d float64 = Xsqlite3_value_double(tls, v) var f float32 = float32(d) if float64(f) < d { @@ -157627,7 +157867,7 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:197062:19: // (c1<=c2) constraint on columns iCol and iCol+1 that has failed. // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. -func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:197085:12: */ +func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:197125:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -157635,9 +157875,9 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+24714 /* "SELECT * FROM %Q..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + zSql = Xsqlite3_mprintf(tls, ts+24883, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { - rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56, uintptr(0)) } else { rc = SQLITE_NOMEM } @@ -157647,12 +157887,12 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if iCol == 0 { var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24734 /* "UNIQUE constrain..." */, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24903, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol+1) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24766 /* "rtree constraint..." */, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+24935, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } @@ -157666,7 +157906,7 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* } // The xUpdate method for rtree module virtual tables. -func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:197123:12: */ +func rtreeUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:197163:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -157847,14 +158087,14 @@ __21: if !(rc == SQLITE_OK) { goto __22 } - rc = sChooseLeaf(tls, pRtree, bp /* &cell */, 0, bp+48 /* &pLeaf */) + rc = sChooseLeaf(tls, pRtree, bp, 0, bp+48) __22: ; if !(rc == SQLITE_OK) { goto __23 } (*Rtree)(unsafe.Pointer(pRtree)).FiReinsertHeight = -1 - rc = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pLeaf */)), bp /* &cell */, 0) + rc = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pLeaf */)), bp, 0) rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 48 /* pLeaf */))) if !(rc == SQLITE_OK) { goto __24 @@ -157895,7 +158135,7 @@ constraint: } // Called when a transaction starts. -func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:197271:12: */ +func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:197311:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans++ @@ -157904,7 +158144,7 @@ func rtreeBeginTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:19 // Called when a transaction completes (either by COMMIT or ROLLBACK). // The sqlite3_blob object should be released at this point. -func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:197282:12: */ +func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:197322:12: */ var pRtree uintptr = pVtab (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans = U8(0) nodeBlobReset(tls, pRtree) @@ -157912,7 +158152,7 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1972 } // The xRename method for rtree module virtual tables. -func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:197292:12: */ +func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:197332:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -157920,7 +158160,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli var rc int32 = SQLITE_NOMEM var zSql uintptr = Xsqlite3_mprintf(tls, - ts+24803 /* "ALTER TABLE %Q.'..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) + ts+24972, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zNewName)) if zSql != 0 { nodeBlobReset(tls, pRtree) rc = Xsqlite3_exec(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) @@ -157941,7 +158181,7 @@ func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqli // INSERT INTO rtree... // DROP TABLE <tablename>; -- Would fail with SQLITE_LOCKED // COMMIT; -func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:197325:12: */ +func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:197365:12: */ var pRtree uintptr = pVtab var iwt U8 = (*Rtree)(unsafe.Pointer(pRtree)).FinWrTrans _ = iSavepoint @@ -157954,11 +158194,11 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // This function populates the pRtree->nRowEst variable with an estimate // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. -func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:197340:12: */ +func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:197380:12: */ bp := tls.Alloc(20) defer tls.Free(20) - var zFmt uintptr = ts + 24948 /* "SELECT stat FROM..." */ + var zFmt uintptr = ts + 25117 /* "SELECT stat FROM..." */ var zSql uintptr // var p uintptr at bp+16, 4 @@ -157966,7 +158206,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit var nRow I64 = int64(RTREE_MIN_ROWEST) rc = Xsqlite3_table_column_metadata(tls, - db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11186 /* "sqlite_stat1" */, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) + db, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, ts+11208, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc != SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FnRowEst = int64(RTREE_DEFAULT_ROWEST) if rc == SQLITE_ERROR { @@ -157978,7 +158218,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+16 /* &p */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+16, uintptr(0)) if rc == SQLITE_OK { if Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16))) == SQLITE_ROW { nRow = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)), 0) @@ -157998,7 +158238,7 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit // Return true if zName is the extension on one of the shadow tables used // by this module. -func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:197374:12: */ +func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:197414:12: */ var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(azName1))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName1[i]) == 0 { @@ -158009,8 +158249,8 @@ func rtreeShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:197374:1 } var azName1 = [3]uintptr{ - ts + 25004 /* "node" */, ts + 4980 /* "parent" */, ts + 15961, /* "rowid" */ -} /* sqlite3.c:197375:21 */ + ts + 25173, ts + 5002, ts + 16134, +} /* sqlite3.c:197415:21 */ var rtreeModule = Sqlite3_module{ FiVersion: 3, // iVersion @@ -158034,9 +158274,9 @@ var rtreeModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:197385:23 */ +} /* sqlite3.c:197425:23 */ -func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:197412:12: */ +func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:197452:12: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -158053,19 +158293,19 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 Xsqlite3_str_appendf(tls, p, - ts+25009, /* "CREATE TABLE \"%w..." */ + ts+25178, libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25071 /* ",a%d" */, libc.VaList(bp+16, ii)) + Xsqlite3_str_appendf(tls, p, ts+25240, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, - ts+25076, /* ");CREATE TABLE \"..." */ + ts+25245, libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25140, /* "CREATE TABLE \"%w..." */ + ts+25309, libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, - ts+25210, /* "INSERT INTO \"%w\"..." */ + ts+25379, libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { @@ -158078,14 +158318,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } } - *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */)) = pRtree + 76 - *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 1*4)) = pRtree + 80 - *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 2*4)) = pRtree + 84 - *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 3*4)) = pRtree + 88 - *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 4*4)) = pRtree + 92 - *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 5*4)) = pRtree + 96 - *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 6*4)) = pRtree + 100 - *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 7*4)) = pRtree + 104 + *(*uintptr)(unsafe.Pointer(bp + 168)) = pRtree + 76 + *(*uintptr)(unsafe.Pointer(bp + 168 + 1*4)) = pRtree + 80 + *(*uintptr)(unsafe.Pointer(bp + 168 + 2*4)) = pRtree + 84 + *(*uintptr)(unsafe.Pointer(bp + 168 + 3*4)) = pRtree + 88 + *(*uintptr)(unsafe.Pointer(bp + 168 + 4*4)) = pRtree + 92 + *(*uintptr)(unsafe.Pointer(bp + 168 + 5*4)) = pRtree + 96 + *(*uintptr)(unsafe.Pointer(bp + 168 + 6*4)) = pRtree + 100 + *(*uintptr)(unsafe.Pointer(bp + 168 + 7*4)) = pRtree + 104 rc = rtreeQueryStat1(tls, db, pRtree) for i = 0; i < N_STATEMENT && rc == SQLITE_OK; i++ { @@ -158096,11 +158336,11 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } else { // An UPSERT is very slightly slower than REPLACE, but it is needed // if there are auxiliary columns - zFormat = ts + 25259 /* "INSERT INTO\"%w\"...." */ + zFormat = ts + 25428 /* "INSERT INTO\"%w\"...." */ } zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { - rc = Xsqlite3_prepare_v3(tls, db, zSql, -1, uint32(f), *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + uintptr(i)*4)), uintptr(0)) + rc = Xsqlite3_prepare_v3(tls, db, zSql, -1, uint32(f), *(*uintptr)(unsafe.Pointer(bp + 168 + uintptr(i)*4)), uintptr(0)) } else { rc = SQLITE_NOMEM } @@ -158108,7 +158348,7 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, - ts+25367, /* "SELECT * FROM \"%..." */ + ts+25536, libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM @@ -158116,18 +158356,18 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25412 /* "UPDATE \"%w\".\"%w_..." */, libc.VaList(bp+112, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25581, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { - Xsqlite3_str_append(tls, p, ts+12660 /* "," */, 1) + Xsqlite3_str_append(tls, p, ts+12682, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25439 /* "a%d=coalesce(?%d..." */, libc.VaList(bp+128, ii, ii+2, ii)) + Xsqlite3_str_appendf(tls, p, ts+25608, libc.VaList(bp+128, ii, ii+2, ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25461 /* "a%d=?%d" */, libc.VaList(bp+152, ii, ii+2)) + Xsqlite3_str_appendf(tls, p, ts+25630, libc.VaList(bp+152, ii, ii+2)) } } - Xsqlite3_str_appendf(tls, p, ts+25469 /* " WHERE rowid=?1" */, 0) + Xsqlite3_str_appendf(tls, p, ts+25638, 0) zSql = Xsqlite3_str_finish(tls, p) if zSql == uintptr(0) { rc = SQLITE_NOMEM @@ -158142,34 +158382,32 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } var azSql = [8]uintptr{ - // Write the xxx_node table - ts + 25485, /* "INSERT OR REPLAC..." */ - ts + 25538, /* "DELETE FROM '%q'..." */ - // Read and write the xxx_rowid table - ts + 25583, /* "SELECT nodeno FR..." */ - ts + 25635, /* "INSERT OR REPLAC..." */ - ts + 25689, /* "DELETE FROM '%q'..." */ + ts + 25654, + ts + 25707, - // Read and write the xxx_parent table - ts + 25734, /* "SELECT parentnod..." */ - ts + 25792, /* "INSERT OR REPLAC..." */ - ts + 25847, /* "DELETE FROM '%q'..." */ -} /* sqlite3.c:197422:21 */ + ts + 25752, + ts + 25804, + ts + 25858, + + ts + 25903, + ts + 25961, + ts + 26016, +} /* sqlite3.c:197462:21 */ // The second argument to this function contains the text of an SQL statement // that returns a single integer value. The statement is compiled and executed // using database connection db. If successful, the integer value returned // is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error // code is returned and the value of *piVal after returning is not defined. -func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:197545:12: */ +func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int32 { /* sqlite3.c:197585:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 = SQLITE_NOMEM if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp, uintptr(0)) if rc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { *(*int32)(unsafe.Pointer(piVal)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -158193,7 +158431,7 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // This ensures that each node is stored on a single database page. If the // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. -func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:197575:12: */ +func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:197615:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -158201,27 +158439,27 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr var zSql uintptr if isCreate != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 - zSql = Xsqlite3_mprintf(tls, ts+25894 /* "PRAGMA %Q.page_s..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) - rc = getIntFromStmt(tls, db, zSql, bp+48 /* &iPageSize */) + zSql = Xsqlite3_mprintf(tls, ts+26063, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) + rc = getIntFromStmt(tls, db, zSql, bp+48) if rc == SQLITE_OK { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = *(*int32)(unsafe.Pointer(bp + 48)) - 64 if 4+int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS < (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = 4 + int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell)*RTREE_MAXCELLS } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, - ts+25914, /* "SELECT length(da..." */ + ts+26083, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, pRtree+16) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < 512-64 { rc = SQLITE_CORRUPT | int32(1)<<8 - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+25971, /* "undersize RTree ..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26140, libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -158231,12 +158469,12 @@ func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzEr } // Return the length of a token -func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:197618:12: */ +func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:197658:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* dummy */)) = 0 - return Xsqlite3GetToken(tls, z, bp /* &dummy */) + return Xsqlite3GetToken(tls, z, bp) } // This function is the implementation of both the xConnect and xCreate @@ -158246,7 +158484,7 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:197618:12: // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:197632:12: */ +func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:197672:12: */ bp := tls.Alloc(116) defer tls.Free(116) @@ -158272,17 +158510,17 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr ii = 4 *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 - ts + 26006, /* "Wrong number of ..." */ // 1 - ts + 26049, /* "Too few columns ..." */ // 2 - ts + 26084, /* "Too many columns..." */ // 3 - ts + 26120, /* "Auxiliary rtree ..." */ // 4 + ts + 26175, + ts + 26218, + ts + 26253, + ts + 26289, } // Aux columns counted by a u8 if !(argc < 6 || argc > RTREE_MAX_AUX_COLUMN+3) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + uintptr(2+libc.Bool32(argc >= 6))*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(2+libc.Bool32(argc >= 6))*4)))) return SQLITE_ERROR __1: ; @@ -158312,7 +158550,7 @@ __2: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+26157, /* "CREATE TABLE x(%..." */ + Xsqlite3_str_appendf(tls, pSql, ts+26326, libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*4))), *(*uintptr)(unsafe.Pointer(argv + 3*4)))) ii = 4 __3: @@ -158324,7 +158562,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26181 /* ",%.*s" */, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) + Xsqlite3_str_appendf(tls, pSql, ts+26350, libc.VaList(bp+32, rtreeTokenLength(tls, zArg+uintptr(1)), zArg+uintptr(1))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -158347,7 +158585,7 @@ __4: goto __5 __5: ; - Xsqlite3_str_appendf(tls, pSql, ts+26187 /* ");" */, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26356, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __10 @@ -158358,14 +158596,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + 4*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 + 4*4)))) rc = SQLITE_ERROR goto __13 __12: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __14 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -158408,7 +158646,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + uintptr(iErr)*4)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 + uintptr(iErr)*4)))) goto rtreeInit_fail __22: ; @@ -158426,7 +158664,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -158446,7 +158684,7 @@ __25: return rc } -var azFormat = [2]uintptr{ts + 26190 /* ",%.*s REAL" */, ts + 26201 /* ",%.*s INT" */} /* sqlite3.c:197698:25 */ +var azFormat = [2]uintptr{ts + 26359, ts + 26370} /* sqlite3.c:197738:25 */ // Implementation of a scalar function that decodes r-tree nodes to // human readable strings. This can be used for debugging and analysis. @@ -158462,7 +158700,7 @@ var azFormat = [2]uintptr{ts + 26190 /* ",%.*s REAL" */, ts + 26201 /* ",%.*s IN // entry for each cell in the r-tree node. Each entry is itself a // list, containing the 8-byte rowid/pageno followed by the // <num-dimension>*2 coordinates. -func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:197769:13: */ +func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:197809:13: */ bp := tls.Alloc(592) defer tls.Free(592) @@ -158476,8 +158714,8 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit var pOut uintptr _ = nArg - libc.Xmemset(tls, bp+16 /* &node */, 0, uint32(unsafe.Sizeof(RtreeNode{}))) - libc.Xmemset(tls, bp+44 /* &tree */, 0, uint32(unsafe.Sizeof(Rtree{}))) + libc.Xmemset(tls, bp+16, 0, uint32(unsafe.Sizeof(RtreeNode{}))) + libc.Xmemset(tls, bp+44, 0, uint32(unsafe.Sizeof(Rtree{}))) (*Rtree)(unsafe.Pointer(bp + 44 /* &tree */)).FnDim = U8(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apArg)))) if int32((*Rtree)(unsafe.Pointer(bp+44)).FnDim) < 1 || int32((*Rtree)(unsafe.Pointer(bp+44)).FnDim) > 5 { return @@ -158502,15 +158740,15 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit var jj int32 - nodeGetCell(tls, bp+44 /* &tree */, bp+16 /* &node */, ii, bp+544 /* &cell */) + nodeGetCell(tls, bp+44, bp+16, ii, bp+544) if ii > 0 { - Xsqlite3_str_append(tls, pOut, ts+10766 /* " " */, 1) + Xsqlite3_str_append(tls, pOut, ts+10788, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26211 /* "{%lld" */, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544 /* &cell */)).FiRowid)) + Xsqlite3_str_appendf(tls, pOut, ts+26380, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+544 /* &cell */)).FiRowid)) for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+44 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26217 /* " %g" */, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26386, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer(bp + 544 + 8 + uintptr(jj)*4))))) } - Xsqlite3_str_append(tls, pOut, ts+26221 /* "}" */, 1) + Xsqlite3_str_append(tls, pOut, ts+26390, 1) } errCode = Xsqlite3_str_errcode(tls, pOut) Xsqlite3_result_text(tls, ctx, Xsqlite3_str_finish(tls, pOut), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) @@ -158525,11 +158763,11 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit // The depth value is 0 for all nodes other than the root node, and the root // node always has nodeno=1, so the example above is the primary use for this // routine. This routine is intended for testing and analysis only. -func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:197821:13: */ +func rtreedepth(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:197861:13: */ _ = nArg if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg))) != SQLITE_BLOB || Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg))) < 2 { - Xsqlite3_result_error(tls, ctx, ts+26223 /* "Invalid argument..." */, -1) + Xsqlite3_result_error(tls, ctx, ts+26392, -1) } else { var zBlob uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg))) if zBlob != 0 { @@ -158555,15 +158793,15 @@ type RtreeCheck1 = struct { Frc int32 FzReport uintptr FnErr int32 -} /* sqlite3.c:197842:9 */ +} /* sqlite3.c:197882:9 */ // Context object passed between the various routines that make up the // implementation of integrity-check function rtreecheck(). -type RtreeCheck = RtreeCheck1 /* sqlite3.c:197842:27 */ +type RtreeCheck = RtreeCheck1 /* sqlite3.c:197882:27 */ // Reset SQL statement pStmt. If the sqlite3_reset() call returns an error, // and RtreeCheck.rc==SQLITE_OK, set RtreeCheck.rc to the error code. -func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:197864:13: */ +func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3.c:197904:13: */ var rc int32 = Xsqlite3_reset(tls, pStmt) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = rc @@ -158576,7 +158814,7 @@ func rtreeCheckReset(tls *libc.TLS, pCheck uintptr, pStmt uintptr) { /* sqlite3. // // If successful, a pointer to the new SQL statement is returned. Otherwise, // NULL is returned and an error code left in RtreeCheck.rc. -func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:197877:21: */ +func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:197917:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -158592,7 +158830,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_prepare_v2(tls, (*RtreeCheck)(unsafe.Pointer(pCheck)).Fdb, z, -1, bp /* &pRet */, uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_prepare_v2(tls, (*RtreeCheck)(unsafe.Pointer(pCheck)).Fdb, z, -1, bp, uintptr(0)) } } @@ -158604,7 +158842,7 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // The second and subsequent arguments to this function are a printf() // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. -func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:197906:13: */ +func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:197946:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -158616,12 +158854,12 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr if z == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM } else { - (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26256, /* "%z%s%z" */ + (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport = Xsqlite3_mprintf(tls, ts+26425, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport, func() uintptr { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport != 0 { - return ts + 3982 /* "\n" */ + return ts + 4004 /* "\n" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), z)) if (*RtreeCheck)(unsafe.Pointer(pCheck)).FzReport == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = SQLITE_NOMEM @@ -158644,7 +158882,7 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // Or, if an error does occur, NULL is returned and an error code left // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. -func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:197940:11: */ +func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:197980:11: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -158652,7 +158890,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode == uintptr(0) { (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode = rtreeCheckPrepare(tls, pCheck, - ts+26263, /* "SELECT data FROM..." */ + ts+26432, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } @@ -158671,7 +158909,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK && pRet == uintptr(0) { - rtreeCheckAppendMsg(tls, pCheck, ts+26308 /* "Node %lld missin..." */, libc.VaList(bp+16, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26477, libc.VaList(bp+16, iNode)) } } @@ -158688,20 +158926,20 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // In both cases, this function checks that there exists an entry with // IPK value iKey and the second column set to iVal. // -func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:197984:13: */ +func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:198024:13: */ bp := tls.Alloc(88) defer tls.Free(88) var rc int32 var pStmt uintptr *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ - ts + 26340, /* "SELECT parentnod..." */ - ts + 26394, /* "SELECT nodeno FR..." */ + ts + 26509, + ts + 26563, } if *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) == uintptr(0) { *(*uintptr)(unsafe.Pointer(pCheck + 24 + uintptr(bLeaf)*4)) = rtreeCheckPrepare(tls, pCheck, - *(*uintptr)(unsafe.Pointer(bp + 80 /* &azSql[0] */ + uintptr(bLeaf)*4)), libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) + *(*uintptr)(unsafe.Pointer(bp + 80 + uintptr(bLeaf)*4)), libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc != SQLITE_OK { return @@ -158711,23 +158949,23 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa Xsqlite3_bind_int64(tls, pStmt, 1, iKey) rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { - rtreeCheckAppendMsg(tls, pCheck, ts+26442, /* "Mapping (%lld ->..." */ + rtreeCheckAppendMsg(tls, pCheck, ts+26611, libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { - return ts + 26487 /* "%_rowid" */ + return ts + 26656 /* "%_rowid" */ } - return ts + 26495 /* "%_parent" */ + return ts + 26664 /* "%_parent" */ }())) } else if rc == SQLITE_ROW { var ii I64 = Xsqlite3_column_int64(tls, pStmt, 0) if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, - ts+26504, /* "Found (%lld -> %..." */ + ts+26673, libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { - return ts + 26487 /* "%_rowid" */ + return ts + 26656 /* "%_rowid" */ } - return ts + 26495 /* "%_parent" */ + return ts + 26664 /* "%_parent" */ }(), iKey, iVal)) } } @@ -158744,7 +158982,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // containing pCell. In this case it is also verified that the two // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. -func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:198036:13: */ +func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:198076:13: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -158759,8 +158997,8 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, var i int32 for i = 0; i < (*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim; i++ { - readCoord(tls, pCell+uintptr(4*2*i), bp+48 /* &c1 */) - readCoord(tls, pCell+uintptr(4*(2*i+1)), bp+52 /* &c2 */) + readCoord(tls, pCell+uintptr(4*2*i), bp+48) + readCoord(tls, pCell+uintptr(4*(2*i+1)), bp+52) // printf("%e, %e\n", c1.u.f, c2.u.f); if func() int32 { @@ -158770,12 +159008,12 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48)) > *(*RtreeValue)(unsafe.Pointer(bp + 52))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26562 /* "Dimension %d of ..." */, libc.VaList(bp, i, iCell, iNode)) + ts+26731, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { - readCoord(tls, pParent+uintptr(4*2*i), bp+56 /* &p1 */) - readCoord(tls, pParent+uintptr(4*(2*i+1)), bp+60 /* &p2 */) + readCoord(tls, pParent+uintptr(4*2*i), bp+56) + readCoord(tls, pParent+uintptr(4*(2*i+1)), bp+60) if func() int32 { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FbInt != 0 { @@ -158790,7 +159028,7 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, return libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52)) > *(*RtreeValue)(unsafe.Pointer(bp + 60))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, - ts+26610 /* "Dimension %d of ..." */, libc.VaList(bp+24, i, iCell, iNode)) + ts+26779, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -158802,25 +159040,25 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. -func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:198082:13: */ +func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:198122:13: */ bp := tls.Alloc(52) defer tls.Free(52) var aNode uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)) = 0 - aNode = rtreeCheckGetNode(tls, pCheck, iNode, bp+48 /* &nNode */) + aNode = rtreeCheckGetNode(tls, pCheck, iNode, bp+48) if aNode != 0 { if *(*int32)(unsafe.Pointer(bp + 48)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26677 /* "Node %lld is too..." */, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) + ts+26846, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26711 /* "Rtree depth out ..." */, libc.VaList(bp+16, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26880, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } @@ -158828,7 +159066,7 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr nCell = readInt16(tls, aNode+2) if 4+nCell*(8+(*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim*2*4) > *(*int32)(unsafe.Pointer(bp + 48)) { rtreeCheckAppendMsg(tls, pCheck, - ts+26741, /* "Node %lld is too..." */ + ts+26910, libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { @@ -158856,20 +159094,20 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // %_rowid or %_parent table is exactly nExpect. If not, it adds // an error message to the report in the RtreeCheck object indicated // by the first argument. -func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:198145:13: */ +func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:198185:13: */ bp := tls.Alloc(48) defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr - pCount = rtreeCheckPrepare(tls, pCheck, ts+26796, /* "SELECT count(*) ..." */ + pCount = rtreeCheckPrepare(tls, pCheck, ts+26965, libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab, zTbl)) if pCount != 0 { if Xsqlite3_step(tls, pCount) == SQLITE_ROW { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+26827 /* "Wrong number of ..." */, libc.VaList(bp+24, zTbl, nExpect, nActual)) + ts+26996, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -158879,7 +159117,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. -func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:198169:12: */ +func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:198209:12: */ bp := tls.Alloc(84) defer tls.Free(84) @@ -158890,7 +159128,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep var nAux int32 = 0 // Number of extra columns. // Initialize the context object - libc.Xmemset(tls, bp+32 /* &check */, 0, uint32(unsafe.Sizeof(RtreeCheck{}))) + libc.Xmemset(tls, bp+32, 0, uint32(unsafe.Sizeof(RtreeCheck{}))) (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Fdb = db (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FzDb = zDb (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FzTab = zTab @@ -158899,13 +159137,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14396 /* "BEGIN" */, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14418, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+32 /* &check */, ts+26894 /* "SELECT * FROM %Q..." */, libc.VaList(bp, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+27063, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = Xsqlite3_column_count(tls, pStmt) - 2 Xsqlite3_finalize(tls, pStmt) @@ -158915,12 +159153,12 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+32 /* &check */, ts+24714 /* "SELECT * FROM %Q..." */, libc.VaList(bp+16, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32, ts+24883, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (Xsqlite3_column_count(tls, pStmt) - 1 - nAux) / 2 if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+32 /* &check */, ts+26922 /* "Schema corrupt o..." */, 0) + rtreeCheckAppendMsg(tls, bp+32, ts+27091, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER) } @@ -158933,10 +159171,10 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // Do the actual integrity-check if (*RtreeCheck)(unsafe.Pointer(bp+32)).FnDim >= 1 { if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { - rtreeCheckNode(tls, bp+32 /* &check */, 0, uintptr(0), int64(1)) + rtreeCheckNode(tls, bp+32, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+32 /* &check */, ts+26953 /* "_rowid" */, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+32 /* &check */, ts+26960 /* "_parent" */, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32, ts+27122, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32, ts+27129, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check @@ -158946,7 +159184,7 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // If one was opened, close the transaction if bEnd != 0 { - var rc int32 = Xsqlite3_exec(tls, db, ts+26968 /* "END" */, uintptr(0), uintptr(0), uintptr(0)) + var rc int32 = Xsqlite3_exec(tls, db, ts+27137, uintptr(0), uintptr(0), uintptr(0)) if (*RtreeCheck)(unsafe.Pointer(bp+32)).Frc == SQLITE_OK { (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } @@ -158986,13 +159224,13 @@ func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzRep // as there are non-leaf cells in the r-tree structure, and that // there is a non-leaf cell that corresponds to each entry in the // %_parent table. -func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:198276:13: */ +func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:198316:13: */ bp := tls.Alloc(4) defer tls.Free(4) if nArg != 1 && nArg != 2 { Xsqlite3_result_error(tls, ctx, - ts+26972 /* "wrong number of ..." */, -1) + ts+27141, -1) } else { var rc int32 *(*uintptr)(unsafe.Pointer(bp /* zReport */)) = uintptr(0) @@ -159000,17 +159238,17 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli var zTab uintptr if nArg == 1 { zTab = zDb - zDb = ts + 6305 /* "main" */ + zDb = ts + 6327 /* "main" */ } else { zTab = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*4))) } - rc = rtreeCheckTable(tls, Xsqlite3_context_db_handle(tls, ctx), zDb, zTab, bp /* &zReport */) + rc = rtreeCheckTable(tls, Xsqlite3_context_db_handle(tls, ctx), zDb, zTab, bp) if rc == SQLITE_OK { Xsqlite3_result_text(tls, ctx, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return *(*uintptr)(unsafe.Pointer(bp /* zReport */)) } - return ts + 17602 /* "ok" */ + return ts + 17771 /* "ok" */ }(), -1, libc.UintptrFromInt32(-1)) } else { Xsqlite3_result_error_code(tls, ctx, rc) @@ -159045,7 +159283,7 @@ func rtreecheck(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqli // Compiler and version // Datatype for coordinates -type GeoCoord = float32 /* sqlite3.c:198400:15 */ +type GeoCoord = float32 /* sqlite3.c:198440:15 */ // Internal representation of a polygon. // @@ -159071,7 +159309,7 @@ type GeoPoly1 = struct { FnVertex int32 Fhdr [4]uint8 Fa [8]GeoCoord -} /* sqlite3.c:198424:9 */ +} /* sqlite3.c:198464:9 */ // Internal representation of a polygon. // @@ -159093,7 +159331,7 @@ type GeoPoly1 = struct { // warnings coming from some compiler (notably, clang). In reality, the size // of each GeoPoly memory allocate is adjusted as necessary so that the // GeoPoly.a[] array at the end is the appropriate size. -type GeoPoly = GeoPoly1 /* sqlite3.c:198424:24 */ +type GeoPoly = GeoPoly1 /* sqlite3.c:198464:24 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -159109,7 +159347,7 @@ type GeoParse1 = struct { FnAlloc int32 FnErr int32 Fa uintptr -} /* sqlite3.c:198447:9 */ +} /* sqlite3.c:198487:9 */ // The size of a memory allocation needed for a GeoPoly object sufficient // to hold N coordinate pairs. @@ -159119,10 +159357,10 @@ type GeoParse1 = struct { // to silence (incorrect) UBSAN warnings if the array index is too large. // State of a parse of a GeoJSON input. -type GeoParse = GeoParse1 /* sqlite3.c:198447:25 */ +type GeoParse = GeoParse1 /* sqlite3.c:198487:25 */ // Do a 4-byte byte swap -func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:198457:13: */ +func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:198497:13: */ var t uint8 = *(*uint8)(unsafe.Pointer(a)) *(*uint8)(unsafe.Pointer(a)) = *(*uint8)(unsafe.Pointer(a + 3)) *(*uint8)(unsafe.Pointer(a + 3)) = t @@ -159132,7 +159370,7 @@ func geopolySwab32(tls *libc.TLS, a uintptr) { /* sqlite3.c:198457:13: */ } // Skip whitespace. Return the next non-whitespace character. -func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:198467:13: */ +func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:198507:13: */ for jsonIsSpace[*(*uint8)(unsafe.Pointer((*GeoParse)(unsafe.Pointer(p)).Fz))] != 0 { (*GeoParse)(unsafe.Pointer(p)).Fz++ } @@ -159141,7 +159379,7 @@ func geopolySkipSpace(tls *libc.TLS, p uintptr) int8 { /* sqlite3.c:198467:13: * // Parse out a number. Write the value into *pVal if pVal!=0. // return non-zero on success and zero if the next token is not a number. -func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:198475:12: */ +func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlite3.c:198515:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -159200,7 +159438,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // is available // var r float64 at bp, 8 - Xsqlite3AtoF(tls, (*GeoParse)(unsafe.Pointer(p)).Fz, bp /* &r */, j, uint8(SQLITE_UTF8)) + Xsqlite3AtoF(tls, (*GeoParse)(unsafe.Pointer(p)).Fz, bp, j, uint8(SQLITE_UTF8)) *(*GeoCoord)(unsafe.Pointer(pVal)) = GeoCoord(*(*float64)(unsafe.Pointer(bp /* r */))) } *(*uintptr)(unsafe.Pointer(p)) += uintptr(j) @@ -159213,7 +159451,7 @@ func geopolyParseNumber(tls *libc.TLS, p uintptr, pVal uintptr) int32 { /* sqlit // that object. // // If any error occurs, return NULL. -func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:198533:16: */ +func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite3.c:198573:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -159226,7 +159464,7 @@ func geopolyParseJson(tls *libc.TLS, z uintptr, pRc uintptr) uintptr { /* sqlite var pOut uintptr // var x int32 at bp+20, 4 rc = SQLITE_OK - libc.Xmemset(tls, bp /* &s */, 0, uint32(unsafe.Sizeof(GeoParse{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(GeoParse{}))) (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fz = z if !(int32(geopolySkipSpace(tls, bp)) == '[') { goto __1 @@ -159270,7 +159508,7 @@ __6: (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnVertex++ __8: ; - c = geopolySkipSpace(tls, bp /* &s */) + c = geopolySkipSpace(tls, bp) (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fz++ if !(int32(c) == ',') { goto __9 @@ -159320,7 +159558,7 @@ __14: ; (*GeoPoly)(unsafe.Pointer(pOut)).FnVertex = (*GeoParse)(unsafe.Pointer(bp /* &s */)).FnVertex libc.Xmemcpy(tls, pOut+8, (*GeoParse)(unsafe.Pointer(bp /* &s */)).Fa, uint32((*GeoParse)(unsafe.Pointer(bp)).FnVertex*2)*uint32(unsafe.Sizeof(GeoCoord(0)))) - *(*uint8)(unsafe.Pointer(pOut + 4)) = *(*uint8)(unsafe.Pointer(bp + 20 /* &x */)) + *(*uint8)(unsafe.Pointer(pOut + 4)) = *(*uint8)(unsafe.Pointer(bp + 20)) *(*uint8)(unsafe.Pointer(pOut + 4 + 1)) = uint8((*GeoParse)(unsafe.Pointer(bp)).FnVertex >> 16 & 0xff) *(*uint8)(unsafe.Pointer(pOut + 4 + 2)) = uint8((*GeoParse)(unsafe.Pointer(bp)).FnVertex >> 8 & 0xff) *(*uint8)(unsafe.Pointer(pOut + 4 + 3)) = uint8((*GeoParse)(unsafe.Pointer(bp)).FnVertex & 0xff) @@ -159355,7 +159593,7 @@ __16: // in the binary format or JSON text. Compute a GeoPoly object and // return a pointer to that object. Or if the input is not a well-formed // polygon, put an error message in sqlite3_context and return NULL. -func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:198610:16: */ +func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) uintptr { /* sqlite3.c:198650:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159424,7 +159662,7 @@ func geopolyFuncParam(tls *libc.TLS, pCtx uintptr, pVal uintptr, pRc uintptr) ui // If the input is a well-formed Geopoly BLOB or JSON string // then return the BLOB representation of the polygon. Otherwise // return NULL. -func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198671:13: */ +func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198711:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -159437,7 +159675,7 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. -func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198690:13: */ +func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198730:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -159446,11 +159684,11 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var db uintptr = Xsqlite3_context_db_handle(tls, context) var x uintptr = Xsqlite3_str_new(tls, db) var i int32 - Xsqlite3_str_append(tls, x, ts+27023 /* "[" */, 1) + Xsqlite3_str_append(tls, x, ts+27192, 1) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27025 /* "[%!g,%!g]," */, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27194, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27036 /* "[%!g,%!g]]" */, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27205, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -159460,7 +159698,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Interpret X as a polygon and render it as a SVG <polyline>. // Additional arguments are added as attributes to the <polyline>. -func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198716:13: */ +func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198756:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -159474,19 +159712,19 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { var x uintptr = Xsqlite3_str_new(tls, db) var i int32 var cSep int8 = int8('\'') - Xsqlite3_str_appendf(tls, x, ts+27047 /* "<polyline points..." */, 0) + Xsqlite3_str_appendf(tls, x, ts+27216, 0) for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { - Xsqlite3_str_appendf(tls, x, ts+27065 /* "%c%g,%g" */, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) + Xsqlite3_str_appendf(tls, x, ts+27234, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2)*4))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + uintptr(i*2+1)*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27073 /* " %g,%g'" */, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27242, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer(p + 8))), float64(*(*GeoCoord)(unsafe.Pointer(p + 8 + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*4))) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { - Xsqlite3_str_appendf(tls, x, ts+27081 /* " %s" */, libc.VaList(bp+40, z)) + Xsqlite3_str_appendf(tls, x, ts+27250, libc.VaList(bp+40, z)) } } - Xsqlite3_str_appendf(tls, x, ts+27085 /* "></polyline>" */, 0) + Xsqlite3_str_appendf(tls, x, ts+27254, 0) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -159506,7 +159744,7 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Rotate by R around the point (0,0): // // geopoly_xform(poly, cos(R), sin(R), -sin(R), cos(R), 0, 0) -func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198763:13: */ +func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198803:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var A float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) var B float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) @@ -159539,7 +159777,7 @@ func geopolyXformFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // This routine can also be used to detect polygons that rotate in // the wrong direction. Polygons are suppose to be counter-clockwise (CCW). // This routine returns a negative value for clockwise (CW) polygons. -func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:198799:15: */ +func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:198839:15: */ var rArea float64 = 0.0 var ii int32 for ii = 0; ii < (*GeoPoly)(unsafe.Pointer(p)).FnVertex-1; ii++ { @@ -159559,7 +159797,7 @@ func geopolyArea(tls *libc.TLS, p uintptr) float64 { /* sqlite3.c:198799:15: */ // enclosed by the polygon. If the polygon circulates clockwise instead // of counterclockwise (as it should) then return the negative of the // enclosed area. Otherwise return NULL. -func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198821:13: */ +func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198861:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { Xsqlite3_result_double(tls, context, geopolyArea(tls, p)) @@ -159578,7 +159816,7 @@ func geopolyAreaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // // Use this routine to sanitize historical inputs that that sometimes // contain polygons that wind in the wrong direction. -func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198846:13: */ +func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198886:13: */ var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { if geopolyArea(tls, p) < 0.0 { @@ -159614,7 +159852,7 @@ func geopolyCcwFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } // Fast approximation for sine(X) for X between -0.5*pi and 2*pi -func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:198874:15: */ +func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:198914:15: */ if r >= float64(1.5)*3.1415926535897932385 { r = r - float64(2.0)*3.1415926535897932385 @@ -159634,7 +159872,7 @@ func geopolySine(tls *libc.TLS, r float64) float64 { /* sqlite3.c:198874:15: */ // // Construct a simple, convex, regular polygon centered at X, Y // with circumradius R and with N sides. -func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198895:13: */ +func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:198935:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159658,7 +159896,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr return } *(*int32)(unsafe.Pointer(bp /* i */)) = 1 - *(*uint8)(unsafe.Pointer(p + 4)) = *(*uint8)(unsafe.Pointer(bp /* &i */)) + *(*uint8)(unsafe.Pointer(p + 4)) = *(*uint8)(unsafe.Pointer(bp)) *(*uint8)(unsafe.Pointer(p + 4 + 1)) = uint8(0) *(*uint8)(unsafe.Pointer(p + 4 + 2)) = uint8(n >> 8 & 0xff) *(*uint8)(unsafe.Pointer(p + 4 + 3)) = uint8(n & 0xff) @@ -159679,7 +159917,7 @@ func geopolyRegularFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // // If pPoly is NULL but aCoord is not NULL, then compute a new GeoPoly from // the bounding box in aCoord and return a pointer to that GeoPoly. -func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:198938:16: */ +func geopolyBBox(tls *libc.TLS, context uintptr, pPoly uintptr, aCoord uintptr, pRc uintptr) uintptr { /* sqlite3.c:198978:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -159785,7 +160023,7 @@ __17: ; (*GeoPoly)(unsafe.Pointer(pOut)).FnVertex = 4 *(*int32)(unsafe.Pointer(bp /* ii */)) = 1 - *(*uint8)(unsafe.Pointer(pOut + 4)) = *(*uint8)(unsafe.Pointer(bp /* &ii */)) + *(*uint8)(unsafe.Pointer(pOut + 4)) = *(*uint8)(unsafe.Pointer(bp)) *(*uint8)(unsafe.Pointer(pOut + 4 + 1)) = uint8(0) *(*uint8)(unsafe.Pointer(pOut + 4 + 2)) = uint8(0) *(*uint8)(unsafe.Pointer(pOut + 4 + 3)) = uint8(4) @@ -159820,7 +160058,7 @@ __4: } // Implementation of the geopoly_bbox(X) SQL function. -func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199009:13: */ +func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199049:13: */ var p uintptr = geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0), uintptr(0)) if p != 0 { Xsqlite3_result_blob(tls, context, p+4, @@ -159833,20 +160071,20 @@ func geopolyBBoxFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { type GeoBBox1 = struct { FisInit int32 Fa [4]RtreeCoord -} /* sqlite3.c:199025:9 */ +} /* sqlite3.c:199065:9 */ // State vector for the geopoly_group_bbox() aggregate function. -type GeoBBox = GeoBBox1 /* sqlite3.c:199025:24 */ +type GeoBBox = GeoBBox1 /* sqlite3.c:199065:24 */ // Implementation of the geopoly_group_bbox(X) aggregate SQL function. -func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199035:13: */ +func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199075:13: */ bp := tls.Alloc(20) defer tls.Free(20) // var a [4]RtreeCoord at bp, 16 *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK - geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), bp /* &a[0] */, bp+16 /* &rc */) + geopolyBBox(tls, context, *(*uintptr)(unsafe.Pointer(argv)), bp, bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(GeoBBox{}))) @@ -159855,25 +160093,25 @@ func geopolyBBoxStep(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { } if (*GeoBBox)(unsafe.Pointer(pBBox)).FisInit == 0 { (*GeoBBox)(unsafe.Pointer(pBBox)).FisInit = 1 - libc.Xmemcpy(tls, pBBox+4, bp /* &a[0] */, uint32(unsafe.Sizeof(RtreeCoord{}))*uint32(4)) + libc.Xmemcpy(tls, pBBox+4, bp, uint32(unsafe.Sizeof(RtreeCoord{}))*uint32(4)) } else { if *(*RtreeValue)(unsafe.Pointer(bp)) < *(*RtreeValue)(unsafe.Pointer(pBBox + 4)) { - *(*RtreeCoord)(unsafe.Pointer(pBBox + 4)) = *(*RtreeCoord)(unsafe.Pointer(bp /* &a[0] */)) + *(*RtreeCoord)(unsafe.Pointer(pBBox + 4)) = *(*RtreeCoord)(unsafe.Pointer(bp)) } if *(*RtreeValue)(unsafe.Pointer(bp + 1*4)) > *(*RtreeValue)(unsafe.Pointer(pBBox + 4 + 1*4)) { - *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 1*4)) = *(*RtreeCoord)(unsafe.Pointer(bp /* &a[0] */ + 1*4)) + *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 1*4)) = *(*RtreeCoord)(unsafe.Pointer(bp + 1*4)) } if *(*RtreeValue)(unsafe.Pointer(bp + 2*4)) < *(*RtreeValue)(unsafe.Pointer(pBBox + 4 + 2*4)) { - *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 2*4)) = *(*RtreeCoord)(unsafe.Pointer(bp /* &a[0] */ + 2*4)) + *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 2*4)) = *(*RtreeCoord)(unsafe.Pointer(bp + 2*4)) } if *(*RtreeValue)(unsafe.Pointer(bp + 3*4)) > *(*RtreeValue)(unsafe.Pointer(pBBox + 4 + 3*4)) { - *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 3*4)) = *(*RtreeCoord)(unsafe.Pointer(bp /* &a[0] */ + 3*4)) + *(*RtreeCoord)(unsafe.Pointer(pBBox + 4 + 3*4)) = *(*RtreeCoord)(unsafe.Pointer(bp + 3*4)) } } } } -func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:199058:13: */ +func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:199098:13: */ var p uintptr var pBBox uintptr pBBox = Xsqlite3_aggregate_context(tls, context, 0) @@ -159900,7 +160138,7 @@ func geopolyBBoxFinal(tls *libc.TLS, context uintptr) { /* sqlite3.c:199058:13: // // The left-most coordinate min(x1,x2) is not considered to be part of // the line segment for the purposes of this analysis. -func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:199088:12: */ +func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 float64, x2 float64, y2 float64) int32 { /* sqlite3.c:199128:12: */ var y float64 if x0 == x1 && y0 == y1 { return 2 @@ -159941,7 +160179,7 @@ func pointBeneathLine(tls *libc.TLS, x0 float64, y0 float64, x1 float64, y1 floa // Return +2 if point X,Y is within polygon P. // Return +1 if point X,Y is on the polygon boundary. // Return 0 if point X,Y is outside the polygon -func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199119:13: */ +func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199159:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var x0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) var y0 float64 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + 2*4))) @@ -159979,7 +160217,7 @@ func geopolyContainsPointFunc(tls *libc.TLS, context uintptr, argc int32, argv u // Return +1 if P2 is contained within P1 // Return 0 if any part of P2 is on the outside of P1 // -func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199162:13: */ +func geopolyWithinFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199202:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -160010,10 +160248,10 @@ type GeoEvent1 = struct { FeType int32 FpSeg uintptr FpNext uintptr -} /* sqlite3.c:199182:9 */ +} /* sqlite3.c:199222:9 */ // Objects used by the overlap algorihm. -type GeoEvent = GeoEvent1 /* sqlite3.c:199182:25 */ +type GeoEvent = GeoEvent1 /* sqlite3.c:199222:25 */ type GeoSegment1 = struct { FC float64 FB float64 @@ -160023,20 +160261,20 @@ type GeoSegment1 = struct { F__ccgo_pad1 [3]byte Fidx uint32 FpNext uintptr -} /* sqlite3.c:199182:9 */ +} /* sqlite3.c:199222:9 */ -type GeoSegment = GeoSegment1 /* sqlite3.c:199183:27 */ +type GeoSegment = GeoSegment1 /* sqlite3.c:199223:27 */ type GeoOverlap1 = struct { FaEvent uintptr FaSegment uintptr FnEvent int32 FnSegment int32 -} /* sqlite3.c:199184:9 */ +} /* sqlite3.c:199224:9 */ -type GeoOverlap = GeoOverlap1 /* sqlite3.c:199184:27 */ +type GeoOverlap = GeoOverlap1 /* sqlite3.c:199224:27 */ // Add a single segment and its associated events. -func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:199209:13: */ +func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 GeoCoord, y1 GeoCoord, side uint8, idx uint32) { /* sqlite3.c:199249:13: */ var pSeg uintptr var pEvent uintptr if x0 == x1 { @@ -160070,7 +160308,7 @@ func geopolyAddOneSegment(tls *libc.TLS, p uintptr, x0 GeoCoord, y0 GeoCoord, x1 } // Insert all segments and events for polygon pPoly. -func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:199253:13: */ +func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { /* sqlite3.c:199293:13: */ var i uint32 var x uintptr for i = uint32(0); i < uint32((*GeoPoly)(unsafe.Pointer(pPoly)).FnVertex)-uint32(1); i++ { @@ -160082,7 +160320,7 @@ func geopolyAddSegments(tls *libc.TLS, p uintptr, pPoly uintptr, side uint8) { / } // Merge two lists of sorted events by X coordinate -func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:199271:17: */ +func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:199311:17: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -160112,7 +160350,7 @@ func geopolyEventMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { / } // Sort an array of nEvent event objects into a list. -func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:199293:17: */ +func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { /* sqlite3.c:199333:17: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -160126,23 +160364,23 @@ func geopolySortEventsByX(tls *libc.TLS, aEvent uintptr, nEvent int32) uintptr { p = aEvent + uintptr(i)*20 (*GeoEvent)(unsafe.Pointer(p)).FpNext = uintptr(0) for j = 0; j < mx && *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(j)*4)) != 0; j++ { - p = geopolyEventMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(j)*4)), p) - *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(j)*4)) = uintptr(0) + p = geopolyEventMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(j)*4)), p) + *(*uintptr)(unsafe.Pointer(bp + uintptr(j)*4)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(j)*4)) = p + *(*uintptr)(unsafe.Pointer(bp + uintptr(j)*4)) = p if j >= mx { mx = j + 1 } } p = uintptr(0) for i = 0; i < mx; i++ { - p = geopolyEventMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)), p) + p = geopolyEventMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)), p) } return p } // Merge two lists of sorted segments by Y, and then by C. -func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:199318:19: */ +func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:199358:19: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -160177,7 +160415,7 @@ func geopolySegmentMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // Sort a list of GeoSegments in order of increasing Y and in the event of // a tie, increasing C (slope). -func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:199343:19: */ +func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlite3.c:199383:19: */ bp := tls.Alloc(200) defer tls.Free(200) @@ -160191,23 +160429,23 @@ func geopolySortSegmentsByYAndC(tls *libc.TLS, pList uintptr) uintptr { /* sqlit pList = (*GeoSegment)(unsafe.Pointer(pList)).FpNext (*GeoSegment)(unsafe.Pointer(p)).FpNext = uintptr(0) for i = 0; i < mx && *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)) != 0; i++ { - p = geopolySegmentMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)), p) - *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)) = uintptr(0) + p = geopolySegmentMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)), p) + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = uintptr(0) } - *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)) = p + *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)) = p if i >= mx { mx = i + 1 } } p = uintptr(0) for i = 0; i < mx; i++ { - p = geopolySegmentMerge(tls, *(*uintptr)(unsafe.Pointer(bp /* &a[0] */ + uintptr(i)*4)), p) + p = geopolySegmentMerge(tls, *(*uintptr)(unsafe.Pointer(bp + uintptr(i)*4)), p) } return p } // Determine the overlap between two polygons -func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:199369:12: */ +func geopolyOverlap(tls *libc.TLS, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:199409:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160251,7 +160489,7 @@ __1: } else { rX = 0.0 } - libc.Xmemset(tls, bp /* &aOverlap[0] */, 0, uint32(unsafe.Sizeof([4]uint8{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([4]uint8{}))) __2: if !(pThisEvent != 0) { goto __3 @@ -160283,7 +160521,7 @@ __6: goto __10 } - *(*uint8)(unsafe.Pointer(bp /* &aOverlap[0] */ + uintptr(iMask))) = uint8(1) + *(*uint8)(unsafe.Pointer(bp + uintptr(iMask))) = uint8(1) __10: ; __9: @@ -160321,7 +160559,7 @@ __15: goto __17 } - *(*uint8)(unsafe.Pointer(bp /* &aOverlap[0] */ + uintptr(iMask))) = uint8(1) + *(*uint8)(unsafe.Pointer(bp + uintptr(iMask))) = uint8(1) __17: ; __16: @@ -160443,7 +160681,7 @@ geopolyOverlapDone: // 3 P2 is completely contained within P1 // 4 P1 and P2 are the same polygon // NULL Either P1 or P2 or both are not valid polygons -func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199492:13: */ +func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199532:13: */ var p1 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) var p2 uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uintptr(0)) if p1 != 0 && p2 != 0 { @@ -160459,7 +160697,7 @@ func geopolyOverlapFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr } // Enable or disable debugging output -func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199514:13: */ +func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:199554:13: */ } // This function is the implementation of both the xConnect and xCreate @@ -160469,7 +160707,7 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[1] -> database name // argv[2] -> table name // argv[...] -> column names... -func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199533:12: */ +func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:199573:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -160509,7 +160747,7 @@ __1: // that is successful, call sqlite3_declare_vtab() to configure // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) - Xsqlite3_str_appendf(tls, pSql, ts+27098 /* "CREATE TABLE x(_..." */, 0) + Xsqlite3_str_appendf(tls, pSql, ts+27267, 0) (*Rtree)(unsafe.Pointer(pRtree)).FnAux = U8(1) // Add one for _shape (*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull = U8(1) // The _shape column is always not-null ii = 3 @@ -160518,7 +160756,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27120 /* ",%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) + Xsqlite3_str_appendf(tls, pSql, ts+27289, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*4)))) goto __3 __3: ii++ @@ -160526,7 +160764,7 @@ __3: goto __4 __4: ; - Xsqlite3_str_appendf(tls, pSql, ts+26187 /* ");" */, 0) + Xsqlite3_str_appendf(tls, pSql, ts+26356, 0) zSql = Xsqlite3_str_finish(tls, pSql) if !!(zSql != 0) { goto __5 @@ -160537,7 +160775,7 @@ __5: if !(SQLITE_OK != libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -160563,7 +160801,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -160584,12 +160822,12 @@ __11: } // GEOPOLY virtual table module xCreate method. -func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:199617:12: */ +func geopolyCreate(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:199657:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 1) } // GEOPOLY virtual table module xConnect method. -func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:199630:12: */ +func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:199670:12: */ return geopolyInit(tls, db, pAux, argc, argv, ppVtab, pzErr, 0) } @@ -160603,7 +160841,7 @@ func geopolyConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv ui // 3 search for objects overlapping the same bounding box // that contains polygon argv[0] // 4 full table scan -func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:199653:12: */ +func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:199693:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -160643,7 +160881,7 @@ func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uint } // Search point for the leaf iRowid = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv))) *(*I64)(unsafe.Pointer(bp + 4 /* iNode */)) = int64(0) - *(*int32)(unsafe.Pointer(bp + 36 /* rc */)) = findLeafNode(tls, pRtree, iRowid, bp /* &pLeaf */, bp+4 /* &iNode */) + *(*int32)(unsafe.Pointer(bp + 36 /* rc */)) = findLeafNode(tls, pRtree, iRowid, bp, bp+4) if !(*(*int32)(unsafe.Pointer(bp + 36)) == SQLITE_OK && *(*uintptr)(unsafe.Pointer(bp)) != uintptr(0)) { goto __3 } @@ -160652,7 +160890,7 @@ func geopolyFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uint *(*uintptr)(unsafe.Pointer(pCsr + 60)) = *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)) (*RtreeSearchPoint)(unsafe.Pointer(p)).Fid = *(*I64)(unsafe.Pointer(bp + 4 /* iNode */)) (*RtreeSearchPoint)(unsafe.Pointer(p)).FeWithin = U8(PARTLY_WITHIN) - *(*int32)(unsafe.Pointer(bp + 36 /* rc */)) = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)), iRowid, bp+12 /* &iCell */) + *(*int32)(unsafe.Pointer(bp + 36 /* rc */)) = nodeRowidIndex(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp /* pLeaf */)), iRowid, bp+12) (*RtreeSearchPoint)(unsafe.Pointer(p)).FiCell = U8(*(*int32)(unsafe.Pointer(bp + 12 /* iCell */))) goto __4 @@ -160664,12 +160902,12 @@ __4: __1: // Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array // with the configured constraints. - *(*int32)(unsafe.Pointer(bp + 36 /* rc */)) = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp+16 /* &pRoot */) + *(*int32)(unsafe.Pointer(bp + 36 /* rc */)) = nodeAcquire(tls, pRtree, int64(1), uintptr(0), bp+16) if !(*(*int32)(unsafe.Pointer(bp + 36)) == SQLITE_OK && idxNum <= 3) { goto __5 } - geopolyBBox(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(argv)), bp+20 /* &bbox[0] */, bp+36 /* &rc */) + geopolyBBox(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(argv)), bp+20, bp+36) if !(*(*int32)(unsafe.Pointer(bp + 36)) != 0) { goto __6 } @@ -160770,7 +161008,7 @@ geopoly_filter_end: // 3 "rtree" R-tree within query using geopoly_within() // 4 "fullscan" full-table scan. // ------------------------------------------------ -func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:199785:12: */ +func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:199825:12: */ var ii int32 var iRowidTerm int32 = -1 var iFuncTerm int32 = -1 @@ -160796,7 +161034,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s if iRowidTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 15961 /* "rowid" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 16134 /* "rowid" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iRowidTerm)*8)).Fomit = uint8(1) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 30.0 @@ -160806,7 +161044,7 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s } if iFuncTerm >= 0 { (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = idxNum - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27124 /* "rtree" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27293 /* "rtree" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).FargvIndex = 1 (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(iFuncTerm)*8)).Fomit = uint8(0) (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 300.0 @@ -160814,14 +161052,14 @@ func geopolyBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* s return SQLITE_OK } (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 4 - (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27130 /* "fullscan" */ + (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = ts + 27299 /* "fullscan" */ (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 3000000.0 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = int64(100000) return SQLITE_OK } // GEOPOLY virtual table module xColumn method. -func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:199837:12: */ +func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:199877:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -160829,7 +161067,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* var pCsr uintptr = cur var p uintptr = rtreeSearchPointFirst(tls, pCsr) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK - var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp /* &rc */) + var pNode uintptr = rtreeNodeOfFirstSearchPoint(tls, pCsr, bp) if *(*int32)(unsafe.Pointer(bp)) != 0 { return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -160886,7 +161124,7 @@ func geopolyColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* // argv[1] = rowid after the change. Never NULL // argv[2] = new value for _shape // argv[3] = new value for first application-defined column.... -func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199892:12: */ +func geopolyUpdate(tls *libc.TLS, pVtab uintptr, nData int32, aData uintptr, pRowid uintptr) int32 { /* sqlite3.c:199932:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -160946,14 +161184,14 @@ __1: goto __2 } - geopolyBBox(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(aData + 2*4)), bp+8, bp+48 /* &rc */) + geopolyBBox(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(aData + 2*4)), bp+8, bp+48) if !(*(*int32)(unsafe.Pointer(bp + 48)) != 0) { goto __3 } if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_ERROR) { goto __4 } - (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27139 /* "_shape does not ..." */, 0) + (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg = Xsqlite3_mprintf(tls, ts+27308, 0) __4: ; goto geopoly_update_end @@ -161016,14 +161254,14 @@ __11: if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK) { goto __12 } - *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = sChooseLeaf(tls, pRtree, bp /* &cell */, 0, bp+52 /* &pLeaf */) + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = sChooseLeaf(tls, pRtree, bp, 0, bp+52) __12: ; if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK) { goto __13 } (*Rtree)(unsafe.Pointer(pRtree)).FiReinsertHeight = -1 - *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 52 /* pLeaf */)), bp /* &cell */, 0) + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = rtreeInsertCell(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 52 /* pLeaf */)), bp, 0) rc2 = nodeRelease(tls, pRtree, *(*uintptr)(unsafe.Pointer(bp + 52 /* pLeaf */))) if !(*(*int32)(unsafe.Pointer(bp + 48)) == SQLITE_OK) { goto __14 @@ -161097,15 +161335,15 @@ geopoly_update_end: // Report that geopoly_overlap() is an overloaded function suitable // for use in xBestIndex. -func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:200029:12: */ - if Xsqlite3_stricmp(tls, zName, ts+27179) == 0 { +func geopolyFindFunction(tls *libc.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:200069:12: */ + if Xsqlite3_stricmp(tls, zName, ts+27348) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyOverlapFunc})) *(*uintptr)(unsafe.Pointer(ppArg)) = uintptr(0) return SQLITE_INDEX_CONSTRAINT_FUNCTION } - if Xsqlite3_stricmp(tls, zName, ts+27195) == 0 { + if Xsqlite3_stricmp(tls, zName, ts+27364) == 0 { *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{geopolyWithinFunc})) @@ -161138,9 +161376,9 @@ var geopolyModule = Sqlite3_module{ FxRename: 0, // xRename - rename the table FxSavepoint: 0, // xRollbackTo FxShadowName: 0, // xShadowName -} /* sqlite3.c:200050:23 */ +} /* sqlite3.c:200090:23 */ -func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:200077:12: */ +func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:200117:12: */ var rc int32 = SQLITE_OK var i int32 for i = 0; uint32(i) < uint32(unsafe.Sizeof(aFunc1))/uint32(unsafe.Sizeof(struct { @@ -161170,7 +161408,7 @@ func sqlite3_geopoly_init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:200077 uintptr(0), aAgg1[i].FxStep, aAgg1[i].FxFinal) } if rc == SQLITE_OK { - rc = Xsqlite3_create_module_v2(tls, db, ts+27210 /* "geopoly" */, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27379, uintptr(unsafe.Pointer(&geopolyModule)), uintptr(0), uintptr(0)) } return rc } @@ -161182,26 +161420,26 @@ var aFunc1 = [12]struct { F__ccgo_pad1 [2]byte FzName uintptr }{ - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27218 /* "geopoly_area" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27231 /* "geopoly_blob" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27244 /* "geopoly_json" */}, - {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27257 /* "geopoly_svg" */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27195 /* "geopoly_within" */}, - {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27269 /* "geopoly_contains..." */}, - {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27179 /* "geopoly_overlap" */}, - {FxFunc: 0, FnArg: int8(1), FzName: ts + 27292 /* "geopoly_debug" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27306 /* "geopoly_bbox" */}, - {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27319 /* "geopoly_xform" */}, - {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27333 /* "geopoly_regular" */}, - {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27349 /* "geopoly_ccw" */}, -} /* sqlite3.c:200084:5 */ + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27387 /* "geopoly_area" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27400 /* "geopoly_blob" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27413 /* "geopoly_json" */}, + {FxFunc: 0, FnArg: int8(-1), FbPure: uint8(1), FzName: ts + 27426 /* "geopoly_svg" */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27364 /* "geopoly_within" */}, + {FxFunc: 0, FnArg: int8(3), FbPure: uint8(1), FzName: ts + 27438 /* "geopoly_contains..." */}, + {FxFunc: 0, FnArg: int8(2), FbPure: uint8(1), FzName: ts + 27348 /* "geopoly_overlap" */}, + {FxFunc: 0, FnArg: int8(1), FzName: ts + 27461 /* "geopoly_debug" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27475 /* "geopoly_bbox" */}, + {FxFunc: 0, FnArg: int8(7), FbPure: uint8(1), FzName: ts + 27488 /* "geopoly_xform" */}, + {FxFunc: 0, FnArg: int8(4), FbPure: uint8(1), FzName: ts + 27502 /* "geopoly_regular" */}, + {FxFunc: 0, FnArg: int8(1), FbPure: uint8(1), FzName: ts + 27518 /* "geopoly_ccw" */}, +} /* sqlite3.c:200124:5 */ var aAgg1 = [1]struct { FxStep uintptr FxFinal uintptr FzName uintptr }{ - {FxStep: 0, FxFinal: 0, FzName: ts + 27361 /* "geopoly_group_bb..." */}, -} /* sqlite3.c:200102:5 */ + {FxStep: 0, FxFinal: 0, FzName: ts + 27530 /* "geopoly_group_bb..." */}, +} /* sqlite3.c:200142:5 */ //************* End of geopoly.c ******************************************** //************* Continuing where we left off in rtree.c ********************* @@ -161209,30 +161447,30 @@ var aAgg1 = [1]struct { // Register the r-tree module with database handle db. This creates the // virtual table module "rtree" and the debugging/analysis scalar // function "rtreenode". -func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:200137:20: */ +func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:200177:20: */ var utf8 int32 = SQLITE_UTF8 var rc int32 - rc = Xsqlite3_create_function(tls, db, ts+27380 /* "rtreenode" */, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27549, 2, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreenode})), uintptr(0), uintptr(0)) if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27390 /* "rtreedepth" */, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27559, 1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreedepth})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_create_function(tls, db, ts+27401 /* "rtreecheck" */, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = Xsqlite3_create_function(tls, db, ts+27570, -1, utf8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rtreecheck})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_REAL32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27124 /* "rtree" */, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27293, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { var c uintptr = uintptr(RTREE_COORD_INT32) - rc = Xsqlite3_create_module_v2(tls, db, ts+27412 /* "rtree_i32" */, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) + rc = Xsqlite3_create_module_v2(tls, db, ts+27581, uintptr(unsafe.Pointer(&rtreeModule)), c, uintptr(0)) } if rc == SQLITE_OK { rc = sqlite3_geopoly_init(tls, db) @@ -161246,7 +161484,7 @@ func Xsqlite3RtreeInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:200137:20 // or sqlite3_rtree_query_callback(). In other words, this routine is the // destructor for an RtreeGeomCallback objecct. This routine is called when // the corresponding SQL function is deleted. -func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:200176:13: */ +func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:200216:13: */ var pInfo uintptr = p if (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FxDestructor})).f(tls, (*RtreeGeomCallback)(unsafe.Pointer(pInfo)).FpContext) @@ -161255,7 +161493,7 @@ func rtreeFreeCallback(tls *libc.TLS, p uintptr) { /* sqlite3.c:200176:13: */ } // This routine frees the BLOB that is returned by geomCallback(). -func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:200185:13: */ +func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:200225:13: */ var i int32 var p uintptr = pArg for i = 0; i < (*RtreeMatchArg)(unsafe.Pointer(p)).FnParam; i++ { @@ -161276,7 +161514,7 @@ func rtreeMatchArgFree(tls *libc.TLS, pArg uintptr) { /* sqlite3.c:200185:13: */ // The R-Tree MATCH operator will read the returned BLOB, deserialize // the RtreeMatchArg object, and use the RtreeMatchArg object to figure // out which elements of the R-Tree should be returned by the query. -func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:200208:13: */ +func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sqlite3.c:200248:13: */ var pGeomCtx uintptr = Xsqlite3_user_data(tls, ctx) var pBlob uintptr var nBlob Sqlite3_int64 @@ -161304,13 +161542,13 @@ func geomCallback(tls *libc.TLS, ctx uintptr, nArg int32, aArg uintptr) { /* sql Xsqlite3_result_error_nomem(tls, ctx) rtreeMatchArgFree(tls, pBlob) } else { - Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24700 /* "RtreeMatchArg" */, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) + Xsqlite3_result_pointer(tls, ctx, pBlob, ts+24869, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{rtreeMatchArgFree}))) } } } // Register a new geometry function for use with the r-tree MATCH operator. -func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:200246:16: */ +func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, xGeom uintptr, pContext uintptr) int32 { /* sqlite3.c:200286:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -161330,7 +161568,7 @@ func Xsqlite3_rtree_geometry_callback(tls *libc.TLS, db uintptr, zGeom uintptr, // Register a new 2nd-generation geometry function for use with the // r-tree MATCH operator. -func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:200270:16: */ +func Xsqlite3_rtree_query_callback(tls *libc.TLS, db uintptr, zQueryFunc uintptr, xQueryFunc uintptr, pContext uintptr, xDestructor uintptr) int32 { /* sqlite3.c:200310:16: */ var pGeomCtx uintptr // Context object for new user-function // Allocate and populate the context object. @@ -161781,7 +162019,7 @@ type sqlite3rbu = struct { FszTempLimit I64 FnRbu int32 FpRbuFd uintptr -} /* sqlite3.c:201500:9 */ +} /* sqlite3.c:201540:9 */ //************* End of rtree.c ********************************************** //************* Begin file icu.c ******************************************** @@ -162182,7 +162420,7 @@ type sqlite3rbu = struct { // #include "sqlite3.h" ** Required for error code definitions ** -type Sqlite3rbu = sqlite3rbu /* sqlite3.c:201500:27 */ +type Sqlite3rbu = sqlite3rbu /* sqlite3.c:201540:27 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -162247,7 +162485,7 @@ type Sqlite3rbu = sqlite3rbu /* sqlite3.c:201500:27 */ type RbuFrame1 = struct { FiDbPage U32 FiWalFrame U32 -} /* sqlite3.c:201500:9 */ +} /* sqlite3.c:201540:9 */ //************* End of sqlite3rbu.h ***************************************** //************* Continuing where we left off in sqlite3rbu.c **************** @@ -162309,7 +162547,7 @@ type RbuFrame1 = struct { // Only valid if STAGE==1. The RBU database name of the table // currently being read. -type RbuFrame = RbuFrame1 /* sqlite3.c:201931:25 */ +type RbuFrame = RbuFrame1 /* sqlite3.c:201971:25 */ type RbuObjIter1 = struct { FpTblIter uintptr FpIdxIter uintptr @@ -162338,9 +162576,9 @@ type RbuObjIter1 = struct { FaIdxCol uintptr FzIdxSql uintptr FpRbuUpdate uintptr -} /* sqlite3.c:201500:9 */ +} /* sqlite3.c:201540:9 */ -type RbuObjIter = RbuObjIter1 /* sqlite3.c:201932:27 */ +type RbuObjIter = RbuObjIter1 /* sqlite3.c:201972:27 */ type RbuState1 = struct { FeStage int32 FzTbl uintptr @@ -162352,15 +162590,15 @@ type RbuState1 = struct { FiCookie U32 FiOalSz I64 FnPhaseOneStep I64 -} /* sqlite3.c:201933:9 */ +} /* sqlite3.c:201973:9 */ -type RbuState = RbuState1 /* sqlite3.c:201933:25 */ +type RbuState = RbuState1 /* sqlite3.c:201973:25 */ type RbuSpan1 = struct { FzSpan uintptr FnSpan int32 -} /* sqlite3.c:201500:9 */ +} /* sqlite3.c:201540:9 */ -type RbuSpan = RbuSpan1 /* sqlite3.c:201934:24 */ +type RbuSpan = RbuSpan1 /* sqlite3.c:201974:24 */ type rbu_vfs = struct { Fbase Sqlite3_vfs FpRealVfs uintptr @@ -162368,9 +162606,9 @@ type rbu_vfs = struct { FpRbu uintptr FpMain uintptr FpMainRbu uintptr -} /* sqlite3.c:201500:9 */ +} /* sqlite3.c:201540:9 */ -type Rbu_vfs = rbu_vfs /* sqlite3.c:201935:24 */ +type Rbu_vfs = rbu_vfs /* sqlite3.c:201975:24 */ type rbu_file = struct { Fbase Sqlite3_file FpReal uintptr @@ -162389,16 +162627,16 @@ type rbu_file = struct { FpWalFd uintptr FpMainNext uintptr FpMainRbuNext uintptr -} /* sqlite3.c:201500:9 */ +} /* sqlite3.c:201540:9 */ -type Rbu_file = rbu_file /* sqlite3.c:201936:25 */ +type Rbu_file = rbu_file /* sqlite3.c:201976:25 */ type RbuUpdateStmt1 = struct { FzMask uintptr FpUpdate uintptr FpNext uintptr -} /* sqlite3.c:201500:9 */ +} /* sqlite3.c:201540:9 */ -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:201937:30 */ +type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:201977:30 */ // True for an RBU vacuum handle, or false otherwise. @@ -162417,7 +162655,7 @@ type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3.c:201937:30 */ // finished, leave *pz pointing to the first character past the end of // the integer. The *pLen parameter holds the length of the string // in *pz and is decremented once for each character in the integer. -func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:202227:21: */ +func rbuDeltaGetInt(tls *libc.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3.c:202267:21: */ var v uint32 = uint32(0) var c int32 var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) @@ -162440,7 +162678,7 @@ var zValue = [128]int8{ int8(25), int8(26), int8(27), int8(28), int8(29), int8(30), int8(31), int8(32), int8(33), int8(34), int8(35), int8(-1), int8(-1), int8(-1), int8(-1), int8(36), int8(-1), int8(37), int8(38), int8(39), int8(40), int8(41), int8(42), int8(43), int8(44), int8(45), int8(46), int8(47), int8(48), int8(49), int8(50), int8(51), int8(52), int8(53), int8(54), int8(55), int8(56), int8(57), int8(58), int8(59), int8(60), int8(61), int8(62), int8(-1), int8(-1), int8(-1), int8(63), int8(-1), -} /* sqlite3.c:202228:28 */ +} /* sqlite3.c:202268:28 */ // Apply a delta. // @@ -162460,7 +162698,7 @@ var zValue = [128]int8{ // // Refer to the delta_create() documentation above for a description // of the delta file format. -func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:202308:12: */ +func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3.c:202348:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zDelta @@ -162469,7 +162707,7 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le var limit uint32 var total uint32 = uint32(0) - limit = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+4 /* &lenDelta */) + limit = rbuDeltaGetInt(tls, bp, bp+4) if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != '\n' { // ERROR: size integer not terminated by "\n" return -1 @@ -162479,13 +162717,13 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le for *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))) != 0 && *(*int32)(unsafe.Pointer(bp + 4)) > 0 { var cnt uint32 var ofst uint32 - cnt = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+4 /* &lenDelta */) + cnt = rbuDeltaGetInt(tls, bp, bp+4) switch int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) { case '@': { *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ *(*int32)(unsafe.Pointer(bp + 4 /* lenDelta */))-- - ofst = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+4 /* &lenDelta */) + ofst = rbuDeltaGetInt(tls, bp, bp+4) if *(*int32)(unsafe.Pointer(bp + 4)) > 0 && int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != ',' { // ERROR: copy command not terminated by ',' return -1 @@ -162550,14 +162788,14 @@ func rbuDeltaApply(tls *libc.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, le return -1 } -func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:202394:12: */ +func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3.c:202434:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp)) = zDelta *(*int32)(unsafe.Pointer(bp + 4)) = lenDelta var size int32 - size = int32(rbuDeltaGetInt(tls, bp /* &zDelta */, bp+4 /* &lenDelta */)) + size = int32(rbuDeltaGetInt(tls, bp, bp+4)) if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))))) != '\n' { // ERROR: size integer not terminated by "\n" return -1 @@ -162575,7 +162813,7 @@ func rbuDeltaOutputSize(tls *libc.TLS, zDelta uintptr, lenDelta int32) int32 { / // arguments must be passed to this function. The first is the blob to // patch and the second the patch to apply. If no error occurs, this // function returns the patched blob. -func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:202416:13: */ +func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:202456:13: */ var aDelta uintptr var nDelta int32 var aOrig uintptr @@ -162592,7 +162830,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // Figure out the size of the output nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) if nOut < 0 { - Xsqlite3_result_error(tls, context, ts+27422 /* "corrupt fossil d..." */, -1) + Xsqlite3_result_error(tls, context, ts+27591, -1) return } @@ -162603,7 +162841,7 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) if nOut2 != nOut { Xsqlite3_free(tls, aOut) - Xsqlite3_result_error(tls, context, ts+27422 /* "corrupt fossil d..." */, -1) + Xsqlite3_result_error(tls, context, ts+27591, -1) } else { Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) } @@ -162618,13 +162856,13 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // an SQLite error code. Additionally, set output variable *pzErrmsg to // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). -func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:202469:12: */ +func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:202509:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = Xsqlite3_prepare_v2(tls, db, zSql, -1, ppStmt, uintptr(0)) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) } return rc @@ -162636,13 +162874,13 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // If an error has occurred, then set *pzErrmsg to point to a buffer // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). -func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:202491:12: */ +func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:202531:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, Xsqlite3_errmsg(tls, Xsqlite3_db_handle(tls, pStmt)))) } return rc } @@ -162660,7 +162898,7 @@ func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 // // If argument zSql is NULL, this function assumes that an OOM has occurred. // In this case SQLITE_NOMEM is returned and *ppStmt set to NULL. -func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:202514:12: */ +func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:202554:12: */ var rc int32 if zSql == uintptr(0) { @@ -162675,7 +162913,7 @@ func prepareFreeAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErr // Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated // by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:202536:13: */ +func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:202576:13: */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4))) @@ -162693,7 +162931,7 @@ func rbuObjIterFreeCols(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:202536:13: // Finalize all statements and free all allocations that are specific to // the current object (table/index pair). -func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:202556:13: */ +func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:202596:13: */ var pUp uintptr Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) @@ -162723,7 +162961,7 @@ func rbuObjIterClearStatements(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:2025 // Clean up any resources allocated as part of the iterator object passed // as the only argument. -func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:202588:13: */ +func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:202628:13: */ rbuObjIterClearStatements(tls, pIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) @@ -162737,7 +162975,7 @@ func rbuObjIterFinalize(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:202588:13: // pointing to the next entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:202604:12: */ +func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:202644:12: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_OK { @@ -162746,7 +162984,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+27443 /* "DROP TRIGGER IF ..." */, uintptr(0), uintptr(0), p+36) + ts+27612, uintptr(0), uintptr(0), p+36) } if rc == SQLITE_OK { @@ -162818,7 +163056,7 @@ func rbuObjIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3. // // For an rbu vacuum handle, a copy of the first argument is returned if // the second argument is either missing or 0 (not a view). -func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:202684:13: */ +func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3.c:202724:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var zIn uintptr @@ -162830,7 +163068,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) } } else { - if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24613, zIn, uint32(4)) == 0 { + if libc.Xstrlen(tls, zIn) > Size_t(4) && libc.Xmemcmp(tls, ts+24782, zIn, uint32(4)) == 0 { var i int32 for i = 4; int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) >= '0' && int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) <= '9'; i++ { } @@ -162848,7 +163086,7 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // pointing to the first entry. Otherwise, an error code and message is // left in the RBU handle passed as the first argument. A copy of the // error code is returned. -func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:202720:12: */ +func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:202760:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -162858,17 +163096,17 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter, p+36, Xsqlite3_mprintf(tls, - ts+27614 /* "SELECT rbu_targe..." */, libc.VaList(bp, func() uintptr { + ts+27783, libc.VaList(bp, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 27764 /* "AND rootpage!=0 ..." */ + return ts + 27933 /* "AND rootpage!=0 ..." */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }()))) if rc == SQLITE_OK { rc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+4, p+36, - ts+27805 /* "SELECT name, roo..." */) + ts+27974) } (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 @@ -162883,7 +163121,7 @@ func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3 // than SQLITE_OK), then this function returns NULL without modifying the // stored error code. In this case it still calls sqlite3_free() on any // printf() parameters associated with %z conversions. -func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:202755:13: */ +func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:202795:13: */ var zSql uintptr = uintptr(0) var ap Va_list _ = ap @@ -162909,7 +163147,7 @@ func rbuMPrintf(tls *libc.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* // If an error occurs, an error code and error message is stored in the // RBU handle. If an error has already occurred when this function is // called, it is a no-op. -func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:202780:12: */ +func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:202820:12: */ var ap Va_list _ = ap var zSql uintptr @@ -162935,7 +163173,7 @@ func rbuMPrintfExec(tls *libc.TLS, p uintptr, db uintptr, zFmt uintptr, va uintp // error has already occurred when this function is called, return NULL // immediately without attempting the allocation or modifying the stored // error code. -func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:202807:13: */ +func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:202847:13: */ var pRet uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -162952,7 +163190,7 @@ func rbuMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlit // Allocate and zero the pIter->azTblCol[] and abTblPk[] arrays so that // there is room for at least nCol elements. If an OOM occurs, store an // error code in the RBU handle passed as the first argument. -func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:202827:13: */ +func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3.c:202867:13: */ var nByte Sqlite3_int64 = Sqlite3_int64((uint32(2)*uint32(unsafe.Sizeof(uintptr(0))) + uint32(unsafe.Sizeof(int32(0))) + uint32(3)*uint32(unsafe.Sizeof(U8(0)))) * uint32(nCol)) var azNew uintptr @@ -162975,7 +163213,7 @@ func rbuAllocateIterArrays(tls *libc.TLS, p uintptr, pIter uintptr, nCol int32) // If an OOM condition is encountered when attempting to allocate memory, // output variable (*pRc) is set to SQLITE_NOMEM before returning. Otherwise, // if the allocation succeeds, (*pRc) is left unchanged. -func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:202852:13: */ +func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c:202892:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { @@ -162998,7 +163236,7 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // If the sqlite3_finalize() call indicates that an error occurs, and the // rbu handle error code is not already set, set the error code and error // message accordingly. -func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:202877:13: */ +func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:202917:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -163006,7 +163244,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:202877: var rc int32 = Xsqlite3_finalize(tls, pStmt) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && rc != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, Xsqlite3_errmsg(tls, db))) } } @@ -163048,7 +163286,7 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:202877: // }else{ // return RBU_PK_NONE // } -func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:202925:13: */ +func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:202965:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -163069,7 +163307,7 @@ func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32, p+36, Xsqlite3_mprintf(tls, - ts+27930 /* "SELECT (sql COL..." */, libc.VaList(bp, zTab))) + ts+28099, libc.VaList(bp, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK || Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) != SQLITE_ROW) { goto __1 } @@ -163084,10 +163322,10 @@ __1: goto rbuTableType_end __2: ; - *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */)), 1) + *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32)), 1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+1*4, p+36, - Xsqlite3_mprintf(tls, ts+28049 /* "PRAGMA index_lis..." */, libc.VaList(bp+8, zTab))) + Xsqlite3_mprintf(tls, ts+28218, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -163098,21 +163336,21 @@ __4: if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 1*4))) == SQLITE_ROW) { goto __5 } - zOrig = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 1*4)), 3) - zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 1*4)), 1) + zOrig = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 1*4)), 3) + zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 1*4)), 1) if !(zOrig != 0 && zIdx != 0 && int32(*(*U8)(unsafe.Pointer(zOrig))) == 'p') { goto __6 } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+2*4, p+36, Xsqlite3_mprintf(tls, - ts+28070 /* "SELECT rootpage ..." */, libc.VaList(bp+16, zIdx))) + ts+28239, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 2*4))) == SQLITE_ROW) { goto __8 } - *(*int32)(unsafe.Pointer(piPk)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 2*4)), 0) + *(*int32)(unsafe.Pointer(piPk)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 + 2*4)), 0) *(*int32)(unsafe.Pointer(peType)) = RBU_PK_EXTERNAL goto __9 __8: @@ -163129,7 +163367,7 @@ __5: ; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32+3*4, p+36, - Xsqlite3_mprintf(tls, ts+28121 /* "PRAGMA table_inf..." */, libc.VaList(bp+24, zTab))) + Xsqlite3_mprintf(tls, ts+28290, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } @@ -163157,18 +163395,19 @@ __14: if !(i < uint32(unsafe.Sizeof([4]uintptr{}))/uint32(unsafe.Sizeof(uintptr(0)))) { goto __16 } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(i)*4))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 32 + uintptr(i)*4))) goto __15 __15: i++ goto __14 goto __16 __16: + } // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:203011:13: */ +func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:203051:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -163177,8 +163416,8 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16 /* &pList */, p+36, - Xsqlite3_mprintf(tls, ts+28142 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16, p+36, + Xsqlite3_mprintf(tls, ts+28311, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 @@ -163192,8 +163431,8 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq if bPartial != 0 { libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, uint32(unsafe.Sizeof(U8(0)))*uint32((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) } - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+20 /* &pXInfo */, p+36, - Xsqlite3_mprintf(tls, ts+28170 /* "PRAGMA main.inde..." */, libc.VaList(bp+8, zIdx))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+20, p+36, + Xsqlite3_mprintf(tls, ts+28339, libc.VaList(bp+8, zIdx))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 20))) { var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 20 /* pXInfo */)), 1) if iCid >= 0 { @@ -163226,7 +163465,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // Return SQLITE_OK if successful, or an SQLite error code otherwise. If // an error does occur, an error code and error message are also left in // the RBU handle. -func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:203065:12: */ +func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:203105:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -163240,10 +163479,10 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // Figure out the type of table this step will deal with. - rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+36, bp+56 /* &iTnum */, pIter+60) + rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, pIter+36, bp+56, pIter+60) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19154 /* "no such table: %..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19323, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc @@ -163255,19 +163494,19 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // Populate the azTblCol[] and nTblCol variables based on the columns // of the input table. Ignore any input table columns that begin with // "rbu_". - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60 /* &pStmt */, p+36, - Xsqlite3_mprintf(tls, ts+28199 /* "SELECT * FROM '%..." */, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+60, p+36, + Xsqlite3_mprintf(tls, ts+28368, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < nCol; i++ { var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), i) - if Xsqlite3_strnicmp(tls, ts+28218, zName, 4) != 0 { + if Xsqlite3_strnicmp(tls, ts+28387, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, p+32) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(libc.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*4)) = zCopy - } else if 0 == Xsqlite3_stricmp(tls, ts+28223, zName) { + } else if 0 == Xsqlite3_stricmp(tls, ts+28392, zName) { bRbuRowid = 1 } } @@ -163279,12 +163518,12 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid != libc.Bool32((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28233 /* "table %q %s rbu_..." */, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28402, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { - return ts + 28262 /* "may not have" */ + return ts + 28431 /* "may not have" */ } - return ts + 28275 /* "requires" */ + return ts + 28444 /* "requires" */ }())) } @@ -163292,8 +163531,8 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // present in the input table. Populate the abTblPk[], azTblType[] and // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60 /* &pStmt */, p+36, - Xsqlite3_mprintf(tls, ts+28284 /* "PRAGMA table_inf..." */, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, + Xsqlite3_mprintf(tls, ts+28453, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 60))) { var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), 1) @@ -163307,7 +163546,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28306, /* "column missing f..." */ + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28475, libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pStmt */)), 5) @@ -163348,17 +163587,17 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // This function constructs and returns a pointer to a nul-terminated // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. -func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203175:13: */ +func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203215:13: */ bp := tls.Alloc(24) defer tls.Free(24) var zList uintptr = uintptr(0) - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var z uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+28333 /* "%z%s\"%w\"" */, libc.VaList(bp, zList, zSep, z)) - zSep = ts + 14507 /* ", " */ + zList = rbuMPrintf(tls, p, ts+28502, libc.VaList(bp, zList, zSep, z)) + zSep = ts + 14529 /* ", " */ } return zList } @@ -163367,19 +163606,19 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // in order, for the current table. Before each column name, add the text // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). -func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:203196:13: */ +func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:203236:13: */ bp := tls.Alloc(40) defer tls.Free(40) var iPk int32 = 1 var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ for 1 != 0 { var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if int32(*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == iPk { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zRet = rbuMPrintf(tls, p, ts+28342 /* "%z%s%s\"%w\"%s" */, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) + zRet = rbuMPrintf(tls, p, ts+28511, libc.VaList(bp, zRet, zSep, zPre, zCol, zPost)) zSep = zSeparator break } @@ -163409,34 +163648,34 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. -func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:203241:13: */ +func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:203281:13: */ bp := tls.Alloc(76) defer tls.Free(76) *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)) = uintptr(0) var zRet uintptr = uintptr(0) if bRowid != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72 /* &pMax */, p+36, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28355 /* "SELECT max(_rowi..." */, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + ts+28524, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28387 /* " WHERE _rowid_ >..." */, libc.VaList(bp+16, iMax)) + zRet = rbuMPrintf(tls, p, ts+28556, libc.VaList(bp+16, iMax)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1543 /* "" */, ts+14507 /* ", " */, ts+28410 /* " DESC" */) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28416 /* "quote(" */, ts+28423 /* "||','||" */, ts+4877 /* ")" */) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1543 /* "" */, ts+14507 /* ", " */, ts+1543 /* "" */) + var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1565, ts+14529, ts+28579) + var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28585, ts+28592, ts+4899) + var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+1565, ts+14529, ts+1565) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72 /* &pMax */, p+36, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72, p+36, Xsqlite3_mprintf(tls, - ts+28431, /* "SELECT %s FROM \"..." */ + ts+28600, libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72))) { var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28473 /* " WHERE (%s) > (%..." */, libc.VaList(bp+56, zList, zVal)) + zRet = rbuMPrintf(tls, p, ts+28642, libc.VaList(bp+56, zList, zVal)) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } @@ -163468,7 +163707,7 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // If the expression cannot be created, NULL is returned. In this case, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. -func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203308:6: */ +func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203348:6: */ bp := tls.Alloc(184) defer tls.Free(184) @@ -163494,12 +163733,12 @@ func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* zVector = uintptr(0) zRet = uintptr(0) bFailed = 0 - zSep = ts + 1543 /* "" */ + zSep = ts + 1565 /* "" */ iCol = 0 *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176 /* &pXInfo */, p+36, - Xsqlite3_mprintf(tls, ts+28170 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176, p+36, + Xsqlite3_mprintf(tls, ts+28339, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176)))) { goto __2 @@ -163536,7 +163775,7 @@ __10: zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) goto __7 __6: - zCol = ts + 28493 /* "_rowid_" */ + zCol = ts + 28662 /* "_rowid_" */ __7: ; goto __5 @@ -163545,13 +163784,13 @@ __4: __5: ; - zLhs = rbuMPrintf(tls, p, ts+28501, /* "%z%s \"%w\" COLLAT..." */ + zLhs = rbuMPrintf(tls, p, ts+28670, libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+28522, /* "%z%s \"rbu_imp_%d..." */ + zOrder = rbuMPrintf(tls, p, ts+28691, libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+28558, /* "%z%s quote(\"rbu_..." */ + zSelect = rbuMPrintf(tls, p, ts+28727, libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 14507 /* ", " */ + zSep = ts + 14529 /* ", " */ iCol++ goto __1 __2: @@ -163569,13 +163808,13 @@ __11: } *(*uintptr)(unsafe.Pointer(bp + 180 /* pSel */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180 /* &pSel */, p+36, - Xsqlite3_mprintf(tls, ts+28585, /* "SELECT %s FROM \"..." */ + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+180, p+36, + Xsqlite3_mprintf(tls, ts+28754, libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 180)))) { goto __13 } - zSep = ts + 1543 /* "" */ + zSep = ts + 1565 /* "" */ iCol = 0 __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { @@ -163597,8 +163836,8 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28633 /* "%z%s%s" */, libc.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 14507 /* ", " */ + zVector = rbuMPrintf(tls, p, ts+28802, libc.VaList(bp+136, zVector, zSep, zQuoted)) + zSep = ts + 14529 /* ", " */ goto __15 __15: iCol++ @@ -163610,7 +163849,7 @@ __16: if !!(bFailed != 0) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28640 /* "(%s) > (%s)" */, libc.VaList(bp+160, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28809, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: @@ -163649,7 +163888,7 @@ index_start_out: // pzImposterCols: ... // pzImposterPk: ... // pzWhere: ... -func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:203423:13: */ +func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:203463:13: */ bp := tls.Alloc(204) defer tls.Free(204) @@ -163660,14 +163899,14 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var zImpPK uintptr = uintptr(0) // String to return via *pzImposterPK var zWhere uintptr = uintptr(0) // String to return via *pzWhere var nBind int32 = 0 // Value to return via *pnBind - var zCom uintptr = ts + 1543 /* "" */ // Set to ", " later on - var zAnd uintptr = ts + 1543 /* "" */ // Set to " AND " later on + var zCom uintptr = ts + 1565 /* "" */ // Set to ", " later on + var zAnd uintptr = ts + 1565 /* "" */ // Set to " AND " later on *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = ? if rc == SQLITE_OK { - rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200 /* &pXInfo */, p+36, - Xsqlite3_mprintf(tls, ts+28170 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) + rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200, p+36, + Xsqlite3_mprintf(tls, ts+28339, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200))) { @@ -163679,9 +163918,9 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC if iCid == -2 { var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28652 /* "%z%s(%.*s) COLLA..." */, libc.VaList(bp+8, zRet, zCom, + zRet = Xsqlite3_mprintf(tls, ts+28821, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*8)).FzSpan, zCollate)) - zType = ts + 1543 /* "" */ + zType = ts + 1565 /* "" */ } else { if iCid < 0 { // An integer primary key. If the table has an explicit IPK, use @@ -163693,37 +163932,37 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zCol = ts + 28493 /* "_rowid_" */ + zCol = ts + 28662 /* "_rowid_" */ } else { - zCol = ts + 28223 /* "rbu_rowid" */ + zCol = ts + 28392 /* "rbu_rowid" */ } - zType = ts + 1090 /* "INTEGER" */ + zType = ts + 1112 /* "INTEGER" */ } else { zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*4)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)) } - zRet = Xsqlite3_mprintf(tls, ts+28674 /* "%z%s\"%w\" COLLATE..." */, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28843, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } if (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0 || Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200)), 5) != 0 { var zOrder uintptr = func() uintptr { if bDesc != 0 { - return ts + 28410 + return ts + 28579 } - return ts + 1543 + return ts + 1565 }() - zImpPK = Xsqlite3_mprintf(tls, ts+28694, /* "%z%s\"rbu_imp_%d%..." */ + zImpPK = Xsqlite3_mprintf(tls, ts+28863, libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } - zImpCols = Xsqlite3_mprintf(tls, ts+28715, /* "%z%s\"rbu_imp_%d%..." */ + zImpCols = Xsqlite3_mprintf(tls, ts+28884, libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+28748 /* "%z%s\"rbu_imp_%d%..." */, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) + ts+28917, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if zRet == uintptr(0) || zImpPK == uintptr(0) || zImpCols == uintptr(0) || zWhere == uintptr(0) { rc = SQLITE_NOMEM } - zCom = ts + 14507 /* ", " */ - zAnd = ts + 21174 /* " AND " */ + zCom = ts + 14529 /* ", " */ + zAnd = ts + 21343 /* " AND " */ nBind++ } @@ -163760,22 +163999,22 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:203535:13: */ +func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:203575:13: */ bp := tls.Alloc(64) defer tls.Free(64) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zS uintptr = ts + 1543 /* "" */ + var zS uintptr = ts + 1565 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = Xsqlite3_mprintf(tls, ts+28772 /* "%z%s%s.\"%w\"" */, libc.VaList(bp, zList, zS, zObj, zCol)) + zList = Xsqlite3_mprintf(tls, ts+28941, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+28784 /* "%z%sNULL" */, libc.VaList(bp+32, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+28953, libc.VaList(bp+32, zList, zS)) } - zS = ts + 14507 /* ", " */ + zS = ts + 14529 /* ", " */ if zList == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM break @@ -163784,7 +164023,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+28793 /* "%z, %s._rowid_" */, libc.VaList(bp+48, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+28962, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -163798,33 +164037,33 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // Return the string: // // "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203576:13: */ +func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203616:13: */ bp := tls.Alloc(80) defer tls.Free(80) var zList uintptr = uintptr(0) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zList = rbuMPrintf(tls, p, ts+28808 /* "_rowid_ = ?%d" */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) + zList = rbuMPrintf(tls, p, ts+28977, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1)) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+28822 /* "%z%sc%d=?%d" */, libc.VaList(bp+8, zList, zSep, i, i+1)) - zSep = ts + 21174 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+28991, libc.VaList(bp+8, zList, zSep, i, i+1)) + zSep = ts + 21343 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+28834 /* "_rowid_ = (SELEC..." */, libc.VaList(bp+40, zList)) + ts+29003, libc.VaList(bp+40, zList)) } else { - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)) - zList = rbuMPrintf(tls, p, ts+28884 /* "%z%s\"%w\"=?%d" */, libc.VaList(bp+48, zList, zSep, zCol, i+1)) - zSep = ts + 21174 /* " AND " */ + zList = rbuMPrintf(tls, p, ts+29053, libc.VaList(bp+48, zList, zSep, zCol, i+1)) + zSep = ts + 21343 /* " AND " */ } } } @@ -163836,9 +164075,9 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq // is something wrong with the rbu_control value in the rbu_control value // stored in the (p->nCol+1)'th column. Set the error code and error message // of the RBU handle to something reflecting this. -func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:203617:13: */ +func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:203657:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28897 /* "invalid rbu_cont..." */, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+29066, 0) } // Return a nul-terminated string containing the comma separated list of @@ -163856,7 +164095,7 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:203617:13: */ // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:203640:13: */ +func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:203680:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -163867,21 +164106,21 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr if int32(libc.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { rbuBadControlError(tls, p) } else { - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { var c int8 = *(*int8)(unsafe.Pointer(zMask + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) if int32(c) == 'x' { - zList = rbuMPrintf(tls, p, ts+28884, /* "%z%s\"%w\"=?%d" */ + zList = rbuMPrintf(tls, p, ts+29053, libc.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14507 /* ", " */ + zSep = ts + 14529 /* ", " */ } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+28923, /* "%z%s\"%w\"=rbu_del..." */ + zList = rbuMPrintf(tls, p, ts+29092, libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14507 /* ", " */ + zSep = ts + 14529 /* ", " */ } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+28953, /* "%z%s\"%w\"=rbu_fos..." */ + zList = rbuMPrintf(tls, p, ts+29122, libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*4)), i+1)) - zSep = ts + 14507 /* ", " */ + zSep = ts + 14529 /* ", " */ } } } @@ -163902,7 +164141,7 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr // argument and NULL is returned. Or, if an error has already occurred // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. -func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:203694:13: */ +func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* sqlite3.c:203734:13: */ var zRet uintptr = uintptr(0) var nByte Sqlite3_int64 = int64(2)*Sqlite3_int64(nBind) + int64(1) @@ -163932,26 +164171,26 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // this function returns: // // PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203721:13: */ +func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203761:13: */ bp := tls.Alloc(64) defer tls.Free(64) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zSep uintptr = ts + 28990 /* "PRIMARY KEY(" */ + var zSep uintptr = ts + 29159 /* "PRIMARY KEY(" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = <pk-index> - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56 /* &pXList */, p+36, - Xsqlite3_mprintf(tls, ts+28142 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56, p+36, + Xsqlite3_mprintf(tls, ts+28311, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56))) { var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+15849) == 0 { + if zOrig != 0 && libc.Xstrcmp(tls, zOrig, ts+16022) == 0 { var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60 /* &pXInfo */, p+36, - Xsqlite3_mprintf(tls, ts+28170 /* "PRAGMA main.inde..." */, libc.VaList(bp+8, zIdx))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+60, p+36, + Xsqlite3_mprintf(tls, ts+28339, libc.VaList(bp+8, zIdx))) } break } @@ -163964,15 +164203,15 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */)), 2) var zDesc uintptr if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 60)), 3) != 0 { - zDesc = ts + 28410 /* " DESC" */ + zDesc = ts + 28579 /* " DESC" */ } else { - zDesc = ts + 1543 /* "" */ + zDesc = ts + 1565 /* "" */ } - z = rbuMPrintf(tls, p, ts+29003 /* "%z%s\"%w\"%s" */, libc.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 14507 /* ", " */ + z = rbuMPrintf(tls, p, ts+29172, libc.VaList(bp+16, z, zSep, zCol, zDesc)) + zSep = ts + 14529 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29014 /* "%z)" */, libc.VaList(bp+48, z)) + z = rbuMPrintf(tls, p, ts+29183, libc.VaList(bp+48, z)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 60 /* pXInfo */))) } return z @@ -163995,7 +164234,7 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // -func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:203780:13: */ +func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:203820:13: */ bp := tls.Alloc(176) defer tls.Free(176) @@ -164004,15 +164243,15 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)) = uintptr(0) // SELECT name ... WHERE rootpage = $tnum var zIdx uintptr = uintptr(0) // Name of PK index *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)) = uintptr(0) // PRAGMA main.index_xinfo = $zIdx - var zComma uintptr = ts + 1543 /* "" */ + var zComma uintptr = ts + 1565 /* "" */ var zCols uintptr = uintptr(0) // Used to build up list of table cols var zPk uintptr = uintptr(0) // Used to build up table PK declaration // Figure out the name of the primary key index for the current table. // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168 /* &pQuery */, p+36, - ts+29018 /* "SELECT name FROM..." */) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168, p+36, + ts+29187) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168))) { @@ -164020,8 +164259,8 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit } } if zIdx != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172 /* &pXInfo */, p+36, - Xsqlite3_mprintf(tls, ts+28170 /* "PRAGMA main.inde..." */, libc.VaList(bp, zIdx))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+172, p+36, + Xsqlite3_mprintf(tls, ts+28339, libc.VaList(bp, zIdx))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) @@ -164031,25 +164270,25 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 1) var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 3) var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29068 /* "%z%sc%d %s COLLA..." */, libc.VaList(bp+8, zCols, zComma, + zCols = rbuMPrintf(tls, p, ts+29237, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*4)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29090 /* "%z%sc%d%s" */, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29259, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { - return ts + 28410 /* " DESC" */ + return ts + 28579 /* " DESC" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }())) - zComma = ts + 14507 /* ", " */ + zComma = ts + 14529 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29100 /* "%z, id INTEGER" */, libc.VaList(bp+80, zCols)) + zCols = rbuMPrintf(tls, p, ts+29269, libc.VaList(bp+80, zCols)) rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 172 /* pXInfo */))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29115, /* "CREATE TABLE rbu..." */ + ts+29284, libc.VaList(bp+120, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, 0, 0)) } } @@ -164071,58 +164310,58 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // More precisely, the "same schema" means the same columns, types, // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. -func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:203854:13: */ +func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:203894:13: */ bp := tls.Alloc(196) defer tls.Free(196) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum - var zComma uintptr = ts + 1543 /* "" */ + var zComma uintptr = ts + 1565 /* "" */ var zSql uintptr = uintptr(0) var iCol int32 - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, 0, 1)) for iCol = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; iCol++ { - var zPk uintptr = ts + 1543 /* "" */ + var zPk uintptr = ts + 1565 /* "" */ var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*4)) *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192 /* &zColl */, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192, uintptr(0), uintptr(0), uintptr(0)) if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0 { // If the target table column is an "INTEGER PRIMARY KEY", add // "PRIMARY KEY" to the imposter table column declaration. - zPk = ts + 29177 /* "PRIMARY KEY " */ + zPk = ts + 29346 /* "PRIMARY KEY " */ } - zSql = rbuMPrintf(tls, p, ts+29190, /* "%z%s\"%w\" %s %sCO..." */ + zSql = rbuMPrintf(tls, p, ts+29359, libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*4)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 29217 /* " NOT NULL" */ + return ts + 29386 /* " NOT NULL" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }())) - zComma = ts + 14507 /* ", " */ + zComma = ts + 14529 /* ", " */ } if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29227 /* "%z, %z" */, libc.VaList(bp+88, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29396, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, 1, tnum)) - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29234, /* "CREATE TABLE \"rb..." */ + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, 1, tnum)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29403, libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { - return ts + 29266 /* " WITHOUT ROWID" */ + return ts + 29435 /* " WITHOUT ROWID" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, 0, 0)) } } @@ -164135,7 +164374,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // the target table, plus one (for the rbu_control column), plus one more // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. -func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:203910:13: */ +func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:203950:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -164145,12 +164384,12 @@ func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollis (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+88, p+36, Xsqlite3_mprintf(tls, - ts+29281, /* "INSERT INTO %s.'..." */ + ts+29450, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) } } -func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:203928:13: */ +func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:203968:13: */ var p uintptr = Xsqlite3_user_data(tls, pCtx) var rc int32 = SQLITE_OK var i int32 @@ -164172,7 +164411,7 @@ func rbuTmpInsertFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { } } -func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203958:13: */ +func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:203998:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -164181,8 +164420,8 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp /* &pStmt */, p+36, - ts+29338 /* "SELECT trim(sql)..." */) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp, p+36, + ts+29507) } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var rc2 int32 @@ -164190,7 +164429,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { var zSql uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) if zSql != 0 { - (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql = libc.AssignUintptr(&zSql, rbuStrndup(tls, zSql, bp+4 /* &rc */)) + (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql = libc.AssignUintptr(&zSql, rbuStrndup(tls, zSql, bp+4)) } if zSql != 0 { var nParen int32 = 0 // Number of open parenthesis @@ -164261,7 +164500,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { } } if *(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0 { - zRet = rbuStrndup(tls, zSql+uintptr(i), bp+4 /* &rc */) + zRet = rbuStrndup(tls, zSql+uintptr(i), bp+4) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIdxCol = iIdxCol } @@ -164280,7 +164519,7 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // Ensure that the SQLite statement handles required to update the // target database object currently indicated by the iterator passed // as the second argument are available. -func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:204058:12: */ +func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:204098:12: */ bp := tls.Alloc(616) defer tls.Free(616) @@ -164292,7 +164531,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zLimit uintptr = uintptr(0) if nOffset != 0 { - zLimit = Xsqlite3_mprintf(tls, ts+29404 /* " LIMIT -1 OFFSET..." */, libc.VaList(bp, nOffset)) + zLimit = Xsqlite3_mprintf(tls, ts+29573, libc.VaList(bp, nOffset)) if !(zLimit != 0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM } @@ -164309,30 +164548,30 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 zPart = rbuObjIterGetIndexWhere(tls, p, pIter) zCollist = rbuObjIterGetIndexCols(tls, - p, pIter, bp+600 /* &zImposterCols */, bp+604 /* &zImposterPK */, bp+608 /* &zWhere */, bp+612 /* &nBind */) + p, pIter, bp+600, bp+604, bp+608, bp+612) zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 612 /* nBind */))) // Create the imposter table used to write to this index. - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+29424, /* "CREATE TABLE \"rb..." */ + ts+29593, libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 604 /* zImposterPK */)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, 0, 0)) // Create the statement to insert index entries (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 612 /* nBind */)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, p+36, - Xsqlite3_mprintf(tls, ts+29489 /* "INSERT INTO \"rbu..." */, libc.VaList(bp+128, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29658, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, p+36, - Xsqlite3_mprintf(tls, ts+29525 /* "DELETE FROM \"rbu..." */, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29694, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 608 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -164349,7 +164588,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } zSql = Xsqlite3_mprintf(tls, - ts+29559, /* "SELECT %s, 0 AS ..." */ + ts+29728, libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, @@ -164357,32 +164596,32 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zStart != 0 { return func() uintptr { if zPart != 0 { - return ts + 29620 /* "AND" */ + return ts + 29789 /* "AND" */ } - return ts + 29624 /* "WHERE" */ + return ts + 29793 /* "WHERE" */ }() } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), zStart, zCollist, zLimit)) Xsqlite3_free(tls, zStart) } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { zSql = Xsqlite3_mprintf(tls, - ts+29630, /* "SELECT %s, rbu_c..." */ + ts+29799, libc.VaList(bp+216, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, - ts+29691, /* "SELECT %s, rbu_c..." */ + ts+29860, libc.VaList(bp+264, zCollist, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { if zPart != 0 { - return ts + 29620 /* "AND" */ + return ts + 29789 /* "AND" */ } - return ts + 29624 /* "WHERE" */ + return ts + 29793 /* "WHERE" */ }(), zCollist, zLimit)) } @@ -164407,8 +164646,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 var zBindings uintptr = rbuObjIterGetBindlist(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+bRbuRowid) var zWhere uintptr = rbuObjIterGetWhere(tls, p, pIter) - var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6314 /* "old" */) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6310 /* "new" */) + var zOldlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6336) + var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+6332) zCollist = rbuObjIterGetCollist(tls, p, pIter) (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -164418,21 +164657,21 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuCreateImposterTable2(tls, p, pIter) zWrite = func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB { - return ts + 1543 + return ts + 1565 } - return ts + 29850 + return ts + 30019 }() // Create the INSERT statement to write to the target PK b-tree if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+80, pz, Xsqlite3_mprintf(tls, - ts+29859, /* "INSERT INTO \"%s%..." */ + ts+30028, libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { - return ts + 29895 /* ", _rowid_" */ + return ts + 30064 /* ", _rowid_" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), zBindings))) } @@ -164442,28 +164681,28 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pIter+84, pz, Xsqlite3_mprintf(tls, - ts+29905 /* "DELETE FROM \"%s%..." */, libc.VaList(bp+384, zWrite, zTbl, zWhere))) + ts+30074, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { - var zRbuRowid uintptr = ts + 1543 /* "" */ + var zRbuRowid uintptr = ts + 1565 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { - zRbuRowid = ts + 29933 /* ", rbu_rowid" */ + zRbuRowid = ts + 30102 /* ", rbu_rowid" */ } // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+29945 /* "CREATE TABLE IF ..." */, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+30114, libc.VaList(bp+408, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { - return ts + 30021 /* ", 0 AS rbu_rowid" */ + return ts + 30190 /* ", 0 AS rbu_rowid" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30038, /* "CREATE TEMP TRIG..." */ + ts+30207, libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -164471,7 +164710,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL || (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30337, /* "CREATE TEMP TRIG..." */ + ts+30506, libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } @@ -164480,14 +164719,14 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // Create the SELECT statement to read keys from data_xxx if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var zRbuRowid uintptr = ts + 1543 /* "" */ + var zRbuRowid uintptr = ts + 1565 /* "" */ var zStart uintptr = uintptr(0) var zOrder uintptr = uintptr(0) if bRbuRowid != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zRbuRowid = ts + 30436 /* ",_rowid_ " */ + zRbuRowid = ts + 30605 /* ",_rowid_ " */ } else { - zRbuRowid = ts + 30446 /* ",rbu_rowid" */ + zRbuRowid = ts + 30615 /* ",rbu_rowid" */ } } @@ -164500,35 +164739,35 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+28493 /* "_rowid_" */, 0) + zOrder = rbuMPrintf(tls, p, ts+28662, 0) } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1543 /* "" */, ts+14507 /* ", " */, ts+1543 /* "" */) + zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+1565, ts+14529, ts+1565) } } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, pIter+76, pz, Xsqlite3_mprintf(tls, - ts+30457, /* "SELECT %s,%s rbu..." */ + ts+30626, libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 30505 /* "0 AS " */ + return ts + 30674 /* "0 AS " */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), zRbuRowid, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if zStart != 0 { return zStart } - return ts + 1543 + return ts + 1565 }(), func() uintptr { if zOrder != 0 { - return ts + 19508 /* "ORDER BY" */ + return ts + 19677 /* "ORDER BY" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), zOrder, zLimit))) } @@ -164555,7 +164794,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. -func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:204325:12: */ +func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:204365:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -164603,12 +164842,12 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp if zSet != 0 { - var zPrefix uintptr = ts + 1543 /* "" */ + var zPrefix uintptr = ts + 1565 /* "" */ if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB { - zPrefix = ts + 29850 /* "rbu_imp_" */ + zPrefix = ts + 30019 /* "rbu_imp_" */ } - zUpdate = Xsqlite3_mprintf(tls, ts+30511, /* "UPDATE \"%s%w\" SE..." */ + zUpdate = Xsqlite3_mprintf(tls, ts+30680, libc.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, pUp+4, p+36, zUpdate) @@ -164621,21 +164860,21 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } -func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:204393:16: */ +func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:204433:16: */ bp := tls.Alloc(12) defer tls.Free(12) *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var flags int32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_URI - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_open_v2(tls, zName, bp+8 /* &db */, flags, func() uintptr { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_open_v2(tls, zName, bp+8, flags, func() uintptr { if bUseVfs != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName } return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))))) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))))) Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))) *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0) } @@ -164644,7 +164883,7 @@ func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uin } // Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:204414:13: */ +func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:204454:13: */ if p != 0 { Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) @@ -164660,7 +164899,7 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:204414:13: */ // // If an error occurs, leave an error code and message in the rbu handle // and return NULL. -func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:204432:17: */ +func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:204472:17: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -164675,8 +164914,8 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:204432:17: */ return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8 /* &pStmt */, p+36, - Xsqlite3_mprintf(tls, ts+30541 /* "SELECT k, v FROM..." */, libc.VaList(bp, p+24))) + *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8, p+36, + Xsqlite3_mprintf(tls, ts+30710, libc.VaList(bp, p+24))) for *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8))) { switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: @@ -164689,11 +164928,11 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:204432:17: */ break case RBU_STATE_TBL: - (*RbuState)(unsafe.Pointer(pRet)).FzTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+12 /* &rc */) + (*RbuState)(unsafe.Pointer(pRet)).FzTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+12) break case RBU_STATE_IDX: - (*RbuState)(unsafe.Pointer(pRet)).FzIdx = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+12 /* &rc */) + (*RbuState)(unsafe.Pointer(pRet)).FzIdx = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+12) break case RBU_STATE_ROW: @@ -164721,7 +164960,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:204432:17: */ break case RBU_STATE_DATATBL: - (*RbuState)(unsafe.Pointer(pRet)).FzDataTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+12 /* &rc */) + (*RbuState)(unsafe.Pointer(pRet)).FzDataTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+12) break default: @@ -164744,7 +164983,7 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:204432:17: */ // If argument dbMain is not NULL, then it is a database handle already // open on the target database. Use this handle instead of opening a new // one. -func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:204513:13: */ +func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) { /* sqlite3.c:204553:13: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -164753,31 +164992,31 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain = dbMain if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6305 /* "main" */, SQLITE_FCNTL_RBUCNT, p) + Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6327, SQLITE_FCNTL_RBUCNT, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { - var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6305 /* "main" */) - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30571 /* "file://%s-vacuum..." */, libc.VaList(bp, zFile, zFile)) + var zFile uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6327) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+30740, libc.VaList(bp, zFile, zFile)) } } // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30598 /* "ATTACH %Q AS sta..." */, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) - libc.Xmemcpy(tls, p+24, ts+3224 /* "stat" */, uint32(4)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30767, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + libc.Xmemcpy(tls, p+24, ts+3246, uint32(4)) } else { - libc.Xmemcpy(tls, p+24, ts+6305 /* "main" */, uint32(4)) + libc.Xmemcpy(tls, p+24, ts+6327, uint32(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30616 /* "CREATE TABLE IF ..." */, libc.VaList(bp+24, p+24)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30785, libc.VaList(bp+24, p+24)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { var bOpen int32 = 0 var rc int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FnRbu = 0 (*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd = uintptr(0) - rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6305 /* "main" */, SQLITE_FCNTL_RBUCNT, p) + rc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6327, SQLITE_FCNTL_RBUCNT, p) if rc != SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc } @@ -164810,11 +165049,11 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) return } (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30682 /* "cannot vacuum wa..." */, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30851, 0) } else { var zTarget uintptr var zExtra uintptr = uintptr(0) - if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+23776, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { + if libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= Size_t(5) && 0 == libc.Xmemcmp(tls, ts+23945, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint32(5)) { zExtra = (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu + 5 for *(*int8)(unsafe.Pointer(zExtra)) != 0 { if int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zExtra, 1)))) == '?' { @@ -164826,16 +165065,16 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) } } - zTarget = Xsqlite3_mprintf(tls, ts+30714, /* "file:%s-vactmp?r..." */ - libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6305 /* "main" */), + zTarget = Xsqlite3_mprintf(tls, ts+30883, + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6327), func() uintptr { if zExtra == uintptr(0) { - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ } - return ts + 30746 /* "&" */ + return ts + 30915 /* "&" */ }(), func() uintptr { if zExtra == uintptr(0) { - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ } return zExtra }())) @@ -164851,40 +165090,40 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30748 /* "rbu_tmp_insert" */, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+30917, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+30763 /* "rbu_fossil_delta" */, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + ts+30932, 2, SQLITE_UTF8, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+30780 /* "rbu_target_name" */, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+30949, -1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, SQLITE_FCNTL_RBU, p) } - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30796 /* "SELECT * FROM sq..." */, 0) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30965, 0) // Mark the database file just opened as an RBU target database. If // this call returns SQLITE_NOTFOUND, then the RBU vfs is not in use. // This is an error. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */, SQLITE_FCNTL_RBU, p) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_file_control(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327, SQLITE_FCNTL_RBU, p) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30824 /* "rbu vfs not foun..." */, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+30993, 0) } } @@ -164906,7 +165145,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, dbMain uintptr, pbRetry uintptr) // test.db-wal => test.wal // test.db-shm => test.shm // test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:204694:13: */ +func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:204734:13: */ } // Return the current wal-index header checksum for the target database @@ -164914,7 +165153,7 @@ func rbuFileSuffix3(tls *libc.TLS, zBase uintptr, z uintptr) { /* sqlite3.c:2046 // // The checksum is store in the first page of xShmMap memory as an 8-byte // blob starting at byte offset 40. -func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:204715:12: */ +func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:204755:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -164947,7 +165186,7 @@ func rbuShmChecksum(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:204715:12: */ // object, then the rbu handle is set to DONE state. This occurs if some // other client appends a transaction to the wal file in the middle of // an incremental checkpoint. -func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:204744:13: */ +func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:204784:13: */ // If pState is NULL, then the wal file may not have been opened and // recovered. Running a read-statement here to ensure that doing so @@ -164955,7 +165194,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if pState == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30796 /* "SELECT * FROM sq..." */, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30965, uintptr(0), uintptr(0), uintptr(0)) } } @@ -164989,7 +165228,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc2 int32 (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CAPTURE - rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30842 /* "PRAGMA main.wal_..." */, uintptr(0), uintptr(0), uintptr(0)) + rc2 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31011, uintptr(0), uintptr(0), uintptr(0)) if rc2 != SQLITE_INTERNAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -165039,7 +165278,7 @@ func rbuSetupCheckpoint(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c // Called when iAmt bytes are read from offset iOff of the wal file while // the rbu object is in capture mode. Record the frame number of the frame // being read in the aFrame[] array. -func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:204828:12: */ +func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 { /* sqlite3.c:204868:12: */ var mReq U32 = U32(int32(1)<<WAL_LOCK_WRITE | int32(1)<<WAL_LOCK_CKPT | int32(1)<<WAL_LOCK_READ0) var iFrame U32 @@ -165078,7 +165317,7 @@ func rbuCaptureWalRead(tls *libc.TLS, pRbu uintptr, iOff I64, iAmt int32) int32 // Called when a page of data is written to offset iOff of the database // file while the rbu handle is in capture mode. Record the page number // of the page being written in the aFrame[] array. -func rbuCaptureDbWrite(tls *libc.TLS, pRbu uintptr, iOff I64) int32 { /* sqlite3.c:204860:12: */ +func rbuCaptureDbWrite(tls *libc.TLS, pRbu uintptr, iOff I64) int32 { /* sqlite3.c:204900:12: */ (*RbuFrame)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FaFrame + uintptr((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrame-1)*8)).FiDbPage = U32(iOff/I64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).Fpgsz)) + U32(1) return SQLITE_OK } @@ -165086,7 +165325,7 @@ func rbuCaptureDbWrite(tls *libc.TLS, pRbu uintptr, iOff I64) int32 { /* sqlite3 // This is called as part of an incremental checkpoint operation. Copy // a single frame of data from the wal file into the database file, as // indicated by the RbuFrame object. -func rbuCheckpointFrame(tls *libc.TLS, p uintptr, pFrame uintptr) { /* sqlite3.c:204870:13: */ +func rbuCheckpointFrame(tls *libc.TLS, p uintptr, pFrame uintptr) { /* sqlite3.c:204910:13: */ var pWal uintptr = (*Rbu_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd)).FpReal var pDb uintptr = (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal var iOff I64 @@ -165107,13 +165346,13 @@ func rbuCheckpointFrame(tls *libc.TLS, p uintptr, pFrame uintptr) { /* sqlite3.c // Take an EXCLUSIVE lock on the database file. Return SQLITE_OK if // successful, or an SQLite error code otherwise. -func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:204889:12: */ +func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:204929:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 = SQLITE_OK *(*uintptr)(unsafe.Pointer(bp /* fd */)) = uintptr(0) - Xsqlite3_file_control(tls, db, ts+6305 /* "main" */, SQLITE_FCNTL_FILE_POINTER, bp /* &fd */) + Xsqlite3_file_control(tls, db, ts+6327, SQLITE_FCNTL_FILE_POINTER, bp) if (*Sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FpMethods != 0 { rc = (*struct { @@ -165131,9 +165370,9 @@ func rbuLockDatabase(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:204889:12: // Return true if the database handle passed as the only argument // was opened with the rbu_exclusive_checkpoint=1 URI parameter // specified. Or false otherwise. -func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:204908:12: */ +func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:204948:12: */ var zUri uintptr = Xsqlite3_db_filename(tls, db, uintptr(0)) - return Xsqlite3_uri_boolean(tls, zUri, ts+30877 /* "rbu_exclusive_ch..." */, 0) + return Xsqlite3_uri_boolean(tls, zUri, ts+31046, 0) } // The RBU handle is currently in RBU_STAGE_OAL state, with a SHARED lock @@ -165141,20 +165380,20 @@ func rbuExclusiveCheckpoint(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:2049 // then reopens the database file (this time in vanilla, non-oal, WAL mode). // If an error occurs, leave an error code and error message in the rbu // handle. -func rbuMoveOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:204944:13: */ +func rbuMoveOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:204984:13: */ bp := tls.Alloc(16) defer tls.Free(16) - var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6305 /* "main" */) + var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6327) var zMove uintptr = zBase var zOal uintptr var zWal uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6305 /* "main" */) + zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6327) } - zOal = Xsqlite3_mprintf(tls, ts+30902 /* "%s-oal" */, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+30909 /* "%s-wal" */, libc.VaList(bp+8, zMove)) + zOal = Xsqlite3_mprintf(tls, ts+31071, libc.VaList(bp, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+31078, libc.VaList(bp+8, zMove)) if zWal == uintptr(0) || zOal == uintptr(0) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -165223,7 +165462,7 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:204944:13: */ // // If the rbu_control field contains an invalid value, an error code and // message are left in the RBU handle and zero returned. -func rbuStepType(tls *libc.TLS, p uintptr, pzMask uintptr) int32 { /* sqlite3.c:205049:12: */ +func rbuStepType(tls *libc.TLS, p uintptr, pzMask uintptr) int32 { /* sqlite3.c:205089:12: */ var iCol int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnCol // Index of rbu_control column var res int32 = 0 // Return value @@ -165279,7 +165518,7 @@ func rbuStepType(tls *libc.TLS, p uintptr, pzMask uintptr) int32 { /* sqlite3.c: // Argument eType must be one of RBU_INSERT, RBU_DELETE, RBU_IDX_INSERT or // RBU_IDX_DELETE. This function performs the work of a single // sqlite3rbu_step() call for the type of operation specified by eType. -func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:205105:13: */ +func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:205145:13: */ var pIter uintptr = p + 48 var pVal uintptr var pWriter uintptr @@ -165307,7 +165546,7 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:205105:1 (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) && (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK && *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 && Xsqlite3_column_type(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) == SQLITE_NULL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_MISMATCH - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23414 /* "datatype mismatc..." */, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+23583, 0) return } @@ -165351,13 +165590,13 @@ func rbuStepOneOp(tls *libc.TLS, p uintptr, eType int32) { /* sqlite3.c:205105:1 // If no error occurs, SQLITE_OK is returned. Otherwise, an error code // and message is left in the RBU handle and a copy of the error code // returned. -func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205188:12: */ +func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205228:12: */ bp := tls.Alloc(8) defer tls.Free(8) var pIter uintptr = p + 48 *(*uintptr)(unsafe.Pointer(bp /* zMask */)) = uintptr(0) - var eType int32 = rbuStepType(tls, p, bp /* &zMask */) + var eType int32 = rbuStepType(tls, p, bp) if eType != 0 { @@ -165378,7 +165617,7 @@ func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205188:12: */ *(*uintptr)(unsafe.Pointer(bp + 4 /* pUpdate */)) = uintptr(0) *(*I64)(unsafe.Pointer(p + 176)) -= I64((*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex) - rbuGetUpdateStmt(tls, p, pIter, *(*uintptr)(unsafe.Pointer(bp /* zMask */)), bp+4 /* &pUpdate */) + rbuGetUpdateStmt(tls, p, pIter, *(*uintptr)(unsafe.Pointer(bp /* zMask */)), bp+4) if *(*uintptr)(unsafe.Pointer(bp + 4)) != 0 { var i int32 for i = 0; (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol; i++ { @@ -165410,7 +165649,7 @@ func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205188:12: */ // Or, if this is an RBU vacuum, set the schema cookie of the main db // opened by p->dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. -func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:205253:13: */ +func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:205293:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -165424,8 +165663,8 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:205253:13: */ var iCookie int32 = 1000000 // var pStmt uintptr at bp+8, 4 - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8 /* &pStmt */, p+36, - ts+30916 /* "PRAGMA schema_ve..." */) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8, p+36, + ts+31085) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There // is already a transaction open, so the prepared statement cannot @@ -165438,7 +165677,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:205253:13: */ rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30938 /* "PRAGMA schema_ve..." */, libc.VaList(bp, iCookie+1)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31107, libc.VaList(bp, iCookie+1)) } } } @@ -165446,7 +165685,7 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:205253:13: */ // Update the contents of the rbu_state table within the rbu database. The // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. -func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:205284:13: */ +func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:205324:13: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -165460,10 +165699,10 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:205284: }() var rc int32 - rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168 /* &pInsert */, p+36, + rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168, p+36, Xsqlite3_mprintf(tls, - ts+30965, /* "INSERT OR REPLAC..." */ + ts+31134, libc.VaList(bp, p+24, RBU_STATE_STAGE, eStage, RBU_STATE_TBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, @@ -165501,16 +165740,16 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:205284: // // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. -func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:205345:13: */ +func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:205385:13: */ bp := tls.Alloc(28) defer tls.Free(28) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24 /* &pPragma */, p+36, - Xsqlite3_mprintf(tls, ts+31123 /* "PRAGMA main.%s" */, libc.VaList(bp, zPragma))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24, p+36, + Xsqlite3_mprintf(tls, ts+31292, libc.VaList(bp, zPragma))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31138, /* "PRAGMA main.%s =..." */ + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31307, libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) @@ -165520,18 +165759,18 @@ func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:205 // The RBU handle passed as the only argument has just been opened and // the state database is empty. If this RBU handle was opened for an // RBU vacuum operation, create the schema in the target db. -func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:205365:13: */ +func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:205405:13: */ bp := tls.Alloc(8) defer tls.Free(8) *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 4 /* pInsert */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31158 /* "PRAGMA writable_..." */, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31327, uintptr(0), uintptr(0), p+36) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pSql */, p+36, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31183 /* "SELECT sql FROM ..." */) + ts+31352) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -165544,13 +165783,13 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:205365:13: * } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pSql */, p+36, - ts+31291 /* "SELECT * FROM sq..." */) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, + ts+31460) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4 /* &pInsert */, p+36, - ts+31356 /* "INSERT INTO sqli..." */) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+4, p+36, + ts+31525) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) == SQLITE_ROW { @@ -165562,7 +165801,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:205365:13: * (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pInsert */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31400 /* "PRAGMA writable_..." */, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31569, uintptr(0), uintptr(0), p+36) } rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) @@ -165570,7 +165809,7 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:205365:13: * } // Step the RBU object. -func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205417:16: */ +func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205457:16: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -165584,8 +165823,8 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205417:16: // when this handle was opened, create the target database schema. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).FnProgress == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+16938 /* "user_version" */) - rbuCopyPragma(tls, p, ts+16049 /* "application_id" */) + rbuCopyPragma(tls, p, ts+17107) + rbuCopyPragma(tls, p, ts+16218) } for (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0 { @@ -165596,7 +165835,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205417:16: // But the contents can be deleted. if libc.Bool32((*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0)) == 0 && (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0 { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31425 /* "DELETE FROM %s.'..." */, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) + ts+31594, libc.VaList(bp, p+24, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) } } else { rbuObjIterPrepareAll(tls, p, pIter, 0) @@ -165622,10 +165861,10 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205417:16: rbuSaveState(tls, p, RBU_STAGE_MOVE) rbuIncrSchemaCookie(tls, p) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14411 /* "COMMIT" */, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14433, uintptr(0), uintptr(0), p+36) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14411 /* "COMMIT" */, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14433, uintptr(0), uintptr(0), p+36) } (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_MOVE } @@ -165713,7 +165952,7 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:205417:16: // Compare strings z1 and z2, returning 0 if they are identical, or non-zero // otherwise. Either or both argument may be NULL. Two NULL values are // considered equal, and NULL is considered distinct from all other values. -func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:205546:12: */ +func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:205586:12: */ if z1 == uintptr(0) && z2 == uintptr(0) { return 0 } @@ -165731,7 +165970,7 @@ func rbuStrCompare(tls *libc.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3.c:2 // // If an error occurs, an error code and error message are left in the // rbu handle passed as the first argument. -func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:205562:13: */ +func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:205602:13: */ if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { var pIter uintptr = p + 48 @@ -165746,7 +165985,7 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:205562 if rc == SQLITE_OK && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31453 /* "rbu_state mismat..." */, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31622, 0) } if rc == SQLITE_OK { @@ -165761,11 +166000,11 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:205562 // If there is a "*-oal" file in the file-system corresponding to the // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. -func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:205595:13: */ +func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:205635:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+30902 /* "%s-oal" */, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) + var zOal uintptr = rbuMPrintf(tls, p, ts+31071, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { var pVfs uintptr = Xsqlite3_vfs_find(tls, uintptr(0)) @@ -165780,7 +166019,7 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:205595:13: */ // argument. This VFS will be used unless the call to sqlite3rbu_open() // specified a URI with a vfs=? option in place of a target database // file name. -func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:205611:13: */ +func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:205651:13: */ bp := tls.Alloc(76) defer tls.Free(76) @@ -165788,11 +166027,11 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:205611:13: */ // var zRnd [64]int8 at bp+12, 64 - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8 /* &rnd */) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12 /* &zRnd[0] */, ts+31478 /* "rbu_vfs_%d" */, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12 /* &zRnd[0] */, uintptr(0)) + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12, ts+31647, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12 /* &zRnd[0] */) + var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRbu = p @@ -165801,7 +166040,7 @@ func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:205611:13: */ // Destroy the private VFS created for the rbu handle passed as the only // argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:205631:13: */ +func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:205671:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { Xsqlite3rbu_destroy_vfs(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) @@ -165811,7 +166050,7 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:205631:13: */ // This user-defined SQL function is invoked with a single argument - the // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. -func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205643:13: */ +func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:205683:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -165826,9 +166065,9 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / return (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain }() - rc = prepareFreeAndCollectError(tls, db, bp+8 /* &pStmt */, bp+12, /* &zErrmsg */ + rc = prepareFreeAndCollectError(tls, db, bp+8, bp+12, Xsqlite3_mprintf(tls, - ts+31489 /* "SELECT count(*) ..." */, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) + ts+31658, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 12 /* zErrmsg */)), -1) } else { @@ -165860,7 +166099,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / // sqlite3rbu.nPhaseOneStep is initialized to the sum of (1 + nIndex) * cnt // for all rows in the rbu_count table, where nIndex is the number of // indexes on the corresponding target database table. -func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:205693:13: */ +func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:205733:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -165871,15 +166110,15 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:205693:13: */ (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_create_function(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+31561 /* "rbu_index_cnt" */, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + ts+31730, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) // Check for the rbu_count table. If it does not exist, or if an error // occurs, nPhaseOneStep will be left set to -1. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pStmt */, p+36, - ts+31575 /* "SELECT 1 FROM sq..." */) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, + ts+31744) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { @@ -165889,9 +166128,9 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:205693:13: */ } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && bExists != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pStmt */, p+36, + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp, p+36, - ts+31632 /* "SELECT sum(cnt *..." */) + ts+31801) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp))) { (*Sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) @@ -165902,7 +166141,7 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:205693:13: */ } } -func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:205734:19: */ +func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:205774:19: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -165937,7 +166176,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, nRbu+Size_t(1)) pCsr += uintptr(nRbu + Size_t(1)) if zState != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3601 /* "%s" */, libc.VaList(bp, zState)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+3623, libc.VaList(bp, zState)) } // If the first attempt to open the database file fails and the bRetry @@ -165947,7 +166186,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // If this is the case, it will have been checkpointed and deleted // when the handle was closed and a second attempt to open the // database may succeed. - rbuOpenDatabase(tls, p, uintptr(0), bp+16 /* &bRetry */) + rbuOpenDatabase(tls, p, uintptr(0), bp+16) if *(*int32)(unsafe.Pointer(bp + 16)) != 0 { rbuOpenDatabase(tls, p, uintptr(0), uintptr(0)) } @@ -165974,7 +166213,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Rbu_file)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0 { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31706 /* "cannot update wa..." */, 0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31875, 0) } else if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_MOVE { (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_CKPT (*Sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 @@ -165996,12 +166235,12 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // transaction is committed in rollback mode) currently stored on // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31738, /* "database modifie..." */ + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31907, libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - return ts + 31770 /* "vacuum" */ + return ts + 31939 /* "vacuum" */ } - return ts + 31777 /* "update" */ + return ts + 31946 /* "update" */ }())) } } @@ -166009,7 +166248,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { var db uintptr = (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14396 /* "BEGIN" */, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14418, uintptr(0), uintptr(0), p+36) // Point the object iterator at the first object if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -166023,24 +166262,24 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage = RBU_STAGE_DONE } else { if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 && (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - rbuCopyPragma(tls, p, ts+16652 /* "page_size" */) - rbuCopyPragma(tls, p, ts+16064 /* "auto_vacuum" */) + rbuCopyPragma(tls, p, ts+16821) + rbuCopyPragma(tls, p, ts+16233) } // Open transactions both databases. The *-oal file is opened or // created at this point. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+31784 /* "BEGIN IMMEDIATE" */, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, db, ts+31953, uintptr(0), uintptr(0), p+36) } // Check if the main database is a zipvfs db. If it is, set the upper // level pager to use "journal_mode=off". This prevents it from // generating a large journal using a temp file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var frc int32 = Xsqlite3_file_control(tls, db, ts+6305 /* "main" */, SQLITE_FCNTL_ZIPVFS, uintptr(0)) + var frc int32 = Xsqlite3_file_control(tls, db, ts+6327, SQLITE_FCNTL_ZIPVFS, uintptr(0)) if frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, - db, ts+31800 /* "PRAGMA journal_m..." */, uintptr(0), uintptr(0), p+36) + db, ts+31969, uintptr(0), uintptr(0), p+36) } } @@ -166075,7 +166314,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Allocate and return an RBU handle with all fields zeroed except for the // error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:205898:19: */ +func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:205938:19: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(Sqlite3rbu{}))) if pRet != 0 { @@ -166086,7 +166325,7 @@ func rbuMisuseError(tls *libc.TLS) uintptr { /* sqlite3.c:205898:19: */ } // Open and return a new RBU handle. -func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:205911:23: */ +func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:205951:23: */ if zTarget == uintptr(0) || zRbu == uintptr(0) { return rbuMisuseError(tls) } @@ -166094,13 +166333,13 @@ func Xsqlite3rbu_open(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintp } // Open a handle to begin or resume an RBU VACUUM operation. -func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:205923:23: */ +func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3.c:205963:23: */ if zTarget == uintptr(0) { return rbuMisuseError(tls) } if zState != 0 { var n int32 = int32(libc.Xstrlen(tls, zState)) - if n >= 7 && 0 == libc.Xmemcmp(tls, ts+31824, zState+uintptr(n-7), uint32(7)) { + if n >= 7 && 0 == libc.Xmemcmp(tls, ts+31993, zState+uintptr(n-7), uint32(7)) { return rbuMisuseError(tls) } } @@ -166109,7 +166348,7 @@ func Xsqlite3rbu_vacuum(tls *libc.TLS, zTarget uintptr, zState uintptr) uintptr } // Return the database handle used by pRbu. -func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:205941:20: */ +func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3.c:205981:20: */ var db uintptr = uintptr(0) if pRbu != 0 { db = func() uintptr { @@ -166125,12 +166364,12 @@ func Xsqlite3rbu_db(tls *libc.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite // If the error code currently stored in the RBU handle is SQLITE_CONSTRAINT, // then edit any error message string so as to remove all occurrences of // the pattern "rbu_imp_[0-9]*". -func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:205955:13: */ +func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:205995:13: */ if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_CONSTRAINT && (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0 { var i uint32 var nErrmsg Size_t = libc.Xstrlen(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) for i = uint32(0); i < nErrmsg-Size_t(8); i++ { - if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+29850, uint32(8)) == 0 { + if libc.Xmemcmp(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i), ts+30019, uint32(8)) == 0 { var nDel int32 = 8 for int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) >= '0' && int32(*(*int8)(unsafe.Pointer((*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i+uint32(nDel))))) <= '9' { nDel++ @@ -166143,13 +166382,13 @@ func rbuEditErrmsg(tls *libc.TLS, p uintptr) { /* sqlite3.c:205955:13: */ } // Close the RBU handle. -func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:205973:16: */ +func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:206013:16: */ var rc int32 if p != 0 { // Commit the transaction to the *-oal file. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14411 /* "COMMIT" */, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14433, uintptr(0), uintptr(0), p+36) } // Sync the db file if currently doing an incremental checkpoint @@ -166163,7 +166402,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq rbuSaveState(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14411 /* "COMMIT" */, uintptr(0), uintptr(0), p+36) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14433, uintptr(0), uintptr(0), p+36) } // Close any open statement handles. @@ -166175,7 +166414,7 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // specifying the current target and state databases to start a new // vacuum from scratch. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) && (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK && (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0 { - var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+31832 /* "DELETE FROM stat..." */, uintptr(0), uintptr(0), uintptr(0)) + var rc2 int32 = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+32001, uintptr(0), uintptr(0), uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE && rc2 != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 } @@ -166208,13 +166447,13 @@ func Xsqlite3rbu_close(tls *libc.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sq // Return the total number of key-value operations (inserts, deletes or // updates) that have been performed on the target database since the // current RBU update was started. -func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:206036:26: */ +func Xsqlite3rbu_progress(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:206076:26: */ return Sqlite3_int64((*Sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) } // Return permyriadage progress indications for the two main stages of // an RBU update. -func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:206044:17: */ +func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3.c:206084:17: */ var MAX_PROGRESS int32 = 10000 switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { case RBU_STAGE_OAL: @@ -166247,7 +166486,7 @@ func Xsqlite3rbu_bp_progress(tls *libc.TLS, p uintptr, pnOne uintptr, pnTwo uint } // Return the current state of the RBU vacuum or update operation. -func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:206079:16: */ +func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:206119:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -166260,12 +166499,12 @@ func Xsqlite3rbu_state(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:206079:16: return SQLITE_RBU_STATE_ERROR } else { - return *(*int32)(unsafe.Pointer(bp /* &aRes[0] */ + uintptr((*Sqlite3rbu)(unsafe.Pointer(p)).FeStage)*4)) + return *(*int32)(unsafe.Pointer(bp + uintptr((*Sqlite3rbu)(unsafe.Pointer(p)).FeStage)*4)) } return int32(0) } -func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:206107:16: */ +func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:206147:16: */ var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc if rc == SQLITE_DONE { return SQLITE_OK @@ -166274,7 +166513,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:206107 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14411 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14433, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166293,19 +166532,19 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:206107 if (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage == RBU_STAGE_OAL { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14411 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+14433, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { var zBegin uintptr if (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget == uintptr(0) { - zBegin = ts + 14396 /* "BEGIN" */ + zBegin = ts + 14418 /* "BEGIN" */ } else { - zBegin = ts + 31784 /* "BEGIN IMMEDIATE" */ + zBegin = ts + 31953 /* "BEGIN IMMEDIATE" */ } rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31784 /* "BEGIN IMMEDIATE" */, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31953, uintptr(0), uintptr(0), uintptr(0)) } } @@ -166372,7 +166611,7 @@ func Xsqlite3rbu_savestate(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:206107 // relinquished). Finally, calls to xSync() on the target database // file fail with SQLITE_INTERNAL errors. -func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:206200:13: */ +func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:206240:13: */ if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var xShmLock uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock @@ -166389,7 +166628,7 @@ func rbuUnlockShm(tls *libc.TLS, p uintptr) { /* sqlite3.c:206200:13: */ } // -func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:206216:12: */ +func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { /* sqlite3.c:206256:12: */ var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(pFd)).FpRbu var nDiff I64 = nNew - (*Rbu_file)(unsafe.Pointer(pFd)).Fsz *(*I64)(unsafe.Pointer(pRbu + 220)) += nDiff @@ -166407,7 +166646,7 @@ func rbuUpdateTempSize(tls *libc.TLS, pFd uintptr, nNew Sqlite3_int64) int32 { / // for all file descriptors with rbu_file.pDb!=0. If the argument has // rbu_file.pDb!=0, then it is assumed to already be present on the // main list and is only added to the pDb!=0 list. -func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:206234:13: */ +func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:206274:13: */ var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var pIter uintptr @@ -166429,7 +166668,7 @@ func rbuMainlistAdd(tls *libc.TLS, p uintptr) { /* sqlite3.c:206234:13: */ } // Remove an item from the main-db lists. -func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:206256:13: */ +func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:206296:13: */ var pp uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) for pp = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 100; *(*uintptr)(unsafe.Pointer(pp)) != 0 && *(*uintptr)(unsafe.Pointer(pp)) != p; pp = *(*uintptr)(unsafe.Pointer(pp)) + 56 { @@ -166454,7 +166693,7 @@ func rbuMainlistRemove(tls *libc.TLS, p uintptr) { /* sqlite3.c:206256:13: */ // // If parameter bRbu is true, only search for file-descriptors with // rbu_file.pDb!=0. -func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:206277:17: */ +func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3.c:206317:17: */ var pDb uintptr Xsqlite3_mutex_enter(tls, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) if bRbu != 0 { @@ -166469,7 +166708,7 @@ func rbuFindMaindb(tls *libc.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uin } // Close an rbu file. -func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:206292:12: */ +func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:206332:12: */ var p uintptr = pFile var rc int32 var i int32 @@ -166501,7 +166740,7 @@ func rbuVfsClose(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:206292:12: * // Read and return an unsigned 32-bit big-endian integer from the buffer // passed as the only argument. -func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:206325:12: */ +func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:206365:12: */ return U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16 + U32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8 + @@ -166510,20 +166749,20 @@ func rbuGetU32(tls *libc.TLS, aBuf uintptr) U32 { /* sqlite3.c:206325:12: */ // Write an unsigned 32-bit value in big-endian format to the supplied // buffer. -func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:206336:13: */ +func rbuPutU32(tls *libc.TLS, aBuf uintptr, iVal U32) { /* sqlite3.c:206376:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & U32(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & U32(0xFF)) } -func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:206343:13: */ +func rbuPutU16(tls *libc.TLS, aBuf uintptr, iVal U16) { /* sqlite3.c:206383:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(int32(iVal) >> 8 & 0xFF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(int32(iVal) >> 0 & 0xFF) } // Read data from an rbuVfs-file. -func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:206351:12: */ +func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:206391:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -166587,7 +166826,7 @@ func rbuVfsRead(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sq } // Write data to an rbuVfs-file. -func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:206417:12: */ +func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst Sqlite_int64) int32 { /* sqlite3.c:206457:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 @@ -166626,7 +166865,7 @@ func rbuVfsWrite(tls *libc.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst S } // Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:206460:12: */ +func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* sqlite3.c:206500:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_DELETEONCLOSE != 0 && (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { var rc int32 = rbuUpdateTempSize(tls, p, size) @@ -166640,7 +166879,7 @@ func rbuVfsTruncate(tls *libc.TLS, pFile uintptr, size Sqlite_int64) int32 { /* } // Sync an rbuVfs-file. -func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:206472:12: */ +func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c:206512:12: */ var p uintptr = pFile if (*Rbu_file)(unsafe.Pointer(p)).FpRbu != 0 && (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == RBU_STAGE_CAPTURE { if (*Rbu_file)(unsafe.Pointer(p)).FopenFlags&SQLITE_OPEN_MAIN_DB != 0 { @@ -166654,7 +166893,7 @@ func rbuVfsSync(tls *libc.TLS, pFile uintptr, flags int32) int32 { /* sqlite3.c: } // Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:206486:12: */ +func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3.c:206526:12: */ var p uintptr = pFile var rc int32 rc = (*struct { @@ -166674,7 +166913,7 @@ func rbuVfsFileSize(tls *libc.TLS, pFile uintptr, pSize uintptr) int32 { /* sqli } // Lock an rbuVfs-file. -func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:206507:12: */ +func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:206547:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -166694,7 +166933,7 @@ func rbuVfsLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c: } // Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:206529:12: */ +func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:206569:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -166702,7 +166941,7 @@ func rbuVfsUnlock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3. } // Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:206537:12: */ +func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3.c:206577:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -166710,7 +166949,7 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 } // File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:206545:12: */ +func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:206585:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -166737,7 +166976,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int })(unsafe.Pointer(&struct{ uintptr }{xControl})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR - (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31859 /* "rbu/zipvfs setup..." */, 0) + (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+32028, 0) } else if rc == SQLITE_NOTFOUND { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p (*Rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu @@ -166762,7 +167001,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_OK && op == SQLITE_FCNTL_VFSNAME { var pRbuVfs uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbuVfs var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = Xsqlite3_mprintf(tls, ts+31882 /* "rbu(%s)/%z" */, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) + var zOut uintptr = Xsqlite3_mprintf(tls, ts+32051, libc.VaList(bp, (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) *(*uintptr)(unsafe.Pointer(pArg)) = zOut if zOut == uintptr(0) { rc = SQLITE_NOMEM @@ -166773,7 +167012,7 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int } // Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:206601:12: */ +func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:206641:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -166781,7 +167020,7 @@ func rbuVfsSectorSize(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:206601: } // Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:206609:12: */ +func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite3.c:206649:12: */ var p uintptr = pFile return (*struct { f func(*libc.TLS, uintptr) int32 @@ -166789,7 +167028,7 @@ func rbuVfsDeviceCharacteristics(tls *libc.TLS, pFile uintptr) int32 { /* sqlite } // Take or release a shared-memory lock. -func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:206617:12: */ +func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3.c:206657:12: */ var p uintptr = pFile var pRbu uintptr = (*Rbu_file)(unsafe.Pointer(p)).FpRbu var rc int32 = SQLITE_OK @@ -166822,7 +167061,7 @@ func rbuVfsShmLock(tls *libc.TLS, pFile uintptr, ofst int32, n int32, flags int3 } // Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:206655:12: */ +func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3.c:206695:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -166879,13 +167118,13 @@ func rbuVfsShmMap(tls *libc.TLS, pFile uintptr, iRegion int32, szRegion int32, i } // Memory barrier. -func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:206713:13: */ +func rbuVfsShmBarrier(tls *libc.TLS, pFile uintptr) { /* sqlite3.c:206753:13: */ var p uintptr = pFile (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{(*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmBarrier})).f(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal) } // The xShmUnmap method. -func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:206721:12: */ +func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3.c:206761:12: */ var p uintptr = pFile var rc int32 = SQLITE_OK var eStage int32 = func() int32 { @@ -166908,7 +167147,7 @@ func rbuVfsShmUnmap(tls *libc.TLS, pFile uintptr, delFlag int32) int32 { /* sqli } // Open an rbu file handle. -func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:206740:12: */ +func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3.c:206780:12: */ var pRbuVfs uintptr = pVfs var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs var pFd uintptr = pFile @@ -166935,7 +167174,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags // This call is to open a *-wal file. Intead, open the *-oal. var nOpen Size_t if (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FzTarget == uintptr(0) { - zOpen = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+6305 /* "main" */) + zOpen = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+6327) zOpen = Xsqlite3_filename_wal(tls, zOpen) } nOpen = libc.Xstrlen(tls, zOpen) @@ -166950,7 +167189,7 @@ func rbuVfsOpen(tls *libc.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags } if oflags&SQLITE_OPEN_MAIN_DB != 0 && - Xsqlite3_uri_boolean(tls, zName, ts+31893, 0) != 0 { + Xsqlite3_uri_boolean(tls, zName, ts+32062, 0) != 0 { oflags = SQLITE_OPEN_TEMP_DB | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE zOpen = uintptr(0) @@ -166994,10 +167233,10 @@ var rbuvfs_io_methods = Sqlite3_io_methods{ FxShmLock: 0, // xShmLock FxShmBarrier: 0, // xShmBarrier FxShmUnmap: 0, // xFetch, xUnfetch -} /* sqlite3.c:206747:29 */ +} /* sqlite3.c:206787:29 */ // Delete the file located at zPath. -func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:206838:12: */ +func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3.c:206878:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -167006,7 +167245,7 @@ func rbuVfsDelete(tls *libc.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int // Test for access permissions. Return true if the requested permission // is available, or false otherwise. -func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:206847:12: */ +func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3.c:206887:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -167039,7 +167278,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO rc = SQLITE_CANTOPEN } else { *(*Sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = int64(0) - rc = rbuVfsFileSize(tls, pDb, bp /* &sz */) + rc = rbuVfsFileSize(tls, pDb, bp) *(*int32)(unsafe.Pointer(pResOut)) = libc.Bool32(*(*Sqlite3_int64)(unsafe.Pointer(bp)) > int64(0)) } } @@ -167051,7 +167290,7 @@ func rbuVfsAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResO // Populate buffer zOut with the full canonical pathname corresponding // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (DEVSYM_MAX_PATHNAME+1) bytes. -func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:206895:12: */ +func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:206935:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -167059,7 +167298,7 @@ func rbuVfsFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, } // Open the dynamic library located at zPath and return a handle. -func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:206909:13: */ +func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlite3.c:206949:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) uintptr @@ -167069,7 +167308,7 @@ func rbuVfsDlOpen(tls *libc.TLS, pVfs uintptr, zPath uintptr) uintptr { /* sqlit // Populate the buffer zErrMsg (size nByte bytes) with a human readable // utf-8 string describing the most recent error encountered associated // with dynamic libraries. -func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:206919:13: */ +func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* sqlite3.c:206959:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, int32, uintptr) @@ -167077,7 +167316,7 @@ func rbuVfsDlError(tls *libc.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { } // Return a pointer to the symbol zSymbol in the dynamic library pHandle. -func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:206927:13: */ +func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintptr { /* sqlite3.c:206967:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr) uintptr @@ -167085,7 +167324,7 @@ func rbuVfsDlSym(tls *libc.TLS, pVfs uintptr, pArg uintptr, zSym uintptr) uintpt } // Close the dynamic library handle pHandle. -func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:206939:13: */ +func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c:206979:13: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -167094,7 +167333,7 @@ func rbuVfsDlClose(tls *libc.TLS, pVfs uintptr, pHandle uintptr) { /* sqlite3.c: // Populate the buffer pointed to by zBufOut with nByte bytes of // random data. -func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:206949:12: */ +func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3.c:206989:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -167103,7 +167342,7 @@ func rbuVfsRandomness(tls *libc.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) // Sleep for nMicro microseconds. Return the number of microseconds // actually slept. -func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:206958:12: */ +func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c:206998:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, int32) int32 @@ -167111,7 +167350,7 @@ func rbuVfsSleep(tls *libc.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3.c } // Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:206966:12: */ +func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3.c:207006:12: */ var pRealVfs uintptr = (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs return (*struct { f func(*libc.TLS, uintptr, uintptr) int32 @@ -167119,13 +167358,13 @@ func rbuVfsCurrentTime(tls *libc.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* } // No-op. -func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:206974:12: */ +func rbuVfsGetLastError(tls *libc.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3.c:207014:12: */ return 0 } // Deregister and destroy an RBU vfs created by an earlier call to // sqlite3rbu_create_vfs(). -func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:206982:17: */ +func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:207022:17: */ var pVfs uintptr = Xsqlite3_vfs_find(tls, zName) if pVfs != 0 && (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 @@ -167139,7 +167378,7 @@ func Xsqlite3rbu_destroy_vfs(tls *libc.TLS, zName uintptr) { /* sqlite3.c:206982 // Create an RBU VFS named zName that accesses the underlying file-system // via existing VFS zParent. The new object is registered as a non-default // VFS with SQLite before returning. -func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:206996:16: */ +func Xsqlite3rbu_create_vfs(tls *libc.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3.c:207036:16: */ var pNew uintptr = uintptr(0) // Newly allocated VFS var rc int32 = SQLITE_OK @@ -167200,17 +167439,17 @@ var vfs_template = Sqlite3_vfs{ FxSleep: 0, // xSleep FxCurrentTime: 0, // xCurrentTime FxGetLastError: 0, // Unimplemented version 3 methods -} /* sqlite3.c:206999:22 */ +} /* sqlite3.c:207039:22 */ // Configure the aggregate temp file size limit for this RBU handle. -func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:207074:26: */ +func Xsqlite3rbu_temp_size_limit(tls *libc.TLS, pRbu uintptr, n Sqlite3_int64) Sqlite3_int64 { /* sqlite3.c:207114:26: */ if n >= int64(0) { (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n } return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit } -func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207081:26: */ +func Xsqlite3rbu_temp_size(tls *libc.TLS, pRbu uintptr) Sqlite3_int64 { /* sqlite3.c:207121:26: */ return (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp } @@ -167364,7 +167603,7 @@ type SessionTable1 = struct { // #include <assert.h> // #include <string.h> -type SessionTable = SessionTable1 /* sqlite3.c:208425:29 */ +type SessionTable = SessionTable1 /* sqlite3.c:208465:29 */ type SessionChange1 = struct { Fop U8 FbIndirect U8 @@ -167375,14 +167614,14 @@ type SessionChange1 = struct { FpNext uintptr } /* sqlite3.c:10518:9 */ -type SessionChange = SessionChange1 /* sqlite3.c:208426:30 */ +type SessionChange = SessionChange1 /* sqlite3.c:208466:30 */ type SessionBuffer1 = struct { FaBuf uintptr FnBuf int32 FnAlloc int32 } /* sqlite3.c:10526:9 */ -type SessionBuffer = SessionBuffer1 /* sqlite3.c:208427:30 */ +type SessionBuffer = SessionBuffer1 /* sqlite3.c:208467:30 */ type SessionInput1 = struct { FbNoDiscard int32 FiCurrent int32 @@ -167395,11 +167634,11 @@ type SessionInput1 = struct { FbEof int32 } /* sqlite3.c:10526:9 */ -type SessionInput = SessionInput1 /* sqlite3.c:208428:29 */ +type SessionInput = SessionInput1 /* sqlite3.c:208468:29 */ // Minimum chunk size used by streaming versions of functions. -var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:208441:12 */ +var sessions_strm_chunk_size int32 = SESSIONS_STRM_CHUNK_SIZE /* sqlite3.c:208481:12 */ type SessionHook1 = struct { FpCtx uintptr @@ -167409,11 +167648,11 @@ type SessionHook1 = struct { FxDepth uintptr } /* sqlite3.c:10518:9 */ -type SessionHook = SessionHook1 /* sqlite3.c:208443:28 */ +type SessionHook = SessionHook1 /* sqlite3.c:208483:28 */ // Write a varint with value iVal into the buffer at aBuf. Return the // number of bytes written. -func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:208721:12: */ +func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite3.c:208761:12: */ return int32(func() uint8 { if U32(iVal) < U32(0x80) { return uint8(func() int32 { *(*U8)(unsafe.Pointer(aBuf)) = uint8(iVal); return 1 }()) @@ -167423,13 +167662,13 @@ func sessionVarintPut(tls *libc.TLS, aBuf uintptr, iVal int32) int32 { /* sqlite } // Return the number of bytes required to store value iVal as a varint. -func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:208728:12: */ +func sessionVarintLen(tls *libc.TLS, iVal int32) int32 { /* sqlite3.c:208768:12: */ return Xsqlite3VarintLen(tls, uint64(iVal)) } // Read a varint value from aBuf[] into *piVal. Return the number of // bytes read. -func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:208736:12: */ +func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sqlite3.c:208776:12: */ return int32(func() uint8 { if int32(*(*U8)(unsafe.Pointer(aBuf))) < int32(U8(0x80)) { return uint8(func() int32 { *(*int32)(unsafe.Pointer(piVal)) = int32(U32(*(*U8)(unsafe.Pointer(aBuf)))); return 1 }()) @@ -167442,7 +167681,7 @@ func sessionVarintGet(tls *libc.TLS, aBuf uintptr, piVal uintptr) int32 { /* sql // Read a 64-bit big-endian integer value from buffer aRec[]. Return // the value read. -func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:208747:22: */ +func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:208787:22: */ var x U64 = U64(U32(*(*U8)(unsafe.Pointer(aRec)))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + 3)))) var y U32 = U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4))))<<24 | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 1)))<<16) | U32(int32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 2)))<<8) | U32(*(*U8)(unsafe.Pointer(aRec + uintptr(4) + 3))) x = x<<32 + U64(y) @@ -167450,7 +167689,7 @@ func sessionGetI64(tls *libc.TLS, aRec uintptr) Sqlite3_int64 { /* sqlite3.c:208 } // Write a 64-bit big-endian integer value to the buffer aBuf[]. -func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:208757:13: */ +func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c:208797:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(i >> 56 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(i >> 48 & int64(0xFF)) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(i >> 40 & int64(0xFF)) @@ -167472,7 +167711,7 @@ func sessionPutI64(tls *libc.TLS, aBuf uintptr, i Sqlite3_int64) { /* sqlite3.c: // If no error occurs, SQLITE_OK is returned. Or, if an OOM error occurs // within a call to sqlite3_value_text() (may fail if the db is utf-16)) // SQLITE_NOMEM is returned. -func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:208781:12: */ +func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite uintptr) int32 { /* sqlite3.c:208821:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -167507,7 +167746,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // var r float64 at bp+8, 8 *(*float64)(unsafe.Pointer(bp + 8 /* r */)) = Xsqlite3_value_double(tls, pValue) - libc.Xmemcpy(tls, bp /* &i */, bp+8 /* &r */, uint32(8)) + libc.Xmemcpy(tls, bp, bp+8, uint32(8)) } sessionPutI64(tls, aBuf+1, int64(*(*U64)(unsafe.Pointer(bp /* i */)))) } @@ -167560,7 +167799,7 @@ func sessionSerializeValue(tls *libc.TLS, aBuf uintptr, pValue uintptr, pnWrite // Allocate and return a pointer to a buffer nByte bytes in size. If // pSession is not NULL, increase the sqlite3_session.nMalloc variable // by the number of bytes allocated. -func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:208857:13: */ +func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sqlite3.c:208897:13: */ var pRet uintptr = Xsqlite3_malloc64(tls, uint64(nByte)) if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 36)) += I64(Xsqlite3_msize(tls, pRet)) @@ -167571,7 +167810,7 @@ func sessionMalloc64(tls *libc.TLS, pSession uintptr, nByte I64) uintptr { /* sq // Free buffer pFree, which must have been allocated by an earlier // call to sessionMalloc64(). If pSession is not NULL, decrease the // sqlite3_session.nMalloc counter by the number of bytes freed. -func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:208868:13: */ +func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c:208908:13: */ if pSession != 0 { *(*I64)(unsafe.Pointer(pSession + 36)) -= I64(Xsqlite3_msize(tls, pFree)) } @@ -167594,14 +167833,14 @@ func sessionFree(tls *libc.TLS, pSession uintptr, pFree uintptr) { /* sqlite3.c: // Append the hash of the 64-bit integer passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:208894:21: */ +func sessionHashAppendI64(tls *libc.TLS, h uint32, i I64) uint32 { /* sqlite3.c:208934:21: */ h = h<<3 ^ h ^ uint32(i&int64(0xFFFFFFFF)) return h<<3 ^ h ^ uint32(i>>32&int64(0xFFFFFFFF)) } // Append the hash of the blob passed via the second and third arguments to // the hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:208903:21: */ +func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { /* sqlite3.c:208943:21: */ var i int32 for i = 0; i < n; i++ { h = h<<3 ^ h ^ uint32(*(*U8)(unsafe.Pointer(z + uintptr(i)))) @@ -167611,7 +167850,7 @@ func sessionHashAppendBlob(tls *libc.TLS, h uint32, n int32, z uintptr) uint32 { // Append the hash of the data type passed as the second argument to the // hash-key value passed as the first. Return the new hash-key value. -func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:208913:21: */ +func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sqlite3.c:208953:21: */ return h<<3 ^ h ^ uint32(eType) } @@ -167624,7 +167863,7 @@ func sessionHashAppendType(tls *libc.TLS, h uint32, eType int32) uint32 { /* sql // If an error occurs, an SQLite error code is returned and the final values // of *piHash asn *pbNullPK are undefined. Otherwise, SQLITE_OK is returned // and the output variables are set as described above. -func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:208928:12: */ +func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew int32, piHash uintptr, pbNullPK uintptr) int32 { /* sqlite3.c:208968:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -167660,7 +167899,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in } else { *(*float64)(unsafe.Pointer(bp + 12 /* rVal */)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) - libc.Xmemcpy(tls, bp+4 /* &iVal */, bp+12 /* &rVal */, uint32(8)) + libc.Xmemcpy(tls, bp+4, bp+12, uint32(8)) } h = sessionHashAppendI64(tls, h, *(*I64)(unsafe.Pointer(bp + 4 /* iVal */))) } else if eType == SQLITE_TEXT || eType == SQLITE_BLOB { @@ -167690,7 +167929,7 @@ func sessionPreupdateHash(tls *libc.TLS, pSession uintptr, pTab uintptr, bNew in // The buffer that the argument points to contains a serialized SQL value. // Return the number of bytes of space occupied by the value (including // the type byte). -func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:208993:12: */ +func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:209033:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -167716,7 +167955,7 @@ func sessionSerialLen(tls *libc.TLS, a uintptr) int32 { /* sqlite3.c:208993:12: // // The bPkOnly argument is non-zero if the record at aRecord[] is from // a patchset DELETE. In this case the non-PK fields are omitted entirely. -func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:209011:21: */ +func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintptr, nBucket int32) uint32 { /* sqlite3.c:209051:21: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -167744,7 +167983,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp } else { // var n int32 at bp, 4 - a += uintptr(sessionVarintGet(tls, a, bp /* &n */)) + a += uintptr(sessionVarintGet(tls, a, bp)) h = sessionHashAppendBlob(tls, h, *(*int32)(unsafe.Pointer(bp /* n */)), a) a += uintptr(*(*int32)(unsafe.Pointer(bp /* n */))) } @@ -167759,7 +167998,7 @@ func sessionChangeHash(tls *libc.TLS, pTab uintptr, bPkOnly int32, aRecord uintp // This function returns true if the two records apply to the same row (i.e. // have the same values stored in the primary key columns), or false // otherwise. -func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:209060:12: */ +func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft uintptr, bRightPkOnly int32, aRight uintptr) int32 { /* sqlite3.c:209100:12: */ var a1 uintptr = aLeft // Cursor to iterate through aLeft var a2 uintptr = aRight // Cursor to iterate through aRight var iCol int32 // Used to iterate through table columns @@ -167798,7 +168037,7 @@ func sessionChangeEqual(tls *libc.TLS, pTab uintptr, bLeftPkOnly int32, aLeft ui // their. Otherwise, if aLeft contains a value, copy it. If neither // record contains a value for a given column, then neither does the // output record. -func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:209103:13: */ +func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, aRight uintptr) { /* sqlite3.c:209143:13: */ var a1 uintptr = aLeft // Cursor used to iterate through aLeft var a2 uintptr = aRight // Cursor used to iterate through aRight var aOut uintptr = *(*uintptr)(unsafe.Pointer(paOut)) // Output cursor @@ -167837,7 +168076,7 @@ func sessionMergeRecord(tls *libc.TLS, paOut uintptr, nCol int32, aLeft uintptr, // if( *paTwo is valid ) return *paTwo; // return *paOne; // -func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:209149:11: */ +func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintptr) uintptr { /* sqlite3.c:209189:11: */ var a1 uintptr = *(*uintptr)(unsafe.Pointer(paOne)) var a2 uintptr = *(*uintptr)(unsafe.Pointer(paTwo)) var pRet uintptr = uintptr(0) @@ -167864,7 +168103,7 @@ func sessionMergeValue(tls *libc.TLS, paOne uintptr, paTwo uintptr, pnVal uintpt // This function is used by changeset_concat() to merge two UPDATE changes // on the same row. -func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:209183:12: */ +func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset int32, aOldRecord1 uintptr, aOldRecord2 uintptr, aNewRecord1 uintptr, aNewRecord2 uintptr) int32 { /* sqlite3.c:209223:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -167888,8 +168127,8 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in var aNew uintptr - aOld = sessionMergeValue(tls, bp /* &aOld1 */, bp+4 /* &aOld2 */, bp+8 /* &nOld */) - aNew = sessionMergeValue(tls, bp+12 /* &aNew1 */, bp+16 /* &aNew2 */, bp+20 /* &nNew */) + aOld = sessionMergeValue(tls, bp, bp+4, bp+8) + aNew = sessionMergeValue(tls, bp+12, bp+16, bp+20) if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0 || *(*int32)(unsafe.Pointer(bp + 8)) != *(*int32)(unsafe.Pointer(bp + 20)) || libc.Xmemcmp(tls, aOld, aNew, uint32(*(*int32)(unsafe.Pointer(bp + 20)))) != 0 { if int32(*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i)))) == 0 { bRequired = 1 @@ -167919,8 +168158,8 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in var aNew uintptr - aOld = sessionMergeValue(tls, bp /* &aOld1 */, bp+4 /* &aOld2 */, bp+24 /* &nOld */) - aNew = sessionMergeValue(tls, bp+12 /* &aNew1 */, bp+16 /* &aNew2 */, bp+28 /* &nNew */) + aOld = sessionMergeValue(tls, bp, bp+4, bp+24) + aNew = sessionMergeValue(tls, bp+12, bp+16, bp+28) if bPatchset == 0 && (*(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(i))) != 0 || *(*int32)(unsafe.Pointer(bp + 24)) == *(*int32)(unsafe.Pointer(bp + 28)) && 0 == libc.Xmemcmp(tls, aOld, aNew, uint32(*(*int32)(unsafe.Pointer(bp + 28))))) { *(*U8)(unsafe.Pointer(libc.PostIncUintptr(&aOut, 1))) = U8(0) @@ -167939,7 +168178,7 @@ func sessionMergeUpdate(tls *libc.TLS, paOut uintptr, pTab uintptr, bPatchset in // as the change stored in argument pChange. If so, it returns true. Otherwise // if the pre-update-hook does not affect the same row as pChange, it returns // false. -func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:209260:12: */ +func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChange uintptr, op int32) int32 { /* sqlite3.c:209300:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -167989,7 +168228,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang } else { // var rVal float64 at bp+4, 8 - libc.Xmemcpy(tls, bp+4 /* &rVal */, bp+12 /* &iVal */, uint32(8)) + libc.Xmemcpy(tls, bp+4, bp+12, uint32(8)) if Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp))) != *(*float64)(unsafe.Pointer(bp + 4)) { return 0 } @@ -167998,7 +168237,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // var n int32 at bp+20, 4 var z uintptr - a += uintptr(sessionVarintGet(tls, a, bp+20 /* &n */)) + a += uintptr(sessionVarintGet(tls, a, bp+20)) if Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(bp))) != *(*int32)(unsafe.Pointer(bp + 20)) { return 0 } @@ -168027,7 +168266,7 @@ func sessionPreupdateEqual(tls *libc.TLS, pSession uintptr, pTab uintptr, pChang // that case the hash-table does not grow, but SQLITE_OK is returned anyway. // Growing the hash table in this case is a performance optimization only, // it is not required for correct operation. -func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:209339:12: */ +func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uintptr) int32 { /* sqlite3.c:209379:12: */ if (*SessionTable)(unsafe.Pointer(pTab)).FnChange == 0 || (*SessionTable)(unsafe.Pointer(pTab)).FnEntry >= (*SessionTable)(unsafe.Pointer(pTab)).FnChange/2 { var i int32 var apNew uintptr @@ -168091,7 +168330,7 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller -func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:209405:12: */ +func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:209445:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -168108,15 +168347,15 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, var abPK uintptr = uintptr(0) nThis = Xsqlite3Strlen30(tls, zThis) - if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11186, zThis) { + if nThis == 12 && 0 == Xsqlite3_stricmp(tls, ts+11208, zThis) { rc = Xsqlite3_table_column_metadata(tls, db, zDb, zThis, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { // For sqlite_stat1, pretend that (tbl,idx) is the PRIMARY KEY. zPragma = Xsqlite3_mprintf(tls, - ts+31904 /* "SELECT 0, 'tbl',..." */, 0) + ts+32073, 0) } else if rc == SQLITE_ERROR { - zPragma = Xsqlite3_mprintf(tls, ts+1543 /* "" */, 0) + zPragma = Xsqlite3_mprintf(tls, ts+1565, 0) } else { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) *(*uintptr)(unsafe.Pointer(pabPK)) = uintptr(0) @@ -168127,7 +168366,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return rc } } else { - zPragma = Xsqlite3_mprintf(tls, ts+32025 /* "PRAGMA '%q'.tabl..." */, libc.VaList(bp, zDb, zThis)) + zPragma = Xsqlite3_mprintf(tls, ts+32194, libc.VaList(bp, zDb, zThis)) } if !(zPragma != 0) { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -168139,7 +168378,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return SQLITE_NOMEM } - rc = Xsqlite3_prepare_v2(tls, db, zPragma, -1, bp+16 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zPragma, -1, bp+16, uintptr(0)) Xsqlite3_free(tls, zPragma) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer(pazCol)) = uintptr(0) @@ -168222,7 +168461,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, // key, sqlite3_session.rc is left set to SQLITE_OK and non-zero returned to // indicate that updates on this table should be ignored. SessionTable.abPK // is set to NULL in this case. -func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:209538:12: */ +func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* sqlite3.c:209578:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168230,7 +168469,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* // var abPK uintptr at bp, 4 (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = sessionTableInfo(tls, pSession, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, - (*SessionTable)(unsafe.Pointer(pTab)).FzName, pTab+8, uintptr(0), pTab+16, bp /* &abPK */) + (*SessionTable)(unsafe.Pointer(pTab)).FzName, pTab+8, uintptr(0), pTab+16, bp) if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc == SQLITE_OK { var i int32 for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnCol; i++ { @@ -168239,7 +168478,7 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* break } } - if 0 == Xsqlite3_stricmp(tls, ts+11186, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { + if 0 == Xsqlite3_stricmp(tls, ts+11208, (*SessionTable)(unsafe.Pointer(pTab)).FzName) { (*SessionTable)(unsafe.Pointer(pTab)).FbStat1 = 1 } @@ -168258,15 +168497,15 @@ func sessionInitTable(tls *libc.TLS, pSession uintptr, pTab uintptr) int32 { /* type SessionStat1Ctx1 = struct { Fhook SessionHook FpSession uintptr -} /* sqlite3.c:209573:9 */ +} /* sqlite3.c:209613:9 */ // Versions of the four methods in object SessionHook for use with the // sqlite_stat1 table. The purpose of this is to substitute a zero-length // blob each time a NULL value is read from the "idx" column of the // sqlite_stat1 table. -type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:209573:32 */ +type SessionStat1Ctx = SessionStat1Ctx1 /* sqlite3.c:209613:32 */ -func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:209578:12: */ +func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:209618:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168282,7 +168521,7 @@ func sessionStat1Old(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:209588:12: */ +func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int32 { /* sqlite3.c:209628:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168298,21 +168537,21 @@ func sessionStat1New(tls *libc.TLS, pCtx uintptr, iCol int32, ppVal uintptr) int return rc } -func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209598:12: */ +func sessionStat1Count(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209638:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxCount})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209602:12: */ +func sessionStat1Depth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209642:12: */ var p uintptr = pCtx return (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FxDepth})).f(tls, (*SessionStat1Ctx)(unsafe.Pointer(p)).Fhook.FpCtx) } -func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:209607:12: */ +func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, pC uintptr) int32 { /* sqlite3.c:209647:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -168366,7 +168605,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt } else { // var dVal float64 at bp+16, 8 - libc.Xmemcpy(tls, bp+16 /* &dVal */, bp+24 /* &iVal */, uint32(8)) + libc.Xmemcpy(tls, bp+16, bp+24, uint32(8)) bChanged = libc.Bool32(*(*float64)(unsafe.Pointer(bp + 16)) != Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(bp + 12)))) } } @@ -168381,7 +168620,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt { // var nByte int32 at bp+32, 4 - nOld = sessionVarintGet(tls, pCsr, bp+32 /* &nByte */) + nOld = sessionVarintGet(tls, pCsr, bp+32) pCsr += uintptr(nOld) nOld = nOld + *(*int32)(unsafe.Pointer(bp + 32)) @@ -168403,7 +168642,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt if bChanged != 0 { *(*I64)(unsafe.Pointer(bp + 4 /* nNew */)) += I64(1 + nOld) - sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 12 /* p */)), bp+4 /* &nNew */) + sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 12 /* p */)), bp+4) } else if *(*U8)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FabPK + uintptr(ii))) != 0 { *(*I64)(unsafe.Pointer(bp + 4 /* nNew */)) += I64(2 + nOld) } else { @@ -168426,7 +168665,7 @@ func sessionUpdateMaxSize(tls *libc.TLS, op int32, pSession uintptr, pTab uintpt // // Unless one is already present or an error occurs, an entry is added // to the changed-rows hash table associated with table pTab. -func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:209713:13: */ +func sessionPreupdateOneChange(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr) { /* sqlite3.c:209753:13: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -168519,7 +168758,7 @@ __4: goto error_out __7: ; - Xsqlite3ValueSetStr(tls, p, 0, ts+1543 /* "" */, uint8(0), uintptr(0)) + Xsqlite3ValueSetStr(tls, p, 0, ts+1565, uint8(0), uintptr(0)) (*Sqlite3_session)(unsafe.Pointer(pSession)).FpZeroBlob = p __6: ; @@ -168529,7 +168768,7 @@ __5: // Calculate the hash-key for this change. If the primary key of the row // includes a NULL value, exit early. Such changes are ignored by the // session module. - rc = sessionPreupdateHash(tls, pSession, pTab, libc.Bool32(op == SQLITE_INSERT), bp+24 /* &iHash */, bp+28 /* &bNull */) + rc = sessionPreupdateHash(tls, pSession, pTab, libc.Bool32(op == SQLITE_INSERT), bp+24, bp+28) if !(rc != SQLITE_OK) { goto __8 } @@ -168596,7 +168835,7 @@ __20: // This may fail if SQLite value p contains a utf-16 string that must // be converted to utf-8 and an OOM error occurs while doing so. - rc = sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 32 /* p1 */)), bp+36 /* &nByte */) + rc = sessionSerializeValue(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 32 /* p1 */)), bp+36) if !(rc != SQLITE_OK) { goto __22 } @@ -168654,7 +168893,7 @@ __30: ; __29: ; - sessionSerializeValue(tls, (*SessionChange)(unsafe.Pointer(pC)).FaRecord+uintptr(*(*Sqlite3_int64)(unsafe.Pointer(bp + 36))), *(*uintptr)(unsafe.Pointer(bp + 44 /* p2 */)), bp+36 /* &nByte */) + sessionSerializeValue(tls, (*SessionChange)(unsafe.Pointer(pC)).FaRecord+uintptr(*(*Sqlite3_int64)(unsafe.Pointer(bp + 36))), *(*uintptr)(unsafe.Pointer(bp + 44 /* p2 */)), bp+36) goto __26 __26: i++ @@ -168722,7 +168961,7 @@ __35: __36: } -func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:209862:12: */ +func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uintptr) int32 { /* sqlite3.c:209902:12: */ var rc int32 = SQLITE_OK var nName int32 = Xsqlite3Strlen30(tls, zName) var pRet uintptr @@ -168757,7 +168996,7 @@ func sessionFindTable(tls *libc.TLS, pSession uintptr, zName uintptr, ppTab uint } // The 'pre-update' hook registered by this module with SQLite databases. -func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:209902:13: */ +func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, zName uintptr, iKey1 Sqlite3_int64, iKey2 Sqlite3_int64) { /* sqlite3.c:209942:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168780,7 +169019,7 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, continue } - (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = sessionFindTable(tls, pSession, zName, bp /* &pTab */) + (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc = sessionFindTable(tls, pSession, zName, bp) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { sessionPreupdateOneChange(tls, op, pSession, *(*uintptr)(unsafe.Pointer(bp /* pTab */))) @@ -168792,25 +169031,25 @@ func xPreUpdate(tls *libc.TLS, pCtx uintptr, db uintptr, op int32, zDb uintptr, } // The pre-update hook implementations. -func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:209940:12: */ +func sessionPreupdateOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:209980:12: */ return Xsqlite3_preupdate_old(tls, pCtx, iVal, ppVal) } -func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:209943:12: */ +func sessionPreupdateNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:209983:12: */ return Xsqlite3_preupdate_new(tls, pCtx, iVal, ppVal) } -func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209946:12: */ +func sessionPreupdateCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209986:12: */ return Xsqlite3_preupdate_count(tls, pCtx) } -func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209949:12: */ +func sessionPreupdateDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209989:12: */ return Xsqlite3_preupdate_depth(tls, pCtx) } // Install the pre-update hooks on the session object passed as the only // argument. -func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:209957:13: */ +func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:209997:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -168829,24 +169068,24 @@ func sessionPreupdateHooks(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:20995 type SessionDiffCtx1 = struct { FpStmt uintptr FnOldOff int32 -} /* sqlite3.c:209967:9 */ +} /* sqlite3.c:210007:9 */ -type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:209967:31 */ +type SessionDiffCtx = SessionDiffCtx1 /* sqlite3.c:210007:31 */ // The diff hook implementations. -func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:209976:12: */ +func sessionDiffOld(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:210016:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal+(*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff) return SQLITE_OK } -func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:209981:12: */ +func sessionDiffNew(tls *libc.TLS, pCtx uintptr, iVal int32, ppVal uintptr) int32 { /* sqlite3.c:210021:12: */ var p uintptr = pCtx *(*uintptr)(unsafe.Pointer(ppVal)) = Xsqlite3_column_value(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt, iVal) return SQLITE_OK } -func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209986:12: */ +func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:210026:12: */ var p uintptr = pCtx if (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff != 0 { return (*SessionDiffCtx)(unsafe.Pointer(p)).FnOldOff @@ -168854,13 +169093,13 @@ func sessionDiffCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209986:1 return Xsqlite3_column_count(tls, (*SessionDiffCtx)(unsafe.Pointer(p)).FpStmt) } -func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:209990:12: */ +func sessionDiffDepth(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:210030:12: */ return 0 } // Install the diff hooks on the session object passed as the only // argument. -func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:209998:13: */ +func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sqlite3.c:210038:13: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx = pDiffCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FxOld = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -168876,19 +169115,19 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq }{sessionDiffDepth})) } -func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:210009:13: */ +func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:210049:13: */ bp := tls.Alloc(64) defer tls.Free(64) var i int32 - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ var zRet uintptr = uintptr(0) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - zRet = Xsqlite3_mprintf(tls, ts+32054, /* "%z%s\"%w\".\"%w\".\"%..." */ + zRet = Xsqlite3_mprintf(tls, ts+32223, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 21174 /* " AND " */ + zSep = ts + 21343 /* " AND " */ if zRet == uintptr(0) { break } @@ -168898,12 +169137,12 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, return zRet } -func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:210032:13: */ +func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:210072:13: */ bp := tls.Alloc(64) defer tls.Free(64) var i int32 - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ var zRet uintptr = uintptr(0) var bHave int32 = 0 @@ -168911,9 +169150,9 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if int32(*(*U8)(unsafe.Pointer(abPK + uintptr(i)))) == 0 { bHave = 1 zRet = Xsqlite3_mprintf(tls, - ts+32088, /* "%z%s\"%w\".\"%w\".\"%..." */ + ts+32257, libc.VaList(bp, zRet, zSep, zDb1, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), zDb2, zTab, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)))) - zSep = ts + 32129 /* " OR " */ + zSep = ts + 32298 /* " OR " */ if zRet == uintptr(0) { break } @@ -168922,24 +169161,24 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp if bHave == 0 { - zRet = Xsqlite3_mprintf(tls, ts+7399 /* "0" */, 0) + zRet = Xsqlite3_mprintf(tls, ts+7421, 0) } return zRet } -func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:210063:13: */ +func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:210103:13: */ bp := tls.Alloc(40) defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, - ts+32134, /* "SELECT * FROM \"%..." */ + ts+32303, libc.VaList(bp, zDb1, zTbl, zDb2, zTbl, zExpr)) return zRet } -func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:210079:12: */ +func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, zDb1 uintptr, zDb2 uintptr, zExpr uintptr) int32 { /* sqlite3.c:210119:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -168951,7 +169190,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, } else { // var pStmt uintptr at bp, 4 - rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp, uintptr(0)) if rc == SQLITE_OK { var pDiffCtx uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FpStmt = *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) @@ -168967,7 +169206,7 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, return rc } -func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:210110:12: */ +func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:210150:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -168979,14 +169218,14 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro rc = SQLITE_NOMEM } else { var zStmt uintptr = Xsqlite3_mprintf(tls, - ts+32212, /* "SELECT * FROM \"%..." */ + ts+32381, libc.VaList(bp, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zFrom, (*SessionTable)(unsafe.Pointer(pTab)).FzName, zExpr, zExpr2)) if zStmt == uintptr(0) { rc = SQLITE_NOMEM } else { // var pStmt uintptr at bp+48, 4 - rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp+48 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp+48, uintptr(0)) if rc == SQLITE_OK { var pDiffCtx uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx @@ -169004,7 +169243,7 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro return rc } -func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:210150:16: */ +func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:210190:16: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169027,8 +169266,8 @@ func Xsqlite3session_diff(tls *libc.TLS, pSession uintptr, zFrom uintptr, zTbl u zDb = (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb rc = (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc - libc.Xmemset(tls, bp /* &d */, 0, uint32(unsafe.Sizeof(SessionDiffCtx{}))) - sessionDiffHooks(tls, pSession, bp /* &d */) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionDiffCtx{}))) + sessionDiffHooks(tls, pSession, bp) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if !(pzErrMsg != 0) { @@ -169044,7 +169283,7 @@ __1: db = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb // Table zTbl // Locate and if necessary initialize the target table object - rc = sessionFindTable(tls, pSession, zTbl, bp+8 /* &pTo */) + rc = sessionFindTable(tls, pSession, zTbl, bp+8) if !(*(*uintptr)(unsafe.Pointer(bp + 8)) == uintptr(0)) { goto __3 } @@ -169066,7 +169305,7 @@ __4: bHasPk = 0 bMismatch = 0 *(*uintptr)(unsafe.Pointer(bp + 16 /* azCol */)) = uintptr(0) - rc = sessionTableInfo(tls, uintptr(0), db, zFrom, zTbl, bp+12 /* &nCol */, uintptr(0), bp+16 /* &azCol */, bp+20 /* &abPK */) + rc = sessionTableInfo(tls, uintptr(0), db, zFrom, zTbl, bp+12, uintptr(0), bp+16, bp+20) if !(rc == SQLITE_OK) { goto __6 } @@ -169117,7 +169356,7 @@ __6: if !(pzErrMsg != 0) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32265 /* "table schemas do..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+32434, 0) __16: ; rc = SQLITE_SCHEMA @@ -169177,7 +169416,7 @@ diff_out: // Create a session object. This session object will record changes to // database zDb attached to connection db. -func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:210245:16: */ +func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession uintptr) int32 { /* sqlite3.c:210285:16: */ var pNew uintptr // Newly allocated session object var pOld uintptr // Session object already attached to db var nDb int32 = Xsqlite3Strlen30(tls, zDb) // Length of zDb in bytes @@ -169213,7 +169452,7 @@ func Xsqlite3session_create(tls *libc.TLS, db uintptr, zDb uintptr, ppSession ui // Free the list of table objects passed as the first argument. The contents // of the changed-rows hash tables are also deleted. -func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:210283:13: */ +func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sqlite3.c:210323:13: */ var pNext uintptr var pTab uintptr @@ -169235,7 +169474,7 @@ func sessionDeleteTable(tls *libc.TLS, pSession uintptr, pList uintptr) { /* sql } // Delete a session object previously allocated using sqlite3session_create(). -func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:210307:17: */ +func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:210347:17: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -169273,7 +169512,7 @@ func Xsqlite3session_delete(tls *libc.TLS, pSession uintptr) { /* sqlite3.c:2103 } // Set a table filter on a Session Object. -func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:210339:17: */ +func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintptr, pCtx uintptr) { /* sqlite3.c:210379:17: */ (*Sqlite3_session)(unsafe.Pointer(pSession)).FbAutoAttach = 1 (*Sqlite3_session)(unsafe.Pointer(pSession)).FpFilterCtx = pCtx (*Sqlite3_session)(unsafe.Pointer(pSession)).FxTableFilter = xFilter @@ -169285,7 +169524,7 @@ func Xsqlite3session_table_filter(tls *libc.TLS, pSession uintptr, xFilter uintp // Only tables that have a PRIMARY KEY defined may be attached. It does // not matter if the PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) // or not. -func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:210357:16: */ +func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int32 { /* sqlite3.c:210397:16: */ var rc int32 = SQLITE_OK Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) @@ -169336,7 +169575,7 @@ func Xsqlite3session_attach(tls *libc.TLS, pSession uintptr, zName uintptr) int3 // // If successful, return zero. Otherwise, if an OOM condition is encountered, // set *pRc to SQLITE_NOMEM and return non-zero. -func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:210410:12: */ +func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { /* sqlite3.c:210450:12: */ var nReq I64 = I64((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) + nByte if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && nReq > I64((*SessionBuffer)(unsafe.Pointer(p)).FnAlloc) { var aNew uintptr @@ -169381,15 +169620,15 @@ func sessionBufferGrow(tls *libc.TLS, p uintptr, nByte I64, pRc uintptr) int32 { // This function is a no-op if *pRc is non-zero when it is called. // Otherwise, if an error occurs, *pRc is set to an SQLite error code // before returning. -func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:210453:13: */ +func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { /* sqlite3.c:210493:13: */ bp := tls.Alloc(12) defer tls.Free(12) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = *(*int32)(unsafe.Pointer(pRc)) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*Sqlite3_int64)(unsafe.Pointer(bp /* nByte */)) = int64(0) - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionSerializeValue(tls, uintptr(0), pVal, bp /* &nByte */) - sessionBufferGrow(tls, p, *(*Sqlite3_int64)(unsafe.Pointer(bp /* nByte */)), bp+8 /* &rc */) + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionSerializeValue(tls, uintptr(0), pVal, bp) + sessionBufferGrow(tls, p, *(*Sqlite3_int64)(unsafe.Pointer(bp /* nByte */)), bp+8) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sessionSerializeValue(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), pVal, uintptr(0)) *(*int32)(unsafe.Pointer(p + 4)) += int32(*(*Sqlite3_int64)(unsafe.Pointer(bp))) @@ -169404,7 +169643,7 @@ func sessionAppendValue(tls *libc.TLS, p uintptr, pVal uintptr, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:210475:13: */ +func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3.c:210515:13: */ if 0 == sessionBufferGrow(tls, p, int64(1), pRc) { *(*U8)(unsafe.Pointer((*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr(libc.PostIncInt32(&(*SessionBuffer)(unsafe.Pointer(p)).FnBuf, 1)))) = v } @@ -169415,7 +169654,7 @@ func sessionAppendByte(tls *libc.TLS, p uintptr, v U8, pRc uintptr) { /* sqlite3 // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:210488:13: */ +func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sqlite3.c:210528:13: */ if 0 == sessionBufferGrow(tls, p, int64(9), pRc) { *(*int32)(unsafe.Pointer(p + 4)) += sessionVarintPut(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), v) } @@ -169426,7 +169665,7 @@ func sessionAppendVarint(tls *libc.TLS, p uintptr, v int32, pRc uintptr) { /* sq // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:210501:13: */ +func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc uintptr) { /* sqlite3.c:210541:13: */ if nBlob > 0 && 0 == sessionBufferGrow(tls, p, int64(nBlob), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), aBlob, uint32(nBlob)) *(*int32)(unsafe.Pointer(p + 4)) += nBlob @@ -169439,7 +169678,7 @@ func sessionAppendBlob(tls *libc.TLS, p uintptr, aBlob uintptr, nBlob int32, pRc // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:210521:13: */ +func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:210561:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr) if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { libc.Xmemcpy(tls, (*SessionBuffer)(unsafe.Pointer(p)).FaBuf+uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf), zStr, uint32(nStr)) @@ -169453,14 +169692,14 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:210541:13: */ +func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:210581:13: */ bp := tls.Alloc(32) defer tls.Free(32) // var aBuf [24]int8 at bp+8, 24 - Xsqlite3_snprintf(tls, int32(uint32(unsafe.Sizeof([24]int8{}))-uint32(1)), bp+8 /* &aBuf[0] */, ts+4895 /* "%d" */, libc.VaList(bp, iVal)) - sessionAppendStr(tls, p, bp+8 /* &aBuf[0] */, pRc) + Xsqlite3_snprintf(tls, int32(uint32(unsafe.Sizeof([24]int8{}))-uint32(1)), bp+8, ts+4917, libc.VaList(bp, iVal)) + sessionAppendStr(tls, p, bp+8, pRc) } // This function is a no-op if *pRc is other than SQLITE_OK when it is @@ -169470,7 +169709,7 @@ func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { / // // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. -func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:210560:13: */ +func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* sqlite3.c:210600:13: */ var nStr int32 = Xsqlite3Strlen30(tls, zStr)*2 + 2 + 1 if 0 == sessionBufferGrow(tls, p, int64(nStr), pRc) { var zOut uintptr = (*SessionBuffer)(unsafe.Pointer(p)).FaBuf + uintptr((*SessionBuffer)(unsafe.Pointer(p)).FnBuf) @@ -169491,7 +169730,7 @@ func sessionAppendIdent(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { / // called. Otherwse, it appends the serialized version of the value stored // in column iCol of the row that SQL statement pStmt currently points // to to the buffer. -func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:210585:13: */ +func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc uintptr) { /* sqlite3.c:210625:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169507,10 +169746,10 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */)) = Xsqlite3_column_int64(tls, pStmt, iCol) } else { *(*float64)(unsafe.Pointer(bp + 8 /* r */)) = Xsqlite3_column_double(tls, pStmt, iCol) - libc.Xmemcpy(tls, bp /* &i */, bp+8 /* &r */, uint32(8)) + libc.Xmemcpy(tls, bp, bp+8, uint32(8)) } - sessionPutI64(tls, bp+16 /* &aBuf[0] */, *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */))) - sessionAppendBlob(tls, p, bp+16 /* &aBuf[0] */, 8, pRc) + sessionPutI64(tls, bp+16, *(*Sqlite3_int64)(unsafe.Pointer(bp /* i */))) + sessionAppendBlob(tls, p, bp+16, 8, pRc) } if eType == SQLITE_BLOB || eType == SQLITE_TEXT { var z uintptr @@ -169551,7 +169790,7 @@ func sessionAppendCol(tls *libc.TLS, p uintptr, pStmt uintptr, iCol int32, pRc u // Otherwise, the old.* record contains all primary key values and the // original values of any fields that have been modified. The new.* record // contains the new values of only those fields that have been modified. -func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:210647:12: */ +func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uintptr, p uintptr, abPK uintptr) int32 { /* sqlite3.c:210687:12: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -169562,8 +169801,8 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin var i int32 // Used to iterate through columns var pCsr uintptr = (*SessionChange)(unsafe.Pointer(p)).FaRecord // Used to iterate through old.* values - sessionAppendByte(tls, pBuf, uint8(SQLITE_UPDATE), bp /* &rc */) - sessionAppendByte(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp /* &rc */) + sessionAppendByte(tls, pBuf, uint8(SQLITE_UPDATE), bp) + sessionAppendByte(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp) for i = 0; i < Xsqlite3_column_count(tls, pStmt); i++ { var bChanged int32 = 0 var nAdvance int32 @@ -169590,7 +169829,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin } else { // var dVal float64 at bp+4, 8 - libc.Xmemcpy(tls, bp+4 /* &dVal */, bp+12 /* &iVal */, uint32(8)) + libc.Xmemcpy(tls, bp+4, bp+12, uint32(8)) if *(*float64)(unsafe.Pointer(bp + 4)) == Xsqlite3_column_double(tls, pStmt, i) { break } @@ -169627,18 +169866,18 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // currently generating a patchset. if bPatchset == 0 { if bChanged != 0 || *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - sessionAppendBlob(tls, pBuf, pCsr, nAdvance, bp /* &rc */) + sessionAppendBlob(tls, pBuf, pCsr, nAdvance, bp) } else { - sessionAppendByte(tls, pBuf, uint8(0), bp /* &rc */) + sessionAppendByte(tls, pBuf, uint8(0), bp) } } // Add a field to the new.* record. Or the only record if currently // generating a patchset. if bChanged != 0 || bPatchset != 0 && *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - sessionAppendCol(tls, bp+24 /* &buf2 */, pStmt, i, bp /* &rc */) + sessionAppendCol(tls, bp+24, pStmt, i, bp) } else { - sessionAppendByte(tls, bp+24 /* &buf2 */, uint8(0), bp /* &rc */) + sessionAppendByte(tls, bp+24, uint8(0), bp) } pCsr += uintptr(nAdvance) @@ -169647,7 +169886,7 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin if bNoop != 0 { (*SessionBuffer)(unsafe.Pointer(pBuf)).FnBuf = nRewind } else { - sessionAppendBlob(tls, pBuf, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf2 */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf2 */)).FnBuf, bp /* &rc */) + sessionAppendBlob(tls, pBuf, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf2 */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf2 */)).FnBuf, bp) } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+24 /* &buf2 */)).FaBuf) @@ -169657,17 +169896,17 @@ func sessionAppendUpdate(tls *libc.TLS, pBuf uintptr, bPatchset int32, pStmt uin // Append a DELETE change to the buffer passed as the first argument. Use // the changeset format if argument bPatchset is zero, or the patchset // format otherwise. -func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:210747:12: */ +func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr, nCol int32, abPK uintptr) int32 { /* sqlite3.c:210787:12: */ bp := tls.Alloc(8) defer tls.Free(8) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK - sessionAppendByte(tls, pBuf, uint8(SQLITE_DELETE), bp /* &rc */) - sessionAppendByte(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp /* &rc */) + sessionAppendByte(tls, pBuf, uint8(SQLITE_DELETE), bp) + sessionAppendByte(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp) if bPatchset == 0 { - sessionAppendBlob(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FaRecord, (*SessionChange)(unsafe.Pointer(p)).FnRecord, bp /* &rc */) + sessionAppendBlob(tls, pBuf, (*SessionChange)(unsafe.Pointer(p)).FaRecord, (*SessionChange)(unsafe.Pointer(p)).FnRecord, bp) } else { var i int32 var a uintptr = (*SessionChange)(unsafe.Pointer(p)).FaRecord @@ -169694,14 +169933,14 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr { // var n int32 at bp+4, 4 - a += uintptr(sessionVarintGet(tls, a, bp+4 /* &n */)) + a += uintptr(sessionVarintGet(tls, a, bp+4)) a += uintptr(*(*int32)(unsafe.Pointer(bp + 4 /* n */))) break } } if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - sessionAppendBlob(tls, pBuf, pStart, (int32(a)-int32(pStart))/1, bp /* &rc */) + sessionAppendBlob(tls, pBuf, pStart, (int32(a)-int32(pStart))/1, bp) } } @@ -169714,7 +169953,7 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // zTab in database zDb based on its primary key. i.e. // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... -func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:210802:12: */ +func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:210842:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169722,30 +169961,30 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo var zSql uintptr = uintptr(0) var nSql int32 = -1 - if 0 == Xsqlite3_stricmp(tls, ts+11186, zTab) { + if 0 == Xsqlite3_stricmp(tls, ts+11208, zTab) { zSql = Xsqlite3_mprintf(tls, - ts+32292 /* "SELECT tbl, ?2, ..." */, libc.VaList(bp, zDb)) + ts+32461, libc.VaList(bp, zDb)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 20 /* rc */)) = SQLITE_NOMEM } } else { var i int32 - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+8 /* &buf */, ts+32402 /* "SELECT * FROM " */, bp+20 /* &rc */) - sessionAppendIdent(tls, bp+8 /* &buf */, zDb, bp+20 /* &rc */) - sessionAppendStr(tls, bp+8 /* &buf */, ts+1556 /* "." */, bp+20 /* &rc */) - sessionAppendIdent(tls, bp+8 /* &buf */, zTab, bp+20 /* &rc */) - sessionAppendStr(tls, bp+8 /* &buf */, ts+32417 /* " WHERE " */, bp+20 /* &rc */) + sessionAppendStr(tls, bp+8, ts+32571, bp+20) + sessionAppendIdent(tls, bp+8, zDb, bp+20) + sessionAppendStr(tls, bp+8, ts+1578, bp+20) + sessionAppendIdent(tls, bp+8, zTab, bp+20) + sessionAppendStr(tls, bp+8, ts+32586, bp+20) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - sessionAppendStr(tls, bp+8 /* &buf */, zSep, bp+20 /* &rc */) - sessionAppendIdent(tls, bp+8 /* &buf */, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), bp+20 /* &rc */) - sessionAppendStr(tls, bp+8 /* &buf */, ts+32425 /* " IS ?" */, bp+20 /* &rc */) - sessionAppendInteger(tls, bp+8 /* &buf */, i+1, bp+20 /* &rc */) - zSep = ts + 21174 /* " AND " */ + sessionAppendStr(tls, bp+8, zSep, bp+20) + sessionAppendIdent(tls, bp+8, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*4)), bp+20) + sessionAppendStr(tls, bp+8, ts+32594, bp+20) + sessionAppendInteger(tls, bp+8, i+1, bp+20) + zSep = ts + 21343 /* " AND " */ } } zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf @@ -169765,7 +170004,7 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo // // Return SQLITE_OK if all PK values are successfully bound, or an SQLite // error code (e.g. SQLITE_NOMEM) otherwise. -func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:210859:12: */ +func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, pChange uintptr) int32 { /* sqlite3.c:210899:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -169800,7 +170039,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // var rVal float64 at bp, 8 *(*I64)(unsafe.Pointer(bp + 8 /* iVal */)) = sessionGetI64(tls, a) - libc.Xmemcpy(tls, bp /* &rVal */, bp+8 /* &iVal */, uint32(8)) + libc.Xmemcpy(tls, bp, bp+8, uint32(8)) rc = Xsqlite3_bind_double(tls, pSelect, i+1, *(*float64)(unsafe.Pointer(bp /* rVal */))) } a += uintptr(8) @@ -169812,7 +170051,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, { // var n int32 at bp+16, 4 - a += uintptr(sessionVarintGet(tls, a, bp+16 /* &n */)) + a += uintptr(sessionVarintGet(tls, a, bp+16)) if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { rc = Xsqlite3_bind_text(tls, pSelect, i+1, a, *(*int32)(unsafe.Pointer(bp + 16 /* n */)), libc.UintptrFromInt32(-1)) } @@ -169825,7 +170064,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, { // var n int32 at bp+20, 4 - a += uintptr(sessionVarintGet(tls, a, bp+20 /* &n */)) + a += uintptr(sessionVarintGet(tls, a, bp+20)) if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { rc = Xsqlite3_bind_blob(tls, pSelect, i+1, a, *(*int32)(unsafe.Pointer(bp + 20 /* n */)), libc.UintptrFromInt32(-1)) } @@ -169843,7 +170082,7 @@ func sessionSelectBind(tls *libc.TLS, pSelect uintptr, nCol int32, abPK uintptr, // is called. Otherwise, append a serialized table header (part of the binary // changeset format) to buffer *pBuf. If an error occurs, set *pRc to an // SQLite error code before returning. -func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:210930:13: */ +func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab uintptr, pRc uintptr) { /* sqlite3.c:210970:13: */ // Write a table header sessionAppendByte(tls, pBuf, func() uint8 { if bPatchset != 0 { @@ -169864,7 +170103,7 @@ func sessionAppendTableHdr(tls *libc.TLS, pBuf uintptr, bPatchset int32, pTab ui // stored in output variables *pnChangeset and *ppChangeset. Or, if an error // occurs, an SQLite error code is returned and both output variables set // to 0. -func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:210953:12: */ +func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, xOutput uintptr, pOut uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:210993:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -169886,7 +170125,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc != 0 { return (*Sqlite3_session)(unsafe.Pointer(pSession)).Frc } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32431 /* "SAVEPOINT change..." */, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_exec(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, ts+32600, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -169905,18 +170144,18 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, var nNoop int32 // Size of buffer after writing tbl header // Check the table schema is still Ok. - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sessionTableInfo(tls, uintptr(0), db, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zName, bp /* &nCol */, uintptr(0), bp+4 /* &azCol */, bp+8 /* &abPK */) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sessionTableInfo(tls, uintptr(0), db, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zName, bp, uintptr(0), bp+4, bp+8) if !(*(*int32)(unsafe.Pointer(bp + 24)) != 0) && ((*SessionTable)(unsafe.Pointer(pTab)).FnCol != *(*int32)(unsafe.Pointer(bp)) || libc.Xmemcmp(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), (*SessionTable)(unsafe.Pointer(pTab)).FabPK, uint32(*(*int32)(unsafe.Pointer(bp)))) != 0) { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_SCHEMA } // Write a table header - sessionAppendTableHdr(tls, bp+12 /* &buf */, bPatchset, pTab, bp+24 /* &rc */) + sessionAppendTableHdr(tls, bp+12, bPatchset, pTab, bp+24) // Build and compile a statement to execute: if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sessionSelectStmt(tls, - db, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zName, *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 4 /* azCol */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* abPK */)), bp+28 /* &pSel */) + db, (*Sqlite3_session)(unsafe.Pointer(pSession)).FzDb, zName, *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 4 /* azCol */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* abPK */)), bp+28) } nNoop = (*SessionBuffer)(unsafe.Pointer(bp + 12 /* &buf */)).FnBuf @@ -169931,17 +170170,17 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, if Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 28))) == SQLITE_ROW { if int32((*SessionChange)(unsafe.Pointer(p)).Fop) == SQLITE_INSERT { var iCol int32 - sessionAppendByte(tls, bp+12 /* &buf */, uint8(SQLITE_INSERT), bp+24 /* &rc */) - sessionAppendByte(tls, bp+12 /* &buf */, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp+24 /* &rc */) + sessionAppendByte(tls, bp+12, uint8(SQLITE_INSERT), bp+24) + sessionAppendByte(tls, bp+12, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp+24) for iCol = 0; iCol < *(*int32)(unsafe.Pointer(bp /* nCol */)); iCol++ { - sessionAppendCol(tls, bp+12 /* &buf */, *(*uintptr)(unsafe.Pointer(bp + 28 /* pSel */)), iCol, bp+24 /* &rc */) + sessionAppendCol(tls, bp+12, *(*uintptr)(unsafe.Pointer(bp + 28 /* pSel */)), iCol, bp+24 /* &rc */) } } else { // Because sessionSelectStmt() returned ok - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sessionAppendUpdate(tls, bp+12 /* &buf */, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 28 /* pSel */)), p, *(*uintptr)(unsafe.Pointer(bp + 8 /* abPK */))) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sessionAppendUpdate(tls, bp+12, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 28 /* pSel */)), p, *(*uintptr)(unsafe.Pointer(bp + 8 /* abPK */))) } } else if int32((*SessionChange)(unsafe.Pointer(p)).Fop) != SQLITE_INSERT { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sessionAppendDelete(tls, bp+12 /* &buf */, bPatchset, p, *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* abPK */))) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sessionAppendDelete(tls, bp+12, bPatchset, p, *(*int32)(unsafe.Pointer(bp /* nCol */)), *(*uintptr)(unsafe.Pointer(bp + 8 /* abPK */))) } if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 28 /* pSel */))) @@ -169984,7 +170223,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, } Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+12 /* &buf */)).FaBuf) - Xsqlite3_exec(tls, db, ts+32451 /* "RELEASE changese..." */, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+32620, uintptr(0), uintptr(0), uintptr(0)) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } @@ -169994,7 +170233,7 @@ func sessionGenerateChangeset(tls *libc.TLS, pSession uintptr, bPatchset int32, // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:211082:16: */ +func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uintptr, ppChangeset uintptr) int32 { /* sqlite3.c:211122:16: */ var rc int32 if pnChangeset == uintptr(0) || ppChangeset == uintptr(0) { @@ -170006,7 +170245,7 @@ func Xsqlite3session_changeset(tls *libc.TLS, pSession uintptr, pnChangeset uint } // Streaming version of sqlite3session_changeset(). -func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:211100:16: */ +func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:211140:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -170014,7 +170253,7 @@ func Xsqlite3session_changeset_strm(tls *libc.TLS, pSession uintptr, xOutput uin } // Streaming version of sqlite3session_patchset(). -func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:211112:16: */ +func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:211152:16: */ if xOutput == uintptr(0) { return SQLITE_MISUSE } @@ -170026,7 +170265,7 @@ func Xsqlite3session_patchset_strm(tls *libc.TLS, pSession uintptr, xOutput uint // // It is the responsibility of the caller to eventually free the buffer // using sqlite3_free(). -func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:211128:16: */ +func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintptr, ppPatchset uintptr) int32 { /* sqlite3.c:211168:16: */ if pnPatchset == uintptr(0) || ppPatchset == uintptr(0) { return SQLITE_MISUSE } @@ -170034,7 +170273,7 @@ func Xsqlite3session_patchset(tls *libc.TLS, pSession uintptr, pnPatchset uintpt } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:211140:16: */ +func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int32 { /* sqlite3.c:211180:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bEnable >= 0 { @@ -170046,7 +170285,7 @@ func Xsqlite3session_enable(tls *libc.TLS, pSession uintptr, bEnable int32) int3 } // Enable or disable the session object passed as the first argument. -func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:211154:16: */ +func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) int32 { /* sqlite3.c:211194:16: */ var ret int32 Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb)) if bIndirect >= 0 { @@ -170059,7 +170298,7 @@ func Xsqlite3session_indirect(tls *libc.TLS, pSession uintptr, bIndirect int32) // Return true if there have been no changes to monitored tables recorded // by the session object passed as the only argument. -func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:211169:16: */ +func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3.c:211209:16: */ var ret int32 = 0 var pTab uintptr @@ -170073,12 +170312,12 @@ func Xsqlite3session_isempty(tls *libc.TLS, pSession uintptr) int32 { /* sqlite3 } // Return the amount of heap memory in use. -func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:211185:26: */ +func Xsqlite3session_memory_used(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:211225:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMalloc } // Configure the session object passed as the first argument. -func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:211192:16: */ +func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:211232:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_OBJCONFIG_SIZE: @@ -170104,12 +170343,12 @@ func Xsqlite3session_object_config(tls *libc.TLS, pSession uintptr, op int32, pA } // Return the maximum size of sqlite3session_changeset() output. -func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:211218:26: */ +func Xsqlite3session_changeset_size(tls *libc.TLS, pSession uintptr) Sqlite3_int64 { /* sqlite3.c:211258:26: */ return (*Sqlite3_session)(unsafe.Pointer(pSession)).FnMaxChangesetSize } // Do the work for either sqlite3changeset_start() or start_strm(). -func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:211225:12: */ +func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, nChangeset int32, pChangeset uintptr, bInvert int32, bSkipEmpty int32) int32 { /* sqlite3.c:211265:12: */ var pRet uintptr // Iterator to return var nByte int32 // Number of bytes to allocate for iterator @@ -170142,28 +170381,28 @@ func sessionChangesetStart(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintpt } // Create an iterator used to iterate through the contents of a changeset. -func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:211263:16: */ +func Xsqlite3changeset_start(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr) int32 { /* sqlite3.c:211303:16: */ return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, 0, 0) } -func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:211270:16: */ +func Xsqlite3changeset_start_v2(tls *libc.TLS, pp uintptr, nChangeset int32, pChangeset uintptr, flags int32) int32 { /* sqlite3.c:211310:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInvert, 0) } // Streaming version of sqlite3changeset_start(). -func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:211283:16: */ +func Xsqlite3changeset_start_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:211323:16: */ return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), 0, 0) } -func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:211290:16: */ +func Xsqlite3changeset_start_v2_strm(tls *libc.TLS, pp uintptr, xInput uintptr, pIn uintptr, flags int32) int32 { /* sqlite3.c:211330:16: */ var bInvert int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETSTART_INVERT != 0)) return sessionChangesetStart(tls, pp, xInput, pIn, 0, uintptr(0), bInvert, 0) } // If the SessionInput object passed as the only argument is a streaming // object and the buffer is full, discard some data to free up space. -func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:211304:13: */ +func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:211344:13: */ if (*SessionInput)(unsafe.Pointer(pIn)).FxInput != 0 && (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= sessions_strm_chunk_size { var nMove int32 = (*SessionInput)(unsafe.Pointer(pIn)).Fbuf.FnBuf - (*SessionInput)(unsafe.Pointer(pIn)).FiNext @@ -170181,7 +170420,7 @@ func sessionDiscardData(tls *libc.TLS, pIn uintptr) { /* sqlite3.c:211304:13: */ // data is in the buffer. // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:211324:12: */ +func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqlite3.c:211364:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170214,7 +170453,7 @@ func sessionInputBuffer(tls *libc.TLS, pIn uintptr, nByte int32) int32 { /* sqli // When this function is called, *ppRec points to the start of a record // that contains nCol values. This function advances the pointer *ppRec // until it points to the byte immediately following that record. -func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:211352:13: */ +func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c:211392:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170225,7 +170464,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: if eType == SQLITE_TEXT || eType == SQLITE_BLOB { // var nByte int32 at bp, 4 - aRec += uintptr(sessionVarintGet(tls, aRec, bp /* &nByte */)) + aRec += uintptr(sessionVarintGet(tls, aRec, bp)) aRec += uintptr(*(*int32)(unsafe.Pointer(bp /* nByte */))) } else if eType == SQLITE_INTEGER || eType == SQLITE_FLOAT { aRec += uintptr(8) @@ -170239,7 +170478,7 @@ func sessionSkipRecord(tls *libc.TLS, ppRec uintptr, nCol int32) { /* sqlite3.c: // first argument to a copy of the string or blob held in the aData[] // buffer. SQLITE_OK is returned if successful, or SQLITE_NOMEM if an OOM // error occurs. -func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:211378:12: */ +func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, enc U8) int32 { /* sqlite3.c:211418:12: */ // In theory this code could just pass SQLITE_TRANSIENT as the final // argument to sqlite3ValueSetStr() and have the copy created // automatically. But doing so makes it difficult to detect any OOM @@ -170275,7 +170514,7 @@ func sessionValueSetStr(tls *libc.TLS, pVal uintptr, aData uintptr, nData int32, // // If an error occurs, an SQLite error code (e.g. SQLITE_NOMEM) is returned. // The apOut[] array may have been partially populated in this case. -func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:211419:12: */ +func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apOut uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:211459:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -170293,7 +170532,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, 9) if rc == SQLITE_OK { if (*SessionInput)(unsafe.Pointer(pIn)).FiNext >= (*SessionInput)(unsafe.Pointer(pIn)).FnData { - rc = Xsqlite3CorruptError(tls, 211437) + rc = Xsqlite3CorruptError(tls, 211477) } else { eType = int32(*(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pIn)).FaData + uintptr(libc.PostIncInt32(&(*SessionInput)(unsafe.Pointer(pIn)).FiNext, 1))))) @@ -170318,7 +170557,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO rc = sessionInputBuffer(tls, pIn, *(*int32)(unsafe.Pointer(bp /* nByte */))) if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > (*SessionInput)(unsafe.Pointer(pIn)).FnData-(*SessionInput)(unsafe.Pointer(pIn)).FiNext { - rc = Xsqlite3CorruptError(tls, 211457) + rc = Xsqlite3CorruptError(tls, 211497) } else { var enc U8 = func() uint8 { if eType == SQLITE_TEXT { @@ -170338,7 +170577,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO } else { // var d float64 at bp+4, 8 - libc.Xmemcpy(tls, bp+4 /* &d */, bp+12 /* &v */, uint32(8)) + libc.Xmemcpy(tls, bp+4, bp+12, uint32(8)) Xsqlite3VdbeMemSetDouble(tls, *(*uintptr)(unsafe.Pointer(apOut + uintptr(i)*4)), *(*float64)(unsafe.Pointer(bp + 4 /* d */))) } *(*int32)(unsafe.Pointer(pIn + 8)) += 8 @@ -170360,7 +170599,7 @@ func sessionReadRecord(tls *libc.TLS, pIn uintptr, nCol int32, abPK uintptr, apO // buffer (i.e. that it can be accessed without any calls to xInput()). // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. // The input pointer is not moved. -func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:211495:12: */ +func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) int32 { /* sqlite3.c:211535:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170379,7 +170618,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // large value for nCol may cause nRead to wrap around and become // negative. Leading to a crash. if *(*int32)(unsafe.Pointer(bp)) < 0 || *(*int32)(unsafe.Pointer(bp)) > 65536 { - rc = Xsqlite3CorruptError(tls, 211511) + rc = Xsqlite3CorruptError(tls, 211551) } else { rc = sessionInputBuffer(tls, pIn, nRead+*(*int32)(unsafe.Pointer(bp))+100) nRead = nRead + *(*int32)(unsafe.Pointer(bp)) @@ -170406,7 +170645,7 @@ func sessionChangesetBufferTblhdr(tls *libc.TLS, pIn uintptr, pnByte uintptr) in // If successful, SQLITE_OK is returned and *pnByte is set to the size of // the record in bytes. Otherwise, an SQLite error code is returned. The // final value of *pnByte is undefined in this case. -func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:211538:12: */ +func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte uintptr) int32 { /* sqlite3.c:211578:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170448,7 +170687,7 @@ func sessionChangesetBufferRecord(tls *libc.TLS, pIn uintptr, nCol int32, pnByte // If successful, SQLITE_OK is returned. Otherwise, an SQLite error code // is returned and the final values of the various fields enumerated above // are undefined. -func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:211582:12: */ +func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:211622:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -170456,7 +170695,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // var nCopy int32 at bp, 4 - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sessionChangesetBufferTblhdr(tls, p, bp /* &nCopy */) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sessionChangesetBufferTblhdr(tls, p, bp) if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var nByte int32 var nVarint int32 @@ -170466,9 +170705,9 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 *(*int32)(unsafe.Pointer(p + 8)) += nVarint nByte = int32(uint32((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*uint32(unsafe.Sizeof(uintptr(0)))*uint32(2) + uint32(*(*int32)(unsafe.Pointer(bp)))) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Ftblhdr.FnBuf = 0 - sessionBufferGrow(tls, p+44, int64(nByte), bp+4 /* &rc */) + sessionBufferGrow(tls, p+44, int64(nByte), bp+4) } else { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 211599) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = Xsqlite3CorruptError(tls, 211639) } } @@ -170503,7 +170742,7 @@ func sessionChangesetReadTblhdr(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // // * If the iterator is configured to skip no-op UPDATEs, // sessionChangesetNext() does that. This function does not. -func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:211631:12: */ +func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr, pbEmpty uintptr) int32 { /* sqlite3.c:211671:12: */ var i int32 var op U8 @@ -170560,13 +170799,13 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // The first record in the changeset is not a table header. Must be a // corrupt changeset. - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 211685)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 211725)) } (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop = int32(op) (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbIndirect = int32(*(*U8)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FaData + uintptr(libc.PostIncInt32(&(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fin.FiNext, 1))))) if (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_DELETE && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).Fop != SQLITE_INSERT { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 211691)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 211731)) } if paRec != 0 { @@ -170636,7 +170875,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) = *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) if *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i)*4)) == uintptr(0) { - return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 211735)) + return libc.AssignPtrInt32(p+68, Xsqlite3CorruptError(tls, 211775)) } *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FapValue + uintptr(i+(*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FnCol)*4)) = uintptr(0) } @@ -170667,7 +170906,7 @@ func sessionChangesetNextOne(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uint // successfully advanced to the next change in the changeset, an SQLite // error code if an error occurs, or SQLITE_DONE if there are no further // changes in the changeset. -func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:211764:12: */ +func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr, pbNew uintptr) int32 { /* sqlite3.c:211804:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -170676,7 +170915,7 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr var rc int32 for ok := true; ok; ok = rc == SQLITE_ROW && (*Sqlite3_changeset_iter)(unsafe.Pointer(p)).FbSkipEmpty != 0 && *(*int32)(unsafe.Pointer(bp)) != 0 { *(*int32)(unsafe.Pointer(bp /* bEmpty */)) = 0 - rc = sessionChangesetNextOne(tls, p, paRec, pnRec, pbNew, bp /* &bEmpty */) + rc = sessionChangesetNextOne(tls, p, paRec, pnRec, pbNew, bp) } return rc } @@ -170687,14 +170926,14 @@ func sessionChangesetNext(tls *libc.TLS, p uintptr, paRec uintptr, pnRec uintptr // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:211787:16: */ +func Xsqlite3changeset_next(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:211827:16: */ return sessionChangesetNext(tls, p, uintptr(0), uintptr(0), uintptr(0)) } // The following function extracts information on the current change // from a changeset iterator. It may only be called after changeset_next() // has returned SQLITE_ROW. -func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:211796:16: */ +func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uintptr, pOp uintptr, pbIndirect uintptr) int32 { /* sqlite3.c:211836:16: */ *(*int32)(unsafe.Pointer(pOp)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol *(*uintptr)(unsafe.Pointer(pzTab)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab @@ -170708,7 +170947,7 @@ func Xsqlite3changeset_op(tls *libc.TLS, pIter uintptr, pzTab uintptr, pnCol uin // the database table affected by the change that pIter currently points // to. This function may only be called after changeset_next() returns // SQLITE_ROW. -func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:211816:16: */ +func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uintptr) int32 { /* sqlite3.c:211856:16: */ *(*uintptr)(unsafe.Pointer(pabPK)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK if pnCol != 0 { *(*int32)(unsafe.Pointer(pnCol)) = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol @@ -170727,7 +170966,7 @@ func Xsqlite3changeset_pk(tls *libc.TLS, pIter uintptr, pabPK uintptr, pnCol uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:211839:16: */ +func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:211879:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_DELETE { return SQLITE_MISUSE } @@ -170749,7 +170988,7 @@ func Xsqlite3changeset_old(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range, SQLITE_RANGE is returned and *ppValue is // not modified. Otherwise, SQLITE_OK. -func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:211867:16: */ +func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:211907:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_UPDATE && (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop != SQLITE_INSERT { return SQLITE_MISUSE } @@ -170773,7 +171012,7 @@ func Xsqlite3changeset_new(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uin // // If value iVal is out-of-range or some other error occurs, an SQLite error // code is returned. Otherwise, SQLITE_OK. -func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:211901:16: */ +func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValue uintptr) int32 { /* sqlite3.c:211941:16: */ if !(int32((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict) != 0) { return SQLITE_MISUSE } @@ -170790,7 +171029,7 @@ func Xsqlite3changeset_conflict(tls *libc.TLS, pIter uintptr, iVal int32, ppValu // violations in the destination database and returns SQLITE_OK. // // In all other cases this function returns SQLITE_MISUSE. -func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:211924:16: */ +func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) int32 { /* sqlite3.c:211964:16: */ if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FpConflict != 0 || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue != 0 { return SQLITE_MISUSE } @@ -170802,7 +171041,7 @@ func Xsqlite3changeset_fk_conflicts(tls *libc.TLS, pIter uintptr, pnOut uintptr) // // This function may not be called on iterators passed to a conflict handler // callback by changeset_apply(). -func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:211942:16: */ +func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:211982:16: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 // Used to iterate through p->apValue[] @@ -170819,7 +171058,7 @@ func Xsqlite3changeset_finalize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 return rc } -func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:211957:12: */ +func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:211997:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -170857,7 +171096,7 @@ func sessionChangesetInvert(tls *libc.TLS, pInput uintptr, xOutput uintptr, pOut *(*SessionBuffer)(unsafe.Pointer(bp + 20 /* sPK */)) = SessionBuffer{} // PK array for current table // Initialize the output buffer - libc.Xmemset(tls, bp /* &sOut */, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) // Zero the output variables in case an error occurs. if !(ppInverted != 0) { @@ -170912,11 +171151,11 @@ __7: goto finished_invert __12: ; - nVar = sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), bp+16 /* &nCol */) + nVar = sessionVarintGet(tls, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), bp+16) (*SessionBuffer)(unsafe.Pointer(bp + 20 /* &sPK */)).FnBuf = 0 - sessionAppendBlob(tls, bp+20 /* &sPK */, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext+nVar), *(*int32)(unsafe.Pointer(bp + 16 /* nCol */)), bp+32 /* &rc */) - sessionAppendByte(tls, bp /* &sOut */, eType, bp+32 /* &rc */) - sessionAppendBlob(tls, bp /* &sOut */, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), *(*int32)(unsafe.Pointer(bp + 12 /* nByte */)), bp+32 /* &rc */) + sessionAppendBlob(tls, bp+20, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext+nVar), *(*int32)(unsafe.Pointer(bp + 16 /* nCol */)), bp+32) + sessionAppendByte(tls, bp, eType, bp+32) + sessionAppendBlob(tls, bp, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), *(*int32)(unsafe.Pointer(bp + 12 /* nByte */)), bp+32) if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { goto __13 } @@ -170941,10 +171180,10 @@ __9: }() *(*int32)(unsafe.Pointer(pInput + 8)) += 2 - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = sessionChangesetBufferRecord(tls, pInput, *(*int32)(unsafe.Pointer(bp + 16 /* nCol */)), bp+36 /* &nByte1 */) - sessionAppendByte(tls, bp /* &sOut */, uint8(eType2), bp+32 /* &rc */) - sessionAppendByte(tls, bp /* &sOut */, uint8(bIndirect), bp+32 /* &rc */) - sessionAppendBlob(tls, bp /* &sOut */, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), *(*int32)(unsafe.Pointer(bp + 36 /* nByte1 */)), bp+32 /* &rc */) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = sessionChangesetBufferRecord(tls, pInput, *(*int32)(unsafe.Pointer(bp + 16 /* nCol */)), bp+36) + sessionAppendByte(tls, bp, uint8(eType2), bp+32) + sessionAppendByte(tls, bp, uint8(bIndirect), bp+32) + sessionAppendBlob(tls, bp, (*SessionInput)(unsafe.Pointer(pInput)).FaData+uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext), *(*int32)(unsafe.Pointer(bp + 36 /* nByte1 */)), bp+32) *(*int32)(unsafe.Pointer(pInput + 8)) += *(*int32)(unsafe.Pointer(bp + 36)) if !(*(*int32)(unsafe.Pointer(bp + 32)) != 0) { goto __14 @@ -170972,8 +171211,8 @@ __15: ; // Write the header for the new UPDATE change. Same as the original. - sessionAppendByte(tls, bp /* &sOut */, eType, bp+32 /* &rc */) - sessionAppendByte(tls, bp /* &sOut */, *(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext+1))), bp+32 /* &rc */) + sessionAppendByte(tls, bp, eType, bp+32) + sessionAppendByte(tls, bp, *(*U8)(unsafe.Pointer((*SessionInput)(unsafe.Pointer(pInput)).FaData + uintptr((*SessionInput)(unsafe.Pointer(pInput)).FiNext+1))), bp+32) // Read the old.* and new.* records for the update change. *(*int32)(unsafe.Pointer(pInput + 8)) += 2 @@ -170999,7 +171238,7 @@ __18: } return *(*int32)(unsafe.Pointer(bp + 16)) }())*4)) - sessionAppendValue(tls, bp /* &sOut */, pVal, bp+32 /* &rc */) + sessionAppendValue(tls, bp, pVal, bp+32) goto __19 __19: iCol++ @@ -171022,7 +171261,7 @@ __21: } return *(*uintptr)(unsafe.Pointer(apVal + uintptr(iCol)*4)) }() - sessionAppendValue(tls, bp /* &sOut */, pVal1, bp+32 /* &rc */) + sessionAppendValue(tls, bp, pVal1, bp+32) goto __22 __22: iCol++ @@ -171055,7 +171294,7 @@ __27: goto __6 __11: - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 212084) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3CorruptError(tls, 212124) goto finished_invert __6: ; @@ -171106,22 +171345,22 @@ finished_invert: } // Invert a changeset object. -func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:212116:16: */ +func Xsqlite3changeset_invert(tls *libc.TLS, nChangeset int32, pChangeset uintptr, pnInverted uintptr, ppInverted uintptr) int32 { /* sqlite3.c:212156:16: */ bp := tls.Alloc(44) defer tls.Free(44) // var sInput SessionInput at bp, 44 // Set up the input stream - libc.Xmemset(tls, bp /* &sInput */, 0, uint32(unsafe.Sizeof(SessionInput{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionInput{}))) (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FnData = nChangeset (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FaData = pChangeset - return sessionChangesetInvert(tls, bp /* &sInput */, uintptr(0), uintptr(0), pnInverted, ppInverted) + return sessionChangesetInvert(tls, bp, uintptr(0), uintptr(0), pnInverted, ppInverted) } // Streaming version of sqlite3changeset_invert(). -func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212135:16: */ +func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:212175:16: */ bp := tls.Alloc(44) defer tls.Free(44) @@ -171130,11 +171369,11 @@ func Xsqlite3changeset_invert_strm(tls *libc.TLS, xInput uintptr, pIn uintptr, x var rc int32 // Set up the input stream - libc.Xmemset(tls, bp /* &sInput */, 0, uint32(unsafe.Sizeof(SessionInput{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionInput{}))) (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FxInput = xInput (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).FpIn = pIn - rc = sessionChangesetInvert(tls, bp /* &sInput */, xOutput, pOut, uintptr(0), uintptr(0)) + rc = sessionChangesetInvert(tls, bp, xOutput, pOut, uintptr(0), uintptr(0)) Xsqlite3_free(tls, (*SessionInput)(unsafe.Pointer(bp /* &sInput */)).Fbuf.FaBuf) return rc } @@ -171143,9 +171382,9 @@ type SessionUpdate1 = struct { FpStmt uintptr FaMask uintptr FpNext uintptr -} /* sqlite3.c:212155:9 */ +} /* sqlite3.c:212195:9 */ -type SessionUpdate = SessionUpdate1 /* sqlite3.c:212155:30 */ +type SessionUpdate = SessionUpdate1 /* sqlite3.c:212195:30 */ type SessionApplyCtx1 = struct { Fdb uintptr @@ -171165,9 +171404,9 @@ type SessionApplyCtx1 = struct { FbRebaseStarted U8 FbRebase U8 F__ccgo_pad1 [2]byte -} /* sqlite3.c:212162:9 */ +} /* sqlite3.c:212202:9 */ -type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:212162:32 */ +type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:212202:32 */ // Number of prepared UPDATE statements to cache. @@ -171175,7 +171414,7 @@ type SessionApplyCtx = SessionApplyCtx1 /* sqlite3.c:212162:32 */ // being visited by the iterator. The UPDATE is of the form: // // UPDATE tbl SET col = ?, col2 = ? WHERE pk1 IS ? AND pk2 IS ? -func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:212191:12: */ +func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, ppStmt uintptr) int32 { /* sqlite3.c:212231:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -171236,50 +171475,50 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, if pUp == uintptr(0) { var nByte int32 = int32(uint32(unsafe.Sizeof(SessionUpdate{})) * uint32(nU32) * uint32(unsafe.Sizeof(U32(0)))) - var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11186) == 0) + var bStat1 int32 = libc.Bool32(Xsqlite3_stricmp(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, ts+11208) == 0) pUp = Xsqlite3_malloc(tls, nByte) if pUp == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = SQLITE_NOMEM } else { - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ // var buf SessionBuffer at bp, 12 - libc.Xmemset(tls, bp /* &buf */, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask = pUp + 1*12 libc.Xmemcpy(tls, (*SessionUpdate)(unsafe.Pointer(pUp)).FaMask, (*SessionApplyCtx)(unsafe.Pointer(p)).FaUpdateMask, uint32(nU32)*uint32(unsafe.Sizeof(U32(0)))) - sessionAppendStr(tls, bp /* &buf */, ts+32469 /* "UPDATE main." */, bp+12 /* &rc */) - sessionAppendIdent(tls, bp /* &buf */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12 /* &rc */) - sessionAppendStr(tls, bp /* &buf */, ts+32482 /* " SET " */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+32638, bp+12) + sessionAppendIdent(tls, bp, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, bp+12) + sessionAppendStr(tls, bp, ts+32651, bp+12) // Create the assignments part of the UPDATE for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii)))) == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol+ii)*4)) != 0 { - sessionAppendStr(tls, bp /* &buf */, zSep, bp+12 /* &rc */) - sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12 /* &rc */) - sessionAppendStr(tls, bp /* &buf */, ts+32488 /* " = ?" */, bp+12 /* &rc */) - sessionAppendInteger(tls, bp /* &buf */, ii*2+1, bp+12 /* &rc */) - zSep = ts + 14507 /* ", " */ + sessionAppendStr(tls, bp, zSep, bp+12) + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) + sessionAppendStr(tls, bp, ts+32657, bp+12) + sessionAppendInteger(tls, bp, ii*2+1, bp+12) + zSep = ts + 14529 /* ", " */ } } // Create the WHERE clause part of the UPDATE - zSep = ts + 1543 /* "" */ - sessionAppendStr(tls, bp /* &buf */, ts+32417 /* " WHERE " */, bp+12 /* &rc */) + zSep = ts + 1565 /* "" */ + sessionAppendStr(tls, bp, ts+32586, bp+12) for ii = 0; ii < (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol; ii++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(ii))) != 0 || bPatchset == 0 && *(*uintptr)(unsafe.Pointer((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FapValue + uintptr(ii)*4)) != 0 { - sessionAppendStr(tls, bp /* &buf */, zSep, bp+12 /* &rc */) + sessionAppendStr(tls, bp, zSep, bp+12) if bStat1 != 0 && ii == 1 { - sessionAppendStr(tls, bp, /* &buf */ + sessionAppendStr(tls, bp, - ts+32493 /* "idx IS CASE WHEN..." */, bp+12 /* &rc */) + ts+32662, bp+12) } else { - sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12 /* &rc */) - sessionAppendStr(tls, bp /* &buf */, ts+32425 /* " IS ?" */, bp+12 /* &rc */) - sessionAppendInteger(tls, bp /* &buf */, ii*2+2, bp+12 /* &rc */) + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(ii)*4)), bp+12) + sessionAppendStr(tls, bp, ts+32594, bp+12) + sessionAppendInteger(tls, bp, ii*2+2, bp+12) } - zSep = ts + 21174 /* " AND " */ + zSep = ts + 21343 /* " AND " */ } } @@ -171309,7 +171548,7 @@ func sessionUpdateFind(tls *libc.TLS, pIter uintptr, p uintptr, bPatchset int32, } // Free all cached UPDATE statements. -func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:212330:13: */ +func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:212370:13: */ var pUp uintptr var pNext uintptr for pUp = (*SessionApplyCtx)(unsafe.Pointer(p)).FpUp; pUp != 0; pUp = pNext { @@ -171337,47 +171576,47 @@ func sessionUpdateFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:212330:13: */ // // If successful, SQLITE_OK is returned and SessionApplyCtx.pDelete is left // pointing to the prepared version of the SQL statement. -func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:212360:12: */ +func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:212400:12: */ bp := tls.Alloc(16) defer tls.Free(16) var i int32 - var zSep uintptr = ts + 1543 /* "" */ + var zSep uintptr = ts + 1565 /* "" */ *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = SQLITE_OK *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} var nPk int32 = 0 - sessionAppendStr(tls, bp /* &buf */, ts+32568 /* "DELETE FROM main..." */, bp+12 /* &rc */) - sessionAppendIdent(tls, bp /* &buf */, zTab, bp+12 /* &rc */) - sessionAppendStr(tls, bp /* &buf */, ts+32417 /* " WHERE " */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+32737, bp+12) + sessionAppendIdent(tls, bp, zTab, bp+12) + sessionAppendStr(tls, bp, ts+32586, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { nPk++ - sessionAppendStr(tls, bp /* &buf */, zSep, bp+12 /* &rc */) - sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12 /* &rc */) - sessionAppendStr(tls, bp /* &buf */, ts+32488 /* " = ?" */, bp+12 /* &rc */) - sessionAppendInteger(tls, bp /* &buf */, i+1, bp+12 /* &rc */) - zSep = ts + 21174 /* " AND " */ + sessionAppendStr(tls, bp, zSep, bp+12) + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) + sessionAppendStr(tls, bp, ts+32657, bp+12) + sessionAppendInteger(tls, bp, i+1, bp+12) + zSep = ts + 21343 /* " AND " */ } } if nPk < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol { - sessionAppendStr(tls, bp /* &buf */, ts+32586 /* " AND (?" */, bp+12 /* &rc */) - sessionAppendInteger(tls, bp /* &buf */, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12 /* &rc */) - sessionAppendStr(tls, bp /* &buf */, ts+32129 /* " OR " */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+32755, bp+12) + sessionAppendInteger(tls, bp, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol+1, bp+12) + sessionAppendStr(tls, bp, ts+32298, bp+12) - zSep = ts + 1543 /* "" */ + zSep = ts + 1565 /* "" */ for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if !(int32(*(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i)))) != 0) { - sessionAppendStr(tls, bp /* &buf */, zSep, bp+12 /* &rc */) - sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12 /* &rc */) - sessionAppendStr(tls, bp /* &buf */, ts+32425 /* " IS ?" */, bp+12 /* &rc */) - sessionAppendInteger(tls, bp /* &buf */, i+1, bp+12 /* &rc */) - zSep = ts + 32594 /* "AND " */ + sessionAppendStr(tls, bp, zSep, bp+12) + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) + sessionAppendStr(tls, bp, ts+32594, bp+12) + sessionAppendInteger(tls, bp, i+1, bp+12) + zSep = ts + 32763 /* "AND " */ } } - sessionAppendStr(tls, bp /* &buf */, ts+4877 /* ")" */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+4899, bp+12) } if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { @@ -171399,9 +171638,9 @@ func sessionDeleteRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pSelect is left // pointing to the prepared version of the SQL statement. -func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:212425:12: */ +func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:212465:12: */ return sessionSelectStmt(tls, - db, ts+6305 /* "main" */, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) + db, ts+6327, zTab, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FazCol, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, p+12) } // Formulate and prepare an INSERT statement to add a record to table zTab. @@ -171411,7 +171650,7 @@ func sessionSelectRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 // // If successful, SQLITE_OK is returned and SessionApplyCtx.pInsert is left // pointing to the prepared version of the SQL statement. -func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:212443:12: */ +func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 { /* sqlite3.c:212483:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -171419,21 +171658,21 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 var i int32 *(*SessionBuffer)(unsafe.Pointer(bp /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp /* &buf */, ts+32599 /* "INSERT INTO main..." */, bp+12 /* &rc */) - sessionAppendIdent(tls, bp /* &buf */, zTab, bp+12 /* &rc */) - sessionAppendStr(tls, bp /* &buf */, ts+21180 /* "(" */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+32768, bp+12) + sessionAppendIdent(tls, bp, zTab, bp+12) + sessionAppendStr(tls, bp, ts+21349, bp+12) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { if i != 0 { - sessionAppendStr(tls, bp /* &buf */, ts+14507 /* ", " */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+14529, bp+12) } - sessionAppendIdent(tls, bp /* &buf */, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12 /* &rc */) + sessionAppendIdent(tls, bp, *(*uintptr)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)), bp+12) } - sessionAppendStr(tls, bp /* &buf */, ts+32617 /* ") VALUES(?" */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+32786, bp+12) for i = 1; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { - sessionAppendStr(tls, bp /* &buf */, ts+32628 /* ", ?" */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+32797, bp+12) } - sessionAppendStr(tls, bp /* &buf */, ts+4877 /* ")" */, bp+12 /* &rc */) + sessionAppendStr(tls, bp, ts+4899, bp+12) if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = Xsqlite3_prepare_v2(tls, db, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FaBuf, (*SessionBuffer)(unsafe.Pointer(bp /* &buf */)).FnBuf, p+8, uintptr(0)) @@ -171442,7 +171681,7 @@ func sessionInsertRow(tls *libc.TLS, db uintptr, zTab uintptr, p uintptr) int32 return *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) } -func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:212473:12: */ +func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { /* sqlite3.c:212513:12: */ return Xsqlite3_prepare_v2(tls, db, zSql, -1, pp, uintptr(0)) } @@ -171450,24 +171689,24 @@ func sessionPrepare(tls *libc.TLS, db uintptr, pp uintptr, zSql uintptr) int32 { // These are similar to those created by sessionSelectRow(), // sessionInsertRow(), sessionUpdateRow() and sessionDeleteRow() for // other tables. -func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:212483:12: */ - var rc int32 = sessionSelectRow(tls, db, ts+11186 /* "sqlite_stat1" */, p) +func sessionStat1Sql(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:212523:12: */ + var rc int32 = sessionSelectRow(tls, db, ts+11208, p) if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+8, - ts+32632 /* "INSERT INTO main..." */) + ts+32801) } if rc == SQLITE_OK { rc = sessionPrepare(tls, db, p+4, - ts+32745 /* "DELETE FROM main..." */) + ts+32914) } return rc } // A wrapper around sqlite3_bind_value() that detects an extra problem. // See comments in the body of this function for details. -func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:212506:12: */ +func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 { /* sqlite3.c:212546:12: */ var eType int32 = Xsqlite3_value_type(tls, pVal) // COVERAGE: The (pVal->z==0) branch is never true using current versions // of SQLite. If a malloc fails in an sqlite3_value_xxx() function, either @@ -171494,7 +171733,7 @@ func sessionBindValue(tls *libc.TLS, pStmt uintptr, i int32, pVal uintptr) int32 // statement. // // An SQLite error code is returned if an error occurs. Otherwise, SQLITE_OK. -func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:212539:12: */ +func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, abPK uintptr, pStmt uintptr) int32 { /* sqlite3.c:212579:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -171515,7 +171754,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab if *(*uintptr)(unsafe.Pointer(bp)) == uintptr(0) { // The value in the changeset was "undefined". This indicates a // corrupt changeset blob. - rc = Xsqlite3CorruptError(tls, 212562) + rc = Xsqlite3CorruptError(tls, 212602) } else { rc = sessionBindValue(tls, pStmt, i+1, *(*uintptr)(unsafe.Pointer(bp /* pVal */))) } @@ -171539,7 +171778,7 @@ func sessionBindRow(tls *libc.TLS, pIter uintptr, xValue uintptr, nCol int32, ab // If the iterator currently points to an INSERT record, bind values from the // new.* record to the SELECT statement. Or, if it points to a DELETE or // UPDATE, bind values from the old.* record. -func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:212588:12: */ +func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pSelect uintptr) int32 { /* sqlite3.c:212628:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -171551,7 +171790,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // var zDummy uintptr at bp, 4 // Unused - Xsqlite3changeset_op(tls, pIter, bp /* &zDummy */, bp+4 /* &nCol */, bp+8 /* &op */, uintptr(0)) + Xsqlite3changeset_op(tls, pIter, bp, bp+4, bp+8, uintptr(0)) rc = sessionBindRow(tls, pIter, func() uintptr { if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_INSERT { @@ -171583,7 +171822,7 @@ func sessionSeekToRow(tls *libc.TLS, db uintptr, pIter uintptr, abPK uintptr, pS // of apply_v2() as the "rebase" buffer. // // Return SQLITE_OK if successful, or an SQLite error code otherwise. -func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:212623:12: */ +func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int32 { /* sqlite3.c:212663:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171594,10 +171833,10 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 if int32((*SessionApplyCtx)(unsafe.Pointer(p)).FbRebaseStarted) == 0 { // Append a table-header to the rebase buffer var zTab uintptr = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab - sessionAppendByte(tls, p+60, uint8('T'), bp /* &rc */) - sessionAppendVarint(tls, p+60, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, bp /* &rc */) - sessionAppendBlob(tls, p+60, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, bp /* &rc */) - sessionAppendBlob(tls, p+60, zTab, int32(libc.Xstrlen(tls, zTab))+1, bp /* &rc */) + sessionAppendByte(tls, p+60, uint8('T'), bp) + sessionAppendVarint(tls, p+60, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, bp) + sessionAppendBlob(tls, p+60, (*SessionApplyCtx)(unsafe.Pointer(p)).FabPK, (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol, bp) + sessionAppendBlob(tls, p+60, zTab, int32(libc.Xstrlen(tls, zTab))+1, bp) (*SessionApplyCtx)(unsafe.Pointer(p)).FbRebaseStarted = U8(1) } @@ -171608,15 +171847,15 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 } return uint8(SQLITE_INSERT) }(), bp) - sessionAppendByte(tls, p+60, uint8(libc.Bool32(eType == SQLITE_CHANGESET_REPLACE)), bp /* &rc */) + sessionAppendByte(tls, p+60, uint8(libc.Bool32(eType == SQLITE_CHANGESET_REPLACE)), bp) for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(p)).FnCol; i++ { *(*uintptr)(unsafe.Pointer(bp + 4 /* pVal */)) = uintptr(0) if eOp == SQLITE_DELETE || eOp == SQLITE_UPDATE && *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(p)).FabPK + uintptr(i))) != 0 { - Xsqlite3changeset_old(tls, pIter, i, bp+4 /* &pVal */) + Xsqlite3changeset_old(tls, pIter, i, bp+4) } else { - Xsqlite3changeset_new(tls, pIter, i, bp+4 /* &pVal */) + Xsqlite3changeset_new(tls, pIter, i, bp+4) } - sessionAppendValue(tls, p+60, *(*uintptr)(unsafe.Pointer(bp + 4 /* pVal */)), bp /* &rc */) + sessionAppendValue(tls, p+60, *(*uintptr)(unsafe.Pointer(bp + 4 /* pVal */)), bp) } } return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -171655,7 +171894,7 @@ func sessionRebaseAdd(tls *libc.TLS, p uintptr, eType int32, pIter uintptr) int3 // returned. Or, if the conflict handler returns an invalid value, // SQLITE_MISUSE. If the conflict handler returns SQLITE_CHANGESET_OMIT, // this function returns SQLITE_OK. -func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:212697:12: */ +func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr) int32 { /* sqlite3.c:212737:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -171668,7 +171907,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // var zDummy uintptr at bp, 4 - Xsqlite3changeset_op(tls, pIter, bp /* &zDummy */, bp+4 /* &nCol */, bp+8 /* &op */, uintptr(0)) + Xsqlite3changeset_op(tls, pIter, bp, bp+4, bp+8, uintptr(0)) // Bind the new.* PRIMARY KEY values to the SELECT statement. if pbReplace != 0 { @@ -171691,7 +171930,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // to the SessionApplyCtx.constraints buffer. var aBlob uintptr = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FaData + uintptr((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiCurrent) var nBlob int32 = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiNext - (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FiCurrent - sessionAppendBlob(tls, p+48, aBlob, nBlob, bp+12 /* &rc */) + sessionAppendBlob(tls, p+48, aBlob, nBlob, bp+12) return SQLITE_OK } else { // No other row with the new.* primary key. @@ -171755,7 +171994,7 @@ func sessionConflictHandler(tls *libc.TLS, eType int32, p uintptr, pIter uintptr // If any conflict handler returns SQLITE_CHANGESET_ABORT, this function // returns SQLITE_ABORT. Otherwise, if no error occurs, SQLITE_OK is // returned. -func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:212795:12: */ +func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintptr, pCtx uintptr, pbReplace uintptr, pbRetry uintptr) int32 { /* sqlite3.c:212835:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -171767,7 +172006,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt var rc int32 = SQLITE_OK - Xsqlite3changeset_op(tls, pIter, bp /* &zDummy */, bp+4 /* &nCol */, bp+8 /* &op */, uintptr(0)) + Xsqlite3changeset_op(tls, pIter, bp, bp+4, bp+8, uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_DELETE { @@ -171812,7 +172051,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt *(*uintptr)(unsafe.Pointer(bp + 12 /* pUp */)) = uintptr(0) var bPatchset int32 = libc.Bool32(pbRetry == uintptr(0) || (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0) - rc = sessionUpdateFind(tls, pIter, p, bPatchset, bp+12 /* &pUp */) + rc = sessionUpdateFind(tls, pIter, p, bPatchset, bp+12) // Bind values to the UPDATE statement. for i = 0; rc == SQLITE_OK && i < *(*int32)(unsafe.Pointer(bp + 4 /* nCol */)); i++ { @@ -171890,7 +172129,7 @@ func sessionApplyOneOp(tls *libc.TLS, pIter uintptr, p uintptr, xConflict uintpt // function handles the case where the conflict-handler is invoked and // returns SQLITE_CHANGESET_REPLACE - indicating that the change should be // retried in some manner. -func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:212928:12: */ +func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:212968:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171898,7 +172137,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u *(*int32)(unsafe.Pointer(bp + 4 /* bRetry */)) = 0 var rc int32 - rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, bp /* &bReplace */, bp+4 /* &bRetry */) + rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, bp, bp+4) if rc == SQLITE_OK { // If the bRetry flag is set, the change has not been applied due to an // SQLITE_CHANGESET_DATA problem (i.e. this is an UPDATE or DELETE and @@ -171912,7 +172151,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } else if *(*int32)(unsafe.Pointer(bp)) != 0 { - rc = Xsqlite3_exec(tls, db, ts+32889 /* "SAVEPOINT replac..." */, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33058, uintptr(0), uintptr(0), uintptr(0)) if rc == SQLITE_OK { rc = sessionBindRow(tls, pIter, *(*uintptr)(unsafe.Pointer(&struct { @@ -171928,7 +172167,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u rc = sessionApplyOneOp(tls, pIter, pApply, xConflict, pCtx, uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+32910 /* "RELEASE replace_..." */, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33079, uintptr(0), uintptr(0), uintptr(0)) } } } @@ -171937,7 +172176,7 @@ func sessionApplyOneWithRetry(tls *libc.TLS, db uintptr, pIter uintptr, pApply u } // Retry the changes accumulated in the pApply->constraints buffer. -func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:212985:12: */ +func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab uintptr, pApply uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:213025:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -171949,7 +172188,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui libc.Xmemset(tls, pApply+48, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sessionChangesetStart(tls, - bp /* &pIter2 */, uintptr(0), uintptr(0), cons.FnBuf, cons.FaBuf, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FbInvertConstraints, 1) + bp, uintptr(0), uintptr(0), cons.FnBuf, cons.FaBuf, (*SessionApplyCtx)(unsafe.Pointer(pApply)).FbInvertConstraints, 1) if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { var nByte Size_t = uint32(2*(*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol) * uint32(unsafe.Sizeof(uintptr(0))) var rc2 int32 @@ -171957,7 +172196,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FzTab = zTab (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FnCol = (*SessionApplyCtx)(unsafe.Pointer(pApply)).FnCol (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FabPK = (*SessionApplyCtx)(unsafe.Pointer(pApply)).FabPK - sessionBufferGrow(tls, *(*uintptr)(unsafe.Pointer(bp))+44, int64(nByte), bp+4 /* &rc */) + sessionBufferGrow(tls, *(*uintptr)(unsafe.Pointer(bp))+44, int64(nByte), bp+4) (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FapValue = (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).Ftblhdr.FaBuf if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { libc.Xmemset(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pIter2 */)))).FapValue, 0, nByte) @@ -171991,7 +172230,7 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // changeset to the main database attached to handle "db". The supplied // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. -func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:213041:12: */ +func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:213081:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -172004,15 +172243,15 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin var bPatchset int32 (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FbNoDiscard = 1 - libc.Xmemset(tls, bp+48 /* &sApply */, 0, uint32(unsafe.Sizeof(SessionApplyCtx{}))) + libc.Xmemset(tls, bp+48, 0, uint32(unsafe.Sizeof(SessionApplyCtx{}))) (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbRebase = U8(libc.Bool32(ppRebase != 0 && pnRebase != 0)) (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { - rc = Xsqlite3_exec(tls, db, ts+32929 /* "SAVEPOINT change..." */, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33098, uintptr(0), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+32955 /* "PRAGMA defer_for..." */, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33124, uintptr(0), uintptr(0), uintptr(0)) } for rc == SQLITE_OK && SQLITE_ROW == Xsqlite3changeset_next(tls, pIter) { // var nCol int32 at bp+128, 4 @@ -172021,18 +172260,18 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // var zNew uintptr at bp+124, 4 - Xsqlite3changeset_op(tls, pIter, bp+124 /* &zNew */, bp+128 /* &nCol */, bp+132 /* &op */, uintptr(0)) + Xsqlite3changeset_op(tls, pIter, bp+124, bp+128, bp+132, uintptr(0)) if *(*uintptr)(unsafe.Pointer(bp + 140)) == uintptr(0) || Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(bp + 124)), *(*uintptr)(unsafe.Pointer(bp + 140)), nTab+1) != 0 { // var abPK uintptr at bp+136, 4 rc = sessionRetryConstraints(tls, - db, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)), bp+48 /* &sApply */, xConflict, pCtx) + db, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)), bp+48, xConflict, pCtx) if rc != SQLITE_OK { break } - sessionUpdateFree(tls, bp+48 /* &sApply */) + sessionUpdateFree(tls, bp+48) Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FazCol) // cast works around VC++ bug Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpDelete) Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpInsert) @@ -172056,7 +172295,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin f func(*libc.TLS, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{xFilter})).f(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 124)))) if schemaMismatch != 0 { - *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124 /* zNew */)))) + *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 124 /* zNew */)))) if *(*uintptr)(unsafe.Pointer(bp + 140)) == uintptr(0) { rc = SQLITE_NOMEM break @@ -172067,9 +172306,9 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin var nMinCol int32 = 0 var i int32 - Xsqlite3changeset_pk(tls, pIter, bp+136 /* &abPK */, uintptr(0)) + Xsqlite3changeset_pk(tls, pIter, bp+136, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6305 /* "main" */, *(*uintptr)(unsafe.Pointer(bp + 124 /* zNew */)), bp+48+16, bp+140 /* &zTab */, bp+48+20, bp+48+24) + db, ts+6327, *(*uintptr)(unsafe.Pointer(bp + 124 /* zNew */)), bp+48+16, bp+140, bp+48+20, bp+48+24) if rc != SQLITE_OK { break } @@ -172082,20 +172321,20 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+32985 /* "sqlite3changeset..." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) + ts+33154, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FnCol < *(*int32)(unsafe.Pointer(bp + 128)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33029, /* "sqlite3changeset..." */ + ts+33198, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 128 /* nCol */)))) } else if *(*int32)(unsafe.Pointer(bp + 128)) < nMinCol || libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 136)), uint32(*(*int32)(unsafe.Pointer(bp + 128)))) != 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33100 /* "sqlite3changeset..." */, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) + ts+33269, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)))) } else { (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 128 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11186) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 140)), ts+11208) { if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48)) != 0 { break } @@ -172119,7 +172358,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin continue } - rc = sessionApplyOneWithRetry(tls, db, pIter, bp+48 /* &sApply */, xConflict, pCtx) + rc = sessionApplyOneWithRetry(tls, db, pIter, bp+48, xConflict, pCtx) } bPatchset = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset @@ -172130,7 +172369,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } if rc == SQLITE_OK { - rc = sessionRetryConstraints(tls, db, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)), bp+48 /* &sApply */, xConflict, pCtx) + rc = sessionRetryConstraints(tls, db, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 140 /* zTab */)), bp+48, xConflict, pCtx) } if rc == SQLITE_OK { @@ -172138,12 +172377,12 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // var notUsed int32 at bp+148, 4 - Xsqlite3_db_status(tls, db, SQLITE_DBSTATUS_DEFERRED_FKS, bp+144 /* &nFk */, bp+148 /* ¬Used */, 0) + Xsqlite3_db_status(tls, db, SQLITE_DBSTATUS_DEFERRED_FKS, bp+144, bp+148, 0) if *(*int32)(unsafe.Pointer(bp + 144)) != 0 { var res int32 = SQLITE_CHANGESET_ABORT // var sIter Sqlite3_changeset_iter at bp+152, 100 - libc.Xmemset(tls, bp+152 /* &sIter */, 0, uint32(unsafe.Sizeof(Sqlite3_changeset_iter{}))) + libc.Xmemset(tls, bp+152, 0, uint32(unsafe.Sizeof(Sqlite3_changeset_iter{}))) (*Sqlite3_changeset_iter)(unsafe.Pointer(bp + 152 /* &sIter */)).FnCol = *(*int32)(unsafe.Pointer(bp + 144 /* nFk */)) res = (*struct { f func(*libc.TLS, uintptr, int32, uintptr) int32 @@ -172153,14 +172392,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } } - Xsqlite3_exec(tls, db, ts+33160 /* "PRAGMA defer_for..." */, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33329, uintptr(0), uintptr(0), uintptr(0)) if flags&SQLITE_CHANGESETAPPLY_NOSAVEPOINT == 0 { if rc == SQLITE_OK { - rc = Xsqlite3_exec(tls, db, ts+33190 /* "RELEASE changese..." */, uintptr(0), uintptr(0), uintptr(0)) + rc = Xsqlite3_exec(tls, db, ts+33359, uintptr(0), uintptr(0), uintptr(0)) } else { - Xsqlite3_exec(tls, db, ts+33214 /* "ROLLBACK TO chan..." */, uintptr(0), uintptr(0), uintptr(0)) - Xsqlite3_exec(tls, db, ts+33190 /* "RELEASE changese..." */, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33383, uintptr(0), uintptr(0), uintptr(0)) + Xsqlite3_exec(tls, db, ts+33359, uintptr(0), uintptr(0), uintptr(0)) } } @@ -172169,7 +172408,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin *(*int32)(unsafe.Pointer(pnRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FnBuf (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FaBuf = uintptr(0) } - sessionUpdateFree(tls, bp+48 /* &sApply */) + sessionUpdateFree(tls, bp+48) Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpInsert) Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpDelete) Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpSelect) @@ -172182,14 +172421,14 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin // Apply the changeset passed via pChangeset/nChangeset to the main // database attached to handle "db". -func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:213239:16: */ +func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:213279:16: */ bp := tls.Alloc(4) defer tls.Free(4) // var pIter uintptr at bp, 4 // Iterator to skip through changeset var bInv int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) - var rc int32 = sessionChangesetStart(tls, bp /* &pIter */, uintptr(0), uintptr(0), nChangeset, pChangeset, bInv, 1) + var rc int32 = sessionChangesetStart(tls, bp, uintptr(0), uintptr(0), nChangeset, pChangeset, bInv, 1) if rc == SQLITE_OK { rc = sessionChangesetApply(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xFilter, xConflict, pCtx, ppRebase, pnRebase, flags) @@ -172200,7 +172439,7 @@ func Xsqlite3changeset_apply_v2(tls *libc.TLS, db uintptr, nChangeset int32, pCh // Apply the changeset passed via pChangeset/nChangeset to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:213272:16: */ +func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChangeset uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:213312:16: */ return Xsqlite3changeset_apply_v2(tls, db, nChangeset, pChangeset, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -172208,14 +172447,14 @@ func Xsqlite3changeset_apply(tls *libc.TLS, db uintptr, nChangeset int32, pChang // Apply the changeset passed via xInput/pIn to the main database // attached to handle "db". Invoke the supplied conflict handler callback // to resolve any conflicts encountered while applying the change. -func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:213297:16: */ +func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:213337:16: */ bp := tls.Alloc(4) defer tls.Free(4) // var pIter uintptr at bp, 4 // Iterator to skip through changeset var bInverse int32 = libc.BoolInt32(!!(flags&SQLITE_CHANGESETAPPLY_INVERT != 0)) - var rc int32 = sessionChangesetStart(tls, bp /* &pIter */, xInput, pIn, 0, uintptr(0), bInverse, 1) + var rc int32 = sessionChangesetStart(tls, bp, xInput, pIn, 0, uintptr(0), bInverse, 1) if rc == SQLITE_OK { rc = sessionChangesetApply(tls, db, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xFilter, xConflict, pCtx, ppRebase, pnRebase, flags) @@ -172223,7 +172462,7 @@ func Xsqlite3changeset_apply_v2_strm(tls *libc.TLS, db uintptr, xInput uintptr, return rc } -func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:213324:16: */ +func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr) int32 { /* sqlite3.c:213364:16: */ return Xsqlite3changeset_apply_v2_strm(tls, db, xInput, pIn, xFilter, xConflict, pCtx, uintptr(0), uintptr(0), 0) } @@ -172231,7 +172470,7 @@ func Xsqlite3changeset_apply_strm(tls *libc.TLS, db uintptr, xInput uintptr, pIn // This function is called to merge two changes to the same row together as // part of an sqlite3changeset_concat() operation. A new change object is // allocated and a pointer to it stored in *ppNew. -func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:213358:12: */ +func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset int32, pExist uintptr, op2 int32, bIndirect int32, aRec uintptr, nRec int32, ppNew uintptr) int32 { /* sqlite3.c:213398:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172351,9 +172590,9 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_INSERT) if bPatchset == 0 { - sessionSkipRecord(tls, bp /* &a1 */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) + sessionSkipRecord(tls, bp, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) } - sessionMergeRecord(tls, bp+4 /* &aCsr */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, aExist, *(*uintptr)(unsafe.Pointer(bp /* a1 */))) + sessionMergeRecord(tls, bp+4, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, aExist, *(*uintptr)(unsafe.Pointer(bp /* a1 */))) } else if op1 == SQLITE_DELETE { // DELETE + INSERT (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_UPDATE) @@ -172371,8 +172610,8 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in *(*uintptr)(unsafe.Pointer(bp + 12 /* a2 */)) = aRec if bPatchset == 0 { - sessionSkipRecord(tls, bp+8 /* &a1 */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) - sessionSkipRecord(tls, bp+12 /* &a2 */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) + sessionSkipRecord(tls, bp+8, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) + sessionSkipRecord(tls, bp+12, (*SessionTable)(unsafe.Pointer(pTab)).FnCol) } (*SessionChange)(unsafe.Pointer(pNew)).Fop = U8(SQLITE_UPDATE) if 0 == sessionMergeUpdate(tls, bp+4, pTab, bPatchset, aRec, aExist, *(*uintptr)(unsafe.Pointer(bp + 8)), *(*uintptr)(unsafe.Pointer(bp + 12))) { @@ -172386,7 +172625,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* aCsr */)), aRec, uint32(nRec)) *(*uintptr)(unsafe.Pointer(bp + 4 /* aCsr */)) += uintptr(nRec) } else { - sessionMergeRecord(tls, bp+4 /* &aCsr */, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, aRec, aExist) + sessionMergeRecord(tls, bp+4, (*SessionTable)(unsafe.Pointer(pTab)).FnCol, aRec, aExist) } } @@ -172403,7 +172642,7 @@ func sessionChangeMerge(tls *libc.TLS, pTab uintptr, bRebase int32, bPatchset in // Add all changes in the changeset traversed by the iterator passed as // the first argument to the changegroup hash tables. -func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:213540:12: */ +func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase int32) int32 { /* sqlite3.c:213580:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -172436,13 +172675,13 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase break } - Xsqlite3changeset_op(tls, pIter, bp+8 /* &zNew */, bp+12 /* &nCol */, bp+16 /* &op */, bp+20 /* &bIndirect */) + Xsqlite3changeset_op(tls, pIter, bp+8, bp+12, bp+16, bp+20) if !(pTab != 0) || Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 8)), (*SessionTable)(unsafe.Pointer(pTab)).FzName) != 0 { // Search the list for a matching table var nNew int32 = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zNew */)))) // var abPK uintptr at bp+24, 4 - Xsqlite3changeset_pk(tls, pIter, bp+24 /* &abPK */, uintptr(0)) + Xsqlite3changeset_pk(tls, pIter, bp+24, uintptr(0)) for pTab = (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList; pTab != 0; pTab = (*SessionTable)(unsafe.Pointer(pTab)).FpNext { if 0 == Xsqlite3_strnicmp(tls, (*SessionTable)(unsafe.Pointer(pTab)).FzName, *(*uintptr)(unsafe.Pointer(bp + 8)), nNew+1) { break @@ -172501,7 +172740,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase } rc = sessionChangeMerge(tls, pTab, bRebase, - (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, pExist, *(*int32)(unsafe.Pointer(bp + 16 /* op */)), *(*int32)(unsafe.Pointer(bp + 20 /* bIndirect */)), *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), bp+28 /* &pChange */) + (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, pExist, *(*int32)(unsafe.Pointer(bp + 16 /* op */)), *(*int32)(unsafe.Pointer(bp + 20 /* bIndirect */)), *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), bp+28) if rc != 0 { break } @@ -172534,7 +172773,7 @@ func sessionChangesetToHash(tls *libc.TLS, pIter uintptr, pGrp uintptr, bRebase // If successful, SQLITE_OK is returned. Or, if an error occurs, an SQLite // error code. If an error occurs and xOutput is NULL, (*ppOut) and (*pnOut) // are both set to 0 before returning. -func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:213663:12: */ +func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:213703:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -172550,13 +172789,13 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut continue } - sessionAppendTableHdr(tls, bp /* &buf */, (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FbPatch, pTab, bp+12 /* &rc */) + sessionAppendTableHdr(tls, bp, (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FbPatch, pTab, bp+12) for i = 0; i < (*SessionTable)(unsafe.Pointer(pTab)).FnChange; i++ { var p uintptr for p = *(*uintptr)(unsafe.Pointer((*SessionTable)(unsafe.Pointer(pTab)).FapChange + uintptr(i)*4)); p != 0; p = (*SessionChange)(unsafe.Pointer(p)).FpNext { - sessionAppendByte(tls, bp /* &buf */, (*SessionChange)(unsafe.Pointer(p)).Fop, bp+12 /* &rc */) - sessionAppendByte(tls, bp /* &buf */, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp+12 /* &rc */) - sessionAppendBlob(tls, bp /* &buf */, (*SessionChange)(unsafe.Pointer(p)).FaRecord, (*SessionChange)(unsafe.Pointer(p)).FnRecord, bp+12 /* &rc */) + sessionAppendByte(tls, bp, (*SessionChange)(unsafe.Pointer(p)).Fop, bp+12) + sessionAppendByte(tls, bp, (*SessionChange)(unsafe.Pointer(p)).FbIndirect, bp+12) + sessionAppendBlob(tls, bp, (*SessionChange)(unsafe.Pointer(p)).FaRecord, (*SessionChange)(unsafe.Pointer(p)).FnRecord, bp+12) if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK && xOutput != 0 && (*SessionBuffer)(unsafe.Pointer(bp)).FnBuf >= sessions_strm_chunk_size { *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = (*struct { f func(*libc.TLS, uintptr, uintptr, int32) int32 @@ -172588,7 +172827,7 @@ func sessionChangegroupOutput(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut } // Allocate a new, empty, sqlite3_changegroup. -func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:213714:16: */ +func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:213754:16: */ var rc int32 = SQLITE_OK // Return code var p uintptr // New object p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Sqlite3_changegroup{}))) @@ -172603,7 +172842,7 @@ func Xsqlite3changegroup_new(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:213 // Add the changeset currently stored in buffer pData, size nData bytes, // to changeset-group p. -func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:213731:16: */ +func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uintptr) int32 { /* sqlite3.c:213771:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172611,7 +172850,7 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Iterator opened on pData/nData var rc int32 // Return code - rc = Xsqlite3changeset_start(tls, bp /* &pIter */, nData, pData) + rc = Xsqlite3changeset_start(tls, bp, nData, pData) if rc == SQLITE_OK { rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), pGrp, 0) } @@ -172621,12 +172860,12 @@ func Xsqlite3changegroup_add(tls *libc.TLS, pGrp uintptr, nData int32, pData uin // Obtain a buffer containing a changeset representing the concatenation // of all changesets added to the group so far. -func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:213747:16: */ +func Xsqlite3changegroup_output(tls *libc.TLS, pGrp uintptr, pnData uintptr, ppData uintptr) int32 { /* sqlite3.c:213787:16: */ return sessionChangegroupOutput(tls, pGrp, uintptr(0), uintptr(0), pnData, ppData) } // Streaming versions of changegroup_add(). -func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213758:16: */ +func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, pIn uintptr) int32 { /* sqlite3.c:213798:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172634,7 +172873,7 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p // Iterator opened on pData/nData var rc int32 // Return code - rc = Xsqlite3changeset_start_strm(tls, bp /* &pIter */, xInput, pIn) + rc = Xsqlite3changeset_start_strm(tls, bp, xInput, pIn) if rc == SQLITE_OK { rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), pGrp, 0) } @@ -172643,12 +172882,12 @@ func Xsqlite3changegroup_add_strm(tls *libc.TLS, pGrp uintptr, xInput uintptr, p } // Streaming versions of changegroup_output(). -func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213777:16: */ +func Xsqlite3changegroup_output_strm(tls *libc.TLS, pGrp uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213817:16: */ return sessionChangegroupOutput(tls, pGrp, xOutput, pOut, uintptr(0), uintptr(0)) } // Delete a changegroup object. -func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:213788:17: */ +func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:213828:17: */ if pGrp != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_changegroup)(unsafe.Pointer(pGrp)).FpList) Xsqlite3_free(tls, pGrp) @@ -172656,7 +172895,7 @@ func Xsqlite3changegroup_delete(tls *libc.TLS, pGrp uintptr) { /* sqlite3.c:2137 } // Combine two changesets together. -func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:213798:16: */ +func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight int32, pRight uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:213838:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172664,7 +172903,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight var rc int32 - rc = Xsqlite3changegroup_new(tls, bp /* &pGrp */) + rc = Xsqlite3changegroup_new(tls, bp) if rc == SQLITE_OK { rc = Xsqlite3changegroup_add(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), nLeft, pLeft) } @@ -172680,7 +172919,7 @@ func Xsqlite3changeset_concat(tls *libc.TLS, nLeft int32, pLeft uintptr, nRight } // Streaming version of sqlite3changeset_concat(). -func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213827:16: */ +func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, xInputB uintptr, pInB uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:213867:16: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -172688,7 +172927,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, var rc int32 - rc = Xsqlite3changegroup_new(tls, bp /* &pGrp */) + rc = Xsqlite3changegroup_new(tls, bp) if rc == SQLITE_OK { rc = Xsqlite3changegroup_add_strm(tls, *(*uintptr)(unsafe.Pointer(bp /* pGrp */)), xInputA, pInA) } @@ -172707,7 +172946,7 @@ func Xsqlite3changeset_concat_strm(tls *libc.TLS, xInputA uintptr, pInA uintptr, // fields in size. This function appends an nCol sessions module // record to buffer pBuf that is a copy of a1, except that for // each field that is undefined in a1[], swap in the field from a2[]. -func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:213866:13: */ +func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintptr, n1 int32, a2 uintptr, n2 int32, pRc uintptr) { /* sqlite3.c:213906:13: */ sessionBufferGrow(tls, pBuf, int64(n1+n2), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var i int32 @@ -172748,7 +172987,7 @@ func sessionAppendRecordMerge(tls *libc.TLS, pBuf uintptr, nCol int32, a1 uintpt // corresponding field in the rebase buffer is not "undefined" (0x00) // or "replaced" (0xFF), the old.* value is replaced by the value // in the rebase buffer. -func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:213915:13: */ +func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec uintptr, nRec int32, aChange uintptr, nChange int32, pRc uintptr) { /* sqlite3.c:213955:13: */ sessionBufferGrow(tls, pBuf, int64(2+nRec+nChange), pRc) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var bData int32 = 0 @@ -172810,7 +173049,7 @@ func sessionAppendPartialUpdate(tls *libc.TLS, pBuf uintptr, pIter uintptr, aRec // If an error occurs, an SQLite error code is returned. If ppOut and // pnOut are not NULL, then the two output parameters are set to 0 before // returning. -func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:213983:12: */ +func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOut uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:214023:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -172840,15 +173079,15 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Append a table header to the output for this new table - sessionAppendByte(tls, bp+12 /* &sOut */, func() uint8 { + sessionAppendByte(tls, bp+12, func() uint8 { if (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset != 0 { return uint8('P') } return uint8('T') }(), bp+24 /* &rc */) - sessionAppendVarint(tls, bp+12 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, bp+24 /* &rc */) - sessionAppendBlob(tls, bp+12 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, bp+24 /* &rc */) - sessionAppendBlob(tls, bp+12 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, int32(libc.Xstrlen(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab))+1, bp+24 /* &rc */) + sessionAppendVarint(tls, bp+12, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, bp+24) + sessionAppendBlob(tls, bp+12, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FabPK, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, bp+24) + sessionAppendBlob(tls, bp+12, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab, int32(libc.Xstrlen(tls, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FzTab))+1, bp+24) } if pTab != 0 && *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { @@ -172868,10 +173107,10 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_INSERT { bDone = 1 if int32((*SessionChange)(unsafe.Pointer(pChange)).FbIndirect) == 0 { - sessionAppendByte(tls, bp+12 /* &sOut */, uint8(SQLITE_UPDATE), bp+24 /* &rc */) - sessionAppendByte(tls, bp+12 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+24 /* &rc */) - sessionAppendBlob(tls, bp+12 /* &sOut */, (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+24 /* &rc */) - sessionAppendBlob(tls, bp+12 /* &sOut */, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), bp+24 /* &rc */) + sessionAppendByte(tls, bp+12, uint8(SQLITE_UPDATE), bp+24) + sessionAppendByte(tls, bp+12, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+24) + sessionAppendBlob(tls, bp+12, (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+24) + sessionAppendBlob(tls, bp+12, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), bp+24) } } break @@ -172882,16 +173121,16 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_DELETE { if int32((*SessionChange)(unsafe.Pointer(pChange)).FbIndirect) == 0 { *(*uintptr)(unsafe.Pointer(bp + 28 /* pCsr */)) = *(*uintptr)(unsafe.Pointer(bp /* aRec */)) - sessionSkipRecord(tls, bp+28 /* &pCsr */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol) - sessionAppendByte(tls, bp+12 /* &sOut */, uint8(SQLITE_INSERT), bp+24 /* &rc */) - sessionAppendByte(tls, bp+12 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+24 /* &rc */) - sessionAppendRecordMerge(tls, bp+12 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, + sessionSkipRecord(tls, bp+28, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol) + sessionAppendByte(tls, bp+12, uint8(SQLITE_INSERT), bp+24) + sessionAppendByte(tls, bp+12, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+24) + sessionAppendRecordMerge(tls, bp+12, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, *(*uintptr)(unsafe.Pointer(bp + 28 /* pCsr */)), *(*int32)(unsafe.Pointer(bp + 4))-(int32(*(*uintptr)(unsafe.Pointer(bp + 28)))-int32(*(*uintptr)(unsafe.Pointer(bp))))/1, - (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+24 /* &rc */) + (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+24) } } else { - sessionAppendPartialUpdate(tls, bp+12 /* &sOut */, pIter, - *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+24 /* &rc */) + sessionAppendPartialUpdate(tls, bp+12, pIter, + *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, bp+24) } break fallthrough @@ -172900,19 +173139,19 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu bDone = 1 if int32((*SessionChange)(unsafe.Pointer(pChange)).Fop) == SQLITE_INSERT { - sessionAppendByte(tls, bp+12 /* &sOut */, uint8(SQLITE_DELETE), bp+24 /* &rc */) - sessionAppendByte(tls, bp+12 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+24 /* &rc */) - sessionAppendRecordMerge(tls, bp+12 /* &sOut */, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, - (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), bp+24 /* &rc */) + sessionAppendByte(tls, bp+12, uint8(SQLITE_DELETE), bp+24) + sessionAppendByte(tls, bp+12, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+24) + sessionAppendRecordMerge(tls, bp+12, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FnCol, + (*SessionChange)(unsafe.Pointer(pChange)).FaRecord, (*SessionChange)(unsafe.Pointer(pChange)).FnRecord, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), bp+24) } break } } if bDone == 0 { - sessionAppendByte(tls, bp+12 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop), bp+24 /* &rc */) - sessionAppendByte(tls, bp+12 /* &sOut */, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+24 /* &rc */) - sessionAppendBlob(tls, bp+12 /* &sOut */, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), bp+24 /* &rc */) + sessionAppendByte(tls, bp+12, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fop), bp+24) + sessionAppendByte(tls, bp+12, uint8((*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbIndirect), bp+24) + sessionAppendBlob(tls, bp+12, *(*uintptr)(unsafe.Pointer(bp /* aRec */)), *(*int32)(unsafe.Pointer(bp + 4 /* nRec */)), bp+24) } if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK && xOutput != 0 && (*SessionBuffer)(unsafe.Pointer(bp+12)).FnBuf > sessions_strm_chunk_size { *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = (*struct { @@ -172927,7 +173166,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu if *(*int32)(unsafe.Pointer(bp + 24)) != SQLITE_OK { Xsqlite3_free(tls, (*SessionBuffer)(unsafe.Pointer(bp+12 /* &sOut */)).FaBuf) - libc.Xmemset(tls, bp+12 /* &sOut */, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) + libc.Xmemset(tls, bp+12, 0, uint32(unsafe.Sizeof(SessionBuffer{}))) } if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { @@ -172948,7 +173187,7 @@ func sessionRebase(tls *libc.TLS, p uintptr, pIter uintptr, xOutput uintptr, pOu } // Create a new rebaser object. -func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:214115:16: */ +func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:214155:16: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -172963,13 +173202,13 @@ func Xsqlite3rebaser_create(tls *libc.TLS, ppNew uintptr) int32 { /* sqlite3.c:2 } // Call this one or more times to configure a rebaser. -func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:214132:16: */ +func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase uintptr) int32 { /* sqlite3.c:214172:16: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator opened on pData/nData var rc int32 // Return code - rc = Xsqlite3changeset_start(tls, bp /* &pIter */, nRebase, pRebase) + rc = Xsqlite3changeset_start(tls, bp, nRebase, pRebase) if rc == SQLITE_OK { rc = sessionChangesetToHash(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), p, 1) } @@ -172978,12 +173217,12 @@ func Xsqlite3rebaser_configure(tls *libc.TLS, p uintptr, nRebase int32, pRebase } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:214149:16: */ +func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pnOut uintptr, ppOut uintptr) int32 { /* sqlite3.c:214189:16: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator to skip through input - var rc int32 = Xsqlite3changeset_start(tls, bp /* &pIter */, nIn, pIn) + var rc int32 = Xsqlite3changeset_start(tls, bp, nIn, pIn) if rc == SQLITE_OK { rc = sessionRebase(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), uintptr(0), uintptr(0), pnOut, ppOut) @@ -172994,12 +173233,12 @@ func Xsqlite3rebaser_rebase(tls *libc.TLS, p uintptr, nIn int32, pIn uintptr, pn } // Rebase a changeset according to current rebaser configuration -func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214168:16: */ +func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn uintptr, xOutput uintptr, pOut uintptr) int32 { /* sqlite3.c:214208:16: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* pIter */)) = uintptr(0) // Iterator to skip through input - var rc int32 = Xsqlite3changeset_start_strm(tls, bp /* &pIter */, xInput, pIn) + var rc int32 = Xsqlite3changeset_start_strm(tls, bp, xInput, pIn) if rc == SQLITE_OK { rc = sessionRebase(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), xOutput, pOut, uintptr(0), uintptr(0)) @@ -173010,7 +173249,7 @@ func Xsqlite3rebaser_rebase_strm(tls *libc.TLS, p uintptr, xInput uintptr, pIn u } // Destroy a rebaser object -func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:214189:17: */ +func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:214229:17: */ if p != 0 { sessionDeleteTable(tls, uintptr(0), (*Sqlite3_rebaser)(unsafe.Pointer(p)).Fgrp.FpList) Xsqlite3_free(tls, p) @@ -173018,7 +173257,7 @@ func Xsqlite3rebaser_delete(tls *libc.TLS, p uintptr) { /* sqlite3.c:214189:17: } // Global configuration -func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:214199:16: */ +func Xsqlite3session_config(tls *libc.TLS, op int32, pArg uintptr) int32 { /* sqlite3.c:214239:16: */ var rc int32 = SQLITE_OK switch op { case SQLITE_SESSION_CONFIG_STRMSIZE: @@ -173106,7 +173345,7 @@ type Fts5Global1 = struct { FpTok uintptr FpDfltTok uintptr FpCsr uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ //************* End of sqlite3session.c ************************************* //************* Begin file fts5.c ******************************************* @@ -173168,13 +173407,13 @@ type Fts5Global1 = struct { // Mark a function parameter as unused, to suppress nuisance compiler // warnings. -type Fts5Global = Fts5Global1 /* sqlite3.c:214930:27 */ +type Fts5Global = Fts5Global1 /* sqlite3.c:214970:27 */ type Fts5Colset1 = struct { FnCol int32 FaiCol [1]int32 -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5Colset = Fts5Colset1 /* sqlite3.c:214931:27 */ +type Fts5Colset = Fts5Colset1 /* sqlite3.c:214971:27 */ // ************************************************************************* // @@ -173209,14 +173448,14 @@ type Fts5Config1 = struct { FzRank uintptr FzRankArgs uintptr FpzErrmsg uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ // ************************************************************************* // // Interface to code in fts5_config.c. fts5_config.c contains contains code // to parse the arguments passed to the CREATE VIRTUAL TABLE statement. -type Fts5Config = Fts5Config1 /* sqlite3.c:214951:27 */ +type Fts5Config = Fts5Config1 /* sqlite3.c:214991:27 */ // // End of interface to code in fts5_config.c. @@ -173231,7 +173470,7 @@ type Fts5Buffer1 = struct { Fp uintptr Fn int32 FnSpace int32 -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ // // End of interface to code in fts5_config.c. @@ -173242,7 +173481,7 @@ type Fts5Buffer1 = struct { // Interface to code in fts5_buffer.c. // Buffer object for the incremental building of string data. -type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:215077:27 */ +type Fts5Buffer = Fts5Buffer1 /* sqlite3.c:215117:27 */ type Fts5PoslistReader1 = struct { Fa uintptr @@ -173252,19 +173491,19 @@ type Fts5PoslistReader1 = struct { FbEof U8 F__ccgo_pad1 [2]byte FiPos I64 -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:215113:34 */ +type Fts5PoslistReader = Fts5PoslistReader1 /* sqlite3.c:215153:34 */ -type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:215132:9 */ +type Fts5PoslistWriter1 = struct{ FiPrev I64 } /* sqlite3.c:215172:9 */ -type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:215132:34 */ +type Fts5PoslistWriter = Fts5PoslistWriter1 /* sqlite3.c:215172:34 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:215154:9 */ +type Fts5Termset1 = struct{ FapHash [512]uintptr } /* sqlite3.c:215194:9 */ // Bucket of terms object used by the integrity-check in offsets=0 mode. -type Fts5Termset = Fts5Termset1 /* sqlite3.c:215154:28 */ +type Fts5Termset = Fts5Termset1 /* sqlite3.c:215194:28 */ // // End of interface to code in fts5_buffer.c. @@ -173294,7 +173533,7 @@ type Fts5Index1 = struct { FpDataVersion uintptr FiStructVersion I64 FpStruct uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ // // End of interface to code in fts5_buffer.c. @@ -173305,16 +173544,16 @@ type Fts5Index1 = struct { // Interface to code in fts5_index.c. fts5_index.c contains contains code // to access the data stored in the %_data table. -type Fts5Index = Fts5Index1 /* sqlite3.c:215168:26 */ +type Fts5Index = Fts5Index1 /* sqlite3.c:215208:26 */ type Fts5IndexIter1 = struct { FiRowid I64 FpData uintptr FnData int32 FbEof U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:215169:30 */ +type Fts5IndexIter = Fts5IndexIter1 /* sqlite3.c:215209:30 */ // // End of interface to code in fts5_varint.c. @@ -173329,7 +173568,7 @@ type Fts5Table1 = struct { Fbase Sqlite3_vtab FpConfig uintptr FpIndex uintptr -} /* sqlite3.c:215371:9 */ +} /* sqlite3.c:215411:9 */ // // End of interface to code in fts5_varint.c. @@ -173340,7 +173579,7 @@ type Fts5Table1 = struct { // Interface to code in fts5_main.c. // Virtual-table object. -type Fts5Table = Fts5Table1 /* sqlite3.c:215371:26 */ +type Fts5Table = Fts5Table1 /* sqlite3.c:215411:26 */ // // End of interface to code in fts5.c. @@ -173356,7 +173595,7 @@ type Fts5Hash1 = struct { FnSlot int32 FpScan uintptr FaSlot uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ // // End of interface to code in fts5.c. @@ -173365,7 +173604,7 @@ type Fts5Hash1 = struct { // ************************************************************************* // // Interface to code in fts5_hash.c. -type Fts5Hash = Fts5Hash1 /* sqlite3.c:215397:25 */ +type Fts5Hash = Fts5Hash1 /* sqlite3.c:215437:25 */ // // End of interface to code in fts5_hash.c. @@ -173383,7 +173622,7 @@ type Fts5Storage1 = struct { FnTotalRow I64 FaTotalSize uintptr FaStmt [11]uintptr -} /* sqlite3.c:215453:9 */ +} /* sqlite3.c:215493:9 */ // // End of interface to code in fts5_hash.c. @@ -173394,7 +173633,7 @@ type Fts5Storage1 = struct { // Interface to code in fts5_storage.c. fts5_storage.c contains contains // code to access the data stored in the %_content and %_docsize tables. -type Fts5Storage = Fts5Storage1 /* sqlite3.c:215453:28 */ +type Fts5Storage = Fts5Storage1 /* sqlite3.c:215493:28 */ // // End of interface to code in fts5_storage.c. @@ -173410,7 +173649,7 @@ type Fts5Expr1 = struct { FbDesc int32 FnPhrase int32 FapExprPhrase uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ // // End of interface to code in fts5_storage.c. @@ -173419,7 +173658,7 @@ type Fts5Expr1 = struct { // ************************************************************************* // // Interface to code in fts5_expr.c. -type Fts5Expr = Fts5Expr1 /* sqlite3.c:215496:25 */ +type Fts5Expr = Fts5Expr1 /* sqlite3.c:215536:25 */ type Fts5ExprNode1 = struct { FeType int32 FbEof int32 @@ -173429,9 +173668,9 @@ type Fts5ExprNode1 = struct { FpNear uintptr FnChild int32 FapChild [1]uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:215497:29 */ +type Fts5ExprNode = Fts5ExprNode1 /* sqlite3.c:215537:29 */ type Fts5Parse1 = struct { FpConfig uintptr FzErr uintptr @@ -173440,39 +173679,39 @@ type Fts5Parse1 = struct { FapPhrase uintptr FpExpr uintptr FbPhraseToAnd int32 -} /* sqlite3.c:215498:9 */ +} /* sqlite3.c:215538:9 */ -type Fts5Parse = Fts5Parse1 /* sqlite3.c:215498:26 */ +type Fts5Parse = Fts5Parse1 /* sqlite3.c:215538:26 */ type Fts5Token1 = struct { Fp uintptr Fn int32 -} /* sqlite3.c:215499:9 */ +} /* sqlite3.c:215539:9 */ -type Fts5Token = Fts5Token1 /* sqlite3.c:215499:26 */ +type Fts5Token = Fts5Token1 /* sqlite3.c:215539:26 */ type Fts5ExprPhrase1 = struct { FpNode uintptr Fposlist Fts5Buffer FnTerm int32 FaTerm [1]Fts5ExprTerm -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:215500:31 */ +type Fts5ExprPhrase = Fts5ExprPhrase1 /* sqlite3.c:215540:31 */ type Fts5ExprNearset1 = struct { FnNear int32 FpColset uintptr FnPhrase int32 FapPhrase [1]uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:215501:32 */ +type Fts5ExprNearset = Fts5ExprNearset1 /* sqlite3.c:215541:32 */ type Fts5PoslistPopulator1 = struct { Fwriter Fts5PoslistWriter FbOk int32 FbMiss int32 -} /* sqlite3.c:215549:9 */ +} /* sqlite3.c:215589:9 */ -type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:215549:37 */ +type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:215589:37 */ // // End of interface to code in fts5_unicode2.c. // @@ -173576,7 +173815,7 @@ type Fts5PoslistPopulator = Fts5PoslistPopulator1 /* sqlite3.c:215549:37 */ type Fts5YYMINORTYPE = struct { Ffts5yyinit int32 F__ccgo_pad1 [4]byte -} /* sqlite3.c:215825:3 */ +} /* sqlite3.c:215865:3 */ //************ End control #defines ****************************************** // Define the fts5yytestcase() macro to be a no-op if is not already defined @@ -173649,7 +173888,7 @@ var fts5yy_action = [105]uint8{ /* 80 */ uint8(5), uint8(3), uint8(63), uint8(5), uint8(3), uint8(62), uint8(12), uint8(2), uint8(86), uint8(13), /* 90 */ uint8(9), uint8(30), uint8(10), uint8(10), uint8(54), uint8(57), uint8(75), uint8(78), uint8(78), uint8(53), /* 100 */ uint8(57), uint8(15), uint8(82), uint8(82), uint8(71), -} /* sqlite3.c:215918:31 */ +} /* sqlite3.c:215958:31 */ var fts5yy_lookahead = [121]uint8{ /* 0 */ uint8(16), uint8(17), uint8(18), uint8(19), uint8(20), uint8(22), uint8(22), uint8(24), uint8(24), uint8(17), /* 10 */ uint8(18), uint8(19), uint8(20), uint8(7), uint8(22), uint8(9), uint8(24), uint8(17), uint8(18), uint8(19), @@ -173664,23 +173903,23 @@ var fts5yy_lookahead = [121]uint8{ /* 100 */ uint8(9), uint8(9), uint8(27), uint8(27), uint8(11), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 110 */ uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), uint8(27), /* 120 */ uint8(27), -} /* sqlite3.c:215931:29 */ +} /* sqlite3.c:215971:29 */ var fts5yy_shift_ofst = [35]uint8{ /* 0 */ uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(44), uint8(51), uint8(77), uint8(43), uint8(12), /* 10 */ uint8(14), uint8(83), uint8(82), uint8(14), uint8(23), uint8(23), uint8(31), uint8(31), uint8(71), uint8(74), /* 20 */ uint8(78), uint8(81), uint8(86), uint8(91), uint8(6), uint8(53), uint8(53), uint8(60), uint8(64), uint8(68), /* 30 */ uint8(53), uint8(87), uint8(92), uint8(53), uint8(93), -} /* sqlite3.c:215949:28 */ +} /* sqlite3.c:215989:28 */ var fts5yy_reduce_ofst = [18]int8{ /* 0 */ int8(-16), int8(-8), int8(0), int8(9), int8(17), int8(25), int8(46), int8(-17), int8(-17), int8(37), /* 10 */ int8(67), int8(4), int8(4), int8(8), int8(4), int8(20), int8(27), int8(38), -} /* sqlite3.c:215958:26 */ +} /* sqlite3.c:215998:26 */ var fts5yy_default = [35]uint8{ /* 0 */ uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(80), uint8(95), uint8(80), uint8(80), uint8(105), /* 10 */ uint8(80), uint8(110), uint8(110), uint8(80), uint8(110), uint8(110), uint8(80), uint8(80), uint8(80), uint8(80), /* 20 */ uint8(80), uint8(91), uint8(80), uint8(80), uint8(80), uint8(101), uint8(100), uint8(80), uint8(80), uint8(90), /* 30 */ uint8(103), uint8(80), uint8(80), uint8(104), uint8(80), -} /* sqlite3.c:215962:31 */ +} /* sqlite3.c:216002:31 */ //********* End of lemon-generated parsing tables **************************** // The next table maps tokens (terminal symbols) into fallback tokens. @@ -173717,9 +173956,9 @@ type fts5yyStackEntry = struct { Fmajor uint8 F__ccgo_pad1 [2]byte Fminor Fts5YYMINORTYPE -} /* sqlite3.c:216005:1 */ +} /* sqlite3.c:216045:1 */ -type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:216012:33 */ +type Fts5yyStackEntry = fts5yyStackEntry /* sqlite3.c:216052:33 */ // The state of the parser is completely contained in an instance of // the following structure @@ -173728,9 +173967,9 @@ type fts5yyParser = struct { FpParse uintptr Ffts5yystack [100]Fts5yyStackEntry Ffts5yystackEnd uintptr -} /* sqlite3.c:216016:1 */ +} /* sqlite3.c:216056:1 */ -type Fts5yyParser = fts5yyParser /* sqlite3.c:216035:29 */ +type Fts5yyParser = fts5yyParser /* sqlite3.c:216075:29 */ // #include <assert.h> @@ -173740,7 +173979,7 @@ type Fts5yyParser = fts5yyParser /* sqlite3.c:216035:29 */ // grammar. // Initialize a new parser that has already been allocated. -func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:216184:13: */ +func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3.c:216224:13: */ var fts5yypParser uintptr = fts5yypRawParser (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos = fts5yypParser + 8 /* &.fts5yystack */ @@ -173759,7 +173998,7 @@ func sqlite3Fts5ParserInit(tls *libc.TLS, fts5yypRawParser uintptr) { /* sqlite3 // Outputs: // A pointer to a parser. This pointer is used in subsequent calls // to sqlite3Fts5Parser and sqlite3Fts5ParserFree. -func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:216223:13: */ +func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqlite3.c:216263:13: */ var fts5yypParser uintptr fts5yypParser = (*struct{ f func(*libc.TLS, U64) uintptr })(unsafe.Pointer(&struct{ uintptr }{mallocProc})).f(tls, U64(unsafe.Sizeof(Fts5yyParser{}))) if fts5yypParser != 0 { @@ -173775,7 +174014,7 @@ func sqlite3Fts5ParserAlloc(tls *libc.TLS, mallocProc uintptr) uintptr { /* sqli // a pointer to the value to be deleted. The code used to do the // deletions is derived from the %destructor and/or %token_destructor // directives of the input grammar. -func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:216242:13: */ +func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, fts5yypminor uintptr) { /* sqlite3.c:216282:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse _ = pParse @@ -173833,7 +174072,7 @@ func fts5yy_destructor(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor uint8, // // If there is a destructor routine associated with the token which // is popped from the stack, then call it. -func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:216301:13: */ +func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:216341:13: */ var fts5yytos uintptr fts5yytos = libc.PostDecUintptr(&(*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos, 12) @@ -173841,7 +174080,7 @@ func fts5yy_pop_parser_stack(tls *libc.TLS, pParser uintptr) { /* sqlite3.c:2163 } // Clear all secondary memory allocations from the parser -func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:216319:13: */ +func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:216359:13: */ var pParser uintptr = p for (*Fts5yyParser)(unsafe.Pointer(pParser)).Ffts5yytos > pParser+8 { fts5yy_pop_parser_stack(tls, pParser) @@ -173854,7 +174093,7 @@ func sqlite3Fts5ParserFinalize(tls *libc.TLS, p uintptr) { /* sqlite3.c:216319:1 // If the fts5YYPARSEFREENEVERNULL macro exists (for example because it // is defined in a %include section of the input grammar) then it is // assumed that the input pointer is never NULL. -func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:216336:13: */ +func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqlite3.c:216376:13: */ if p == uintptr(0) { return } @@ -173878,7 +174117,7 @@ func sqlite3Fts5ParserFree(tls *libc.TLS, p uintptr, freeProc uintptr) { /* sqli // Find the appropriate action for a parser given the terminal // look-ahead token iLookAhead. -func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:216399:25: */ +func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) uint8 { /* sqlite3.c:216439:25: */ var i int32 if int32(stateno) > Fts5YY_MAX_SHIFT { @@ -173902,7 +174141,7 @@ func fts5yy_find_shift_action(tls *libc.TLS, iLookAhead uint8, stateno uint8) ui // Find the appropriate action for a parser given the non-terminal // look-ahead token iLookAhead. -func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:216464:25: */ +func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) uint8 { /* sqlite3.c:216504:25: */ var i int32 i = int32(fts5yy_reduce_ofst[stateno]) @@ -173913,7 +174152,7 @@ func fts5yy_find_reduce_action(tls *libc.TLS, stateno uint8, iLookAhead uint8) u } // The following routine is called if the stack overflows. -func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:216493:13: */ +func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:216533:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse for (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > fts5yypParser+8 { @@ -173923,7 +174162,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // stack every overflows //******* Begin %stack_overflow code ***************************************** - sqlite3Fts5ParseError(tls, pParse, ts+33242 /* "fts5: parser sta..." */, 0) + sqlite3Fts5ParseError(tls, pParse, ts+33411, 0) //******* End %stack_overflow code ******************************************* (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument var @@ -173932,7 +174171,7 @@ func fts5yyStackOverflow(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:21 // Print tracing information for a SHIFT action // Perform a shift action. -func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:216536:13: */ +func fts5yy_shift(tls *libc.TLS, fts5yypParser uintptr, fts5yyNewState uint8, fts5yyMajor uint8, fts5yyMinor Fts5Token) { /* sqlite3.c:216576:13: */ var fts5yytos uintptr (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos += 12 if (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yytos > (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).Ffts5yystackEnd { @@ -173981,7 +174220,7 @@ var fts5yyRuleInfoLhs = [28]uint8{ uint8(24), // (25) phrase ::= STRING star_opt uint8(26), // (26) star_opt ::= STAR uint8(26), // (27) star_opt ::= -} /* sqlite3.c:216577:29 */ +} /* sqlite3.c:216617:29 */ // For rule J, fts5yyRuleInfoNRhs[J] contains the negative of the number // of symbols on the right-hand side of that rule. @@ -174014,7 +174253,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ int8(-2), // (25) phrase ::= STRING star_opt int8(-1), // (26) star_opt ::= STAR int8(0), // (27) star_opt ::= -} /* sqlite3.c:216610:26 */ +} /* sqlite3.c:216650:26 */ // Forward Declaration @@ -174026,7 +174265,7 @@ var fts5yyRuleInfoNRhs = [28]int8{ // if the lookahead token has already been consumed. As this procedure is // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. -func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:216653:25: */ +func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, fts5yyLookahead int32, fts5yyLookaheadToken Fts5Token) uint8 { /* sqlite3.c:216693:25: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174067,9 +174306,9 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft break case uint32(3): /* colset ::= STRING */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseColset(tls, pParse, uintptr(0), fts5yymsp+4) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseColset(tls, pParse, uintptr(0), fts5yymsp+4) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(4): /* colset ::= MINUS STRING */ { @@ -174079,40 +174318,40 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft break case uint32(5): /* colsetlist ::= colsetlist STRING */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseColset(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)), fts5yymsp+4) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseColset(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)), fts5yymsp+4) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(6): /* colsetlist ::= STRING */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseColset(tls, pParse, uintptr(0), fts5yymsp+4) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseColset(tls, pParse, uintptr(0), fts5yymsp+4) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(7): /* expr ::= expr AND expr */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_AND, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)), uintptr(0)) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_AND, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)), uintptr(0)) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(8): /* expr ::= expr OR expr */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_OR, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)), uintptr(0)) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_OR, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)), uintptr(0)) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(9): /* expr ::= expr NOT expr */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_NOT, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)), uintptr(0)) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_NOT, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)), uintptr(0)) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(10): /* expr ::= colset COLON LP expr RP */ { sqlite3Fts5ParseSetColset(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-4)*12 + 4))) - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) + *(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(11): /* expr ::= LP expr RP */ { @@ -174123,34 +174362,34 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft fallthrough // expr ::= exprlist case uint32(13): /* exprlist ::= cnearset */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) + *(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(14): /* exprlist ::= exprlist cnearset */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseImplicitAnd(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseImplicitAnd(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(15): /* cnearset ::= nearset */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_STRING, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_STRING, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(16): /* cnearset ::= colset COLON nearset */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_STRING, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) - sqlite3Fts5ParseSetColset(tls, pParse, *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)), *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4))) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNode(tls, pParse, FTS5_STRING, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) + sqlite3Fts5ParseSetColset(tls, pParse, *(*uintptr)(unsafe.Pointer(bp)), *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4))) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(17): /* nearset ::= phrase */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseNearset(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNearset(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(18): /* nearset ::= CARET phrase */ { @@ -174162,21 +174401,21 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft { sqlite3Fts5ParseNear(tls, pParse, fts5yymsp+libc.UintptrFromInt32(-4)*12+4) sqlite3Fts5ParseSetDistance(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)), fts5yymsp+libc.UintptrFromInt32(-1)*12+4) - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) + *(*uintptr)(unsafe.Pointer(bp)) = *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-2)*12 + 4)) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-4)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(20): /* nearphrases ::= phrase */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseNearset(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNearset(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(21): /* nearphrases ::= nearphrases phrase */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseNearset(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseNearset(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)), *(*uintptr)(unsafe.Pointer(fts5yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(22): /* neardist_opt ::= */ { @@ -174191,15 +174430,15 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft break case uint32(24): /* phrase ::= phrase PLUS STRING star_opt */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-3)*12 + 4)), fts5yymsp+libc.UintptrFromInt32(-1)*12+4, *(*int32)(unsafe.Pointer(fts5yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseTerm(tls, pParse, *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-3)*12 + 4)), fts5yymsp+libc.UintptrFromInt32(-1)*12+4, *(*int32)(unsafe.Pointer(fts5yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-3)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-3)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(25): /* phrase ::= STRING star_opt */ { - *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) = sqlite3Fts5ParseTerm(tls, pParse, uintptr(0), fts5yymsp+libc.UintptrFromInt32(-1)*12+4, *(*int32)(unsafe.Pointer(fts5yymsp + 4))) + *(*uintptr)(unsafe.Pointer(bp)) = sqlite3Fts5ParseTerm(tls, pParse, uintptr(0), fts5yymsp+libc.UintptrFromInt32(-1)*12+4, *(*int32)(unsafe.Pointer(fts5yymsp + 4))) } - *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp /* &fts5yylhsminor */)) + *(*uintptr)(unsafe.Pointer(fts5yymsp + libc.UintptrFromInt32(-1)*12 + 4)) = *(*uintptr)(unsafe.Pointer(bp)) break case uint32(26): /* star_opt ::= STAR */ { @@ -174236,7 +174475,7 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when the parse fails // The following code executes when a syntax error first occurs. -func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:216871:13: */ +func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:216911:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174246,14 +174485,14 @@ func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32 _ = fts5yymajor // Silence a compiler warning sqlite3Fts5ParseError(tls, - pParse, ts+33270 /* "fts5: syntax err..." */, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) + pParse, ts+33439, libc.VaList(bp, fts5yyminor.Fn, fts5yyminor.Fp)) //*********** End %syntax_error code ***************************************** (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse = pParse // Suppress warning about unused %extra_argument variable } // The following is executed when the parser accepts -func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:216893:13: */ +func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:216933:13: */ var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse // Here code is inserted which will be executed whenever the @@ -174282,7 +174521,7 @@ func fts5yy_accept(tls *libc.TLS, fts5yypParser uintptr) { /* sqlite3.c:216893:1 // // Outputs: // None. -func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:216934:13: */ +func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yyminor Fts5Token, pParse uintptr) { /* sqlite3.c:216974:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -174320,7 +174559,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy return } else { - *(*Fts5Token)(unsafe.Pointer(bp /* &fts5yyminorunion */)) = fts5yyminor + *(*Fts5Token)(unsafe.Pointer(bp)) = fts5yyminor // If the fts5YYNOERRORRECOVERY macro is defined, then do not attempt to // do any kind of error recovery. Instead, simply invoke the syntax // error routine and continue going as if nothing had happened. @@ -174328,7 +174567,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Applications can set this macro (for example inside %include) if // they intend to abandon the parse upon the first syntax error seen. fts5yy_syntax_error(tls, fts5yypParser, fts5yymajor, fts5yyminor) - fts5yy_destructor(tls, fts5yypParser, uint8(fts5yymajor), bp /* &fts5yyminorunion */) + fts5yy_destructor(tls, fts5yypParser, uint8(fts5yymajor), bp) break } } @@ -174337,7 +174576,7 @@ func sqlite3Fts5Parser(tls *libc.TLS, fts5yyp uintptr, fts5yymajor int32, fts5yy // Return the fallback token corresponding to canonical token iToken, or // 0 if iToken has no fallback. -func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:217151:12: */ +func sqlite3Fts5ParserFallback(tls *libc.TLS, iToken int32) int32 { /* sqlite3.c:217191:12: */ _ = iToken return 0 } @@ -174399,7 +174638,7 @@ type CInstIter1 = struct { FnInst int32 FiStart int32 FiEnd int32 -} /* sqlite3.c:217197:9 */ +} /* sqlite3.c:217237:9 */ // 2014 May 31 // @@ -174450,11 +174689,11 @@ type CInstIter1 = struct { // printf("instance starts at %d, ends at %d\n", iter.iStart, iter.iEnd); // } // -type CInstIter = CInstIter1 /* sqlite3.c:217197:26 */ +type CInstIter = CInstIter1 /* sqlite3.c:217237:26 */ // Advance the iterator to the next coalesced phrase instance. Return // an SQLite error code if an error occurs, or SQLITE_OK otherwise. -func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217214:12: */ +func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217254:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -174497,7 +174736,7 @@ func fts5CInstIterNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:217214 // Initialize the iterator object indicated by the final parameter to // iterate through coalesced phrase instances in column iCol. -func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:217245:12: */ +func fts5CInstIterInit(tls *libc.TLS, pApi uintptr, pFts uintptr, iCol int32, pIter uintptr) int32 { /* sqlite3.c:217285:12: */ var rc int32 libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(CInstIter{}))) @@ -174529,12 +174768,12 @@ type HighlightContext1 = struct { FnIn int32 FiOff int32 FzOut uintptr -} /* sqlite3.c:217271:9 */ +} /* sqlite3.c:217311:9 */ // ************************************************************************ // // Start of highlight() implementation. -type HighlightContext = HighlightContext1 /* sqlite3.c:217271:33 */ +type HighlightContext = HighlightContext1 /* sqlite3.c:217311:33 */ // Append text to the HighlightContext output string - p->zOut. Argument // z points to a buffer containing n bytes of text to append. If n is @@ -174543,7 +174782,7 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:217271:33 */ // If *pRc is set to any value other than SQLITE_OK when this function is // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. -func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:217294:13: */ +func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:217334:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -174551,7 +174790,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int if n < 0 { n = int32(libc.Xstrlen(tls, z)) } - (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33301 /* "%z%.*s" */, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) + (*HighlightContext)(unsafe.Pointer(p)).FzOut = Xsqlite3_mprintf(tls, ts+33470, libc.VaList(bp, (*HighlightContext)(unsafe.Pointer(p)).FzOut, n, z)) if (*HighlightContext)(unsafe.Pointer(p)).FzOut == uintptr(0) { *(*int32)(unsafe.Pointer(pRc)) = SQLITE_NOMEM } @@ -174559,7 +174798,7 @@ func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int } // Tokenizer callback used by implementation of highlight() function. -func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:217309:12: */ +func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:217349:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -174585,17 +174824,17 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } if iPos == (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiStart { - fts5HighlightAppend(tls, bp /* &rc */, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iStartOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) - fts5HighlightAppend(tls, bp /* &rc */, p, (*HighlightContext)(unsafe.Pointer(p)).FzOpen, -1) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iStartOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzOpen, -1) (*HighlightContext)(unsafe.Pointer(p)).FiOff = iStartOff } if iPos == (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiEnd { if (*HighlightContext)(unsafe.Pointer(p)).FiRangeEnd != 0 && (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiStart < (*HighlightContext)(unsafe.Pointer(p)).FiRangeStart { - fts5HighlightAppend(tls, bp /* &rc */, p, (*HighlightContext)(unsafe.Pointer(p)).FzOpen, -1) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzOpen, -1) } - fts5HighlightAppend(tls, bp /* &rc */, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iEndOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) - fts5HighlightAppend(tls, bp /* &rc */, p, (*HighlightContext)(unsafe.Pointer(p)).FzClose, -1) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iEndOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzClose, -1) (*HighlightContext)(unsafe.Pointer(p)).FiOff = iEndOff if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp /* rc */)) = fts5CInstIterNext(tls, p) @@ -174603,10 +174842,10 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } if (*HighlightContext)(unsafe.Pointer(p)).FiRangeEnd > 0 && iPos == (*HighlightContext)(unsafe.Pointer(p)).FiRangeEnd { - fts5HighlightAppend(tls, bp /* &rc */, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iEndOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(p)).FiOff), iEndOff-(*HighlightContext)(unsafe.Pointer(p)).FiOff) (*HighlightContext)(unsafe.Pointer(p)).FiOff = iEndOff if iPos >= (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiStart && iPos < (*HighlightContext)(unsafe.Pointer(p)).Fiter.FiEnd { - fts5HighlightAppend(tls, bp /* &rc */, p, (*HighlightContext)(unsafe.Pointer(p)).FzClose, -1) + fts5HighlightAppend(tls, bp, p, (*HighlightContext)(unsafe.Pointer(p)).FzClose, -1) } } @@ -174614,7 +174853,7 @@ func fts5HighlightCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintp } // Implementation of highlight() function. -func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:217363:13: */ +func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:217403:13: */ bp := tls.Alloc(68) defer tls.Free(68) @@ -174625,13 +174864,13 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp var iCol int32 if nVal != 3 { - var zErr uintptr = ts + 33308 /* "wrong number of ..." */ + var zErr uintptr = ts + 33477 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal))) - libc.Xmemset(tls, bp /* &ctx */, 0, uint32(unsafe.Sizeof(HighlightContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(HighlightContext{}))) (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOpen = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*4))) (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzClose = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + 2*4))) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = (*struct { @@ -174650,7 +174889,7 @@ func fts5HighlightFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintp f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5HighlightCb}))) } - fts5HighlightAppend(tls, bp+64 /* &rc */, bp /* &ctx */, (*HighlightContext)(unsafe.Pointer(bp)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(bp)).FiOff), (*HighlightContext)(unsafe.Pointer(bp)).FnIn-(*HighlightContext)(unsafe.Pointer(bp)).FiOff) + fts5HighlightAppend(tls, bp+64, bp, (*HighlightContext)(unsafe.Pointer(bp)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(bp)).FiOff), (*HighlightContext)(unsafe.Pointer(bp)).FnIn-(*HighlightContext)(unsafe.Pointer(bp)).FiOff) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { Xsqlite3_result_text(tls, pCtx, (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOut, -1, libc.UintptrFromInt32(-1)) @@ -174673,19 +174912,19 @@ type Fts5SFinder1 = struct { FnFirst int32 FaFirst uintptr FzDoc uintptr -} /* sqlite3.c:217412:9 */ +} /* sqlite3.c:217452:9 */ // // End of highlight() implementation. // // Context object passed to the fts5SentenceFinderCb() function. -type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:217412:28 */ +type Fts5SFinder = Fts5SFinder1 /* sqlite3.c:217452:28 */ // Add an entry to the Fts5SFinder.aFirst[] array. Grow the array if // necessary. Return SQLITE_OK if successful, or SQLITE_NOMEM if an // error occurs. -func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:217426:12: */ +func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqlite3.c:217466:12: */ if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc == (*Fts5SFinder)(unsafe.Pointer(p)).FnFirst { var nNew int32 if (*Fts5SFinder)(unsafe.Pointer(p)).FnFirstAlloc != 0 { @@ -174709,7 +174948,7 @@ func fts5SentenceFinderAdd(tls *libc.TLS, p uintptr, iAdd int32) int32 { /* sqli // This function is an xTokenize() callback used by the auxiliary snippet() // function. Its job is to identify tokens that are the first in a sentence. // For each such token, an entry is added to the SFinder.aFirst[] array. -func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:217445:12: */ +func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iStartOff int32, iEndOff int32) int32 { /* sqlite3.c:217485:12: */ var rc int32 = SQLITE_OK _ = pToken @@ -174738,7 +174977,7 @@ func fts5SentenceFinderCb(tls *libc.TLS, pContext uintptr, tflags int32, pToken return rc } -func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:217478:12: */ +func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, aSeen uintptr, iCol int32, iPos int32, nToken int32, pnScore uintptr, piPos uintptr) int32 { /* sqlite3.c:217518:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -174796,16 +175035,16 @@ func fts5SnippetScore(tls *libc.TLS, pApi uintptr, pFts uintptr, nDocsize int32, // Return the value in pVal interpreted as utf-8 text. Except, if pVal // contains a NULL value, return a pointer to a static string zero // bytes in length instead of a NULL pointer. -func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:217527:19: */ +func fts5ValueToText(tls *libc.TLS, pVal uintptr) uintptr { /* sqlite3.c:217567:19: */ var zRet uintptr = Xsqlite3_value_text(tls, pVal) if zRet != 0 { return zRet } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ } // Implementation of snippet() function. -func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:217535:13: */ +func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:217575:13: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -174828,7 +175067,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr var nCol int32 if nVal != 5 { - var zErr uintptr = ts + 33358 /* "wrong number of ..." */ + var zErr uintptr = ts + 33527 /* "wrong number of ..." */ Xsqlite3_result_error(tls, pCtx, zErr, -1) return } @@ -174836,7 +175075,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr nCol = (*struct { f func(*libc.TLS, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxColumnCount})).f(tls, pFts) - libc.Xmemset(tls, bp /* &ctx */, 0, uint32(unsafe.Sizeof(HighlightContext{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(HighlightContext{}))) iCol = Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal))) (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzOpen = fts5ValueToText(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*4))) (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FzClose = fts5ValueToText(tls, *(*uintptr)(unsafe.Pointer(apVal + 2*4))) @@ -174862,7 +175101,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxInstCount})).f(tls, pFts, bp+64 /* &nInst */) } - libc.Xmemset(tls, bp+68 /* &sFinder */, 0, uint32(unsafe.Sizeof(Fts5SFinder{}))) + libc.Xmemset(tls, bp+68, 0, uint32(unsafe.Sizeof(Fts5SFinder{}))) for i = 0; i < nCol; i++ { if iCol < 0 || iCol == i { // var nDoc int32 at bp+88, 4 @@ -174881,7 +175120,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr *(*int32)(unsafe.Pointer(bp + 120 /* rc */)) = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExtensionApi)(unsafe.Pointer(pApi)).FxTokenize})).f(tls, pFts, - (*Fts5SFinder)(unsafe.Pointer(bp+68 /* &sFinder */)).FzDoc, *(*int32)(unsafe.Pointer(bp + 88 /* nDoc */)), bp+68 /* &sFinder */, *(*uintptr)(unsafe.Pointer(&struct { + (*Fts5SFinder)(unsafe.Pointer(bp+68 /* &sFinder */)).FzDoc, *(*int32)(unsafe.Pointer(bp + 88 /* nDoc */)), bp+68, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5SentenceFinderCb}))) if *(*int32)(unsafe.Pointer(bp + 120)) != SQLITE_OK { @@ -174921,7 +175160,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr } libc.Xmemset(tls, aSeen, 0, uint32(nPhrase)) *(*int32)(unsafe.Pointer(bp + 120 /* rc */)) = fts5SnippetScore(tls, pApi, pFts, *(*int32)(unsafe.Pointer(bp + 92 /* nDocsize */)), aSeen, i, - *(*int32)(unsafe.Pointer(bp + 104 /* io */)), nToken, bp+108 /* &nScore */, bp+112 /* &iAdj */) + *(*int32)(unsafe.Pointer(bp + 104 /* io */)), nToken, bp+108, bp+112) if *(*int32)(unsafe.Pointer(bp + 120)) == SQLITE_OK && *(*int32)(unsafe.Pointer(bp + 108)) > nBestScore { nBestScore = *(*int32)(unsafe.Pointer(bp + 108 /* nScore */)) iBestCol = i @@ -174939,7 +175178,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr if *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+68)).FaFirst + uintptr(jj)*4)) < *(*int32)(unsafe.Pointer(bp + 104)) { libc.Xmemset(tls, aSeen, 0, uint32(nPhrase)) *(*int32)(unsafe.Pointer(bp + 120 /* rc */)) = fts5SnippetScore(tls, pApi, pFts, *(*int32)(unsafe.Pointer(bp + 92 /* nDocsize */)), aSeen, i, - *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+68 /* &sFinder */)).FaFirst + uintptr(jj)*4)), nToken, bp+108 /* &nScore */, uintptr(0)) + *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+68 /* &sFinder */)).FaFirst + uintptr(jj)*4)), nToken, bp+108, uintptr(0)) *(*int32)(unsafe.Pointer(bp + 108 /* nScore */)) += func() int32 { if *(*int32)(unsafe.Pointer((*Fts5SFinder)(unsafe.Pointer(bp+68)).FaFirst + uintptr(jj)*4)) == 0 { @@ -174978,7 +175217,7 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr (*HighlightContext)(unsafe.Pointer(bp /* &ctx */)).FiRangeEnd = iBestStart + nToken - 1 if iBestStart > 0 { - fts5HighlightAppend(tls, bp+120 /* &rc */, bp /* &ctx */, zEllips, -1) + fts5HighlightAppend(tls, bp+120, bp, zEllips, -1) } // Advance iterator ctx.iter so that it points to the first coalesced @@ -174995,9 +175234,9 @@ func fts5SnippetFunction(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr }{fts5HighlightCb}))) } if (*HighlightContext)(unsafe.Pointer(bp)).FiRangeEnd >= *(*int32)(unsafe.Pointer(bp + 116))-1 { - fts5HighlightAppend(tls, bp+120 /* &rc */, bp /* &ctx */, (*HighlightContext)(unsafe.Pointer(bp)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(bp)).FiOff), (*HighlightContext)(unsafe.Pointer(bp)).FnIn-(*HighlightContext)(unsafe.Pointer(bp)).FiOff) + fts5HighlightAppend(tls, bp+120, bp, (*HighlightContext)(unsafe.Pointer(bp)).FzIn+uintptr((*HighlightContext)(unsafe.Pointer(bp)).FiOff), (*HighlightContext)(unsafe.Pointer(bp)).FnIn-(*HighlightContext)(unsafe.Pointer(bp)).FiOff) } else { - fts5HighlightAppend(tls, bp+120 /* &rc */, bp /* &ctx */, zEllips, -1) + fts5HighlightAppend(tls, bp+120, bp, zEllips, -1) } } if *(*int32)(unsafe.Pointer(bp + 120)) == SQLITE_OK { @@ -175019,17 +175258,17 @@ type Fts5Bm25Data1 = struct { Favgdl float64 FaIDF uintptr FaFreq uintptr -} /* sqlite3.c:217693:9 */ +} /* sqlite3.c:217733:9 */ //********************************************************************** // The first time the bm25() function is called for a query, an instance // of the following structure is allocated and populated. -type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:217693:29 */ +type Fts5Bm25Data = Fts5Bm25Data1 /* sqlite3.c:217733:29 */ // Callback used by fts5Bm25GetData() to count the number of rows in the // table matched by each individual phrase within the query. -func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:217705:12: */ +func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) int32 { /* sqlite3.c:217745:12: */ var pn uintptr = pUserData _ = pApi _ = pFts @@ -175040,7 +175279,7 @@ func fts5CountCb(tls *libc.TLS, pApi uintptr, pFts uintptr, pUserData uintptr) i // Set *ppData to point to the Fts5Bm25Data object for the current query. // If the object has not already been allocated, allocate and populate it // now. -func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:217721:12: */ +func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) int32 { /* sqlite3.c:217761:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175134,7 +175373,7 @@ func fts5Bm25GetData(tls *libc.TLS, pApi uintptr, pFts uintptr, ppData uintptr) } // Implementation of bm25() function. -func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:217794:13: */ +func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:217834:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -175151,7 +175390,7 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n // Calculate the phrase frequency (symbol "f(qi,D)" in the documentation) // for each phrase in the query for the current row. - rc = fts5Bm25GetData(tls, pApi, pFts, bp /* &pData */) + rc = fts5Bm25GetData(tls, pApi, pFts, bp) if rc == SQLITE_OK { aFreq = (*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pData */)))).FaFreq libc.Xmemset(tls, aFreq, 0, uint32(unsafe.Sizeof(float64(0)))*uint32((*Fts5Bm25Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FnPhrase)) @@ -175202,18 +175441,18 @@ func fts5Bm25Function(tls *libc.TLS, pApi uintptr, pFts uintptr, pCtx uintptr, n } } -func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:217850:12: */ +func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:217890:12: */ bp := tls.Alloc(48) defer tls.Free(48) *(*[3]Builtin)(unsafe.Pointer(bp /* aBuiltin */)) = [3]Builtin{ - {FzFunc: ts + 33406 /* "snippet" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33575, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5SnippetFunction}))}, - {FzFunc: ts + 33414 /* "highlight" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33583, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5HighlightFunction}))}, - {FzFunc: ts + 33424 /* "bm25" */, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { + {FzFunc: ts + 33593, FxFunc: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) }{fts5Bm25Function}))}, } @@ -175224,10 +175463,10 @@ func sqlite3Fts5AuxInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:217850 rc = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, Fts5_extension_function, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_api)(unsafe.Pointer(pApi)).FxCreateFunction})).f(tls, pApi, - (*Builtin)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*16)).FzFunc, - (*Builtin)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*16)).FpUserData, - (*Builtin)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*16)).FxFunc, - (*Builtin)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*16)).FxDestroy) + (*Builtin)(unsafe.Pointer(bp+uintptr(i)*16)).FzFunc, + (*Builtin)(unsafe.Pointer(bp+uintptr(i)*16)).FpUserData, + (*Builtin)(unsafe.Pointer(bp+uintptr(i)*16)).FxFunc, + (*Builtin)(unsafe.Pointer(bp+uintptr(i)*16)).FxDestroy) } return rc @@ -175238,7 +175477,7 @@ type Builtin = struct { FpUserData uintptr FxFunc Fts5_extension_function FxDestroy uintptr -} /* sqlite3.c:217851:3 */ +} /* sqlite3.c:217891:3 */ // 2014 May 31 // @@ -175253,7 +175492,7 @@ type Builtin = struct { // #include "fts5Int.h" -func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:217893:12: */ +func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) int32 { /* sqlite3.c:217933:12: */ if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) < nByte { var nNew U64 if (*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace != 0 { @@ -175279,7 +175518,7 @@ func sqlite3Fts5BufferSize(tls *libc.TLS, pRc uintptr, pBuf uintptr, nByte U32) // Encode value iVal as an SQLite varint and append it to the buffer object // pBuf. If an OOM error occurs, set the error code in p. -func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:217917:13: */ +func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVal I64) { /* sqlite3.c:217957:13: */ if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+U32(9) <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { return 0 @@ -175291,21 +175530,21 @@ func sqlite3Fts5BufferAppendVarint(tls *libc.TLS, pRc uintptr, pBuf uintptr, iVa *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iVal)) } -func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:217922:13: */ +func sqlite3Fts5Put32(tls *libc.TLS, aBuf uintptr, iVal int32) { /* sqlite3.c:217962:13: */ *(*U8)(unsafe.Pointer(aBuf)) = U8(iVal >> 24 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 1)) = U8(iVal >> 16 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 2)) = U8(iVal >> 8 & 0x00FF) *(*U8)(unsafe.Pointer(aBuf + 3)) = U8(iVal >> 0 & 0x00FF) } -func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:217929:12: */ +func sqlite3Fts5Get32(tls *libc.TLS, aBuf uintptr) int32 { /* sqlite3.c:217969:12: */ return int32(U32(*(*U8)(unsafe.Pointer(aBuf)))<<24 + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 1)))<<16) + U32(int32(*(*U8)(unsafe.Pointer(aBuf + 2)))<<8) + U32(*(*U8)(unsafe.Pointer(aBuf + 3)))) } // Append buffer nData/pData to buffer pBuf. If an OOM error occurs, set // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:217938:13: */ +func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData U32, pData uintptr) { /* sqlite3.c:217978:13: */ if nData != 0 { if func() int32 { if U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)+nData <= U32((*Fts5Buffer)(unsafe.Pointer(pBuf)).FnSpace) { @@ -175323,7 +175562,7 @@ func sqlite3Fts5BufferAppendBlob(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData // Append the nul-terminated string zStr to the buffer pBuf. This function // ensures that the byte following the buffer data is set to 0x00, even // though this byte is not included in the pBuf->n count. -func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:217956:13: */ +func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zStr uintptr) { /* sqlite3.c:217996:13: */ var nStr int32 = int32(libc.Xstrlen(tls, zStr)) sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nStr+1), zStr) (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn-- @@ -175335,7 +175574,7 @@ func sqlite3Fts5BufferAppendString(tls *libc.TLS, pRc uintptr, pBuf uintptr, zSt // Like sqlite3Fts5BufferAppendString(), this function ensures that the byte // following the buffer data is set to 0x00, even though this byte is not // included in the pBuf->n count. -func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:217974:13: */ +func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:218014:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var zTmp uintptr var ap Va_list @@ -175353,7 +175592,7 @@ func sqlite3Fts5BufferAppendPrintf(tls *libc.TLS, pRc uintptr, pBuf uintptr, zFm } } -func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:217995:13: */ +func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3.c:218035:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var ap Va_list @@ -175369,26 +175608,26 @@ func sqlite3Fts5Mprintf(tls *libc.TLS, pRc uintptr, zFmt uintptr, va uintptr) ui } // Free any buffer allocated by pBuf. Zero the structure before returning. -func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:218013:13: */ +func sqlite3Fts5BufferFree(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:218053:13: */ Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp) libc.Xmemset(tls, pBuf, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) } // Zero the contents of the buffer object. But do not free the associated // memory allocation. -func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:218022:13: */ +func sqlite3Fts5BufferZero(tls *libc.TLS, pBuf uintptr) { /* sqlite3.c:218062:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 } // Set the buffer to contain nData/pData. If an OOM error occurs, leave an // the error code in p. If an error has already occurred when this function // is called, it is a no-op. -func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:218031:13: */ +func sqlite3Fts5BufferSet(tls *libc.TLS, pRc uintptr, pBuf uintptr, nData int32, pData uintptr) { /* sqlite3.c:218071:13: */ (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn = 0 sqlite3Fts5BufferAppendBlob(tls, pRc, pBuf, uint32(nData), pData) } -func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:218041:12: */ +func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piOff uintptr) int32 { /* sqlite3.c:218081:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175450,14 +175689,14 @@ func sqlite3Fts5PoslistNext64(tls *libc.TLS, a uintptr, n int32, pi uintptr, piO // Advance the iterator object passed as the only argument. Return true // if the iterator reaches EOF, or false otherwise. -func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:218084:12: */ +func sqlite3Fts5PoslistReaderNext(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:218124:12: */ if sqlite3Fts5PoslistNext64(tls, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa, (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn, pIter+8, pIter+16) != 0 { (*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof = U8(1) } return int32((*Fts5PoslistReader)(unsafe.Pointer(pIter)).FbEof) } -func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:218091:12: */ +func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintptr) int32 { /* sqlite3.c:218131:12: */ libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(Fts5PoslistReader{}))) (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fa = a (*Fts5PoslistReader)(unsafe.Pointer(pIter)).Fn = n @@ -175469,7 +175708,7 @@ func sqlite3Fts5PoslistReaderInit(tls *libc.TLS, a uintptr, n int32, pIter uintp // pBuf, which must be already be large enough to hold the new data. // The previous position written to this list is *piPrev. *piPrev is set // to iPos before returning. -func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:218108:13: */ +func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, iPos I64) { /* sqlite3.c:218148:13: */ if iPos >= *(*I64)(unsafe.Pointer(piPrev)) { if iPos&colmask != *(*I64)(unsafe.Pointer(piPrev))&colmask { *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp + uintptr(libc.PostIncInt32(&(*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, 1)))) = U8(1) @@ -175481,9 +175720,9 @@ func sqlite3Fts5PoslistSafeAppend(tls *libc.TLS, pBuf uintptr, piPrev uintptr, i } } -var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:218114:22 */ +var colmask I64 = I64(int64(0x7FFFFFFF)) << 32 /* sqlite3.c:218154:22 */ -func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:218125:12: */ +func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr, iPos I64) int32 { /* sqlite3.c:218165:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175500,7 +175739,7 @@ func sqlite3Fts5PoslistWriterAppend(tls *libc.TLS, pBuf uintptr, pWriter uintptr return SQLITE_OK } -func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:218136:13: */ +func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:218176:13: */ var pRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { pRet = Xsqlite3_malloc64(tls, uint64(nByte)) @@ -175521,7 +175760,7 @@ func sqlite3Fts5MallocZero(tls *libc.TLS, pRc uintptr, nByte Sqlite3_int64) uint // // It is the responsibility of the caller to eventually free the returned // buffer using sqlite3_free(). If an OOM error occurs, NULL is returned. -func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:218157:13: */ +func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uintptr { /* sqlite3.c:218197:13: */ var zRet uintptr = uintptr(0) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { if nIn < 0 { @@ -175546,7 +175785,7 @@ func sqlite3Fts5Strndup(tls *libc.TLS, pRc uintptr, pIn uintptr, nIn int32) uint // * The 10 integer ASCII characters. // * The underscore character "_" (0x5F). // * The unicode "subsitute" character (0x1A). -func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:218185:12: */ +func sqlite3Fts5IsBareword(tls *libc.TLS, t int8) int32 { /* sqlite3.c:218225:12: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -175571,22 +175810,22 @@ type Fts5TermsetEntry1 = struct { FnTerm int32 FiIdx int32 FpNext uintptr -} /* sqlite3.c:215154:9 */ +} /* sqlite3.c:215194:9 */ // ************************************************************************ // -type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:218203:33 */ +type Fts5TermsetEntry = Fts5TermsetEntry1 /* sqlite3.c:218243:33 */ -func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:218215:12: */ +func sqlite3Fts5TermsetNew(tls *libc.TLS, pp uintptr) int32 { /* sqlite3.c:218255:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK - *(*uintptr)(unsafe.Pointer(pp)) = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64(unsafe.Sizeof(Fts5Termset{}))) + *(*uintptr)(unsafe.Pointer(pp)) = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5Termset{}))) return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:218221:12: */ +func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, nTerm int32, pbPresent uintptr) int32 { /* sqlite3.c:218261:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -175617,7 +175856,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, } if pEntry == uintptr(0) { - pEntry = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64(uint32(unsafe.Sizeof(Fts5TermsetEntry{}))+uint32(nTerm))) + pEntry = sqlite3Fts5MallocZero(tls, bp, int64(uint32(unsafe.Sizeof(Fts5TermsetEntry{}))+uint32(nTerm))) if pEntry != 0 { (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FpTerm = pEntry + 1*16 (*Fts5TermsetEntry)(unsafe.Pointer(pEntry)).FnTerm = nTerm @@ -175632,7 +175871,7 @@ func sqlite3Fts5TermsetAdd(tls *libc.TLS, p uintptr, iIdx int32, pTerm uintptr, return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:218270:13: */ +func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:218310:13: */ if p != 0 { var i U32 for i = U32(0); i < U32(int32(uint32(unsafe.Sizeof([512]uintptr{}))/uint32(unsafe.Sizeof(uintptr(0))))); i++ { @@ -175664,18 +175903,18 @@ func sqlite3Fts5TermsetFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:218270:13: // Maximum allowed page size -func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:218312:12: */ +func fts5_iswhitespace(tls *libc.TLS, x int8) int32 { /* sqlite3.c:218352:12: */ return libc.Bool32(int32(x) == ' ') } -func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:218316:12: */ +func fts5_isopenquote(tls *libc.TLS, x int8) int32 { /* sqlite3.c:218356:12: */ return libc.Bool32(int32(x) == '"' || int32(x) == '\'' || int32(x) == '[' || int32(x) == '`') } // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a white-space character. -func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:218325:19: */ +func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:218365:19: */ var p uintptr = pIn if p != 0 { for fts5_iswhitespace(tls, *(*int8)(unsafe.Pointer(p))) != 0 { @@ -175688,7 +175927,7 @@ func fts5ConfigSkipWhitespace(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c // Argument pIn points to a character that is part of a nul-terminated // string. Return a pointer to the first character following *pIn in // the string that is not a "bareword" character. -func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:218338:19: */ +func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:218378:19: */ var p uintptr = pIn for sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(p))) != 0 { p++ @@ -175699,17 +175938,17 @@ func fts5ConfigSkipBareword(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:2 return p } -func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:218345:12: */ +func fts5_isdigit(tls *libc.TLS, a int8) int32 { /* sqlite3.c:218385:12: */ return libc.Bool32(int32(a) >= '0' && int32(a) <= '9') } -func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:218351:19: */ +func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:218391:19: */ var p uintptr = pIn switch int32(*(*int8)(unsafe.Pointer(p))) { case 'n': fallthrough case 'N': - if Xsqlite3_strnicmp(tls, ts+6105, p, 4) == 0 { + if Xsqlite3_strnicmp(tls, ts+6127, p, 4) == 0 { p = p + 4 } else { p = uintptr(0) @@ -175792,7 +176031,7 @@ func fts5ConfigSkipLiteral(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:21 // the character immediately following it. Or, if the close-quote is not // found, -1 is returned. If -1 is returned, the buffer is left in an // undefined state. -func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:218427:12: */ +func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:218467:12: */ var q int8 var iIn int32 = 1 var iOut int32 = 0 @@ -175837,7 +176076,7 @@ func fts5Dequote(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:218427:12: */ // 'xyz' becomes xyz // [pqr] becomes pqr // `mno` becomes mno -func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:218472:13: */ +func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:218512:13: */ var quote int8 // Quote character (if any ) quote = *(*int8)(unsafe.Pointer(z)) @@ -175849,11 +176088,11 @@ func sqlite3Fts5Dequote(tls *libc.TLS, z uintptr) { /* sqlite3.c:218472:13: */ type Fts5Enum1 = struct { FzName uintptr FeVal int32 -} /* sqlite3.c:218483:1 */ +} /* sqlite3.c:218523:1 */ -type Fts5Enum = Fts5Enum1 /* sqlite3.c:218487:25 */ +type Fts5Enum = Fts5Enum1 /* sqlite3.c:218527:25 */ -func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:218489:12: */ +func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintptr) int32 { /* sqlite3.c:218529:12: */ var nEnum int32 = int32(libc.Xstrlen(tls, zEnum)) var i int32 var iVal int32 = -1 @@ -175881,18 +176120,18 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // an error occurs, an SQLite error code is returned and an error message // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). -func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:218518:12: */ +func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:218558:12: */ bp := tls.Alloc(76) defer tls.Free(76) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) - if Xsqlite3_strnicmp(tls, ts+33429, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33598, zCmd, nCmd) == 0 { var nByte int32 = int32(uint32(unsafe.Sizeof(int32(0))) * uint32(FTS5_MAX_PREFIX_INDEXES)) var p uintptr var bFirst int32 = 1 if (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, int64(nByte)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix = sqlite3Fts5MallocZero(tls, bp+40, int64(nByte)) if *(*int32)(unsafe.Pointer(bp + 40)) != 0 { return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } @@ -175914,14 +176153,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm break } if int32(*(*int8)(unsafe.Pointer(p))) < '0' || int32(*(*int8)(unsafe.Pointer(p))) > '9' { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33436 /* "malformed prefix..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33605, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+33467 /* "too many prefix ..." */, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) + ts+33636, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -175932,7 +176171,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if nPre <= 0 || nPre >= 1000 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33500 /* "prefix length ou..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33669, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -175945,16 +176184,16 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33537, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33706, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zArg) + Size_t(1)) - var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, Sqlite3_int64(unsafe.Sizeof(uintptr(0)))*nArg) - var pDel uintptr = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, nArg*int64(2)) + var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40, Sqlite3_int64(unsafe.Sizeof(uintptr(0)))*nArg) + var pDel uintptr = sqlite3Fts5MallocZero(tls, bp+40, nArg*int64(2)) var pSpace uintptr = pDel if azArg != 0 && pSpace != 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33546 /* "multiple tokeniz..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33715, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); p != 0 && *(*int8)(unsafe.Pointer(p)) != 0; nArg++ { @@ -175973,7 +176212,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } } if p == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33579 /* "parse error in t..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33748, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, @@ -175988,14 +176227,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33613, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33782, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33621 /* "multiple content..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33790, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40 /* &rc */, ts+33653 /* "%Q.%Q" */, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40, ts+33822, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } @@ -176003,19 +176242,19 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33659, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33828, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33673 /* "multiple content..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33842, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, zArg, -1) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, zArg, -1) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+33711, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+33880, zCmd, nCmd) == 0 { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33722 /* "malformed column..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33891, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1') @@ -176023,28 +176262,28 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - if Xsqlite3_strnicmp(tls, ts+4995, zCmd, nCmd) == 0 { + if Xsqlite3_strnicmp(tls, ts+5017, zCmd, nCmd) == 0 { *(*[4]Fts5Enum)(unsafe.Pointer(bp + 44 /* aDetail */)) = [4]Fts5Enum{ - {FzName: ts + 7885 /* "none" */, FeVal: FTS5_DETAIL_NONE}, - {FzName: ts + 17043 /* "full" */}, - {FzName: ts + 33757 /* "columns" */, FeVal: FTS5_DETAIL_COLUMNS}, + {FzName: ts + 7907, FeVal: FTS5_DETAIL_NONE}, + {FzName: ts + 17212}, + {FzName: ts + 33926, FeVal: FTS5_DETAIL_COLUMNS}, {}, } if libc.AssignPtrInt32(bp+40, fts5ConfigSetEnum(tls, bp+44, zArg, pConfig+48)) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33765 /* "malformed detail..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33934, 0) } return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33796 /* "unrecognized opt..." */, libc.VaList(bp+24, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33965, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } // Allocate an instance of the default tokenizer ("simple") at // Fts5Config.pTokenizer. Return SQLITE_OK if successful, or an SQLite error // code if an error occurs. -func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:218682:12: */ +func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) int32 { /* sqlite3.c:218722:12: */ return sqlite3Fts5GetTokenizer(tls, pGlobal, uintptr(0), 0, pConfig, uintptr(0)) } @@ -176062,7 +176301,7 @@ func fts5ConfigDefaultTokenizer(tls *libc.TLS, pGlobal uintptr, pConfig uintptr) // a no-op (NULL is returned). Otherwise, if an OOM occurs within this // function, *pRc is set to SQLITE_NOMEM before returning. *pRc is *not* // set if a parse error (failed to find close quote) occurs. -func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:218702:19: */ +func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr, pbQuoted uintptr) uintptr { /* sqlite3.c:218742:19: */ var zRet uintptr = uintptr(0) var nIn Sqlite3_int64 = Sqlite3_int64(libc.Xstrlen(tls, zIn)) @@ -176096,20 +176335,20 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr return zRet } -func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:218742:12: */ +func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:218782:12: */ bp := tls.Alloc(16) defer tls.Free(16) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zCol, ts+21794) || - 0 == Xsqlite3_stricmp(tls, zCol, ts+15961) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33824 /* "reserved fts5 co..." */, libc.VaList(bp, zCol)) + if 0 == Xsqlite3_stricmp(tls, zCol, ts+21963) || + 0 == Xsqlite3_stricmp(tls, zCol, ts+16134) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33993, libc.VaList(bp, zCol)) rc = SQLITE_ERROR } else if zArg != 0 { - if 0 == Xsqlite3_stricmp(tls, zArg, ts+33854) { + if 0 == Xsqlite3_stricmp(tls, zArg, ts+34023) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33864 /* "unrecognized col..." */, libc.VaList(bp+8, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34033, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -176119,7 +176358,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, } // Populate the Fts5Config.zContentExprlist string. -func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:218770:12: */ +func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:218810:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -176127,13 +176366,13 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:21877 *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK *(*Fts5Buffer)(unsafe.Pointer(bp + 28 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+28 /* &buf */, ts+33895 /* "T.%Q" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34064, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+28 /* &buf */, ts+33900 /* ", T.%Q" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34069, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*4)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+28 /* &buf */, ts+33907 /* ", T.c%d" */, libc.VaList(bp+16, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24, bp+28, ts+34076, libc.VaList(bp+16, i)) } } } @@ -176152,7 +176391,7 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:21877 // returned, *ppOut is set to NULL and an error message may be left in // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). -func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:218803:12: */ +func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:218843:12: */ bp := tls.Alloc(60) defer tls.Free(60) @@ -176170,19 +176409,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FiCookie = -1 nByte = Sqlite3_int64(uint32(nArg) * (uint32(unsafe.Sizeof(uintptr(0))) + uint32(unsafe.Sizeof(U8(0))))) - (*Fts5Config)(unsafe.Pointer(pRet)).FazCol = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, nByte) + (*Fts5Config)(unsafe.Pointer(pRet)).FazCol = sqlite3Fts5MallocZero(tls, bp+40, nByte) (*Fts5Config)(unsafe.Pointer(pRet)).FabUnindexed = func() uintptr { if (*Fts5Config)(unsafe.Pointer(pRet)).FazCol != 0 { return (*Fts5Config)(unsafe.Pointer(pRet)).FazCol + uintptr(nArg)*4 } return uintptr(0) }() - (*Fts5Config)(unsafe.Pointer(pRet)).FzDb = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + 1*4)), -1) - (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + 2*4)), -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzDb = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 1*4)), -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40, *(*uintptr)(unsafe.Pointer(azArg + 2*4)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+21794) == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33915 /* "reserved fts5 ta..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) + if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+21963) == 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34084, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } @@ -176194,7 +176433,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var bOption int32 = 0 *(*int32)(unsafe.Pointer(bp + 48 /* bMustBeCol */)) = 0 - z = fts5ConfigGobbleWord(tls, bp+40 /* &rc */, zOrig, bp+44 /* &zOne */, bp+48 /* &bMustBeCol */) + z = fts5ConfigGobbleWord(tls, bp+40, zOrig, bp+44, bp+48) z = fts5ConfigSkipWhitespace(tls, z) if z != 0 && int32(*(*int8)(unsafe.Pointer(z))) == '=' { bOption = 1 @@ -176208,7 +176447,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { // var bDummy int32 at bp+56, 4 - z = fts5ConfigGobbleWord(tls, bp+40 /* &rc */, z, bp+52 /* &zTwo */, bp+56 /* &bDummy */) + z = fts5ConfigGobbleWord(tls, bp+40, z, bp+52, bp+56) if z != 0 && *(*int8)(unsafe.Pointer(z)) != 0 { z = uintptr(0) } @@ -176216,7 +176455,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33944 /* "parse error in \"..." */, libc.VaList(bp+8, zOrig)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+34113, libc.VaList(bp+8, zOrig)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { @@ -176225,13 +176464,13 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if *(*uintptr)(unsafe.Pointer(bp + 44)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 44 /* zOne */)) } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 52)) != 0 { return *(*uintptr)(unsafe.Pointer(bp + 52 /* zTwo */)) } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), pzErr) } else { @@ -176257,19 +176496,19 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { - zTail = ts + 33613 /* "content" */ + zTail = ts + 33782 /* "content" */ } else if (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize != 0 { - zTail = ts + 33964 /* "docsize" */ + zTail = ts + 34133 /* "docsize" */ } if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+40 /* &rc */, ts+33972 /* "%Q.'%q_%s'" */, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40, ts+34141, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } if *(*int32)(unsafe.Pointer(bp + 40)) == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, ts+15961 /* "rowid" */, -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40, ts+16134, -1) } // Formulate the zContentExprlist text @@ -176285,7 +176524,7 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int } // Free the configuration object passed as the only argument. -func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:218927:13: */ +func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:218967:13: */ if pConfig != 0 { var i int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { @@ -176310,7 +176549,7 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:218927 // Call sqlite3_declare_vtab() based on the contents of the configuration // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. -func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:218954:12: */ +func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:218994:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -176318,18 +176557,18 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+33983 /* "CREATE TABLE x(" */, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34152, 0) for i = 0; zSql != 0 && i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { var zSep uintptr = func() uintptr { if i == 0 { - return ts + 1543 + return ts + 1565 } - return ts + 14507 + return ts + 14529 }() - zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+33999 /* "%z%s%Q" */, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34168, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*4)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+34006, /* "%z, %Q HIDDEN, %..." */ - libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+21794 /* "rank" */)) + zSql = sqlite3Fts5Mprintf(tls, bp+48, ts+34175, + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+21963)) if zSql != 0 { *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) @@ -176360,7 +176599,7 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql // still returns SQLITE_OK. Or, if the tokenization was abandoned early // because the callback returned another non-zero value, it is assumed // to be an SQLite error code and returned to the caller. -func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:219000:12: */ +func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uintptr, nText int32, pCtx uintptr, xToken uintptr) int32 { /* sqlite3.c:219040:12: */ if pText == uintptr(0) { return SQLITE_OK } @@ -176374,7 +176613,7 @@ func sqlite3Fts5Tokenize(tls *libc.TLS, pConfig uintptr, flags int32, pText uint // a comma-separated list of SQL literals followed by a ')' character. // If it actually is this, return a pointer to the ')'. Otherwise, return // NULL to indicate a parse error. -func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:219019:19: */ +func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:219059:19: */ var p uintptr = pIn for 1 != 0 { @@ -176401,7 +176640,7 @@ func fts5ConfigSkipArgs(tls *libc.TLS, pIn uintptr) uintptr { /* sqlite3.c:21901 // + Open parenthesis - "(" // + Zero or more SQL literals in a comma separated list // + Close parenthesis - ")" -func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:219046:12: */ +func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRankArgs uintptr) int32 { /* sqlite3.c:219086:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -176422,7 +176661,7 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa p = fts5ConfigSkipBareword(tls, p) if p != 0 { - zRank = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64((int32(uintptr(1)+p)-int32(pRank))/1)) + zRank = sqlite3Fts5MallocZero(tls, bp, int64((int32(uintptr(1)+p)-int32(pRank))/1)) if zRank != 0 { libc.Xmemcpy(tls, zRank, pRank, uint32((int32(p)-int32(pRank))/1)) } @@ -176446,7 +176685,7 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa if p == uintptr(0) { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_ERROR } else { - zRankArgs = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64((int32(uintptr(1)+p)-int32(pArgs))/1)) + zRankArgs = sqlite3Fts5MallocZero(tls, bp, int64((int32(uintptr(1)+p)-int32(pArgs))/1)) if zRankArgs != 0 { libc.Xmemcpy(tls, zRankArgs, pArgs, uint32((int32(p)-int32(pArgs))/1)) } @@ -176465,13 +176704,13 @@ func sqlite3Fts5ConfigParseRank(tls *libc.TLS, zIn uintptr, pzRank uintptr, pzRa return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:219105:12: */ +func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVal uintptr, pbBadkey uintptr) int32 { /* sqlite3.c:219145:12: */ bp := tls.Alloc(8) defer tls.Free(8) var rc int32 = SQLITE_OK - if 0 == Xsqlite3_stricmp(tls, zKey, ts+34032) { + if 0 == Xsqlite3_stricmp(tls, zKey, ts+34201) { var pgsz int32 = 0 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { pgsz = Xsqlite3_value_int(tls, pVal) @@ -176481,7 +176720,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz = pgsz } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34037) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34206) { var nHashSize int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nHashSize = Xsqlite3_value_int(tls, pVal) @@ -176491,7 +176730,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = nHashSize } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34046) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34215) { var nAutomerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nAutomerge = Xsqlite3_value_int(tls, pVal) @@ -176504,7 +176743,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnAutomerge = nAutomerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34056) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34225) { var nUsermerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nUsermerge = Xsqlite3_value_int(tls, pVal) @@ -176514,7 +176753,7 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FnUsermerge = nUsermerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34066) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+34235) { var nCrisisMerge int32 = -1 if SQLITE_INTEGER == Xsqlite3_value_numeric_type(tls, pVal) { nCrisisMerge = Xsqlite3_value_int(tls, pVal) @@ -176530,13 +176769,13 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = nCrisisMerge } - } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+21794) { + } else if 0 == Xsqlite3_stricmp(tls, zKey, ts+21963) { var zIn uintptr = Xsqlite3_value_text(tls, pVal) // var zRank uintptr at bp, 4 // var zRankArgs uintptr at bp+4, 4 - rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp /* &zRank */, bp+4 /* &zRankArgs */) + rc = sqlite3Fts5ConfigParseRank(tls, zIn, bp, bp+4) if rc == SQLITE_OK { Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank) Xsqlite3_free(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs) @@ -176553,11 +176792,11 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa } // Load the contents of the %_config table into memory. -func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:219199:12: */ +func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:219239:12: */ bp := tls.Alloc(44) defer tls.Free(44) - var zSelect uintptr = ts + 34078 /* "SELECT k, v FROM..." */ + var zSelect uintptr = ts + 34247 /* "SELECT k, v FROM..." */ var zSql uintptr *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK @@ -176570,9 +176809,9 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = FTS5_DEFAULT_CRISISMERGE (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = 1024 * 1024 - zSql = sqlite3Fts5Mprintf(tls, bp+32 /* &rc */, zSelect, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + zSql = sqlite3Fts5Mprintf(tls, bp+32, zSelect, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if zSql != 0 { - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+36 /* &p */, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+36, uintptr(0)) Xsqlite3_free(tls, zSql) } @@ -176580,11 +176819,11 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 36))) { var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)), 0) var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */)), 1) - if 0 == Xsqlite3_stricmp(tls, zK, ts+34110) { + if 0 == Xsqlite3_stricmp(tls, zK, ts+34279) { iVersion = Xsqlite3_value_int(tls, pVal) } else { *(*int32)(unsafe.Pointer(bp + 40 /* bDummy */)) = 0 - sqlite3Fts5ConfigSetValue(tls, pConfig, zK, pVal, bp+40 /* &bDummy */) + sqlite3Fts5ConfigSetValue(tls, pConfig, zK, pVal, bp+40) } } *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 36 /* p */))) @@ -176595,7 +176834,7 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+34118, /* "invalid fts5 fil..." */ + ts+34287, libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } @@ -176630,7 +176869,7 @@ type Fts5ExprTerm1 = struct { FzTerm uintptr FpIter uintptr FpSynonym uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ // 2014 May 31 // @@ -176649,9 +176888,9 @@ type Fts5ExprTerm1 = struct { // All token types in the generated fts5parse.h file are greater than 0. -type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:219277:29 */ +type Fts5ExprTerm = Fts5ExprTerm1 /* sqlite3.c:219317:29 */ -func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219384:13: */ +func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:219424:13: */ var ap Va_list _ = ap ap = va @@ -176663,12 +176902,12 @@ func sqlite3Fts5ParseError(tls *libc.TLS, pParse uintptr, zFmt uintptr, va uintp _ = ap } -func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219395:12: */ +func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:219435:12: */ return libc.Bool32(int32(t) == ' ' || int32(t) == '\t' || int32(t) == '\n' || int32(t) == '\r') } // Read the first token from the nul-terminated string at *pz. -func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:219402:12: */ +func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:219442:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -176730,7 +176969,7 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) } } if int32(*(*int8)(unsafe.Pointer(z2))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34183 /* "unterminated str..." */, 0) + sqlite3Fts5ParseError(tls, pParse, ts+34352, 0) return FTS5_EOF } } @@ -176743,20 +176982,20 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) { var z2 uintptr if sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z))) == 0 { - sqlite3Fts5ParseError(tls, pParse, ts+34203 /* "fts5: syntax err..." */, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+34372, libc.VaList(bp, z)) return FTS5_EOF } tok = FTS5_STRING for z2 = z + 1; sqlite3Fts5IsBareword(tls, *(*int8)(unsafe.Pointer(z2))) != 0; z2++ { } (*Fts5Token)(unsafe.Pointer(pToken)).Fn = (int32(z2) - int32(z)) / 1 - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34234, uint32(2)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 2 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34403, uint32(2)) == 0 { tok = FTS5_OR } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34237, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+34406, uint32(3)) == 0 { tok = FTS5_NOT } - if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29620, uint32(3)) == 0 { + if (*Fts5Token)(unsafe.Pointer(pToken)).Fn == 3 && libc.Xmemcmp(tls, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, ts+29789, uint32(3)) == 0 { tok = FTS5_AND } break @@ -176768,15 +177007,15 @@ func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) return tok } -func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:219466:13: */ +func fts5ParseAlloc(tls *libc.TLS, t U64) uintptr { /* sqlite3.c:219506:13: */ return Xsqlite3_malloc64(tls, uint64(Sqlite3_int64(t))) } -func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:219467:13: */ +func fts5ParseFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:219507:13: */ Xsqlite3_free(tls, p) } -func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:219469:12: */ +func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol int32, zExpr uintptr, ppNew uintptr, pzErr uintptr) int32 { /* sqlite3.c:219509:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -176791,7 +177030,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol *(*uintptr)(unsafe.Pointer(ppNew)) = uintptr(0) *(*uintptr)(unsafe.Pointer(pzErr)) = uintptr(0) - libc.Xmemset(tls, bp /* &sParse */, 0, uint32(unsafe.Sizeof(Fts5Parse{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Parse{}))) (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FbPhraseToAnd = bPhraseToAnd pEngine = sqlite3Fts5ParserAlloc(tls, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, U64) uintptr }{fts5ParseAlloc}))) if pEngine == uintptr(0) { @@ -176800,8 +177039,8 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FpConfig = pConfig for ok := true; ok; ok = (*Fts5Parse)(unsafe.Pointer(bp)).Frc == SQLITE_OK && t != FTS5_EOF { - t = fts5ExprGetToken(tls, bp /* &sParse */, bp+28 /* &z */, bp+32 /* &token */) - sqlite3Fts5Parser(tls, pEngine, t, *(*Fts5Token)(unsafe.Pointer(bp + 32 /* token */)), bp /* &sParse */) + t = fts5ExprGetToken(tls, bp, bp+28, bp+32) + sqlite3Fts5Parser(tls, pEngine, t, *(*Fts5Token)(unsafe.Pointer(bp + 32 /* token */)), bp) } sqlite3Fts5ParserFree(tls, pEngine, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ParseFree}))) @@ -176813,7 +177052,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol if pColset != 0 { (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol = 1 *(*int32)(unsafe.Pointer(pColset + 4)) = iCol - sqlite3Fts5ParseSetColset(tls, bp /* &sParse */, (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FpExpr, pColset) + sqlite3Fts5ParseSetColset(tls, bp, (*Fts5Parse)(unsafe.Pointer(bp /* &sParse */)).FpExpr, pColset) } } @@ -176854,7 +177093,7 @@ func sqlite3Fts5ExprNew(tls *libc.TLS, pConfig uintptr, bPhraseToAnd int32, iCol // expression that will match a superset of the rows matched by the LIKE or // GLOB. If successful, SQLITE_OK is returned. Otherwise, an SQLite error // code. -func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:219550:12: */ +func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol int32, zText uintptr, pp uintptr) int32 { /* sqlite3.c:219590:12: */ bp := tls.Alloc(3) defer tls.Free(3) @@ -176872,13 +177111,13 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in var iFirst int32 = 0 if bGlob == 0 { - *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */)) = int8('_') - *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 1)) = int8('%') - *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2)) = int8(0) + *(*int8)(unsafe.Pointer(bp)) = int8('_') + *(*int8)(unsafe.Pointer(bp + 1)) = int8('%') + *(*int8)(unsafe.Pointer(bp + 2)) = int8(0) } else { - *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */)) = int8('*') - *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 1)) = int8('?') - *(*int8)(unsafe.Pointer(bp /* &aSpec[0] */ + 2)) = int8('[') + *(*int8)(unsafe.Pointer(bp)) = int8('*') + *(*int8)(unsafe.Pointer(bp + 1)) = int8('?') + *(*int8)(unsafe.Pointer(bp + 2)) = int8('[') } for I64(i) <= nText { @@ -176929,7 +177168,7 @@ func sqlite3Fts5ExprPattern(tls *libc.TLS, pConfig uintptr, bGlob int32, iCol in } // Free the expression node object passed as the only argument. -func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:219620:13: */ +func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:219660:13: */ if p != 0 { var i int32 for i = 0; i < (*Fts5ExprNode)(unsafe.Pointer(p)).FnChild; i++ { @@ -176941,7 +177180,7 @@ func sqlite3Fts5ParseNodeFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:219620:13 } // Free the expression object passed as the only argument. -func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:219634:13: */ +func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:219674:13: */ if p != 0 { sqlite3Fts5ParseNodeFree(tls, (*Fts5Expr)(unsafe.Pointer(p)).FpRoot) Xsqlite3_free(tls, (*Fts5Expr)(unsafe.Pointer(p)).FapExprPhrase) @@ -176949,19 +177188,19 @@ func sqlite3Fts5ExprFree(tls *libc.TLS, p uintptr) { /* sqlite3.c:219634:13: */ } } -func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:219642:12: */ +func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlite3.c:219682:12: */ bp := tls.Alloc(28) defer tls.Free(28) // var sParse Fts5Parse at bp, 28 - libc.Xmemset(tls, bp /* &sParse */, 0, uint32(unsafe.Sizeof(Fts5Parse{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Parse{}))) if *(*uintptr)(unsafe.Pointer(pp1)) != 0 { var p1 uintptr = *(*uintptr)(unsafe.Pointer(pp1)) var nPhrase int32 = (*Fts5Expr)(unsafe.Pointer(p1)).FnPhrase + (*Fts5Expr)(unsafe.Pointer(p2)).FnPhrase - (*Fts5Expr)(unsafe.Pointer(p1)).FpRoot = sqlite3Fts5ParseNode(tls, bp /* &sParse */, FTS5_AND, (*Fts5Expr)(unsafe.Pointer(p1)).FpRoot, (*Fts5Expr)(unsafe.Pointer(p2)).FpRoot, uintptr(0)) + (*Fts5Expr)(unsafe.Pointer(p1)).FpRoot = sqlite3Fts5ParseNode(tls, bp, FTS5_AND, (*Fts5Expr)(unsafe.Pointer(p1)).FpRoot, (*Fts5Expr)(unsafe.Pointer(p2)).FpRoot, uintptr(0)) (*Fts5Expr)(unsafe.Pointer(p2)).FpRoot = uintptr(0) if (*Fts5Parse)(unsafe.Pointer(bp)).Frc == SQLITE_OK { @@ -176990,7 +177229,7 @@ func sqlite3Fts5ExprAnd(tls *libc.TLS, pp1 uintptr, p2 uintptr) int32 { /* sqlit // Argument pTerm must be a synonym iterator. Return the current rowid // that it points to. -func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:219682:12: */ +func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintptr) I64 { /* sqlite3.c:219722:12: */ var iRet I64 = int64(0) var bRetValid int32 = 0 var p uintptr @@ -177012,7 +177251,7 @@ func fts5ExprSynonymRowid(tls *libc.TLS, pTerm uintptr, bDesc int32, pbEof uintp } // Argument pTerm must be a synonym iterator. -func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:219707:12: */ +func fts5ExprSynonymList(tls *libc.TLS, pTerm uintptr, iRowid I64, pBuf uintptr, pa uintptr, pn uintptr) int32 { /* sqlite3.c:219747:12: */ bp := tls.Alloc(104) defer tls.Free(104) @@ -177142,7 +177381,7 @@ __15: goto __12 __20: ; - rc = sqlite3Fts5PoslistWriterAppend(tls, pBuf, bp+96 /* &writer */, iMin) + rc = sqlite3Fts5PoslistWriterAppend(tls, pBuf, bp+96, iMin) iPrev = iMin goto __11 __12: @@ -177176,7 +177415,7 @@ __22: // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if the current rowid is // not a match. -func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:219790:12: */ +func fts5ExprPhraseIsMatch(tls *libc.TLS, pNode uintptr, pPhrase uintptr, pbMatch uintptr) int32 { /* sqlite3.c:219830:12: */ bp := tls.Alloc(124) defer tls.Free(124) @@ -177239,7 +177478,7 @@ __3: goto __6 } *(*Fts5Buffer)(unsafe.Pointer(bp + 96 /* buf */)) = Fts5Buffer{} - rc = fts5ExprSynonymList(tls, pTerm, (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid, bp+96 /* &buf */, bp+108 /* &a */, bp+112 /* &n */) + rc = fts5ExprSynonymList(tls, pTerm, (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid, bp+96, bp+108, bp+112) if !(rc != 0) { goto __8 } @@ -177334,7 +177573,7 @@ __15: if !(bFirst == 0 || int32(iPos&int64(0x7FFFFFFF)) == 0) { goto __24 } - rc = sqlite3Fts5PoslistWriterAppend(tls, pPhrase+4, bp+116 /* &writer */, iPos) + rc = sqlite3Fts5PoslistWriterAppend(tls, pPhrase+4, bp+116, iPos) if !(rc != SQLITE_OK) { goto __25 } @@ -177401,11 +177640,11 @@ type Fts5LookaheadReader1 = struct { Fi int32 FiPos I64 FiLookahead I64 -} /* sqlite3.c:219874:9 */ +} /* sqlite3.c:219914:9 */ -type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:219874:36 */ +type Fts5LookaheadReader = Fts5LookaheadReader1 /* sqlite3.c:219914:36 */ -func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:219885:12: */ +func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:219925:12: */ (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos = (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead if sqlite3Fts5PoslistNext64(tls, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa, (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn, p+8, p+20) != 0 { (*Fts5LookaheadReader)(unsafe.Pointer(p)).FiLookahead = I64(int64(1)) << 62 @@ -177413,7 +177652,7 @@ func fts5LookaheadReaderNext(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2198 return libc.Bool32((*Fts5LookaheadReader)(unsafe.Pointer(p)).FiPos == I64(int64(1))<<62) } -func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:219893:12: */ +func fts5LookaheadReaderInit(tls *libc.TLS, a uintptr, n int32, p uintptr) int32 { /* sqlite3.c:219933:12: */ libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Fts5LookaheadReader{}))) (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fa = a (*Fts5LookaheadReader)(unsafe.Pointer(p)).Fn = n @@ -177425,9 +177664,9 @@ type Fts5NearTrimmer1 = struct { Freader Fts5LookaheadReader Fwriter Fts5PoslistWriter FpOut uintptr -} /* sqlite3.c:219904:9 */ +} /* sqlite3.c:219944:9 */ -type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:219904:32 */ +type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:219944:32 */ // The near-set object passed as the first argument contains more than // one phrase. All phrases currently point to the same row. The @@ -177444,7 +177683,7 @@ type Fts5NearTrimmer = Fts5NearTrimmer1 /* sqlite3.c:219904:32 */ // If no error occurs and non-zero (a match) is returned, the position-list // of each phrase object is edited to contain only those entries that // meet the constraint before returning. -func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:219928:12: */ +func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* sqlite3.c:219968:12: */ bp := tls.Alloc(164) defer tls.Free(164) @@ -177475,10 +177714,10 @@ func fts5ExprNearIsMatch(tls *libc.TLS, pRc uintptr, pNear uintptr) int32 { /* s goto __1 } nByte = Sqlite3_int64(uint32(unsafe.Sizeof(Fts5NearTrimmer{})) * uint32((*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase)) - a = sqlite3Fts5MallocZero(tls, bp+160 /* &rc */, nByte) + a = sqlite3Fts5MallocZero(tls, bp+160, nByte) goto __2 __1: - libc.Xmemset(tls, bp /* &aStatic[0] */, 0, uint32(unsafe.Sizeof([4]Fts5NearTrimmer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([4]Fts5NearTrimmer{}))) __2: ; if !(*(*int32)(unsafe.Pointer(bp + 160)) != SQLITE_OK) { @@ -177646,7 +177885,7 @@ __29: // If the iterator reaches EOF, set *pbEof to true before returning. If // an error occurs, set *pRc to an error code. If either *pbEof or *pRc // are set, return a non-zero value. Otherwise, return zero. -func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:220027:12: */ +func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr, pRc uintptr, pbEof uintptr) int32 { /* sqlite3.c:220067:12: */ var iLast I64 = *(*I64)(unsafe.Pointer(piLast)) var iRowid I64 @@ -177666,7 +177905,7 @@ func fts5ExprAdvanceto(tls *libc.TLS, pIter uintptr, bDesc int32, piLast uintptr return 0 } -func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:220053:12: */ +func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast uintptr, pRc uintptr) int32 { /* sqlite3.c:220093:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -177688,12 +177927,12 @@ func fts5ExprSynonymAdvanceto(tls *libc.TLS, pTerm uintptr, bDesc int32, piLast *(*int32)(unsafe.Pointer(pRc)) = rc *(*int32)(unsafe.Pointer(bp /* bEof */)) = 1 } else { - *(*I64)(unsafe.Pointer(piLast)) = fts5ExprSynonymRowid(tls, pTerm, bDesc, bp /* &bEof */) + *(*I64)(unsafe.Pointer(piLast)) = fts5ExprSynonymRowid(tls, pTerm, bDesc, bp) } return *(*int32)(unsafe.Pointer(bp /* bEof */)) } -func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220083:12: */ +func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220123:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -177724,13 +177963,13 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) if (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+20)).FpSynonym != 0 || (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FpColset != 0 || (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+20)).FbFirst != 0 { *(*int32)(unsafe.Pointer(bp /* bMatch */)) = 0 - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = fts5ExprPhraseIsMatch(tls, pNode, pPhrase, bp /* &bMatch */) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = fts5ExprPhraseIsMatch(tls, pNode, pPhrase, bp) if *(*int32)(unsafe.Pointer(bp)) == 0 { break } } else { var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 20)).FpIter - sqlite3Fts5BufferSet(tls, bp+4 /* &rc */, pPhrase+4, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FnData, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FpData) + sqlite3Fts5BufferSet(tls, bp+4, pPhrase+4, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FnData, (*Fts5IndexIter)(unsafe.Pointer(pIter)).FpData) } } @@ -177750,7 +177989,7 @@ func fts5ExprNearTest(tls *libc.TLS, pRc uintptr, pExpr uintptr, pNode uintptr) // If an error occurs, return an SQLite error code. Otherwise, return // SQLITE_OK. It is not considered an error if some term matches zero // documents. -func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220142:12: */ +func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220182:12: */ var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -177816,7 +178055,7 @@ func fts5ExprNearInitAll(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* // Otherwise, if this is a DESC iterator, the opposite is returned: // // (iRhs - iLhs) -func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:220204:12: */ +func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* sqlite3.c:220244:12: */ if (*Fts5Expr)(unsafe.Pointer(pExpr)).FbDesc == 0 { if iLhs < iRhs { @@ -177832,7 +178071,7 @@ func fts5RowidCmp(tls *libc.TLS, pExpr uintptr, iLhs I64, iRhs I64) int32 { /* s return int32(0) } -func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:220219:13: */ +func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:220259:13: */ var i int32 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 1 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -177841,7 +178080,7 @@ func fts5ExprSetEof(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:220219:13: */ } } -func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:220228:13: */ +func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:220268:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { var pNear uintptr = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear var i int32 @@ -177867,7 +178106,7 @@ func fts5ExprNodeZeroPoslist(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:220228 // This means that if the iteration order is ASC, then numerically larger // rowids are considered larger. Or if it is the default DESC, numerically // smaller rowids are larger. -func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:220258:12: */ +func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 { /* sqlite3.c:220298:12: */ if (*Fts5ExprNode)(unsafe.Pointer(p2)).FbEof != 0 { return -1 } @@ -177886,7 +178125,7 @@ func fts5NodeCompare(tls *libc.TLS, pExpr uintptr, p1 uintptr, p2 uintptr) int32 // SQLITE_OK is returned if an error occurs, or an SQLite error code // otherwise. It is not considered an error code if an iterator reaches // EOF. -func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220279:12: */ +func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220319:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -177954,7 +178193,7 @@ func fts5ExprNodeTest_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220349:12: */ +func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220389:12: */ var pTerm uintptr = *(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)) + 20 var rc int32 = SQLITE_OK @@ -178013,7 +178252,7 @@ func fts5ExprNodeNext_STRING(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromV return rc } -func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220414:12: */ +func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220454:12: */ // As this "NEAR" object is actually a single phrase that consists // of a single term only, grab pointers into the poslist managed by the // fts5_index.c iterator object. This is much faster than synthesizing @@ -178032,7 +178271,7 @@ func fts5ExprNodeTest_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { } // xNext() method for a node of type FTS5_TERM. -func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220442:12: */ +func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220482:12: */ var rc int32 var pIter uintptr = (*Fts5ExprTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)) + 20)).FpIter @@ -178050,7 +178289,7 @@ func fts5ExprNodeNext_TERM(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVal return rc } -func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:220466:13: */ +func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlite3.c:220506:13: */ var pNext uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32)) var i int32 @@ -178066,7 +178305,7 @@ func fts5ExprNodeTest_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr) { /* sqlit (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = (*Fts5ExprNode)(unsafe.Pointer(pNext)).FbNomatch } -func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220485:12: */ +func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220525:12: */ var i int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid @@ -178092,7 +178331,7 @@ func fts5ExprNodeNext_OR(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid } // Argument pNode is an FTS5_AND node. -func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:220517:12: */ +func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* sqlite3.c:220557:12: */ var iChild int32 var iLast I64 = (*Fts5ExprNode)(unsafe.Pointer(pAnd)).FiRowid var rc int32 = SQLITE_OK @@ -178142,7 +178381,7 @@ func fts5ExprNodeTest_AND(tls *libc.TLS, pExpr uintptr, pAnd uintptr) int32 { /* return SQLITE_OK } -func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220569:12: */ +func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220609:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)), bFromValid, iFrom) @@ -178154,7 +178393,7 @@ func fts5ExprNodeNext_AND(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali return rc } -func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220584:12: */ +func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220624:12: */ var rc int32 = SQLITE_OK var p1 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32)) var p2 uintptr = *(*uintptr)(unsafe.Pointer(pNode + 32 + 1*4)) @@ -178184,7 +178423,7 @@ func fts5ExprNodeTest_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { / return rc } -func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220612:12: */ +func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromValid int32, iFrom I64) int32 { /* sqlite3.c:220652:12: */ var rc int32 = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, I64) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5ExprNode)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)))).FxNext})).f(tls, pExpr, *(*uintptr)(unsafe.Pointer(pNode + 32 /* &.apChild */)), bFromValid, iFrom) @@ -178200,7 +178439,7 @@ func fts5ExprNodeNext_NOT(tls *libc.TLS, pExpr uintptr, pNode uintptr, bFromVali // If pNode currently points to a match, this function returns SQLITE_OK // without modifying it. Otherwise, pNode is advanced until it does point // to a match or EOF is reached. -func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220633:12: */ +func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220673:12: */ var rc int32 = SQLITE_OK if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof == 0 { switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -178253,7 +178492,7 @@ func fts5ExprNodeTest(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sq // // Return an SQLite error code if an error occurs, or SQLITE_OK otherwise. // It is not an error if there are no matches. -func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220678:12: */ +func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* sqlite3.c:220718:12: */ var rc int32 = SQLITE_OK (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbNomatch = 0 @@ -178315,7 +178554,7 @@ func fts5ExprNodeFirst(tls *libc.TLS, pExpr uintptr, pNode uintptr) int32 { /* s // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:220737:12: */ +func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bDesc int32) int32 { /* sqlite3.c:220777:12: */ var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot var rc int32 // Return code @@ -178347,7 +178586,7 @@ func sqlite3Fts5ExprFirst(tls *libc.TLS, p uintptr, pIdx uintptr, iFirst I64, bD // // Return SQLITE_OK if successful, or an SQLite error code otherwise. It // is not considered an error if the query does not match any documents. -func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:220768:12: */ +func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3.c:220808:12: */ var rc int32 var pRoot uintptr = (*Fts5Expr)(unsafe.Pointer(p)).FpRoot @@ -178363,25 +178602,25 @@ func sqlite3Fts5ExprNext(tls *libc.TLS, p uintptr, iLast I64) int32 { /* sqlite3 return rc } -func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220782:12: */ +func sqlite3Fts5ExprEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:220822:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FbEof } -func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:220786:12: */ +func sqlite3Fts5ExprRowid(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:220826:12: */ return (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(p)).FpRoot)).FiRowid } -func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:220790:12: */ +func fts5ParseStringFromToken(tls *libc.TLS, pToken uintptr, pz uintptr) int32 { /* sqlite3.c:220830:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK - *(*uintptr)(unsafe.Pointer(pz)) = sqlite3Fts5Strndup(tls, bp /* &rc */, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, (*Fts5Token)(unsafe.Pointer(pToken)).Fn) + *(*uintptr)(unsafe.Pointer(pz)) = sqlite3Fts5Strndup(tls, bp, (*Fts5Token)(unsafe.Pointer(pToken)).Fp, (*Fts5Token)(unsafe.Pointer(pToken)).Fn) return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Free the phrase object passed as the only argument. -func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:220799:13: */ +func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:220839:13: */ if pPhrase != 0 { var i int32 for i = 0; i < (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm; i++ { @@ -178406,7 +178645,7 @@ func fts5ExprPhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:220799:13 // Set the "bFirst" flag on the first token of the phrase passed as the // only argument. -func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:220824:13: */ +func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:220864:13: */ if pPhrase != 0 && (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm != 0 { (*Fts5ExprTerm)(unsafe.Pointer(pPhrase + 20)).FbFirst = U8(1) } @@ -178418,7 +178657,7 @@ func sqlite3Fts5ParseSetCaret(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:220 // // If an OOM error occurs, both the pNear and pPhrase objects are freed and // NULL returned. -func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:220838:24: */ +func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhrase uintptr) uintptr { /* sqlite3.c:220878:24: */ var SZALLOC int32 = 8 var pRet uintptr = uintptr(0) @@ -178477,12 +178716,12 @@ func sqlite3Fts5ParseNearset(tls *libc.TLS, pParse uintptr, pNear uintptr, pPhra type TokenCtx1 = struct { FpPhrase uintptr Frc int32 -} /* sqlite3.c:220898:9 */ +} /* sqlite3.c:220938:9 */ -type TokenCtx = TokenCtx1 /* sqlite3.c:220898:25 */ +type TokenCtx = TokenCtx1 /* sqlite3.c:220938:25 */ // Callback for tokenizing terms used by ParseTerm(). -func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:220907:12: */ +func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:220947:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -178542,7 +178781,7 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { pTerm = pPhrase + 20 + uintptr(libc.PostIncInt32(&(*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm, 1))*16 libc.Xmemset(tls, pTerm, 0, uint32(unsafe.Sizeof(Fts5ExprTerm{}))) - (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FzTerm = sqlite3Fts5Strndup(tls, bp /* &rc */, pToken, nToken) + (*Fts5ExprTerm)(unsafe.Pointer(pTerm)).FzTerm = sqlite3Fts5Strndup(tls, bp, pToken, nToken) } } @@ -178551,12 +178790,12 @@ func fts5ParseTokenize(tls *libc.TLS, pContext uintptr, tflags int32, pToken uin } // Free the phrase object passed as the only argument. -func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:220972:13: */ +func sqlite3Fts5ParsePhraseFree(tls *libc.TLS, pPhrase uintptr) { /* sqlite3.c:221012:13: */ fts5ExprPhraseFree(tls, pPhrase) } // Free the phrase object passed as the second argument. -func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:220979:13: */ +func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:221019:13: */ if pNear != 0 { var i int32 for i = 0; i < (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase; i++ { @@ -178567,12 +178806,12 @@ func sqlite3Fts5ParseNearsetFree(tls *libc.TLS, pNear uintptr) { /* sqlite3.c:22 } } -func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:220990:13: */ +func sqlite3Fts5ParseFinished(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:221030:13: */ (*Fts5Parse)(unsafe.Pointer(pParse)).FpExpr = p } -func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:220995:12: */ +func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:221035:12: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase%8 == 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5Parse)(unsafe.Pointer(pParse)).FnPhrase+8)) var apNew uintptr @@ -178589,7 +178828,7 @@ func parseGrowPhraseArray(tls *libc.TLS, pParse uintptr) int32 { /* sqlite3.c:22 // This function is called by the parser to process a string token. The // string may or may not be quoted. In any case it is tokenized and a // phrase object consisting of all tokens returned. -func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:221014:23: */ +func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken uintptr, bPrefix int32) uintptr { /* sqlite3.c:221054:23: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -178599,10 +178838,10 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken var rc int32 // Tokenize return code *(*uintptr)(unsafe.Pointer(bp + 8 /* z */)) = uintptr(0) - libc.Xmemset(tls, bp /* &sCtx */, 0, uint32(unsafe.Sizeof(TokenCtx{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(TokenCtx{}))) (*TokenCtx)(unsafe.Pointer(bp /* &sCtx */)).FpPhrase = pAppend - rc = fts5ParseStringFromToken(tls, pToken, bp+8 /* &z */) + rc = fts5ParseStringFromToken(tls, pToken, bp+8) if rc == SQLITE_OK { var flags int32 = FTS5_TOKENIZE_QUERY | func() int32 { if bPrefix != 0 { @@ -178613,7 +178852,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken var n int32 sqlite3Fts5Dequote(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* z */))) n = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* z */)))) - rc = sqlite3Fts5Tokenize(tls, pConfig, flags, *(*uintptr)(unsafe.Pointer(bp + 8 /* z */)), n, bp /* &sCtx */, *(*uintptr)(unsafe.Pointer(&struct { + rc = sqlite3Fts5Tokenize(tls, pConfig, flags, *(*uintptr)(unsafe.Pointer(bp + 8 /* z */)), n, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5ParseTokenize}))) } @@ -178647,7 +178886,7 @@ func sqlite3Fts5ParseTerm(tls *libc.TLS, pParse uintptr, pAppend uintptr, pToken // Create a new FTS5 expression by cloning phrase iPhrase of the // expression passed as the second argument. -func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:221068:12: */ +func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppNew uintptr) int32 { /* sqlite3.c:221108:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -178657,17 +178896,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN *(*TokenCtx)(unsafe.Pointer(bp + 4 /* sCtx */)) = TokenCtx{} // Context object for fts5ParseTokenize pOrig = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) - pNew = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64(unsafe.Sizeof(Fts5Expr{}))) + pNew = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5Expr{}))) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - (*Fts5Expr)(unsafe.Pointer(pNew)).FapExprPhrase = sqlite3Fts5MallocZero(tls, bp, /* &rc */ + (*Fts5Expr)(unsafe.Pointer(pNew)).FapExprPhrase = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(uintptr(0)))) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - (*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot = sqlite3Fts5MallocZero(tls, bp, /* &rc */ + (*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5ExprNode{}))) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear = sqlite3Fts5MallocZero(tls, bp, /* &rc */ + (*Fts5ExprNode)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pNew)).FpRoot)).FpNear = sqlite3Fts5MallocZero(tls, bp, int64(uint32(unsafe.Sizeof(Fts5ExprNearset{}))+uint32(unsafe.Sizeof(uintptr(0))))) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { @@ -178676,7 +178915,7 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN var nByte Sqlite3_int64 var pColset uintptr nByte = Sqlite3_int64(uint32(unsafe.Sizeof(Fts5Colset{})) + uint32((*Fts5Colset)(unsafe.Pointer(pColsetOrig)).FnCol-1)*uint32(unsafe.Sizeof(int32(0)))) - pColset = sqlite3Fts5MallocZero(tls, bp /* &rc */, nByte) + pColset = sqlite3Fts5MallocZero(tls, bp, nByte) if pColset != 0 { libc.Xmemcpy(tls, pColset, pColsetOrig, Size_t(nByte)) } @@ -178691,7 +178930,7 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN var p uintptr for p = pOrig + 20 + uintptr(i)*16; p != 0 && *(*int32)(unsafe.Pointer(bp /* rc */)) == SQLITE_OK; p = (*Fts5ExprTerm)(unsafe.Pointer(p)).FpSynonym { var zTerm uintptr = (*Fts5ExprTerm)(unsafe.Pointer(p)).FzTerm - *(*int32)(unsafe.Pointer(bp /* rc */)) = fts5ParseTokenize(tls, bp+4 /* &sCtx */, tflags, zTerm, int32(libc.Xstrlen(tls, zTerm)), + *(*int32)(unsafe.Pointer(bp /* rc */)) = fts5ParseTokenize(tls, bp+4, tflags, zTerm, int32(libc.Xstrlen(tls, zTerm)), 0, 0) tflags = FTS5_TOKEN_COLOCATED } @@ -178703,7 +178942,7 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN } else { // This happens when parsing a token or quoted phrase that contains // no token characters at all. (e.g ... MATCH '""'). - (*TokenCtx)(unsafe.Pointer(bp + 4 /* &sCtx */)).FpPhrase = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64(unsafe.Sizeof(Fts5ExprPhrase{}))) + (*TokenCtx)(unsafe.Pointer(bp + 4 /* &sCtx */)).FpPhrase = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5ExprPhrase{}))) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK && (*TokenCtx)(unsafe.Pointer(bp+4)).FpPhrase != 0 { @@ -178742,17 +178981,17 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // Token pTok has appeared in a MATCH expression where the NEAR operator // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. -func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:221164:13: */ +func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:221204:13: */ bp := tls.Alloc(16) defer tls.Free(16) - if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34241, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { + if (*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4 || libc.Xmemcmp(tls, ts+34410, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint32(4)) != 0 { sqlite3Fts5ParseError(tls, - pParse, ts+33270 /* "fts5: syntax err..." */, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) + pParse, ts+33439, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(pTok)).Fn, (*Fts5Token)(unsafe.Pointer(pTok)).Fp)) } } -func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:221172:13: */ +func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:221212:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -178764,7 +179003,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p var c int8 = *(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i))) if int32(c) < '0' || int32(c) > '9' { sqlite3Fts5ParseError(tls, - pParse, ts+34246 /* "expected integer..." */, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) + pParse, ts+34415, libc.VaList(bp, (*Fts5Token)(unsafe.Pointer(p)).Fn, (*Fts5Token)(unsafe.Pointer(p)).Fp)) return } nNear = nNear*10 + (int32(*(*int8)(unsafe.Pointer((*Fts5Token)(unsafe.Pointer(p)).Fp + uintptr(i)))) - '0') @@ -178783,7 +179022,7 @@ func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p // // If an OOM error occurs, store an error code in pParse and return NULL. // The old colset object (if any) is not freed in this case. -func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:221207:19: */ +func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintptr { /* sqlite3.c:221247:19: */ var nCol int32 if p != 0 { nCol = (*Fts5Colset)(unsafe.Pointer(p)).FnCol @@ -178821,7 +179060,7 @@ func fts5ParseColset(tls *libc.TLS, pParse uintptr, p uintptr, iCol int32) uintp // Allocate and return an Fts5Colset object specifying the inverse of // the colset passed as the second argument. Free the colset passed // as the second argument before returning. -func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:221248:19: */ +func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uintptr { /* sqlite3.c:221288:19: */ var pRet uintptr var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FnCol @@ -178843,7 +179082,7 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint return pRet } -func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:221271:19: */ +func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:221311:19: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -178861,7 +179100,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui } } if iCol == (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol { - sqlite3Fts5ParseError(tls, pParse, ts+20177 /* "no such column: ..." */, libc.VaList(bp, z)) + sqlite3Fts5ParseError(tls, pParse, ts+20346, libc.VaList(bp, z)) } else { pRet = fts5ParseColset(tls, pParse, pColset, iCol) } @@ -178882,7 +179121,7 @@ func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p ui // Otherwise, a copy of (*pOrig) is made into memory obtained from // sqlite3Fts5MallocZero() and a pointer to it returned. If the allocation // fails, (*pRc) is set to SQLITE_NOMEM and NULL is returned. -func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:221311:19: */ +func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sqlite3.c:221351:19: */ var pRet uintptr if pOrig != 0 { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(Fts5Colset{})) + uint32((*Fts5Colset)(unsafe.Pointer(pOrig)).FnCol-1)*uint32(unsafe.Sizeof(int32(0)))) @@ -178897,7 +179136,7 @@ func fts5CloneColset(tls *libc.TLS, pRc uintptr, pOrig uintptr) uintptr { /* sql } // Remove from colset pColset any columns that are not also in colset pMerge. -func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:221328:13: */ +func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite3.c:221368:13: */ var iIn int32 = 0 // Next input in pColset var iMerge int32 = 0 // Next input in pMerge var iOut int32 = 0 // Next output slot in pColset @@ -178921,7 +179160,7 @@ func fts5MergeColset(tls *libc.TLS, pColset uintptr, pMerge uintptr) { /* sqlite // its decendents. If (*ppFree) is not NULL, it contains a spare copy // of pColset. This function may use the spare copy and set (*ppFree) to // zero, or it may create copies of pColset using fts5CloneColset(). -func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:221354:13: */ +func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset uintptr, ppFree uintptr) { /* sqlite3.c:221394:13: */ if (*Fts5Parse)(unsafe.Pointer(pParse)).Frc == SQLITE_OK { if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM { @@ -178949,21 +179188,21 @@ func fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pNode uintptr, pColset ui } // Apply colset pColset to expression node pExpr and all of its descendents. -func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:221392:13: */ +func sqlite3Fts5ParseSetColset(tls *libc.TLS, pParse uintptr, pExpr uintptr, pColset uintptr) { /* sqlite3.c:221432:13: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* pFree */)) = pColset if (*Fts5Config)(unsafe.Pointer((*Fts5Parse)(unsafe.Pointer(pParse)).FpConfig)).FeDetail == FTS5_DETAIL_NONE { sqlite3Fts5ParseError(tls, pParse, - ts+34275 /* "fts5: column que..." */, 0) + ts+34444, 0) } else { - fts5ParseSetColset(tls, pParse, pExpr, pColset, bp /* &pFree */) + fts5ParseSetColset(tls, pParse, pExpr, pColset, bp) } Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp /* pFree */))) } -func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:221408:13: */ +func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:221448:13: */ switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { case FTS5_STRING: { @@ -179014,7 +179253,7 @@ func fts5ExprAssignXNext(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:221408:13: } } -func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:221441:13: */ +func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c:221481:13: */ if (*Fts5ExprNode)(unsafe.Pointer(p)).FeType != FTS5_NOT && (*Fts5ExprNode)(unsafe.Pointer(pSub)).FeType == (*Fts5ExprNode)(unsafe.Pointer(p)).FeType { var nByte int32 = int32(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5ExprNode)(unsafe.Pointer(pSub)).FnChild)) libc.Xmemcpy(tls, p+32+uintptr((*Fts5ExprNode)(unsafe.Pointer(p)).FnChild)*4, pSub+32, uint32(nByte)) @@ -179034,7 +179273,7 @@ func fts5ExprAddChildren(tls *libc.TLS, p uintptr, pSub uintptr) { /* sqlite3.c: // into an AND tree: // // abc AND def AND ghi -func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:221463:21: */ +func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr { /* sqlite3.c:221503:21: */ var nTerm int32 = (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pNear + 12)))).FnTerm var ii int32 var nByte int32 @@ -179077,7 +179316,7 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. -func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:221517:21: */ +func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:221557:21: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -179137,12 +179376,12 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 1 || (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FnTerm > 0 && (*Fts5ExprTerm)(unsafe.Pointer(pPhrase+20)).FbFirst != 0 { sqlite3Fts5ParseError(tls, pParse, - ts+34328, /* "fts5: %s queries..." */ + ts+34497, libc.VaList(bp, func() uintptr { if (*Fts5ExprNearset)(unsafe.Pointer(pNear)).FnPhrase == 1 { - return ts + 34378 /* "phrase" */ + return ts + 34547 /* "phrase" */ } - return ts + 34241 /* "NEAR" */ + return ts + 34410 /* "NEAR" */ }())) Xsqlite3_free(tls, pRet) pRet = uintptr(0) @@ -179165,7 +179404,7 @@ func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uint return pRet } -func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:221599:21: */ +func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:221639:21: */ var pRet uintptr = uintptr(0) var pPrev uintptr @@ -179211,7 +179450,7 @@ func sqlite3Fts5ParseImplicitAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, p // This is called during initialization to register the fts5_expr() scalar // UDF with the SQLite handle passed as the only argument. -func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:222036:12: */ +func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:222076:12: */ var rc int32 = SQLITE_OK _ = pGlobal _ = db @@ -179224,7 +179463,7 @@ func sqlite3Fts5ExprInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* } // Return the number of phrases in expression pExpr. -func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:222073:12: */ +func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3.c:222113:12: */ return func() int32 { if pExpr != 0 { return (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase @@ -179234,7 +179473,7 @@ func sqlite3Fts5ExprPhraseCount(tls *libc.TLS, pExpr uintptr) int32 { /* sqlite3 } // Return the number of terms in the iPhrase'th phrase in pExpr. -func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:222080:12: */ +func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int32 { /* sqlite3.c:222120:12: */ if iPhrase < 0 || iPhrase >= (*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase { return 0 } @@ -179243,7 +179482,7 @@ func sqlite3Fts5ExprPhraseSize(tls *libc.TLS, pExpr uintptr, iPhrase int32) int3 // This function is used to access the current position list for phrase // iPhrase. -func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:222089:12: */ +func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uintptr) int32 { /* sqlite3.c:222129:12: */ var nRet int32 var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode @@ -179264,7 +179503,7 @@ func sqlite3Fts5ExprPoslist(tls *libc.TLS, pExpr uintptr, iPhrase int32, pa uint // At present this function is only used for detail=col and detail=none // fts5 tables. This implies that all phrases must be at most 1 token // in size, as phrase matches are not supported without detail=full. -func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:222118:29: */ +func sqlite3Fts5ExprClearPoslists(tls *libc.TLS, pExpr uintptr, bLive int32) uintptr { /* sqlite3.c:222158:29: */ var pRet uintptr pRet = Xsqlite3_malloc64(tls, uint64(uint32(unsafe.Sizeof(Fts5PoslistPopulator{}))*uint32((*Fts5Expr)(unsafe.Pointer(pExpr)).FnPhrase))) if pRet != 0 { @@ -179288,12 +179527,12 @@ type Fts5ExprCtx1 = struct { FpExpr uintptr FaPopulator uintptr FiOff I64 -} /* sqlite3.c:222140:1 */ +} /* sqlite3.c:222180:1 */ -type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:222145:28 */ +type Fts5ExprCtx = Fts5ExprCtx1 /* sqlite3.c:222185:28 */ // TODO: Make this more efficient! -func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:222150:12: */ +func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:222190:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -179303,7 +179542,7 @@ func fts5ExprColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* s return 0 } -func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222158:12: */ +func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:222198:12: */ var p uintptr = pCtx var pExpr uintptr = (*Fts5ExprCtx)(unsafe.Pointer(p)).FpExpr var i int32 @@ -179338,7 +179577,7 @@ func fts5ExprPopulatePoslistsCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToke return SQLITE_OK } -func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:222193:12: */ +func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintptr, aPopulator uintptr, iCol int32, z uintptr, n int32) int32 { /* sqlite3.c:222233:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -179361,12 +179600,12 @@ func sqlite3Fts5ExprPopulatePoslists(tls *libc.TLS, pConfig uintptr, pExpr uintp } return sqlite3Fts5Tokenize(tls, pConfig, - FTS5_TOKENIZE_DOCUMENT, z, n, bp /* &sCtx */, *(*uintptr)(unsafe.Pointer(&struct { + FTS5_TOKENIZE_DOCUMENT, z, n, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5ExprPopulatePoslistsCb}))) } -func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222223:13: */ +func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222263:13: */ if (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_TERM || (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType == FTS5_STRING { (*Fts5ExprPhrase)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((*Fts5ExprNode)(unsafe.Pointer(pNode)).FpNear + 12)))).Fposlist.Fn = 0 } else { @@ -179377,7 +179616,7 @@ func fts5ExprClearPoslists(tls *libc.TLS, pNode uintptr) { /* sqlite3.c:222223:1 } } -func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:222234:12: */ +func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* sqlite3.c:222274:12: */ (*Fts5ExprNode)(unsafe.Pointer(pNode)).FiRowid = iRowid (*Fts5ExprNode)(unsafe.Pointer(pNode)).FbEof = 0 switch (*Fts5ExprNode)(unsafe.Pointer(pNode)).FeType { @@ -179427,12 +179666,12 @@ func fts5ExprCheckPoslists(tls *libc.TLS, pNode uintptr, iRowid I64) int32 { /* return 1 } -func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:222278:13: */ +func sqlite3Fts5ExprCheckPoslists(tls *libc.TLS, pExpr uintptr, iRowid I64) { /* sqlite3.c:222318:13: */ fts5ExprCheckPoslists(tls, (*Fts5Expr)(unsafe.Pointer(pExpr)).FpRoot, iRowid) } // This function is only called for detail=columns tables. -func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:222285:12: */ +func sqlite3Fts5ExprPhraseCollist(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppCollist uintptr, pnCollist uintptr) int32 { /* sqlite3.c:222325:12: */ var pPhrase uintptr = *(*uintptr)(unsafe.Pointer((*Fts5Expr)(unsafe.Pointer(pExpr)).FapExprPhrase + uintptr(iPhrase)*4)) var pNode uintptr = (*Fts5ExprPhrase)(unsafe.Pointer(pPhrase)).FpNode var rc int32 = SQLITE_OK @@ -179483,7 +179722,7 @@ type Fts5HashEntry1 = struct { FiCol I16 FiPos int32 FiRowid I64 -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ // 2014 August 11 // @@ -179499,14 +179738,14 @@ type Fts5HashEntry1 = struct { // #include "fts5Int.h" -type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:222338:30 */ +type Fts5HashEntry = Fts5HashEntry1 /* sqlite3.c:222378:30 */ // Eqivalent to: // // char *fts5EntryKey(Fts5HashEntry *pEntry){ return zKey; } // Allocate a new hash table. -func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:222404:12: */ +func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte uintptr) int32 { /* sqlite3.c:222444:12: */ var rc int32 = SQLITE_OK var pNew uintptr @@ -179534,7 +179773,7 @@ func sqlite3Fts5HashNew(tls *libc.TLS, pConfig uintptr, ppNew uintptr, pnByte ui } // Free a hash table object. -func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:222434:13: */ +func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:222474:13: */ if pHash != 0 { sqlite3Fts5HashClear(tls, pHash) Xsqlite3_free(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FaSlot) @@ -179543,7 +179782,7 @@ func sqlite3Fts5HashFree(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:222434:13: } // Empty (but do not delete) a hash table. -func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:222445:13: */ +func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:222485:13: */ var i int32 for i = 0; i < (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot; i++ { var pNext uintptr @@ -179557,7 +179796,7 @@ func sqlite3Fts5HashClear(tls *libc.TLS, pHash uintptr) { /* sqlite3.c:222445:13 (*Fts5Hash)(unsafe.Pointer(pHash)).FnEntry = 0 } -func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:222459:21: */ +func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sqlite3.c:222499:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -179566,7 +179805,7 @@ func fts5HashKey(tls *libc.TLS, nSlot int32, p uintptr, n int32) uint32 { /* sql return h % uint32(nSlot) } -func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:222468:21: */ +func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { /* sqlite3.c:222508:21: */ var i int32 var h uint32 = uint32(13) for i = n - 1; i >= 0; i-- { @@ -179577,7 +179816,7 @@ func fts5HashKey2(tls *libc.TLS, nSlot int32, b U8, p uintptr, n int32) uint32 { } // Resize the hash table by doubling the number of slots. -func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:222481:12: */ +func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:222521:12: */ var nNew int32 = (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot * 2 var i int32 var apNew uintptr @@ -179607,7 +179846,7 @@ func fts5HashResize(tls *libc.TLS, pHash uintptr) int32 { /* sqlite3.c:222481:12 return SQLITE_OK } -func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:222509:12: */ +func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) int32 { /* sqlite3.c:222549:12: */ var nRet int32 = 0 if (*Fts5HashEntry)(unsafe.Pointer(p)).FiSzPoslist != 0 { var pPtr uintptr @@ -179656,7 +179895,7 @@ func fts5HashAddPoslistSize(tls *libc.TLS, pHash uintptr, p uintptr, p2 uintptr) // (bByte || pToken) -> (iRowid,iCol,iPos) // // Or, if iCol is negative, then the value is a delete marker. -func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:222560:12: */ +func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, iPos int32, bByte int8, pToken uintptr, nToken int32) int32 { /* sqlite3.c:222600:12: */ var iHash uint32 var p uintptr var pPtr uintptr @@ -179815,7 +180054,7 @@ func sqlite3Fts5HashWrite(tls *libc.TLS, pHash uintptr, iRowid I64, iCol int32, // Arguments pLeft and pRight point to linked-lists of hash-entry objects, // each sorted in key order. This function merges the two lists into a // single list and returns a pointer to its first element. -func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:222713:22: */ +func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { /* sqlite3.c:222753:22: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -179861,7 +180100,7 @@ func fts5HashEntryMerge(tls *libc.TLS, pLeft uintptr, pRight uintptr) uintptr { // in sorted order. The hash table is cleared before returning. It is // the responsibility of the caller to free the elements of the returned // list. -func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:222759:12: */ +func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, ppSorted uintptr) int32 { /* sqlite3.c:222799:12: */ var nMergeSlot int32 = 32 var ap uintptr var pList uintptr @@ -179903,7 +180142,7 @@ func fts5HashEntrySort(tls *libc.TLS, pHash uintptr, pTerm uintptr, nTerm int32, } // Query the hash table for a doclist associated with term pTerm/nTerm. -func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:222806:12: */ +func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintptr, nTerm int32, ppOut uintptr, pnDoclist uintptr) int32 { /* sqlite3.c:222846:12: */ var iHash uint32 = fts5HashKey(tls, (*Fts5Hash)(unsafe.Pointer(pHash)).FnSlot, pTerm, nTerm) var zKey uintptr = uintptr(0) var p uintptr @@ -179937,20 +180176,20 @@ func sqlite3Fts5HashQuery(tls *libc.TLS, pHash uintptr, nPre int32, pTerm uintpt return SQLITE_OK } -func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:222844:12: */ +func sqlite3Fts5HashScanInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32) int32 { /* sqlite3.c:222884:12: */ return fts5HashEntrySort(tls, p, pTerm, nTerm, p+16) } -func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:222851:13: */ +func sqlite3Fts5HashScanNext(tls *libc.TLS, p uintptr) { /* sqlite3.c:222891:13: */ (*Fts5Hash)(unsafe.Pointer(p)).FpScan = (*Fts5HashEntry)(unsafe.Pointer((*Fts5Hash)(unsafe.Pointer(p)).FpScan)).FpScanNext } -func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222856:12: */ +func sqlite3Fts5HashScanEof(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:222896:12: */ return libc.Bool32((*Fts5Hash)(unsafe.Pointer(p)).FpScan == uintptr(0)) } -func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:222860:13: */ +func sqlite3Fts5HashScanEntry(tls *libc.TLS, pHash uintptr, pzTerm uintptr, ppDoclist uintptr, pnDoclist uintptr) { /* sqlite3.c:222900:13: */ var p uintptr if libc.AssignUintptr(&p, (*Fts5Hash)(unsafe.Pointer(pHash)).FpScan) != 0 { var zKey uintptr = p + 1*40 @@ -180176,7 +180415,7 @@ type Fts5Data1 = struct { Fp uintptr Fnn int32 FszLeaf int32 -} /* sqlite3.c:223135:9 */ +} /* sqlite3.c:223175:9 */ // 2014 May 31 // @@ -180384,14 +180623,14 @@ type Fts5Data1 = struct { // many zero bytes. This makes it easier to decode the various record formats // without overreading if the records are corrupt. -type Fts5Data = Fts5Data1 /* sqlite3.c:223135:25 */ +type Fts5Data = Fts5Data1 /* sqlite3.c:223175:25 */ type Fts5DlidxIter1 = struct { FnLvl int32 FiSegid int32 FaLvl [1]Fts5DlidxLvl -} /* sqlite3.c:223136:9 */ +} /* sqlite3.c:223176:9 */ -type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:223136:30 */ +type Fts5DlidxIter = Fts5DlidxIter1 /* sqlite3.c:223176:30 */ type Fts5DlidxLvl1 = struct { FpData uintptr FiOff int32 @@ -180399,17 +180638,17 @@ type Fts5DlidxLvl1 = struct { FiFirstOff int32 FiLeafPgno int32 FiRowid I64 -} /* sqlite3.c:223136:9 */ +} /* sqlite3.c:223176:9 */ -type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:223137:29 */ +type Fts5DlidxLvl = Fts5DlidxLvl1 /* sqlite3.c:223177:29 */ type Fts5DlidxWriter1 = struct { Fpgno int32 FbPrevValid int32 FiPrev I64 Fbuf Fts5Buffer -} /* sqlite3.c:223138:9 */ +} /* sqlite3.c:223178:9 */ -type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:223138:32 */ +type Fts5DlidxWriter = Fts5DlidxWriter1 /* sqlite3.c:223178:32 */ type Fts5Iter1 = struct { Fbase Fts5IndexIter FpIndex uintptr @@ -180423,18 +180662,18 @@ type Fts5Iter1 = struct { FiSwitchRowid I64 FaFirst uintptr FaSeg [1]Fts5SegIter -} /* sqlite3.c:223139:9 */ +} /* sqlite3.c:223179:9 */ -type Fts5Iter = Fts5Iter1 /* sqlite3.c:223139:25 */ +type Fts5Iter = Fts5Iter1 /* sqlite3.c:223179:25 */ type Fts5PageWriter1 = struct { Fpgno int32 FiPrevPgidx int32 Fbuf Fts5Buffer Fpgidx Fts5Buffer Fterm Fts5Buffer -} /* sqlite3.c:223140:9 */ +} /* sqlite3.c:223180:9 */ -type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:223140:31 */ +type Fts5PageWriter = Fts5PageWriter1 /* sqlite3.c:223180:31 */ type Fts5SegIter1 = struct { FpSeg uintptr Fflags int32 @@ -180456,18 +180695,18 @@ type Fts5SegIter1 = struct { FnPos int32 FbDel U8 F__ccgo_pad1 [3]byte -} /* sqlite3.c:223139:9 */ +} /* sqlite3.c:223179:9 */ -type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:223141:28 */ +type Fts5SegIter = Fts5SegIter1 /* sqlite3.c:223181:28 */ type Fts5DoclistIter1 = struct { FaEof uintptr FiRowid I64 FaPoslist uintptr FnPoslist int32 FnSize int32 -} /* sqlite3.c:223142:9 */ +} /* sqlite3.c:223182:9 */ -type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:223142:32 */ +type Fts5DoclistIter = Fts5DoclistIter1 /* sqlite3.c:223182:32 */ type Fts5SegWriter1 = struct { FiSegid int32 Fwriter Fts5PageWriter @@ -180482,47 +180721,47 @@ type Fts5SegWriter1 = struct { FaDlidx uintptr Fbtterm Fts5Buffer FiBtPage int32 -} /* sqlite3.c:223143:9 */ +} /* sqlite3.c:223183:9 */ -type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:223143:30 */ +type Fts5SegWriter = Fts5SegWriter1 /* sqlite3.c:223183:30 */ type Fts5Structure1 = struct { FnRef int32 FnWriteCounter U64 FnSegment int32 FnLevel int32 FaLevel [1]Fts5StructureLevel -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5Structure = Fts5Structure1 /* sqlite3.c:223144:30 */ +type Fts5Structure = Fts5Structure1 /* sqlite3.c:223184:30 */ type Fts5StructureLevel1 = struct { FnMerge int32 FnSeg int32 FaSeg uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:223145:35 */ +type Fts5StructureLevel = Fts5StructureLevel1 /* sqlite3.c:223185:35 */ type Fts5StructureSegment1 = struct { FiSegid int32 FpgnoFirst int32 FpgnoLast int32 -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:223146:37 */ +type Fts5StructureSegment = Fts5StructureSegment1 /* sqlite3.c:223186:37 */ type Fts5CResult1 = struct { FiFirst U16 FbTermEq U8 F__ccgo_pad1 [1]byte -} /* sqlite3.c:223139:9 */ +} /* sqlite3.c:223179:9 */ -type Fts5CResult = Fts5CResult1 /* sqlite3.c:223256:28 */ +type Fts5CResult = Fts5CResult1 /* sqlite3.c:223296:28 */ -func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:223435:13: */ +func fts5PutU16(tls *libc.TLS, aOut uintptr, iVal U16) { /* sqlite3.c:223475:13: */ *(*U8)(unsafe.Pointer(aOut)) = U8(int32(iVal) >> 8) *(*U8)(unsafe.Pointer(aOut + 1)) = U8(int32(iVal) & 0xFF) } -func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:223440:12: */ +func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:223480:12: */ return U16(int32(U16(*(*U8)(unsafe.Pointer(aIn))))<<8 + int32(*(*U8)(unsafe.Pointer(aIn + 1)))) } @@ -180530,7 +180769,7 @@ func fts5GetU16(tls *libc.TLS, aIn uintptr) U16 { /* sqlite3.c:223440:12: */ // // If an OOM error is encountered, return NULL and set the error code in // the Fts5Index handle passed as the first argument. -func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:223450:13: */ +func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* sqlite3.c:223490:13: */ return sqlite3Fts5MallocZero(tls, p+32, nByte) } @@ -180548,7 +180787,7 @@ func fts5IdxMalloc(tls *libc.TLS, p uintptr, nByte Sqlite3_int64) uintptr { /* s // +ve if pRight is smaller than pLeft. In other words: // // res = *pLeft - *pRight -func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:223482:12: */ +func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* sqlite3.c:223522:12: */ var nCmp int32 var res int32 nCmp = func() int32 { @@ -180572,18 +180811,18 @@ func fts5BufferCompare(tls *libc.TLS, pLeft uintptr, pRight uintptr) int32 { /* }() } -func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:223491:12: */ +func fts5LeafFirstTermOff(tls *libc.TLS, pLeaf uintptr) int32 { /* sqlite3.c:223531:12: */ bp := tls.Alloc(4) defer tls.Free(4) // var ret int32 at bp, 4 - sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf), bp /* &ret */) + sqlite3Fts5GetVarint32(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf), bp) return *(*int32)(unsafe.Pointer(bp /* ret */)) } // Close the read-only blob handle, if it is open. -func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:223500:13: */ +func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:223540:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpReader != 0 { var pReader uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpReader (*Fts5Index)(unsafe.Pointer(p)).FpReader = uintptr(0) @@ -180595,7 +180834,7 @@ func sqlite3Fts5IndexCloseReader(tls *libc.TLS, p uintptr) { /* sqlite3.c:223500 // // If an error occurs, NULL is returned and an error left in the // Fts5Index object. -func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:223514:17: */ +func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:223554:17: */ var pRet uintptr = uintptr(0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var rc int32 = SQLITE_OK @@ -180622,7 +180861,7 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 if (*Fts5Index)(unsafe.Pointer(p)).FpReader == uintptr(0) && rc == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, - (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34385 /* "block" */, iRowid, 0, p+36) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, ts+34554, iRowid, 0, p+36) } // If either of the sqlite3_blob_open() or sqlite3_blob_reopen() calls @@ -180668,11 +180907,11 @@ func fts5DataRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 // Release a reference to data record returned by an earlier call to // fts5DataRead(). -func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:223588:13: */ +func fts5DataRelease(tls *libc.TLS, pData uintptr) { /* sqlite3.c:223628:13: */ Xsqlite3_free(tls, pData) } -func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:223592:17: */ +func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:223632:17: */ var pRet uintptr = fts5DataRead(tls, p, iRowid) if pRet != 0 { if (*Fts5Data)(unsafe.Pointer(pRet)).Fnn < 4 || (*Fts5Data)(unsafe.Pointer(pRet)).FszLeaf > (*Fts5Data)(unsafe.Pointer(pRet)).Fnn { @@ -180684,7 +180923,7 @@ func fts5LeafRead(tls *libc.TLS, p uintptr, iRowid I64) uintptr { /* sqlite3.c:2 return pRet } -func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:223604:12: */ +func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr) int32 { /* sqlite3.c:223644:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if zSql != 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fdb, zSql, -1, @@ -180699,7 +180938,7 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr } // INSERT OR REPLACE a record into the %_data table. -func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:223626:13: */ +func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:223666:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180710,7 +180949,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in if (*Fts5Index)(unsafe.Pointer(p)).FpWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+40, Xsqlite3_mprintf(tls, - ts+34391, /* "REPLACE INTO '%q..." */ + ts+34560, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return @@ -180727,7 +180966,7 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // Execute the following SQL: // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast -func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:223650:13: */ +func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:223690:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180738,7 +180977,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite if (*Fts5Index)(unsafe.Pointer(p)).FpDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig var zSql uintptr = Xsqlite3_mprintf(tls, - ts+34442, /* "DELETE FROM '%q'..." */ + ts+34611, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if fts5IndexPrepareStmt(tls, p, p+44, zSql) != 0 { return @@ -180752,7 +180991,7 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite } // Remove all records associated with segment iSegid. -func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:223671:13: */ +func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:223711:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180762,7 +181001,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. if (*Fts5Index)(unsafe.Pointer(p)).FpIdxDeleter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+52, Xsqlite3_mprintf(tls, - ts+34491, /* "DELETE FROM '%q'..." */ + ts+34660, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -180774,7 +181013,7 @@ func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3. // Release a reference to an Fts5Structure object returned by an earlier // call to fts5StructureRead() or fts5StructureDecode(). -func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:223693:13: */ +func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:223733:13: */ if pStruct != 0 && 0 >= libc.PreDecInt32(&(*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef, 1) { var i int32 @@ -180785,22 +181024,22 @@ func fts5StructureRelease(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:223693: } } -func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:223704:13: */ +func fts5StructureRef(tls *libc.TLS, pStruct uintptr) { /* sqlite3.c:223744:13: */ (*Fts5Structure)(unsafe.Pointer(pStruct)).FnRef++ } -func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:223708:13: */ +func sqlite3Fts5StructureRef(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:223748:13: */ fts5StructureRef(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:223712:13: */ +func sqlite3Fts5StructureRelease(tls *libc.TLS, p uintptr) { /* sqlite3.c:223752:13: */ if p != 0 { fts5StructureRelease(tls, p) } } -func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:223717:12: */ +func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:223757:12: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != pStruct { return SQLITE_ABORT } @@ -180811,7 +181050,7 @@ func sqlite3Fts5StructureTest(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { // // This function is a no-op if (*pRc) is not SQLITE_OK when it is called. If // an error occurs, (*pRc) is set to an SQLite error code before returning. -func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:223730:13: */ +func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqlite3.c:223770:13: */ var p uintptr = *(*uintptr)(unsafe.Pointer(pp)) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK && (*Fts5Structure)(unsafe.Pointer(p)).FnRef > 1 { var nByte I64 = I64(uint32(unsafe.Sizeof(Fts5Structure{})) + uint32((*Fts5Structure)(unsafe.Pointer(p)).FnLevel-1)*uint32(unsafe.Sizeof(Fts5StructureLevel{}))) @@ -180853,7 +181092,7 @@ func fts5StructureMakeWritable(tls *libc.TLS, pRc uintptr, pp uintptr) { /* sqli // If an error occurs, *ppOut is set to NULL and an SQLite error code // returned. Otherwise, *ppOut is set to point to the new object and // SQLITE_OK returned. -func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:223772:12: */ +func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uintptr, ppOut uintptr) int32 { /* sqlite3.c:223812:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -180880,7 +181119,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin return SQLITE_CORRUPT | int32(1)<<8 } nByte = Sqlite3_int64(uint32(unsafe.Sizeof(Fts5Structure{})) + uint32(unsafe.Sizeof(Fts5StructureLevel{}))*uint32(*(*int32)(unsafe.Pointer(bp))-1)) - pRet = sqlite3Fts5MallocZero(tls, bp+8 /* &rc */, nByte) + pRet = sqlite3Fts5MallocZero(tls, bp+8, nByte) if pRet != 0 { (*Fts5Structure)(unsafe.Pointer(pRet)).FnRef = 1 @@ -180901,7 +181140,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin if *(*int32)(unsafe.Pointer(bp + 12)) < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_CORRUPT | int32(1)<<8 } - (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg = sqlite3Fts5MallocZero(tls, bp+8, /* &rc */ + (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg = sqlite3Fts5MallocZero(tls, bp+8, int64(uint32(*(*int32)(unsafe.Pointer(bp + 12)))*uint32(unsafe.Sizeof(Fts5StructureSegment{})))) *(*int32)(unsafe.Pointer(bp + 4 /* nSegment */)) -= *(*int32)(unsafe.Pointer(bp + 12 /* nTotal */)) } @@ -180946,7 +181185,7 @@ func fts5StructureDecode(tls *libc.TLS, pData uintptr, nData int32, piCookie uin // Add a level to the Fts5Structure.aLevel[] array of structure object // (*ppStruct). -func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:223864:13: */ +func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sqlite3.c:223904:13: */ fts5StructureMakeWritable(tls, pRc, ppStruct) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) @@ -180966,7 +181205,7 @@ func fts5StructureAddLevel(tls *libc.TLS, pRc uintptr, ppStruct uintptr) { /* sq // Extend level iLvl so that there is room for at least nExtra more // segments. -func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:223889:13: */ +func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl int32, nExtra int32, bInsert int32) { /* sqlite3.c:223929:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pLvl uintptr = pStruct + 20 + uintptr(iLvl)*12 var aNew uintptr @@ -180989,7 +181228,7 @@ func fts5StructureExtendLevel(tls *libc.TLS, pRc uintptr, pStruct uintptr, iLvl } } -func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:223918:22: */ +func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:223958:22: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181003,7 +181242,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { // TODO: Do we need this if the leaf-index is appended? Probably... libc.Xmemset(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5Data)(unsafe.Pointer(pData)).Fnn), 0, uint32(FTS5_DATA_PADDING)) - (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5StructureDecode(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp, (*Fts5Data)(unsafe.Pointer(pData)).Fnn, bp /* &iCookie */, bp+4 /* &pRet */) + (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5StructureDecode(tls, (*Fts5Data)(unsafe.Pointer(pData)).Fp, (*Fts5Data)(unsafe.Pointer(pData)).Fnn, bp, bp+4) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && ((*Fts5Config)(unsafe.Pointer(pConfig)).Fpgsz == 0 || (*Fts5Config)(unsafe.Pointer(pConfig)).FiCookie != *(*int32)(unsafe.Pointer(bp))) { (*Fts5Index)(unsafe.Pointer(p)).Frc = sqlite3Fts5ConfigLoad(tls, pConfig, *(*int32)(unsafe.Pointer(bp /* iCookie */))) } @@ -181017,7 +181256,7 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: return *(*uintptr)(unsafe.Pointer(bp + 4 /* pRet */)) } -func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:223942:12: */ +func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:223982:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181026,7 +181265,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:223942:12 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { if (*Fts5Index)(unsafe.Pointer(p)).FpDataVersion == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).Frc = fts5IndexPrepareStmt(tls, p, p+64, - Xsqlite3_mprintf(tls, ts+34531 /* "PRAGMA %Q.data_v..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) + Xsqlite3_mprintf(tls, ts+34700, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FzDb))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return int64(0) } @@ -181050,7 +181289,7 @@ func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:223942:12 // If an error occurs, NULL is returned and an error code left in the // Fts5Index handle. If an error has already occurred when this function // is called, it is a no-op. -func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:223973:22: */ +func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:224013:22: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct == uintptr(0) { (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion = fts5IndexDataVersion(tls, p) @@ -181067,7 +181306,7 @@ func fts5StructureRead(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:223973:2 return (*Fts5Index)(unsafe.Pointer(p)).FpStruct } -func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:224012:13: */ +func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:224052:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpStruct != 0 { fts5StructureRelease(tls, (*Fts5Index)(unsafe.Pointer(p)).FpStruct) (*Fts5Index)(unsafe.Pointer(p)).FpStruct = uintptr(0) @@ -181081,7 +181320,7 @@ func fts5StructureInvalidate(tls *libc.TLS, p uintptr) { /* sqlite3.c:224012:13: // // If an error occurs, leave an error code in the Fts5Index object. If an // error has already occurred, this function is a no-op. -func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:224055:13: */ +func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3.c:224095:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -181091,7 +181330,7 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. var iLvl int32 // Used to iterate through levels var iCookie int32 // Cookie value to store - libc.Xmemset(tls, bp /* &buf */, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) // Append the current configuration cookie iCookie = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FiCookie @@ -181119,29 +181358,29 @@ func fts5StructureWrite(tls *libc.TLS, p uintptr, pStruct uintptr) { /* sqlite3. for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { var iSeg int32 // Used to iterate through segments var pLvl uintptr = pStruct + 20 + uintptr(iLvl)*12 - sqlite3Fts5BufferAppendVarint(tls, p+32, bp /* &buf */, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp /* &buf */, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg)) for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnSeg; iSeg++ { - sqlite3Fts5BufferAppendVarint(tls, p+32, bp /* &buf */, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp /* &buf */, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp /* &buf */, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FiSegid)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoFirst)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FaSeg+uintptr(iSeg)*12)).FpgnoLast)) } } fts5DataWrite(tls, p, int64(FTS5_STRUCTURE_ROWID), (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fn) - sqlite3Fts5BufferFree(tls, bp /* &buf */) + sqlite3Fts5BufferFree(tls, bp) } } -func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:224110:12: */ +func fts5SegmentSize(tls *libc.TLS, pSeg uintptr) int32 { /* sqlite3.c:224150:12: */ return 1 + (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast - (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst } // Return a copy of index structure pStruct. Except, promote as many // segments as possible to level iPromote. If an OOM occurs, NULL is // returned. -func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:224119:13: */ +func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote int32, pStruct uintptr) { /* sqlite3.c:224159:13: */ var il int32 var is int32 var pOut uintptr = pStruct + 20 + uintptr(iPromote)*12 @@ -181184,7 +181423,7 @@ func fts5StructurePromoteTo(tls *libc.TLS, p uintptr, iPromote int32, szPromote // // If one or more segments are promoted, the structure object is updated // to reflect this. -func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:224162:13: */ +func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) { /* sqlite3.c:224202:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var iTst int32 var iPromote int32 = -1 @@ -181233,7 +181472,7 @@ func fts5StructurePromote(tls *libc.TLS, p uintptr, iLvl int32, pStruct uintptr) // Advance the iterator passed as the only argument. If the end of the // doclist-index page is reached, return non-zero. -func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:224213:12: */ +func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:224253:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181269,7 +181508,7 @@ func fts5DlidxLvlNext(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:224213:1 } // Advance the iterator passed as the only argument. -func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:224245:12: */ +func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:224285:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*28 if fts5DlidxLvlNext(tls, pLvl) != 0 { @@ -181290,7 +181529,7 @@ func fts5DlidxIterNextR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224265:12: */ +func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224305:12: */ return fts5DlidxIterNextR(tls, p, pIter, 0) } @@ -181303,7 +181542,7 @@ func fts5DlidxIterNext(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlit // // When this function is called pIter->iLeafPgno is the page number the // doclist is associated with (the one featuring the term). -func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:224280:12: */ +func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:224320:12: */ var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { fts5DlidxLvlNext(tls, pIter+8+uintptr(i)*28) @@ -181311,11 +181550,11 @@ func fts5DlidxIterFirst(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:22428 return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224289:12: */ +func fts5DlidxIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224329:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK || (*Fts5DlidxLvl)(unsafe.Pointer(pIter+8)).FbEof != 0) } -func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224293:13: */ +func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224333:13: */ var i int32 // Advance each level to the last entry on the last page @@ -181336,7 +181575,7 @@ func fts5DlidxIterLast(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:2 } // Move the iterator passed as the only argument to the previous entry. -func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:224316:12: */ +func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:224356:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181368,7 +181607,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:224316:1 } } - sqlite3Fts5GetVarint(tls, a+uintptr(iOff), bp /* &iVal */) + sqlite3Fts5GetVarint(tls, a+uintptr(iOff), bp) *(*I64)(unsafe.Pointer(pLvl + 20)) -= *(*I64)(unsafe.Pointer(bp)) (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FiLeafPgno-- @@ -181398,7 +181637,7 @@ func fts5DlidxLvlPrev(tls *libc.TLS, pLvl uintptr) int32 { /* sqlite3.c:224316:1 return (*Fts5DlidxLvl)(unsafe.Pointer(pLvl)).FbEof } -func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:224365:12: */ +func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int32 { /* sqlite3.c:224405:12: */ var pLvl uintptr = pIter + 8 + uintptr(iLvl)*28 if fts5DlidxLvlPrev(tls, pLvl) != 0 { @@ -181421,12 +181660,12 @@ func fts5DlidxIterPrevR(tls *libc.TLS, p uintptr, pIter uintptr, iLvl int32) int return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FbEof } -func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224388:12: */ +func fts5DlidxIterPrev(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224428:12: */ return fts5DlidxIterPrevR(tls, p, pIter, 0) } // Free a doclist-index iterator object allocated by fts5DlidxIterInit(). -func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:224395:13: */ +func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:224435:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5DlidxIter)(unsafe.Pointer(pIter)).FnLvl; i++ { @@ -181436,7 +181675,7 @@ func fts5DlidxIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:224395:13: * } } -func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:224405:22: */ +func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeafPg int32) uintptr { /* sqlite3.c:224445:22: */ var pIter uintptr = uintptr(0) var i int32 var bDone int32 = 0 @@ -181478,16 +181717,16 @@ func fts5DlidxIterInit(tls *libc.TLS, p uintptr, bRev int32, iSegid int32, iLeaf return pIter } -func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:224452:12: */ +func fts5DlidxIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:224492:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiRowid } -func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:224455:12: */ +func fts5DlidxIterPgno(tls *libc.TLS, pIter uintptr) int32 { /* sqlite3.c:224495:12: */ return (*Fts5DlidxLvl)(unsafe.Pointer(pIter + 8)).FiLeafPgno } // Load the next leaf page into the segment iterator. -func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224462:13: */ +func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224502:13: */ var pLeaf uintptr var pSeg uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -181517,7 +181756,7 @@ func fts5SegIterNextPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c // position list size field. Read the varint and return the number of bytes // read. Before returning, set *pnSz to the number of bytes in the position // list, and *pbDel to true if the delete flag is set, or false otherwise. -func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:224500:12: */ +func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) int32 { /* sqlite3.c:224540:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -181546,7 +181785,7 @@ func fts5GetPoslistSize(tls *libc.TLS, p uintptr, pnSz uintptr, pbDel uintptr) i // // Leave Fts5SegIter.iLeafOffset pointing to the first byte of the // position list content (if any). -func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224521:13: */ +func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224561:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -181591,7 +181830,7 @@ func fts5SegIterLoadNPos(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c } } -func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224550:13: */ +func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224590:13: */ var a uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fp // Buffer to read data from var iOff I64 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset @@ -181623,7 +181862,7 @@ func fts5SegIterLoadRowid(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // accordingly and leaves (Fts5SegIter.iLeafOffset) set to the content of // the first position list. The position list belonging to document // (Fts5SegIter.iRowid). -func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:224583:13: */ +func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { /* sqlite3.c:224623:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181657,7 +181896,7 @@ func fts5SegIterLoadTerm(tls *libc.TLS, p uintptr, pIter uintptr, nKeep int32) { fts5SegIterLoadRowid(tls, p, pIter) } -func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224616:13: */ +func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224656:13: */ if (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_REVERSE != 0 { (*Fts5SegIter)(unsafe.Pointer(pIter)).FxNext = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr) @@ -181679,7 +181918,7 @@ func fts5SegIterSetNext(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:224634:13: */ +func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* sqlite3.c:224674:13: */ if (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst == 0 { // This happens if the segment is being used as an input to an incremental // merge and all data has already been "trimmed". See function @@ -181720,7 +181959,7 @@ func fts5SegIterInit(tls *libc.TLS, p uintptr, pSeg uintptr, pIter uintptr) { /* // aRowidOffset[] and iRowidOffset variables. At this point the iterator // is in its regular state - Fts5SegIter.iLeafOffset points to the first // byte of the position list content associated with said rowid. -func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224683:13: */ +func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224723:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -181779,7 +182018,7 @@ func fts5SegIterReverseInitPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq } // -func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224736:13: */ +func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:224776:13: */ fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = uintptr(0) @@ -181801,8 +182040,12 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql var iRowidOff int32 iRowidOff = int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pNew)).Fp)) if iRowidOff != 0 { - (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pNew - (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iRowidOff) + if iRowidOff >= (*Fts5Data)(unsafe.Pointer(pNew)).FszLeaf { + (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 + } else { + (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf = pNew + (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafOffset = I64(iRowidOff) + } } } @@ -181825,7 +182068,7 @@ func fts5SegIterReverseNewPage(tls *libc.TLS, p uintptr, pIter uintptr) { /* sql // Return true if the iterator passed as the second argument currently // points to a delete marker. A delete marker is an entry with a 0 byte // position-list. -func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224788:12: */ +func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:224832:12: */ var pSeg uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf != 0 && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos == 0) } @@ -181833,7 +182076,7 @@ func fts5MultiIterIsEmpty(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sq // Advance iterator pIter to the next entry. // // This version of fts5SegIterNext() is only used by reverse iterators. -func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:224798:13: */ +func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused uintptr) { /* sqlite3.c:224842:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -181851,7 +182094,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u if (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FeDetail != FTS5_DETAIL_NONE { iOff = iOff + (*Fts5SegIter)(unsafe.Pointer(pIter)).FnPos } - sqlite3Fts5GetVarint(tls, a+uintptr(iOff), bp /* &iDelta */) + sqlite3Fts5GetVarint(tls, a+uintptr(iOff), bp) *(*I64)(unsafe.Pointer(pIter + 76)) -= I64(*(*U64)(unsafe.Pointer(bp))) } else { fts5SegIterReverseNewPage(tls, p, pIter) @@ -181862,7 +182105,7 @@ func fts5SegIterNext_Reverse(tls *libc.TLS, p uintptr, pIter uintptr, pbUnused u // // This version of fts5SegIterNext() is only used if detail=none and the // iterator is not a reverse direction iterator. -func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:224832:13: */ +func fts5SegIterNext_None(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:224876:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -181924,7 +182167,7 @@ __7: *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 12 /* zTerm */)) = uintptr(0) sqlite3Fts5HashScanNext(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) - sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp+12 /* &zTerm */, bp+16 /* &pList */, bp+20 /* &nList */) + sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp+12, bp+16, bp+20) if !(*(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0)) { goto __10 } @@ -181967,7 +182210,7 @@ next_none_eof: // If an error occurs, Fts5Index.rc is set to an appropriate error code. It // is not considered an error if the iterator reaches EOF. If an error has // already occurred when this function is called, it is a no-op. -func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:224904:13: */ +func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:224948:13: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -181991,12 +182234,12 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) if *(*int32)(unsafe.Pointer(bp + 24)) >= (*Fts5SegIter)(unsafe.Pointer(pIter)).FiEndofDoclist { bNewTerm = 1 if *(*int32)(unsafe.Pointer(bp + 24)) != fts5LeafFirstTermOff(tls, pLeaf) { - *(*int32)(unsafe.Pointer(bp + 24 /* iOff */)) += sqlite3Fts5GetVarint32(tls, a+uintptr(*(*int32)(unsafe.Pointer(bp + 24))), bp /* &nKeep */) + *(*int32)(unsafe.Pointer(bp + 24 /* iOff */)) += sqlite3Fts5GetVarint32(tls, a+uintptr(*(*int32)(unsafe.Pointer(bp + 24))), bp) } } else { // var iDelta U64 at bp+4, 8 - *(*int32)(unsafe.Pointer(bp + 24 /* iOff */)) += int32(sqlite3Fts5GetVarint(tls, a+uintptr(*(*int32)(unsafe.Pointer(bp + 24))), bp+4 /* &iDelta */)) + *(*int32)(unsafe.Pointer(bp + 24 /* iOff */)) += int32(sqlite3Fts5GetVarint(tls, a+uintptr(*(*int32)(unsafe.Pointer(bp + 24))), bp+4)) *(*I64)(unsafe.Pointer(pIter + 76)) += I64(*(*U64)(unsafe.Pointer(bp + 4))) } @@ -182009,7 +182252,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) if 0 == (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags&FTS5_SEGITER_ONETERM { sqlite3Fts5HashScanNext(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) - sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp+12 /* &zTerm */, bp+16 /* &pList */, bp+20 /* &nList */) + sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp+12, bp+16, bp+20) } if *(*uintptr)(unsafe.Pointer(bp + 16)) == uintptr(0) { fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) @@ -182092,7 +182335,7 @@ func fts5SegIterNext(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) // Iterator pIter currently points to the first rowid in a doclist. This // function sets the iterator up so that iterates in reverse order through // the doclist. -func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:225035:13: */ +func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:225079:13: */ var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var pLast uintptr = uintptr(0) var pgnoLast int32 = 0 @@ -182192,7 +182435,7 @@ func fts5SegIterReverse(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c: // There is a doclist-index associated with the final term on the current // page. If the current term is the last term on the page, load the // doclist-index from disk and initialize an iterator at (pIter->pDlidx). -func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:225124:13: */ +func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:225168:13: */ var iSeg int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FiSegid var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pLeaf uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf // Current leaf data @@ -182220,7 +182463,7 @@ func fts5SegIterLoadDlidx(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3. // iterator is left pointing to the smallest term in the segment that // is larger than the specified term, even if this term is not on the // current page. -func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:225158:13: */ +func fts5LeafSeek(tls *libc.TLS, p uintptr, bGe int32, pIter uintptr, pTerm uintptr, nTerm int32) { /* sqlite3.c:225202:13: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -182269,7 +182512,7 @@ __2: goto __4 } *(*U32)(unsafe.Pointer(bp + 12 /* iOff */))-- - *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+4 /* &nNew */)) + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+4)) __4: ; @@ -182360,7 +182603,7 @@ __17: goto __18 } *(*U32)(unsafe.Pointer(bp + 12 /* iOff */))-- - *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+8 /* &nKeep */)) + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+8)) __18: ; @@ -182404,7 +182647,7 @@ __27: *(*U32)(unsafe.Pointer(bp + 8 /* nKeep */)) = U32(0) *(*U32)(unsafe.Pointer(bp /* iTermOff */)) = *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) n = U32((*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf)).Fnn) - *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+4 /* &nNew */)) + *(*U32)(unsafe.Pointer(bp + 12 /* iOff */)) += U32(sqlite3Fts5GetVarint32(tls, a+uintptr(*(*U32)(unsafe.Pointer(bp + 12))), bp+4)) goto __24 __28: ; @@ -182454,7 +182697,7 @@ __31: fts5SegIterLoadNPos(tls, p, pIter) } -func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225284:21: */ +func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225328:21: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182462,7 +182705,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225284:2 var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+56, Xsqlite3_mprintf(tls, - ts+34554, /* "SELECT pgno FROM..." */ + ts+34723, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } return (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect @@ -182473,7 +182716,7 @@ func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:225284:2 // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:225303:13: */ +func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pSeg uintptr, pIter uintptr) { /* sqlite3.c:225347:13: */ var iPg int32 = 1 var bGe int32 = flags & FTS5INDEX_QUERY_SCAN var bDlidx int32 = 0 // True if there is a doclist-index @@ -182543,7 +182786,7 @@ func fts5SegIterSeekInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f // // If an error occurs, Fts5Index.rc is set to an appropriate error code. If // an error has already occurred when this function is called, it is a no-op. -func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:225386:13: */ +func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, flags int32, pIter uintptr) { /* sqlite3.c:225430:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -182556,7 +182799,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f *(*uintptr)(unsafe.Pointer(bp + 4 /* pList */)) = uintptr(0) (*Fts5Index)(unsafe.Pointer(p)).Frc = sqlite3Fts5HashScanInit(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, pTerm, nTerm) - sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp /* &z */, bp+4 /* &pList */, bp+8 /* &nList */) + sqlite3Fts5HashScanEntry(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, bp, bp+4, bp+8) n = func() int32 { if *(*uintptr)(unsafe.Pointer(bp)) != 0 { return int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp)))) @@ -182571,7 +182814,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } } else { (*Fts5Index)(unsafe.Pointer(p)).Frc = sqlite3Fts5HashQuery(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash, int32(unsafe.Sizeof(Fts5Data{})), - pTerm, nTerm, bp+12 /* &pLeaf */, bp+8 /* &nList */) + pTerm, nTerm, bp+12, bp+8) if *(*uintptr)(unsafe.Pointer(bp + 12)) != 0 { (*Fts5Data)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12 /* pLeaf */)))).Fp = *(*uintptr)(unsafe.Pointer(bp + 12)) + 1*12 } @@ -182599,7 +182842,7 @@ func fts5SegIterHashInit(tls *libc.TLS, p uintptr, pTerm uintptr, nTerm int32, f } // Zero the iterator passed as the only argument. -func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225445:13: */ +func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225489:13: */ sqlite3Fts5BufferFree(tls, pIter+64) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpLeaf) fts5DataRelease(tls, (*Fts5SegIter)(unsafe.Pointer(pIter)).FpNextLeaf) @@ -182614,7 +182857,7 @@ func fts5SegIterClear(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225445:13: */ // in the pIter->aSeg[] array that is (a) not at EOF, and (b) pointing // to a key that is a duplicate of another, higher priority, // segment-iterator in the pSeg->aSeg[] array. -func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:225549:12: */ +func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* sqlite3.c:225593:12: */ var i1 int32 // Index of left-hand Fts5SegIter var i2 int32 // Index of right-hand Fts5SegIter var iRes int32 @@ -182666,7 +182909,7 @@ func fts5MultiIterDoCompare(tls *libc.TLS, pIter uintptr, iOut int32) int32 { /* // Move the seg-iter so that it points to the first rowid on page iLeafPgno. // It is an error if leaf iLeafPgno does not exist or contains no rowids. -func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:225603:13: */ +func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int32) { /* sqlite3.c:225647:13: */ if iLeafPgno > (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pIter)).FpSeg)).FpgnoLast { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 @@ -182696,7 +182939,7 @@ func fts5SegIterGotoPage(tls *libc.TLS, p uintptr, pIter uintptr, iLeafPgno int3 // Advance the iterator passed as the second argument until it is at or // past rowid iFrom. Regardless of the value of iFrom, the iterator is // always advanced at least once. -func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:225641:13: */ +func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:225685:13: */ var bRev int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).Fflags & FTS5_SEGITER_REVERSE var pDlidx uintptr = (*Fts5SegIter)(unsafe.Pointer(pIter)).FpDlidx var iLeafPgno int32 = (*Fts5SegIter)(unsafe.Pointer(pIter)).FiLeafPgno @@ -182746,7 +182989,7 @@ func fts5SegIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { } // Free the iterator object passed as the second argument. -func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225695:13: */ +func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225739:13: */ if pIter != 0 { var i int32 for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg; i++ { @@ -182757,7 +183000,7 @@ func fts5MultiIterFree(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225695:13: * } } -func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:225706:13: */ +func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int32, iMinset int32) { /* sqlite3.c:225750:13: */ var i int32 for i = ((*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg + iChanged) / 2; i >= iMinset && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i = i / 2 { var iEq int32 @@ -182780,7 +183023,7 @@ func fts5MultiIterAdvanced(tls *libc.TLS, p uintptr, pIter uintptr, iChanged int // If non-zero is returned, the caller should call fts5MultiIterAdvanced() // on the iterator instead. That function does the same as this one, except // that it deals with more complicated cases as well. -func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:225734:12: */ +func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppFirst uintptr) int32 { /* sqlite3.c:225778:12: */ var pNew uintptr = pIter + 68 + uintptr(iChanged)*92 if (*Fts5SegIter)(unsafe.Pointer(pNew)).FiRowid == (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid || @@ -182820,7 +183063,7 @@ func fts5MultiIterAdvanceRowid(tls *libc.TLS, pIter uintptr, iChanged int32, ppF } // Set the pIter->bEof variable based on the state of the sub-iterators. -func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225777:13: */ +func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225821:13: */ var pSeg uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof = U8(libc.Bool32((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf == uintptr(0))) (*Fts5Iter)(unsafe.Pointer(pIter)).FiSwitchRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -182831,7 +183074,7 @@ func fts5MultiIterSetEof(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:225777:13: // If an error occurs, an error code is left in Fts5Index.rc. It is not // considered an error if the iterator reaches EOF, or if it is already at // EOF when this function is called. -func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:225790:13: */ +func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFrom I64) { /* sqlite3.c:225834:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182870,7 +183113,7 @@ func fts5MultiIterNext(tls *libc.TLS, p uintptr, pIter uintptr, bFrom int32, iFr } } -func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:225828:13: */ +func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintptr) { /* sqlite3.c:225872:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -182895,12 +183138,12 @@ func fts5MultiIterNext2(tls *libc.TLS, p uintptr, pIter uintptr, pbNewTerm uintp } } -func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:225856:13: */ +func fts5IterSetOutputs_Noop(tls *libc.TLS, pUnused1 uintptr, pUnused2 uintptr) { /* sqlite3.c:225900:13: */ _ = pUnused1 _ = pUnused2 } -func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:225860:17: */ +func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlite3.c:225904:17: */ var pNew uintptr var nSlot int32 // Power of two >= nSeg @@ -182919,7 +183162,7 @@ func fts5MultiIterAlloc(tls *libc.TLS, p uintptr, nSeg int32) uintptr { /* sqlit return pNew } -func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:225882:13: */ +func fts5PoslistCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:225926:13: */ _ = pUnused if nChunk > 0 { @@ -182935,21 +183178,21 @@ type PoslistCallbackCtx1 = struct { FpBuf uintptr FpColset uintptr FeState int32 -} /* sqlite3.c:225894:9 */ +} /* sqlite3.c:225938:9 */ -type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:225894:35 */ +type PoslistCallbackCtx = PoslistCallbackCtx1 /* sqlite3.c:225938:35 */ type PoslistOffsetsCtx1 = struct { FpBuf uintptr FpColset uintptr FiRead int32 FiWrite int32 -} /* sqlite3.c:225901:9 */ +} /* sqlite3.c:225945:9 */ -type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:225901:34 */ +type PoslistOffsetsCtx = PoslistOffsetsCtx1 /* sqlite3.c:225945:34 */ // TODO: Make this more efficient! -func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:225912:12: */ +func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* sqlite3.c:225956:12: */ var i int32 for i = 0; i < (*Fts5Colset)(unsafe.Pointer(pColset)).FnCol; i++ { if *(*int32)(unsafe.Pointer(pColset + 4 + uintptr(i)*4)) == iCol { @@ -182959,7 +183202,7 @@ func fts5IndexColsetTest(tls *libc.TLS, pColset uintptr, iCol int32) int32 { /* return 0 } -func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:225920:13: */ +func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:225964:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -182985,7 +183228,7 @@ func fts5PoslistOffsetsCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr } } -func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:225943:13: */ +func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:225987:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183065,7 +183308,7 @@ func fts5PoslistFilterCallback(tls *libc.TLS, pUnused uintptr, pContext uintptr, } } -func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:225995:13: */ +func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChunk uintptr) { /* sqlite3.c:226039:13: */ var nRem int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos // Number of bytes still to come var pData uintptr = uintptr(0) var pChunk uintptr = (*Fts5Data)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpLeaf)).Fp + uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafOffset) @@ -183121,7 +183364,7 @@ func fts5ChunkIterate(tls *libc.TLS, p uintptr, pSeg uintptr, pCtx uintptr, xChu // function appends the position list data for the current entry to // buffer pBuf. It does not make a copy of the position-list size // field. -func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:226045:13: */ +func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, pBuf uintptr) { /* sqlite3.c:226089:13: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -183145,16 +183388,16 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, (*PoslistCallbackCtx)(unsafe.Pointer(bp /* &sCtx */)).FpColset = pColset (*PoslistCallbackCtx)(unsafe.Pointer(bp /* &sCtx */)).FeState = fts5IndexColsetTest(tls, pColset, 0) - fts5ChunkIterate(tls, p, pSeg, bp /* &sCtx */, *(*uintptr)(unsafe.Pointer(&struct { + fts5ChunkIterate(tls, p, pSeg, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5PoslistFilterCallback}))) } else { // var sCtx PoslistOffsetsCtx at bp+12, 16 - libc.Xmemset(tls, bp+12 /* &sCtx */, 0, uint32(unsafe.Sizeof(PoslistOffsetsCtx{}))) + libc.Xmemset(tls, bp+12, 0, uint32(unsafe.Sizeof(PoslistOffsetsCtx{}))) (*PoslistOffsetsCtx)(unsafe.Pointer(bp + 12 /* &sCtx */)).FpBuf = pBuf (*PoslistOffsetsCtx)(unsafe.Pointer(bp + 12 /* &sCtx */)).FpColset = pColset - fts5ChunkIterate(tls, p, pSeg, bp+12 /* &sCtx */, *(*uintptr)(unsafe.Pointer(&struct { + fts5ChunkIterate(tls, p, pSeg, bp+12, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5PoslistOffsetsCallback}))) } @@ -183172,7 +183415,7 @@ func fts5SegiterPoslist(tls *libc.TLS, p uintptr, pSeg uintptr, pColset uintptr, // This function is a no-op if *pRc is other than SQLITE_OK when it is // called. If an OOM error is encountered, *pRc is set to SQLITE_NOMEM // before returning. -func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:226090:13: */ +func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos uintptr, nPos int32, pIter uintptr) { /* sqlite3.c:226134:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -183225,7 +183468,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui *(*int32)(unsafe.Pointer(bp /* iCurrent */)) = int32(*(*U8)(unsafe.Pointer(libc.PostIncUintptr(&p, 1)))) if *(*int32)(unsafe.Pointer(bp))&0x80 != 0 { p-- - p += uintptr(sqlite3Fts5GetVarint32(tls, p, bp /* &iCurrent */)) + p += uintptr(sqlite3Fts5GetVarint32(tls, p, bp)) } } } @@ -183233,7 +183476,7 @@ func fts5IndexExtractColset(tls *libc.TLS, pRc uintptr, pColset uintptr, pPos ui } // xSetOutputs callback used by detail=none tables. -func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226150:13: */ +func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226194:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -183241,7 +183484,7 @@ func fts5IterSetOutputs_None(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq // xSetOutputs callback used by detail=full and detail=col tables when no // column filters are specified. -func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226160:13: */ +func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226204:13: */ (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FnPos @@ -183261,7 +183504,7 @@ func fts5IterSetOutputs_Nocolset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { / // xSetOutputs callback used when the Fts5Colset object has nCol==0 (match // against no columns at all). -func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226185:13: */ +func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226229:13: */ _ = pSeg (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FnData = 0 } @@ -183269,7 +183512,7 @@ func fts5IterSetOutputs_ZeroColset(tls *libc.TLS, pIter uintptr, pSeg uintptr) { // xSetOutputs callback used by detail=col when there is a column filter // and there are 100 or more columns. Also called as a fallback from // fts5IterSetOutputs_Col100 if the column-list spans more than one page. -func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226195:13: */ +func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226239:13: */ sqlite3Fts5BufferZero(tls, pIter+24) fts5SegiterPoslist(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pSeg, (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset, pIter+24) (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -183285,7 +183528,7 @@ func fts5IterSetOutputs_Col(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sql // // The last point is to ensure all column numbers are stored as // single-byte varints. -func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226213:13: */ +func fts5IterSetOutputs_Col100(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226257:13: */ var a uintptr var pEnd uintptr var iPrev int32 @@ -183347,7 +183590,7 @@ __2: } // xSetOutputs callback used by detail=full when there is a column filter. -func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226253:13: */ +func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sqlite3.c:226297:13: */ var pColset uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpColset (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FiRowid = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiRowid @@ -183369,7 +183612,7 @@ func fts5IterSetOutputs_Full(tls *libc.TLS, pIter uintptr, pSeg uintptr) { /* sq } } -func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:226278:13: */ +func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3.c:226322:13: */ if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex)).FpConfig @@ -183414,7 +183657,7 @@ func fts5IterSetOutputCb(tls *libc.TLS, pRc uintptr, pIter uintptr) { /* sqlite3 // // The iterator initially points to the first term/rowid entry in the // iterated data. -func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:226322:13: */ +func fts5MultiIterNew(tls *libc.TLS, p uintptr, pStruct uintptr, flags int32, pColset uintptr, pTerm uintptr, nTerm int32, iLevel int32, nSegment int32, ppOut uintptr) { /* sqlite3.c:226366:13: */ var nSeg int32 // Number of segment-iters in use var iIter int32 // var iSeg int32 // Used to iterate through segments @@ -183617,7 +183860,7 @@ fts5MultiIterNew_post_check: // Create an Fts5Iter that iterates through the doclist provided // as the second argument. -func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:226428:13: */ +func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppOut uintptr) { /* sqlite3.c:226472:13: */ var pNew uintptr pNew = fts5MultiIterAlloc(tls, p, 2) if pNew != 0 { @@ -183650,7 +183893,7 @@ func fts5MultiIterNew2(tls *libc.TLS, p uintptr, pData uintptr, bDesc int32, ppO // Return true if the iterator is at EOF or if an error has occurred. // False otherwise. -func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226468:12: */ +func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:226512:12: */ return libc.Bool32((*Fts5Index)(unsafe.Pointer(p)).Frc != 0 || (*Fts5Iter)(unsafe.Pointer(pIter)).Fbase.FbEof != 0) } @@ -183658,13 +183901,13 @@ func fts5MultiIterEof(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite // Return the rowid of the entry that the iterator currently points // to. If the iterator points to EOF when this function is called the // results are undefined. -func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226481:12: */ +func fts5MultiIterRowid(tls *libc.TLS, pIter uintptr) I64 { /* sqlite3.c:226525:12: */ return (*Fts5SegIter)(unsafe.Pointer(pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92)).FiRowid } // Move the iterator to the next entry at or following iMatch. -func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:226489:13: */ +func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) { /* sqlite3.c:226533:13: */ for 1 != 0 { var iRowid I64 fts5MultiIterNext(tls, p, pIter, 1, iMatch) @@ -183683,7 +183926,7 @@ func fts5MultiIterNextFrom(tls *libc.TLS, p uintptr, pIter uintptr, iMatch I64) // Return a pointer to a buffer containing the term associated with the // entry that the iterator currently points to. -func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:226508:17: */ +func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sqlite3.c:226552:17: */ var p uintptr = pIter + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(pIter)).FaFirst+1*4)).FiFirst)*92 *(*int32)(unsafe.Pointer(pn)) = (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fn return (*Fts5SegIter)(unsafe.Pointer(p)).Fterm.Fp @@ -183696,7 +183939,7 @@ func fts5MultiIterTerm(tls *libc.TLS, pIter uintptr, pn uintptr) uintptr { /* sq // // If an error has already occurred, this function is a no-op. 0 is // returned in this case. -func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:226523:12: */ +func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sqlite3.c:226567:12: */ bp := tls.Alloc(252) defer tls.Free(252) @@ -183714,7 +183957,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql var iSeg int32 var i int32 var mask U32 - libc.Xmemset(tls, bp /* &aUsed[0] */, 0, uint32(unsafe.Sizeof([63]U32{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof([63]U32{}))) for iLvl = 0; iLvl < (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel; iLvl++ { for iSeg = 0; iSeg < (*Fts5StructureLevel)(unsafe.Pointer(pStruct+20 /* &.aLevel */ +uintptr(iLvl)*12)).FnSeg; iSeg++ { var iId int32 = (*Fts5StructureSegment)(unsafe.Pointer((*Fts5StructureLevel)(unsafe.Pointer(pStruct+20+uintptr(iLvl)*12)).FaSeg + uintptr(iSeg)*12)).FiSegid @@ -183726,7 +183969,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql for i = 0; *(*U32)(unsafe.Pointer(bp /* &aUsed[0] */ + uintptr(i)*4)) == 0xFFFFFFFF; i++ { } - mask = *(*U32)(unsafe.Pointer(bp /* &aUsed[0] */ + uintptr(i)*4)) + mask = *(*U32)(unsafe.Pointer(bp + uintptr(i)*4)) for iSegid = 0; mask&(U32(U32(1))<<iSegid) != 0; iSegid++ { } iSegid = iSegid + (1 + i*32) @@ -183738,7 +183981,7 @@ func fts5AllocateSegid(tls *libc.TLS, p uintptr, pStruct uintptr) int32 { /* sql } // Discard all data currently cached in the hash-tables. -func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:226580:13: */ +func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:226624:13: */ if (*Fts5Index)(unsafe.Pointer(p)).FpHash != 0 { sqlite3Fts5HashClear(tls, (*Fts5Index)(unsafe.Pointer(p)).FpHash) @@ -183751,7 +183994,7 @@ func fts5IndexDiscardData(tls *libc.TLS, p uintptr) { /* sqlite3.c:226580:13: */ // // Buffer (pNew/<length-unknown>) is guaranteed to be greater // than buffer (pOld/nOld). -func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:226595:12: */ +func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) int32 { /* sqlite3.c:226639:12: */ var i int32 for i = 0; i < nOld; i++ { if int32(*(*U8)(unsafe.Pointer(pOld + uintptr(i)))) != int32(*(*U8)(unsafe.Pointer(pNew + uintptr(i)))) { @@ -183761,7 +184004,7 @@ func fts5PrefixCompress(tls *libc.TLS, nOld int32, pOld uintptr, pNew uintptr) i return i } -func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:226603:13: */ +func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32) { /* sqlite3.c:226647:13: */ var i int32 for i = 0; i < (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx; i++ { @@ -183782,7 +184025,7 @@ func fts5WriteDlidxClear(tls *libc.TLS, p uintptr, pWriter uintptr, bFlush int32 // Grow the pWriter->aDlidx[] array to at least nLvl elements in size. // Any new array elements are zeroed before returning. -func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:226629:12: */ +func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) int32 { /* sqlite3.c:226673:12: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && nLvl >= (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnDlidx { var aDlidx uintptr = Xsqlite3_realloc64(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx, uint64(uint32(unsafe.Sizeof(Fts5DlidxWriter{}))*uint32(nLvl))) @@ -183801,7 +184044,7 @@ func fts5WriteDlidxGrow(tls *libc.TLS, p uintptr, pWriter uintptr, nLvl int32) i // If the current doclist-index accumulating in pWriter->aDlidx[] is large // enough, flush it to disk and return 1. Otherwise discard it and return // zero. -func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:226655:12: */ +func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* sqlite3.c:226699:12: */ var bFlag int32 = 0 // If there were FTS5_MIN_DLIDX_SIZE or more empty leaf pages written @@ -183823,7 +184066,7 @@ func fts5WriteFlushDlidx(tls *libc.TLS, p uintptr, pWriter uintptr) int32 { /* s // it. // // Fts5SegWriter.btterm currently contains the first term on page iBtPage. -func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:226679:13: */ +func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:226723:13: */ var bFlag int32 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FiBtPage == 0 { @@ -183836,7 +184079,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fn > 0 { return (*Fts5SegWriter)(unsafe.Pointer(pWriter)).Fbtterm.Fp } - return ts + 1543 + return ts + 1565 }() // The following was already done in fts5WriteInit(): // sqlite3_bind_int(p->pIdxWriter, 1, pWriter->iSegid); @@ -183856,7 +184099,7 @@ func fts5WriteFlushBtree(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3 // // If an error occurs, an error code is left in Fts5Index.rc. If an error // has already occurred when this function is called, it is a no-op. -func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:226708:13: */ +func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:226752:13: */ fts5WriteFlushBtree(tls, p, pWriter) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { sqlite3Fts5BufferSet(tls, p+32, pWriter+76, nTerm, pTerm) @@ -183866,7 +184109,7 @@ func fts5WriteBtreeTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, // This function is called when flushing a leaf page that contains no // terms at all to disk. -func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:226724:13: */ +func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:226768:13: */ // If there were no rowids on the leaf page either and the doclist-index // has already been started, append an 0x00 byte to it. if (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage != 0 && (*Fts5DlidxWriter)(unsafe.Pointer((*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx)).Fbuf.Fn > 0 { @@ -183879,7 +184122,7 @@ func fts5WriteBtreeNoTerm(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FnEmpty++ } -func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:226740:12: */ +func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c:226784:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -183888,14 +184131,14 @@ func fts5DlidxExtractFirstRowid(tls *libc.TLS, pBuf uintptr) I64 { /* sqlite3.c: var iOff int32 iOff = 1 + int32(sqlite3Fts5GetVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+1, bp)) - sqlite3Fts5GetVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr(iOff), bp /* &iRowid */) + sqlite3Fts5GetVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr(iOff), bp) return *(*I64)(unsafe.Pointer(bp /* iRowid */)) } // Rowid iRowid has just been appended to the current leaf page. It is the // first on the page. This function appends an appropriate entry to the current // doclist-index. -func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:226754:13: */ +func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:226798:13: */ var i int32 var bDone int32 = 0 @@ -183955,7 +184198,7 @@ func fts5WriteDlidxAppend(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:226814:13: */ +func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3.c:226858:13: */ var pPage uintptr = pWriter + 4 var iRowid I64 @@ -183991,14 +184234,14 @@ func fts5WriteFlushLeaf(tls *libc.TLS, p uintptr, pWriter uintptr) { /* sqlite3. (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FbFirstRowidInPage = U8(1) } -var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:226815:19 */ +var zero = [4]U8{U8(0x00), U8(0x00), U8(0x00), U8(0x00)} /* sqlite3.c:226859:19 */ // Append term pTerm/nTerm to the segment being written by the writer passed // as the second argument. // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:226860:13: */ +func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, pTerm uintptr) { /* sqlite3.c:226904:13: */ var nPrefix int32 // Bytes of prefix compression for term var pPage uintptr = pWriter + 4 var pPgidx uintptr = pWriter + 4 + 20 @@ -184074,7 +184317,7 @@ func fts5WriteAppendTerm(tls *libc.TLS, p uintptr, pWriter uintptr, nTerm int32, } // Append a rowid and position-list size field to the writers output. -func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:226941:13: */ +func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) { /* sqlite3.c:226985:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pPage uintptr = pWriter + 4 @@ -184103,7 +184346,7 @@ func fts5WriteAppendRowid(tls *libc.TLS, p uintptr, pWriter uintptr, iRowid I64) } } -func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:226974:13: */ +func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData uintptr, nData int32) { /* sqlite3.c:227018:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184132,7 +184375,7 @@ func fts5WriteAppendPoslistData(tls *libc.TLS, p uintptr, pWriter uintptr, aData // Flush any data cached by the writer object to the database. Free any // allocations associated with the writer. -func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:227008:13: */ +func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) { /* sqlite3.c:227052:13: */ var i int32 var pLeaf uintptr = pWriter + 4 if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -184156,7 +184399,7 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) Xsqlite3_free(tls, (*Fts5SegWriter)(unsafe.Pointer(pWriter)).FaDlidx) } -func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:227036:13: */ +func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:227080:13: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -184177,7 +184420,7 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* if (*Fts5Index)(unsafe.Pointer(p)).FpIdxWriter == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig fts5IndexPrepareStmt(tls, p, p+48, Xsqlite3_mprintf(tls, - ts+34638, /* "INSERT INTO '%q'..." */ + ts+34807, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName))) } @@ -184196,14 +184439,14 @@ func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* // Iterator pIter was used to iterate through the input segments of on an // incremental merge operation. This function is called if the incremental // merge step has finished but the input has not been completely exhausted. -func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227083:13: */ +func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:227127:13: */ bp := tls.Alloc(16) defer tls.Free(16) var i int32 // var buf Fts5Buffer at bp, 12 - libc.Xmemset(tls, bp /* &buf */, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) for i = 0; i < (*Fts5Iter)(unsafe.Pointer(pIter)).FnSeg && (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK; i++ { var pSeg uintptr = pIter + 68 + uintptr(i)*92 if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg == uintptr(0) { @@ -184231,27 +184474,27 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 // segment currently being trimmed. (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 } else { - sqlite3Fts5BufferZero(tls, bp /* &buf */) + sqlite3Fts5BufferZero(tls, bp) if !(U32((*Fts5Buffer)(unsafe.Pointer(bp)).Fn)+U32((*Fts5Data)(unsafe.Pointer(pData)).Fnn) <= U32((*Fts5Buffer)(unsafe.Pointer(bp)).FnSpace)) { sqlite3Fts5BufferSize(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn+(*Fts5Buffer)(unsafe.Pointer(bp)).Fn)) } - sqlite3Fts5BufferAppendBlob(tls, p+32, bp /* &buf */, uint32(unsafe.Sizeof([4]U8{})), bp+12 /* &aHdr[0] */) - sqlite3Fts5BufferAppendVarint(tls, p+32, bp /* &buf */, int64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) - sqlite3Fts5BufferAppendBlob(tls, p+32, bp /* &buf */, uint32((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn), (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp) - sqlite3Fts5BufferAppendBlob(tls, p+32, bp /* &buf */, uint32((*Fts5Data)(unsafe.Pointer(pData)).FszLeaf-iOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(iOff)) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32(unsafe.Sizeof([4]U8{})), bp+12) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn)) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn), (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).FszLeaf-iOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr(iOff)) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Set the szLeaf field fts5PutU16(tls, (*Fts5Buffer)(unsafe.Pointer(bp)).Fp+2, U16((*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fn)) } // Set up the new page-index array - sqlite3Fts5BufferAppendVarint(tls, p+32, bp /* &buf */, int64(4)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64(4)) if (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiLeafPgno == (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiTermLeafPgno && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiEndofDoclist < (*Fts5Data)(unsafe.Pointer(pData)).FszLeaf && (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff <= (*Fts5Data)(unsafe.Pointer(pData)).Fnn { var nDiff int32 = (*Fts5Data)(unsafe.Pointer(pData)).FszLeaf - (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiEndofDoclist - sqlite3Fts5BufferAppendVarint(tls, p+32, bp /* &buf */, int64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn-1-nDiff-4)) - sqlite3Fts5BufferAppendBlob(tls, p+32, bp /* &buf */, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn-(*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff)) + sqlite3Fts5BufferAppendVarint(tls, p+32, bp, int64((*Fts5Buffer)(unsafe.Pointer(bp)).Fn-1-nDiff-4)) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp, uint32((*Fts5Data)(unsafe.Pointer(pData)).Fnn-(*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff), (*Fts5Data)(unsafe.Pointer(pData)).Fp+uintptr((*Fts5SegIter)(unsafe.Pointer(pSeg)).FiPgidxOff)) } (*Fts5StructureSegment)(unsafe.Pointer((*Fts5SegIter)(unsafe.Pointer(pSeg)).FpSeg)).FpgnoFirst = (*Fts5SegIter)(unsafe.Pointer(pSeg)).FiTermLeafPgno @@ -184262,16 +184505,16 @@ func fts5TrimSegments(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:22 } } } - sqlite3Fts5BufferFree(tls, bp /* &buf */) + sqlite3Fts5BufferFree(tls, bp) } -func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227149:13: */ +func fts5MergeChunkCallback(tls *libc.TLS, p uintptr, pCtx uintptr, pChunk uintptr, nChunk int32) { /* sqlite3.c:227193:13: */ var pWriter uintptr = pCtx fts5WriteAppendPoslistData(tls, p, pWriter, pChunk, nChunk) } // -func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:227161:13: */ +func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pnRem uintptr) { /* sqlite3.c:227205:13: */ bp := tls.Alloc(112) defer tls.Free(112) @@ -184296,15 +184539,15 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, var flags int32 = FTS5INDEX_QUERY_NOOUTPUT var bTermWritten int32 = 0 // True if current term already output - libc.Xmemset(tls, bp /* &writer */, 0, uint32(unsafe.Sizeof(Fts5SegWriter{}))) - libc.Xmemset(tls, bp+92 /* &term */, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5SegWriter{}))) + libc.Xmemset(tls, bp+92, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) if (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge != 0 { pLvlOut = pStruct + 20 + uintptr(iLvl+1)*12 nInput = (*Fts5StructureLevel)(unsafe.Pointer(pLvl)).FnMerge pSeg = (*Fts5StructureLevel)(unsafe.Pointer(pLvlOut)).FaSeg + uintptr((*Fts5StructureLevel)(unsafe.Pointer(pLvlOut)).FnSeg-1)*12 - fts5WriteInit(tls, p, bp /* &writer */, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid) + fts5WriteInit(tls, p, bp, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid) (*Fts5SegWriter)(unsafe.Pointer(bp /* &writer */)).Fwriter.Fpgno = (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast + 1 (*Fts5SegWriter)(unsafe.Pointer(bp /* &writer */)).FiBtPage = 0 } else { @@ -184323,7 +184566,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, pLvl = pStruct + 20 + uintptr(iLvl)*12 pLvlOut = pStruct + 20 + uintptr(iLvl+1)*12 - fts5WriteInit(tls, p, bp /* &writer */, iSegid) + fts5WriteInit(tls, p, bp, iSegid) // Add the new segment to the output level pSeg = (*Fts5StructureLevel)(unsafe.Pointer(pLvlOut)).FaSeg + uintptr((*Fts5StructureLevel)(unsafe.Pointer(pLvlOut)).FnSeg)*12 @@ -184337,14 +184580,14 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } bOldest = libc.Bool32((*Fts5StructureLevel)(unsafe.Pointer(pLvlOut)).FnSeg == 1 && (*Fts5Structure)(unsafe.Pointer(pStruct)).FnLevel == iLvl+2) - for fts5MultiIterNew(tls, p, pStruct, flags, uintptr(0), uintptr(0), 0, iLvl, nInput, bp+104 /* &pIter */); fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */))) == 0; fts5MultiIterNext(tls, p, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */)), 0, int64(0)) { + for fts5MultiIterNew(tls, p, pStruct, flags, uintptr(0), uintptr(0), 0, iLvl, nInput, bp+104); fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */))) == 0; fts5MultiIterNext(tls, p, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */)), 0, int64(0)) { var pSegIter uintptr = *(*uintptr)(unsafe.Pointer(bp + 104)) + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 104)))).FaFirst+1*4)).FiFirst)*92 var nPos int32 // position-list size field value // var nTerm int32 at bp+108, 4 var pTerm uintptr - pTerm = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */)), bp+108 /* &nTerm */) + pTerm = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */)), bp+108) if *(*int32)(unsafe.Pointer(bp + 108)) != (*Fts5Buffer)(unsafe.Pointer(bp+92)).Fn || func() int32 { if *(*int32)(unsafe.Pointer(bp + 108)) <= 0 { return 0 @@ -184354,7 +184597,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, if pnRem != 0 && (*Fts5SegWriter)(unsafe.Pointer(bp)).FnLeafWritten > nRem { break } - sqlite3Fts5BufferSet(tls, p+32, bp+92 /* &term */, *(*int32)(unsafe.Pointer(bp + 108 /* nTerm */)), pTerm) + sqlite3Fts5BufferSet(tls, p+32, bp+92, *(*int32)(unsafe.Pointer(bp + 108 /* nTerm */)), pTerm) bTermWritten = 0 } @@ -184365,13 +184608,13 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && bTermWritten == 0 { // This is a new term. Append a term to the output segment. - fts5WriteAppendTerm(tls, p, bp /* &writer */, *(*int32)(unsafe.Pointer(bp + 108 /* nTerm */)), pTerm) + fts5WriteAppendTerm(tls, p, bp, *(*int32)(unsafe.Pointer(bp + 108 /* nTerm */)), pTerm) bTermWritten = 1 } // Append the rowid to the output // WRITEPOSLISTSIZE - fts5WriteAppendRowid(tls, p, bp /* &writer */, fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */)))) + fts5WriteAppendRowid(tls, p, bp, fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */)))) if eDetail == FTS5_DETAIL_NONE { if (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel != 0 { @@ -184384,7 +184627,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Append the position-list data to the output nPos = (*Fts5SegIter)(unsafe.Pointer(pSegIter)).FnPos*2 + int32((*Fts5SegIter)(unsafe.Pointer(pSegIter)).FbDel) sqlite3Fts5BufferAppendVarint(tls, p+32, bp+4+8, int64(nPos)) - fts5ChunkIterate(tls, p, pSegIter, bp /* &writer */, *(*uintptr)(unsafe.Pointer(&struct { + fts5ChunkIterate(tls, p, pSegIter, bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, int32) }{fts5MergeChunkCallback}))) } @@ -184392,7 +184635,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Flush the last leaf page to disk. Set the output segment b-tree height // and last leaf page number at the same time. - fts5WriteFinish(tls, p, bp /* &writer */, pSeg+8) + fts5WriteFinish(tls, p, bp, pSeg+8) if fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 104))) != 0 { var i int32 @@ -184421,7 +184664,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, } fts5MultiIterFree(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pIter */))) - sqlite3Fts5BufferFree(tls, bp+92 /* &term */) + sqlite3Fts5BufferFree(tls, bp+92) if pnRem != 0 { *(*int32)(unsafe.Pointer(pnRem)) -= (*Fts5SegWriter)(unsafe.Pointer(bp)).FnLeafWritten } @@ -184430,7 +184673,7 @@ func fts5IndexMergeLevel(tls *libc.TLS, p uintptr, ppStruct uintptr, iLvl int32, // Do up to nPg pages of automerge work on the index. // // Return true if any changes were actually made, or false otherwise. -func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:227311:12: */ +func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin int32) int32 { /* sqlite3.c:227355:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184465,7 +184708,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin break } bRet = 1 - fts5IndexMergeLevel(tls, p, bp /* &pStruct */, iBestLvl, bp+4 /* &nRem */) + fts5IndexMergeLevel(tls, p, bp, iBestLvl, bp+4) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+20+uintptr(iBestLvl)*12)).FnMerge == 0 { fts5StructurePromote(tls, p, iBestLvl+1, *(*uintptr)(unsafe.Pointer(bp /* pStruct */))) } @@ -184480,7 +184723,7 @@ func fts5IndexMerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nPg int32, nMin // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:227370:13: */ +func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) { /* sqlite3.c:227414:13: */ if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnAutomerge > 0 && *(*uintptr)(unsafe.Pointer(ppStruct)) != uintptr(0) { var pStruct uintptr = *(*uintptr)(unsafe.Pointer(ppStruct)) var nWrite U64 // Initial value of write-counter @@ -184497,7 +184740,7 @@ func fts5IndexAutomerge(tls *libc.TLS, p uintptr, ppStruct uintptr, nLeaf int32) } } -func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:227391:13: */ +func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlite3.c:227435:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184506,7 +184749,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit var iLvl int32 = 0 for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+20+uintptr(iLvl)*12)).FnSeg >= nCrisis { - fts5IndexMergeLevel(tls, p, bp /* &pStruct */, iLvl, uintptr(0)) + fts5IndexMergeLevel(tls, p, bp, iLvl, uintptr(0)) fts5StructurePromote(tls, p, iLvl+1, *(*uintptr)(unsafe.Pointer(bp /* pStruct */))) iLvl++ @@ -184514,7 +184757,7 @@ func fts5IndexCrisismerge(tls *libc.TLS, p uintptr, ppStruct uintptr) { /* sqlit *(*uintptr)(unsafe.Pointer(ppStruct)) = *(*uintptr)(unsafe.Pointer(bp /* pStruct */)) } -func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:227409:12: */ +func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:227453:12: */ var rc int32 = (*Fts5Index)(unsafe.Pointer(p)).Frc (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_OK return rc @@ -184523,24 +184766,24 @@ func fts5IndexReturn(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:227409:12: * type Fts5FlushCtx1 = struct { FpIdx uintptr Fwriter Fts5SegWriter -} /* sqlite3.c:227415:9 */ +} /* sqlite3.c:227459:9 */ -type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:227415:29 */ +type Fts5FlushCtx = Fts5FlushCtx1 /* sqlite3.c:227459:29 */ // Buffer aBuf[] contains a list of varints, all small enough to fit // in a 32-bit integer. Return the size of the largest prefix of this // list nMax bytes or less in size. -func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:227426:12: */ +func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlite3.c:227470:12: */ bp := tls.Alloc(4) defer tls.Free(4) var ret int32 // var dummy U32 at bp, 4 - ret = sqlite3Fts5GetVarint32(tls, aBuf, bp /* &dummy */) + ret = sqlite3Fts5GetVarint32(tls, aBuf, bp) if ret < nMax { for 1 != 0 { - var i int32 = sqlite3Fts5GetVarint32(tls, aBuf+uintptr(ret), bp /* &dummy */) + var i int32 = sqlite3Fts5GetVarint32(tls, aBuf+uintptr(ret), bp) if ret+i > nMax { break } @@ -184555,7 +184798,7 @@ func fts5PoslistPrefix(tls *libc.TLS, aBuf uintptr, nMax int32) int32 { /* sqlit // // If an error occurs, set the Fts5Index.rc error code. If an error has // already occurred, this function is a no-op. -func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227447:13: */ +func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227491:13: */ bp := tls.Alloc(128) defer tls.Free(128) @@ -184580,7 +184823,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227447:13: */ // var writer Fts5SegWriter at bp, 92 - fts5WriteInit(tls, p, bp /* &writer */, iSegid) + fts5WriteInit(tls, p, bp, iSegid) pBuf = bp + 4 + 8 pPgidx = bp + 4 + 20 @@ -184602,8 +184845,8 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227447:13: */ // Size of doclist in bytes // Write the term for this entry to disk. - sqlite3Fts5HashScanEntry(tls, pHash, bp+92 /* &zTerm */, bp+96 /* &pDoclist */, bp+100 /* &nDoclist */) - fts5WriteAppendTerm(tls, p, bp /* &writer */, int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 92 /* zTerm */)))), *(*uintptr)(unsafe.Pointer(bp + 92 /* zTerm */))) + sqlite3Fts5HashScanEntry(tls, pHash, bp+92, bp+96, bp+100) + fts5WriteAppendTerm(tls, p, bp, int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 92 /* zTerm */)))), *(*uintptr)(unsafe.Pointer(bp + 92 /* zTerm */))) if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { break } @@ -184631,7 +184874,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227447:13: */ fts5PutU16(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp, U16((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn)) // first rowid on page *(*int32)(unsafe.Pointer(pBuf + 4)) += sqlite3Fts5PutVarint(tls, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn), uint64(iRowid)) (*Fts5SegWriter)(unsafe.Pointer(bp /* &writer */)).FbFirstRowidInPage = U8(0) - fts5WriteDlidxAppend(tls, p, bp /* &writer */, iRowid) + fts5WriteDlidxAppend(tls, p, bp, iRowid) if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { break } @@ -184649,14 +184892,14 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227447:13: */ } } if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn+(*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn >= pgsz { - fts5WriteFlushLeaf(tls, p, bp /* &writer */) + fts5WriteFlushLeaf(tls, p, bp) } } else { // var bDummy int32 at bp+116, 4 // var nPos int32 at bp+112, 4 - var nCopy int32 = fts5GetPoslistSize(tls, *(*uintptr)(unsafe.Pointer(bp + 96))+uintptr(iOff), bp+112 /* &nPos */, bp+116 /* &bDummy */) + var nCopy int32 = fts5GetPoslistSize(tls, *(*uintptr)(unsafe.Pointer(bp + 96))+uintptr(iOff), bp+112, bp+116) nCopy = nCopy + *(*int32)(unsafe.Pointer(bp + 112)) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn+(*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn+nCopy <= pgsz { /* The entire poslist will fit on the current leaf. So copy @@ -184688,7 +184931,7 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227447:13: */ iPos = iPos + n if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn+(*Fts5Buffer)(unsafe.Pointer(pPgidx)).Fn >= pgsz { - fts5WriteFlushLeaf(tls, p, bp /* &writer */) + fts5WriteFlushLeaf(tls, p, bp) } if iPos >= nCopy { break @@ -184708,12 +184951,12 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227447:13: */ } } sqlite3Fts5HashClear(tls, pHash) - fts5WriteFinish(tls, p, bp /* &writer */, bp+120 /* &pgnoLast */) + fts5WriteFinish(tls, p, bp, bp+120) // Update the Fts5Structure. It is written back to the database by the // fts5StructureRelease() call below. if (*Fts5Structure)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 124)))).FnLevel == 0 { - fts5StructureAddLevel(tls, p+32, bp+124 /* &pStruct */) + fts5StructureAddLevel(tls, p+32, bp+124) } fts5StructureExtendLevel(tls, p+32, *(*uintptr)(unsafe.Pointer(bp + 124 /* pStruct */)), 0, 1, 0) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -184726,14 +184969,14 @@ func fts5FlushOneHash(tls *libc.TLS, p uintptr) { /* sqlite3.c:227447:13: */ fts5StructurePromote(tls, p, 0, *(*uintptr)(unsafe.Pointer(bp + 124 /* pStruct */))) } - fts5IndexAutomerge(tls, p, bp+124 /* &pStruct */, *(*int32)(unsafe.Pointer(bp + 120 /* pgnoLast */))) - fts5IndexCrisismerge(tls, p, bp+124 /* &pStruct */) + fts5IndexAutomerge(tls, p, bp+124, *(*int32)(unsafe.Pointer(bp + 120 /* pgnoLast */))) + fts5IndexCrisismerge(tls, p, bp+124) fts5StructureWrite(tls, p, *(*uintptr)(unsafe.Pointer(bp + 124 /* pStruct */))) fts5StructureRelease(tls, *(*uintptr)(unsafe.Pointer(bp + 124 /* pStruct */))) } // Flush any data stored in the in-memory hash tables to the database. -func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:227601:13: */ +func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:227645:13: */ // Unless it is empty, flush the hash table to disk if (*Fts5Index)(unsafe.Pointer(p)).FnPendingData != 0 { @@ -184742,7 +184985,7 @@ func fts5IndexFlush(tls *libc.TLS, p uintptr) { /* sqlite3.c:227601:13: */ } } -func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:227610:22: */ +func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr { /* sqlite3.c:227654:22: */ var pNew uintptr = uintptr(0) var nByte Sqlite3_int64 = Sqlite3_int64(unsafe.Sizeof(Fts5Structure{})) var nSeg int32 = (*Fts5Structure)(unsafe.Pointer(pStruct)).FnSegment @@ -184803,7 +185046,7 @@ func fts5IndexOptimizeStruct(tls *libc.TLS, p uintptr, pStruct uintptr) uintptr return pNew } -func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:227672:12: */ +func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:227716:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184825,7 +185068,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:227 } for (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK && (*Fts5StructureLevel)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp))+20+uintptr(iLvl)*12)).FnSeg > 0 { *(*int32)(unsafe.Pointer(bp + 4 /* nRem */)) = FTS5_OPT_WORK_UNIT - fts5IndexMergeLevel(tls, p, bp /* &pNew */, iLvl, bp+4 /* &nRem */) + fts5IndexMergeLevel(tls, p, bp, iLvl, bp+4) } fts5StructureWrite(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pNew */))) @@ -184837,7 +185080,7 @@ func sqlite3Fts5IndexOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:227 // This is called to implement the special "VALUES('merge', $nMerge)" // INSERT command. -func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:227706:12: */ +func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:227750:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -184862,12 +185105,12 @@ func sqlite3Fts5IndexMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sq return fts5IndexReturn(tls, p) } -func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:227728:13: */ +func fts5AppendRowid(tls *libc.TLS, p uintptr, iDelta I64, pUnused uintptr, pBuf uintptr) { /* sqlite3.c:227772:13: */ _ = pUnused sqlite3Fts5BufferAppendVarint(tls, p+32, pBuf, iDelta) } -func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:227738:13: */ +func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBuf uintptr) { /* sqlite3.c:227782:13: */ var nData int32 = (*Fts5Iter)(unsafe.Pointer(pMulti)).Fbase.FnData var nByte int32 = nData + 9 + 9 + FTS5_DATA_ZERO_PADDING @@ -184894,7 +185137,7 @@ func fts5AppendPoslist(tls *libc.TLS, p uintptr, iDelta I64, pMulti uintptr, pBu } } -func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227756:13: */ +func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227800:13: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -184905,14 +185148,14 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227756:13: } else { // var iDelta I64 at bp, 8 - p += uintptr(sqlite3Fts5GetVarint(tls, p, bp /* &iDelta */)) + p += uintptr(sqlite3Fts5GetVarint(tls, p, bp)) *(*I64)(unsafe.Pointer(pIter + 4)) += *(*I64)(unsafe.Pointer(bp)) // Read position list size if int32(*(*U8)(unsafe.Pointer(p)))&0x80 != 0 { // var nPos int32 at bp+8, 4 - (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnSize = sqlite3Fts5GetVarint32(tls, p, bp+8 /* &nPos */) + (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnSize = sqlite3Fts5GetVarint32(tls, p, bp+8) (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnPoslist = *(*int32)(unsafe.Pointer(bp + 8)) >> 1 } else { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FnPoslist = int32(*(*U8)(unsafe.Pointer(p))) >> 1 @@ -184926,7 +185169,7 @@ func fts5DoclistIterNext(tls *libc.TLS, pIter uintptr) { /* sqlite3.c:227756:13: } } -func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:227785:13: */ +func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite3.c:227829:13: */ libc.Xmemset(tls, pIter, 0, uint32(unsafe.Sizeof(Fts5DoclistIter{}))) if (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn > 0 { (*Fts5DoclistIter)(unsafe.Pointer(pIter)).FaPoslist = (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp @@ -184936,13 +185179,13 @@ func fts5DoclistIterInit(tls *libc.TLS, pBuf uintptr, pIter uintptr) { /* sqlite } // Swap the contents of buffer *p1 with that of *p2. -func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:227824:13: */ +func fts5BufferSwap(tls *libc.TLS, p1 uintptr, p2 uintptr) { /* sqlite3.c:227868:13: */ var tmp = *(*Fts5Buffer)(unsafe.Pointer(p1)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(p2)) *(*Fts5Buffer)(unsafe.Pointer(p2)) = tmp } -func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:227830:13: */ +func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) { /* sqlite3.c:227874:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -184959,7 +185202,7 @@ func fts5NextRowid(tls *libc.TLS, pBuf uintptr, piOff uintptr, piRowid uintptr) // This is the equivalent of fts5MergePrefixLists() for detail=none mode. // In this case the buffers consist of a delta-encoded list of rowids only. -func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:227845:13: */ +func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:227889:13: */ bp := tls.Alloc(36) defer tls.Free(36) @@ -184972,15 +185215,15 @@ func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf // var out Fts5Buffer at bp, 12 _ = nBuf - libc.Xmemset(tls, bp /* &out */, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) - sqlite3Fts5BufferSize(tls, p+32, bp /* &out */, uint32((*Fts5Buffer)(unsafe.Pointer(p1)).Fn+(*Fts5Buffer)(unsafe.Pointer(p2)).Fn)) + sqlite3Fts5BufferSize(tls, p+32, bp, uint32((*Fts5Buffer)(unsafe.Pointer(p1)).Fn+(*Fts5Buffer)(unsafe.Pointer(p2)).Fn)) if (*Fts5Index)(unsafe.Pointer(p)).Frc != 0 { return } - fts5NextRowid(tls, p1, bp+12 /* &i1 */, bp+16 /* &iRowid1 */) - fts5NextRowid(tls, p2, bp+24 /* &i2 */, bp+28 /* &iRowid2 */) + fts5NextRowid(tls, p1, bp+12, bp+16) + fts5NextRowid(tls, p2, bp+24, bp+28) for *(*int32)(unsafe.Pointer(bp + 12)) >= 0 || *(*int32)(unsafe.Pointer(bp + 24)) >= 0 { if *(*int32)(unsafe.Pointer(bp + 12)) >= 0 && (*(*int32)(unsafe.Pointer(bp + 24)) < 0 || *(*I64)(unsafe.Pointer(bp + 16)) < *(*I64)(unsafe.Pointer(bp + 28))) { @@ -184989,7 +185232,7 @@ func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf } iOut = *(*I64)(unsafe.Pointer(bp + 16 /* iRowid1 */)) - fts5NextRowid(tls, p1, bp+12 /* &i1 */, bp+16 /* &iRowid1 */) + fts5NextRowid(tls, p1, bp+12, bp+16) } else { { @@ -184998,14 +185241,14 @@ func fts5MergeRowidLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf iOut = *(*I64)(unsafe.Pointer(bp + 28 /* iRowid2 */)) if *(*int32)(unsafe.Pointer(bp + 12)) >= 0 && *(*I64)(unsafe.Pointer(bp + 16)) == *(*I64)(unsafe.Pointer(bp + 28)) { - fts5NextRowid(tls, p1, bp+12 /* &i1 */, bp+16 /* &iRowid1 */) + fts5NextRowid(tls, p1, bp+12, bp+16) } - fts5NextRowid(tls, p2, bp+24 /* &i2 */, bp+28 /* &iRowid2 */) + fts5NextRowid(tls, p2, bp+24, bp+28) } } - fts5BufferSwap(tls, bp /* &out */, p1) - sqlite3Fts5BufferFree(tls, bp /* &out */) + fts5BufferSwap(tls, bp, p1) + sqlite3Fts5BufferFree(tls, bp) } type PrefixMerger1 = struct { @@ -185014,11 +185257,11 @@ type PrefixMerger1 = struct { FiOff int32 FaPos uintptr FpNext uintptr -} /* sqlite3.c:227888:9 */ +} /* sqlite3.c:227932:9 */ -type PrefixMerger = PrefixMerger1 /* sqlite3.c:227888:29 */ +type PrefixMerger = PrefixMerger1 /* sqlite3.c:227932:29 */ -func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:227897:13: */ +func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:227941:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FaPoslist != 0 { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).Fiter.FiRowid > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).Fiter.FiRowid { @@ -185029,7 +185272,7 @@ func fts5PrefixMergerInsertByRowid(tls *libc.TLS, ppHead uintptr, p uintptr) { / } } -func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:227911:13: */ +func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) { /* sqlite3.c:227955:13: */ if (*PrefixMerger)(unsafe.Pointer(p)).FiPos >= int64(0) { var pp uintptr = ppHead for *(*uintptr)(unsafe.Pointer(pp)) != 0 && (*PrefixMerger)(unsafe.Pointer(p)).FiPos > (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FiPos { @@ -185042,7 +185285,7 @@ func fts5PrefixMergerInsertByPosition(tls *libc.TLS, ppHead uintptr, p uintptr) // Array aBuf[] contains nBuf doclists. These are all merged in with the // doclist in buffer p1. -func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:227930:13: */ +func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf uintptr) { /* sqlite3.c:227974:13: */ bp := tls.Alloc(740) defer tls.Free(740) @@ -185059,12 +185302,12 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf // a linked-list starting at pHead in ascending order of rowid. Avoid // linking any iterators already at EOF into the linked list at all. - libc.Xmemset(tls, bp /* &aMerger[0] */, 0, uint32(unsafe.Sizeof(PrefixMerger{}))*uint32(nBuf+1)) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(PrefixMerger{}))*uint32(nBuf+1)) *(*uintptr)(unsafe.Pointer(bp + 704 /* pHead */)) = bp + uintptr(nBuf)*44 fts5DoclistIterInit(tls, p1, *(*uintptr)(unsafe.Pointer(bp + 704))) for i = 0; i < nBuf; i++ { fts5DoclistIterInit(tls, aBuf+uintptr(i)*12, bp+uintptr(i)*44) - fts5PrefixMergerInsertByRowid(tls, bp+704 /* &pHead */, bp+uintptr(i)*44) + fts5PrefixMergerInsertByRowid(tls, bp+704, bp+uintptr(i)*44) nOut = nOut + (*Fts5Buffer)(unsafe.Pointer(aBuf+uintptr(i)*12)).Fn } if nOut == 0 { @@ -185114,7 +185357,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pSave)).FaPos, (*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FnPoslist, pSave+32, pSave+24) nTmp = nTmp + ((*PrefixMerger)(unsafe.Pointer(pSave)).Fiter.FnPoslist + 10) nMerge++ - fts5PrefixMergerInsertByPosition(tls, bp+704 /* &pHead */, pSave) + fts5PrefixMergerInsertByPosition(tls, bp+704, pSave) pSave = pNext } @@ -185129,26 +185372,26 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf if sqlite3Fts5BufferSize(tls, p+32, bp+720, uint32(nTmp+nMerge*10)) != 0 { break } - sqlite3Fts5BufferZero(tls, bp+720 /* &tmp */) + sqlite3Fts5BufferZero(tls, bp+720) pThis = *(*uintptr)(unsafe.Pointer(bp + 704 /* pHead */)) *(*uintptr)(unsafe.Pointer(bp + 704 /* pHead */)) = (*PrefixMerger)(unsafe.Pointer(pThis)).FpNext - sqlite3Fts5PoslistSafeAppend(tls, bp+720 /* &tmp */, bp+732 /* &iPrev */, (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos) + sqlite3Fts5PoslistSafeAppend(tls, bp+720, bp+732, (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos) sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pThis)).FaPos, (*PrefixMerger)(unsafe.Pointer(pThis)).Fiter.FnPoslist, pThis+32, pThis+24) - fts5PrefixMergerInsertByPosition(tls, bp+704 /* &pHead */, pThis) + fts5PrefixMergerInsertByPosition(tls, bp+704, pThis) for (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).FpNext != 0 { pThis = *(*uintptr)(unsafe.Pointer(bp + 704 /* pHead */)) if (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos != *(*I64)(unsafe.Pointer(bp + 732)) { - sqlite3Fts5PoslistSafeAppend(tls, bp+720 /* &tmp */, bp+732 /* &iPrev */, (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos) + sqlite3Fts5PoslistSafeAppend(tls, bp+720, bp+732, (*PrefixMerger)(unsafe.Pointer(pThis)).FiPos) } sqlite3Fts5PoslistNext64(tls, (*PrefixMerger)(unsafe.Pointer(pThis)).FaPos, (*PrefixMerger)(unsafe.Pointer(pThis)).Fiter.FnPoslist, pThis+32, pThis+24) *(*uintptr)(unsafe.Pointer(bp + 704 /* pHead */)) = (*PrefixMerger)(unsafe.Pointer(pThis)).FpNext - fts5PrefixMergerInsertByPosition(tls, bp+704 /* &pHead */, pThis) + fts5PrefixMergerInsertByPosition(tls, bp+704, pThis) } if (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).FiPos != *(*I64)(unsafe.Pointer(bp + 732)) { - sqlite3Fts5PoslistSafeAppend(tls, bp+720 /* &tmp */, bp+732 /* &iPrev */, (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704 /* pHead */)))).FiPos) + sqlite3Fts5PoslistSafeAppend(tls, bp+720, bp+732, (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704 /* pHead */)))).FiPos) } nTail = (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).Fiter.FnPoslist - (*PrefixMerger)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 704)))).FiOff @@ -185182,7 +185425,7 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf var pX uintptr = bp + uintptr(i)*44 if (*PrefixMerger)(unsafe.Pointer(pX)).Fiter.FaPoslist != 0 && (*PrefixMerger)(unsafe.Pointer(pX)).Fiter.FiRowid == iLastRowid { fts5DoclistIterNext(tls, pX) - fts5PrefixMergerInsertByRowid(tls, bp+704 /* &pHead */, pX) + fts5PrefixMergerInsertByRowid(tls, bp+704, pX) } } @@ -185197,17 +185440,17 @@ func fts5MergePrefixLists(tls *libc.TLS, p uintptr, p1 uintptr, nBuf int32, aBuf fts5DoclistIterNext(tls, pI) *(*uintptr)(unsafe.Pointer(bp + 704 /* pHead */)) = (*PrefixMerger)(unsafe.Pointer(pThis)).FpNext - fts5PrefixMergerInsertByRowid(tls, bp+704 /* &pHead */, pThis) + fts5PrefixMergerInsertByRowid(tls, bp+704, pThis) } } sqlite3Fts5BufferFree(tls, p1) - sqlite3Fts5BufferFree(tls, bp+720 /* &tmp */) + sqlite3Fts5BufferFree(tls, bp+720) libc.Xmemset(tls, (*Fts5Buffer)(unsafe.Pointer(bp+708)).Fp+uintptr((*Fts5Buffer)(unsafe.Pointer(bp+708)).Fn), 0, uint32(FTS5_DATA_ZERO_PADDING)) *(*Fts5Buffer)(unsafe.Pointer(p1)) = *(*Fts5Buffer)(unsafe.Pointer(bp + 708 /* out */)) } -func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:228074:13: */ +func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pToken uintptr, nToken int32, pColset uintptr, ppIter uintptr) { /* sqlite3.c:228118:13: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -185250,14 +185493,14 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok *(*int32)(unsafe.Pointer(bp + 20 /* bNewTerm */)) = 1 - libc.Xmemset(tls, bp /* &doclist */, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) if iIdx != 0 { *(*int32)(unsafe.Pointer(bp + 16 /* dummy */)) = 0 var f2 int32 = FTS5INDEX_QUERY_SKIPEMPTY | FTS5INDEX_QUERY_NOOUTPUT *(*U8)(unsafe.Pointer(pToken)) = U8('0') - fts5MultiIterNew(tls, p, pStruct, f2, pColset, pToken, nToken, -1, 0, bp+12 /* &p1 */) + fts5MultiIterNew(tls, p, pStruct, f2, pColset, pToken, nToken, -1, 0, bp+12) fts5IterSetOutputCb(tls, p+32, *(*uintptr)(unsafe.Pointer(bp + 12 /* p1 */))) - for ; fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12))) == 0; fts5MultiIterNext2(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12 /* p1 */)), bp+16 /* &dummy */) { + for ; fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12))) == 0; fts5MultiIterNext2(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12 /* p1 */)), bp+16) { var pSeg uintptr = *(*uintptr)(unsafe.Pointer(bp + 12)) + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).FaFirst+1*4)).FiFirst)*92 (*struct { f func(*libc.TLS, uintptr, uintptr) @@ -185273,9 +185516,9 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } *(*U8)(unsafe.Pointer(pToken)) = U8('0' + iIdx) - fts5MultiIterNew(tls, p, pStruct, flags, pColset, pToken, nToken, -1, 0, bp+12 /* &p1 */) + fts5MultiIterNew(tls, p, pStruct, flags, pColset, pToken, nToken, -1, 0, bp+12) fts5IterSetOutputCb(tls, p+32, *(*uintptr)(unsafe.Pointer(bp + 12 /* p1 */))) - for ; fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12))) == 0; fts5MultiIterNext2(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12 /* p1 */)), bp+20 /* &bNewTerm */) { + for ; fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12))) == 0; fts5MultiIterNext2(tls, p, *(*uintptr)(unsafe.Pointer(bp + 12 /* p1 */)), bp+20) { var pSeg uintptr = *(*uintptr)(unsafe.Pointer(bp + 12)) + 68 + uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 12)))).FaFirst+1*4)).FiFirst)*92 var nTerm int32 = (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fn var pTerm uintptr = (*Fts5SegIter)(unsafe.Pointer(pSeg)).Fterm.Fp @@ -185300,8 +185543,8 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok for iStore = i1; iStore < i1+nMerge; iStore++ { if (*Fts5Buffer)(unsafe.Pointer(aBuf+uintptr(iStore)*12)).Fn == 0 { - fts5BufferSwap(tls, bp /* &doclist */, aBuf+uintptr(iStore)*12) - sqlite3Fts5BufferZero(tls, bp /* &doclist */) + fts5BufferSwap(tls, bp, aBuf+uintptr(iStore)*12) + sqlite3Fts5BufferZero(tls, bp) break } } @@ -185345,7 +185588,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok } fts5MultiIterNew2(tls, p, pData, bDesc, ppIter) } - sqlite3Fts5BufferFree(tls, bp /* &doclist */) + sqlite3Fts5BufferFree(tls, bp) } fts5StructureRelease(tls, pStruct) @@ -185354,7 +185597,7 @@ func fts5SetupPrefixIter(tls *libc.TLS, p uintptr, bDesc int32, iIdx int32, pTok // Indicate that all subsequent calls to sqlite3Fts5IndexWrite() pertain // to the document with rowid iRowid. -func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:228211:12: */ +func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid I64) int32 { /* sqlite3.c:228255:12: */ // Allocate the hash table if it has not already been allocated if (*Fts5Index)(unsafe.Pointer(p)).FpHash == uintptr(0) { @@ -185374,7 +185617,7 @@ func sqlite3Fts5IndexBeginWrite(tls *libc.TLS, p uintptr, bDelete int32, iRowid } // Commit data to disk. -func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228235:12: */ +func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228279:12: */ fts5IndexFlush(tls, p) sqlite3Fts5IndexCloseReader(tls, p) @@ -185385,7 +185628,7 @@ func sqlite3Fts5IndexSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228235: // to the database. Additionally, assume that the contents of the %_data // table may have changed on disk. So any in-memory caches of %_data // records must be invalidated. -func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228248:12: */ +func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228292:12: */ sqlite3Fts5IndexCloseReader(tls, p) fts5IndexDiscardData(tls, p) fts5StructureInvalidate(tls, p) @@ -185396,7 +185639,7 @@ func sqlite3Fts5IndexRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228 // The %_data table is completely empty when this function is called. This // function populates it with the initial structure objects for each index, // and the initial version of the "averages" record (a zero-byte blob). -func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228261:12: */ +func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228305:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -185404,9 +185647,9 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22826 fts5StructureInvalidate(tls, p) fts5IndexDiscardData(tls, p) - libc.Xmemset(tls, bp /* &s */, 0, uint32(unsafe.Sizeof(Fts5Structure{}))) - fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1543 /* "" */, 0) - fts5StructureWrite(tls, p, bp /* &s */) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Structure{}))) + fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), ts+1565, 0) + fts5StructureWrite(tls, p, bp) return fts5IndexReturn(tls, p) } @@ -185415,24 +185658,24 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22826 // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:228278:12: */ +func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:228322:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK var p uintptr // New object - *(*uintptr)(unsafe.Pointer(pp)) = libc.AssignUintptr(&p, sqlite3Fts5MallocZero(tls, bp+8 /* &rc */, int64(unsafe.Sizeof(Fts5Index{})))) + *(*uintptr)(unsafe.Pointer(pp)) = libc.AssignUintptr(&p, sqlite3Fts5MallocZero(tls, bp+8, int64(unsafe.Sizeof(Fts5Index{})))) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8 /* &rc */, ts+34695 /* "%s_data" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8, ts+34864, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0 && bCreate != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, - pConfig, ts+24613 /* "data" */, ts+34703 /* "id INTEGER PRIMA..." */, 0, pzErr) + pConfig, ts+24782, ts+34872, 0, pzErr) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11326, /* "idx" */ - ts+34738, /* "segid, term, pgn..." */ + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11348, + ts+34907, 1, pzErr) } if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { @@ -185449,7 +185692,7 @@ func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uint } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). -func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228319:12: */ +func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228363:12: */ var rc int32 = SQLITE_OK if p != 0 { @@ -185470,7 +185713,7 @@ func sqlite3Fts5IndexClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228319 // Argument p points to a buffer containing utf-8 text that is n bytes in // size. Return the number of bytes in the nChar character prefix of the // buffer, or 0 if there are less than nChar characters in total. -func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:228342:12: */ +func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nChar int32) int32 { /* sqlite3.c:228386:12: */ var n int32 = 0 var i int32 for i = 0; i < nChar; i++ { @@ -185497,7 +185740,7 @@ func sqlite3Fts5IndexCharlenToBytelen(tls *libc.TLS, p uintptr, nByte int32, nCh // pIn is a UTF-8 encoded string, nIn bytes in size. Return the number of // unicode characters in the string. -func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:228369:12: */ +func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3.c:228413:12: */ var nChar int32 = 0 var i int32 = 0 for i < nIn { @@ -185519,7 +185762,7 @@ func fts5IndexCharlen(tls *libc.TLS, pIn uintptr, nIn int32) int32 { /* sqlite3. // If the operation is a delete, it must be called (at least) once for each // unique token in the document with an iCol value less than zero. The iPos // argument is ignored for a delete. -func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:228391:12: */ +func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pToken uintptr, nToken int32) int32 { /* sqlite3.c:228435:12: */ var i int32 // Used to iterate through indexes var rc int32 = SQLITE_OK // Return code var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -185543,7 +185786,7 @@ func sqlite3Fts5IndexWrite(tls *libc.TLS, p uintptr, iCol int32, iPos int32, pTo // Open a new iterator to iterate though all rowid that match the // specified token or token prefix. -func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:228427:12: */ +func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int32, flags int32, pColset uintptr, ppIter uintptr) int32 { /* sqlite3.c:228471:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -185589,13 +185832,13 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 *(*U8)(unsafe.Pointer((*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp)) = U8('0' + iIdx) if pStruct != 0 { fts5MultiIterNew(tls, p, pStruct, flags|FTS5INDEX_QUERY_SKIPEMPTY, - pColset, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, nToken+1, -1, 0, bp+12 /* &pRet */) + pColset, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, nToken+1, -1, 0, bp+12) fts5StructureRelease(tls, pStruct) } } else { // Scan multiple terms in the main index var bDesc int32 = libc.Bool32(flags&FTS5INDEX_QUERY_DESC != 0) - fts5SetupPrefixIter(tls, p, bDesc, iPrefixIdx, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, nToken+1, pColset, bp+12 /* &pRet */) + fts5SetupPrefixIter(tls, p, bDesc, iPrefixIdx, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, nToken+1, pColset, bp+12) if *(*uintptr)(unsafe.Pointer(bp + 12)) == uintptr(0) { } else { @@ -185619,14 +185862,14 @@ func sqlite3Fts5IndexQuery(tls *libc.TLS, p uintptr, pToken uintptr, nToken int3 } *(*uintptr)(unsafe.Pointer(ppIter)) = *(*uintptr)(unsafe.Pointer(bp + 12 /* pRet */)) - sqlite3Fts5BufferFree(tls, bp /* &buf */) + sqlite3Fts5BufferFree(tls, bp) } return fts5IndexReturn(tls, p) } // Return true if the iterator passed as the only argument is at EOF. // Move to the next matching rowid. -func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:228515:12: */ +func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:228559:12: */ var pIter uintptr = pIndexIter fts5MultiIterNext(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, 0, int64(0)) @@ -185634,7 +185877,7 @@ func sqlite3Fts5IterNext(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c } // Move to the next matching term/rowid. Used by the fts5vocab module. -func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:228525:12: */ +func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlite3.c:228569:12: */ var pIter uintptr = pIndexIter var p uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -185654,20 +185897,20 @@ func sqlite3Fts5IterNextScan(tls *libc.TLS, pIndexIter uintptr) int32 { /* sqlit // Move to the next matching rowid that occurs at or after iMatch. The // definition of "at or after" depends on whether this iterator iterates // in ascending or descending rowid order. -func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:228549:12: */ +func sqlite3Fts5IterNextFrom(tls *libc.TLS, pIndexIter uintptr, iMatch I64) int32 { /* sqlite3.c:228593:12: */ var pIter uintptr = pIndexIter fts5MultiIterNextFrom(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex, pIter, iMatch) return fts5IndexReturn(tls, (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex) } // Return the current term. -func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228558:19: */ +func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr { /* sqlite3.c:228602:19: */ bp := tls.Alloc(4) defer tls.Free(4) // var n int32 at bp, 4 - var z uintptr = fts5MultiIterTerm(tls, pIndexIter, bp /* &n */) + var z uintptr = fts5MultiIterTerm(tls, pIndexIter, bp) *(*int32)(unsafe.Pointer(pn)) = *(*int32)(unsafe.Pointer(bp)) - 1 return func() uintptr { @@ -185679,7 +185922,7 @@ func sqlite3Fts5IterTerm(tls *libc.TLS, pIndexIter uintptr, pn uintptr) uintptr } // Close an iterator opened by an earlier call to sqlite3Fts5IndexQuery(). -func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:228569:13: */ +func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:228613:13: */ if pIndexIter != 0 { var pIter uintptr = pIndexIter var pIndex uintptr = (*Fts5Iter)(unsafe.Pointer(pIter)).FpIndex @@ -185692,7 +185935,7 @@ func sqlite3Fts5IterClose(tls *libc.TLS, pIndexIter uintptr) { /* sqlite3.c:2285 // // Parameter anSize must point to an array of size nCol, where nCol is // the number of user defined columns in the FTS table. -func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:228584:12: */ +func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize uintptr) int32 { /* sqlite3.c:228628:12: */ var nCol int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).FnCol var pData uintptr @@ -185714,7 +185957,7 @@ func sqlite3Fts5IndexGetAverages(tls *libc.TLS, p uintptr, pnRow uintptr, anSize // Replace the current "averages" record with the contents of the buffer // supplied as the second argument. -func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:228608:12: */ +func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData int32) int32 { /* sqlite3.c:228652:12: */ fts5DataWrite(tls, p, int64(FTS5_AVERAGES_ROWID), pData, nData) return fts5IndexReturn(tls, p) @@ -185722,7 +185965,7 @@ func sqlite3Fts5IndexSetAverages(tls *libc.TLS, p uintptr, pData uintptr, nData // Return the total number of blocks this module has read from the %_data // table since it was created. -func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228618:12: */ +func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228662:12: */ return (*Fts5Index)(unsafe.Pointer(p)).FnRead } @@ -185731,7 +185974,7 @@ func sqlite3Fts5IndexReads(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228618 // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:228629:12: */ +func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* sqlite3.c:228673:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -185741,19 +185984,19 @@ func sqlite3Fts5IndexSetCookie(tls *libc.TLS, p uintptr, iNew int32) int32 { /* // Binary representation of iNew *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */)) = uintptr(0) - sqlite3Fts5Put32(tls, bp /* &aCookie[0] */, iNew) + sqlite3Fts5Put32(tls, bp, iNew) rc = Xsqlite3_blob_open(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl, - ts+34385 /* "block" */, int64(FTS5_STRUCTURE_ROWID), 1, bp+4 /* &pBlob */) + ts+34554, int64(FTS5_STRUCTURE_ROWID), 1, bp+4) if rc == SQLITE_OK { - Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */)), bp /* &aCookie[0] */, 4, 0) + Xsqlite3_blob_write(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */)), bp, 4, 0) rc = Xsqlite3_blob_close(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* pBlob */))) } return rc } -func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228649:12: */ +func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:228693:12: */ var pStruct uintptr pStruct = fts5StructureRead(tls, p) fts5StructureRelease(tls, pStruct) @@ -185767,7 +186010,7 @@ func sqlite3Fts5IndexLoadConfig(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2 // functionality. // Return a simple checksum value based on the arguments. -func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:228666:12: */ +func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int32, iIdx int32, pTerm uintptr, nTerm int32) U64 { /* sqlite3.c:228710:12: */ var i int32 var ret U64 = U64(iRowid) ret = ret + (ret<<3 + U64(iCol)) @@ -185787,7 +186030,7 @@ func sqlite3Fts5IndexEntryCksum(tls *libc.TLS, iRowid I64, iCol int32, iPos int3 // contain zero terms. // 2) All leaves of pSeg between iNoRowid and iLast (inclusive) exist and // contain zero rowids. -func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:228884:13: */ +func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst int32, iNoRowid int32, iLast int32) { /* sqlite3.c:228928:13: */ var i int32 // Now check that the iter.nEmpty leaves following the current leaf @@ -185806,7 +186049,7 @@ func fts5IndexIntegrityCheckEmpty(tls *libc.TLS, p uintptr, pSeg uintptr, iFirst } } -func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:228905:13: */ +func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlite3.c:228949:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -185835,7 +186078,7 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit if iOff+*(*int32)(unsafe.Pointer(bp + 4)) > (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 } else { - sqlite3Fts5BufferSet(tls, p+32, bp+8 /* &buf1 */, *(*int32)(unsafe.Pointer(bp + 4 /* nByte */)), (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff)) + sqlite3Fts5BufferSet(tls, p+32, bp+8, *(*int32)(unsafe.Pointer(bp + 4 /* nByte */)), (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff)) } } else { // var nKeep int32 at bp+20, 4 @@ -185848,24 +186091,24 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8 /* &buf1 */)).Fn = *(*int32)(unsafe.Pointer(bp + 20 /* nKeep */)) - sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8 /* &buf1 */, uint32(*(*int32)(unsafe.Pointer(bp + 24 /* nByte */))), (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff)) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8, uint32(*(*int32)(unsafe.Pointer(bp + 24 /* nByte */))), (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iOff)) } if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { - res = fts5BufferCompare(tls, bp+8 /* &buf1 */, bp+28 /* &buf2 */) + res = fts5BufferCompare(tls, bp+8, bp+28) if res <= 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 } } } - sqlite3Fts5BufferSet(tls, p+32, bp+28 /* &buf2 */, (*Fts5Buffer)(unsafe.Pointer(bp+8 /* &buf1 */)).Fn, (*Fts5Buffer)(unsafe.Pointer(bp+8 /* &buf1 */)).Fp) + sqlite3Fts5BufferSet(tls, p+32, bp+28, (*Fts5Buffer)(unsafe.Pointer(bp+8 /* &buf1 */)).Fn, (*Fts5Buffer)(unsafe.Pointer(bp+8 /* &buf1 */)).Fp) } - sqlite3Fts5BufferFree(tls, bp+8 /* &buf1 */) - sqlite3Fts5BufferFree(tls, bp+28 /* &buf2 */) + sqlite3Fts5BufferFree(tls, bp+8) + sqlite3Fts5BufferFree(tls, bp+28) } -func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:228955:13: */ +func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:228999:13: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -185879,9 +186122,9 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* return } - fts5IndexPrepareStmt(tls, p, bp+24 /* &pStmt */, Xsqlite3_mprintf(tls, + fts5IndexPrepareStmt(tls, p, bp+24, Xsqlite3_mprintf(tls, - ts+34782, /* "SELECT segid, te..." */ + ts+34951, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. @@ -185998,7 +186241,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* if iRowidOff >= (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 } else { - sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iRowidOff), bp+32 /* &iRowid */) + sqlite3Fts5GetVarint(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp+uintptr(iRowidOff), bp+32) if *(*I64)(unsafe.Pointer(bp + 32)) != fts5DlidxIterRowid(tls, pDlidx) { (*Fts5Index)(unsafe.Pointer(p)).Frc = SQLITE_CORRUPT | int32(1)<<8 } @@ -186034,7 +186277,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* // checksum does not match. Return SQLITE_OK if all checks pass without // error, or some other SQLite error code if another error (e.g. OOM) // occurs. -func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:229100:12: */ +func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCksum int32) int32 { /* sqlite3.c:229144:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -186076,13 +186319,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // As each term visited by the linear scans, a separate query for the // same term is performed. cksum3 is calculated based on the entries // extracted by these queries. - for fts5MultiIterNew(tls, p, pStruct, flags, uintptr(0), uintptr(0), 0, -1, 0, bp /* &pIter */); fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) == 0; fts5MultiIterNext(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), 0, int64(0)) { + for fts5MultiIterNew(tls, p, pStruct, flags, uintptr(0), uintptr(0), 0, -1, 0, bp); fts5MultiIterEof(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) == 0; fts5MultiIterNext(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), 0, int64(0)) { // var n int32 at bp+4, 4 // Size of term in bytes *(*I64)(unsafe.Pointer(bp + 24 /* iPos */)) = int64(0) // Position read from poslist *(*int32)(unsafe.Pointer(bp + 20 /* iOff */)) = 0 // Offset within poslist var iRowid I64 = fts5MultiIterRowid(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */))) - var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), bp+4 /* &n */) + var z uintptr = fts5MultiIterTerm(tls, *(*uintptr)(unsafe.Pointer(bp /* pIter */)), bp+4) // If this is a new term, query for it. Update cksum3 with the results. @@ -186092,8 +186335,8 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } } else { (*Fts5Buffer)(unsafe.Pointer(bp + 8 /* &poslist */)).Fn = 0 - fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+68+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*92, uintptr(0), bp+8 /* &poslist */) - sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8 /* &poslist */, uint32(4), ts+34868 /* "\x00\x00\x00\x00" */) + fts5SegiterPoslist(tls, p, *(*uintptr)(unsafe.Pointer(bp))+68+uintptr((*Fts5CResult)(unsafe.Pointer((*Fts5Iter)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp)))).FaFirst+1*4)).FiFirst)*92, uintptr(0), bp+8) + sqlite3Fts5BufferAppendBlob(tls, p+32, bp+8, uint32(4), ts+35037) for 0 == sqlite3Fts5PoslistNext64(tls, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp+8)).Fn, bp+20, bp+24) { var iCol int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) >> 32) var iTokOff int32 = int32(*(*I64)(unsafe.Pointer(bp + 24)) & int64(0x7FFFFFFF)) @@ -186108,7 +186351,7 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks } fts5StructureRelease(tls, pStruct) - sqlite3Fts5BufferFree(tls, bp+8 /* &poslist */) + sqlite3Fts5BufferFree(tls, bp+8) return fts5IndexReturn(tls, p) } @@ -186124,13 +186367,13 @@ func sqlite3Fts5IndexIntegrityCheck(tls *libc.TLS, p uintptr, cksum U64, bUseCks // // If successful, SQLITE_OK is returned. If an error occurs, some other // SQLite error code is returned instead. -func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:229663:12: */ +func sqlite3Fts5IndexInit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:229707:12: */ return SQLITE_OK _ = db return int32(0) } -func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229689:12: */ +func sqlite3Fts5IndexReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:229733:12: */ if fts5IndexDataVersion(tls, p) != (*Fts5Index)(unsafe.Pointer(p)).FiStructVersion { fts5StructureInvalidate(tls, p) @@ -186163,7 +186406,7 @@ type Fts5Auxdata1 = struct { FpPtr uintptr FxDelete uintptr FpNext uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ // 2014 Jun 09 // @@ -186185,7 +186428,7 @@ type Fts5Auxdata1 = struct { // assert() conditions in the fts5 code are activated - conditions that are // only true if it is guaranteed that the fts5 database is not corrupt. -type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:229726:28 */ +type Fts5Auxdata = Fts5Auxdata1 /* sqlite3.c:229770:28 */ type Fts5Auxiliary1 = struct { FpGlobal uintptr FzFunc uintptr @@ -186193,9 +186436,9 @@ type Fts5Auxiliary1 = struct { FxFunc Fts5_extension_function FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:229727:30 */ +type Fts5Auxiliary = Fts5Auxiliary1 /* sqlite3.c:229771:30 */ type Fts5Cursor1 = struct { Fbase Sqlite3_vtab_cursor FpNext uintptr @@ -186222,35 +186465,35 @@ type Fts5Cursor1 = struct { FnInstAlloc int32 FnInstCount int32 FaInst uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:229728:27 */ +type Fts5Cursor = Fts5Cursor1 /* sqlite3.c:229772:27 */ type Fts5FullTable1 = struct { Fp Fts5Table FpStorage uintptr FpGlobal uintptr FpSortCsr uintptr -} /* sqlite3.c:229729:9 */ +} /* sqlite3.c:229773:9 */ -type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:229729:30 */ +type Fts5FullTable = Fts5FullTable1 /* sqlite3.c:229773:30 */ type Fts5Sorter1 = struct { FpStmt uintptr FiRowid I64 FaPoslist uintptr FnIdx int32 FaIdx [1]int32 -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:229730:27 */ +type Fts5Sorter = Fts5Sorter1 /* sqlite3.c:229774:27 */ type Fts5TokenizerModule1 = struct { FzName uintptr FpUserData uintptr Fx Fts5_tokenizer FxDestroy uintptr FpNext uintptr -} /* sqlite3.c:214930:9 */ +} /* sqlite3.c:214970:9 */ -type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:229731:36 */ +type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:229775:36 */ // NOTES ON TRANSACTIONS: // @@ -186284,20 +186527,20 @@ type Fts5TokenizerModule = Fts5TokenizerModule1 /* sqlite3.c:229731:36 */ type Fts5TransactionState = struct { FeState int32 FiSavepoint int32 -} /* sqlite3.c:229764:1 */ +} /* sqlite3.c:229808:1 */ type Fts5MatchPhrase = struct { FpPoslist uintptr FnTerm int32 -} /* sqlite3.c:229821:1 */ +} /* sqlite3.c:229865:1 */ // Return true if pTab is a contentless table. -func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:230005:12: */ +func fts5IsContentless(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:230049:12: */ return libc.Bool32((*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FeContent == FTS5_CONTENT_NONE) } // Delete a virtual table handle allocated by fts5InitVtab(). -func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:230012:13: */ +func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:230056:13: */ if pTab != 0 { sqlite3Fts5IndexClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) sqlite3Fts5StorageClose(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) @@ -186307,13 +186550,13 @@ func fts5FreeVtab(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:230012:13: */ } // The xDisconnect() virtual table method. -func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:230024:12: */ +func fts5DisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:230068:12: */ fts5FreeVtab(tls, pVtab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:230032:12: */ +func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:230076:12: */ var pTab uintptr = pVtab var rc int32 = sqlite3Fts5DropAll(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig) if rc == SQLITE_OK { @@ -186331,7 +186574,7 @@ func fts5DestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:230032 // argv[1] -> database name // argv[2] -> table name // argv[...] -> "column name" and other module argument fields. -func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:230052:12: */ +func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:230096:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -186342,9 +186585,9 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i var pTab uintptr = uintptr(0) // New virtual table object // Allocate the new vtab object and parse the configuration - pTab = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64(unsafe.Sizeof(Fts5FullTable{}))) + pTab = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5FullTable{}))) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5ConfigParse(tls, pGlobal, db, argc, azConfig, bp+4 /* &pConfig */, pzErr) + *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5ConfigParse(tls, pGlobal, db, argc, azConfig, bp+4, pzErr) } if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { @@ -186389,11 +186632,11 @@ func fts5InitVtab(tls *libc.TLS, bCreate int32, db uintptr, pAux uintptr, argc i // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5InitVtab(). -func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:230118:12: */ +func fts5ConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:230162:12: */ return fts5InitVtab(tls, 0, db, pAux, argc, argv, ppVtab, pzErr) } -func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:230128:12: */ +func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:230172:12: */ return fts5InitVtab(tls, 1, db, pAux, argc, argv, ppVtab, pzErr) } @@ -186402,14 +186645,14 @@ func fts5CreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // Set the SQLITE_INDEX_SCAN_UNIQUE flag in pIdxInfo->flags. Unless this // extension is currently being used by a version of SQLite too old to // support index-info flags. In that case this function is a no-op. -func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:230154:13: */ +func fts5SetUniqueFlag(tls *libc.TLS, pIdxInfo uintptr) { /* sqlite3.c:230198:13: */ { *(*int32)(unsafe.Pointer(pIdxInfo + 52)) |= SQLITE_INDEX_SCAN_UNIQUE } } -func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:230165:12: */ +func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* sqlite3.c:230209:12: */ if (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern == FTS5_PATTERN_GLOB && int32((*sqlite3_index_constraint)(unsafe.Pointer(p)).Fop) == FTS5_PATTERN_GLOB { return 1 @@ -186480,7 +186723,7 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // * An == rowid constraint: cost=10.0 // // Costs are not modified by the ORDER BY clause. -func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:230243:12: */ +func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:230287:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -186501,7 +186744,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* if (*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0 { (*Fts5Table)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+34873 /* "recursively defi..." */, 0) + ts+35042, 0) return SQLITE_ERROR } @@ -186535,7 +186778,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* } else if iCol >= 0 { bSeenMatch = 1 *(*int8)(unsafe.Pointer(idxStr + uintptr(libc.PostIncInt32(&iIdxStr, 1)))) = int8('M') - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4895 /* "%d" */, libc.VaList(bp, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4917, libc.VaList(bp, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) } @@ -186551,7 +186794,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* } return int8('G') }() - Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4895 /* "%d" */, libc.VaList(bp+8, iCol)) + Xsqlite3_snprintf(tls, 6, idxStr+uintptr(iIdxStr), ts+4917, libc.VaList(bp+8, iCol)) idxStr += uintptr(libc.Xstrlen(tls, idxStr+uintptr(iIdxStr))) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1) @@ -186642,7 +186885,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* return SQLITE_OK } -func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:230378:12: */ +func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:230422:12: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab == pTab { @@ -186653,7 +186896,7 @@ func fts5NewTransaction(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:230378 } // Implementation of xOpen method. -func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:230389:12: */ +func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:230433:12: */ var pTab uintptr = pVTab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = uintptr(0) // New cursor object @@ -186679,7 +186922,7 @@ func fts5OpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqli return rc } -func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230415:12: */ +func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230459:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_SCAN { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FbDesc != 0 { return FTS5_STMT_SCAN_DESC @@ -186692,11 +186935,11 @@ func fts5StmtType(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230415:12: * // This function is called after the cursor passed as the only argument // is moved to point at a different row. It clears all cached data // specific to the previous row stored by the cursor object. -func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:230427:13: */ +func fts5CsrNewrow(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:230471:13: */ *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_REQUIRE_CONTENT | FTS5CSR_REQUIRE_DOCSIZE | FTS5CSR_REQUIRE_INST | FTS5CSR_REQUIRE_POSLIST } -func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:230436:13: */ +func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:230480:13: */ var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pData uintptr var pNext uintptr @@ -186739,7 +186982,7 @@ func fts5FreeCursorComponents(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:230436 // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:230480:12: */ +func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:230524:12: */ if pCursor != 0 { var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor @@ -186756,7 +186999,7 @@ func fts5CloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:230480 return SQLITE_OK } -func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230496:12: */ +func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230540:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -186784,7 +187027,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230496:12: for i = 0; i < (*Fts5Sorter)(unsafe.Pointer(pSorter)).FnIdx-1; i++ { // var iVal int32 at bp, 4 - a += uintptr(sqlite3Fts5GetVarint32(tls, a, bp /* &iVal */)) + a += uintptr(sqlite3Fts5GetVarint32(tls, a, bp)) iOff = iOff + *(*int32)(unsafe.Pointer(bp)) *(*int32)(unsafe.Pointer(pSorter + 20 + uintptr(i)*4)) = iOff } @@ -186800,7 +187043,7 @@ func fts5SorterNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230496:12: // Set the FTS5CSR_REQUIRE_RESEEK flag on all FTS5_PLAN_MATCH cursors // open on table pTab. -func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:230539:13: */ +func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:230583:13: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == FTS5_PLAN_MATCH && @@ -186820,7 +187063,7 @@ func fts5TripCursors(tls *libc.TLS, pTab uintptr) { /* sqlite3.c:230539:13: */ // // Return SQLITE_OK if successful or if no reseek was required, or an // error code if an error occurred. -func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:230562:12: */ +func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sqlite3.c:230606:12: */ var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_RESEEK != 0 { @@ -186849,7 +187092,7 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // Return SQLITE_OK if nothing goes wrong. SQLITE_OK is returned // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. -func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:230594:12: */ +func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:230638:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186894,7 +187137,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:230594: rc = Xsqlite3_reset(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpStmt) if rc != SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + ts+3623, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } } else { rc = SQLITE_OK @@ -186908,7 +187151,7 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:230594: return rc } -func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:230647:12: */ +func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:230691:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -186924,9 +187167,9 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u rc = SQLITE_NOMEM } else { rc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, - uint32(SQLITE_PREPARE_PERSISTENT), bp+8 /* &pRet */, uintptr(0)) + uint32(SQLITE_PREPARE_PERSISTENT), bp+8, uintptr(0)) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) + *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } Xsqlite3_free(tls, zSql) } @@ -186936,7 +187179,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u return rc } -func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:230676:12: */ +func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:230720:12: */ bp := tls.Alloc(56) defer tls.Free(56) @@ -186965,25 +187208,25 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 // // If SQLite a built-in statement cache, this wouldn't be a problem. rc = fts5PrepareStatement(tls, pSorter, pConfig, - ts+34912, /* "SELECT rowid, ra..." */ + ts+35081, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zRank, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, func() uintptr { if zRankArgs != 0 { - return ts + 14507 /* ", " */ + return ts + 14529 /* ", " */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }(), func() uintptr { if zRankArgs != 0 { return zRankArgs } - return ts + 1543 + return ts + 1565 }(), func() uintptr { if bDesc != 0 { - return ts + 34967 /* "DESC" */ + return ts + 35136 /* "DESC" */ } - return ts + 34972 /* "ASC" */ + return ts + 35141 /* "ASC" */ }())) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter = pSorter @@ -187003,7 +187246,7 @@ func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int3 return rc } -func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:230728:12: */ +func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:230772:12: */ var rc int32 var pExpr uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr rc = sqlite3Fts5ExprFirst(tls, pExpr, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiFirstRowid, bDesc) @@ -187018,7 +187261,7 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // MATCH expression that begins with a '*' character. The remainder of // the text passed to the MATCH operator are used as the special query // parameters. -func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:230745:12: */ +func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:230789:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187034,13 +187277,13 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan = FTS5_PLAN_SPECIAL - if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+34976, z, n) { + if n == 5 && 0 == Xsqlite3_strnicmp(tls, ts+35145, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = I64(sqlite3Fts5IndexReads(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex)) - } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+4977, z, n) { + } else if n == 2 && 0 == Xsqlite3_strnicmp(tls, ts+4999, z, n) { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiSpecial = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId } else { // An unrecognized directive. Return an error message. - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+34982 /* "unknown special ..." */, libc.VaList(bp, n, z)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35151, libc.VaList(bp, n, z)) rc = SQLITE_ERROR } @@ -187050,7 +187293,7 @@ func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) // Search for an auxiliary function named zName that can be used with table // pTab. If one is found, return a pointer to the corresponding Fts5Auxiliary // structure. Otherwise, if no such function exists, return NULL. -func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:230780:22: */ +func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* sqlite3.c:230824:22: */ var pAux uintptr for pAux = (*Fts5Global)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).FpGlobal)).FpAux; pAux != 0; pAux = (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpNext { @@ -187063,7 +187306,7 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* return uintptr(0) } -func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230792:12: */ +func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:230836:12: */ bp := tls.Alloc(24) defer tls.Free(24) @@ -187075,11 +187318,11 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2307 var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16 /* &rc */, ts+35010 /* "SELECT %s" */, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16, ts+35179, libc.VaList(bp, zRankArgs)) if zSql != 0 { *(*uintptr)(unsafe.Pointer(bp + 20 /* pStmt */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, - uint32(SQLITE_PREPARE_PERSISTENT), bp+20 /* &pStmt */, uintptr(0)) + uint32(SQLITE_PREPARE_PERSISTENT), bp+20, uintptr(0)) Xsqlite3_free(tls, zSql) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -187087,7 +187330,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2307 var nByte Sqlite3_int64 (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 20 /* pStmt */))) nByte = Sqlite3_int64(uint32(unsafe.Sizeof(uintptr(0))) * uint32((*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg)) - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg = sqlite3Fts5MallocZero(tls, bp+16 /* &rc */, nByte) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg = sqlite3Fts5MallocZero(tls, bp+16, nByte) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { var i int32 for i = 0; i < (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg; i++ { @@ -187107,7 +187350,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2307 pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35020 /* "no such function..." */, libc.VaList(bp+8, zRank)) + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35189, libc.VaList(bp+8, zRank)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } @@ -187116,7 +187359,7 @@ func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:2307 return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } -func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:230843:12: */ +func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:230887:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -187131,7 +187374,7 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin rc = SQLITE_ERROR } } else { - rc = sqlite3Fts5ConfigParseRank(tls, z, bp+8 /* &zRank */, bp+12 /* &zRankArgs */) + rc = sqlite3Fts5ConfigParseRank(tls, z, bp+8, bp+12) } if rc == SQLITE_OK { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = *(*uintptr)(unsafe.Pointer(bp + 8 /* zRank */)) @@ -187139,21 +187382,21 @@ func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uin *(*int32)(unsafe.Pointer(pCsr + 56)) |= FTS5CSR_FREE_ZRANK } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+35041 /* "parse error in r..." */, libc.VaList(bp, z)) + ts+35210, libc.VaList(bp, z)) } } else { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank != 0 { (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRank (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = (*Fts5Config)(unsafe.Pointer(pConfig)).FzRankArgs } else { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33424 /* "bm25" */ + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = ts + 33593 /* "bm25" */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = uintptr(0) } } return rc } -func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:230880:12: */ +func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlite3.c:230924:12: */ if pVal != 0 { var eType int32 = Xsqlite3_value_numeric_type(tls, pVal) if eType == SQLITE_INTEGER { @@ -187172,7 +187415,7 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 1. Full-text search using a MATCH operator. // 2. A by-rowid lookup. // 3. A full-table scan. -func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:230901:12: */ +func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:230945:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187212,7 +187455,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp goto __1 } (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+34873 /* "recursively defi..." */, 0) + ts+35042, 0) return SQLITE_ERROR __1: ; @@ -187258,7 +187501,7 @@ __8: if !(zText == uintptr(0)) { goto __14 } - zText = ts + 1543 /* "" */ + zText = ts + 1565 /* "" */ __14: ; iCol = 0 @@ -187285,7 +187528,7 @@ __17: goto __19 __18: pzErr = pTab + 8 - rc = sqlite3Fts5ExprNew(tls, pConfig, 0, iCol, zText, bp+8 /* &pExpr */, pzErr) + rc = sqlite3Fts5ExprNew(tls, pConfig, 0, iCol, zText, bp+8, pzErr) if !(rc == SQLITE_OK) { goto __20 } @@ -187323,7 +187566,7 @@ __24: if !(zText1 != 0) { goto __25 } - rc = sqlite3Fts5ExprPattern(tls, pConfig, bGlob, iCol, zText1, bp+8 /* &pExpr */) + rc = sqlite3Fts5ExprPattern(tls, pConfig, bGlob, iCol, zText1, bp+8) __25: ; if !(rc == SQLITE_OK) { @@ -187447,7 +187690,7 @@ __35: goto __40 } *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+35074 /* "%s: table does n..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + ts+35243, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) rc = SQLITE_ERROR goto __41 __40: @@ -187493,7 +187736,7 @@ filter_out: // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:231094:12: */ +func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:231138:12: */ var pCsr uintptr = pCursor return func() int32 { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_EOF != 0 { @@ -187504,7 +187747,7 @@ func fts5EofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:231094:1 } // Return the rowid that the cursor currently points to. -func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:231102:12: */ +func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:231146:12: */ if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter != 0 { return (*Fts5Sorter)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpSorter)).FiRowid @@ -187518,7 +187761,7 @@ func fts5CursorRowid(tls *libc.TLS, pCsr uintptr) I64 { /* sqlite3.c:231102:12: // retrieve the rowid for the current row of the result set. fts5 // exposes %_content.rowid as the rowid for the virtual table. The // rowid should be written to *pRowid. -func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:231120:12: */ +func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:231164:12: */ var pCsr uintptr = pCursor var ePlan int32 = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan @@ -187548,7 +187791,7 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. -func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:231151:12: */ +func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:231195:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187585,14 +187828,14 @@ func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sql rc = SQLITE_CORRUPT | int32(1)<<8 } else if (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, - ts+3601 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) + ts+3623, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pTab)).FpConfig)).Fdb))) } } } return rc } -func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:231190:13: */ +func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:231234:13: */ var ap Va_list _ = ap // ... printf arguments ap = va @@ -187614,7 +187857,7 @@ func fts5SetVtabError(tls *libc.TLS, p uintptr, zFormat uintptr, va uintptr) { / // The commands implemented by this function are documented in the "Special // INSERT Directives" section of the documentation. It should be updated if // more commands are added to this function. -func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:231213:12: */ +func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) int32 { /* sqlite3.c:231257:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -187622,35 +187865,35 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) var rc int32 = SQLITE_OK *(*int32)(unsafe.Pointer(bp /* bError */)) = 0 - if 0 == Xsqlite3_stricmp(tls, ts+35110, zCmd) { + if 0 == Xsqlite3_stricmp(tls, ts+35279, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { fts5SetVtabError(tls, pTab, - ts+35121 /* "'delete-all' may..." */, 0) + ts+35290, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageDeleteAll(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+35201, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35370, zCmd) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NONE { fts5SetVtabError(tls, pTab, - ts+35209 /* "'rebuild' may no..." */, 0) + ts+35378, 0) rc = SQLITE_ERROR } else { rc = sqlite3Fts5StorageRebuild(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } - } else if 0 == Xsqlite3_stricmp(tls, ts+16632, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+16801, zCmd) { rc = sqlite3Fts5StorageOptimize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) - } else if 0 == Xsqlite3_stricmp(tls, ts+35265, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35434, zCmd) { var nMerge int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageMerge(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, nMerge) - } else if 0 == Xsqlite3_stricmp(tls, ts+35271, zCmd) { + } else if 0 == Xsqlite3_stricmp(tls, ts+35440, zCmd) { var iArg int32 = Xsqlite3_value_int(tls, pVal) rc = sqlite3Fts5StorageIntegrity(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iArg) } else { rc = sqlite3Fts5IndexLoadConfig(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpIndex) if rc == SQLITE_OK { - rc = sqlite3Fts5ConfigSetValue(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig, zCmd, pVal, bp /* &bError */) + rc = sqlite3Fts5ConfigSetValue(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig, zCmd, pVal, bp) } if rc == SQLITE_OK { if *(*int32)(unsafe.Pointer(bp)) != 0 { @@ -187663,7 +187906,7 @@ func fts5SpecialInsert(tls *libc.TLS, pTab uintptr, zCmd uintptr, pVal uintptr) return rc } -func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:231269:12: */ +func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sqlite3.c:231313:12: */ var rc int32 = SQLITE_OK var eType1 int32 = Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*4))) if eType1 == SQLITE_INTEGER { @@ -187673,7 +187916,7 @@ func fts5SpecialDelete(tls *libc.TLS, pTab uintptr, apVal uintptr) int32 { /* sq return rc } -func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:231282:13: */ +func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, piRowid uintptr) { /* sqlite3.c:231326:13: */ var rc int32 = *(*int32)(unsafe.Pointer(pRc)) if rc == SQLITE_OK { rc = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, piRowid) @@ -187696,7 +187939,7 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 2. The "new" rowid. // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns (<tablename> and "rank"). -func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:231312:12: */ +func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:231356:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -187718,7 +187961,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // A "special" INSERT op. These are handled separately. var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*4))) if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL && - 0 == Xsqlite3_stricmp(tls, ts+17177, z) { + 0 == Xsqlite3_stricmp(tls, ts+17346, z) { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1)*4))) @@ -187743,12 +187986,12 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p // This is not suported. if eType0 == SQLITE_INTEGER && fts5IsContentless(tls, pTab) != 0 { (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+35287, /* "cannot %s conten..." */ + ts+35456, libc.VaList(bp, func() uintptr { if nArg > 1 { - return ts + 20078 /* "UPDATE" */ + return ts + 20247 /* "UPDATE" */ } - return ts + 35324 /* "DELETE from" */ + return ts + 35493 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { @@ -187765,7 +188008,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p var iNew I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*4))) // Rowid to delete *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iNew, uintptr(0)) } - fts5StorageInsert(tls, bp+16 /* &rc */, pTab, apVal, pRowid) + fts5StorageInsert(tls, bp+16, pTab, apVal, pRowid) } else { var iOld I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal))) // Old rowid var iNew I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*4))) // New rowid @@ -187775,7 +188018,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iNew, uintptr(0)) } - fts5StorageInsert(tls, bp+16 /* &rc */, pTab, apVal, pRowid) + fts5StorageInsert(tls, bp+16, pTab, apVal, pRowid) } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, pRowid) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { @@ -187787,7 +188030,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } } else { *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) - fts5StorageInsert(tls, bp+16 /* &rc */, pTab, apVal, pRowid) + fts5StorageInsert(tls, bp+16, pTab, apVal, pRowid) } } } @@ -187798,7 +188041,7 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } // Implementation of xSync() method. -func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231438:12: */ +func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231482:12: */ var rc int32 var pTab uintptr = pVtab @@ -187810,7 +188053,7 @@ func fts5SyncMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231438:12 } // Implementation of xBegin() method. -func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231452:12: */ +func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231496:12: */ fts5NewTransaction(tls, pVtab) return SQLITE_OK @@ -187819,7 +188062,7 @@ func fts5BeginMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231452:1 // Implementation of xCommit() method. This is a no-op. The contents of // the pending-terms hash-table have already been flushed into the database // by fts5SyncMethod(). -func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231463:12: */ +func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231507:12: */ _ = pVtab // Call below is a no-op for NDEBUG builds return SQLITE_OK @@ -187827,7 +188070,7 @@ func fts5CommitMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231463: // Implementation of xRollback(). Discard the contents of the pending-terms // hash-table. Any changes made to the database are reverted by SQLite. -func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231473:12: */ +func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:231517:12: */ var rc int32 var pTab uintptr = pVtab @@ -187835,46 +188078,46 @@ func fts5RollbackMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:23147 return rc } -func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:231483:13: */ +func fts5ApiUserData(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:231527:13: */ var pCsr uintptr = pCtx return (*Fts5Auxiliary)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux)).FpUserData } -func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:231488:12: */ +func fts5ApiColumnCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:231532:12: */ var pCsr uintptr = pCtx return (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FnCol } -func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:231493:12: */ +func fts5ApiColumnTotalSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:231537:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageSize(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iCol, pnToken) } -func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:231503:12: */ +func fts5ApiRowCount(tls *libc.TLS, pCtx uintptr, pnRow uintptr) int32 { /* sqlite3.c:231547:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5StorageRowCount(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, pnRow) } -func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:231509:12: */ +func fts5ApiTokenize(tls *libc.TLS, pCtx uintptr, pText uintptr, nText int32, pUserData uintptr, xToken uintptr) int32 { /* sqlite3.c:231553:12: */ var pCsr uintptr = pCtx var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab return sqlite3Fts5Tokenize(tls, (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig, FTS5_TOKENIZE_AUX, pText, nText, pUserData, xToken) } -func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:231522:12: */ +func fts5ApiPhraseCount(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:231566:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) } -func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:231527:12: */ +func fts5ApiPhraseSize(tls *libc.TLS, pCtx uintptr, iPhrase int32) int32 { /* sqlite3.c:231571:12: */ var pCsr uintptr = pCtx return sqlite3Fts5ExprPhraseSize(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase) } -func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:231532:12: */ +func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn uintptr) int32 { /* sqlite3.c:231576:12: */ var rc int32 = SQLITE_OK var pCsr uintptr = pCtx if fts5IsContentless(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab) != 0 || @@ -187891,7 +188134,7 @@ func fts5ApiColumnText(tls *libc.TLS, pCtx uintptr, iCol int32, pz uintptr, pn u return rc } -func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:231555:12: */ +func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn uintptr) int32 { /* sqlite3.c:231599:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -187913,7 +188156,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // var z uintptr at bp, 4 - rc = fts5ApiColumnText(tls, pCsr, i, bp /* &z */, bp+4 /* &n */) + rc = fts5ApiColumnText(tls, pCsr, i, bp, bp+4) if rc == SQLITE_OK { rc = sqlite3Fts5ExprPopulatePoslists(tls, pConfig, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, aPopulator, i, *(*uintptr)(unsafe.Pointer(bp /* z */)), *(*int32)(unsafe.Pointer(bp + 4 /* n */))) @@ -187948,7 +188191,7 @@ func fts5CsrPoslist(tls *libc.TLS, pCsr uintptr, iPhrase int32, pa uintptr, pn u // Ensure that the Fts5Cursor.nInstCount and aInst[] variables are populated // correctly for the current view. Return SQLITE_OK if successful, or an // SQLite error code otherwise. -func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:231607:12: */ +func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:231651:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -187960,7 +188203,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:231607 nIter = sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInstIter == uintptr(0) { var nByte Sqlite3_int64 = Sqlite3_int64(uint32(unsafe.Sizeof(Fts5PoslistReader{})) * uint32(nIter)) - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInstIter = sqlite3Fts5MallocZero(tls, bp /* &rc */, nByte) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInstIter = sqlite3Fts5MallocZero(tls, bp, nByte) } aIter = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaInstIter @@ -187974,7 +188217,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:231607 // var n int32 at bp+8, 4 - *(*int32)(unsafe.Pointer(bp /* rc */)) = fts5CsrPoslist(tls, pCsr, i, bp+4 /* &a */, bp+8 /* &n */) + *(*int32)(unsafe.Pointer(bp /* rc */)) = fts5CsrPoslist(tls, pCsr, i, bp+4, bp+8) if *(*int32)(unsafe.Pointer(bp)) == SQLITE_OK { sqlite3Fts5PoslistReaderInit(tls, *(*uintptr)(unsafe.Pointer(bp + 4 /* a */)), *(*int32)(unsafe.Pointer(bp + 8 /* n */)), aIter+uintptr(i)*24) } @@ -188032,7 +188275,7 @@ func fts5CacheInstArray(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:231607 return *(*int32)(unsafe.Pointer(bp /* rc */)) } -func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:231681:12: */ +func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sqlite3.c:231725:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -188042,7 +188285,7 @@ func fts5ApiInstCount(tls *libc.TLS, pCtx uintptr, pnInst uintptr) int32 { /* sq return rc } -func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:231691:12: */ +func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:231735:12: */ var pCsr uintptr = pCtx var rc int32 = SQLITE_OK if (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fcsrflags&FTS5CSR_REQUIRE_INST == 0 || @@ -188058,11 +188301,11 @@ func fts5ApiInst(tls *libc.TLS, pCtx uintptr, iIdx int32, piPhrase uintptr, piCo return rc } -func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:231720:22: */ +func fts5ApiRowid(tls *libc.TLS, pCtx uintptr) Sqlite3_int64 { /* sqlite3.c:231764:22: */ return fts5CursorRowid(tls, pCtx) } -func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:231724:12: */ +func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uintptr, nUnused int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:231768:12: */ var pCnt uintptr = pContext _ = pUnused _ = nUnused @@ -188074,7 +188317,7 @@ func fts5ColumnSizeCb(tls *libc.TLS, pContext uintptr, tflags int32, pUnused uin return SQLITE_OK } -func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:231741:12: */ +func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:231785:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188104,7 +188347,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) var p uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize + uintptr(i)*4 *(*int32)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FaColumnSize + uintptr(i)*4)) = 0 - rc = fts5ApiColumnText(tls, pCtx, i, bp /* &z */, bp+4 /* &n */) + rc = fts5ApiColumnText(tls, pCtx, i, bp, bp+4) if rc == SQLITE_OK { rc = sqlite3Fts5Tokenize(tls, pConfig, FTS5_TOKENIZE_AUX, *(*uintptr)(unsafe.Pointer(bp /* z */)), *(*int32)(unsafe.Pointer(bp + 4 /* n */)), p, *(*uintptr)(unsafe.Pointer(&struct { @@ -188132,7 +188375,7 @@ func fts5ApiColumnSize(tls *libc.TLS, pCtx uintptr, iCol int32, pnToken uintptr) } // Implementation of the xSetAuxdata() method. -func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:231794:12: */ +func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintptr) int32 { /* sqlite3.c:231838:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188153,7 +188396,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt } } else { *(*int32)(unsafe.Pointer(bp /* rc */)) = SQLITE_OK - pData = sqlite3Fts5MallocZero(tls, bp /* &rc */, int64(unsafe.Sizeof(Fts5Auxdata{}))) + pData = sqlite3Fts5MallocZero(tls, bp, int64(unsafe.Sizeof(Fts5Auxdata{}))) if pData == uintptr(0) { if xDelete != 0 { (*struct{ f func(*libc.TLS, uintptr) })(unsafe.Pointer(&struct{ uintptr }{xDelete})).f(tls, pPtr) @@ -188170,7 +188413,7 @@ func fts5ApiSetAuxdata(tls *libc.TLS, pCtx uintptr, pPtr uintptr, xDelete uintpt return SQLITE_OK } -func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:231829:13: */ +func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* sqlite3.c:231873:13: */ var pCsr uintptr = pCtx var pData uintptr var pRet uintptr = uintptr(0) @@ -188192,7 +188435,7 @@ func fts5ApiGetAuxdata(tls *libc.TLS, pCtx uintptr, bClear int32) uintptr { /* s return pRet } -func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:231849:13: */ +func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uintptr, piOff uintptr) { /* sqlite3.c:231893:13: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188214,14 +188457,14 @@ func fts5ApiPhraseNext(tls *libc.TLS, pUnused uintptr, pIter uintptr, piCol uint } } -func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:231871:12: */ +func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr, piOff uintptr) int32 { /* sqlite3.c:231915:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pCsr uintptr = pCtx // var n int32 at bp, 4 - var rc int32 = fts5CsrPoslist(tls, pCsr, iPhrase, pIter, bp /* &n */) + var rc int32 = fts5CsrPoslist(tls, pCsr, iPhrase, pIter, bp) if rc == SQLITE_OK { (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fb = func() uintptr { @@ -188237,7 +188480,7 @@ func fts5ApiPhraseFirst(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintpt return rc } -func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:231890:13: */ +func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol uintptr) { /* sqlite3.c:231934:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188270,7 +188513,7 @@ func fts5ApiPhraseNextColumn(tls *libc.TLS, pCtx uintptr, pIter uintptr, piCol u } } -func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:231920:12: */ +func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter uintptr, piCol uintptr) int32 { /* sqlite3.c:231964:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188292,7 +188535,7 @@ func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter *(*int32)(unsafe.Pointer(bp /* n */)) = *(*int32)(unsafe.Pointer(pSorter + 20 + uintptr(iPhrase)*4)) - i1 (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fa = (*Fts5Sorter)(unsafe.Pointer(pSorter)).FaPoslist + uintptr(i1) } else { - rc = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase, pIter, bp /* &n */) + rc = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, iPhrase, pIter, bp) } if rc == SQLITE_OK { @@ -188308,7 +188551,7 @@ func fts5ApiPhraseFirstColumn(tls *libc.TLS, pCtx uintptr, iPhrase int32, pIter } else { // var n int32 at bp+4, 4 - rc = fts5CsrPoslist(tls, pCsr, iPhrase, pIter, bp+4 /* &n */) + rc = fts5CsrPoslist(tls, pCsr, iPhrase, pIter, bp+4) if rc == SQLITE_OK { (*Fts5PhraseIter)(unsafe.Pointer(pIter)).Fb = func() uintptr { @@ -188351,10 +188594,10 @@ var sFts5Api = Fts5ExtensionApi{ FxPhraseNext: 0, FxPhraseFirstColumn: 0, FxPhraseNextColumn: 0, -} /* sqlite3.c:231970:31 */ +} /* sqlite3.c:232014:31 */ // Implementation of API function xQueryPhrase(). -func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:231996:12: */ +func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData uintptr, xCallback uintptr) int32 { /* sqlite3.c:232040:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -188363,7 +188606,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui var rc int32 *(*uintptr)(unsafe.Pointer(bp /* pNew */)) = uintptr(0) - rc = fts5OpenMethod(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab, bp /* &pNew */) + rc = fts5OpenMethod(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab, bp) if rc == SQLITE_OK { (*Fts5Cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).FePlan = FTS5_PLAN_MATCH (*Fts5Cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* pNew */)))).FiFirstRowid = int64(-1) - (int64(0xffffffff) | I64(int64(0x7fffffff))<<32) @@ -188390,7 +188633,7 @@ func fts5ApiQueryPhrase(tls *libc.TLS, pCtx uintptr, iPhrase int32, pUserData ui return rc } -func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:232033:13: */ +func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:232077:13: */ (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = pAux (*struct { @@ -188399,7 +188642,7 @@ func fts5ApiInvoke(tls *libc.TLS, pAux uintptr, pCsr uintptr, context uintptr, a (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpAux = uintptr(0) } -func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:232046:19: */ +func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:232090:19: */ var pCsr uintptr for pCsr = (*Fts5Global)(unsafe.Pointer(pGlobal)).FpCsr; pCsr != 0; pCsr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpNext { if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiCsrId == iCsrId { @@ -188409,7 +188652,7 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / return pCsr } -func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:232054:13: */ +func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:232098:13: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188422,7 +188665,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { pCsr = fts5CursorFromCsrid(tls, (*Fts5Auxiliary)(unsafe.Pointer(pAux)).FpGlobal, iCsrId) if pCsr == uintptr(0) || (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan == 0 { - var zErr uintptr = Xsqlite3_mprintf(tls, ts+35336 /* "no such cursor: ..." */, libc.VaList(bp, iCsrId)) + var zErr uintptr = Xsqlite3_mprintf(tls, ts+35505, libc.VaList(bp, iCsrId)) Xsqlite3_result_error(tls, context, zErr, -1) Xsqlite3_free(tls, zErr) } else { @@ -188432,7 +188675,7 @@ func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Given cursor id iId, return a pointer to the corresponding Fts5Table // object. Or NULL If the cursor id does not exist. -func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:232083:18: */ +func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { /* sqlite3.c:232127:18: */ var pCsr uintptr pCsr = fts5CursorFromCsrid(tls, pGlobal, iCsrId) if pCsr != 0 { @@ -188454,7 +188697,7 @@ func sqlite3Fts5TableFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintp // for phrase 0. The second (same disclaimer) contains the size of position // list 1. And so on. There is no size field for the final position list, // as it can be derived from the total size of the blob. -func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:232110:12: */ +func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlite3.c:232154:12: */ bp := tls.Alloc(40) defer tls.Free(40) @@ -188463,7 +188706,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit var nPhrase int32 = sqlite3Fts5ExprPhraseCount(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr) // var val Fts5Buffer at bp, 12 - libc.Xmemset(tls, bp /* &val */, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) switch (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpConfig)).FeDetail { case FTS5_DETAIL_FULL: @@ -188471,8 +188714,8 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit for i = 0; i < nPhrase-1; i++ { // var dummy uintptr at bp+12, 4 - var nByte int32 = sqlite3Fts5ExprPoslist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+12 /* &dummy */) - sqlite3Fts5BufferAppendVarint(tls, bp+16 /* &rc */, bp /* &val */, int64(nByte)) + var nByte int32 = sqlite3Fts5ExprPoslist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+12) + sqlite3Fts5BufferAppendVarint(tls, bp+16, bp, int64(nByte)) } // Append the position lists @@ -188480,8 +188723,8 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // var pPoslist uintptr at bp+20, 4 var nPoslist int32 - nPoslist = sqlite3Fts5ExprPoslist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+20 /* &pPoslist */) - sqlite3Fts5BufferAppendBlob(tls, bp+16 /* &rc */, bp /* &val */, uint32(nPoslist), *(*uintptr)(unsafe.Pointer(bp + 20 /* pPoslist */))) + nPoslist = sqlite3Fts5ExprPoslist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+20) + sqlite3Fts5BufferAppendBlob(tls, bp+16, bp, uint32(nPoslist), *(*uintptr)(unsafe.Pointer(bp + 20 /* pPoslist */))) } break @@ -188493,8 +188736,8 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // var nByte int32 at bp+28, 4 - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+24 /* &dummy */, bp+28 /* &nByte */) - sqlite3Fts5BufferAppendVarint(tls, bp+16 /* &rc */, bp /* &val */, int64(*(*int32)(unsafe.Pointer(bp + 28 /* nByte */)))) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+24, bp+28) + sqlite3Fts5BufferAppendVarint(tls, bp+16, bp, int64(*(*int32)(unsafe.Pointer(bp + 28 /* nByte */)))) } // Append the position lists @@ -188503,8 +188746,8 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // var nPoslist int32 at bp+36, 4 - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+32 /* &pPoslist */, bp+36 /* &nPoslist */) - sqlite3Fts5BufferAppendBlob(tls, bp+16 /* &rc */, bp /* &val */, uint32(*(*int32)(unsafe.Pointer(bp + 36 /* nPoslist */))), *(*uintptr)(unsafe.Pointer(bp + 32 /* pPoslist */))) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5ExprPhraseCollist(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, i, bp+32, bp+36) + sqlite3Fts5BufferAppendBlob(tls, bp+16, bp, uint32(*(*int32)(unsafe.Pointer(bp + 36 /* nPoslist */))), *(*uintptr)(unsafe.Pointer(bp + 32 /* pPoslist */))) } break @@ -188518,7 +188761,7 @@ func fts5PoslistBlob(tls *libc.TLS, pCtx uintptr, pCsr uintptr) int32 { /* sqlit // This is the xColumn method, called by SQLite to request a value from // the row that the supplied cursor currently points to. -func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:232167:12: */ +func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:232211:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pCsr uintptr = pCursor @@ -188558,7 +188801,7 @@ func fts5ColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) // This routine implements the xFindFunction method for the FTS3 // virtual table. -func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:232220:12: */ +func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* sqlite3.c:232264:12: */ var pTab uintptr = pVtab var pAux uintptr @@ -188577,12 +188820,12 @@ func fts5FindFunctionMethod(tls *libc.TLS, pVtab uintptr, nUnused int32, zName u } // Implementation of FTS5 xRename method. Rename an fts5 table. -func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:232245:12: */ +func fts5RenameMethod(tls *libc.TLS, pVtab uintptr, zName uintptr) int32 { /* sqlite3.c:232289:12: */ var pTab uintptr = pVtab return sqlite3Fts5StorageRename(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, zName) } -func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232253:12: */ +func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:232297:12: */ fts5TripCursors(tls, pTab) return sqlite3Fts5StorageSync(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage) } @@ -188590,7 +188833,7 @@ func sqlite3Fts5FlushToDisk(tls *libc.TLS, pTab uintptr) int32 { /* sqlite3.c:23 // The xSavepoint() method. // // Flush the contents of the pending-terms table to disk. -func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:232263:12: */ +func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:232307:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -188599,7 +188842,7 @@ func fts5SavepointMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { // The xRelease() method. // // This is a no-op. -func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:232274:12: */ +func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:232318:12: */ _ = iSavepoint // Call below is a no-op for NDEBUG builds return sqlite3Fts5FlushToDisk(tls, pVtab) @@ -188608,7 +188851,7 @@ func fts5ReleaseMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { / // The xRollbackTo() method. // // Discard the contents of the pending terms table. -func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:232285:12: */ +func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* sqlite3.c:232329:12: */ var pTab uintptr = pVtab _ = iSavepoint // Call below is a no-op for NDEBUG builds @@ -188617,7 +188860,7 @@ func fts5RollbackToMethod(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 } // Register a new auxiliary function with global context pGlobal. -func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:232296:12: */ +func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, xFunc Fts5_extension_function, xDestroy uintptr) int32 { /* sqlite3.c:232340:12: */ var pGlobal uintptr = pApi var rc int32 = Xsqlite3_overload_function(tls, (*Fts5Global)(unsafe.Pointer(pGlobal)).Fdb, zName, -1) if rc == SQLITE_OK { @@ -188648,7 +188891,7 @@ func fts5CreateAux(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr // Register a new tokenizer. This is the implementation of the // fts5_api.xCreateTokenizer() method. -func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:232335:12: */ +func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData uintptr, pTokenizer uintptr, xDestroy uintptr) int32 { /* sqlite3.c:232379:12: */ var pGlobal uintptr = pApi var pNew uintptr var nName Sqlite3_int64 // Size of zName and its \0 terminator @@ -188677,7 +188920,7 @@ func fts5CreateTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, pUserData u return rc } -func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:232370:28: */ +func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr { /* sqlite3.c:232414:28: */ var pMod uintptr = uintptr(0) if zName == uintptr(0) { @@ -188695,7 +188938,7 @@ func fts5LocateTokenizer(tls *libc.TLS, pGlobal uintptr, zName uintptr) uintptr // Find a tokenizer. This is the implementation of the // fts5_api.xFindTokenizer() method. -func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:232391:12: */ +func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData uintptr, pTokenizer uintptr) int32 { /* sqlite3.c:232435:12: */ var rc int32 = SQLITE_OK var pMod uintptr @@ -188711,7 +188954,7 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui return rc } -func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:232412:12: */ +func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:232456:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -188727,7 +188970,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg if pMod == uintptr(0) { rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35357 /* "no such tokenize..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35526, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(azArg)))) } else { rc = (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 @@ -188746,7 +188989,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg (*Fts5Config)(unsafe.Pointer(pConfig)).FpTokApi = pMod + 8 if rc != SQLITE_OK { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35379 /* "error in tokeniz..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+35548, 0) } } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FePattern = sqlite3Fts5TokenizerPattern(tls, @@ -188762,7 +189005,7 @@ func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg return rc } -func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:232449:13: */ +func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:232493:13: */ var pTok uintptr var pNextTok uintptr var pAux uintptr @@ -188788,28 +189031,28 @@ func fts5ModuleDestroy(tls *libc.TLS, pCtx uintptr) { /* sqlite3.c:232449:13: */ Xsqlite3_free(tls, pGlobal) } -func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:232469:13: */ +func fts5Fts5Func(tls *libc.TLS, pCtx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:232513:13: */ var pGlobal uintptr = Xsqlite3_user_data(tls, pCtx) var ppApi uintptr _ = nArg - ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35410 /* "fts5_api_ptr" */) + ppApi = Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(apArg)), ts+35579) if ppApi != 0 { *(*uintptr)(unsafe.Pointer(ppApi)) = pGlobal } } // Implementation of fts5_source_id() function. -func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:232485:13: */ +func fts5SourceIdFunc(tls *libc.TLS, pCtx uintptr, nArg int32, apUnused uintptr) { /* sqlite3.c:232529:13: */ _ = nArg _ = apUnused - Xsqlite3_result_text(tls, pCtx, ts+35423 /* "fts5: 2021-11-27..." */, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, pCtx, ts+35592, -1, libc.UintptrFromInt32(-1)) } // Return true if zName is the extension on one of the shadow tables used // by this module. -func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:232499:12: */ +func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:232543:12: */ var i uint32 for i = uint32(0); i < uint32(unsafe.Sizeof(azName2))/uint32(unsafe.Sizeof(uintptr(0))); i++ { if Xsqlite3_stricmp(tls, zName, azName2[i]) == 0 { @@ -188820,10 +189063,10 @@ func fts5ShadowName(tls *libc.TLS, zName uintptr) int32 { /* sqlite3.c:232499:12 } var azName2 = [5]uintptr{ - ts + 35514 /* "config" */, ts + 33613 /* "content" */, ts + 24613 /* "data" */, ts + 33964 /* "docsize" */, ts + 11326, /* "idx" */ -} /* sqlite3.c:232500:21 */ + ts + 35683, ts + 33782, ts + 24782, ts + 34133, ts + 11348, +} /* sqlite3.c:232544:21 */ -func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:232510:12: */ +func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:232554:12: */ var rc int32 var pGlobal uintptr = uintptr(0) @@ -188844,7 +189087,7 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:232510:12: */ (*Fts5Global)(unsafe.Pointer(pGlobal)).Fapi.FxFindTokenizer = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32 }{fts5FindTokenizer})) - rc = Xsqlite3_create_module_v2(tls, db, ts+35521 /* "fts5" */, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) + rc = Xsqlite3_create_module_v2(tls, db, ts+35690, uintptr(unsafe.Pointer(&fts5Mod)), p, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5ModuleDestroy}))) if rc == SQLITE_OK { rc = sqlite3Fts5IndexInit(tls, db) } @@ -188862,13 +189105,13 @@ func fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:232510:12: */ } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35521 /* "fts5" */, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35690, 1, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5Fts5Func})), uintptr(0), uintptr(0)) } if rc == SQLITE_OK { rc = Xsqlite3_create_function(tls, - db, ts+35526 /* "fts5_source_id" */, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { + db, ts+35695, 0, SQLITE_UTF8, p, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr) }{fts5SourceIdFunc})), uintptr(0), uintptr(0)) } @@ -188906,7 +189149,7 @@ var fts5Mod = Sqlite3_module{ /* xRelease */ FxRelease: 0, /* xRollbackTo */ FxRollbackTo: 0, /* xShadowName */ FxShadowName: 0, -} /* sqlite3.c:232511:31 */ +} /* sqlite3.c:232555:31 */ // The following functions are used to register the module with SQLite. If // this module is being built as part of the SQLite core (SQLITE_CORE is @@ -188915,7 +189158,7 @@ var fts5Mod = Sqlite3_module{ // Or, if this module is being built as a loadable extension, // sqlite3Fts5Init() is omitted and the two standard entry points // sqlite3_fts_init() and sqlite3_fts5_init() defined instead. -func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:232619:20: */ +func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:232663:20: */ return fts5Init(tls, db) } @@ -188923,7 +189166,7 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:232619:20: // Fts5Storage.pInsertDocsize - if they have not already been prepared. // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:232677:12: */ +func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:232721:12: */ bp := tls.Alloc(172) defer tls.Free(172) @@ -188934,27 +189177,27 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p if *(*uintptr)(unsafe.Pointer(p + 24 + uintptr(eStmt)*4)) == uintptr(0) { *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ - ts + 35541, /* "SELECT %s FROM %..." */ - ts + 35609, /* "SELECT %s FROM %..." */ - ts + 35678, /* "SELECT %s FROM %..." */ // LOOKUP + ts + 35710, + ts + 35778, + ts + 35847, - ts + 35711, /* "INSERT INTO %Q.'..." */ // INSERT_CONTENT - ts + 35750, /* "REPLACE INTO %Q...." */ // REPLACE_CONTENT - ts + 35790, /* "DELETE FROM %Q.'..." */ // DELETE_CONTENT - ts + 35829, /* "REPLACE INTO %Q...." */ // REPLACE_DOCSIZE - ts + 35870, /* "DELETE FROM %Q.'..." */ // DELETE_DOCSIZE + ts + 35880, + ts + 35919, + ts + 35959, + ts + 35998, + ts + 36039, - ts + 35909, /* "SELECT sz FROM %..." */ // LOOKUP_DOCSIZE + ts + 36078, - ts + 35951, /* "REPLACE INTO %Q...." */ // REPLACE_CONFIG - ts + 35991, /* "SELECT %s FROM %..." */ // SCAN + ts + 36120, + ts + 36160, } var pC uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr = uintptr(0) switch eStmt { case FTS5_STMT_SCAN: - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*4)), + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*4)), libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent)) break fallthrough @@ -188962,14 +189205,14 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p case FTS5_STMT_SCAN_ASC: fallthrough case FTS5_STMT_SCAN_DESC: - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*4)), libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*4)), libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid)) break fallthrough case FTS5_STMT_LOOKUP: - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*4)), + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*4)), libc.VaList(bp+56, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid)) break fallthrough @@ -188989,7 +189232,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p *(*int8)(unsafe.Pointer(zBind + uintptr(i*2+1))) = int8(',') } *(*int8)(unsafe.Pointer(zBind + uintptr(i*2-1))) = int8(0) - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*4)), libc.VaList(bp+80, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName, zBind)) + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*4)), libc.VaList(bp+80, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName, zBind)) Xsqlite3_free(tls, zBind) } break @@ -188998,7 +189241,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p fallthrough default: - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*4)), libc.VaList(bp+104, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName)) + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 + uintptr(eStmt)*4)), libc.VaList(bp+104, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName)) break } @@ -189014,7 +189257,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbLock-- Xsqlite3_free(tls, zSql) if rc != SQLITE_OK && pzErrMsg != 0 { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3601 /* "%s" */, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3623, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -189024,7 +189267,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p return rc } -func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:232780:12: */ +func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, va uintptr) int32 { /* sqlite3.c:232824:12: */ var rc int32 var ap Va_list _ = ap // ... printf arguments @@ -189046,79 +189289,79 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. -func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:232808:12: */ +func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:232852:12: */ bp := tls.Alloc(80) defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36014, /* "DROP TABLE IF EX..." */ + ts+36183, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36118, /* "DROP TABLE IF EX..." */ + ts+36287, libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36156, /* "DROP TABLE IF EX..." */ + ts+36325, libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } -func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:232832:13: */ +func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:232876:13: */ bp := tls.Alloc(40) defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36194, /* "ALTER TABLE %Q.'..." */ + ts+36363, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zTail, zName, zTail)) } } -func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:232846:12: */ +func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) int32 { /* sqlite3.c:232890:12: */ bp := tls.Alloc(4) defer tls.Free(4) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(pStorage)).FpConfig *(*int32)(unsafe.Pointer(bp /* rc */)) = sqlite3Fts5StorageSync(tls, pStorage) - fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+24613 /* "data" */, zName) - fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+11326 /* "idx" */, zName) - fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+35514 /* "config" */, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+24782, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+11348, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+35683, zName) if (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+33964 /* "docsize" */, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+34133, zName) } if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { - fts5StorageRenameOne(tls, pConfig, bp /* &rc */, ts+33613 /* "content" */, zName) + fts5StorageRenameOne(tls, pConfig, bp, ts+33782, zName) } return *(*int32)(unsafe.Pointer(bp /* rc */)) } // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. -func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:232866:12: */ +func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:232910:12: */ bp := tls.Alloc(68) defer tls.Free(68) var rc int32 *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64 /* &zErr */, ts+36236, /* "CREATE TABLE %Q...." */ + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64, ts+36405, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { - return ts + 29266 /* " WITHOUT ROWID" */ + return ts + 29435 /* " WITHOUT ROWID" */ } - return ts + 1543 /* "" */ + return ts + 1565 /* "" */ }())) if *(*uintptr)(unsafe.Pointer(bp + 64)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, - ts+36266, /* "fts5: error crea..." */ + ts+36435, libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } @@ -189131,7 +189374,7 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. -func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:232901:12: */ +func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:232945:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -189160,27 +189403,27 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } else { var i int32 var iOff int32 - Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36310 /* "id INTEGER PRIMA..." */, 0) + Xsqlite3_snprintf(tls, nDefn, zDefn, ts+36479, 0) iOff = int32(libc.Xstrlen(tls, zDefn)) for i = 0; i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; i++ { - Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36333 /* ", c%d" */, libc.VaList(bp, i)) + Xsqlite3_snprintf(tls, nDefn-iOff, zDefn+uintptr(iOff), ts+36502, libc.VaList(bp, i)) iOff = iOff + int32(libc.Xstrlen(tls, zDefn+uintptr(iOff))) } - rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33613 /* "content" */, zDefn, 0, pzErr) + rc = sqlite3Fts5CreateTable(tls, pConfig, ts+33782, zDefn, 0, pzErr) } Xsqlite3_free(tls, zDefn) } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+33964 /* "docsize" */, ts+36339 /* "id INTEGER PRIMA..." */, 0, pzErr) + pConfig, ts+34133, ts+36508, 0, pzErr) } if rc == SQLITE_OK { rc = sqlite3Fts5CreateTable(tls, - pConfig, ts+35514 /* "config" */, ts+36371 /* "k PRIMARY KEY, v" */, 1, pzErr) + pConfig, ts+35683, ts+36540, 1, pzErr) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34110 /* "version" */, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34279, uintptr(0), FTS5_CURRENT_VERSION) } } @@ -189192,7 +189435,7 @@ func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCre } // Close a handle opened by an earlier call to sqlite3Fts5StorageOpen(). -func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:232967:12: */ +func sqlite3Fts5StorageClose(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233011:12: */ var rc int32 = SQLITE_OK if p != 0 { var i int32 @@ -189211,12 +189454,12 @@ type Fts5InsertCtx1 = struct { FpStorage uintptr FiCol int32 FszCol int32 -} /* sqlite3.c:232982:9 */ +} /* sqlite3.c:233026:9 */ -type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:232982:30 */ +type Fts5InsertCtx = Fts5InsertCtx1 /* sqlite3.c:233026:30 */ // Tokenization callback used when inserting tokens into the FTS index. -func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:232992:12: */ +func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233036:12: */ var pCtx uintptr = pContext var pIdx uintptr = (*Fts5Storage)(unsafe.Pointer((*Fts5InsertCtx)(unsafe.Pointer(pCtx)).FpStorage)).FpIndex _ = iUnused1 @@ -189233,7 +189476,7 @@ func fts5StorageInsertCallback(tls *libc.TLS, pContext uintptr, tflags int32, pT // If a row with rowid iDel is present in the %_content table, add the // delete-markers to the FTS index necessary to delete it. Do not actually // remove the %_content row at this time though. -func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:233015:12: */ +func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:233059:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189245,7 +189488,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // var ctx Fts5InsertCtx at bp+4, 12 if apVal == uintptr(0) { - rc = fts5StorageGetStmt(tls, p, FTS5_STMT_LOOKUP, bp /* &pSeek */, uintptr(0)) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_LOOKUP, bp, uintptr(0)) if rc != SQLITE_OK { return rc } @@ -189274,7 +189517,7 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt } (*Fts5InsertCtx)(unsafe.Pointer(bp + 4 /* &ctx */)).FszCol = 0 rc = sqlite3Fts5Tokenize(tls, pConfig, FTS5_TOKENIZE_DOCUMENT, - zText, nText, bp+4 /* &ctx */, *(*uintptr)(unsafe.Pointer(&struct { + zText, nText, bp+4, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5StorageInsertCallback}))) *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(iCol-1)*8)) -= I64((*Fts5InsertCtx)(unsafe.Pointer(bp + 4)).FszCol) @@ -189302,14 +189545,14 @@ func fts5StorageDeleteFromIndex(tls *libc.TLS, p uintptr, iDel I64, apVal uintpt // // If there is no %_docsize table (as happens if the columnsize=0 option // is specified when the FTS5 table is created), this function is a no-op. -func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:233084:12: */ +func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr) int32 { /* sqlite3.c:233128:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 = SQLITE_OK if (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbColumnsize != 0 { *(*uintptr)(unsafe.Pointer(bp /* pReplace */)) = uintptr(0) - rc = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_DOCSIZE, bp /* &pReplace */, uintptr(0)) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_DOCSIZE, bp, uintptr(0)) if rc == SQLITE_OK { Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 1, iRowid) Xsqlite3_bind_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 2, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fp, (*Fts5Buffer)(unsafe.Pointer(pBuf)).Fn, uintptr(0)) @@ -189329,7 +189572,7 @@ func fts5StorageInsertDocsize(tls *libc.TLS, p uintptr, iRowid I64, pBuf uintptr // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:233114:12: */ +func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sqlite3.c:233158:12: */ var rc int32 = SQLITE_OK if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid == 0 { rc = sqlite3Fts5IndexGetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, p+12, (*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize) @@ -189343,7 +189586,7 @@ func fts5StorageLoadTotals(tls *libc.TLS, p uintptr, bCache int32) int32 { /* sq // // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. -func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233130:12: */ +func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233174:12: */ bp := tls.Alloc(16) defer tls.Free(16) @@ -189352,11 +189595,11 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233130 // var buf Fts5Buffer at bp, 12 *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = SQLITE_OK - libc.Xmemset(tls, bp /* &buf */, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) - sqlite3Fts5BufferAppendVarint(tls, bp+12 /* &rc */, bp /* &buf */, (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow) + sqlite3Fts5BufferAppendVarint(tls, bp+12, bp, (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow) for i = 0; i < nCol; i++ { - sqlite3Fts5BufferAppendVarint(tls, bp+12 /* &rc */, bp /* &buf */, *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(i)*8))) + sqlite3Fts5BufferAppendVarint(tls, bp+12, bp, *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr(i)*8))) } if *(*int32)(unsafe.Pointer(bp + 12)) == SQLITE_OK { *(*int32)(unsafe.Pointer(bp + 12 /* rc */)) = sqlite3Fts5IndexSetAverages(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fn) @@ -189367,7 +189610,7 @@ func fts5StorageSaveTotals(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233130 } // Remove a row from the FTS table. -func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:233152:12: */ +func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) int32 { /* sqlite3.c:233196:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189384,7 +189627,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) // Delete the %_docsize record if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { - rc = fts5StorageGetStmt(tls, p, FTS5_STMT_DELETE_DOCSIZE, bp /* &pDel */, uintptr(0)) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_DELETE_DOCSIZE, bp, uintptr(0)) if rc == SQLITE_OK { Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */)), 1, iDel) Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */))) @@ -189395,7 +189638,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) // Delete the %_content record if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { if rc == SQLITE_OK { - rc = fts5StorageGetStmt(tls, p, FTS5_STMT_DELETE_CONTENT, bp /* &pDel */, uintptr(0)) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_DELETE_CONTENT, bp, uintptr(0)) } if rc == SQLITE_OK { Xsqlite3_bind_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pDel */)), 1, iDel) @@ -189408,7 +189651,7 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) } // Delete all entries in the FTS5 index. -func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233193:12: */ +func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233237:12: */ bp := tls.Alloc(48) defer tls.Free(48) @@ -189420,12 +189663,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: // Delete the contents of the %_data and %_docsize tables. rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36388, /* "DELETE FROM %Q.'..." */ + ts+36557, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), - ts+36438, /* "DELETE FROM %Q.'..." */ + ts+36607, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } @@ -189435,12 +189678,12 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: rc = sqlite3Fts5IndexReinit(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } if rc == SQLITE_OK { - rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34110 /* "version" */, uintptr(0), FTS5_CURRENT_VERSION) + rc = sqlite3Fts5StorageConfigValue(tls, p, ts+34279, uintptr(0), FTS5_CURRENT_VERSION) } return rc } -func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233224:12: */ +func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233268:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -189453,7 +189696,7 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 var rc2 int32 - libc.Xmemset(tls, bp /* &ctx */, 0, uint32(unsafe.Sizeof(Fts5InsertCtx{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5InsertCtx{}))) (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FpStorage = p *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) = sqlite3Fts5StorageDeleteAll(tls, p) if *(*int32)(unsafe.Pointer(bp + 28)) == SQLITE_OK { @@ -189461,13 +189704,13 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 } if *(*int32)(unsafe.Pointer(bp + 28)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) = fts5StorageGetStmt(tls, p, FTS5_STMT_SCAN, bp+12 /* &pScan */, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) = fts5StorageGetStmt(tls, p, FTS5_STMT_SCAN, bp+12, uintptr(0)) } for *(*int32)(unsafe.Pointer(bp + 28)) == SQLITE_OK && SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 12))) { var iRowid I64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 12 /* pScan */)), 0) - sqlite3Fts5BufferZero(tls, bp+16 /* &buf */) + sqlite3Fts5BufferZero(tls, bp+16) *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) = sqlite3Fts5IndexBeginWrite(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, 0, iRowid) for (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FiCol = 0; *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) == SQLITE_OK && (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FiCol < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol; (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FiCol++ { (*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FszCol = 0 @@ -189477,18 +189720,18 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) = sqlite3Fts5Tokenize(tls, pConfig, FTS5_TOKENIZE_DOCUMENT, zText, nText, - bp, /* &ctx */ + bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5StorageInsertCallback}))) } - sqlite3Fts5BufferAppendVarint(tls, bp+28 /* &rc */, bp+16 /* &buf */, int64((*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FszCol)) + sqlite3Fts5BufferAppendVarint(tls, bp+28, bp+16, int64((*Fts5InsertCtx)(unsafe.Pointer(bp /* &ctx */)).FszCol)) *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr((*Fts5InsertCtx)(unsafe.Pointer(bp)).FiCol)*8)) += I64((*Fts5InsertCtx)(unsafe.Pointer(bp)).FszCol) } (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow++ if *(*int32)(unsafe.Pointer(bp + 28)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) = fts5StorageInsertDocsize(tls, p, iRowid, bp+16 /* &buf */) + *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) = fts5StorageInsertDocsize(tls, p, iRowid, bp+16) } } Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(bp+16 /* &buf */)).Fp) @@ -189504,15 +189747,15 @@ func sqlite3Fts5StorageRebuild(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23 return *(*int32)(unsafe.Pointer(bp + 28 /* rc */)) } -func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233279:12: */ +func sqlite3Fts5StorageOptimize(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233323:12: */ return sqlite3Fts5IndexOptimize(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:233283:12: */ +func sqlite3Fts5StorageMerge(tls *libc.TLS, p uintptr, nMerge int32) int32 { /* sqlite3.c:233327:12: */ return sqlite3Fts5IndexMerge(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex, nMerge) } -func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233287:12: */ +func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233331:12: */ return sqlite3Fts5IndexReset(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } @@ -189523,14 +189766,14 @@ func sqlite3Fts5StorageReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:2332 // // If the %_docsize table does not exist, SQLITE_MISMATCH is returned. In // this case the user is required to provide a rowid explicitly. -func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:233300:12: */ +func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* sqlite3.c:233344:12: */ bp := tls.Alloc(4) defer tls.Free(4) var rc int32 = SQLITE_MISMATCH if (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbColumnsize != 0 { *(*uintptr)(unsafe.Pointer(bp /* pReplace */)) = uintptr(0) - rc = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_DOCSIZE, bp /* &pReplace */, uintptr(0)) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_DOCSIZE, bp, uintptr(0)) if rc == SQLITE_OK { Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 1) Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 2) @@ -189545,7 +189788,7 @@ func fts5StorageNewRowid(tls *libc.TLS, p uintptr, piRowid uintptr) int32 { /* s } // Insert a new row into the FTS content table. -func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:233321:12: */ +func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, piRowid uintptr) int32 { /* sqlite3.c:233365:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189562,7 +189805,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } else { *(*uintptr)(unsafe.Pointer(bp /* pInsert */)) = uintptr(0) // Statement to write %_content table var i int32 // Counter variable - rc = fts5StorageGetStmt(tls, p, FTS5_STMT_INSERT_CONTENT, bp /* &pInsert */, uintptr(0)) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_INSERT_CONTENT, bp, uintptr(0)) for i = 1; rc == SQLITE_OK && i <= (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol+1; i++ { rc = Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp /* pInsert */)), i, *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*4))) } @@ -189577,7 +189820,7 @@ func sqlite3Fts5StorageContentInsert(tls *libc.TLS, p uintptr, apVal uintptr, pi } // Insert new entries into the FTS index and %_docsize table. -func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:233356:12: */ +func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRowid I64) int32 { /* sqlite3.c:233400:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -189588,7 +189831,7 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow // var buf Fts5Buffer at bp, 12 // Buffer used to build up %_docsize blob - libc.Xmemset(tls, bp /* &buf */, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5Buffer{}))) (*Fts5InsertCtx)(unsafe.Pointer(bp + 12 /* &ctx */)).FpStorage = p *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = fts5StorageLoadTotals(tls, p, 1) @@ -189603,26 +189846,26 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5Tokenize(tls, pConfig, FTS5_TOKENIZE_DOCUMENT, zText, nText, - bp+12, /* &ctx */ + bp+12, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5StorageInsertCallback}))) } - sqlite3Fts5BufferAppendVarint(tls, bp+24 /* &rc */, bp /* &buf */, int64((*Fts5InsertCtx)(unsafe.Pointer(bp+12 /* &ctx */)).FszCol)) + sqlite3Fts5BufferAppendVarint(tls, bp+24, bp, int64((*Fts5InsertCtx)(unsafe.Pointer(bp+12 /* &ctx */)).FszCol)) *(*I64)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FaTotalSize + uintptr((*Fts5InsertCtx)(unsafe.Pointer(bp+12)).FiCol)*8)) += I64((*Fts5InsertCtx)(unsafe.Pointer(bp + 12)).FszCol) } (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow++ // Write the %_docsize record if *(*int32)(unsafe.Pointer(bp + 24)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = fts5StorageInsertDocsize(tls, p, iRowid, bp /* &buf */) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = fts5StorageInsertDocsize(tls, p, iRowid, bp) } Xsqlite3_free(tls, (*Fts5Buffer)(unsafe.Pointer(bp /* &buf */)).Fp) return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } -func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:233399:12: */ +func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:233443:12: */ bp := tls.Alloc(28) defer tls.Free(28) @@ -189630,13 +189873,13 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) var zSql uintptr var rc int32 - zSql = Xsqlite3_mprintf(tls, ts+36467, /* "SELECT count(*) ..." */ + zSql = Xsqlite3_mprintf(tls, ts+36636, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zSuffix)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */)) = uintptr(0) - rc = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+24 /* &pCnt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+24, uintptr(0)) if rc == SQLITE_OK { if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24))) { *(*I64)(unsafe.Pointer(pnRow)) = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */)), 0) @@ -189657,13 +189900,13 @@ type Fts5IntegrityCtx1 = struct { Fcksum U64 FpTermset uintptr FpConfig uintptr -} /* sqlite3.c:233427:9 */ +} /* sqlite3.c:233471:9 */ // Context object used by sqlite3Fts5StorageIntegrity(). -type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:233427:33 */ +type Fts5IntegrityCtx = Fts5IntegrityCtx1 /* sqlite3.c:233471:33 */ // Tokenization callback used by integrity check. -func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233441:12: */ +func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, pToken uintptr, nToken int32, iUnused1 int32, iUnused2 int32) int32 { /* sqlite3.c:233485:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189704,7 +189947,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, break } - rc = sqlite3Fts5TermsetAdd(tls, pTermset, 0, pToken, nToken, bp /* &bPresent */) + rc = sqlite3Fts5TermsetAdd(tls, pTermset, 0, pToken, nToken, bp) if rc == SQLITE_OK && *(*int32)(unsafe.Pointer(bp)) == 0 { *(*U64)(unsafe.Pointer(pCtx + 16)) ^= sqlite3Fts5IndexEntryCksum(tls, (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FiRowid, iCol, iPos, 0, pToken, nToken) @@ -189714,7 +189957,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, var nChar int32 = *(*int32)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer((*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FpConfig)).FaPrefix + uintptr(ii)*4)) var nByte int32 = sqlite3Fts5IndexCharlenToBytelen(tls, pToken, nToken, nChar) if nByte != 0 { - rc = sqlite3Fts5TermsetAdd(tls, pTermset, ii+1, pToken, nByte, bp /* &bPresent */) + rc = sqlite3Fts5TermsetAdd(tls, pTermset, ii+1, pToken, nByte, bp) if *(*int32)(unsafe.Pointer(bp)) == 0 { *(*U64)(unsafe.Pointer(pCtx + 16)) ^= sqlite3Fts5IndexEntryCksum(tls, (*Fts5IntegrityCtx)(unsafe.Pointer(pCtx)).FiRowid, iCol, iPos, ii+1, pToken, nByte) @@ -189729,7 +189972,7 @@ func fts5StorageIntegrityCallback(tls *libc.TLS, pContext uintptr, tflags int32, // table. Return SQLITE_OK if they do, or SQLITE_CORRUPT if not. Return // some other SQLite error code if an error occurs while attempting to // determine this. -func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:233511:12: */ +func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { /* sqlite3.c:233555:12: */ bp := tls.Alloc(52) defer tls.Free(52) @@ -189743,7 +189986,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / var bUseCksum int32 - libc.Xmemset(tls, bp /* &ctx */, 0, uint32(unsafe.Sizeof(Fts5IntegrityCtx{}))) + libc.Xmemset(tls, bp, 0, uint32(unsafe.Sizeof(Fts5IntegrityCtx{}))) (*Fts5IntegrityCtx)(unsafe.Pointer(bp /* &ctx */)).FpConfig = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig aTotalSize = Xsqlite3_malloc64(tls, uint64(uint32((*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)*(uint32(unsafe.Sizeof(int32(0)))+uint32(unsafe.Sizeof(I64(0)))))) if !(aTotalSize != 0) { @@ -189757,7 +190000,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / if bUseCksum != 0 { // Generate the expected index checksum based on the contents of the // %_content table. This block stores the checksum in ctx.cksum. - rc = fts5StorageGetStmt(tls, p, FTS5_STMT_SCAN, bp+32 /* &pScan */, uintptr(0)) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_SCAN, bp+32, uintptr(0)) if rc == SQLITE_OK { var rc2 int32 for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32))) { @@ -189785,7 +190028,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / rc = sqlite3Fts5Tokenize(tls, pConfig, FTS5_TOKENIZE_DOCUMENT, zText, nText, - bp, /* &ctx */ + bp, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5StorageIntegrityCallback}))) @@ -189827,14 +190070,14 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // number of rows. if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL { *(*I64)(unsafe.Pointer(bp + 36 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33613 /* "content" */, bp+36 /* &nRow */) + rc = fts5StorageCount(tls, p, ts+33782, bp+36) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 36)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } } if rc == SQLITE_OK && (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0 { *(*I64)(unsafe.Pointer(bp + 44 /* nRow */)) = int64(0) - rc = fts5StorageCount(tls, p, ts+33964 /* "docsize" */, bp+44 /* &nRow */) + rc = fts5StorageCount(tls, p, ts+34133, bp+44) if rc == SQLITE_OK && *(*I64)(unsafe.Pointer(bp + 44)) != (*Fts5Storage)(unsafe.Pointer(p)).FnTotalRow { rc = SQLITE_CORRUPT | int32(1)<<8 } @@ -189854,7 +190097,7 @@ func sqlite3Fts5StorageIntegrity(tls *libc.TLS, p uintptr, iArg int32) int32 { / // Obtain an SQLite statement handle that may be used to read data from the // %_content table. -func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:233619:12: */ +func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:233663:12: */ var rc int32 rc = fts5StorageGetStmt(tls, p, eStmt, pp, pzErrMsg) @@ -189868,7 +190111,7 @@ func sqlite3Fts5StorageStmt(tls *libc.TLS, p uintptr, eStmt int32, pp uintptr, p // Release an SQLite statement handle obtained via an earlier call to // sqlite3Fts5StorageStmt(). The eStmt parameter passed to this function // must match that passed to the sqlite3Fts5StorageStmt() call. -func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:233643:13: */ +func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt uintptr) { /* sqlite3.c:233687:13: */ if *(*uintptr)(unsafe.Pointer(p + 24 + uintptr(eStmt)*4)) == uintptr(0) { Xsqlite3_reset(tls, pStmt) @@ -189878,7 +190121,7 @@ func sqlite3Fts5StorageStmtRelease(tls *libc.TLS, p uintptr, eStmt int32, pStmt } } -func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:233660:12: */ +func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob uintptr, nBlob int32) int32 { /* sqlite3.c:233704:12: */ var i int32 var iOff int32 = 0 for i = 0; i < nCol; i++ { @@ -189896,7 +190139,7 @@ func fts5StorageDecodeSizeArray(tls *libc.TLS, aCol uintptr, nCol int32, aBlob u // // An SQLite error code is returned if an error occurs, or SQLITE_OK // otherwise. -func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:233681:12: */ +func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintptr) int32 { /* sqlite3.c:233725:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -189904,7 +190147,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt *(*uintptr)(unsafe.Pointer(bp /* pLookup */)) = uintptr(0) // Statement to query %_docsize var rc int32 // Return Code - rc = fts5StorageGetStmt(tls, p, FTS5_STMT_LOOKUP_DOCSIZE, bp /* &pLookup */, uintptr(0)) + rc = fts5StorageGetStmt(tls, p, FTS5_STMT_LOOKUP_DOCSIZE, bp, uintptr(0)) if *(*uintptr)(unsafe.Pointer(bp)) != 0 { var bCorrupt int32 = 1 @@ -189927,7 +190170,7 @@ func sqlite3Fts5StorageDocsize(tls *libc.TLS, p uintptr, iRowid I64, aCol uintpt return rc } -func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233710:12: */ +func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintptr) int32 { /* sqlite3.c:233754:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { *(*I64)(unsafe.Pointer(pnToken)) = int64(0) @@ -189945,7 +190188,7 @@ func sqlite3Fts5StorageSize(tls *libc.TLS, p uintptr, iCol int32, pnToken uintpt return rc } -func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:233728:12: */ +func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { /* sqlite3.c:233772:12: */ var rc int32 = fts5StorageLoadTotals(tls, p, 0) if rc == SQLITE_OK { // nTotalRow being zero does not necessarily indicate a corrupt @@ -189962,7 +190205,7 @@ func sqlite3Fts5StorageRowCount(tls *libc.TLS, p uintptr, pnRow uintptr) int32 { } // Flush any data currently held in-memory to disk. -func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233745:12: */ +func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233789:12: */ var rc int32 = SQLITE_OK var iLastRowid I64 = Xsqlite3_last_insert_rowid(tls, (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).Fdb) if (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid != 0 { @@ -189976,17 +190219,17 @@ func sqlite3Fts5StorageSync(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:23374 return rc } -func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233759:12: */ +func sqlite3Fts5StorageRollback(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:233803:12: */ (*Fts5Storage)(unsafe.Pointer(p)).FbTotalsValid = 0 return sqlite3Fts5IndexRollback(tls, (*Fts5Storage)(unsafe.Pointer(p)).FpIndex) } -func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:233764:12: */ +func sqlite3Fts5StorageConfigValue(tls *libc.TLS, p uintptr, z uintptr, pVal uintptr, iVal int32) int32 { /* sqlite3.c:233808:12: */ bp := tls.Alloc(4) defer tls.Free(4) *(*uintptr)(unsafe.Pointer(bp /* pReplace */)) = uintptr(0) - var rc int32 = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_CONFIG, bp /* &pReplace */, uintptr(0)) + var rc int32 = fts5StorageGetStmt(tls, p, FTS5_STMT_REPLACE_CONFIG, bp, uintptr(0)) if rc == SQLITE_OK { Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pReplace */)), 1, z, -1, uintptr(0)) if pVal != 0 { @@ -190036,13 +190279,13 @@ var aAsciiTokenChar = [128]uint8{ uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x50..0x5F uint8(0), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), // 0x60..0x6F uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(1), uint8(0), uint8(0), uint8(0), uint8(0), uint8(0), // 0x70..0x7F -} /* sqlite3.c:233817:22 */ +} /* sqlite3.c:233861:22 */ -type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:233828:9 */ +type AsciiTokenizer1 = struct{ FaTokenChar [128]uint8 } /* sqlite3.c:233872:9 */ -type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:233828:31 */ +type AsciiTokenizer = AsciiTokenizer1 /* sqlite3.c:233872:31 */ -func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:233833:13: */ +func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars int32) { /* sqlite3.c:233877:13: */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(zArg + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i))))&0x80 == 0 { @@ -190052,12 +190295,12 @@ func fts5AsciiAddExceptions(tls *libc.TLS, p uintptr, zArg uintptr, bTokenChars } // Delete a "ascii" tokenizer. -func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:233849:13: */ +func fts5AsciiDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:233893:13: */ Xsqlite3_free(tls, p) } // Create an "ascii" tokenizer. -func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:233856:12: */ +func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:233900:12: */ var rc int32 = SQLITE_OK var p uintptr = uintptr(0) _ = pUnused @@ -190073,9 +190316,9 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, libc.Xmemcpy(tls, p, uintptr(unsafe.Pointer(&aAsciiTokenChar)), uint32(unsafe.Sizeof(aAsciiTokenChar))) for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36499) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36668) { fts5AsciiAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36510) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36679) { fts5AsciiAddExceptions(tls, p, zArg, 0) } else { rc = SQLITE_ERROR @@ -190092,7 +190335,7 @@ func fts5AsciiCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, return rc } -func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:233897:13: */ +func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlite3.c:233941:13: */ var i int32 for i = 0; i < nByte; i++ { var c int8 = *(*int8)(unsafe.Pointer(aIn + uintptr(i))) @@ -190104,7 +190347,7 @@ func asciiFold(tls *libc.TLS, aOut uintptr, aIn uintptr, nByte int32) { /* sqlit } // Tokenize some text using the ascii tokenizer. -func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:233909:12: */ +func fts5AsciiTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:233953:12: */ bp := tls.Alloc(64) defer tls.Free(64) @@ -190184,7 +190427,7 @@ type Unicode61Tokenizer1 = struct { FnException int32 FaiException uintptr FaCategory [32]uint8 -} /* sqlite3.c:234024:9 */ +} /* sqlite3.c:234068:9 */ // ************************************************************************* // @@ -190194,11 +190437,11 @@ type Unicode61Tokenizer1 = struct { // from the sqlite3 source file utf.c. If this file is compiled as part // of the amalgamation, they are not required. -type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:234024:35 */ +type Unicode61Tokenizer = Unicode61Tokenizer1 /* sqlite3.c:234068:35 */ // Values for eRemoveDiacritic (must match internals of fts5_unicode2.c) -func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:234041:12: */ +func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars int32) int32 { /* sqlite3.c:234085:12: */ var rc int32 = SQLITE_OK var n int32 = int32(libc.Xstrlen(tls, z)) var aNew uintptr @@ -190253,7 +190496,7 @@ func fts5UnicodeAddExceptions(tls *libc.TLS, p uintptr, z uintptr, bTokenChars i } // Return true if the p->aiException[] array contains the value iCode. -func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:234091:12: */ +func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:234135:12: */ if (*Unicode61Tokenizer)(unsafe.Pointer(p)).FnException > 0 { var a uintptr = (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException var iLo int32 = 0 @@ -190275,7 +190518,7 @@ func fts5UnicodeIsException(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sq } // Delete a "unicode61" tokenizer. -func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:234115:13: */ +func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:234159:13: */ if pTok != 0 { var p uintptr = pTok Xsqlite3_free(tls, (*Unicode61Tokenizer)(unsafe.Pointer(p)).FaiException) @@ -190285,7 +190528,7 @@ func fts5UnicodeDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:234115:13: */ return } -func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:234125:12: */ +func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sqlite3.c:234169:12: */ var z uintptr = zCat for *(*int8)(unsafe.Pointer(z)) != 0 { @@ -190305,7 +190548,7 @@ func unicodeSetCategories(tls *libc.TLS, p uintptr, zCat uintptr) int32 { /* sql } // Create a "unicode61" tokenizer. -func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:234143:12: */ +func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:234187:12: */ var rc int32 = SQLITE_OK // Return code var p uintptr = uintptr(0) // New tokenizer object @@ -190316,7 +190559,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 } else { p = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(Unicode61Tokenizer{}))) if p != 0 { - var zCat uintptr = ts + 36521 /* "L* N* Co" */ + var zCat uintptr = ts + 36690 /* "L* N* Co" */ var i int32 libc.Xmemset(tls, p, 0, uint32(unsafe.Sizeof(Unicode61Tokenizer{}))) @@ -190329,7 +190572,7 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Search for a "categories" argument for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36530) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36699) { zCat = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) } } @@ -190340,18 +190583,18 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36541) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36710) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' && int32(*(*int8)(unsafe.Pointer(zArg))) != '2' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { (*Unicode61Tokenizer)(unsafe.Pointer(p)).FeRemoveDiacritic = int32(*(*int8)(unsafe.Pointer(zArg))) - '0' } - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36499) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36668) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 1) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36510) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36679) { rc = fts5UnicodeAddExceptions(tls, p, zArg, 0) - } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36530) { + } else if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36699) { // no-op } else { rc = SQLITE_ERROR @@ -190373,12 +190616,12 @@ func fts5UnicodeCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32 // Return true if, for the purposes of tokenizing with the tokenizer // passed as the first argument, codepoint iCode is considered a token // character (not a separator). -func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:234223:12: */ +func fts5UnicodeIsAlnum(tls *libc.TLS, p uintptr, iCode int32) int32 { /* sqlite3.c:234267:12: */ return int32(*(*uint8)(unsafe.Pointer(p + 148 + uintptr(sqlite3Fts5UnicodeCategory(tls, U32(iCode)))))) ^ fts5UnicodeIsException(tls, p, iCode) } -func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:234230:12: */ +func fts5UnicodeTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, iUnused int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:234274:12: */ var p uintptr var rc int32 var a uintptr @@ -190634,7 +190877,7 @@ type PorterTokenizer1 = struct { Ftokenizer Fts5_tokenizer FpTokenizer uintptr FaBuf [128]int8 -} /* sqlite3.c:234342:9 */ +} /* sqlite3.c:234386:9 */ // ************************************************************************* // @@ -190643,10 +190886,10 @@ type PorterTokenizer1 = struct { // Any tokens larger than this (in bytes) are passed through without // stemming. -type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:234342:32 */ +type PorterTokenizer = PorterTokenizer1 /* sqlite3.c:234386:32 */ // Delete a "porter" tokenizer. -func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:234352:13: */ +func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:234396:13: */ if pTok != 0 { var p uintptr = pTok if (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer != 0 { @@ -190657,7 +190900,7 @@ func fts5PorterDelete(tls *libc.TLS, pTok uintptr) { /* sqlite3.c:234352:13: */ } // Create a "porter" tokenizer. -func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:234365:12: */ +func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:234409:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -190665,7 +190908,7 @@ func fts5PorterCreate(tls *libc.TLS, pCtx uintptr, azArg uintptr, nArg int32, pp var rc int32 = SQLITE_OK var pRet uintptr *(*uintptr)(unsafe.Pointer(bp /* pUserdata */)) = uintptr(0) - var zBase uintptr = ts + 36559 /* "unicode61" */ + var zBase uintptr = ts + 36728 /* "unicode61" */ if nArg > 0 { zBase = *(*uintptr)(unsafe.Pointer(azArg)) @@ -190710,9 +190953,9 @@ type PorterContext1 = struct { FpCtx uintptr FxToken uintptr FaBuf uintptr -} /* sqlite3.c:234401:9 */ +} /* sqlite3.c:234445:9 */ -type PorterContext = PorterContext1 /* sqlite3.c:234401:30 */ +type PorterContext = PorterContext1 /* sqlite3.c:234445:30 */ type PorterRule1 = struct { FzSuffix uintptr @@ -190720,15 +190963,15 @@ type PorterRule1 = struct { FxCond uintptr FzOutput uintptr FnOutput int32 -} /* sqlite3.c:234408:9 */ +} /* sqlite3.c:234452:9 */ -type PorterRule = PorterRule1 /* sqlite3.c:234408:27 */ +type PorterRule = PorterRule1 /* sqlite3.c:234452:27 */ -func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:234443:12: */ +func fts5PorterIsVowel(tls *libc.TLS, c int8, bYIsVowel int32) int32 { /* sqlite3.c:234487:12: */ return libc.Bool32(int32(c) == 'a' || int32(c) == 'e' || int32(c) == 'i' || int32(c) == 'o' || int32(c) == 'u' || bYIsVowel != 0 && int32(c) == 'y') } -func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:234449:12: */ +func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int32) int32 { /* sqlite3.c:234493:12: */ var i int32 var bCons int32 = bPrevCons @@ -190749,12 +190992,12 @@ func fts5PorterGobbleVC(tls *libc.TLS, zStem uintptr, nStem int32, bPrevCons int } // porter rule condition: (m > 0) -func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234466:12: */ +func fts5Porter_MGt0(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234510:12: */ return libc.BoolInt32(!!(fts5PorterGobbleVC(tls, zStem, nStem, 0) != 0)) } // porter rule condition: (m > 1) -func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234471:12: */ +func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234515:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) != 0 { @@ -190764,7 +191007,7 @@ func fts5Porter_MGt1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (m = 1) -func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234481:12: */ +func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234525:12: */ var n int32 n = fts5PorterGobbleVC(tls, zStem, nStem, 0) if n != 0 && 0 == fts5PorterGobbleVC(tls, zStem+uintptr(n), nStem-n, 1) { @@ -190774,7 +191017,7 @@ func fts5Porter_MEq1(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlit } // porter rule condition: (*o) -func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234491:12: */ +func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234535:12: */ if int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'w' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'x' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 'y' { return 0 } else { @@ -190792,14 +191035,14 @@ func fts5Porter_Ostar(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli } // porter rule condition: (m > 1 and (*S or *T)) -func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234508:12: */ +func fts5Porter_MGt1_and_S_or_T(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234552:12: */ return libc.Bool32((int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 's' || int32(*(*int8)(unsafe.Pointer(zStem + uintptr(nStem-1)))) == 't') && fts5Porter_MGt1(tls, zStem, nStem) != 0) } // porter rule condition: (*v*) -func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234515:12: */ +func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqlite3.c:234559:12: */ var i int32 for i = 0; i < nStem; i++ { if fts5PorterIsVowel(tls, *(*int8)(unsafe.Pointer(zStem + uintptr(i))), libc.Bool32(i > 0)) != 0 { @@ -190814,13 +191057,13 @@ func fts5Porter_Vowel(tls *libc.TLS, zStem uintptr, nStem int32) int32 { /* sqli // // GENERATED CODE STARTS HERE (mkportersteps.tcl) -func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234531:12: */ +func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234575:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36569, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36738, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -190828,11 +191071,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36572, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36741, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36577, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36746, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -190840,7 +191083,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'e': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36582, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36751, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -190848,7 +191091,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36585, aBuf+uintptr(nBuf-2), uint32(2)) { + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36754, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -190856,11 +191099,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'l': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36588, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36757, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36593, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36762, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -190868,19 +191111,19 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36598, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36767, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36602, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36771, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt1(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36608, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36777, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt1(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36613, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36782, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -190888,11 +191131,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'o': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36617, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36786, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1_and_S_or_T(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36621, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36790, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_MGt1(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 } @@ -190900,7 +191143,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 's': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36624, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36793, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -190908,11 +191151,11 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36628, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36797, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36632, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36801, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -190920,7 +191163,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36636, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36805, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -190928,7 +191171,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36640, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36809, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -190936,7 +191179,7 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36644, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36813, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt1(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -190947,30 +191190,30 @@ func fts5PorterStep4(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234665:12: */ +func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234709:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36648, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36628 /* "ate" */, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36817, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36797, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'b': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36651, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36654 /* "ble" */, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36820, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36823, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } break case 'i': - if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36658, aBuf+uintptr(nBuf-2), uint32(2)) { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36644 /* "ize" */, uint32(3)) + if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36827, aBuf+uintptr(nBuf-2), uint32(2)) { + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-2), ts+36813, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 + 3 ret = 1 } @@ -190980,143 +191223,143 @@ func fts5PorterStep1B2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sq return ret } -func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234699:12: */ +func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234743:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36661, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36830, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36628 /* "ate" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36797, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36669, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36838, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36676 /* "tion" */, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36845, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 4 } } break case 'c': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36681, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36850, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36577 /* "ence" */, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36746, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36686, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36855, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36572 /* "ance" */, uint32(4)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36741, uint32(4)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 4 } } break case 'e': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36691, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36860, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36644 /* "ize" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36813, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'g': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36696, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36865, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15982 /* "log" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+15347, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 'l': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36701, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36870, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36654 /* "ble" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36823, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36705, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36874, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36569 /* "al" */, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36738, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36710, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36879, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36613 /* "ent" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36782, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36716, aBuf+uintptr(nBuf-3), uint32(3)) { + } else if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36885, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36720 /* "e" */, uint32(1)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36889, uint32(1)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 1 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36722, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36891, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36636 /* "ous" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36805, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } } break case 'o': - if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36728, aBuf+uintptr(nBuf-7), uint32(7)) { + if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36897, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36644 /* "ize" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36813, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36736, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36905, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36628 /* "ate" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36797, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36742, aBuf+uintptr(nBuf-4), uint32(4)) { + } else if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36911, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36628 /* "ate" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36797, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 3 } } break case 's': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36747, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36916, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36569 /* "al" */, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36738, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36753, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36922, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36640 /* "ive" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36809, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36761, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36930, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36769 /* "ful" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36938, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } - } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36773, aBuf+uintptr(nBuf-7), uint32(7)) { + } else if nBuf > 7 && 0 == libc.Xmemcmp(tls, ts+36942, aBuf+uintptr(nBuf-7), uint32(7)) { if fts5Porter_MGt0(tls, aBuf, nBuf-7) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36636 /* "ous" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-7), ts+36805, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 7 + 3 } } break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36781, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36950, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36569 /* "al" */, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36738, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36787, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36956, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36640 /* "ive" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36809, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 3 } - } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36793, aBuf+uintptr(nBuf-6), uint32(6)) { + } else if nBuf > 6 && 0 == libc.Xmemcmp(tls, ts+36962, aBuf+uintptr(nBuf-6), uint32(6)) { if fts5Porter_MGt0(tls, aBuf, nBuf-6) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36654 /* "ble" */, uint32(3)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-6), ts+36823, uint32(3)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 6 + 3 } } @@ -191126,22 +191369,22 @@ func fts5PorterStep2(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234846:12: */ +func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234890:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'a': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36800, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36969, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36585 /* "ic" */, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-4), ts+36754, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 + 2 } } break case 's': - if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36805, aBuf+uintptr(nBuf-4), uint32(4)) { + if nBuf > 4 && 0 == libc.Xmemcmp(tls, ts+36974, aBuf+uintptr(nBuf-4), uint32(4)) { if fts5Porter_MGt0(tls, aBuf, nBuf-4) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 4 } @@ -191149,21 +191392,21 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 't': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36810, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36979, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36585 /* "ic" */, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36754, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } - } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36816, aBuf+uintptr(nBuf-5), uint32(5)) { + } else if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36985, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36585 /* "ic" */, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36754, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } break case 'u': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36769, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36938, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 } @@ -191171,7 +191414,7 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'v': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36822, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36991, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 } @@ -191179,9 +191422,9 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli break case 'z': - if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36828, aBuf+uintptr(nBuf-5), uint32(5)) { + if nBuf > 5 && 0 == libc.Xmemcmp(tls, ts+36997, aBuf+uintptr(nBuf-5), uint32(5)) { if fts5Porter_MGt0(tls, aBuf, nBuf-5) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36569 /* "al" */, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-5), ts+36738, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 5 + 2 } } @@ -191191,18 +191434,18 @@ func fts5PorterStep3(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqli return ret } -func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234912:12: */ +func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sqlite3.c:234956:12: */ var ret int32 = 0 var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) switch int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) { case 'e': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36834, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37003, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_MGt0(tls, aBuf, nBuf-3) != 0 { - libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+36838 /* "ee" */, uint32(2)) + libc.Xmemcpy(tls, aBuf+uintptr(nBuf-3), ts+37007, uint32(2)) *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 + 2 } - } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+36841, aBuf+uintptr(nBuf-2), uint32(2)) { + } else if nBuf > 2 && 0 == libc.Xmemcmp(tls, ts+37010, aBuf+uintptr(nBuf-2), uint32(2)) { if fts5Porter_Vowel(tls, aBuf, nBuf-2) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 2 ret = 1 @@ -191211,7 +191454,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql break case 'n': - if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+36844, aBuf+uintptr(nBuf-3), uint32(3)) { + if nBuf > 3 && 0 == libc.Xmemcmp(tls, ts+37013, aBuf+uintptr(nBuf-3), uint32(3)) { if fts5Porter_Vowel(tls, aBuf, nBuf-3) != 0 { *(*int32)(unsafe.Pointer(pnBuf)) = nBuf - 3 ret = 1 @@ -191228,7 +191471,7 @@ func fts5PorterStep1B(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) int32 { /* sql // // -func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:234949:13: */ +func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c:234993:13: */ var nBuf int32 = *(*int32)(unsafe.Pointer(pnBuf)) if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-1)))) == 's' { if int32(*(*int8)(unsafe.Pointer(aBuf + uintptr(nBuf-2)))) == 'e' { @@ -191244,7 +191487,7 @@ func fts5PorterStep1A(tls *libc.TLS, aBuf uintptr, pnBuf uintptr) { /* sqlite3.c } } -func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:234967:12: */ +func fts5PorterCb(tls *libc.TLS, pCtx uintptr, tflags int32, pToken uintptr, nToken int32, iStart int32, iEnd int32) int32 { /* sqlite3.c:235011:12: */ bp := tls.Alloc(4) defer tls.Free(4) @@ -191266,7 +191509,7 @@ __1: libc.Xmemcpy(tls, aBuf, pToken, uint32(*(*int32)(unsafe.Pointer(bp /* nBuf */)))) // Step 1. - fts5PorterStep1A(tls, aBuf, bp /* &nBuf */) + fts5PorterStep1A(tls, aBuf, bp) if !(fts5PorterStep1B(tls, aBuf, bp) != 0) { goto __2 } @@ -191303,9 +191546,9 @@ __7: ; // Steps 2 through 4. - fts5PorterStep2(tls, aBuf, bp /* &nBuf */) - fts5PorterStep3(tls, aBuf, bp /* &nBuf */) - fts5PorterStep4(tls, aBuf, bp /* &nBuf */) + fts5PorterStep2(tls, aBuf, bp) + fts5PorterStep3(tls, aBuf, bp) + fts5PorterStep4(tls, aBuf, bp) // Step 5a. @@ -191342,7 +191585,7 @@ pass_through: } // Tokenize using the porter tokenizer. -func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235036:12: */ +func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235080:12: */ bp := tls.Alloc(12) defer tls.Free(12) @@ -191355,7 +191598,7 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i return (*struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*PorterTokenizer)(unsafe.Pointer(p)).Ftokenizer.FxTokenize})).f(tls, - (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer, bp /* &sCtx */, flags, pText, nText, *(*uintptr)(unsafe.Pointer(&struct { + (*PorterTokenizer)(unsafe.Pointer(p)).FpTokenizer, bp, flags, pText, nText, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, int32, int32, int32) int32 }{fts5PorterCb}))) } @@ -191363,20 +191606,20 @@ func fts5PorterTokenize(tls *libc.TLS, pTokenizer uintptr, pCtx uintptr, flags i // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:235056:9 */ +type TrigramTokenizer1 = struct{ FbFold int32 } /* sqlite3.c:235100:9 */ // ************************************************************************* // // Start of trigram implementation. -type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:235056:33 */ +type TrigramTokenizer = TrigramTokenizer1 /* sqlite3.c:235100:33 */ // Free a trigram tokenizer. -func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235064:13: */ +func fts5TriDelete(tls *libc.TLS, p uintptr) { /* sqlite3.c:235108:13: */ Xsqlite3_free(tls, p) } // Allocate a trigram tokenizer. -func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235071:12: */ +func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, ppOut uintptr) int32 { /* sqlite3.c:235115:12: */ var rc int32 = SQLITE_OK var pNew uintptr = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TrigramTokenizer{}))) _ = pUnused @@ -191387,7 +191630,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp (*TrigramTokenizer)(unsafe.Pointer(pNew)).FbFold = 1 for i = 0; rc == SQLITE_OK && i < nArg; i = i + 2 { var zArg uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i+1)*4)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+36848) { + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*4)), ts+37017) { if int32(*(*int8)(unsafe.Pointer(zArg))) != '0' && int32(*(*int8)(unsafe.Pointer(zArg))) != '1' || *(*int8)(unsafe.Pointer(zArg + 1)) != 0 { rc = SQLITE_ERROR } else { @@ -191407,7 +191650,7 @@ func fts5TriCreate(tls *libc.TLS, pUnused uintptr, azArg uintptr, nArg int32, pp } // Trigram tokenizer tokenize routine. -func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235109:12: */ +func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int32, pText uintptr, nText int32, xToken uintptr) int32 { /* sqlite3.c:235153:12: */ bp := tls.Alloc(32) defer tls.Free(32) @@ -191560,7 +191803,7 @@ func fts5TriTokenize(tls *libc.TLS, pTok uintptr, pCtx uintptr, unusedFlags int3 // "trigram" tokenizer, case_sensitive=1 - FTS5_PATTERN_GLOB // "trigram" tokenizer, case_sensitive=0 (the default) - FTS5_PATTERN_LIKE // all other tokenizers - FTS5_PATTERN_NONE -func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:235169:12: */ +func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) int32 { /* sqlite3.c:235213:12: */ if xCreate == *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})) { @@ -191574,27 +191817,27 @@ func sqlite3Fts5TokenizerPattern(tls *libc.TLS, xCreate uintptr, pTok uintptr) i } // Register all built-in tokenizers with FTS5. -func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:235183:12: */ +func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c:235227:12: */ bp := tls.Alloc(64) defer tls.Free(64) *(*[4]BuiltinTokenizer)(unsafe.Pointer(bp /* aBuiltin */)) = [4]BuiltinTokenizer{ - {FzName: ts + 36559 /* "unicode61" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 36728, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5UnicodeCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5UnicodeDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5UnicodeTokenize}))}}, - {FzName: ts + 36863 /* "ascii" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37032, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5AsciiCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5AsciiDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5AsciiTokenize}))}}, - {FzName: ts + 36869 /* "porter" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37038, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5PorterCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5PorterDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 }{fts5PorterTokenize}))}}, - {FzName: ts + 36876 /* "trigram" */, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 37045, Fx: Fts5_tokenizer{FxCreate: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32 }{fts5TriCreate})), FxDelete: *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{fts5TriDelete})), FxTokenize: *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, int32, uintptr, int32, uintptr) int32 @@ -191608,7 +191851,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: rc = (*struct { f func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32 })(unsafe.Pointer(&struct{ uintptr }{(*Fts5_api)(unsafe.Pointer(pApi)).FxCreateTokenizer})).f(tls, pApi, - (*BuiltinTokenizer)(unsafe.Pointer(bp /* &aBuiltin */ +uintptr(i)*16)).FzName, + (*BuiltinTokenizer)(unsafe.Pointer(bp+uintptr(i)*16)).FzName, pApi, bp+uintptr(i)*16+4, uintptr(0)) @@ -191620,7 +191863,7 @@ func sqlite3Fts5TokenizerInit(tls *libc.TLS, pApi uintptr) int32 { /* sqlite3.c: type BuiltinTokenizer = struct { FzName uintptr Fx Fts5_tokenizer -} /* sqlite3.c:235184:3 */ +} /* sqlite3.c:235228:3 */ // 2012-05-25 // @@ -191643,7 +191886,7 @@ type BuiltinTokenizer = struct { // SMALL LETTER E WITH DIAERESIS" - return 65 ("LATIN SMALL LETTER // E"). The resuls of passing a codepoint that corresponds to an // uppercase letter are undefined. -func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:235239:12: */ +func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sqlite3.c:235283:12: */ bp := tls.Alloc(378) defer tls.Free(378) @@ -191714,7 +191957,7 @@ func fts5_remove_diacritic(tls *libc.TLS, c int32, bComplex int32) int32 { /* sq // Return true if the argument interpreted as a unicode codepoint // is a diacritical modifier character. -func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:235306:12: */ +func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c:235350:12: */ var mask0 uint32 = uint32(0x08029FDF) var mask1 uint32 = uint32(0x000361F8) if c < 768 || c > 817 { @@ -191733,7 +191976,7 @@ func sqlite3Fts5UnicodeIsdiacritic(tls *libc.TLS, c int32) int32 { /* sqlite3.c: // // The results are undefined if the value passed to this function // is less than zero. -func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:235325:12: */ +func sqlite3Fts5UnicodeFold(tls *libc.TLS, c int32, eRemoveDiacritic int32) int32 { /* sqlite3.c:235369:12: */ var ret int32 = c @@ -191794,7 +192037,7 @@ type TableEntry = struct { FiCode uint16 Fflags uint8 FnRange uint8 -} /* sqlite3.c:235343:16 */ +} /* sqlite3.c:235387:16 */ var aEntry = [163]TableEntry{ {FiCode: uint16(65), Fflags: uint8(14), FnRange: uint8(26)}, {FiCode: uint16(181), Fflags: uint8(64), FnRange: uint8(1)}, {FiCode: uint16(192), Fflags: uint8(14), FnRange: uint8(23)}, @@ -191852,7 +192095,7 @@ var aEntry = [163]TableEntry{ {FiCode: uint16(42878), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42891), FnRange: uint8(1)}, {FiCode: uint16(42893), Fflags: uint8(74), FnRange: uint8(1)}, {FiCode: uint16(42896), Fflags: uint8(1), FnRange: uint8(4)}, {FiCode: uint16(42912), Fflags: uint8(1), FnRange: uint8(10)}, {FiCode: uint16(42922), Fflags: uint8(72), FnRange: uint8(1)}, {FiCode: uint16(65313), Fflags: uint8(14), FnRange: uint8(26)}, -} /* sqlite3.c:235347:5 */ +} /* sqlite3.c:235391:5 */ var aiOff = [77]uint16{ uint16(1), uint16(2), uint16(8), uint16(15), uint16(16), uint16(26), uint16(28), uint16(32), uint16(37), uint16(38), uint16(40), uint16(48), uint16(63), uint16(64), uint16(69), uint16(71), @@ -191864,9 +192107,9 @@ var aiOff = [77]uint16{ uint16(65408), uint16(65410), uint16(65415), uint16(65424), uint16(65436), uint16(65439), uint16(65450), uint16(65462), uint16(65472), uint16(65476), uint16(65478), uint16(65480), uint16(65482), uint16(65488), uint16(65506), uint16(65511), uint16(65514), uint16(65521), uint16(65527), uint16(65528), uint16(65529), -} /* sqlite3.c:235404:31 */ +} /* sqlite3.c:235448:31 */ -func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:235461:12: */ +func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int32 { /* sqlite3.c:235505:12: */ *(*U8)(unsafe.Pointer(aArray)) = U8(1) switch int32(*(*int8)(unsafe.Pointer(zCat))) { case 'C': @@ -192063,7 +192306,7 @@ func sqlite3Fts5UnicodeCatParse(tls *libc.TLS, zCat uintptr, aArray uintptr) int var aFts5UnicodeBlock = [17]U16{ U16(0), U16(1471), U16(1753), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1760), U16(1763), U16(1765), -} /* sqlite3.c:235579:12 */ +} /* sqlite3.c:235623:12 */ var aFts5UnicodeMap = [1765]U16{ U16(0), U16(32), U16(33), U16(36), U16(37), U16(40), U16(41), U16(42), U16(43), U16(44), U16(45), U16(46), U16(48), U16(58), U16(60), U16(63), U16(65), U16(91), U16(92), U16(93), @@ -192242,7 +192485,7 @@ var aFts5UnicodeMap = [1765]U16{ U16(62406), U16(62432), U16(62464), U16(62528), U16(62530), U16(62713), U16(62720), U16(62784), U16(62800), U16(62971), U16(63045), U16(63104), U16(63232), U16(0), U16(42710), U16(42752), U16(46900), U16(46912), U16(47133), U16(63488), U16(1), U16(32), U16(256), U16(0), U16(65533), -} /* sqlite3.c:235583:12 */ +} /* sqlite3.c:235627:12 */ var aFts5UnicodeData = [1765]U16{ U16(1025), U16(61), U16(117), U16(55), U16(117), U16(54), U16(50), U16(53), U16(57), U16(53), U16(49), U16(85), U16(333), U16(85), U16(121), U16(85), U16(841), U16(54), U16(53), U16(50), @@ -192421,9 +192664,9 @@ var aFts5UnicodeData = [1765]U16{ U16(186), U16(570), U16(2042), U16(58), U16(5850), U16(154), U16(2010), U16(154), U16(794), U16(2266), U16(378), U16(2266), U16(3738), U16(39), U16(39), U16(39), U16(39), U16(39), U16(39), U16(17351), U16(34), U16(3074), U16(7692), U16(63), U16(63), -} /* sqlite3.c:235762:12 */ +} /* sqlite3.c:235806:12 */ -func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:235942:12: */ +func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:235986:12: */ var iRes int32 = -1 var iHi int32 var iLo int32 @@ -192463,7 +192706,7 @@ func sqlite3Fts5UnicodeCategory(tls *libc.TLS, iCode U32) int32 { /* sqlite3.c:2 return 9 } -func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:235973:13: */ +func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* sqlite3.c:236017:13: */ var i int32 = 0 var iTbl int32 = 0 for i < 128 { @@ -192495,7 +192738,7 @@ func sqlite3Fts5UnicodeAscii(tls *libc.TLS, aArray uintptr, aAscii uintptr) { /* // This is a copy of the sqlite3GetVarint32() routine from the SQLite core. // Except, this version does handle the single byte case that the core // version depends on being handled before its function is called. -func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:236011:12: */ +func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqlite3.c:236055:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -192551,7 +192794,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli var n U8 p -= uintptr(2) - n = sqlite3Fts5GetVarint(tls, p, bp /* &v64 */) + n = sqlite3Fts5GetVarint(tls, p, bp) *(*U32)(unsafe.Pointer(v)) = U32(*(*U64)(unsafe.Pointer(bp))) & U32(0x7FFFFFFF) return int32(n) @@ -192570,7 +192813,7 @@ func sqlite3Fts5GetVarint32(tls *libc.TLS, p uintptr, v uintptr) int32 { /* sqli // Read a 64-bit variable-length integer from memory starting at p[0]. // Return the number of bytes read. The value is stored in *v. -func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:236089:11: */ +func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c:236133:11: */ var a U32 var b U32 var s U32 @@ -192746,7 +192989,7 @@ func sqlite3Fts5GetVarint(tls *libc.TLS, p uintptr, v uintptr) U8 { /* sqlite3.c // for all bytes that have the 8th bit set and one byte with the 8th // bit clear. Except, if we get to the 9th byte, it stores the full // 8 bits and is the last byte. -func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:236283:26: */ +func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:236327:26: */ bp := tls.Alloc(10) defer tls.Free(10) @@ -192766,7 +193009,7 @@ func fts5PutVarint64(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:23628 } n = 0 for ok := true; ok; ok = v != uint64(0) { - *(*U8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(libc.PostIncInt32(&n, 1)))) = U8(v&uint64(0x7f) | uint64(0x80)) + *(*U8)(unsafe.Pointer(bp + uintptr(libc.PostIncInt32(&n, 1)))) = U8(v&uint64(0x7f) | uint64(0x80)) v >>= 7 } *(*U8)(unsafe.Pointer(bp)) &= U8(0x7f) @@ -192778,7 +193021,7 @@ __1: goto __3 } { - *(*uint8)(unsafe.Pointer(p + uintptr(i))) = *(*U8)(unsafe.Pointer(bp /* &buf[0] */ + uintptr(j))) + *(*uint8)(unsafe.Pointer(p + uintptr(i))) = *(*U8)(unsafe.Pointer(bp + uintptr(j))) } goto __2 @@ -192792,7 +193035,7 @@ __3: return n } -func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:236308:12: */ +func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c:236352:12: */ if v <= uint64(0x7f) { *(*uint8)(unsafe.Pointer(p)) = uint8(v & uint64(0x7f)) return 1 @@ -192805,7 +193048,7 @@ func sqlite3Fts5PutVarint(tls *libc.TLS, p uintptr, v U64) int32 { /* sqlite3.c: return fts5PutVarint64(tls, p, v) } -func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:236322:12: */ +func sqlite3Fts5GetVarintLen(tls *libc.TLS, iVal U32) int32 { /* sqlite3.c:236366:12: */ if iVal < U32(int32(1)<<14) { return 2 @@ -192865,7 +193108,7 @@ type Fts5VocabTable1 = struct { FpGlobal uintptr FeType int32 FbBusy uint32 -} /* sqlite3.c:236375:9 */ +} /* sqlite3.c:236419:9 */ // 2015 May 08 // @@ -192905,7 +193148,7 @@ type Fts5VocabTable1 = struct { // #include "fts5Int.h" -type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:236375:31 */ +type Fts5VocabTable = Fts5VocabTable1 /* sqlite3.c:236419:31 */ type Fts5VocabCursor1 = struct { Fbase Sqlite3_vtab_cursor FpStmt uintptr @@ -192922,9 +193165,9 @@ type Fts5VocabCursor1 = struct { Fterm Fts5Buffer FiInstPos I64 FiInstOff int32 -} /* sqlite3.c:236376:9 */ +} /* sqlite3.c:236420:9 */ -type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:236376:32 */ +type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:236420:32 */ // Bits for the mask used as the idxNum value by xBestIndex/xFilter. @@ -192932,22 +193175,22 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:236376:32 */ // FTS5_VOCAB_XXX constant. If successful, set *peType to the output // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. -func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:236436:12: */ +func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:236480:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK - var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8 /* &rc */, zType, -1) + var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8, zType, -1) if *(*int32)(unsafe.Pointer(bp + 8)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) - if Xsqlite3_stricmp(tls, zCopy, ts+36884) == 0 { + if Xsqlite3_stricmp(tls, zCopy, ts+37053) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL - } else if Xsqlite3_stricmp(tls, zCopy, ts+36888) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37057) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_ROW - } else if Xsqlite3_stricmp(tls, zCopy, ts+36892) == 0 { + } else if Xsqlite3_stricmp(tls, zCopy, ts+37061) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36901 /* "fts5vocab: unkno..." */, libc.VaList(bp, zCopy)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37070, libc.VaList(bp, zCopy)) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) @@ -192957,14 +193200,14 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint } // The xDisconnect() virtual table method. -func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:236465:12: */ +func fts5VocabDisconnectMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:236509:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK } // The xDestroy() virtual table method. -func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:236474:12: */ +func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:236518:12: */ var pTab uintptr = pVtab Xsqlite3_free(tls, pTab) return SQLITE_OK @@ -192989,24 +193232,24 @@ func fts5VocabDestroyMethod(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:2 // argv[3] -> name of fts5 tables database // argv[4] -> name of fts5 table // argv[5] -> type of fts5vocab table -func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:236501:12: */ +func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:236545:12: */ bp := tls.Alloc(20) defer tls.Free(20) *(*[3]uintptr)(unsafe.Pointer(bp + 4 /* azSchema */)) = [3]uintptr{ - ts + 36935, /* "CREATE TABlE voc..." */ - ts + 36975, /* "CREATE TABlE voc..." */ - ts + 37010, /* "CREATE TABlE voc..." */ + ts + 37104, + ts + 37144, + ts + 37179, } var pRet uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK // Return code var bDb int32 - bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+22922, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) + bDb = libc.Bool32(argc == 6 && libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*4))) == Size_t(4) && libc.Xmemcmp(tls, ts+23091, *(*uintptr)(unsafe.Pointer(argv + 1*4)), uint32(4)) == 0) if argc != 5 && bDb == 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37053 /* "wrong number of ..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+37222, 0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else { var nByte int32 // Bytes of space to allocate @@ -193032,14 +193275,14 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv var nTab int32 = int32(libc.Xstrlen(tls, zTab)) + 1 *(*int32)(unsafe.Pointer(bp /* eType */)) = 0 - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5VocabTableType(tls, zType, pzErr, bp /* &eType */) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5VocabTableType(tls, zType, pzErr, bp) if *(*int32)(unsafe.Pointer(bp + 16)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_declare_vtab(tls, db, *(*uintptr)(unsafe.Pointer(bp + 4 /* &azSchema[0] */ + uintptr(*(*int32)(unsafe.Pointer(bp /* eType */)))*4))) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_declare_vtab(tls, db, *(*uintptr)(unsafe.Pointer(bp + 4 + uintptr(*(*int32)(unsafe.Pointer(bp /* eType */)))*4))) } nByte = int32(uint32(unsafe.Sizeof(Fts5VocabTable{})) + uint32(nDb) + uint32(nTab)) - pRet = sqlite3Fts5MallocZero(tls, bp+16 /* &rc */, int64(nByte)) + pRet = sqlite3Fts5MallocZero(tls, bp+16, int64(nByte)) if pRet != 0 { (*Fts5VocabTable)(unsafe.Pointer(pRet)).FpGlobal = pAux (*Fts5VocabTable)(unsafe.Pointer(pRet)).FeType = *(*int32)(unsafe.Pointer(bp /* eType */)) @@ -193059,11 +193302,11 @@ func fts5VocabInitVtab(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv // The xConnect() and xCreate() methods for the virtual table. All the // work is done in function fts5VocabInitVtab(). -func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:236563:12: */ +func fts5VocabConnectMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:236607:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } -func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:236573:12: */ +func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:236617:12: */ return fts5VocabInitVtab(tls, db, pAux, argc, argv, ppVtab, pzErr) } @@ -193077,7 +193320,7 @@ func fts5VocabCreateMethod(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, // // are interpreted. Less-than and less-than-or-equal are treated // identically, as are greater-than and greater-than-or-equal. -func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:236596:12: */ +func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int32 { /* sqlite3.c:236640:12: */ var i int32 var iTermEq int32 = -1 var iTermGe int32 = -1 @@ -193145,7 +193388,7 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int } // Implementation of xOpen method. -func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:236658:12: */ +func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:236702:12: */ bp := tls.Alloc(72) defer tls.Free(72) @@ -193158,14 +193401,14 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37086 /* "recursive defini..." */, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37255, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } - zSql = sqlite3Fts5Mprintf(tls, bp+64, /* &rc */ - ts+37117, /* "SELECT t.%Q FROM..." */ + zSql = sqlite3Fts5Mprintf(tls, bp+64, + ts+37286, libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68 /* &pStmt */, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+68, uintptr(0)) } Xsqlite3_free(tls, zSql) @@ -193186,7 +193429,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* *(*uintptr)(unsafe.Pointer(bp + 68 /* pStmt */)) = uintptr(0) if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37168 /* "no such fts5 tab..." */, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + ts+37337, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { @@ -193196,7 +193439,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* if *(*int32)(unsafe.Pointer(bp + 64)) == SQLITE_OK { var nByte I64 = I64(uint32((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pFts5)).FpConfig)).FnCol)*uint32(unsafe.Sizeof(I64(0)))*uint32(2) + uint32(unsafe.Sizeof(Fts5VocabCursor{}))) - pCsr = sqlite3Fts5MallocZero(tls, bp+64 /* &rc */, nByte) + pCsr = sqlite3Fts5MallocZero(tls, bp+64, nByte) } if pCsr != 0 { @@ -193212,7 +193455,7 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } -func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:236726:13: */ +func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:236770:13: */ (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid = int64(0) sqlite3Fts5IterClose(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter) sqlite3Fts5StructureRelease(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStruct) @@ -193226,7 +193469,7 @@ func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:236726:13: // Close the cursor. For additional information see the documentation // on the xClose method of the virtual table interface. -func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:236742:12: */ +func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:236786:12: */ var pCsr uintptr = pCursor fts5VocabResetCursor(tls, pCsr) sqlite3Fts5BufferFree(tls, pCsr+52) @@ -193235,7 +193478,7 @@ func fts5VocabCloseMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:2 return SQLITE_OK } -func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:236751:12: */ +func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:236795:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -193247,7 +193490,7 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: var zTerm uintptr // var nTerm int32 at bp, 4 - zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp /* &nTerm */) + zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp) if (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm >= 0 { var nCmp int32 = func() int32 { if *(*int32)(unsafe.Pointer(bp)) < (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm { @@ -193261,12 +193504,12 @@ func fts5VocabInstanceNewTerm(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c: } } - sqlite3Fts5BufferSet(tls, bp+4 /* &rc */, pCsr+52, *(*int32)(unsafe.Pointer(bp /* nTerm */)), zTerm) + sqlite3Fts5BufferSet(tls, bp+4, pCsr+52, *(*int32)(unsafe.Pointer(bp /* nTerm */)), zTerm) } return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } -func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:236773:12: */ +func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:236817:12: */ var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var rc int32 = SQLITE_OK var pIter uintptr = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter @@ -193295,7 +193538,7 @@ func fts5VocabInstanceNext(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:236 } // Advance the cursor to the next row in the table. -func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:236805:12: */ +func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:236849:12: */ bp := tls.Alloc(20) defer tls.Free(20) @@ -193329,7 +193572,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 var zTerm uintptr // var nTerm int32 at bp, 4 - zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp /* &nTerm */) + zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp) if (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm >= 0 { var nCmp int32 = func() int32 { @@ -193345,7 +193588,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } } - sqlite3Fts5BufferSet(tls, bp+4 /* &rc */, pCsr+52, *(*int32)(unsafe.Pointer(bp /* nTerm */)), zTerm) + sqlite3Fts5BufferSet(tls, bp+4, pCsr+52, *(*int32)(unsafe.Pointer(bp /* nTerm */)), zTerm) libc.Xmemset(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt, 0, uint32(nCol)*uint32(unsafe.Sizeof(I64(0)))) libc.Xmemset(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc, 0, uint32(nCol)*uint32(unsafe.Sizeof(I64(0)))) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FiCol = 0 @@ -193415,7 +193658,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } if *(*int32)(unsafe.Pointer(bp + 4)) == SQLITE_OK { - zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp /* &nTerm */) + zTerm = sqlite3Fts5IterTerm(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpIter, bp) if *(*int32)(unsafe.Pointer(bp)) != (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Fterm.Fn || *(*int32)(unsafe.Pointer(bp)) > 0 && libc.Xmemcmp(tls, zTerm, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Fterm.Fp, uint32(*(*int32)(unsafe.Pointer(bp)))) != 0 { break @@ -193439,7 +193682,7 @@ func fts5VocabNextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:23 } // This is the xFilter implementation for the virtual table. -func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:236933:12: */ +func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused uintptr, nUnused int32, apVal uintptr) int32 { /* sqlite3.c:236977:12: */ var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab var pCsr uintptr = pCursor var eType int32 = (*Fts5VocabTable)(unsafe.Pointer(pTab)).FeType @@ -193480,7 +193723,7 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused if pLe != 0 { var zCopy uintptr = Xsqlite3_value_text(tls, pLe) if zCopy == uintptr(0) { - zCopy = ts + 1543 /* "" */ + zCopy = ts + 1565 /* "" */ } (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm = Xsqlite3_value_bytes(tls, pLe) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FzLeTerm = Xsqlite3_malloc(tls, (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FnLeTerm+1) @@ -193513,12 +193756,12 @@ func fts5VocabFilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, zUnused // This is the xEof method of the virtual table. SQLite calls this // routine to find out if it has reached the end of a result set. -func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:237007:12: */ +func fts5VocabEofMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:237051:12: */ var pCsr uintptr = pCursor return (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FbEof } -func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:237012:12: */ +func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol int32) int32 { /* sqlite3.c:237056:12: */ var pCsr uintptr = pCursor var eDetail int32 = (*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5)).FpConfig)).FeDetail var eType int32 = (*Fts5VocabTable)(unsafe.Pointer((*Sqlite3_vtab_cursor)(unsafe.Pointer(pCursor)).FpVtab)).FeType @@ -193591,16 +193834,16 @@ func fts5VocabColumnMethod(tls *libc.TLS, pCursor uintptr, pCtx uintptr, iCol in // This is the xRowid method. The SQLite core calls this routine to // retrieve the rowid for the current row of the result set. The // rowid should be written to *pRowid. -func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:237084:12: */ +func fts5VocabRowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* sqlite3.c:237128:12: */ var pCsr uintptr = pCursor *(*Sqlite_int64)(unsafe.Pointer(pRowid)) = (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).Frowid return SQLITE_OK } -func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:237093:12: */ +func sqlite3Fts5VocabInit(tls *libc.TLS, pGlobal uintptr, db uintptr) int32 { /* sqlite3.c:237137:12: */ var p uintptr = pGlobal - return Xsqlite3_create_module_v2(tls, db, ts+37194 /* "fts5vocab" */, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) + return Xsqlite3_create_module_v2(tls, db, ts+37363, uintptr(unsafe.Pointer(&fts5Vocab)), p, uintptr(0)) } var fts5Vocab = Sqlite3_module{ @@ -193617,7 +193860,7 @@ var fts5Vocab = Sqlite3_module{ /* xEof */ FxEof: 0, /* xColumn */ FxColumn: 0, /* xRowid */ FxRowid: 0, -} /* sqlite3.c:237094:31 */ +} /* sqlite3.c:237138:31 */ //************* End of fts5.c *********************************************** //************* Begin file stmt.c ******************************************* @@ -193644,898 +193887,952 @@ var fts5Vocab = Sqlite3_module{ //************* End of stmt.c *********************************************** // Return the source-id for this library -func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:237434:23: */ - return ts + 37204 /* "2021-11-27 14:13..." */ +func Xsqlite3_sourceid(tls *libc.TLS) uintptr { /* sqlite3.c:237478:23: */ + return ts + 37373 /* "2022-01-06 13:25..." */ } //************************* End of sqlite3.c ***************************** func init() { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21341:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21342:51: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21340:51: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = jsonArrayStep // sqlite3.c:193849:7: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 12)) = jsonArrayFinal // sqlite3.c:193849:24: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 16)) = jsonArrayValue // sqlite3.c:193849:41: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 28)) = jsonObjectStep // sqlite3.c:193851:7: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 32)) = jsonObjectFinal // sqlite3.c:193851:24: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 36)) = jsonObjectValue // sqlite3.c:193851:41: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg1)) + 0)) = geopolyBBoxStep // sqlite3.c:200103:8: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg1)) + 4)) = geopolyBBoxFinal // sqlite3.c:200103:25: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 16)) = renameColumnFunc // sqlite3.c:110206:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 56)) = renameTableFunc // sqlite3.c:110207:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableTest // sqlite3.c:110208:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 136)) = dropColumnFunc // sqlite3.c:110209:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 176)) = renameQuotefixFunc // sqlite3.c:110210:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 16)) = versionFunc // sqlite3.c:122368:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 56)) = versionFunc // sqlite3.c:122369:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:122370:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 136)) = versionFunc // sqlite3.c:122371:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 176)) = soundexFunc // sqlite3.c:122375:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 216)) = loadExt // sqlite3.c:122378:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 256)) = loadExt // sqlite3.c:122379:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 296)) = compileoptionusedFunc // sqlite3.c:122385:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 336)) = compileoptiongetFunc // sqlite3.c:122386:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 376)) = versionFunc // sqlite3.c:122388:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 416)) = versionFunc // sqlite3.c:122389:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = versionFunc // sqlite3.c:122390:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 496)) = versionFunc // sqlite3.c:122392:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 536)) = trimFunc // sqlite3.c:122395:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 576)) = trimFunc // sqlite3.c:122396:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 616)) = trimFunc // sqlite3.c:122397:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 656)) = trimFunc // sqlite3.c:122398:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 696)) = trimFunc // sqlite3.c:122399:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 736)) = trimFunc // sqlite3.c:122400:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 776)) = minmaxFunc // sqlite3.c:122401:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 856)) = minmaxStep // sqlite3.c:122403:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 860)) = minMaxFinalize // sqlite3.c:122403:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 864)) = minMaxValue // sqlite3.c:122403:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 896)) = minmaxFunc // sqlite3.c:122405:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 976)) = minmaxStep // sqlite3.c:122407:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 980)) = minMaxFinalize // sqlite3.c:122407:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 984)) = minMaxValue // sqlite3.c:122407:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1016)) = typeofFunc // sqlite3.c:122409:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1056)) = lengthFunc // sqlite3.c:122410:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1096)) = instrFunc // sqlite3.c:122411:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1136)) = printfFunc // sqlite3.c:122412:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = unicodeFunc // sqlite3.c:122413:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1216)) = charFunc // sqlite3.c:122414:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1256)) = absFunc // sqlite3.c:122415:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1296)) = roundFunc // sqlite3.c:122417:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1336)) = roundFunc // sqlite3.c:122418:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1376)) = upperFunc // sqlite3.c:122420:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1416)) = lowerFunc // sqlite3.c:122421:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = hexFunc // sqlite3.c:122422:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = versionFunc // sqlite3.c:122423:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = randomFunc // sqlite3.c:122424:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = randomBlob // sqlite3.c:122425:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = nullifFunc // sqlite3.c:122426:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = versionFunc // sqlite3.c:122427:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = sourceidFunc // sqlite3.c:122428:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = errlogFunc // sqlite3.c:122429:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = quoteFunc // sqlite3.c:122430:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = last_insert_rowid // sqlite3.c:122431:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = changes // sqlite3.c:122432:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = total_changes // sqlite3.c:122433:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = replaceFunc // sqlite3.c:122434:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = zeroblobFunc // sqlite3.c:122435:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = substrFunc // sqlite3.c:122436:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = substrFunc // sqlite3.c:122437:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc // sqlite3.c:122438:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc // sqlite3.c:122439:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = sumStep // sqlite3.c:122440:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2180)) = sumFinalize // sqlite3.c:122440:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = sumFinalize // sqlite3.c:122440:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2188)) = sumInverse // sqlite3.c:122440:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = sumStep // sqlite3.c:122441:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2220)) = totalFinalize // sqlite3.c:122441:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2224)) = totalFinalize // sqlite3.c:122441:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2228)) = sumInverse // sqlite3.c:122441:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep // sqlite3.c:122442:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = avgFinalize // sqlite3.c:122442:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = avgFinalize // sqlite3.c:122442:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse // sqlite3.c:122442:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = countStep // sqlite3.c:122443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = countFinalize // sqlite3.c:122443:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = countFinalize // sqlite3.c:122443:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = countInverse // sqlite3.c:122443:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = countStep // sqlite3.c:122446:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = countFinalize // sqlite3.c:122446:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = countFinalize // sqlite3.c:122446:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = countInverse // sqlite3.c:122446:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = groupConcatStep // sqlite3.c:122448:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = groupConcatFinalize // sqlite3.c:122448:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = groupConcatValue // sqlite3.c:122448:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = groupConcatInverse // sqlite3.c:122448:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = groupConcatStep // sqlite3.c:122450:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = groupConcatFinalize // sqlite3.c:122450:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = groupConcatValue // sqlite3.c:122450:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = groupConcatInverse // sqlite3.c:122450:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2448 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:122453:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = likeFunc // sqlite3.c:122453:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2488 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:122458:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = likeFunc // sqlite3.c:122458:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:122459:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc // sqlite3.c:122459:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2656)) = signFunc // sqlite3.c:122502:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2696)) = versionFunc // sqlite3.c:122503:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = versionFunc // sqlite3.c:122504:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23895:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 16)) = juliandayFunc // sqlite3.c:23895:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23896:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 56)) = dateFunc // sqlite3.c:23896:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 88 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23897:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = timeFunc // sqlite3.c:23897:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 128 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23898:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 136)) = datetimeFunc // sqlite3.c:23898:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23899:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 176)) = strftimeFunc // sqlite3.c:23899:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 216)) = ctimeFunc // sqlite3.c:23900:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 256)) = ctimestampFunc // sqlite3.c:23901:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296)) = cdateFunc // sqlite3.c:23902:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 12)) = jsonRemoveFunc // sqlite3.c:193819:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 28)) = jsonArrayFunc // sqlite3.c:193820:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 44)) = jsonArrayLengthFunc // sqlite3.c:193821:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 60)) = jsonArrayLengthFunc // sqlite3.c:193822:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 76)) = jsonExtractFunc // sqlite3.c:193823:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 92)) = jsonSetFunc // sqlite3.c:193824:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 108)) = jsonObjectFunc // sqlite3.c:193825:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 124)) = jsonPatchFunc // sqlite3.c:193826:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 140)) = jsonQuoteFunc // sqlite3.c:193827:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 156)) = jsonRemoveFunc // sqlite3.c:193828:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 172)) = jsonReplaceFunc // sqlite3.c:193829:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 188)) = jsonSetFunc // sqlite3.c:193830:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 204)) = jsonTypeFunc // sqlite3.c:193831:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 220)) = jsonTypeFunc // sqlite3.c:193832:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 236)) = jsonValidFunc // sqlite3.c:193833:39: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 0)) = geopolyAreaFunc // sqlite3.c:200085:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 12)) = geopolyBlobFunc // sqlite3.c:200086:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 24)) = geopolyJsonFunc // sqlite3.c:200087:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 36)) = geopolySvgFunc // sqlite3.c:200088:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 48)) = geopolyWithinFunc // sqlite3.c:200089:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 60)) = geopolyContainsPointFunc // sqlite3.c:200090:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 72)) = geopolyOverlapFunc // sqlite3.c:200091:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 84)) = geopolyDebugFunc // sqlite3.c:200092:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 96)) = geopolyBBoxFunc // sqlite3.c:200093:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 108)) = geopolyXformFunc // sqlite3.c:200094:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 120)) = geopolyRegularFunc // sqlite3.c:200095:8: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 132)) = geopolyCcwFunc // sqlite3.c:200096:8: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 4 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:193858:31: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 12 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:193859:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aEQb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 210 // sqlite3.c:21343:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aGTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 216 // sqlite3.c:21344:51: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&Xsqlite3aLTb)) + 0)) = uintptr(unsafe.Pointer(&Xsqlite3UpperToLower)) + 204 // sqlite3.c:21342:51: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 8)) = jsonArrayStep // sqlite3.c:193889:7: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 12)) = jsonArrayFinal // sqlite3.c:193889:24: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 16)) = jsonArrayValue // sqlite3.c:193889:41: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 28)) = jsonObjectStep // sqlite3.c:193891:7: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 32)) = jsonObjectFinal // sqlite3.c:193891:24: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg)) + 36)) = jsonObjectValue // sqlite3.c:193891:41: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg1)) + 0)) = geopolyBBoxStep // sqlite3.c:200143:8: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAgg1)) + 4)) = geopolyBBoxFinal // sqlite3.c:200143:25: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 16)) = renameColumnFunc // sqlite3.c:110216:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 56)) = renameTableFunc // sqlite3.c:110217:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 96)) = renameTableTest // sqlite3.c:110218:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 136)) = dropColumnFunc // sqlite3.c:110219:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aAlterTableFuncs)) + 176)) = renameQuotefixFunc // sqlite3.c:110220:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 16)) = versionFunc // sqlite3.c:122378:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 56)) = versionFunc // sqlite3.c:122379:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 96)) = versionFunc // sqlite3.c:122380:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 136)) = versionFunc // sqlite3.c:122381:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 176)) = soundexFunc // sqlite3.c:122385:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 216)) = loadExt // sqlite3.c:122388:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 256)) = loadExt // sqlite3.c:122389:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 296)) = compileoptionusedFunc // sqlite3.c:122395:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 336)) = compileoptiongetFunc // sqlite3.c:122396:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 376)) = versionFunc // sqlite3.c:122398:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 416)) = versionFunc // sqlite3.c:122399:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 456)) = versionFunc // sqlite3.c:122400:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 496)) = versionFunc // sqlite3.c:122402:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 536)) = trimFunc // sqlite3.c:122405:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 576)) = trimFunc // sqlite3.c:122406:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 616)) = trimFunc // sqlite3.c:122407:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 656)) = trimFunc // sqlite3.c:122408:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 696)) = trimFunc // sqlite3.c:122409:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 736)) = trimFunc // sqlite3.c:122410:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 776)) = minmaxFunc // sqlite3.c:122411:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 856)) = minmaxStep // sqlite3.c:122413:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 860)) = minMaxFinalize // sqlite3.c:122413:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 864)) = minMaxValue // sqlite3.c:122413:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 896)) = minmaxFunc // sqlite3.c:122415:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 976)) = minmaxStep // sqlite3.c:122417:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 980)) = minMaxFinalize // sqlite3.c:122417:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 984)) = minMaxValue // sqlite3.c:122417:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1016)) = typeofFunc // sqlite3.c:122419:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1056)) = lengthFunc // sqlite3.c:122420:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1096)) = instrFunc // sqlite3.c:122421:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1136)) = printfFunc // sqlite3.c:122422:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1176)) = unicodeFunc // sqlite3.c:122423:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1216)) = charFunc // sqlite3.c:122424:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1256)) = absFunc // sqlite3.c:122425:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1296)) = roundFunc // sqlite3.c:122427:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1336)) = roundFunc // sqlite3.c:122428:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1376)) = upperFunc // sqlite3.c:122430:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1416)) = lowerFunc // sqlite3.c:122431:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1456)) = hexFunc // sqlite3.c:122432:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1496)) = versionFunc // sqlite3.c:122433:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1536)) = randomFunc // sqlite3.c:122434:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1576)) = randomBlob // sqlite3.c:122435:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1616)) = nullifFunc // sqlite3.c:122436:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1656)) = versionFunc // sqlite3.c:122437:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1696)) = sourceidFunc // sqlite3.c:122438:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1736)) = errlogFunc // sqlite3.c:122439:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1776)) = quoteFunc // sqlite3.c:122440:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1816)) = last_insert_rowid // sqlite3.c:122441:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1856)) = changes // sqlite3.c:122442:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1896)) = total_changes // sqlite3.c:122443:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1936)) = replaceFunc // sqlite3.c:122444:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 1976)) = zeroblobFunc // sqlite3.c:122445:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2016)) = substrFunc // sqlite3.c:122446:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2056)) = substrFunc // sqlite3.c:122447:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2096)) = substrFunc // sqlite3.c:122448:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2136)) = substrFunc // sqlite3.c:122449:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2176)) = sumStep // sqlite3.c:122450:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2180)) = sumFinalize // sqlite3.c:122450:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2184)) = sumFinalize // sqlite3.c:122450:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2188)) = sumInverse // sqlite3.c:122450:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2216)) = sumStep // sqlite3.c:122451:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2220)) = totalFinalize // sqlite3.c:122451:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2224)) = totalFinalize // sqlite3.c:122451:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2228)) = sumInverse // sqlite3.c:122451:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2256)) = sumStep // sqlite3.c:122452:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2260)) = avgFinalize // sqlite3.c:122452:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2264)) = avgFinalize // sqlite3.c:122452:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2268)) = sumInverse // sqlite3.c:122452:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2296)) = countStep // sqlite3.c:122453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2300)) = countFinalize // sqlite3.c:122453:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2304)) = countFinalize // sqlite3.c:122453:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2308)) = countInverse // sqlite3.c:122453:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2336)) = countStep // sqlite3.c:122456:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2340)) = countFinalize // sqlite3.c:122456:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2344)) = countFinalize // sqlite3.c:122456:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2348)) = countInverse // sqlite3.c:122456:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2376)) = groupConcatStep // sqlite3.c:122458:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2380)) = groupConcatFinalize // sqlite3.c:122458:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2384)) = groupConcatValue // sqlite3.c:122458:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2388)) = groupConcatInverse // sqlite3.c:122458:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2416)) = groupConcatStep // sqlite3.c:122460:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2420)) = groupConcatFinalize // sqlite3.c:122460:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2424)) = groupConcatValue // sqlite3.c:122460:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2428)) = groupConcatInverse // sqlite3.c:122460:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2448 /* .pUserData */)) = uintptr(unsafe.Pointer(&globInfo)) // sqlite3.c:122463:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2456)) = likeFunc // sqlite3.c:122463:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2488 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:122468:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2496)) = likeFunc // sqlite3.c:122468:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2528 /* .pUserData */)) = uintptr(unsafe.Pointer(&likeInfoNorm)) // sqlite3.c:122469:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2536)) = likeFunc // sqlite3.c:122469:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2648)) = xCeil // sqlite3.c:122477:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2656)) = ceilingFunc // sqlite3.c:122477:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2688)) = xCeil // sqlite3.c:122478:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2696)) = ceilingFunc // sqlite3.c:122478:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2728)) = xFloor // sqlite3.c:122479:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2736)) = ceilingFunc // sqlite3.c:122479:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2768)) = libc.Xtrunc // sqlite3.c:122481:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2776)) = ceilingFunc // sqlite3.c:122481:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2816)) = logFunc // sqlite3.c:122483:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2856)) = logFunc // sqlite3.c:122484:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2896)) = logFunc // sqlite3.c:122485:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2936)) = logFunc // sqlite3.c:122486:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 2976)) = logFunc // sqlite3.c:122487:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3008)) = libc.Xexp // sqlite3.c:122488:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3016)) = math1Func // sqlite3.c:122488:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3048)) = libc.Xpow // sqlite3.c:122489:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3056)) = math2Func // sqlite3.c:122489:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3088)) = libc.Xpow // sqlite3.c:122490:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3096)) = math2Func // sqlite3.c:122490:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3128)) = libc.Xfmod // sqlite3.c:122491:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3136)) = math2Func // sqlite3.c:122491:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3168)) = libc.Xacos // sqlite3.c:122492:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3176)) = math1Func // sqlite3.c:122492:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3208)) = libc.Xasin // sqlite3.c:122493:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3216)) = math1Func // sqlite3.c:122493:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3248)) = libc.Xatan // sqlite3.c:122494:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3256)) = math1Func // sqlite3.c:122494:5: + *(*func(*libc.TLS, float64, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3288)) = libc.Xatan2 // sqlite3.c:122495:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3296)) = math2Func // sqlite3.c:122495:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3328)) = libc.Xcos // sqlite3.c:122496:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3336)) = math1Func // sqlite3.c:122496:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3368)) = libc.Xsin // sqlite3.c:122497:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3376)) = math1Func // sqlite3.c:122497:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3408)) = libc.Xtan // sqlite3.c:122498:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3416)) = math1Func // sqlite3.c:122498:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3448)) = libc.Xcosh // sqlite3.c:122499:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3456)) = math1Func // sqlite3.c:122499:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3488)) = libc.Xsinh // sqlite3.c:122500:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3496)) = math1Func // sqlite3.c:122500:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3528)) = libc.Xtanh // sqlite3.c:122501:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3536)) = math1Func // sqlite3.c:122501:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3568)) = libc.Xacosh // sqlite3.c:122503:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3576)) = math1Func // sqlite3.c:122503:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3608)) = libc.Xasinh // sqlite3.c:122504:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3616)) = math1Func // sqlite3.c:122504:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3648)) = libc.Xatanh // sqlite3.c:122505:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3656)) = math1Func // sqlite3.c:122505:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3688)) = libc.Xsqrt // sqlite3.c:122507:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3696)) = math1Func // sqlite3.c:122507:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3728)) = degToRad // sqlite3.c:122508:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3736)) = math1Func // sqlite3.c:122508:5: + *(*func(*libc.TLS, float64) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3768)) = radToDeg // sqlite3.c:122509:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3776)) = math1Func // sqlite3.c:122509:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3816)) = piFunc // sqlite3.c:122510:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3856)) = signFunc // sqlite3.c:122512:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3896)) = versionFunc // sqlite3.c:122513:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aBuiltinFunc)) + 3936)) = versionFunc // sqlite3.c:122514:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 8 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23897:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 16)) = juliandayFunc // sqlite3.c:23897:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 48 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23898:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 56)) = dateFunc // sqlite3.c:23898:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 88 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23899:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 96)) = timeFunc // sqlite3.c:23899:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 128 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23900:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 136)) = datetimeFunc // sqlite3.c:23900:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 168 /* .pUserData */)) = uintptr(unsafe.Pointer(&Xsqlite3Config)) // sqlite3.c:23901:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 176)) = strftimeFunc // sqlite3.c:23901:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 216)) = ctimeFunc // sqlite3.c:23902:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 256)) = ctimestampFunc // sqlite3.c:23903:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aDateTimeFuncs)) + 296)) = cdateFunc // sqlite3.c:23904:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 12)) = jsonRemoveFunc // sqlite3.c:193859:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 28)) = jsonArrayFunc // sqlite3.c:193860:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 44)) = jsonArrayLengthFunc // sqlite3.c:193861:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 60)) = jsonArrayLengthFunc // sqlite3.c:193862:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 76)) = jsonExtractFunc // sqlite3.c:193863:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 92)) = jsonSetFunc // sqlite3.c:193864:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 108)) = jsonObjectFunc // sqlite3.c:193865:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 124)) = jsonPatchFunc // sqlite3.c:193866:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 140)) = jsonQuoteFunc // sqlite3.c:193867:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 156)) = jsonRemoveFunc // sqlite3.c:193868:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 172)) = jsonReplaceFunc // sqlite3.c:193869:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 188)) = jsonSetFunc // sqlite3.c:193870:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 204)) = jsonTypeFunc // sqlite3.c:193871:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 220)) = jsonTypeFunc // sqlite3.c:193872:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc)) + 236)) = jsonValidFunc // sqlite3.c:193873:39: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 0)) = geopolyAreaFunc // sqlite3.c:200125:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 12)) = geopolyBlobFunc // sqlite3.c:200126:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 24)) = geopolyJsonFunc // sqlite3.c:200127:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 36)) = geopolySvgFunc // sqlite3.c:200128:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 48)) = geopolyWithinFunc // sqlite3.c:200129:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 60)) = geopolyContainsPointFunc // sqlite3.c:200130:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 72)) = geopolyOverlapFunc // sqlite3.c:200131:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 84)) = geopolyDebugFunc // sqlite3.c:200132:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 96)) = geopolyBBoxFunc // sqlite3.c:200133:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 108)) = geopolyXformFunc // sqlite3.c:200134:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 120)) = geopolyRegularFunc // sqlite3.c:200135:8: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFunc1)) + 132)) = geopolyCcwFunc // sqlite3.c:200136:8: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 4 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonEachModule)) // sqlite3.c:193898:31: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aMod)) + 12 /* .pModule */)) = uintptr(unsafe.Pointer(&jsonTreeModule)) // sqlite3.c:193899:31: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 4 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, int32) int32 - }{posixOpen})) // sqlite3.c:34623:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:34626:21: + }{posixOpen})) // sqlite3.c:34625:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 16 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, int32) int32 }{libc.Xclose})) // sqlite3.c:34628:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 28 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32) int32 - }{libc.Xaccess})) // sqlite3.c:34629:21: + }{libc.Xaccess})) // sqlite3.c:34631:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 40 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) uintptr - }{libc.Xgetcwd})) // sqlite3.c:34632:21: + }{libc.Xgetcwd})) // sqlite3.c:34634:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 52 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xstat})) // sqlite3.c:34635:21: + }{libc.Xstat})) // sqlite3.c:34637:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 64 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr) int32 - }{libc.Xfstat})) // sqlite3.c:34648:21: + }{libc.Xfstat})) // sqlite3.c:34650:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 76 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__off64_t) int32 - }{libc.Xftruncate})) // sqlite3.c:34652:21: + }{libc.Xftruncate})) // sqlite3.c:34654:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 88 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, int32, uintptr) int32 - }{libc.Xfcntl})) // sqlite3.c:34655:21: + }{libc.Xfcntl})) // sqlite3.c:34657:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 100 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xread})) // sqlite3.c:34658:21: + }{libc.Xread})) // sqlite3.c:34660:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 136 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, uintptr, Size_t) Ssize_t - }{libc.Xwrite})) // sqlite3.c:34675:21: + }{libc.Xwrite})) // sqlite3.c:34677:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 172 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__mode_t) int32 - }{libc.Xfchmod})) // sqlite3.c:34694:21: + }{libc.Xfchmod})) // sqlite3.c:34696:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 196 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xunlink})) // sqlite3.c:34704:21: + }{libc.Xunlink})) // sqlite3.c:34706:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 208 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{openDirectory})) // sqlite3.c:34707:25: + }{openDirectory})) // sqlite3.c:34709:25: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 220 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, X__mode_t) int32 - }{libc.Xmkdir})) // sqlite3.c:34710:21: + }{libc.Xmkdir})) // sqlite3.c:34712:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 232 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) int32 - }{libc.Xrmdir})) // sqlite3.c:34713:21: + }{libc.Xrmdir})) // sqlite3.c:34715:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 244 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, int32, X__uid_t, X__gid_t) int32 - }{libc.Xfchown})) // sqlite3.c:34717:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:34724:21: + }{libc.Xfchown})) // sqlite3.c:34719:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 256 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) X__uid_t }{libc.Xgeteuid})) // sqlite3.c:34726:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 268 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, int32, int32, int32, X__off64_t) uintptr - }{libc.Xmmap})) // sqlite3.c:34731:21: + }{libc.Xmmap})) // sqlite3.c:34733:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 280 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t) int32 - }{libc.Xmunmap})) // sqlite3.c:34738:21: + }{libc.Xmunmap})) // sqlite3.c:34740:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 292 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, Size_t, Size_t, int32, uintptr) uintptr - }{libc.Xmremap})) // sqlite3.c:34745:21: - *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:34752:21: + }{libc.Xmremap})) // sqlite3.c:34747:21: + *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 304 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS) int32 }{unixGetpagesize})) // sqlite3.c:34754:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 316 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr, Size_t) Ssize_t - }{libc.Xreadlink})) // sqlite3.c:34759:21: + }{libc.Xreadlink})) // sqlite3.c:34761:21: *(*Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 328 /* .pCurrent */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 - }{libc.Xlstat})) // sqlite3.c:34766:22: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 20 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 24)) = unixOpen // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 28)) = unixDelete // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32)) = unixAccess // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 36)) = unixFullPathname // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixDlOpen // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 44)) = unixDlError // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDlSym // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 52)) = unixDlClose // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixRandomness // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 60)) = unixSleep // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixCurrentTime // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 68)) = unixGetLastError // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixCurrentTimeInt64 // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 76)) = unixSetSystemCall // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixGetSystemCall // sqlite3.c:42295:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 84)) = unixNextSystemCall // sqlite3.c:42295:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 108 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixOpen // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 116)) = unixDelete // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixAccess // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 124)) = unixFullPathname // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixDlOpen // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 132)) = unixDlError // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixDlSym // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 140)) = unixDlClose // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixRandomness // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 148)) = unixSleep // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixCurrentTime // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 156)) = unixGetLastError // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixCurrentTimeInt64 // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 164)) = unixSetSystemCall // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 168)) = unixGetSystemCall // sqlite3.c:42297:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 172)) = unixNextSystemCall // sqlite3.c:42297:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 196 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200)) = unixOpen // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 204)) = unixDelete // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixAccess // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 212)) = unixFullPathname // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDlOpen // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 220)) = unixDlError // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixDlSym // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 228)) = unixDlClose // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixRandomness // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 236)) = unixSleep // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixCurrentTime // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 244)) = unixGetLastError // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixCurrentTimeInt64 // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 252)) = unixSetSystemCall // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixGetSystemCall // sqlite3.c:42298:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 260)) = unixNextSystemCall // sqlite3.c:42298:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 284 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixOpen // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 292)) = unixDelete // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixAccess // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 300)) = unixFullPathname // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixDlOpen // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 308)) = unixDlError // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixDlSym // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 316)) = unixDlClose // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixRandomness // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 324)) = unixSleep // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixCurrentTime // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 332)) = unixGetLastError // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 336)) = unixCurrentTimeInt64 // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 340)) = unixSetSystemCall // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 344)) = unixGetSystemCall // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 348)) = unixNextSystemCall // sqlite3.c:42299:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 16)) = row_numberStepFunc // sqlite3.c:156935:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 20)) = row_numberValueFunc // sqlite3.c:156935:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberValueFunc // sqlite3.c:156935:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 28)) = noopStepFunc // sqlite3.c:156935:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:156935:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56)) = dense_rankStepFunc // sqlite3.c:156936:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 60)) = dense_rankValueFunc // sqlite3.c:156936:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 64)) = dense_rankValueFunc // sqlite3.c:156936:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 68)) = noopStepFunc // sqlite3.c:156936:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 72 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:156936:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = rankStepFunc // sqlite3.c:156937:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 100)) = rankValueFunc // sqlite3.c:156937:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = rankValueFunc // sqlite3.c:156937:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 108)) = noopStepFunc // sqlite3.c:156937:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:156937:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 136)) = percent_rankStepFunc // sqlite3.c:156938:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 140)) = percent_rankValueFunc // sqlite3.c:156938:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 144)) = percent_rankValueFunc // sqlite3.c:156938:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 148)) = percent_rankInvFunc // sqlite3.c:156938:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 152 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:156938:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = cume_distStepFunc // sqlite3.c:156939:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 180)) = cume_distValueFunc // sqlite3.c:156939:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = cume_distValueFunc // sqlite3.c:156939:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 188)) = cume_distInvFunc // sqlite3.c:156939:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:156939:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 216)) = ntileStepFunc // sqlite3.c:156940:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 220)) = ntileValueFunc // sqlite3.c:156940:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 224)) = ntileValueFunc // sqlite3.c:156940:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 228)) = ntileInvFunc // sqlite3.c:156940:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 232 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:156940:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = last_valueStepFunc // sqlite3.c:156941:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 260)) = last_valueFinalizeFunc // sqlite3.c:156941:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = last_valueValueFunc // sqlite3.c:156941:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 268)) = last_valueInvFunc // sqlite3.c:156941:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:156941:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 296)) = nth_valueStepFunc // sqlite3.c:156942:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 300)) = nth_valueFinalizeFunc // sqlite3.c:156942:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 304)) = noopValueFunc // sqlite3.c:156942:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 308)) = noopStepFunc // sqlite3.c:156942:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:156942:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = first_valueStepFunc // sqlite3.c:156943:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 340)) = first_valueFinalizeFunc // sqlite3.c:156943:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344)) = noopValueFunc // sqlite3.c:156943:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 348)) = noopStepFunc // sqlite3.c:156943:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 352 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:156943:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 376)) = noopStepFunc // sqlite3.c:156944:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 380)) = noopValueFunc // sqlite3.c:156944:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = noopValueFunc // sqlite3.c:156944:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 388)) = noopStepFunc // sqlite3.c:156944:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:156944:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416)) = noopStepFunc // sqlite3.c:156945:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 420)) = noopValueFunc // sqlite3.c:156945:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 424)) = noopValueFunc // sqlite3.c:156945:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 428)) = noopStepFunc // sqlite3.c:156945:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 432 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:156945:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = noopStepFunc // sqlite3.c:156946:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 460)) = noopValueFunc // sqlite3.c:156946:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = noopValueFunc // sqlite3.c:156946:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 468)) = noopStepFunc // sqlite3.c:156946:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:156946:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 496)) = noopStepFunc // sqlite3.c:156947:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 500)) = noopValueFunc // sqlite3.c:156947:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 504)) = noopValueFunc // sqlite3.c:156947:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 508)) = noopStepFunc // sqlite3.c:156947:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 512 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:156947:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = noopStepFunc // sqlite3.c:156948:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 540)) = noopValueFunc // sqlite3.c:156948:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:156948:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 548)) = noopStepFunc // sqlite3.c:156948:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:156948:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 576)) = noopStepFunc // sqlite3.c:156949:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 580)) = noopValueFunc // sqlite3.c:156949:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 584)) = noopValueFunc // sqlite3.c:156949:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 588)) = noopStepFunc // sqlite3.c:156949:5: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 592 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:156949:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 16)) = attachFunc // sqlite3.c:112577:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:24791:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 4)) = sqlite3MemFree // sqlite3.c:24792:6: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemRealloc // sqlite3.c:24793:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 12)) = sqlite3MemSize // sqlite3.c:24794:6: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRoundup // sqlite3.c:24795:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 20)) = sqlite3MemInit // sqlite3.c:24796:6: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemShutdown // sqlite3.c:24797:6: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 8)) = pcache1Init // sqlite3.c:51905:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 12)) = pcache1Shutdown // sqlite3.c:51906:5: - *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Create // sqlite3.c:51907:5: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 20)) = pcache1Cachesize // sqlite3.c:51908:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Pagecount // sqlite3.c:51909:5: - *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 28)) = pcache1Fetch // sqlite3.c:51910:5: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Unpin // sqlite3.c:51911:5: - *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 36)) = pcache1Rekey // sqlite3.c:51912:5: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Truncate // sqlite3.c:51913:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 44)) = pcache1Destroy // sqlite3.c:51914:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Shrink // sqlite3.c:51915:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 16)) = detachFunc // sqlite3.c:112557:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 4)) = dotlockClose // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = unixRead // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 12)) = unixWrite // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixTruncate // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 20)) = unixSync // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixFileSize // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 28)) = dotlockLock // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = dotlockUnlock // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 36)) = dotlockCheckReservedLock // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixFileControl // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = unixShmLock // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 68)) = unixFetch // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:39655:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 4)) = fts5CreateMethod // sqlite3.c:232513:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5ConnectMethod // sqlite3.c:232514:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 12)) = fts5BestIndexMethod // sqlite3.c:232515:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5DisconnectMethod // sqlite3.c:232516:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 20)) = fts5DestroyMethod // sqlite3.c:232517:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5OpenMethod // sqlite3.c:232518:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 28)) = fts5CloseMethod // sqlite3.c:232519:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5FilterMethod // sqlite3.c:232520:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 36)) = fts5NextMethod // sqlite3.c:232521:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5EofMethod // sqlite3.c:232522:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 44)) = fts5ColumnMethod // sqlite3.c:232523:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5RowidMethod // sqlite3.c:232524:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 52)) = fts5UpdateMethod // sqlite3.c:232525:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5BeginMethod // sqlite3.c:232526:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 60)) = fts5SyncMethod // sqlite3.c:232527:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5CommitMethod // sqlite3.c:232528:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 68)) = fts5RollbackMethod // sqlite3.c:232529:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5FindFunctionMethod // sqlite3.c:232530:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 76)) = fts5RenameMethod // sqlite3.c:232531:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5SavepointMethod // sqlite3.c:232532:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 84)) = fts5ReleaseMethod // sqlite3.c:232533:25: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5RollbackToMethod // sqlite3.c:232534:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 92)) = fts5ShadowName // sqlite3.c:232535:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 4)) = fts5VocabCreateMethod // sqlite3.c:237096:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabConnectMethod // sqlite3.c:237097:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 12)) = fts5VocabBestIndexMethod // sqlite3.c:237098:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabDisconnectMethod // sqlite3.c:237099:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 20)) = fts5VocabDestroyMethod // sqlite3.c:237100:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabOpenMethod // sqlite3.c:237101:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 28)) = fts5VocabCloseMethod // sqlite3.c:237102:25: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabFilterMethod // sqlite3.c:237103:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 36)) = fts5VocabNextMethod // sqlite3.c:237104:25: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabEofMethod // sqlite3.c:237105:25: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 44)) = fts5VocabColumnMethod // sqlite3.c:237106:25: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabRowidMethod // sqlite3.c:237107:25: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 4)) = geopolyCreate // sqlite3.c:200052:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyConnect // sqlite3.c:200053:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 12)) = geopolyBestIndex // sqlite3.c:200054:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = rtreeDisconnect // sqlite3.c:200055:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 20)) = rtreeDestroy // sqlite3.c:200056:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = rtreeOpen // sqlite3.c:200057:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 28)) = rtreeClose // sqlite3.c:200058:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = geopolyFilter // sqlite3.c:200059:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 36)) = rtreeNext // sqlite3.c:200060:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeEof // sqlite3.c:200061:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 44)) = geopolyColumn // sqlite3.c:200062:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeRowid // sqlite3.c:200063:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 52)) = geopolyUpdate // sqlite3.c:200064:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:200065:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 60)) = rtreeEndTransaction // sqlite3.c:200066:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = rtreeEndTransaction // sqlite3.c:200067:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 68)) = rtreeEndTransaction // sqlite3.c:200068:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = geopolyFindFunction // sqlite3.c:200069:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 76)) = rtreeRename // sqlite3.c:200070:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeSavepoint // sqlite3.c:200071:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 92)) = rtreeShadowName // sqlite3.c:200074:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 8)) = jsonEachConnect // sqlite3.c:193751:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 12)) = jsonEachBestIndex // sqlite3.c:193752:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachDisconnect // sqlite3.c:193753:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachOpenEach // sqlite3.c:193755:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 28)) = jsonEachClose // sqlite3.c:193756:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachFilter // sqlite3.c:193757:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 36)) = jsonEachNext // sqlite3.c:193758:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 40)) = jsonEachEof // sqlite3.c:193759:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 44)) = jsonEachColumn // sqlite3.c:193760:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachRowid // sqlite3.c:193761:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 8)) = jsonEachConnect // sqlite3.c:193779:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 12)) = jsonEachBestIndex // sqlite3.c:193780:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachDisconnect // sqlite3.c:193781:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachOpenTree // sqlite3.c:193783:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 28)) = jsonEachClose // sqlite3.c:193784:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachFilter // sqlite3.c:193785:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 36)) = jsonEachNext // sqlite3.c:193786:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 40)) = jsonEachEof // sqlite3.c:193787:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 44)) = jsonEachColumn // sqlite3.c:193788:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachRowid // sqlite3.c:193789:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 4)) = memdbClose // sqlite3.c:48686:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbRead // sqlite3.c:48687:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 12)) = memdbWrite // sqlite3.c:48688:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbTruncate // sqlite3.c:48689:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync // sqlite3.c:48690:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize // sqlite3.c:48691:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock // sqlite3.c:48692:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock // sqlite3.c:48693:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl // sqlite3.c:48695:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics // sqlite3.c:48697:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch // sqlite3.c:48702:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 72)) = memdbUnfetch // sqlite3.c:48703:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 24)) = memdbOpen // sqlite3.c:48666:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 32)) = memdbAccess // sqlite3.c:48668:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 36)) = memdbFullPathname // sqlite3.c:48669:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbDlOpen // sqlite3.c:48670:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 44)) = memdbDlError // sqlite3.c:48671:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 48)) = memdbDlSym // sqlite3.c:48672:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 52)) = memdbDlClose // sqlite3.c:48673:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbRandomness // sqlite3.c:48674:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 60)) = memdbSleep // sqlite3.c:48675:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 68)) = memdbGetLastError // sqlite3.c:48677:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbCurrentTimeInt64 // sqlite3.c:48678:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 4)) = nolockClose // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = unixRead // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 12)) = unixWrite // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixTruncate // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 20)) = unixSync // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixFileSize // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 28)) = nolockLock // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = nolockUnlock // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 36)) = nolockCheckReservedLock // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixFileControl // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = unixShmLock // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 68)) = unixFetch // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:39645:1: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 4)) = unixClose // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixRead // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 12)) = unixWrite // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixTruncate // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 20)) = unixSync // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixFileSize // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 28)) = unixLock // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixUnlock // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 36)) = unixCheckReservedLock // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixFileControl // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 44)) = unixSectorSize // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 52)) = unixShmMap // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixShmLock // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 68)) = unixFetch // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixUnfetch // sqlite3.c:39635:1: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 8)) = pragmaVtabConnect // sqlite3.c:132153:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 12)) = pragmaVtabBestIndex // sqlite3.c:132154:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabDisconnect // sqlite3.c:132155:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabOpen // sqlite3.c:132157:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 28)) = pragmaVtabClose // sqlite3.c:132158:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabFilter // sqlite3.c:132159:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 36)) = pragmaVtabNext // sqlite3.c:132160:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 40)) = pragmaVtabEof // sqlite3.c:132161:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 44)) = pragmaVtabColumn // sqlite3.c:132162:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabRowid // sqlite3.c:132163:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 4)) = rbuVfsClose // sqlite3.c:206749:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsRead // sqlite3.c:206750:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 12)) = rbuVfsWrite // sqlite3.c:206751:5: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsTruncate // sqlite3.c:206752:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 20)) = rbuVfsSync // sqlite3.c:206753:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsFileSize // sqlite3.c:206754:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 28)) = rbuVfsLock // sqlite3.c:206755:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsUnlock // sqlite3.c:206756:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 36)) = rbuVfsCheckReservedLock // sqlite3.c:206757:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsFileControl // sqlite3.c:206758:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 44)) = rbuVfsSectorSize // sqlite3.c:206759:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsDeviceCharacteristics // sqlite3.c:206760:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 52)) = rbuVfsShmMap // sqlite3.c:206761:5: - *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock // sqlite3.c:206762:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier // sqlite3.c:206763:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap // sqlite3.c:206764:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate // sqlite3.c:197387:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect // sqlite3.c:197388:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex // sqlite3.c:197389:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeDisconnect // sqlite3.c:197390:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 20)) = rtreeDestroy // sqlite3.c:197391:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeOpen // sqlite3.c:197392:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 28)) = rtreeClose // sqlite3.c:197393:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeFilter // sqlite3.c:197394:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 36)) = rtreeNext // sqlite3.c:197395:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeEof // sqlite3.c:197396:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 44)) = rtreeColumn // sqlite3.c:197397:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeRowid // sqlite3.c:197398:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 52)) = rtreeUpdate // sqlite3.c:197399:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:197400:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 60)) = rtreeEndTransaction // sqlite3.c:197401:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeEndTransaction // sqlite3.c:197402:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 68)) = rtreeEndTransaction // sqlite3.c:197403:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 76)) = rtreeRename // sqlite3.c:197405:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeSavepoint // sqlite3.c:197406:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 92)) = rtreeShadowName // sqlite3.c:197409:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 4)) = fts5ApiUserData // sqlite3.c:231972:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiColumnCount // sqlite3.c:231973:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 12)) = fts5ApiRowCount // sqlite3.c:231974:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnTotalSize // sqlite3.c:231975:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 20)) = fts5ApiTokenize // sqlite3.c:231976:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiPhraseCount // sqlite3.c:231977:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 28)) = fts5ApiPhraseSize // sqlite3.c:231978:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiInstCount // sqlite3.c:231979:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 36)) = fts5ApiInst // sqlite3.c:231980:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiRowid // sqlite3.c:231981:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 44)) = fts5ApiColumnText // sqlite3.c:231982:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiColumnSize // sqlite3.c:231983:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 52)) = fts5ApiQueryPhrase // sqlite3.c:231984:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiSetAuxdata // sqlite3.c:231985:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 60)) = fts5ApiGetAuxdata // sqlite3.c:231986:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiPhraseFirst // sqlite3.c:231987:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 68)) = fts5ApiPhraseNext // sqlite3.c:231988:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiPhraseFirstColumn // sqlite3.c:231989:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 76)) = fts5ApiPhraseNextColumn // sqlite3.c:231990:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 4)) = memjrnlClose // sqlite3.c:99197:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlRead // sqlite3.c:99198:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 12)) = memjrnlWrite // sqlite3.c:99199:3: - *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlTruncate // sqlite3.c:99200:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 20)) = memjrnlSync // sqlite3.c:99201:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlFileSize // sqlite3.c:99202:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27024:5: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 4)) = noopMutexEnd // sqlite3.c:27025:5: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexAlloc // sqlite3.c:27026:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 12)) = noopMutexFree // sqlite3.c:27027:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexEnter // sqlite3.c:27028:5: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 20)) = noopMutexTry // sqlite3.c:27029:5: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexLeave // sqlite3.c:27030:5: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128077:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 4)) = Xsqlite3_aggregate_count // sqlite3.c:128079:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_bind_blob // sqlite3.c:128083:3: - *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 12)) = Xsqlite3_bind_double // sqlite3.c:128084:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_int // sqlite3.c:128085:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 20)) = Xsqlite3_bind_int64 // sqlite3.c:128086:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_null // sqlite3.c:128087:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 28)) = Xsqlite3_bind_parameter_count // sqlite3.c:128088:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_parameter_index // sqlite3.c:128089:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 36)) = Xsqlite3_bind_parameter_name // sqlite3.c:128090:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_text // sqlite3.c:128091:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 44)) = Xsqlite3_bind_text16 // sqlite3.c:128092:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_value // sqlite3.c:128093:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 52)) = Xsqlite3_busy_handler // sqlite3.c:128094:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_busy_timeout // sqlite3.c:128095:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 60)) = Xsqlite3_changes // sqlite3.c:128096:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_close // sqlite3.c:128097:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 68)) = Xsqlite3_collation_needed // sqlite3.c:128098:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_collation_needed16 // sqlite3.c:128099:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 76)) = Xsqlite3_column_blob // sqlite3.c:128100:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_column_bytes // sqlite3.c:128101:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 84)) = Xsqlite3_column_bytes16 // sqlite3.c:128102:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_column_count // sqlite3.c:128103:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 92)) = Xsqlite3_column_database_name // sqlite3.c:128104:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_column_database_name16 // sqlite3.c:128105:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 100)) = Xsqlite3_column_decltype // sqlite3.c:128106:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_column_decltype16 // sqlite3.c:128107:3: - *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 108)) = Xsqlite3_column_double // sqlite3.c:128108:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_column_int // sqlite3.c:128109:3: - *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 116)) = Xsqlite3_column_int64 // sqlite3.c:128110:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_column_name // sqlite3.c:128111:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 124)) = Xsqlite3_column_name16 // sqlite3.c:128112:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_column_origin_name // sqlite3.c:128113:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 132)) = Xsqlite3_column_origin_name16 // sqlite3.c:128114:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_column_table_name // sqlite3.c:128115:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 140)) = Xsqlite3_column_table_name16 // sqlite3.c:128116:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_column_text // sqlite3.c:128117:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 148)) = Xsqlite3_column_text16 // sqlite3.c:128118:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_type // sqlite3.c:128119:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 156)) = Xsqlite3_column_value // sqlite3.c:128120:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_commit_hook // sqlite3.c:128121:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 164)) = Xsqlite3_complete // sqlite3.c:128122:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_complete16 // sqlite3.c:128123:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 172)) = Xsqlite3_create_collation // sqlite3.c:128124:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_create_collation16 // sqlite3.c:128125:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 180)) = Xsqlite3_create_function // sqlite3.c:128126:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_create_function16 // sqlite3.c:128127:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 188)) = Xsqlite3_create_module // sqlite3.c:128128:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_data_count // sqlite3.c:128129:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 196)) = Xsqlite3_db_handle // sqlite3.c:128130:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_declare_vtab // sqlite3.c:128131:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 204)) = Xsqlite3_enable_shared_cache // sqlite3.c:128132:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_errcode // sqlite3.c:128133:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 212)) = Xsqlite3_errmsg // sqlite3.c:128134:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_errmsg16 // sqlite3.c:128135:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 220)) = Xsqlite3_exec // sqlite3.c:128136:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_expired // sqlite3.c:128138:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 228)) = Xsqlite3_finalize // sqlite3.c:128142:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_free // sqlite3.c:128143:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 236)) = Xsqlite3_free_table // sqlite3.c:128144:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_get_autocommit // sqlite3.c:128145:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 244)) = Xsqlite3_get_auxdata // sqlite3.c:128146:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_get_table // sqlite3.c:128147:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_interrupt // sqlite3.c:128149:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 260)) = Xsqlite3_last_insert_rowid // sqlite3.c:128150:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_libversion // sqlite3.c:128151:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 268)) = Xsqlite3_libversion_number // sqlite3.c:128152:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_malloc // sqlite3.c:128153:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 276)) = Xsqlite3_mprintf // sqlite3.c:128154:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_open // sqlite3.c:128155:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 284)) = Xsqlite3_open16 // sqlite3.c:128156:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_prepare // sqlite3.c:128157:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 292)) = Xsqlite3_prepare16 // sqlite3.c:128158:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_profile // sqlite3.c:128159:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 300)) = Xsqlite3_progress_handler // sqlite3.c:128160:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_realloc // sqlite3.c:128161:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 308)) = Xsqlite3_reset // sqlite3.c:128162:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_result_blob // sqlite3.c:128163:3: - *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 316)) = Xsqlite3_result_double // sqlite3.c:128164:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_result_error // sqlite3.c:128165:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 324)) = Xsqlite3_result_error16 // sqlite3.c:128166:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_result_int // sqlite3.c:128167:3: - *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 332)) = Xsqlite3_result_int64 // sqlite3.c:128168:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_result_null // sqlite3.c:128169:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 340)) = Xsqlite3_result_text // sqlite3.c:128170:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_result_text16 // sqlite3.c:128171:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 348)) = Xsqlite3_result_text16be // sqlite3.c:128172:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_result_text16le // sqlite3.c:128173:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 356)) = Xsqlite3_result_value // sqlite3.c:128174:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_rollback_hook // sqlite3.c:128175:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 364)) = Xsqlite3_set_authorizer // sqlite3.c:128176:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_set_auxdata // sqlite3.c:128177:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 372)) = Xsqlite3_snprintf // sqlite3.c:128178:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_step // sqlite3.c:128179:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 380)) = Xsqlite3_table_column_metadata // sqlite3.c:128180:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_thread_cleanup // sqlite3.c:128182:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 388)) = Xsqlite3_total_changes // sqlite3.c:128186:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_trace // sqlite3.c:128187:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 396)) = Xsqlite3_transfer_bindings // sqlite3.c:128189:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_update_hook // sqlite3.c:128193:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 404)) = Xsqlite3_user_data // sqlite3.c:128194:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_value_blob // sqlite3.c:128195:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 412)) = Xsqlite3_value_bytes // sqlite3.c:128196:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_value_bytes16 // sqlite3.c:128197:3: - *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 420)) = Xsqlite3_value_double // sqlite3.c:128198:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_value_int // sqlite3.c:128199:3: - *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 428)) = Xsqlite3_value_int64 // sqlite3.c:128200:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_value_numeric_type // sqlite3.c:128201:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 436)) = Xsqlite3_value_text // sqlite3.c:128202:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_value_text16 // sqlite3.c:128203:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 444)) = Xsqlite3_value_text16be // sqlite3.c:128204:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_value_text16le // sqlite3.c:128205:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 452)) = Xsqlite3_value_type // sqlite3.c:128206:3: - *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_vmprintf // sqlite3.c:128207:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 460)) = Xsqlite3_overload_function // sqlite3.c:128216:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_prepare_v2 // sqlite3.c:128221:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 468)) = Xsqlite3_prepare16_v2 // sqlite3.c:128222:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_clear_bindings // sqlite3.c:128223:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 476)) = Xsqlite3_create_module_v2 // sqlite3.c:128228:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_bind_zeroblob // sqlite3.c:128233:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 484)) = Xsqlite3_blob_bytes // sqlite3.c:128234:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_blob_close // sqlite3.c:128235:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 492)) = Xsqlite3_blob_open // sqlite3.c:128236:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_blob_read // sqlite3.c:128237:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 500)) = Xsqlite3_blob_write // sqlite3.c:128238:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 504)) = Xsqlite3_create_collation_v2 // sqlite3.c:128239:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 508)) = Xsqlite3_file_control // sqlite3.c:128240:3: - *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_memory_highwater // sqlite3.c:128241:3: - *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 516)) = Xsqlite3_memory_used // sqlite3.c:128242:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_mutex_alloc // sqlite3.c:128250:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 524)) = Xsqlite3_mutex_enter // sqlite3.c:128251:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_mutex_free // sqlite3.c:128252:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 532)) = Xsqlite3_mutex_leave // sqlite3.c:128253:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_mutex_try // sqlite3.c:128254:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 540)) = Xsqlite3_open_v2 // sqlite3.c:128256:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_release_memory // sqlite3.c:128257:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 548)) = Xsqlite3_result_error_nomem // sqlite3.c:128258:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_result_error_toobig // sqlite3.c:128259:3: - *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 556)) = Xsqlite3_sleep // sqlite3.c:128260:3: - *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_soft_heap_limit // sqlite3.c:128261:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 564)) = Xsqlite3_vfs_find // sqlite3.c:128262:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_vfs_register // sqlite3.c:128263:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 572)) = Xsqlite3_vfs_unregister // sqlite3.c:128264:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_threadsafe // sqlite3.c:128269:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 580)) = Xsqlite3_result_zeroblob // sqlite3.c:128270:3: - *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_result_error_code // sqlite3.c:128271:3: - *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 588)) = Xsqlite3_test_control // sqlite3.c:128272:3: - *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_randomness // sqlite3.c:128273:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 596)) = Xsqlite3_context_db_handle // sqlite3.c:128274:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_extended_result_codes // sqlite3.c:128279:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 604)) = Xsqlite3_limit // sqlite3.c:128280:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_next_stmt // sqlite3.c:128281:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 612)) = Xsqlite3_sql // sqlite3.c:128282:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_status // sqlite3.c:128283:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 620)) = Xsqlite3_backup_finish // sqlite3.c:128288:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_backup_init // sqlite3.c:128289:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 628)) = Xsqlite3_backup_pagecount // sqlite3.c:128290:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_backup_remaining // sqlite3.c:128291:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 636)) = Xsqlite3_backup_step // sqlite3.c:128292:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_compileoption_get // sqlite3.c:128294:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 644)) = Xsqlite3_compileoption_used // sqlite3.c:128295:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_create_function_v2 // sqlite3.c:128300:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 652)) = Xsqlite3_db_config // sqlite3.c:128301:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_db_mutex // sqlite3.c:128302:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 660)) = Xsqlite3_db_status // sqlite3.c:128303:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_extended_errcode // sqlite3.c:128304:3: - *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 668)) = Xsqlite3_log // sqlite3.c:128305:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:128306:3: - *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 676)) = Xsqlite3_sourceid // sqlite3.c:128307:3: - *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_stmt_status // sqlite3.c:128308:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 684)) = Xsqlite3_strnicmp // sqlite3.c:128309:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_unlock_notify // sqlite3.c:128311:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 692)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:128316:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_wal_checkpoint // sqlite3.c:128317:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 700)) = Xsqlite3_wal_hook // sqlite3.c:128318:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_blob_reopen // sqlite3.c:128324:3: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config // sqlite3.c:128325:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict // sqlite3.c:128326:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 // sqlite3.c:128327:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename // sqlite3.c:128328:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly // sqlite3.c:128329:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory // sqlite3.c:128330:3: - *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr // sqlite3.c:128331:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy // sqlite3.c:128332:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly // sqlite3.c:128333:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp // sqlite3.c:128334:3: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean // sqlite3.c:128335:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 // sqlite3.c:128336:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter // sqlite3.c:128337:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf // sqlite3.c:128338:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:128339:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension // sqlite3.c:128341:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 772)) = Xsqlite3_bind_blob64 // sqlite3.c:128342:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_bind_text64 // sqlite3.c:128343:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 780)) = Xsqlite3_cancel_auto_extension // sqlite3.c:128344:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_load_extension // sqlite3.c:128345:3: - *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 788)) = Xsqlite3_malloc64 // sqlite3.c:128346:3: - *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_msize // sqlite3.c:128347:3: - *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 796)) = Xsqlite3_realloc64 // sqlite3.c:128348:3: - *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_reset_auto_extension // sqlite3.c:128349:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 804)) = Xsqlite3_result_blob64 // sqlite3.c:128350:3: - *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_result_text64 // sqlite3.c:128351:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 812)) = Xsqlite3_strglob // sqlite3.c:128352:3: + }{libc.Xlstat})) // sqlite3.c:34768:22: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 20 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 24)) = unixOpen // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 28)) = unixDelete // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 32)) = unixAccess // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 36)) = unixFullPathname // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 40)) = unixDlOpen // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 44)) = unixDlError // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 48)) = unixDlSym // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 52)) = unixDlClose // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 56)) = unixRandomness // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 60)) = unixSleep // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 64)) = unixCurrentTime // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 68)) = unixGetLastError // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 72)) = unixCurrentTimeInt64 // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 76)) = unixSetSystemCall // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 80)) = unixGetSystemCall // sqlite3.c:42297:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 84)) = unixNextSystemCall // sqlite3.c:42297:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 108 /* .pAppData */)) = uintptr(unsafe.Pointer(&nolockIoFinder)) // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 112)) = unixOpen // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 116)) = unixDelete // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 120)) = unixAccess // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 124)) = unixFullPathname // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 128)) = unixDlOpen // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 132)) = unixDlError // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 136)) = unixDlSym // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 140)) = unixDlClose // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 144)) = unixRandomness // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 148)) = unixSleep // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 152)) = unixCurrentTime // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 156)) = unixGetLastError // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 160)) = unixCurrentTimeInt64 // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 164)) = unixSetSystemCall // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 168)) = unixGetSystemCall // sqlite3.c:42299:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 172)) = unixNextSystemCall // sqlite3.c:42299:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 196 /* .pAppData */)) = uintptr(unsafe.Pointer(&dotlockIoFinder)) // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 200)) = unixOpen // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 204)) = unixDelete // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 208)) = unixAccess // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 212)) = unixFullPathname // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 216)) = unixDlOpen // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 220)) = unixDlError // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 224)) = unixDlSym // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 228)) = unixDlClose // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 232)) = unixRandomness // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 236)) = unixSleep // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 240)) = unixCurrentTime // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 244)) = unixGetLastError // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 248)) = unixCurrentTimeInt64 // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 252)) = unixSetSystemCall // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 256)) = unixGetSystemCall // sqlite3.c:42300:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 260)) = unixNextSystemCall // sqlite3.c:42300:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 284 /* .pAppData */)) = uintptr(unsafe.Pointer(&posixIoFinder)) // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 288)) = unixOpen // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 292)) = unixDelete // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 296)) = unixAccess // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 300)) = unixFullPathname // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 304)) = unixDlOpen // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 308)) = unixDlError // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 312)) = unixDlSym // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 316)) = unixDlClose // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 320)) = unixRandomness // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 324)) = unixSleep // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 328)) = unixCurrentTime // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 332)) = unixGetLastError // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 336)) = unixCurrentTimeInt64 // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_syscall_ptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 340)) = unixSetSystemCall // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr) Sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 344)) = unixGetSystemCall // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aVfs)) + 348)) = unixNextSystemCall // sqlite3.c:42301:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 16)) = row_numberStepFunc // sqlite3.c:156969:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 20)) = row_numberValueFunc // sqlite3.c:156969:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 24)) = row_numberValueFunc // sqlite3.c:156969:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 28)) = noopStepFunc // sqlite3.c:156969:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 32 /* .zName */)) = uintptr(unsafe.Pointer(&row_numberName)) // sqlite3.c:156969:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 56)) = dense_rankStepFunc // sqlite3.c:156970:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 60)) = dense_rankValueFunc // sqlite3.c:156970:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 64)) = dense_rankValueFunc // sqlite3.c:156970:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 68)) = noopStepFunc // sqlite3.c:156970:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 72 /* .zName */)) = uintptr(unsafe.Pointer(&dense_rankName)) // sqlite3.c:156970:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 96)) = rankStepFunc // sqlite3.c:156971:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 100)) = rankValueFunc // sqlite3.c:156971:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 104)) = rankValueFunc // sqlite3.c:156971:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 108)) = noopStepFunc // sqlite3.c:156971:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 112 /* .zName */)) = uintptr(unsafe.Pointer(&rankName)) // sqlite3.c:156971:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 136)) = percent_rankStepFunc // sqlite3.c:156972:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 140)) = percent_rankValueFunc // sqlite3.c:156972:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 144)) = percent_rankValueFunc // sqlite3.c:156972:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 148)) = percent_rankInvFunc // sqlite3.c:156972:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 152 /* .zName */)) = uintptr(unsafe.Pointer(&percent_rankName)) // sqlite3.c:156972:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 176)) = cume_distStepFunc // sqlite3.c:156973:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 180)) = cume_distValueFunc // sqlite3.c:156973:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 184)) = cume_distValueFunc // sqlite3.c:156973:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 188)) = cume_distInvFunc // sqlite3.c:156973:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 192 /* .zName */)) = uintptr(unsafe.Pointer(&cume_distName)) // sqlite3.c:156973:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 216)) = ntileStepFunc // sqlite3.c:156974:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 220)) = ntileValueFunc // sqlite3.c:156974:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 224)) = ntileValueFunc // sqlite3.c:156974:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 228)) = ntileInvFunc // sqlite3.c:156974:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 232 /* .zName */)) = uintptr(unsafe.Pointer(&ntileName)) // sqlite3.c:156974:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 256)) = last_valueStepFunc // sqlite3.c:156975:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 260)) = last_valueFinalizeFunc // sqlite3.c:156975:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 264)) = last_valueValueFunc // sqlite3.c:156975:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 268)) = last_valueInvFunc // sqlite3.c:156975:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 272 /* .zName */)) = uintptr(unsafe.Pointer(&last_valueName)) // sqlite3.c:156975:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 296)) = nth_valueStepFunc // sqlite3.c:156976:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 300)) = nth_valueFinalizeFunc // sqlite3.c:156976:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 304)) = noopValueFunc // sqlite3.c:156976:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 308)) = noopStepFunc // sqlite3.c:156976:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 312 /* .zName */)) = uintptr(unsafe.Pointer(&nth_valueName)) // sqlite3.c:156976:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 336)) = first_valueStepFunc // sqlite3.c:156977:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 340)) = first_valueFinalizeFunc // sqlite3.c:156977:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 344)) = noopValueFunc // sqlite3.c:156977:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 348)) = noopStepFunc // sqlite3.c:156977:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 352 /* .zName */)) = uintptr(unsafe.Pointer(&first_valueName)) // sqlite3.c:156977:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 376)) = noopStepFunc // sqlite3.c:156978:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 380)) = noopValueFunc // sqlite3.c:156978:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 384)) = noopValueFunc // sqlite3.c:156978:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 388)) = noopStepFunc // sqlite3.c:156978:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 392 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:156978:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 416)) = noopStepFunc // sqlite3.c:156979:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 420)) = noopValueFunc // sqlite3.c:156979:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 424)) = noopValueFunc // sqlite3.c:156979:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 428)) = noopStepFunc // sqlite3.c:156979:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 432 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:156979:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 456)) = noopStepFunc // sqlite3.c:156980:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 460)) = noopValueFunc // sqlite3.c:156980:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 464)) = noopValueFunc // sqlite3.c:156980:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 468)) = noopStepFunc // sqlite3.c:156980:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 472 /* .zName */)) = uintptr(unsafe.Pointer(&leadName)) // sqlite3.c:156980:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 496)) = noopStepFunc // sqlite3.c:156981:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 500)) = noopValueFunc // sqlite3.c:156981:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 504)) = noopValueFunc // sqlite3.c:156981:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 508)) = noopStepFunc // sqlite3.c:156981:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 512 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:156981:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 536)) = noopStepFunc // sqlite3.c:156982:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 540)) = noopValueFunc // sqlite3.c:156982:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 544)) = noopValueFunc // sqlite3.c:156982:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 548)) = noopStepFunc // sqlite3.c:156982:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 552 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:156982:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 576)) = noopStepFunc // sqlite3.c:156983:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 580)) = noopValueFunc // sqlite3.c:156983:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 584)) = noopValueFunc // sqlite3.c:156983:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 588)) = noopStepFunc // sqlite3.c:156983:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aWindowFuncs)) + 592 /* .zName */)) = uintptr(unsafe.Pointer(&lagName)) // sqlite3.c:156983:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&attach_func)) + 16)) = attachFunc // sqlite3.c:112587:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 0)) = sqlite3MemMalloc // sqlite3.c:24793:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 4)) = sqlite3MemFree // sqlite3.c:24794:6: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 8)) = sqlite3MemRealloc // sqlite3.c:24795:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 12)) = sqlite3MemSize // sqlite3.c:24796:6: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 16)) = sqlite3MemRoundup // sqlite3.c:24797:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 20)) = sqlite3MemInit // sqlite3.c:24798:6: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods)) + 24)) = sqlite3MemShutdown // sqlite3.c:24799:6: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 8)) = pcache1Init // sqlite3.c:51907:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 12)) = pcache1Shutdown // sqlite3.c:51908:5: + *(*func(*libc.TLS, int32, int32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 16)) = pcache1Create // sqlite3.c:51909:5: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 20)) = pcache1Cachesize // sqlite3.c:51910:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 24)) = pcache1Pagecount // sqlite3.c:51911:5: + *(*func(*libc.TLS, uintptr, uint32, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 28)) = pcache1Fetch // sqlite3.c:51912:5: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 32)) = pcache1Unpin // sqlite3.c:51913:5: + *(*func(*libc.TLS, uintptr, uintptr, uint32, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 36)) = pcache1Rekey // sqlite3.c:51914:5: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 40)) = pcache1Truncate // sqlite3.c:51915:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 44)) = pcache1Destroy // sqlite3.c:51916:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&defaultMethods1)) + 48)) = pcache1Shrink // sqlite3.c:51917:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&detach_func)) + 16)) = detachFunc // sqlite3.c:112567:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoFinder)) + 0)) = dotlockIoFinderImpl // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 4)) = dotlockClose // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 8)) = unixRead // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 12)) = unixWrite // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 16)) = unixTruncate // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 20)) = unixSync // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 24)) = unixFileSize // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 28)) = dotlockLock // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 32)) = dotlockUnlock // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 36)) = dotlockCheckReservedLock // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 40)) = unixFileControl // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 56)) = unixShmLock // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 68)) = unixFetch // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&dotlockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:39657:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 4)) = fts5CreateMethod // sqlite3.c:232557:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 8)) = fts5ConnectMethod // sqlite3.c:232558:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 12)) = fts5BestIndexMethod // sqlite3.c:232559:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 16)) = fts5DisconnectMethod // sqlite3.c:232560:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 20)) = fts5DestroyMethod // sqlite3.c:232561:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 24)) = fts5OpenMethod // sqlite3.c:232562:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 28)) = fts5CloseMethod // sqlite3.c:232563:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 32)) = fts5FilterMethod // sqlite3.c:232564:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 36)) = fts5NextMethod // sqlite3.c:232565:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 40)) = fts5EofMethod // sqlite3.c:232566:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 44)) = fts5ColumnMethod // sqlite3.c:232567:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 48)) = fts5RowidMethod // sqlite3.c:232568:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 52)) = fts5UpdateMethod // sqlite3.c:232569:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 56)) = fts5BeginMethod // sqlite3.c:232570:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 60)) = fts5SyncMethod // sqlite3.c:232571:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 64)) = fts5CommitMethod // sqlite3.c:232572:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 68)) = fts5RollbackMethod // sqlite3.c:232573:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 72)) = fts5FindFunctionMethod // sqlite3.c:232574:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 76)) = fts5RenameMethod // sqlite3.c:232575:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 80)) = fts5SavepointMethod // sqlite3.c:232576:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 84)) = fts5ReleaseMethod // sqlite3.c:232577:25: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 88)) = fts5RollbackToMethod // sqlite3.c:232578:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Mod)) + 92)) = fts5ShadowName // sqlite3.c:232579:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 4)) = fts5VocabCreateMethod // sqlite3.c:237140:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 8)) = fts5VocabConnectMethod // sqlite3.c:237141:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 12)) = fts5VocabBestIndexMethod // sqlite3.c:237142:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 16)) = fts5VocabDisconnectMethod // sqlite3.c:237143:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 20)) = fts5VocabDestroyMethod // sqlite3.c:237144:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 24)) = fts5VocabOpenMethod // sqlite3.c:237145:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 28)) = fts5VocabCloseMethod // sqlite3.c:237146:25: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 32)) = fts5VocabFilterMethod // sqlite3.c:237147:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 36)) = fts5VocabNextMethod // sqlite3.c:237148:25: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 40)) = fts5VocabEofMethod // sqlite3.c:237149:25: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 44)) = fts5VocabColumnMethod // sqlite3.c:237150:25: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&fts5Vocab)) + 48)) = fts5VocabRowidMethod // sqlite3.c:237151:25: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 4)) = geopolyCreate // sqlite3.c:200092:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 8)) = geopolyConnect // sqlite3.c:200093:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 12)) = geopolyBestIndex // sqlite3.c:200094:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 16)) = rtreeDisconnect // sqlite3.c:200095:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 20)) = rtreeDestroy // sqlite3.c:200096:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 24)) = rtreeOpen // sqlite3.c:200097:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 28)) = rtreeClose // sqlite3.c:200098:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 32)) = geopolyFilter // sqlite3.c:200099:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 36)) = rtreeNext // sqlite3.c:200100:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 40)) = rtreeEof // sqlite3.c:200101:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 44)) = geopolyColumn // sqlite3.c:200102:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 48)) = rtreeRowid // sqlite3.c:200103:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 52)) = geopolyUpdate // sqlite3.c:200104:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:200105:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 60)) = rtreeEndTransaction // sqlite3.c:200106:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 64)) = rtreeEndTransaction // sqlite3.c:200107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 68)) = rtreeEndTransaction // sqlite3.c:200108:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 72)) = geopolyFindFunction // sqlite3.c:200109:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 76)) = rtreeRename // sqlite3.c:200110:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 80)) = rtreeSavepoint // sqlite3.c:200111:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&geopolyModule)) + 92)) = rtreeShadowName // sqlite3.c:200114:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 8)) = jsonEachConnect // sqlite3.c:193791:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 12)) = jsonEachBestIndex // sqlite3.c:193792:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 16)) = jsonEachDisconnect // sqlite3.c:193793:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 24)) = jsonEachOpenEach // sqlite3.c:193795:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 28)) = jsonEachClose // sqlite3.c:193796:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 32)) = jsonEachFilter // sqlite3.c:193797:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 36)) = jsonEachNext // sqlite3.c:193798:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 40)) = jsonEachEof // sqlite3.c:193799:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 44)) = jsonEachColumn // sqlite3.c:193800:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonEachModule)) + 48)) = jsonEachRowid // sqlite3.c:193801:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 8)) = jsonEachConnect // sqlite3.c:193819:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 12)) = jsonEachBestIndex // sqlite3.c:193820:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 16)) = jsonEachDisconnect // sqlite3.c:193821:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 24)) = jsonEachOpenTree // sqlite3.c:193823:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 28)) = jsonEachClose // sqlite3.c:193824:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 32)) = jsonEachFilter // sqlite3.c:193825:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 36)) = jsonEachNext // sqlite3.c:193826:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 40)) = jsonEachEof // sqlite3.c:193827:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 44)) = jsonEachColumn // sqlite3.c:193828:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&jsonTreeModule)) + 48)) = jsonEachRowid // sqlite3.c:193829:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 4)) = memdbClose // sqlite3.c:48688:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 8)) = memdbRead // sqlite3.c:48689:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 12)) = memdbWrite // sqlite3.c:48690:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 16)) = memdbTruncate // sqlite3.c:48691:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 20)) = memdbSync // sqlite3.c:48692:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 24)) = memdbFileSize // sqlite3.c:48693:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 28)) = memdbLock // sqlite3.c:48694:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 32)) = memdbLock // sqlite3.c:48695:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 40)) = memdbFileControl // sqlite3.c:48697:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 48)) = memdbDeviceCharacteristics // sqlite3.c:48699:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 68)) = memdbFetch // sqlite3.c:48704:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_io_methods)) + 72)) = memdbUnfetch // sqlite3.c:48705:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 24)) = memdbOpen // sqlite3.c:48668:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 32)) = memdbAccess // sqlite3.c:48670:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 36)) = memdbFullPathname // sqlite3.c:48671:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 40)) = memdbDlOpen // sqlite3.c:48672:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 44)) = memdbDlError // sqlite3.c:48673:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 48)) = memdbDlSym // sqlite3.c:48674:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 52)) = memdbDlClose // sqlite3.c:48675:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 56)) = memdbRandomness // sqlite3.c:48676:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 60)) = memdbSleep // sqlite3.c:48677:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 68)) = memdbGetLastError // sqlite3.c:48679:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&memdb_vfs)) + 72)) = memdbCurrentTimeInt64 // sqlite3.c:48680:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoFinder)) + 0)) = nolockIoFinderImpl // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 4)) = nolockClose // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 8)) = unixRead // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 12)) = unixWrite // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 16)) = unixTruncate // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 20)) = unixSync // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 24)) = unixFileSize // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 28)) = nolockLock // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 32)) = nolockUnlock // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 36)) = nolockCheckReservedLock // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 40)) = unixFileControl // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 44)) = unixSectorSize // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 56)) = unixShmLock // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 68)) = unixFetch // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&nolockIoMethods)) + 72)) = unixUnfetch // sqlite3.c:39647:1: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoFinder)) + 0)) = posixIoFinderImpl // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 4)) = unixClose // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 8)) = unixRead // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 12)) = unixWrite // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, I64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 16)) = unixTruncate // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 20)) = unixSync // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 24)) = unixFileSize // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 28)) = unixLock // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 32)) = unixUnlock // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 36)) = unixCheckReservedLock // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 40)) = unixFileControl // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 44)) = unixSectorSize // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 48)) = unixDeviceCharacteristics // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 52)) = unixShmMap // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 56)) = unixShmLock // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 60)) = unixShmBarrier // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 64)) = unixShmUnmap // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, I64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 68)) = unixFetch // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, I64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&posixIoMethods)) + 72)) = unixUnfetch // sqlite3.c:39637:1: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 8)) = pragmaVtabConnect // sqlite3.c:132183:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 12)) = pragmaVtabBestIndex // sqlite3.c:132184:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 16)) = pragmaVtabDisconnect // sqlite3.c:132185:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 24)) = pragmaVtabOpen // sqlite3.c:132187:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 28)) = pragmaVtabClose // sqlite3.c:132188:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 32)) = pragmaVtabFilter // sqlite3.c:132189:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 36)) = pragmaVtabNext // sqlite3.c:132190:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 40)) = pragmaVtabEof // sqlite3.c:132191:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 44)) = pragmaVtabColumn // sqlite3.c:132192:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&pragmaVtabModule)) + 48)) = pragmaVtabRowid // sqlite3.c:132193:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 4)) = rbuVfsClose // sqlite3.c:206789:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8)) = rbuVfsRead // sqlite3.c:206790:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 12)) = rbuVfsWrite // sqlite3.c:206791:5: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16)) = rbuVfsTruncate // sqlite3.c:206792:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 20)) = rbuVfsSync // sqlite3.c:206793:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24)) = rbuVfsFileSize // sqlite3.c:206794:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 28)) = rbuVfsLock // sqlite3.c:206795:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32)) = rbuVfsUnlock // sqlite3.c:206796:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 36)) = rbuVfsCheckReservedLock // sqlite3.c:206797:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40)) = rbuVfsFileControl // sqlite3.c:206798:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 44)) = rbuVfsSectorSize // sqlite3.c:206799:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48)) = rbuVfsDeviceCharacteristics // sqlite3.c:206800:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 52)) = rbuVfsShmMap // sqlite3.c:206801:5: + *(*func(*libc.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56)) = rbuVfsShmLock // sqlite3.c:206802:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 60)) = rbuVfsShmBarrier // sqlite3.c:206803:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64)) = rbuVfsShmUnmap // sqlite3.c:206804:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 4)) = rtreeCreate // sqlite3.c:197427:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 8)) = rtreeConnect // sqlite3.c:197428:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 12)) = rtreeBestIndex // sqlite3.c:197429:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 16)) = rtreeDisconnect // sqlite3.c:197430:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 20)) = rtreeDestroy // sqlite3.c:197431:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 24)) = rtreeOpen // sqlite3.c:197432:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 28)) = rtreeClose // sqlite3.c:197433:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 32)) = rtreeFilter // sqlite3.c:197434:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 36)) = rtreeNext // sqlite3.c:197435:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 40)) = rtreeEof // sqlite3.c:197436:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 44)) = rtreeColumn // sqlite3.c:197437:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 48)) = rtreeRowid // sqlite3.c:197438:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 52)) = rtreeUpdate // sqlite3.c:197439:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 56)) = rtreeBeginTransaction // sqlite3.c:197440:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 60)) = rtreeEndTransaction // sqlite3.c:197441:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 64)) = rtreeEndTransaction // sqlite3.c:197442:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 68)) = rtreeEndTransaction // sqlite3.c:197443:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 76)) = rtreeRename // sqlite3.c:197445:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 80)) = rtreeSavepoint // sqlite3.c:197446:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rtreeModule)) + 92)) = rtreeShadowName // sqlite3.c:197449:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 4)) = fts5ApiUserData // sqlite3.c:232016:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 8)) = fts5ApiColumnCount // sqlite3.c:232017:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 12)) = fts5ApiRowCount // sqlite3.c:232018:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 16)) = fts5ApiColumnTotalSize // sqlite3.c:232019:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 20)) = fts5ApiTokenize // sqlite3.c:232020:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 24)) = fts5ApiPhraseCount // sqlite3.c:232021:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 28)) = fts5ApiPhraseSize // sqlite3.c:232022:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 32)) = fts5ApiInstCount // sqlite3.c:232023:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 36)) = fts5ApiInst // sqlite3.c:232024:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 40)) = fts5ApiRowid // sqlite3.c:232025:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 44)) = fts5ApiColumnText // sqlite3.c:232026:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 48)) = fts5ApiColumnSize // sqlite3.c:232027:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 52)) = fts5ApiQueryPhrase // sqlite3.c:232028:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 56)) = fts5ApiSetAuxdata // sqlite3.c:232029:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 60)) = fts5ApiGetAuxdata // sqlite3.c:232030:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 64)) = fts5ApiPhraseFirst // sqlite3.c:232031:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 68)) = fts5ApiPhraseNext // sqlite3.c:232032:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 72)) = fts5ApiPhraseFirstColumn // sqlite3.c:232033:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sFts5Api)) + 76)) = fts5ApiPhraseNextColumn // sqlite3.c:232034:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 4)) = memjrnlClose // sqlite3.c:99207:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 8)) = memjrnlRead // sqlite3.c:99208:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 12)) = memjrnlWrite // sqlite3.c:99209:3: + *(*func(*libc.TLS, uintptr, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 16)) = memjrnlTruncate // sqlite3.c:99210:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 20)) = memjrnlSync // sqlite3.c:99211:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMemJournalMethods)) + 24)) = memjrnlFileSize // sqlite3.c:99212:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 0)) = noopMutexInit // sqlite3.c:27026:5: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 4)) = noopMutexEnd // sqlite3.c:27027:5: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 8)) = noopMutexAlloc // sqlite3.c:27028:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 12)) = noopMutexFree // sqlite3.c:27029:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 16)) = noopMutexEnter // sqlite3.c:27030:5: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 20)) = noopMutexTry // sqlite3.c:27031:5: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sMutex)) + 24)) = noopMutexLeave // sqlite3.c:27032:5: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 0)) = Xsqlite3_aggregate_context // sqlite3.c:128107:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 4)) = Xsqlite3_aggregate_count // sqlite3.c:128109:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 8)) = Xsqlite3_bind_blob // sqlite3.c:128113:3: + *(*func(*libc.TLS, uintptr, int32, float64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 12)) = Xsqlite3_bind_double // sqlite3.c:128114:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 16)) = Xsqlite3_bind_int // sqlite3.c:128115:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 20)) = Xsqlite3_bind_int64 // sqlite3.c:128116:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 24)) = Xsqlite3_bind_null // sqlite3.c:128117:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 28)) = Xsqlite3_bind_parameter_count // sqlite3.c:128118:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 32)) = Xsqlite3_bind_parameter_index // sqlite3.c:128119:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 36)) = Xsqlite3_bind_parameter_name // sqlite3.c:128120:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 40)) = Xsqlite3_bind_text // sqlite3.c:128121:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 44)) = Xsqlite3_bind_text16 // sqlite3.c:128122:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 48)) = Xsqlite3_bind_value // sqlite3.c:128123:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 52)) = Xsqlite3_busy_handler // sqlite3.c:128124:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 56)) = Xsqlite3_busy_timeout // sqlite3.c:128125:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 60)) = Xsqlite3_changes // sqlite3.c:128126:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 64)) = Xsqlite3_close // sqlite3.c:128127:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 68)) = Xsqlite3_collation_needed // sqlite3.c:128128:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 72)) = Xsqlite3_collation_needed16 // sqlite3.c:128129:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 76)) = Xsqlite3_column_blob // sqlite3.c:128130:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 80)) = Xsqlite3_column_bytes // sqlite3.c:128131:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 84)) = Xsqlite3_column_bytes16 // sqlite3.c:128132:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 88)) = Xsqlite3_column_count // sqlite3.c:128133:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 92)) = Xsqlite3_column_database_name // sqlite3.c:128134:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 96)) = Xsqlite3_column_database_name16 // sqlite3.c:128135:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 100)) = Xsqlite3_column_decltype // sqlite3.c:128136:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 104)) = Xsqlite3_column_decltype16 // sqlite3.c:128137:3: + *(*func(*libc.TLS, uintptr, int32) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 108)) = Xsqlite3_column_double // sqlite3.c:128138:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 112)) = Xsqlite3_column_int // sqlite3.c:128139:3: + *(*func(*libc.TLS, uintptr, int32) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 116)) = Xsqlite3_column_int64 // sqlite3.c:128140:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 120)) = Xsqlite3_column_name // sqlite3.c:128141:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 124)) = Xsqlite3_column_name16 // sqlite3.c:128142:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 128)) = Xsqlite3_column_origin_name // sqlite3.c:128143:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 132)) = Xsqlite3_column_origin_name16 // sqlite3.c:128144:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 136)) = Xsqlite3_column_table_name // sqlite3.c:128145:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 140)) = Xsqlite3_column_table_name16 // sqlite3.c:128146:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 144)) = Xsqlite3_column_text // sqlite3.c:128147:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 148)) = Xsqlite3_column_text16 // sqlite3.c:128148:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 152)) = Xsqlite3_column_type // sqlite3.c:128149:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 156)) = Xsqlite3_column_value // sqlite3.c:128150:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 160)) = Xsqlite3_commit_hook // sqlite3.c:128151:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 164)) = Xsqlite3_complete // sqlite3.c:128152:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 168)) = Xsqlite3_complete16 // sqlite3.c:128153:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 172)) = Xsqlite3_create_collation // sqlite3.c:128154:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 176)) = Xsqlite3_create_collation16 // sqlite3.c:128155:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 180)) = Xsqlite3_create_function // sqlite3.c:128156:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 184)) = Xsqlite3_create_function16 // sqlite3.c:128157:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 188)) = Xsqlite3_create_module // sqlite3.c:128158:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 192)) = Xsqlite3_data_count // sqlite3.c:128159:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 196)) = Xsqlite3_db_handle // sqlite3.c:128160:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 200)) = Xsqlite3_declare_vtab // sqlite3.c:128161:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 204)) = Xsqlite3_enable_shared_cache // sqlite3.c:128162:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 208)) = Xsqlite3_errcode // sqlite3.c:128163:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 212)) = Xsqlite3_errmsg // sqlite3.c:128164:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 216)) = Xsqlite3_errmsg16 // sqlite3.c:128165:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_callback, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 220)) = Xsqlite3_exec // sqlite3.c:128166:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 224)) = Xsqlite3_expired // sqlite3.c:128168:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 228)) = Xsqlite3_finalize // sqlite3.c:128172:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 232)) = Xsqlite3_free // sqlite3.c:128173:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 236)) = Xsqlite3_free_table // sqlite3.c:128174:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 240)) = Xsqlite3_get_autocommit // sqlite3.c:128175:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 244)) = Xsqlite3_get_auxdata // sqlite3.c:128176:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 248)) = Xsqlite3_get_table // sqlite3.c:128177:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 256)) = Xsqlite3_interrupt // sqlite3.c:128179:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 260)) = Xsqlite3_last_insert_rowid // sqlite3.c:128180:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 264)) = Xsqlite3_libversion // sqlite3.c:128181:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 268)) = Xsqlite3_libversion_number // sqlite3.c:128182:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 272)) = Xsqlite3_malloc // sqlite3.c:128183:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 276)) = Xsqlite3_mprintf // sqlite3.c:128184:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 280)) = Xsqlite3_open // sqlite3.c:128185:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 284)) = Xsqlite3_open16 // sqlite3.c:128186:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 288)) = Xsqlite3_prepare // sqlite3.c:128187:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 292)) = Xsqlite3_prepare16 // sqlite3.c:128188:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 296)) = Xsqlite3_profile // sqlite3.c:128189:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 300)) = Xsqlite3_progress_handler // sqlite3.c:128190:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 304)) = Xsqlite3_realloc // sqlite3.c:128191:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 308)) = Xsqlite3_reset // sqlite3.c:128192:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 312)) = Xsqlite3_result_blob // sqlite3.c:128193:3: + *(*func(*libc.TLS, uintptr, float64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 316)) = Xsqlite3_result_double // sqlite3.c:128194:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 320)) = Xsqlite3_result_error // sqlite3.c:128195:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 324)) = Xsqlite3_result_error16 // sqlite3.c:128196:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 328)) = Xsqlite3_result_int // sqlite3.c:128197:3: + *(*func(*libc.TLS, uintptr, I64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 332)) = Xsqlite3_result_int64 // sqlite3.c:128198:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 336)) = Xsqlite3_result_null // sqlite3.c:128199:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 340)) = Xsqlite3_result_text // sqlite3.c:128200:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 344)) = Xsqlite3_result_text16 // sqlite3.c:128201:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 348)) = Xsqlite3_result_text16be // sqlite3.c:128202:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 352)) = Xsqlite3_result_text16le // sqlite3.c:128203:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 356)) = Xsqlite3_result_value // sqlite3.c:128204:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 360)) = Xsqlite3_rollback_hook // sqlite3.c:128205:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 364)) = Xsqlite3_set_authorizer // sqlite3.c:128206:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 368)) = Xsqlite3_set_auxdata // sqlite3.c:128207:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 372)) = Xsqlite3_snprintf // sqlite3.c:128208:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 376)) = Xsqlite3_step // sqlite3.c:128209:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 380)) = Xsqlite3_table_column_metadata // sqlite3.c:128210:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 384)) = Xsqlite3_thread_cleanup // sqlite3.c:128212:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 388)) = Xsqlite3_total_changes // sqlite3.c:128216:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 392)) = Xsqlite3_trace // sqlite3.c:128217:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 396)) = Xsqlite3_transfer_bindings // sqlite3.c:128219:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 400)) = Xsqlite3_update_hook // sqlite3.c:128223:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 404)) = Xsqlite3_user_data // sqlite3.c:128224:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 408)) = Xsqlite3_value_blob // sqlite3.c:128225:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 412)) = Xsqlite3_value_bytes // sqlite3.c:128226:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 416)) = Xsqlite3_value_bytes16 // sqlite3.c:128227:3: + *(*func(*libc.TLS, uintptr) float64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 420)) = Xsqlite3_value_double // sqlite3.c:128228:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 424)) = Xsqlite3_value_int // sqlite3.c:128229:3: + *(*func(*libc.TLS, uintptr) Sqlite_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 428)) = Xsqlite3_value_int64 // sqlite3.c:128230:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 432)) = Xsqlite3_value_numeric_type // sqlite3.c:128231:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 436)) = Xsqlite3_value_text // sqlite3.c:128232:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 440)) = Xsqlite3_value_text16 // sqlite3.c:128233:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 444)) = Xsqlite3_value_text16be // sqlite3.c:128234:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 448)) = Xsqlite3_value_text16le // sqlite3.c:128235:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 452)) = Xsqlite3_value_type // sqlite3.c:128236:3: + *(*func(*libc.TLS, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 456)) = Xsqlite3_vmprintf // sqlite3.c:128237:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 460)) = Xsqlite3_overload_function // sqlite3.c:128246:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 464)) = Xsqlite3_prepare_v2 // sqlite3.c:128251:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 468)) = Xsqlite3_prepare16_v2 // sqlite3.c:128252:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 472)) = Xsqlite3_clear_bindings // sqlite3.c:128253:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 476)) = Xsqlite3_create_module_v2 // sqlite3.c:128258:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 480)) = Xsqlite3_bind_zeroblob // sqlite3.c:128263:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 484)) = Xsqlite3_blob_bytes // sqlite3.c:128264:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 488)) = Xsqlite3_blob_close // sqlite3.c:128265:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr, Sqlite_int64, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 492)) = Xsqlite3_blob_open // sqlite3.c:128266:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 496)) = Xsqlite3_blob_read // sqlite3.c:128267:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 500)) = Xsqlite3_blob_write // sqlite3.c:128268:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 504)) = Xsqlite3_create_collation_v2 // sqlite3.c:128269:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 508)) = Xsqlite3_file_control // sqlite3.c:128270:3: + *(*func(*libc.TLS, int32) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 512)) = Xsqlite3_memory_highwater // sqlite3.c:128271:3: + *(*func(*libc.TLS) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 516)) = Xsqlite3_memory_used // sqlite3.c:128272:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 520)) = Xsqlite3_mutex_alloc // sqlite3.c:128280:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 524)) = Xsqlite3_mutex_enter // sqlite3.c:128281:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 528)) = Xsqlite3_mutex_free // sqlite3.c:128282:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 532)) = Xsqlite3_mutex_leave // sqlite3.c:128283:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 536)) = Xsqlite3_mutex_try // sqlite3.c:128284:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 540)) = Xsqlite3_open_v2 // sqlite3.c:128286:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 544)) = Xsqlite3_release_memory // sqlite3.c:128287:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 548)) = Xsqlite3_result_error_nomem // sqlite3.c:128288:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 552)) = Xsqlite3_result_error_toobig // sqlite3.c:128289:3: + *(*func(*libc.TLS, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 556)) = Xsqlite3_sleep // sqlite3.c:128290:3: + *(*func(*libc.TLS, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 560)) = Xsqlite3_soft_heap_limit // sqlite3.c:128291:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 564)) = Xsqlite3_vfs_find // sqlite3.c:128292:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 568)) = Xsqlite3_vfs_register // sqlite3.c:128293:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 572)) = Xsqlite3_vfs_unregister // sqlite3.c:128294:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 576)) = Xsqlite3_threadsafe // sqlite3.c:128299:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 580)) = Xsqlite3_result_zeroblob // sqlite3.c:128300:3: + *(*func(*libc.TLS, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 584)) = Xsqlite3_result_error_code // sqlite3.c:128301:3: + *(*func(*libc.TLS, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 588)) = Xsqlite3_test_control // sqlite3.c:128302:3: + *(*func(*libc.TLS, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 592)) = Xsqlite3_randomness // sqlite3.c:128303:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 596)) = Xsqlite3_context_db_handle // sqlite3.c:128304:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 600)) = Xsqlite3_extended_result_codes // sqlite3.c:128309:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 604)) = Xsqlite3_limit // sqlite3.c:128310:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 608)) = Xsqlite3_next_stmt // sqlite3.c:128311:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 612)) = Xsqlite3_sql // sqlite3.c:128312:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 616)) = Xsqlite3_status // sqlite3.c:128313:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 620)) = Xsqlite3_backup_finish // sqlite3.c:128318:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 624)) = Xsqlite3_backup_init // sqlite3.c:128319:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 628)) = Xsqlite3_backup_pagecount // sqlite3.c:128320:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 632)) = Xsqlite3_backup_remaining // sqlite3.c:128321:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 636)) = Xsqlite3_backup_step // sqlite3.c:128322:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 640)) = Xsqlite3_compileoption_get // sqlite3.c:128324:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 644)) = Xsqlite3_compileoption_used // sqlite3.c:128325:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 648)) = Xsqlite3_create_function_v2 // sqlite3.c:128330:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 652)) = Xsqlite3_db_config // sqlite3.c:128331:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 656)) = Xsqlite3_db_mutex // sqlite3.c:128332:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 660)) = Xsqlite3_db_status // sqlite3.c:128333:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 664)) = Xsqlite3_extended_errcode // sqlite3.c:128334:3: + *(*func(*libc.TLS, int32, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 668)) = Xsqlite3_log // sqlite3.c:128335:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 672)) = Xsqlite3_soft_heap_limit64 // sqlite3.c:128336:3: + *(*func(*libc.TLS) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 676)) = Xsqlite3_sourceid // sqlite3.c:128337:3: + *(*func(*libc.TLS, uintptr, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 680)) = Xsqlite3_stmt_status // sqlite3.c:128338:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 684)) = Xsqlite3_strnicmp // sqlite3.c:128339:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 688)) = Xsqlite3_unlock_notify // sqlite3.c:128341:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 692)) = Xsqlite3_wal_autocheckpoint // sqlite3.c:128346:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 696)) = Xsqlite3_wal_checkpoint // sqlite3.c:128347:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 700)) = Xsqlite3_wal_hook // sqlite3.c:128348:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 704)) = Xsqlite3_blob_reopen // sqlite3.c:128354:3: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 708)) = Xsqlite3_vtab_config // sqlite3.c:128355:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 712)) = Xsqlite3_vtab_on_conflict // sqlite3.c:128356:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 716)) = Xsqlite3_close_v2 // sqlite3.c:128357:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 720)) = Xsqlite3_db_filename // sqlite3.c:128358:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 724)) = Xsqlite3_db_readonly // sqlite3.c:128359:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 728)) = Xsqlite3_db_release_memory // sqlite3.c:128360:3: + *(*func(*libc.TLS, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 732)) = Xsqlite3_errstr // sqlite3.c:128361:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 736)) = Xsqlite3_stmt_busy // sqlite3.c:128362:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 740)) = Xsqlite3_stmt_readonly // sqlite3.c:128363:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 744)) = Xsqlite3_stricmp // sqlite3.c:128364:3: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 748)) = Xsqlite3_uri_boolean // sqlite3.c:128365:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 752)) = Xsqlite3_uri_int64 // sqlite3.c:128366:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 756)) = Xsqlite3_uri_parameter // sqlite3.c:128367:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, Va_list) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 760)) = Xsqlite3_vsnprintf // sqlite3.c:128368:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 764)) = Xsqlite3_wal_checkpoint_v2 // sqlite3.c:128369:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 768)) = Xsqlite3_auto_extension // sqlite3.c:128371:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 772)) = Xsqlite3_bind_blob64 // sqlite3.c:128372:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, Sqlite3_uint64, uintptr, uint8) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 776)) = Xsqlite3_bind_text64 // sqlite3.c:128373:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 780)) = Xsqlite3_cancel_auto_extension // sqlite3.c:128374:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 784)) = Xsqlite3_load_extension // sqlite3.c:128375:3: + *(*func(*libc.TLS, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 788)) = Xsqlite3_malloc64 // sqlite3.c:128376:3: + *(*func(*libc.TLS, uintptr) Sqlite3_uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 792)) = Xsqlite3_msize // sqlite3.c:128377:3: + *(*func(*libc.TLS, uintptr, Sqlite3_uint64) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 796)) = Xsqlite3_realloc64 // sqlite3.c:128378:3: + *(*func(*libc.TLS))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 800)) = Xsqlite3_reset_auto_extension // sqlite3.c:128379:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 804)) = Xsqlite3_result_blob64 // sqlite3.c:128380:3: + *(*func(*libc.TLS, uintptr, uintptr, Sqlite3_uint64, uintptr, uint8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 808)) = Xsqlite3_result_text64 // sqlite3.c:128381:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 812)) = Xsqlite3_strglob // sqlite3.c:128382:3: *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 816 /* .value_dup */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr) uintptr - }{Xsqlite3_value_dup})) // sqlite3.c:128354:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 820)) = Xsqlite3_value_free // sqlite3.c:128355:3: - *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_result_zeroblob64 // sqlite3.c:128356:3: - *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 828)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:128357:3: - *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_subtype // sqlite3.c:128359:3: - *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 836)) = Xsqlite3_result_subtype // sqlite3.c:128360:3: - *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_status64 // sqlite3.c:128362:3: - *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 844)) = Xsqlite3_strlike // sqlite3.c:128363:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_db_cacheflush // sqlite3.c:128364:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 852)) = Xsqlite3_system_errno // sqlite3.c:128366:3: - *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_trace_v2 // sqlite3.c:128368:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 860)) = Xsqlite3_expanded_sql // sqlite3.c:128369:3: - *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:128371:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 868)) = Xsqlite3_prepare_v3 // sqlite3.c:128373:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_prepare16_v3 // sqlite3.c:128374:3: - *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 876)) = Xsqlite3_bind_pointer // sqlite3.c:128375:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_result_pointer // sqlite3.c:128376:3: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 884)) = Xsqlite3_value_pointer // sqlite3.c:128377:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_vtab_nochange // sqlite3.c:128379:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 892)) = Xsqlite3_value_nochange // sqlite3.c:128380:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_vtab_collation // sqlite3.c:128381:3: - *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 900)) = Xsqlite3_keyword_count // sqlite3.c:128383:3: - *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_keyword_name // sqlite3.c:128384:3: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 908)) = Xsqlite3_keyword_check // sqlite3.c:128385:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_str_new // sqlite3.c:128386:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 916)) = Xsqlite3_str_finish // sqlite3.c:128387:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_str_appendf // sqlite3.c:128388:3: - *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 924)) = Xsqlite3_str_vappendf // sqlite3.c:128389:3: - *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_str_append // sqlite3.c:128390:3: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 932)) = Xsqlite3_str_appendall // sqlite3.c:128391:3: - *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_str_appendchar // sqlite3.c:128392:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 940)) = Xsqlite3_str_reset // sqlite3.c:128393:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_str_errcode // sqlite3.c:128394:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 948)) = Xsqlite3_str_length // sqlite3.c:128395:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_str_value // sqlite3.c:128396:3: - *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 956)) = Xsqlite3_create_window_function // sqlite3.c:128398:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 964)) = Xsqlite3_stmt_isexplain // sqlite3.c:128406:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind // sqlite3.c:128407:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules // sqlite3.c:128410:3: - *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:128415:3: - *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key // sqlite3.c:128416:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database // sqlite3.c:128417:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal // sqlite3.c:128418:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal // sqlite3.c:128419:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename // sqlite3.c:128421:3: - *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename // sqlite3.c:128422:3: - *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object // sqlite3.c:128423:3: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state // sqlite3.c:128425:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 // sqlite3.c:128427:3: - *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_total_changes64 // sqlite3.c:128428:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1020)) = Xsqlite3_autovacuum_pages // sqlite3.c:128430:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:166629:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit // sqlite3.c:166635:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit // sqlite3.c:166643:3: - *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 12)) = Xsqlite3Json1Init // sqlite3.c:166645:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 16)) = statGet // sqlite3.c:111132:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 16)) = statInit // sqlite3.c:110708:3: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 16)) = statPush // sqlite3.c:110998:3: - *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 24)) = rbuVfsOpen // sqlite3.c:207006:5: - *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 28)) = rbuVfsDelete // sqlite3.c:207007:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 32)) = rbuVfsAccess // sqlite3.c:207008:5: - *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 36)) = rbuVfsFullPathname // sqlite3.c:207009:5: - *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsDlOpen // sqlite3.c:207012:5: - *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 44)) = rbuVfsDlError // sqlite3.c:207013:5: - *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDlSym // sqlite3.c:207014:5: - *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 52)) = rbuVfsDlClose // sqlite3.c:207015:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsRandomness // sqlite3.c:207020:5: - *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 60)) = rbuVfsSleep // sqlite3.c:207021:5: - *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsCurrentTime // sqlite3.c:207022:5: - *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError // sqlite3.c:207023:5: -} - -var ts1 = "3.37.0\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_JSON1\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00day\x00month\x00year\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00%04d-%02d-%02d %02d:%02d:%02d\x00%02d:%02d:%02d\x00%04d-%02d-%02d\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00julianday\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00ChngCntRow\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00OpenWrite\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00out of memory\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to likelihood() must be a constant between 0.0 and 1.0\x00not authorized to use function: %s\x00non-deterministic functions\x00%.*s() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %.*s()\x00no such function: %.*s\x00wrong number of arguments to function %.*s()\x00FILTER may not be used with non-aggregate %.*s()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %s()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%s\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %s()\x00unknown function: %s()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(\"%w\",\"%w\") WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00table %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00length\x00instr\x00printf\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00log\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00*\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00<expr>\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00=\x00>? AND rowid<\x00 USING INTEGER PRIMARY KEY (rowid%s?)\x00 VIRTUAL TABLE INDEX %d:%s\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%.*s\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00<polyline points=\x00%c%g,%g\x00 %g,%g'\x00 %s\x00></polyline>\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002021-11-27 14:13:22 bd41822c7424d393a30e92ff6cb254d25c26769889c1499a18a0b9339f5d6c8a\x00" + }{Xsqlite3_value_dup})) // sqlite3.c:128384:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 820)) = Xsqlite3_value_free // sqlite3.c:128385:3: + *(*func(*libc.TLS, uintptr, U64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 824)) = Xsqlite3_result_zeroblob64 // sqlite3.c:128386:3: + *(*func(*libc.TLS, uintptr, int32, Sqlite3_uint64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 828)) = Xsqlite3_bind_zeroblob64 // sqlite3.c:128387:3: + *(*func(*libc.TLS, uintptr) uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 832)) = Xsqlite3_value_subtype // sqlite3.c:128389:3: + *(*func(*libc.TLS, uintptr, uint32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 836)) = Xsqlite3_result_subtype // sqlite3.c:128390:3: + *(*func(*libc.TLS, int32, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 840)) = Xsqlite3_status64 // sqlite3.c:128392:3: + *(*func(*libc.TLS, uintptr, uintptr, uint32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 844)) = Xsqlite3_strlike // sqlite3.c:128393:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 848)) = Xsqlite3_db_cacheflush // sqlite3.c:128394:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 852)) = Xsqlite3_system_errno // sqlite3.c:128396:3: + *(*func(*libc.TLS, uintptr, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 856)) = Xsqlite3_trace_v2 // sqlite3.c:128398:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 860)) = Xsqlite3_expanded_sql // sqlite3.c:128399:3: + *(*func(*libc.TLS, uintptr, Sqlite3_int64))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 864)) = Xsqlite3_set_last_insert_rowid // sqlite3.c:128401:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 868)) = Xsqlite3_prepare_v3 // sqlite3.c:128403:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, uint32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 872)) = Xsqlite3_prepare16_v3 // sqlite3.c:128404:3: + *(*func(*libc.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 876)) = Xsqlite3_bind_pointer // sqlite3.c:128405:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 880)) = Xsqlite3_result_pointer // sqlite3.c:128406:3: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 884)) = Xsqlite3_value_pointer // sqlite3.c:128407:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 888)) = Xsqlite3_vtab_nochange // sqlite3.c:128409:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 892)) = Xsqlite3_value_nochange // sqlite3.c:128410:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 896)) = Xsqlite3_vtab_collation // sqlite3.c:128411:3: + *(*func(*libc.TLS) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 900)) = Xsqlite3_keyword_count // sqlite3.c:128413:3: + *(*func(*libc.TLS, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 904)) = Xsqlite3_keyword_name // sqlite3.c:128414:3: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 908)) = Xsqlite3_keyword_check // sqlite3.c:128415:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 912)) = Xsqlite3_str_new // sqlite3.c:128416:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 916)) = Xsqlite3_str_finish // sqlite3.c:128417:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 920)) = Xsqlite3_str_appendf // sqlite3.c:128418:3: + *(*func(*libc.TLS, uintptr, uintptr, Va_list))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 924)) = Xsqlite3_str_vappendf // sqlite3.c:128419:3: + *(*func(*libc.TLS, uintptr, uintptr, int32))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 928)) = Xsqlite3_str_append // sqlite3.c:128420:3: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 932)) = Xsqlite3_str_appendall // sqlite3.c:128421:3: + *(*func(*libc.TLS, uintptr, int32, int8))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 936)) = Xsqlite3_str_appendchar // sqlite3.c:128422:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 940)) = Xsqlite3_str_reset // sqlite3.c:128423:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 944)) = Xsqlite3_str_errcode // sqlite3.c:128424:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 948)) = Xsqlite3_str_length // sqlite3.c:128425:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 952)) = Xsqlite3_str_value // sqlite3.c:128426:3: + *(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 956)) = Xsqlite3_create_window_function // sqlite3.c:128428:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 964)) = Xsqlite3_stmt_isexplain // sqlite3.c:128436:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 968)) = Xsqlite3_value_frombind // sqlite3.c:128437:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 972)) = Xsqlite3_drop_modules // sqlite3.c:128440:3: + *(*func(*libc.TLS, Sqlite3_int64) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 976)) = Xsqlite3_hard_heap_limit64 // sqlite3.c:128445:3: + *(*func(*libc.TLS, uintptr, int32) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 980)) = Xsqlite3_uri_key // sqlite3.c:128446:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 984)) = Xsqlite3_filename_database // sqlite3.c:128447:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 988)) = Xsqlite3_filename_journal // sqlite3.c:128448:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 992)) = Xsqlite3_filename_wal // sqlite3.c:128449:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 996)) = Xsqlite3_create_filename // sqlite3.c:128451:3: + *(*func(*libc.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1000)) = Xsqlite3_free_filename // sqlite3.c:128452:3: + *(*func(*libc.TLS, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1004)) = Xsqlite3_database_file_object // sqlite3.c:128453:3: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1008)) = Xsqlite3_txn_state // sqlite3.c:128455:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1012)) = Xsqlite3_changes64 // sqlite3.c:128457:3: + *(*func(*libc.TLS, uintptr) Sqlite3_int64)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1016)) = Xsqlite3_total_changes64 // sqlite3.c:128458:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3Apis)) + 1020)) = Xsqlite3_autovacuum_pages // sqlite3.c:128460:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 0)) = Xsqlite3Fts5Init // sqlite3.c:166663:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 4)) = Xsqlite3RtreeInit // sqlite3.c:166669:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 8)) = sqlite3TestExtInit // sqlite3.c:166677:3: + *(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&sqlite3BuiltinExtensions)) + 12)) = Xsqlite3Json1Init // sqlite3.c:166679:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statGetFuncdef)) + 16)) = statGet // sqlite3.c:111142:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statInitFuncdef)) + 16)) = statInit // sqlite3.c:110718:3: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&statPushFuncdef)) + 16)) = statPush // sqlite3.c:111008:3: + *(*func(*libc.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 24)) = rbuVfsOpen // sqlite3.c:207046:5: + *(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 28)) = rbuVfsDelete // sqlite3.c:207047:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 32)) = rbuVfsAccess // sqlite3.c:207048:5: + *(*func(*libc.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 36)) = rbuVfsFullPathname // sqlite3.c:207049:5: + *(*func(*libc.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40)) = rbuVfsDlOpen // sqlite3.c:207052:5: + *(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 44)) = rbuVfsDlError // sqlite3.c:207053:5: + *(*func(*libc.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48)) = rbuVfsDlSym // sqlite3.c:207054:5: + *(*func(*libc.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 52)) = rbuVfsDlClose // sqlite3.c:207055:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56)) = rbuVfsRandomness // sqlite3.c:207060:5: + *(*func(*libc.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 60)) = rbuVfsSleep // sqlite3.c:207061:5: + *(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64)) = rbuVfsCurrentTime // sqlite3.c:207062:5: + *(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 68)) = rbuVfsGetLastError // sqlite3.c:207063:5: +} + +var ts1 = "3.37.2\x00ATOMIC_INTRINSICS=1\x00COMPILER=gcc-10.2.1 20210110\x00DEFAULT_AUTOVACUUM\x00DEFAULT_CACHE_SIZE=-2000\x00DEFAULT_FILE_FORMAT=4\x00DEFAULT_JOURNAL_SIZE_LIMIT=-1\x00DEFAULT_MMAP_SIZE=0\x00DEFAULT_PAGE_SIZE=4096\x00DEFAULT_PCACHE_INITSZ=20\x00DEFAULT_RECURSIVE_TRIGGERS\x00DEFAULT_SECTOR_SIZE=4096\x00DEFAULT_SYNCHRONOUS=2\x00DEFAULT_WAL_AUTOCHECKPOINT=1000\x00DEFAULT_WAL_SYNCHRONOUS=2\x00DEFAULT_WORKER_THREADS=0\x00ENABLE_COLUMN_METADATA\x00ENABLE_FTS5\x00ENABLE_GEOPOLY\x00ENABLE_JSON1\x00ENABLE_MATH_FUNCTIONS\x00ENABLE_MEMORY_MANAGEMENT\x00ENABLE_OFFSET_SQL_FUNC\x00ENABLE_PREUPDATE_HOOK\x00ENABLE_RBU\x00ENABLE_RTREE\x00ENABLE_SESSION\x00ENABLE_SNAPSHOT\x00ENABLE_STAT4\x00ENABLE_UNLOCK_NOTIFY\x00LIKE_DOESNT_MATCH_BLOBS\x00MALLOC_SOFT_LIMIT=1024\x00MAX_ATTACHED=10\x00MAX_COLUMN=2000\x00MAX_COMPOUND_SELECT=500\x00MAX_DEFAULT_PAGE_SIZE=8192\x00MAX_EXPR_DEPTH=1000\x00MAX_FUNCTION_ARG=127\x00MAX_LENGTH=1000000000\x00MAX_LIKE_PATTERN_LENGTH=50000\x00MAX_MMAP_SIZE=0x7fff0000\x00MAX_PAGE_COUNT=1073741823\x00MAX_PAGE_SIZE=65536\x00MAX_SQL_LENGTH=1000000000\x00MAX_TRIGGER_DEPTH=1000\x00MAX_VARIABLE_NUMBER=32766\x00MAX_VDBE_OP=250000000\x00MAX_WORKER_THREADS=8\x00MUTEX_NOOP\x00SOUNDEX\x00SYSTEM_MALLOC\x00TEMP_STORE=1\x00THREADSAFE=1\x00BINARY\x00ANY\x00BLOB\x00INT\x00INTEGER\x00REAL\x00TEXT\x0020b:20e\x0020c:20e\x0020e\x0040f-21a-21d\x00now\x00local time unavailable\x00second\x00minute\x00hour\x00day\x00month\x00year\x00localtime\x00unixepoch\x00utc\x00weekday \x00start of \x00%04d-%02d-%02d %02d:%02d:%02d\x00%02d:%02d:%02d\x00%04d-%02d-%02d\x00%02d\x00%06.3f\x00%03d\x00%.16g\x00%lld\x00%04d\x00julianday\x00date\x00time\x00datetime\x00strftime\x00current_time\x00current_timestamp\x00current_date\x00failed to allocate %u bytes of memory\x00failed memory resize %u to %u bytes\x000123456789ABCDEF0123456789abcdef\x00-x0\x00X0\x00%\x00NaN\x00Inf\x00\x00NULL\x00(NULL)\x00.\x00SUBQUERY %u\x00thstndrd\x00922337203685477580\x00API call with %s database connection pointer\x00unopened\x00invalid\x00Savepoint\x00AutoCommit\x00Transaction\x00SorterNext\x00Prev\x00Next\x00Checkpoint\x00JournalMode\x00Vacuum\x00VFilter\x00VUpdate\x00Goto\x00Gosub\x00InitCoroutine\x00Yield\x00MustBeInt\x00Jump\x00Once\x00If\x00Not\x00IfNot\x00IsNullOrType\x00IfNullRow\x00SeekLT\x00SeekLE\x00SeekGE\x00SeekGT\x00IfNotOpen\x00IfNoHope\x00NoConflict\x00NotFound\x00Found\x00SeekRowid\x00NotExists\x00Last\x00IfSmaller\x00SorterSort\x00Sort\x00Rewind\x00IdxLE\x00IdxGT\x00IdxLT\x00IdxGE\x00Or\x00And\x00RowSetRead\x00RowSetTest\x00Program\x00FkIfZero\x00IfPos\x00IsNull\x00NotNull\x00Ne\x00Eq\x00Gt\x00Le\x00Lt\x00Ge\x00ElseEq\x00IfNotZero\x00DecrJumpZero\x00IncrVacuum\x00VNext\x00Init\x00PureFunc\x00Function\x00Return\x00EndCoroutine\x00HaltIfNull\x00Halt\x00Integer\x00Int64\x00String\x00Null\x00SoftNull\x00Blob\x00Variable\x00Move\x00Copy\x00SCopy\x00IntCopy\x00ChngCntRow\x00ResultRow\x00CollSeq\x00AddImm\x00RealAffinity\x00Cast\x00Permutation\x00Compare\x00IsTrue\x00ZeroOrNull\x00Offset\x00Column\x00TypeCheck\x00Affinity\x00MakeRecord\x00Count\x00ReadCookie\x00SetCookie\x00ReopenIdx\x00OpenRead\x00OpenWrite\x00BitAnd\x00BitOr\x00ShiftLeft\x00ShiftRight\x00Add\x00Subtract\x00Multiply\x00Divide\x00Remainder\x00Concat\x00OpenDup\x00BitNot\x00OpenAutoindex\x00OpenEphemeral\x00String8\x00SorterOpen\x00SequenceTest\x00OpenPseudo\x00Close\x00ColumnsUsed\x00SeekScan\x00SeekHit\x00Sequence\x00NewRowid\x00Insert\x00RowCell\x00Delete\x00ResetCount\x00SorterCompare\x00SorterData\x00RowData\x00Rowid\x00NullRow\x00SeekEnd\x00IdxInsert\x00SorterInsert\x00IdxDelete\x00DeferredSeek\x00IdxRowid\x00FinishSeek\x00Destroy\x00Clear\x00ResetSorter\x00CreateBtree\x00SqlExec\x00ParseSchema\x00LoadAnalysis\x00DropTable\x00DropIndex\x00DropTrigger\x00Real\x00IntegrityCk\x00RowSetAdd\x00Param\x00FkCounter\x00MemMax\x00OffsetLimit\x00AggInverse\x00AggStep\x00AggStep1\x00AggValue\x00AggFinal\x00Expire\x00CursorLock\x00CursorUnlock\x00TableLock\x00VBegin\x00VCreate\x00VDestroy\x00VOpen\x00VColumn\x00VRename\x00Pagecount\x00MaxPgcnt\x00Trace\x00CursorHint\x00ReleaseReg\x00Noop\x00Explain\x00Abortable\x00open\x00close\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00read\x00pread\x00pread64\x00write\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00unlink\x00openDirectory\x00mkdir\x00rmdir\x00fchown\x00geteuid\x00mmap\x00munmap\x00mremap\x00getpagesize\x00readlink\x00lstat\x00ioctl\x00attempt to open \"%s\" as file descriptor %d\x00/dev/null\x00os_unix.c:%d: (%d) %s(%s) - %s\x00cannot fstat db file %s\x00file unlinked while open: %s\x00multiple links to file: %s\x00file renamed while open: %s\x00%s\x00full_fsync\x00%s-shm\x00readonly_shm\x00psow\x00unix-excl\x00%s.lock\x00/var/tmp\x00/usr/tmp\x00/tmp\x00SQLITE_TMPDIR\x00TMPDIR\x00%s/etilqs_%llx%c\x00modeof\x00fsync\x00/dev/urandom\x00unix\x00unix-none\x00unix-dotfile\x00memdb\x00memdb(%p,%lld)\x00PRAGMA \"%w\".page_count\x00ATTACH x AS %Q\x00recovered %d pages from %s\x00-journal\x00-wal\x00nolock\x00immutable\x00recovered %d frames from WAL file %s\x00cannot limit WAL size: %s\x00SQLite format 3\x00:memory:\x00@ \x00\n\x00invalid page number %d\x002nd reference to page %d\x00Failed to read ptrmap key=%d\x00Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)\x00failed to get page %d\x00freelist leaf count too big on page %d\x00%s is %d but should be %d\x00size\x00overflow list length\x00Page %u: \x00unable to get the page. error code=%d\x00btreeInitPage() returns error code %d\x00free space corruption\x00On tree page %u cell %d: \x00On page %u at right child: \x00Offset %d out of range %d..%d\x00Extends off end of page\x00Rowid %lld out of order\x00Child page depth differs\x00Multiple uses for byte %u of page %u\x00Fragmentation of %d bytes reported as %d on page %u\x00Main freelist: \x00max rootpage (%d) disagrees with header (%d)\x00incremental_vacuum enabled with a max rootpage of zero\x00Page %d is never used\x00Pointer map page %d is referenced\x00unknown database %s\x00destination database is in use\x00source and destination must be distinct\x00%!.15g\x00-\x00%s%s\x00k(%d\x00B\x00,%s%s%s\x00N.\x00)\x00%.18s-%s\x00%s(%d)\x00%d\x00(blob)\x00vtab:%p\x00%c%u\x00]\x00program\x00?\x008\x0016LE\x0016BE\x00addr\x00opcode\x00p1\x00p2\x00p3\x00p4\x00p5\x00comment\x00id\x00parent\x00notused\x00detail\x00%.4c%s%.16c\x00MJ delete: %s\x00MJ collide: %s\x00-mj%06X9%02X\x00FOREIGN KEY constraint failed\x00a CHECK constraint\x00a generated column\x00an index\x00non-deterministic use of %s() in %s\x00API called with finalized prepared statement\x00API called with NULL prepared statement\x00string or blob too big\x00bind on a busy prepared statement: [%s]\x00-- \x00'%.*q'\x00zeroblob(%d)\x00x'\x00%02x\x00'\x00%s constraint failed\x00%z: %s\x00abort at %d in [%s]: %s\x00cannot store %s value in %s column %s.%s\x00cannot open savepoint - SQL statements in progress\x00no such savepoint: %s\x00cannot release savepoint - SQL statements in progress\x00cannot commit transaction - SQL statements in progress\x00cannot start a transaction within a transaction\x00cannot rollback - no transaction is active\x00cannot commit - no transaction is active\x00database schema has changed\x00index corruption\x00sqlite_master\x00SELECT*FROM\"%w\".%s WHERE %s ORDER BY rowid\x00too many levels of trigger recursion\x00cannot change %s wal mode from within a transaction\x00into\x00out of\x00database table is locked: %s\x00-- %s\x00statement aborts at %d: [%s] %s\x00out of memory\x00NOT NULL\x00UNIQUE\x00CHECK\x00FOREIGN KEY\x00cannot open value of type %s\x00null\x00real\x00integer\x00no such rowid: %lld\x00cannot open virtual table: %s\x00cannot open table without rowid: %s\x00cannot open view: %s\x00no such column: \"%s\"\x00foreign key\x00indexed\x00cannot open %s column for writing\x00main\x00new\x00old\x00excluded\x00misuse of aliased aggregate %s\x00misuse of aliased window function %s\x00row value misused\x00double-quoted string literal: \"%w\"\x00no such column\x00ambiguous column name\x00%s: %s.%s.%s\x00%s: %s.%s\x00%s: %s\x00partial index WHERE clauses\x00index expressions\x00CHECK constraints\x00generated columns\x00%s prohibited in %s\x00true\x00false\x00the \".\" operator\x00second argument to likelihood() must be a constant between 0.0 and 1.0\x00not authorized to use function: %s\x00non-deterministic functions\x00%.*s() may not be used as a window function\x00window\x00aggregate\x00misuse of %s function %.*s()\x00no such function: %.*s\x00wrong number of arguments to function %.*s()\x00FILTER may not be used with non-aggregate %.*s()\x00subqueries\x00parameters\x00%r %s BY term out of range - should be between 1 and %d\x00too many terms in ORDER BY clause\x00ORDER\x00%r ORDER BY term does not match any column in the result set\x00too many terms in %s BY clause\x00a GROUP BY clause is required before HAVING\x00GROUP\x00aggregate functions are not allowed in the GROUP BY clause\x00Expression tree is too large (maximum depth %d)\x00IN(...) element has %d term%s - expected %d\x00s\x000\x00too many arguments on function %T\x00unsafe use of %s()\x00variable number must be between ?1 and ?%d\x00too many SQL variables\x00%d columns assigned %d values\x00too many columns in %s\x00_ROWID_\x00ROWID\x00OID\x00USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR\x00USING INDEX %s FOR IN-OPERATOR\x00sub-select returns %d columns - expected %d\x00REUSE LIST SUBQUERY %d\x00%sLIST SUBQUERY %d\x00CORRELATED \x00REUSE SUBQUERY %d\x00%sSCALAR SUBQUERY %d\x001\x000x\x00hex literal too big: %s%s\x00generated column loop on \"%s\"\x00blob\x00text\x00numeric\x00none\x00misuse of aggregate: %s()\x00unknown function: %s()\x00RAISE() may only be used within a trigger-program\x00B\x00C\x00D\x00E\x00sqlite_\x00table %s may not be altered\x00SELECT 1 FROM \"%w\".sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, %d, %Q, %d)=NULL \x00SELECT 1 FROM temp.sqlite_master WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%' AND sqlite_rename_test(%Q, sql, type, name, 1, %Q, %d)=NULL \x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_quotefix(%Q, sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_quotefix('temp', sql)WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND sql NOT LIKE 'create virtual%%'\x00there is already another table or index with this name: %s\x00table\x00view %s may not be altered\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, %d) WHERE (type!='index' OR tbl_name=%Q COLLATE nocase)AND name NOT LIKE 'sqliteX_%%' ESCAPE 'X'\x00UPDATE %Q.sqlite_master SET tbl_name = %Q, name = CASE WHEN type='table' THEN %Q WHEN name LIKE 'sqliteX_autoindex%%' ESCAPE 'X' AND type='index' THEN 'sqlite_autoindex_' || %Q || substr(name,%d+18) ELSE name END WHERE tbl_name=%Q COLLATE nocase AND (type='table' OR type='index' OR type='trigger');\x00sqlite_sequence\x00UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q\x00UPDATE sqlite_temp_schema SET sql = sqlite_rename_table(%Q, type, name, sql, %Q, %Q, 1), tbl_name = CASE WHEN tbl_name=%Q COLLATE nocase AND sqlite_rename_test(%Q, sql, type, name, 1, 'after rename', 0) THEN %Q ELSE tbl_name END WHERE type IN ('view', 'trigger')\x00after rename\x00SELECT raise(ABORT,%Q) FROM \"%w\".\"%w\"\x00Cannot add a PRIMARY KEY column\x00Cannot add a UNIQUE column\x00Cannot add a REFERENCES column with non-NULL default value\x00Cannot add a NOT NULL column with default value NULL\x00Cannot add a column with non-constant default\x00cannot add a STORED column\x00UPDATE \"%w\".sqlite_master SET sql = printf('%%.%ds, ',sql) || %Q || substr(sql,1+length(printf('%%.%ds',sql))) WHERE type = 'table' AND name = %Q\x00SELECT CASE WHEN quick_check GLOB 'CHECK*' THEN raise(ABORT,'CHECK constraint failed') ELSE raise(ABORT,'NOT NULL constraint failed') END FROM pragma_quick_check(\"%w\",\"%w\") WHERE quick_check GLOB 'CHECK*' OR quick_check GLOB 'NULL*'\x00virtual tables may not be altered\x00Cannot add a column to a view\x00sqlite_altertab_%s\x00view\x00virtual table\x00cannot %s %s \"%s\"\x00drop column from\x00rename columns of\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, %d) WHERE name NOT LIKE 'sqliteX_%%' ESCAPE 'X' AND (type != 'index' OR tbl_name = %Q)\x00UPDATE temp.sqlite_master SET sql = sqlite_rename_column(sql, type, name, %Q, %Q, %d, %Q, %d, 1) WHERE type IN ('trigger', 'view')\x00error in %s %s%s%s: %s\x00 \x00\"%w\" \x00%Q%s\x00%.*s%s\x00cannot drop %s column: \"%s\"\x00PRIMARY KEY\x00cannot drop column \"%s\": no other columns exist\x00UPDATE \"%w\".sqlite_master SET sql = sqlite_drop_column(%d, sql, %d) WHERE (type=='table' AND tbl_name=%Q COLLATE nocase)\x00after drop column\x00sqlite_rename_column\x00sqlite_rename_table\x00sqlite_rename_test\x00sqlite_drop_column\x00sqlite_rename_quotefix\x00CREATE TABLE %Q.%s(%s)\x00DELETE FROM %Q.%s WHERE %s=%Q\x00DELETE FROM %Q.%s\x00sqlite_stat1\x00tbl,idx,stat\x00sqlite_stat4\x00tbl,idx,neq,nlt,ndlt,sample\x00sqlite_stat3\x00stat_init\x00stat_push\x00%llu\x00 %llu\x00%llu \x00stat_get\x00sqlite\\_%\x00BBB\x00idx\x00tbl\x00unordered*\x00sz=[0-9]*\x00noskipscan*\x00SELECT idx,count(*) FROM %Q.sqlite_stat4 GROUP BY idx\x00SELECT idx,neq,nlt,ndlt,sample FROM %Q.sqlite_stat4\x00SELECT tbl,idx,stat FROM %Q.sqlite_stat1\x00x\x00\x00too many attached databases - max %d\x00database %s is already in use\x00database is already attached\x00attached databases must use the same text encoding as main database\x00unable to open database: %s\x00no such database: %s\x00cannot detach database %s\x00database %s is locked\x00sqlite_detach\x00sqlite_attach\x00%s cannot use variables\x00%s %T cannot reference objects in database %s\x00authorizer malfunction\x00%s.%s\x00%s.%z\x00access to %z is prohibited\x00not authorized\x00sqlite_temp_schema\x00sqlite_schema\x00sqlite_temp_master\x00pragma_\x00no such view\x00no such table\x00corrupt database\x00unknown database %T\x00object name reserved for internal use: %s\x00temporary table name must be unqualified\x00table %T already exists\x00there is already an index named %s\x00sqlite_returning\x00cannot use RETURNING in a trigger\x00too many columns on %s\x00always\x00generated\x00duplicate column name: %s\x00default value of column [%s] is not constant\x00cannot use DEFAULT on a generated column\x00generated columns cannot be part of the PRIMARY KEY\x00table \"%s\" has more than one primary key\x00AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY\x00virtual tables cannot use computed columns\x00virtual\x00stored\x00error in generated column \"%s\"\x00,\x00\n \x00,\n \x00\n)\x00CREATE TABLE \x00 TEXT\x00 NUM\x00 INT\x00 REAL\x00unknown datatype for %s.%s: \"%s\"\x00missing datatype for %s.%s\x00AUTOINCREMENT not allowed on WITHOUT ROWID tables\x00PRIMARY KEY missing on table %s\x00must have at least one non-generated column\x00TABLE\x00VIEW\x00CREATE %s %.*s\x00UPDATE %Q.sqlite_master SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q WHERE rowid=#%d\x00CREATE TABLE %Q.sqlite_sequence(name,seq)\x00tbl_name='%q' AND type!='trigger'\x00parameters are not allowed in views\x00view %s is circularly defined\x00corrupt schema\x00UPDATE %Q.sqlite_master SET rootpage=%d WHERE #%d AND rootpage=#%d\x00sqlite_stat%d\x00DELETE FROM %Q.sqlite_sequence WHERE name=%Q\x00DELETE FROM %Q.sqlite_master WHERE tbl_name=%Q and type!='trigger'\x00table %s may not be dropped\x00use DROP TABLE to delete table %s\x00use DROP VIEW to delete view %s\x00foreign key on %s should reference only one column of table %T\x00number of columns in foreign key does not match the number of columns in the referenced table\x00unknown column \"%s\" in foreign key definition\x00unsupported use of NULLS %s\x00FIRST\x00LAST\x00index\x00cannot create a TEMP index on non-TEMP table \"%s\"\x00table %s may not be indexed\x00views may not be indexed\x00virtual tables may not be indexed\x00there is already a table named %s\x00index %s already exists\x00sqlite_autoindex_%s_%d\x00expressions prohibited in PRIMARY KEY and UNIQUE constraints\x00conflicting ON CONFLICT clauses specified\x00invalid rootpage\x00CREATE%s INDEX %.*s\x00 UNIQUE\x00INSERT INTO %Q.sqlite_master VALUES('index',%Q,%Q,#%d,%Q);\x00name='%q' AND type='index'\x00no such index: %S\x00index associated with UNIQUE or PRIMARY KEY constraint cannot be dropped\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='index'\x00too many FROM clause terms, max: %d\x00a JOIN clause is required before %s\x00ON\x00USING\x00BEGIN\x00ROLLBACK\x00COMMIT\x00RELEASE\x00unable to open a temporary database file for storing temporary tables\x00index '%q'\x00, \x00%s.rowid\x00unable to identify the object to be reindexed\x00duplicate WITH table name: %s\x00no such collation sequence: %s\x00table %s may not be modified\x00cannot modify %s because it is a view\x00rows deleted\x00integer overflow\x00%.*f\x00LIKE or GLOB pattern too complex\x00ESCAPE expression must be a single character\x00%!.20e\x00?000\x00MATCH\x00like\x00implies_nonnull_row\x00expr_compare\x00expr_implies_expr\x00affinity\x00soundex\x00load_extension\x00sqlite_compileoption_used\x00sqlite_compileoption_get\x00unlikely\x00likelihood\x00likely\x00sqlite_offset\x00ltrim\x00rtrim\x00trim\x00min\x00max\x00typeof\x00length\x00instr\x00printf\x00unicode\x00char\x00abs\x00round\x00upper\x00lower\x00hex\x00ifnull\x00random\x00randomblob\x00nullif\x00sqlite_version\x00sqlite_source_id\x00sqlite_log\x00quote\x00last_insert_rowid\x00changes\x00total_changes\x00replace\x00zeroblob\x00substr\x00substring\x00sum\x00total\x00avg\x00count\x00group_concat\x00glob\x00coalesce\x00ceil\x00ceiling\x00floor\x00trunc\x00ln\x00log\x00log10\x00log2\x00exp\x00pow\x00power\x00mod\x00acos\x00asin\x00atan\x00atan2\x00cos\x00sin\x00tan\x00cosh\x00sinh\x00tanh\x00acosh\x00asinh\x00atanh\x00sqrt\x00radians\x00degrees\x00pi\x00sign\x00iif\x00foreign key mismatch - \"%w\" referencing \"%w\"\x00cannot INSERT into generated column \"%s\"\x00table %S has no column named %s\x00table %S has %d columns but %d values were supplied\x00%d values for %d columns\x00UPSERT not implemented for virtual table \"%s\"\x00cannot UPSERT a view\x00rows inserted\x00sqlite3_extension_init\x00sqlite3_\x00lib\x00_init\x00no entry point [%s] in shared library [%s]\x00error during initialization: %s\x00unable to open shared library [%.*s]\x00so\x00automatic extension loading failed: %s\x00seq\x00from\x00to\x00on_update\x00on_delete\x00match\x00cid\x00name\x00type\x00notnull\x00dflt_value\x00pk\x00hidden\x00schema\x00ncol\x00wr\x00strict\x00seqno\x00desc\x00coll\x00key\x00builtin\x00enc\x00narg\x00flags\x00wdth\x00hght\x00flgs\x00unique\x00origin\x00partial\x00rowid\x00fkid\x00file\x00busy\x00checkpointed\x00database\x00status\x00cache_size\x00timeout\x00analysis_limit\x00application_id\x00auto_vacuum\x00automatic_index\x00busy_timeout\x00cache_spill\x00case_sensitive_like\x00cell_size_check\x00checkpoint_fullfsync\x00collation_list\x00compile_options\x00count_changes\x00data_version\x00database_list\x00default_cache_size\x00defer_foreign_keys\x00empty_result_callbacks\x00encoding\x00foreign_key_check\x00foreign_key_list\x00foreign_keys\x00freelist_count\x00full_column_names\x00fullfsync\x00function_list\x00hard_heap_limit\x00ignore_check_constraints\x00incremental_vacuum\x00index_info\x00index_list\x00index_xinfo\x00integrity_check\x00journal_mode\x00journal_size_limit\x00legacy_alter_table\x00locking_mode\x00max_page_count\x00mmap_size\x00module_list\x00optimize\x00page_count\x00page_size\x00pragma_list\x00query_only\x00quick_check\x00read_uncommitted\x00recursive_triggers\x00reverse_unordered_selects\x00schema_version\x00secure_delete\x00short_column_names\x00shrink_memory\x00soft_heap_limit\x00synchronous\x00table_info\x00table_list\x00table_xinfo\x00temp_store\x00temp_store_directory\x00threads\x00trusted_schema\x00user_version\x00wal_autocheckpoint\x00wal_checkpoint\x00writable_schema\x00onoffalseyestruextrafull\x00exclusive\x00normal\x00full\x00incremental\x00memory\x00temporary storage cannot be changed from within a transaction\x00SET NULL\x00SET DEFAULT\x00CASCADE\x00RESTRICT\x00NO ACTION\x00delete\x00persist\x00off\x00truncate\x00wal\x00w\x00a\x00sissii\x00utf8\x00utf16le\x00utf16be\x00-%T\x00fast\x00not a writable directory\x00Safety level may not be changed inside a transaction\x00reset\x00issisii\x00issisi\x00SELECT*FROM\"%w\"\x00shadow\x00sssiii\x00iisX\x00isiX\x00c\x00u\x00isisi\x00iss\x00is\x00iissssss\x00NONE\x00siX\x00*** in database %s ***\n\x00NULL value in %s.%s\x00non-%s value in %s.%s\x00CHECK constraint failed in %s\x00row \x00 missing from index \x00non-unique entry in index \x00wrong # of entries in index \x00ok\x00unsupported encoding: %s\x00restart\x00ANALYZE \"%w\".\"%w\"\x00UTF8\x00UTF-8\x00UTF-16le\x00UTF-16be\x00UTF16le\x00UTF16be\x00UTF-16\x00UTF16\x00CREATE TABLE x\x00%c\"%s\"\x00(\"%s\"\x00,arg HIDDEN\x00,schema HIDDEN\x00PRAGMA \x00%Q.\x00=%Q\x00error in %s %s after %s: %s\x00malformed database schema (%s)\x00%z - %s\x00rename\x00drop column\x00add column\x00orphan index\x00CREATE TABLE x(type text,name text,tbl_name text,rootpage int,sql text)\x00unsupported file format\x00SELECT*FROM\"%w\".%s ORDER BY rowid\x00database schema is locked: %s\x00statement too long\x00unknown or unsupported join type: %T %T%s%T\x00RIGHT and FULL OUTER JOINs are not currently supported\x00naturaleftouterightfullinnercross\x00a NATURAL join may not have an ON or USING clause\x00cannot have both ON and USING clauses in the same join\x00cannot join using column %s - column not present in both tables\x00UNION ALL\x00INTERSECT\x00EXCEPT\x00UNION\x00USE TEMP B-TREE FOR %s\x00column%d\x00%.*z:%u\x00cannot use window functions in recursive queries\x00recursive aggregate queries not supported\x00SETUP\x00RECURSIVE STEP\x00SCAN %d CONSTANT ROW%s\x00S\x00COMPOUND QUERY\x00LEFT-MOST SUBQUERY\x00%s USING TEMP B-TREE\x00all VALUES must have the same number of terms\x00SELECTs to the left and right of %s do not have the same number of result columns\x00MERGE (%s)\x00LEFT\x00RIGHT\x00no such index: %s\x00'%s' is not a function\x00no such index: \"%s\"\x00multiple references to recursive table: %s\x00circular reference: %s\x00table %s has %d values for %d columns\x00multiple recursive references: %s\x00recursive reference in a subquery: %s\x00subquery_%u\x00too many references to \"%s\": max 65535\x00access to view \"%s\" prohibited\x00unsafe use of virtual table \"%s\"\x00*\x00%s.%s.%s\x00no such table: %s\x00no tables specified\x00too many columns in result set\x00DISTINCT aggregates must have exactly one argument\x00USE TEMP B-TREE FOR %s(DISTINCT)\x00SCAN %s%s%s\x00 USING COVERING INDEX \x00target object/alias may not appear in FROM clause: %s\x00expected %d columns for '%s' but got %d\x00CO-ROUTINE %!S\x00MATERIALIZE %!S\x00DISTINCT\x00GROUP BY\x00RIGHT PART OF ORDER BY\x00ORDER BY\x00sqlite3_get_table() called with two or more incompatible queries\x00temporary trigger may not have qualified name\x00trigger\x00cannot create triggers on virtual tables\x00trigger %T already exists\x00cannot create trigger on system table\x00cannot create %s trigger on view: %S\x00BEFORE\x00AFTER\x00cannot create INSTEAD OF trigger on table: %S\x00INSERT INTO %Q.sqlite_master VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')\x00type='trigger' AND name='%q'\x00no such trigger: %S\x00DELETE FROM %Q.sqlite_master WHERE name=%Q AND type='trigger'\x00%s RETURNING is not available on virtual tables\x00DELETE\x00UPDATE\x00RETURNING may not use \"TABLE.*\" wildcards\x00-- TRIGGER %s\x00cannot UPDATE generated column \"%s\"\x00no such column: %s\x00rows updated\x00%r \x00%sON CONFLICT clause does not match any PRIMARY KEY or UNIQUE constraint\x00CRE\x00INS\x00cannot VACUUM from within a transaction\x00cannot VACUUM - SQL statements in progress\x00non-text filename\x00ATTACH %Q AS vacuum_db\x00output file already exists\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='table'AND name<>'sqlite_sequence' AND coalesce(rootpage,1)>0\x00SELECT sql FROM \"%w\".sqlite_schema WHERE type='index'\x00SELECT'INSERT INTO vacuum_db.'||quote(name)||' SELECT*FROM\"%w\".'||quote(name)FROM vacuum_db.sqlite_schema WHERE type='table'AND coalesce(rootpage,1)>0\x00INSERT INTO vacuum_db.sqlite_schema SELECT*FROM \"%w\".sqlite_schema WHERE type IN('view','trigger') OR(type='table'AND rootpage=0)\x00CREATE VIRTUAL TABLE %T\x00UPDATE %Q.sqlite_master SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q WHERE rowid=#%d\x00name=%Q AND sql=%Q\x00vtable constructor called recursively: %s\x00vtable constructor failed: %s\x00vtable constructor did not declare schema: %s\x00no such module: %s\x00<expr>\x00 AND \x00(\x00 (\x00%s=?\x00ANY(%s)\x00>\x00<\x00%s %S\x00SEARCH\x00SCAN\x00AUTOMATIC PARTIAL COVERING INDEX\x00AUTOMATIC COVERING INDEX\x00COVERING INDEX %s\x00INDEX %s\x00 USING \x00=\x00>? AND rowid<\x00 USING INTEGER PRIMARY KEY (rowid%s?)\x00 VIRTUAL TABLE INDEX %d:%s\x00MULTI-INDEX OR\x00INDEX %d\x00regexp\x00ON clause references tables to its right\x00NOCASE\x00too many arguments on %s() - max %d\x00automatic index on %s(%s)\x00auto-index\x00%s.xBestIndex malfunction\x00abbreviated query algorithm search\x00no query solution\x00at most %d tables in a join\x00SCAN CONSTANT ROW\x00second argument to nth_value must be a positive integer\x00argument of ntile must be a positive integer\x00row_number\x00dense_rank\x00rank\x00percent_rank\x00cume_dist\x00ntile\x00last_value\x00nth_value\x00first_value\x00lead\x00lag\x00no such window: %s\x00RANGE with offset PRECEDING/FOLLOWING requires one ORDER BY expression\x00FILTER clause may only be used with aggregate window functions\x00unsupported frame specification\x00PARTITION clause\x00ORDER BY clause\x00frame specification\x00cannot override %s of window: %s\x00DISTINCT is not supported for window functions\x00frame starting offset must be a non-negative integer\x00frame ending offset must be a non-negative integer\x00frame starting offset must be a non-negative number\x00frame ending offset must be a non-negative number\x00%s clause should come after %s not before\x00LIMIT\x00too many terms in compound SELECT\x00syntax error after column name \"%.*s\"\x00parser stack overflow\x00unknown table option: %.*s\x00set list\x00near \"%T\": syntax error\x00qualified table names are not allowed on INSERT, UPDATE, and DELETE statements within triggers\x00the INDEXED BY clause is not allowed on UPDATE or DELETE statements within triggers\x00the NOT INDEXED clause is not allowed on UPDATE or DELETE statements within triggers\x00incomplete input\x00unrecognized token: \"%.*s\"\x00%s in \"%s\"\x00create\x00temp\x00temporary\x00end\x00explain\x00unable to close due to unfinalized statements or unfinished backups\x00unknown error\x00abort due to ROLLBACK\x00another row available\x00no more rows available\x00not an error\x00SQL logic error\x00access permission denied\x00query aborted\x00database is locked\x00database table is locked\x00attempt to write a readonly database\x00interrupted\x00disk I/O error\x00database disk image is malformed\x00unknown operation\x00database or disk is full\x00unable to open database file\x00locking protocol\x00constraint failed\x00datatype mismatch\x00bad parameter or other API misuse\x00authorization denied\x00column index out of range\x00file is not a database\x00notification message\x00warning message\x00unable to delete/modify user-function due to active statements\x00unable to use function %s in the requested context\x00unknown database: %s\x00unable to delete/modify collation sequence due to active statements\x00file:\x00localhost\x00invalid uri authority: %.*s\x00vfs\x00cache\x00mode\x00no such %s mode: %s\x00%s mode not allowed: %s\x00no such vfs: %s\x00shared\x00private\x00ro\x00rw\x00rwc\x00RTRIM\x00\x00\x00\x00%s at line %d of [%.10s]\x00database corruption\x00misuse\x00cannot open file\x00no such table column: %s.%s\x00SQLITE_\x00database is deadlocked\x00array\x00object\x000123456789abcdef\x00JSON cannot hold BLOB values\x00malformed JSON\x00[0]\x00JSON path error near '%q'\x00json_%s() needs an odd number of arguments\x00json_object() requires an even number of arguments\x00json_object() labels must be TEXT\x00set\x00insert\x00[]\x00{}\x00CREATE TABLE x(key,value,type,atom,id,parent,fullkey,path,json HIDDEN,root HIDDEN)\x00[%d]\x00.%.*s\x00$\x00json\x00json_array\x00json_array_length\x00json_extract\x00json_insert\x00json_object\x00json_patch\x00json_quote\x00json_remove\x00json_replace\x00json_set\x00json_type\x00json_valid\x00json_group_array\x00json_group_object\x00json_each\x00json_tree\x00%s_node\x00data\x00DROP TABLE '%q'.'%q_node';DROP TABLE '%q'.'%q_rowid';DROP TABLE '%q'.'%q_parent';\x00RtreeMatchArg\x00SELECT * FROM %Q.%Q\x00UNIQUE constraint failed: %s.%s\x00rtree constraint failed: %s.(%s<=%s)\x00ALTER TABLE %Q.'%q_node' RENAME TO \"%w_node\";ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";ALTER TABLE %Q.'%q_rowid' RENAME TO \"%w_rowid\";\x00SELECT stat FROM %Q.sqlite_stat1 WHERE tbl = '%q_rowid'\x00node\x00CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY,nodeno\x00,a%d\x00);CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY,data);\x00CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY,parentnode);\x00INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))\x00INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)ON CONFLICT(rowid)DO UPDATE SET nodeno=excluded.nodeno\x00SELECT * FROM \"%w\".\"%w_rowid\" WHERE rowid=?1\x00UPDATE \"%w\".\"%w_rowid\"SET \x00a%d=coalesce(?%d,a%d)\x00a%d=?%d\x00 WHERE rowid=?1\x00INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_node' WHERE nodeno = ?1\x00SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_rowid' WHERE rowid = ?1\x00SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)\x00DELETE FROM '%q'.'%q_parent' WHERE nodeno = ?1\x00PRAGMA %Q.page_size\x00SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1\x00undersize RTree blobs in \"%q_node\"\x00Wrong number of columns for an rtree table\x00Too few columns for an rtree table\x00Too many columns for an rtree table\x00Auxiliary rtree columns must be last\x00CREATE TABLE x(%.*s INT\x00,%.*s\x00);\x00,%.*s REAL\x00,%.*s INT\x00{%lld\x00 %g\x00}\x00Invalid argument to rtreedepth()\x00%z%s%z\x00SELECT data FROM %Q.'%q_node' WHERE nodeno=?\x00Node %lld missing from database\x00SELECT parentnode FROM %Q.'%q_parent' WHERE nodeno=?1\x00SELECT nodeno FROM %Q.'%q_rowid' WHERE rowid=?1\x00Mapping (%lld -> %lld) missing from %s table\x00%_rowid\x00%_parent\x00Found (%lld -> %lld) in %s table, expected (%lld -> %lld)\x00Dimension %d of cell %d on node %lld is corrupt\x00Dimension %d of cell %d on node %lld is corrupt relative to parent\x00Node %lld is too small (%d bytes)\x00Rtree depth out of range (%d)\x00Node %lld is too small for cell count of %d (%d bytes)\x00SELECT count(*) FROM %Q.'%q%s'\x00Wrong number of entries in %%%s table - expected %lld, actual %lld\x00SELECT * FROM %Q.'%q_rowid'\x00Schema corrupt or not an rtree\x00_rowid\x00_parent\x00END\x00wrong number of arguments to function rtreecheck()\x00[\x00[%!g,%!g],\x00[%!g,%!g]]\x00<polyline points=\x00%c%g,%g\x00 %g,%g'\x00 %s\x00></polyline>\x00CREATE TABLE x(_shape\x00,%s\x00rtree\x00fullscan\x00_shape does not contain a valid polygon\x00geopoly_overlap\x00geopoly_within\x00geopoly\x00geopoly_area\x00geopoly_blob\x00geopoly_json\x00geopoly_svg\x00geopoly_contains_point\x00geopoly_debug\x00geopoly_bbox\x00geopoly_xform\x00geopoly_regular\x00geopoly_ccw\x00geopoly_group_bbox\x00rtreenode\x00rtreedepth\x00rtreecheck\x00rtree_i32\x00corrupt fossil delta\x00DROP TRIGGER IF EXISTS temp.rbu_insert_tr;DROP TRIGGER IF EXISTS temp.rbu_update1_tr;DROP TRIGGER IF EXISTS temp.rbu_update2_tr;DROP TRIGGER IF EXISTS temp.rbu_delete_tr;\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_schema WHERE type IN ('table', 'view') AND target IS NOT NULL %s ORDER BY name\x00AND rootpage!=0 AND rootpage IS NOT NULL\x00SELECT name, rootpage, sql IS NULL OR substr(8, 6)=='UNIQUE' FROM main.sqlite_schema WHERE type='index' AND tbl_name = ?\x00SELECT (sql COLLATE nocase BETWEEN 'CREATE VIRTUAL' AND 'CREATE VIRTUAM'), rootpage FROM sqlite_schema WHERE name=%Q\x00PRAGMA index_list=%Q\x00SELECT rootpage FROM sqlite_schema WHERE name = %Q\x00PRAGMA table_info=%Q\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00SELECT * FROM '%q'\x00rbu_\x00rbu_rowid\x00table %q %s rbu_rowid column\x00may not have\x00requires\x00PRAGMA table_info(%Q)\x00column missing from %q: %s\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00 DESC\x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00_rowid_\x00%z%s \"%w\" COLLATE %Q\x00%z%s \"rbu_imp_%d%w\" COLLATE %Q DESC\x00%z%s quote(\"rbu_imp_%d%w\")\x00SELECT %s FROM \"rbu_imp_%w\" ORDER BY %s LIMIT 1\x00%z%s%s\x00(%s) > (%s)\x00%z%s(%.*s) COLLATE %Q\x00%z%s\"%w\" COLLATE %Q\x00%z%s\"rbu_imp_%d%w\"%s\x00%z%s\"rbu_imp_%d%w\" %s COLLATE %Q\x00%z%s\"rbu_imp_%d%w\" IS ?\x00%z%s%s.\"%w\"\x00%z%sNULL\x00%z, %s._rowid_\x00_rowid_ = ?%d\x00%z%sc%d=?%d\x00_rowid_ = (SELECT id FROM rbu_imposter2 WHERE %z)\x00%z%s\"%w\"=?%d\x00invalid rbu_control value\x00%z%s\"%w\"=rbu_delta(\"%w\", ?%d)\x00%z%s\"%w\"=rbu_fossil_delta(\"%w\", ?%d)\x00PRIMARY KEY(\x00%z%s\"%w\"%s\x00%z)\x00SELECT name FROM sqlite_schema WHERE rootpage = ?\x00%z%sc%d %s COLLATE %Q\x00%z%sc%d%s\x00%z, id INTEGER\x00CREATE TABLE rbu_imposter2(%z, PRIMARY KEY(%z)) WITHOUT ROWID\x00PRIMARY KEY \x00%z%s\"%w\" %s %sCOLLATE %Q%s\x00 NOT NULL\x00%z, %z\x00CREATE TABLE \"rbu_imp_%w\"(%z)%s\x00 WITHOUT ROWID\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00SELECT trim(sql) FROM sqlite_schema WHERE type='index' AND name=?\x00 LIMIT -1 OFFSET %d\x00CREATE TABLE \"rbu_imp_%w\"( %s, PRIMARY KEY( %s ) ) WITHOUT ROWID\x00INSERT INTO \"rbu_imp_%w\" VALUES(%s)\x00DELETE FROM \"rbu_imp_%w\" WHERE %s\x00SELECT %s, 0 AS rbu_control FROM '%q' %s %s %s ORDER BY %s%s\x00AND\x00WHERE\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s ORDER BY %s%s\x00SELECT %s, rbu_control FROM %s.'rbu_tmp_%q' %s UNION ALL SELECT %s, rbu_control FROM '%q' %s %s typeof(rbu_control)='integer' AND rbu_control!=1 ORDER BY %s%s\x00rbu_imp_\x00INSERT INTO \"%s%w\"(%s%s) VALUES(%s)\x00, _rowid_\x00DELETE FROM \"%s%w\" WHERE %s\x00, rbu_rowid\x00CREATE TABLE IF NOT EXISTS %s.'rbu_tmp_%q' AS SELECT *%s FROM '%q' WHERE 0;\x00, 0 AS rbu_rowid\x00CREATE TEMP TRIGGER rbu_delete_tr BEFORE DELETE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update1_tr BEFORE UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(3, %s);END;CREATE TEMP TRIGGER rbu_update2_tr AFTER UPDATE ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(4, %s);END;\x00CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" BEGIN SELECT rbu_tmp_insert(0, %s);END;\x00,_rowid_ \x00,rbu_rowid\x00SELECT %s,%s rbu_control%s FROM '%q'%s %s %s %s\x000 AS \x00UPDATE \"%s%w\" SET %s WHERE %s\x00SELECT k, v FROM %s.rbu_state\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_schema\x00rbu vfs not found\x00PRAGMA main.wal_checkpoint=restart\x00rbu_exclusive_checkpoint\x00%s-oal\x00%s-wal\x00PRAGMA schema_version\x00PRAGMA schema_version = %d\x00INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES (%d, %d), (%d, %Q), (%d, %Q), (%d, %d), (%d, %d), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %lld), (%d, %Q) \x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_schema WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_schema WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_schema VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00DELETE FROM %s.'rbu_tmp_%q'\x00rbu_state mismatch error\x00rbu_vfs_%d\x00SELECT count(*) FROM sqlite_schema WHERE type='index' AND tbl_name = %Q\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_schema WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00-vactmp\x00DELETE FROM stat.rbu_state\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbu_memory\x00SELECT 0, 'tbl', '', 0, '', 1 UNION ALL SELECT 1, 'idx', '', 0, '', 2 UNION ALL SELECT 2, 'stat', '', 0, '', 0\x00PRAGMA '%q'.table_info('%q')\x00%z%s\"%w\".\"%w\".\"%w\"=\"%w\".\"%w\".\"%w\"\x00%z%s\"%w\".\"%w\".\"%w\" IS NOT \"%w\".\"%w\".\"%w\"\x00 OR \x00SELECT * FROM \"%w\".\"%w\" WHERE NOT EXISTS ( SELECT 1 FROM \"%w\".\"%w\" WHERE %s)\x00SELECT * FROM \"%w\".\"%w\", \"%w\".\"%w\" WHERE %s AND (%z)\x00table schemas do not match\x00SELECT tbl, ?2, stat FROM %Q.sqlite_stat1 WHERE tbl IS ?1 AND idx IS (CASE WHEN ?2=X'' THEN NULL ELSE ?2 END)\x00SELECT * FROM \x00 WHERE \x00 IS ?\x00SAVEPOINT changeset\x00RELEASE changeset\x00UPDATE main.\x00 SET \x00 = ?\x00idx IS CASE WHEN length(?4)=0 AND typeof(?4)='blob' THEN NULL ELSE ?4 END \x00DELETE FROM main.\x00 AND (?\x00AND \x00INSERT INTO main.\x00) VALUES(?\x00, ?\x00INSERT INTO main.sqlite_stat1 VALUES(?1, CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END, ?3)\x00DELETE FROM main.sqlite_stat1 WHERE tbl=?1 AND idx IS CASE WHEN length(?2)=0 AND typeof(?2)='blob' THEN NULL ELSE ?2 END AND (?4 OR stat IS ?3)\x00SAVEPOINT replace_op\x00RELEASE replace_op\x00SAVEPOINT changeset_apply\x00PRAGMA defer_foreign_keys = 1\x00sqlite3changeset_apply(): no such table: %s\x00sqlite3changeset_apply(): table %s has %d columns, expected %d or more\x00sqlite3changeset_apply(): primary key mismatch for table %s\x00PRAGMA defer_foreign_keys = 0\x00RELEASE changeset_apply\x00ROLLBACK TO changeset_apply\x00fts5: parser stack overflow\x00fts5: syntax error near \"%.*s\"\x00%z%.*s\x00wrong number of arguments to function highlight()\x00wrong number of arguments to function snippet()\x00snippet\x00highlight\x00bm25\x00prefix\x00malformed prefix=... directive\x00too many prefix indexes (max %d)\x00prefix length out of range (max 999)\x00tokenize\x00multiple tokenize=... directives\x00parse error in tokenize directive\x00content\x00multiple content=... directives\x00%Q.%Q\x00content_rowid\x00multiple content_rowid=... directives\x00columnsize\x00malformed columnsize=... directive\x00columns\x00malformed detail=... directive\x00unrecognized option: \"%.*s\"\x00reserved fts5 column name: %s\x00unindexed\x00unrecognized column option: %s\x00T.%Q\x00, T.%Q\x00, T.c%d\x00reserved fts5 table name: %s\x00parse error in \"%s\"\x00docsize\x00%Q.'%q_%s'\x00CREATE TABLE x(\x00%z%s%Q\x00%z, %Q HIDDEN, %s HIDDEN)\x00pgsz\x00hashsize\x00automerge\x00usermerge\x00crisismerge\x00SELECT k, v FROM %Q.'%q_config'\x00version\x00invalid fts5 file format (found %d, expected %d) - run 'rebuild'\x00unterminated string\x00fts5: syntax error near \"%.1s\"\x00OR\x00NOT\x00NEAR\x00expected integer, got \"%.*s\"\x00fts5: column queries are not supported (detail=none)\x00fts5: %s queries are not supported (detail!=full)\x00phrase\x00block\x00REPLACE INTO '%q'.'%q_data'(id, block) VALUES(?,?)\x00DELETE FROM '%q'.'%q_data' WHERE id>=? AND id<=?\x00DELETE FROM '%q'.'%q_idx' WHERE segid=?\x00PRAGMA %Q.data_version\x00SELECT pgno FROM '%q'.'%q_idx' WHERE segid=? AND term<=? ORDER BY term DESC LIMIT 1\x00INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)\x00%s_data\x00id INTEGER PRIMARY KEY, block BLOB\x00segid, term, pgno, PRIMARY KEY(segid, term)\x00SELECT segid, term, (pgno>>1), (pgno&1) FROM %Q.'%q_idx' WHERE segid=%d ORDER BY 1, 2\x00\x00\x00\x00\x00\x00recursively defined fts5 content table\x00SELECT rowid, rank FROM %Q.%Q ORDER BY %s(\"%w\"%s%s) %s\x00DESC\x00ASC\x00reads\x00unknown special query: %.*s\x00SELECT %s\x00no such function: %s\x00parse error in rank function: %s\x00%s: table does not support scanning\x00delete-all\x00'delete-all' may only be used with a contentless or external content fts5 table\x00rebuild\x00'rebuild' may not be used with a contentless fts5 table\x00merge\x00integrity-check\x00cannot %s contentless fts5 table: %s\x00DELETE from\x00no such cursor: %lld\x00no such tokenizer: %s\x00error in tokenizer constructor\x00fts5_api_ptr\x00fts5: 2022-01-06 13:25:41 872ba256cbf61d9290b571c0e6d82a20c224ca3ad82971edc46b29818d5d17a0\x00config\x00fts5\x00fts5_source_id\x00SELECT %s FROM %s T WHERE T.%Q >= ? AND T.%Q <= ? ORDER BY T.%Q ASC\x00SELECT %s FROM %s T WHERE T.%Q <= ? AND T.%Q >= ? ORDER BY T.%Q DESC\x00SELECT %s FROM %s T WHERE T.%Q=?\x00INSERT INTO %Q.'%q_content' VALUES(%s)\x00REPLACE INTO %Q.'%q_content' VALUES(%s)\x00DELETE FROM %Q.'%q_content' WHERE id=?\x00REPLACE INTO %Q.'%q_docsize' VALUES(?,?)\x00DELETE FROM %Q.'%q_docsize' WHERE id=?\x00SELECT sz FROM %Q.'%q_docsize' WHERE id=?\x00REPLACE INTO %Q.'%q_config' VALUES(?,?)\x00SELECT %s FROM %s AS T\x00DROP TABLE IF EXISTS %Q.'%q_data';DROP TABLE IF EXISTS %Q.'%q_idx';DROP TABLE IF EXISTS %Q.'%q_config';\x00DROP TABLE IF EXISTS %Q.'%q_docsize';\x00DROP TABLE IF EXISTS %Q.'%q_content';\x00ALTER TABLE %Q.'%q_%s' RENAME TO '%q_%s';\x00CREATE TABLE %Q.'%q_%q'(%s)%s\x00fts5: error creating shadow table %q_%s: %s\x00id INTEGER PRIMARY KEY\x00, c%d\x00id INTEGER PRIMARY KEY, sz BLOB\x00k PRIMARY KEY, v\x00DELETE FROM %Q.'%q_data';DELETE FROM %Q.'%q_idx';\x00DELETE FROM %Q.'%q_docsize';\x00SELECT count(*) FROM %Q.'%q_%s'\x00tokenchars\x00separators\x00L* N* Co\x00categories\x00remove_diacritics\x00unicode61\x00al\x00ance\x00ence\x00er\x00ic\x00able\x00ible\x00ant\x00ement\x00ment\x00ent\x00ion\x00ou\x00ism\x00ate\x00iti\x00ous\x00ive\x00ize\x00at\x00bl\x00ble\x00iz\x00ational\x00tional\x00tion\x00enci\x00anci\x00izer\x00logi\x00bli\x00alli\x00entli\x00eli\x00e\x00ousli\x00ization\x00ation\x00ator\x00alism\x00iveness\x00fulness\x00ful\x00ousness\x00aliti\x00iviti\x00biliti\x00ical\x00ness\x00icate\x00iciti\x00ative\x00alize\x00eed\x00ee\x00ed\x00ing\x00case_sensitive\x00ascii\x00porter\x00trigram\x00col\x00row\x00instance\x00fts5vocab: unknown table type: %Q\x00CREATE TABlE vocab(term, col, doc, cnt)\x00CREATE TABlE vocab(term, doc, cnt)\x00CREATE TABlE vocab(term, doc, col, offset)\x00wrong number of vtable arguments\x00recursive definition for %s.%s\x00SELECT t.%Q FROM %Q.%Q AS t WHERE t.%Q MATCH '*id'\x00no such fts5 table: %s.%s\x00fts5vocab\x002022-01-06 13:25:41 872ba256cbf61d9290b571c0e6d82a20c224ca3ad82971edc46b29818d5d17a0\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data |