diff options
author | Jan Mercl <0xjnml@gmail.com> | 2020-07-31 14:18:38 +0200 |
---|---|---|
committer | Jan Mercl <0xjnml@gmail.com> | 2020-07-31 14:18:38 +0200 |
commit | 1349149922b282e74a77c7d51c316d883fba5b89 (patch) | |
tree | 6aef7056dbfe750984954ba25cbb97feb251d4cf /internal | |
parent | 3337c85b5e539021d90ccec9891d73b14c64671b (diff) |
use crt v3.24.9
Diffstat (limited to 'internal')
-rw-r--r-- | internal/crt2/capi_linux_amd64.go | 141 | ||||
-rw-r--r-- | internal/crt2/crt2.go | 130 | ||||
-rw-r--r-- | internal/crt2/tcl.go | 929 | ||||
-rw-r--r-- | internal/mptest/main_linux_amd64.go | 281 | ||||
-rw-r--r-- | internal/testfixture/testfixture_linux_amd64.go | 22489 |
5 files changed, 12049 insertions, 11921 deletions
diff --git a/internal/crt2/capi_linux_amd64.go b/internal/crt2/capi_linux_amd64.go index 4f81933..27b0039 100644 --- a/internal/crt2/capi_linux_amd64.go +++ b/internal/crt2/capi_linux_amd64.go @@ -5,130 +5,19 @@ package crt2 // import "modernc.org/sqlite/internal/crt2" var CAPI = map[string]struct{}{ - "ferror": {}, - "fstat": {}, - // "ftruncate": {}, - // "lstat": {}, - "pthread_cond_destroy": {}, - "pthread_cond_init": {}, - "pthread_cond_signal": {}, - "pthread_cond_wait": {}, - "pthread_create": {}, - "pthread_detach": {}, - "pthread_mutex_destroy": {}, - "pthread_mutex_init": {}, - "pthread_mutex_lock": {}, - "pthread_mutex_unlock": {}, - // "readdir": {}, - // "rename": {}, - "sched_yield": {}, - // "stat": {}, - // - // "__assert_fail": {}, - // "__builtin_exit": {}, - // "__builtin_trap": {}, - // "__builtin_unreachable": {}, - // "abort": {}, - // "calloc": {}, - // "exit": {}, - // "free": {}, - // "malloc": {}, - // "realloc": {}, - // - // "TclFreeObj": {}, - // "Tcl_Alloc": {}, - // "Tcl_AppendElement": {}, - // "Tcl_AppendObjToObj": {}, - // "Tcl_AppendResult": {}, - // "Tcl_AppendStringsToObj": {}, - // "Tcl_AttemptAlloc": {}, - // "Tcl_AttemptRealloc": {}, - // "Tcl_BackgroundError": {}, - // "Tcl_CreateChannel": {}, - // "Tcl_CreateCommand": {}, - // "Tcl_CreateInterp": {}, - // "Tcl_CreateObjCommand": {}, - // "Tcl_CreateThread": {}, - // "Tcl_DStringAppend": {}, - // "Tcl_DStringAppendElement": {}, - // "Tcl_DStringFree": {}, - // "Tcl_DStringInit": {}, - // "Tcl_DeleteCommand": {}, - // "Tcl_DeleteHashTable": {}, - // "Tcl_DeleteInterp": {}, - // "Tcl_DoOneEvent": {}, - // "Tcl_DuplicateObj": {}, - // "Tcl_Eval": {}, - // "Tcl_EvalEx": {}, - // "Tcl_EvalObjEx": {}, - // "Tcl_ExitThread": {}, - // "Tcl_FindExecutable": {}, - // "Tcl_FirstHashEntry": {}, - // "Tcl_Flush": {}, - // "Tcl_Free": {}, - // "Tcl_GetBoolean": {}, - // "Tcl_GetBooleanFromObj": {}, - // "Tcl_GetByteArrayFromObj": {}, - // "Tcl_GetChannel": {}, - // "Tcl_GetChannelInstanceData": {}, - // "Tcl_GetChannelName": {}, - // "Tcl_GetCharLength": {}, - // "Tcl_GetCommandInfo": {}, - // "Tcl_GetCurrentThread": {}, - // "Tcl_GetDouble": {}, - // "Tcl_GetDoubleFromObj": {}, - // "Tcl_GetIndexFromObjStruct": {}, - // "Tcl_GetInt": {}, - // "Tcl_GetIntFromObj": {}, - // "Tcl_GetObjResult": {}, - // "Tcl_GetSlave": {}, - // "Tcl_GetString": {}, - // "Tcl_GetStringFromObj": {}, - // "Tcl_GetStringResult": {}, - // "Tcl_GetTime": {}, - // "Tcl_GetVar2": {}, - // "Tcl_GetVar2Ex": {}, - // "Tcl_GetVersion": {}, - // "Tcl_GetWideIntFromObj": {}, - // "Tcl_GlobalEval": {}, - // "Tcl_InitHashTable": {}, - // "Tcl_LinkVar": {}, - // "Tcl_ListObjAppendElement": {}, - // "Tcl_ListObjGetElements": {}, - // "Tcl_ListObjIndex": {}, - // "Tcl_ListObjLength": {}, - // "Tcl_NRAddCallback": {}, - // "Tcl_NRCallObjProc": {}, - // "Tcl_NRCreateCommand": {}, - // "Tcl_NREvalObj": {}, - // "Tcl_NewByteArrayObj": {}, - // "Tcl_NewDoubleObj": {}, - // "Tcl_NewIntObj": {}, - // "Tcl_NewListObj": {}, - // "Tcl_NewObj": {}, - // "Tcl_NewStringObj": {}, - // "Tcl_NewWideIntObj": {}, - // "Tcl_NextHashEntry": {}, - // "Tcl_ObjGetVar2": {}, - // "Tcl_ObjSetVar2": {}, - // "Tcl_Panic": {}, - // "Tcl_PkgProvideEx": {}, - // "Tcl_RegisterChannel": {}, - // "Tcl_ResetResult": {}, - // "Tcl_Seek": {}, - // "Tcl_SetCommandInfo": {}, - // "Tcl_SetIntObj": {}, - // "Tcl_SetObjResult": {}, - // "Tcl_SetResult": {}, - // "Tcl_SetSystemEncoding": {}, - // "Tcl_SetVar2": {}, - // "Tcl_SetWideIntObj": {}, - // "Tcl_ThreadAlert": {}, - // "Tcl_ThreadQueueEvent": {}, - // "Tcl_TranslateFileName": {}, - // "Tcl_UnregisterChannel": {}, - // "Tcl_UnsetVar2": {}, - // "Tcl_UtfToLower": {}, - // "Tcl_VarEval": {}, - // "Tcl_WrongNumArgs": {}, + "ferror": {}, + "fstat": {}, + "pthread_cond_broadcast": {}, + "pthread_cond_destroy": {}, + "pthread_cond_init": {}, + "pthread_cond_signal": {}, + "pthread_cond_wait": {}, + "pthread_create": {}, + "pthread_detach": {}, + "pthread_mutex_destroy": {}, + "pthread_mutex_init": {}, + "pthread_mutex_lock": {}, + "pthread_mutex_trylock": {}, + "pthread_mutex_unlock": {}, + "sched_yield": {}, } diff --git a/internal/crt2/crt2.go b/internal/crt2/crt2.go new file mode 100644 index 0000000..bffe76b --- /dev/null +++ b/internal/crt2/crt2.go @@ -0,0 +1,130 @@ +// Copyright 2020 The Sqlite Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package crt2 // import "modernc.org/sqlite/internal/crt2" + +import ( + "fmt" + "os" + "runtime" + "strings" + + "modernc.org/crt/v3" +) + +func todo(s string, args ...interface{}) string { //TODO- + switch { + case s == "": + s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...) + default: + s = fmt.Sprintf(s, args...) + } + pc, fn, fl, _ := runtime.Caller(1) + f := runtime.FuncForPC(pc) + var fns string + if f != nil { + fns = f.Name() + if x := strings.LastIndex(fns, "."); x > 0 { + fns = fns[x+1:] + } + } + r := fmt.Sprintf("%s:%d:%s: TODOTODO %s", fn, fl, fns, s) //TODOOK + fmt.Fprintf(os.Stdout, "%s\n", r) + os.Stdout.Sync() + return r +} + +func trc(s string, args ...interface{}) string { //TODO- + switch { + case s == "": + s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...) + default: + s = fmt.Sprintf(s, args...) + } + _, fn, fl, _ := runtime.Caller(1) + r := fmt.Sprintf("\n%s:%d: TRC %s", fn, fl, s) + fmt.Fprintf(os.Stdout, "%s\n", r) + os.Stdout.Sync() + return r +} + +// int sched_yield(void); +func Xsched_yield(tls *crt.TLS) int32 { + panic(todo("")) +} + +// int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); +func Xpthread_create(tls *crt.TLS, thread, attr, start_routine, arg uintptr) int32 { + panic(todo("")) +} + +// int pthread_detach(pthread_t thread); +func Xpthread_detach(tls *crt.TLS, thread crt.Size_t) int32 { + panic(todo("")) +} + +// int ferror(FILE *stream); +func Xferror(tls *crt.TLS, stream uintptr) int32 { + panic(todo("")) +} + +// int fstat(int fd, struct stat *statbuf); +func Xfstat(tls *crt.TLS, fd int32, statbuf uintptr) int32 { + panic(todo("")) +} + +// // int rename(const char *oldpath, const char *newpath); +// func Xrename(tls *crt.TLS, oldpath, newpath uintptr) int32 { +// panic(todo("")) +// } + +// int pthread_mutex_lock(pthread_mutex_t *mutex); +func Xpthread_mutex_lock(tls *crt.TLS, mutex uintptr) int32 { + panic(todo("")) +} + +// int pthread_cond_signal(pthread_cond_t *cond); +func Xpthread_cond_signal(tls *crt.TLS, cond uintptr) int32 { + panic(todo("")) +} + +// int pthread_mutex_unlock(pthread_mutex_t *mutex); +func Xpthread_mutex_unlock(tls *crt.TLS, mutex uintptr) int32 { + panic(todo("")) +} + +// int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr); +func Xpthread_mutex_init(tls *crt.TLS, mutex, attr uintptr) int32 { + panic(todo("")) +} + +// int pthread_cond_init(pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr); +func Xpthread_cond_init(tls *crt.TLS, cond, attr uintptr) int32 { + panic(todo("")) +} + +// int pthread_cond_wait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex); +func Xpthread_cond_wait(tls *crt.TLS, cond, mutex uintptr) int32 { + panic(todo("")) +} + +// int pthread_cond_destroy(pthread_cond_t *cond); +func Xpthread_cond_destroy(tls *crt.TLS, cond uintptr) int32 { + panic(todo("")) +} + +// int pthread_mutex_destroy(pthread_mutex_t *mutex); +func Xpthread_mutex_destroy(tls *crt.TLS, mutex uintptr) int32 { + panic(todo("")) +} + +// int pthread_mutex_trylock(pthread_mutex_t *mutex); +func Xpthread_mutex_trylock(tls *crt.TLS, mutex uintptr) int32 { + panic(todo("")) +} + +// int pthread_cond_broadcast(pthread_cond_t *cond); +func Xpthread_cond_broadcast(tls *crt.TLS, cond uintptr) int32 { + panic(todo("")) +} diff --git a/internal/crt2/tcl.go b/internal/crt2/tcl.go deleted file mode 100644 index 64f2da7..0000000 --- a/internal/crt2/tcl.go +++ /dev/null @@ -1,929 +0,0 @@ -// Copyright 2020 The Sqlite Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package crt2 // import "modernc.org/sqlite/internal/crt2" - -import ( - "fmt" - "os" - "runtime" - "strings" - - "modernc.org/crt/v3" -) - -// const ( -// TCL_GLOBAL_ONLY = 1 -// ) -// -// var ( -// fToken uint64 -// nameOfExecutable string -// objects = map[uintptr]objectNfo{} -// objectsMu sync.Mutex -// ) -// -// func nextToken() uintptr { return uintptr(atomic.AddUint64(&fToken, 1)) } -// -// type objectNfo struct { -// memcheckerNfo -// value interface{} -// } -// -// func addObject(o interface{}) uintptr { -// var v objectNfo -// v.value = o -// v.object = o -// v.pc, v.file, v.line, v.ok = runtime.Caller(1) -// h := nextToken() -// objectsMu.Lock() -// objects[h] = v -// objectsMu.Unlock() -// return h -// } -// -// func getObject(h uintptr) interface{} { -// if h <= 0 { -// panic(todo("")) -// } -// -// objectsMu.Lock() -// v, ok := objects[h] -// if !ok { -// panic(todo("", h)) -// } -// -// objectsMu.Unlock() -// return v.value -// } -// -// func removeObject(h uintptr) { -// if h <= 0 { -// panic(todo("")) -// } -// -// objectsMu.Lock() -// if _, ok := objects[h]; !ok { -// panic(todo("")) -// } -// -// delete(objects, h) -// objectsMu.Unlock() -// } - -func todo(s string, args ...interface{}) string { //TODO- - switch { - case s == "": - s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...) - default: - s = fmt.Sprintf(s, args...) - } - pc, fn, fl, _ := runtime.Caller(1) - f := runtime.FuncForPC(pc) - var fns string - if f != nil { - fns = f.Name() - if x := strings.LastIndex(fns, "."); x > 0 { - fns = fns[x+1:] - } - } - r := fmt.Sprintf("%s:%d:%s: TODOTODO %s", fn, fl, fns, s) //TODOOK - fmt.Fprintf(os.Stdout, "%s\n", r) - os.Stdout.Sync() - return r -} - -func trc(s string, args ...interface{}) string { //TODO- - switch { - case s == "": - s = fmt.Sprintf(strings.Repeat("%v ", len(args)), args...) - default: - s = fmt.Sprintf(s, args...) - } - _, fn, fl, _ := runtime.Caller(1) - r := fmt.Sprintf("\n%s:%d: TRC %s", fn, fl, s) - fmt.Fprintf(os.Stdout, "%s\n", r) - os.Stdout.Sync() - return r -} - -// int sched_yield(void); -func Xsched_yield(tls *crt.TLS) int32 { - panic(todo("")) -} - -// int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); -func Xpthread_create(tls *crt.TLS, thread, attr, start_routine, arg uintptr) int32 { - panic(todo("")) -} - -// int pthread_detach(pthread_t thread); -func Xpthread_detach(tls *crt.TLS, thread crt.Size_t) int32 { - panic(todo("")) -} - -// int ferror(FILE *stream); -func Xferror(tls *crt.TLS, stream uintptr) int32 { - panic(todo("")) -} - -// // int ftruncate(int fd, off_t length); -// func Xftruncate(tls *crt.TLS, fd int32, length crt.Ssize_t) int32 { -// panic(todo("")) -// } - -// int fstat(int fd, struct stat *statbuf); -func Xfstat(tls *crt.TLS, fd int32, statbuf uintptr) int32 { - panic(todo("")) -} - -// // int rename(const char *oldpath, const char *newpath); -// func Xrename(tls *crt.TLS, oldpath, newpath uintptr) int32 { -// panic(todo("")) -// } - -// int pthread_mutex_lock(pthread_mutex_t *mutex); -func Xpthread_mutex_lock(tls *crt.TLS, mutex uintptr) int32 { - panic(todo("")) -} - -// int pthread_cond_signal(pthread_cond_t *cond); -func Xpthread_cond_signal(tls *crt.TLS, cond uintptr) int32 { - panic(todo("")) -} - -// int pthread_mutex_unlock(pthread_mutex_t *mutex); -func Xpthread_mutex_unlock(tls *crt.TLS, mutex uintptr) int32 { - panic(todo("")) -} - -// int pthread_mutex_init(pthread_mutex_t *restrict mutex, const pthread_mutexattr_t *restrict attr); -func Xpthread_mutex_init(tls *crt.TLS, mutex, attr uintptr) int32 { - panic(todo("")) -} - -// int pthread_cond_init(pthread_cond_t *restrict cond, const pthread_condattr_t *restrict attr); -func Xpthread_cond_init(tls *crt.TLS, cond, attr uintptr) int32 { - panic(todo("")) -} - -// int pthread_cond_wait(pthread_cond_t *restrict cond, pthread_mutex_t *restrict mutex); -func Xpthread_cond_wait(tls *crt.TLS, cond, mutex uintptr) int32 { - panic(todo("")) -} - -// int pthread_cond_destroy(pthread_cond_t *cond); -func Xpthread_cond_destroy(tls *crt.TLS, cond uintptr) int32 { - panic(todo("")) -} - -// // int stat(const char *pathname, struct stat *statbuf); -// func Xstat(tls *crt.TLS, pathname, statbuf uintptr) int32 { -// panic(todo("")) -// } -// -// // int lstat(const char *pathname, struct stat *statbuf); -// func Xlstat(tls *crt.TLS, pathname, statbuf uintptr) int32 { -// panic(todo("")) -// } -// -// // struct dirent *readdir(DIR *dirp); -// func Xreaddir(tls *crt.TLS, dirp uintptr) uintptr { -// panic(todo("")) -// } - -// int pthread_mutex_destroy(pthread_mutex_t *mutex); -func Xpthread_mutex_destroy(tls *crt.TLS, mutex uintptr) int32 { - panic(todo("")) -} - -// // ============================================================================ -// -// // void *malloc(size_t size); -// func Xmalloc(tls *crt.TLS, size crt.Size_t) uintptr { -// p := crt.Xmalloc(tls, size) -// if p != 0 { -// Memcheck.add(p, size) -// } -// return p -// } -// -// // void *calloc(size_t nmemb, size_t size); -// func Xcalloc(tls *crt.TLS, n, size crt.Size_t) uintptr { -// p := crt.Xcalloc(tls, n, size) -// if p != 0 { -// Memcheck.add(p, n*size) -// } -// return p -// } -// -// // void *realloc(void *ptr, size_t size); -// func Xrealloc(tls *crt.TLS, ptr uintptr, size crt.Size_t) uintptr { -// panic(todo("")) -// } -// -// // void free(void *ptr); -// func Xfree(tls *crt.TLS, ptr uintptr) { -// if ptr != 0 { -// Memcheck.remove(ptr) -// } -// crt.Xfree(tls, ptr) -// } -// -// // void abort(void); -// func Xabort(tls *crt.TLS) { -// Xexit(tls, 1) -// } -// -// // void exit(int status); -// func Xexit(tls *crt.TLS, status int32) { -// s := Memcheck.Audit() -// //trc("Memcheck.Audit(): %s", s) -// if s != "" && status == 0 { -// status = 1 -// } -// fmt.Fprintln(os.Stderr, s) -// os.Stderr.Sync() -// crt.Xexit(tls, status) -// } -// -// func X__builtin_exit(tls *crt.TLS, status int32) { Xexit(tls, status) } -// -// // void __assert_fail(const char * assertion, const char * file, unsigned int line, const char * function); -// func X__assert_fail(tls *crt.TLS, assertion, file uintptr, line uint32, function uintptr) { -// fmt.Fprintf(os.Stderr, "assertion failure: %s:%d.%s: %s\n", crt.GoString(file), line, crt.GoString(function), crt.GoString(assertion)) -// os.Stderr.Sync() -// Xexit(tls, 1) -// } -// -// // void __builtin_trap (void) -// func X__builtin_trap(tls *crt.TLS) { -// fmt.Fprintf(os.Stderr, "%s\ntrap\n", debug.Stack()) -// os.Stderr.Sync() -// Xexit(tls, 1) -// } -// -// // void __builtin_unreachable (void) -// func X__builtin_unreachable(tls *crt.TLS) { -// fmt.Fprintf(os.Stderr, "%s\nunrechable\n", debug.Stack()) -// os.Stderr.Sync() -// Xexit(tls, 1) -// } -// -// // ============================================================================ -// -// // int Tcl_UnregisterChannel(Tcl_Interp *interp, Tcl_Channel chan); -// func XTcl_UnregisterChannel(tls *crt.TLS, interp, chan1 uintptr) int32 { -// panic(todo("")) -// } -// -// // void Tcl_Free(char *ptr); -// func XTcl_Free(tls *crt.TLS, ptr uintptr) { -// panic(todo("")) -// } -// -// // char * Tcl_Alloc(unsigned int size); -// func XTcl_Alloc(tls *crt.TLS, size uint32) uintptr { -// panic(todo("")) -// } -// -// // Tcl_Channel Tcl_CreateChannel(const Tcl_ChannelType *typePtr, const char *chanName, ClientData instanceData, int mask); -// func XTcl_CreateChannel(tls *crt.TLS, typePtr, chanName, instanceData uintptr, mask int32) uintptr { -// panic(todo("")) -// } -// -// // const char * Tcl_GetChannelName(Tcl_Channel chan); -// func XTcl_GetChannelName(tls *crt.TLS, chan1 uintptr) uintptr { -// panic(todo("")) -// } -// -// // char * Tcl_GetStringFromObj(Tcl_Obj *objPtr, int *lengthPtr); -// func XTcl_GetStringFromObj(tls *crt.TLS, objPtr, lengthPtr uintptr) uintptr { -// panic(todo("")) -// } -// -// // void Tcl_RegisterChannel(Tcl_Interp *interp, Tcl_Channel chan); -// func XTcl_RegisterChannel(tls *crt.TLS, interp, chan1 uintptr) { -// panic(todo("")) -// } -// -// // void Tcl_SetResult(Tcl_Interp *interp, char *result, Tcl_FreeProc *freeProc); -// func XTcl_SetResult(tls *crt.TLS, interp, result, freeProc uintptr) { -// panic(todo("")) -// } -// -// // void TclFreeObj(Tcl_Obj *objPtr); -// func XTclFreeObj(tls *crt.TLS, objPtr uintptr) { -// panic(todo("")) -// } -// -// // void Tcl_AppendResult(Tcl_Interp *interp, ...); -// func XTcl_AppendResult(tls *crt.TLS, interp, va uintptr) { -// panic(todo("")) -// } -// -// // void Tcl_BackgroundError(Tcl_Interp *interp); -// func XTcl_BackgroundError(tls *crt.TLS, interp uintptr) { panic(todo("")) } -// -// // Tcl_CreateInterp creates a new interpreter structure and returns a token for -// // it. The token is required in calls to most other Tcl procedures, such as -// // Tcl_CreateCommand, Tcl_Eval, and Tcl_DeleteInterp. The token returned by -// // Tcl_CreateInterp may only be passed to Tcl routines called from the same -// // thread as the original Tcl_CreateInterp call. It is not safe for multiple -// // threads to pass the same token to Tcl's routines. The new interpreter is -// // initialized with the built-in Tcl commands and with standard variables like -// // tcl_platform and env. To bind in additional commands, call -// // Tcl_CreateCommand, and to create additional variables, call Tcl_SetVar. -// // -// // Tcl_Interp * Tcl_CreateInterp(void); -// func XTcl_CreateInterp(tls *crt.TLS) uintptr { -// ctx := tee.NewContext("", false) -// if err := registerBuiltinCommands(ctx); err != nil { -// panic(todo("", err)) -// } -// -// return addObject(ctx) -// } -// -// // Tcl_CreateObjCommand defines a new command in interp and associates it with -// // procedure proc such that whenever name is invoked as a Tcl command (e.g., -// // via a call to Tcl_EvalObjEx) the Tcl interpreter will call proc to process -// // the command. -// // -// // Tcl_CreateObjCommand deletes any existing command name already associated -// // with the interpreter (however see below for an exception where the existing -// // command is not deleted). It returns a token that may be used to refer to the -// // command in subsequent calls to Tcl_GetCommandName. If name contains any :: -// // namespace qualifiers, then the command is added to the specified namespace; -// // otherwise the command is added to the global namespace. If -// // Tcl_CreateObjCommand is called for an interpreter that is in the process of -// // being deleted, then it does not create a new command and it returns NULL. -// // proc should have arguments and result that match the type Tcl_ObjCmdProc: -// // -// // typedef int Tcl_ObjCmdProc( -// // ClientData clientData, -// // Tcl_Interp *interp, -// // int objc, -// // Tcl_Obj *const objv[]); -// // -// // When proc is invoked, the clientData and interp parameters will be copies of -// // the clientData and interp arguments given to Tcl_CreateObjCommand. -// // Typically, clientData points to an application-specific data structure that -// // describes what to do when the command procedure is invoked. Objc and objv -// // describe the arguments to the command, objc giving the number of argument -// // values (including the command name) and objv giving the values of the -// // arguments. The objv array will contain objc values, pointing to the argument -// // values. Unlike argv[argv] used in a string-based command procedure, -// // objv[objc] will not contain NULL. -// // -// // Additionally, when proc is invoked, it must not modify the contents of the -// // objv array by assigning new pointer values to any element of the array (for -// // example, objv[2] = NULL) because this will cause memory to be lost and the -// // runtime stack to be corrupted. The const in the declaration of objv will -// // cause ANSI-compliant compilers to report any such attempted assignment as an -// // error. However, it is acceptable to modify the internal representation of -// // any individual value argument. For instance, the user may call -// // Tcl_GetIntFromObj on objv[2] to obtain the integer representation of that -// // value; that call may change the type of the value that objv[2] points at, -// // but will not change where objv[2] points. -// // -// // proc must return an integer code that is either TCL_OK, TCL_ERROR, -// // TCL_RETURN, TCL_BREAK, or TCL_CONTINUE. See the Tcl overview man page for -// // details on what these codes mean. Most normal commands will only return -// // TCL_OK or TCL_ERROR. In addition, if proc needs to return a non-empty -// // result, it can call Tcl_SetObjResult to set the interpreter's result. In the -// // case of a TCL_OK return code this gives the result of the command, and in -// // the case of TCL_ERROR this gives an error message. Before invoking a command -// // procedure, Tcl_EvalObjEx sets interpreter's result to point to a value -// // representing an empty string, so simple commands can return an empty result -// // by doing nothing at all. -// // -// // The contents of the objv array belong to Tcl and are not guaranteed to -// // persist once proc returns: proc should not modify them. Call -// // Tcl_SetObjResult if you want to return something from the objv array. -// // -// // Ordinarily, Tcl_CreateObjCommand deletes any existing command name already -// // associated with the interpreter. However, if the existing command was -// // created by a previous call to Tcl_CreateCommand, Tcl_CreateObjCommand does -// // not delete the command but instead arranges for the Tcl interpreter to call -// // the Tcl_ObjCmdProc proc in the future. The old string-based Tcl_CmdProc -// // associated with the command is retained and its address can be obtained by -// // subsequent Tcl_GetCommandInfo calls. This is done for backwards -// // compatibility. -// // -// // DeleteProc will be invoked when (if) name is deleted. This can occur through -// // a call to Tcl_DeleteCommand, Tcl_DeleteCommandFromToken, or -// // Tcl_DeleteInterp, or by replacing name in another call to -// // Tcl_CreateObjCommand. DeleteProc is invoked before the command is deleted, -// // and gives the application an opportunity to release any structures -// // associated with the command. DeleteProc should have arguments and result -// // that match the type Tcl_CmdDeleteProc: -// // -// // typedef void Tcl_CmdDeleteProc( -// // ClientData clientData); -// // -// // The clientData argument will be the same as the clientData argument passed -// // to Tcl_CreateObjCommand. -// // -// // Tcl_Command Tcl_CreateObjCommand(Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc); -// func XTcl_CreateObjCommand(tls *crt.TLS, interp, cmdName0, proc, clientData, deleteProc uintptr) uintptr { -// ctx := getObject(interp).(*tee.Context) -// if ctx.BeingDeleted { -// return 0 -// } -// -// cmdName := crt.GoString(cmdName0) -// cmd, rc := ctx.Proc( -// tee.NewString(cmdName), tee.NewNoValue(), tee.NewNoValue(), -// func(ctx *tee.Context, values ...tee.Value) tee.ReturnCode { -// panic(todo("")) -// }, -// func(cmd *tee.Command) error { -// panic(todo("")) -// }, -// clientData, -// ) -// if rc != tee.Ok { -// panic(todo("")) -// } -// -// return addObject(cmd) -// } -// -// // char * Tcl_DStringAppend(Tcl_DString *dsPtr, const char *bytes, int length); -// func XTcl_DStringAppend(tls *crt.TLS, dsPtr, bytes uintptr, length int32) uintptr { panic(todo("")) } -// -// // char * Tcl_DStringAppendElement(Tcl_DString *dsPtr, const char *element); -// func XTcl_DStringAppendElement(tls *crt.TLS, dsPtr, element uintptr) uintptr { panic(todo("")) } -// -// // void Tcl_DStringFree(Tcl_DString *dsPtr); -// func XTcl_DStringFree(tls *crt.TLS, dsPtr uintptr) { panic(todo("")) } -// -// // void Tcl_DStringInit(Tcl_DString *dsPtr); -// func XTcl_DStringInit(tls *crt.TLS, dsPtr uintptr) { panic(todo("")) } -// -// // int Tcl_DeleteCommand(Tcl_Interp *interp, const char *cmdName); -// func XTcl_DeleteCommand(tls *crt.TLS, interp, cmdName uintptr) int32 { panic(todo("")) } -// -// // Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr); -// func XTcl_DuplicateObj(tls *crt.TLS, objPtr uintptr) uintptr { panic(todo("")) } -// -// // int Tcl_Eval(Tcl_Interp *interp, const char *script); -// func XTcl_Eval(tls *crt.TLS, interp, script uintptr) int32 { panic(todo("")) } -// -// // int Tcl_EvalObjEx(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); -// func XTcl_EvalObjEx(tls *crt.TLS, interp, objPtr uintptr, flags int32) int32 { panic(todo("")) } -// -// // void Tcl_FindExecutable(const char *argv0); -// func XTcl_FindExecutable(tls *crt.TLS, argv00 uintptr) { -// argv0 := crt.GoString(argv00) -// if filepath.IsAbs(argv0) { -// nameOfExecutable = argv0 -// return -// } -// -// argv0, err := exec.LookPath(argv0) -// if err != nil { -// return -// } -// -// if argv0, err = filepath.Abs(argv0); err != nil { -// return -// } -// -// nameOfExecutable = argv0 -// } -// -// // int Tcl_GetBooleanFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *boolPtr); -// func XTcl_GetBooleanFromObj(tls *crt.TLS, interp, objPtr, boolPtr uintptr) int32 { panic(todo("")) } -// -// // unsigned char * Tcl_GetByteArrayFromObj(Tcl_Obj *objPtr, int *lengthPtr); -// func XTcl_GetByteArrayFromObj(tls *crt.TLS, objPtr, lengthPtr uintptr) uintptr { panic(todo("")) } -// -// // int Tcl_GetCharLength(Tcl_Obj *objPtr); -// func XTcl_GetCharLength(tls *crt.TLS, objPtr uintptr) int32 { panic(todo("")) } -// -// // int Tcl_GetDoubleFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, double *doublePtr); -// func XTcl_GetDoubleFromObj(tls *crt.TLS, interp, objPtr, doublePtr uintptr) int32 { panic(todo("")) } -// -// // int Tcl_GetIndexFromObjStruct(Tcl_Interp *interp, Tcl_Obj *objPtr, const void *tablePtr, int offset, const char *msg, int flags, int *indexPtr); -// func XTcl_GetIndexFromObjStruct(tls *crt.TLS, interp, objPtr, tablePtr uintptr, offset int32, msg uintptr, flags int32, indexPtr uintptr) int32 { -// panic(todo("")) -// } -// -// // int Tcl_GetIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int *intPtr); -// func XTcl_GetIntFromObj(tls *crt.TLS, interp, objPtr, intPtr uintptr) int32 { panic(todo("")) } -// -// // Tcl_Obj * Tcl_GetObjResult(Tcl_Interp *interp); -// func XTcl_GetObjResult(tls *crt.TLS, interp uintptr) uintptr { panic(todo("")) } -// -// // char * Tcl_GetString(Tcl_Obj *objPtr); -// func XTcl_GetString(tls *crt.TLS, objPtr uintptr) uintptr { panic(todo("")) } -// -// // const char * Tcl_GetStringResult(Tcl_Interp *interp); -// func XTcl_GetStringResult(tls *crt.TLS, interp uintptr) uintptr { panic(todo("")) } -// -// // const char * Tcl_GetVar2(Tcl_Interp *interp, const char *part1, const char *part2, int flags); -// func XTcl_GetVar2(tls *crt.TLS, interp, part1, part2 uintptr, flags int32) uintptr { panic(todo("")) } -// -// // Tcl_Obj * Tcl_GetVar2Ex(Tcl_Interp *interp, const char *part1, const char *part2, int flags); -// func XTcl_GetVar2Ex(tls *crt.TLS, interp, part1, part2 uintptr, flags int32) uintptr { panic(todo("")) } -// -// // void Tcl_GetVersion(int *major, int *minor, int *patchLevel, int *type); -// func XTcl_GetVersion(tls *crt.TLS, major, minor, patchLevel, type1 uintptr) { panic(todo("")) } -// -// // int Tcl_GetWideIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideInt *widePtr); -// func XTcl_GetWideIntFromObj(tls *crt.TLS, interp, objPtr, widePtr uintptr) int32 { panic(todo("")) } -// -// // int Tcl_GlobalEval(Tcl_Interp *interp, const char *command); -// func XTcl_GlobalEval(tls *crt.TLS, interp, command uintptr) int32 { panic(todo("")) } -// -// // int Tcl_ListObjAppendElement(Tcl_Interp *interp, Tcl_Obj *listPtr, Tcl_Obj *objPtr); -// func XTcl_ListObjAppendElement(tls *crt.TLS, interp, listPtr, objPtr uintptr) int32 { panic(todo("")) } -// -// // int Tcl_ListObjGetElements(Tcl_Interp *interp, Tcl_Obj *listPtr, int *objcPtr, Tcl_Obj ***objvPtr); -// func XTcl_ListObjGetElements(tls *crt.TLS, interp, listPtr, objcPtr, objvPtr uintptr) int32 { -// panic(todo("")) -// } -// -// // int Tcl_ListObjIndex(Tcl_Interp *interp, Tcl_Obj *listPtr, int index, Tcl_Obj **objPtrPtr); -// func XTcl_ListObjIndex(tls *crt.TLS, interp, listPtr uintptr, index int32, objPtrPtr uintptr) int32 { -// panic(todo("")) -// } -// -// // int Tcl_ListObjLength(Tcl_Interp *interp, Tcl_Obj *listPtr, int *lengthPtr); -// func XTcl_ListObjLength(tls *crt.TLS, interp, listPtr, lengthPtr uintptr) int32 { panic(todo("")) } -// -// // void Tcl_NRAddCallback(Tcl_Interp *interp, Tcl_NRPostProc *postProcPtr, ClientData data0, ClientData data1, ClientData data2, ClientData data3); -// func XTcl_NRAddCallback(tls *crt.TLS, interp, postProcPtr, data0, data1, data2, data3 uintptr) { -// panic(todo("")) -// } -// -// // int Tcl_NRCallObjProc(Tcl_Interp *interp, Tcl_ObjCmdProc *objProc, ClientData clientData, int objc, Tcl_Obj *const objv[]); -// func XTcl_NRCallObjProc(tls *crt.TLS, interp, objProc, clientData uintptr, objc int32, objv uintptr) int32 { -// panic(todo("")) -// } -// -// // Tcl_Command Tcl_NRCreateCommand(Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc *proc, Tcl_ObjCmdProc *nreProc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc); -// func XTcl_NRCreateCommand(tls *crt.TLS, interp, cmdName, proc, nreProc, clientData, deleteProc uintptr) uintptr { -// panic(todo("")) -// } -// -// // int Tcl_NREvalObj(Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); -// func XTcl_NREvalObj(tls *crt.TLS, interp, objPtr uintptr, flags int32) int32 { panic(todo("")) } -// -// // Tcl_Obj * Tcl_NewByteArrayObj(const unsigned char *bytes, int length); -// func XTcl_NewByteArrayObj(tls *crt.TLS, bytes uintptr, length int32) uintptr { panic(todo("")) } -// -// // Tcl_Obj * Tcl_NewDoubleObj(double doubleValue); -// func XTcl_NewDoubleObj(tls *crt.TLS, doubleValue float64) uintptr { panic(todo("")) } -// -// // Tcl_Obj * Tcl_NewIntObj(int intValue); -// func XTcl_NewIntObj(tls *crt.TLS, intValue int32) uintptr { panic(todo("")) } -// -// // Tcl_Obj * Tcl_NewListObj(int objc, Tcl_Obj *const objv[]); -// func XTcl_NewListObj(tls *crt.TLS, objc int32, objv uintptr) uintptr { panic(todo("")) } -// -// // Tcl_Obj * Tcl_NewObj(void); -// func XTcl_NewObj(tls *crt.TLS) uintptr { panic(todo("")) } -// -// // Tcl_Obj * Tcl_NewStringObj(const char *bytes, int length); -// func XTcl_NewStringObj(tls *crt.TLS, bytes uintptr, length int32) uintptr { panic(todo("")) } -// -// // Tcl_Obj * Tcl_NewWideIntObj(Tcl_WideInt wideValue); -// func XTcl_NewWideIntObj(tls *crt.TLS, wideValue crt.Intptr) uintptr { panic(todo("")) } -// -// // Tcl_Obj * Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, Tcl_Obj *newValuePtr, int flags); -// func XTcl_ObjSetVar2(tls *crt.TLS, interp, part1, part2, newValuePtr uintptr, flags int32) uintptr { -// panic(todo("")) -// } -// -// // int Tcl_PkgProvideEx(Tcl_Interp *interp, const char *name, const char *version, const void *clientData); -// func XTcl_PkgProvideEx(tls *crt.TLS, interp, name0, version0, clientData uintptr) int32 { -// name := crt.GoString(name0) -// version := crt.GoString(version0) -// switch name { -// case "sqlite3": -// if version != sqlite3.SQLITE_VERSION { -// panic(todo("%q %q", name, version)) -// } -// default: -// panic(todo("%q %q", name, version)) -// } -// -// return int32(tee.Ok) -// } -// -// // void Tcl_ResetResult(Tcl_Interp *interp); -// func XTcl_ResetResult(tls *crt.TLS, interp uintptr) { panic(todo("")) } -// -// // void Tcl_SetIntObj(Tcl_Obj *objPtr, int intValue); -// func XTcl_SetIntObj(tls *crt.TLS, objPtr uintptr, intValue int32) { panic(todo("")) } -// -// // void Tcl_SetObjResult(Tcl_Interp *interp, Tcl_Obj *resultObjPtr); -// func XTcl_SetObjResult(tls *crt.TLS, interp, resultObjPtr uintptr) { panic(todo("")) } -// -// // Tcl_SetSystemEncoding sets the default encoding that should be used whenever -// // the user passes a NULL value for the encoding argument to any of the other -// // encoding functions. If name is NULL, the system encoding is reset to the -// // default system encoding, binary. If the name did not refer to any known or -// // loadable encoding, TCL_ERROR is returned and an error message is left in -// // interp. Otherwise, this procedure increments the reference count of the new -// // system encoding, decrements the reference count of the old system encoding, -// // and returns TCL_OK. -// // -// // int Tcl_SetSystemEncoding(Tcl_Interp *interp, const char *name); -// func XTcl_SetSystemEncoding(tls *crt.TLS, interp, name0 uintptr) int32 { -// name := crt.GoString(name0) -// if interp != 0 { -// panic(todo("")) -// } -// -// if name != "utf-8" { -// panic(todo("")) -// } -// -// return int32(tee.Ok) -// } -// -// // Tcl_SetVar2Ex, Tcl_SetVar, Tcl_SetVar2, and Tcl_ObjSetVar2 will create a new -// // variable or modify an existing one. These procedures set the given variable -// // to the value given by newValuePtr or newValue and return a pointer to the -// // variable's new value, which is stored in Tcl's variable structure. -// // Tcl_SetVar2Ex and Tcl_ObjSetVar2 take the new value as a Tcl_Obj and return -// // a pointer to a Tcl_Obj. Tcl_SetVar and Tcl_SetVar2 take the new value as a -// // string and return a string; they are usually less efficient than -// // Tcl_ObjSetVar2. Note that the return value may be different than the -// // newValuePtr or newValue argument, due to modifications made by write traces. -// // If an error occurs in setting the variable (e.g. an array variable is -// // referenced without giving an index into the array) NULL is returned and an -// // error message is left in interp's result if the TCL_LEAVE_ERR_MSG flag bit -// // is set. -// // -// // The name of a variable may be specified to these procedures in four ways: -// // -// // 1. If Tcl_SetVar, Tcl_GetVar, or Tcl_UnsetVar is invoked, the variable name -// // is given as a single string, varName. If varName contains an open -// // parenthesis and ends with a close parenthesis, then the value between the -// // parentheses is treated as an index (which can have any string value) and the -// // characters before the first open parenthesis are treated as the name of an -// // array variable. If varName does not have parentheses as described above, -// // then the entire string is treated as the name of a scalar variable. -// // -// // 2. If the name1 and name2 arguments are provided and name2 is non-NULL, then -// // an array element is specified and the array name and index have already been -// // separated by the caller: name1 contains the name and name2 contains the -// // index. An error is generated if name1 contains an open parenthesis and ends -// // with a close parenthesis (array element) and name2 is non-NULL. -// // -// // 3. If name2 is NULL, name1 is treated just like varName in case [1] above -// // (it can be either a scalar or an array element variable name). -// // -// // The flags argument may be used to specify any of several options to the -// // procedures. It consists of an OR-ed combination of the following bits. -// // -// // TCL_GLOBAL_ONLY -// // -// // Under normal circumstances the procedures look up variables as follows. If a -// // procedure call is active in interp, the variable is looked up at the current -// // level of procedure call. Otherwise, the variable is looked up first in the -// // current namespace, then in the global namespace. However, if this bit is set -// // in flags then the variable is looked up only in the global namespace even if -// // there is a procedure call active. If both TCL_GLOBAL_ONLY and -// // TCL_NAMESPACE_ONLY are given, TCL_GLOBAL_ONLY is ignored. -// // -// // TCL_NAMESPACE_ONLY -// // -// // If this bit is set in flags then the variable is looked up only in the -// // current namespace; if a procedure is active its variables are ignored, and -// // the global namespace is also ignored unless it is the current namespace. -// // -// // TCL_LEAVE_ERR_MSG -// // -// // If an error is returned and this bit is set in flags, then an error message -// // will be left in the interpreter's result, where it can be retrieved with -// // Tcl_GetObjResult or Tcl_GetStringResult. If this flag bit is not set then no -// // error message is left and the interpreter's result will not be modified. -// // -// // TCL_APPEND_VALUE -// // If this bit is set then newValuePtr or newValue is appended to the current -// // value instead of replacing it. If the variable is currently undefined, then -// // the bit is ignored. This bit is only used by the Tcl_Set* procedures. -// // -// // TCL_LIST_ELEMENT -// // -// // If this bit is set, then newValue is converted to a valid Tcl list element -// // before setting (or appending to) the variable. A separator space is appended -// // before the new list element unless the list element is going to be the first -// // element in a list or sublist (i.e. the variable's current value is empty, or -// // contains the single character “{”, or ends in “ }”). When appending, the -// // original value of the variable must also be a valid list, so that the -// // operation is the appending of a new list element onto a list. -// // -// // const char * Tcl_SetVar2(Tcl_Interp *interp, const char *part1, const char *part2, const char *newValue, int flags); -// func XTcl_SetVar2(tls *crt.TLS, interp, part10, part20, newValue0 uintptr, flags int32) { -// ctx := getObject(interp).(*tee.Context) -// part1 := crt.GoString(part10) -// part2 := crt.GoString(part20) -// newValue := crt.GoString(newValue0) -// if part20 != 0 && (strings.Contains(part1, "(") || strings.Contains(part1, ")")) { -// panic(todo("")) -// } -// -// name := part1 -// if part2 != "" { -// name = fmt.Sprintf("%s(%s)", part1, part2) -// } -// switch flags { -// case TCL_GLOBAL_ONLY: -// _ = ctx -// panic(todo("%q %q %q %q %#x(%[5]v)", part1, part2, name, newValue, flags)) -// default: -// panic(todo("%q %q %q %q %#x(%[5]v)", part1, part2, name, newValue, flags)) -// } -// } -// -// // void Tcl_SetWideIntObj(Tcl_Obj *objPtr, Tcl_WideInt wideValue); -// func XTcl_SetWideIntObj(tls *crt.TLS, objPtr uintptr, wideValue crt.Intptr) { panic(todo("")) } -// -// // char * Tcl_TranslateFileName(Tcl_Interp *interp, const char *name, Tcl_DString *bufferPtr); -// func XTcl_TranslateFileName(tls *crt.TLS, interp, name, bufferPtr uintptr) uintptr { panic(todo("")) } -// -// // int Tcl_UnsetVar2(Tcl_Interp *interp, const char *part1, const char *part2, int flags); -// func XTcl_UnsetVar2(tls *crt.TLS, interp, part1, part2 uintptr, flags int32) { panic(todo("")) } -// -// // int Tcl_VarEval(Tcl_Interp *interp, ...); -// func XTcl_VarEval(tls *crt.TLS, interp, va uintptr) int32 { panic(todo("")) } -// -// // void Tcl_WrongNumArgs(Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], const char *message); -// func XTcl_WrongNumArgs(tls *crt.TLS, interp uintptr, objc int32, objv, message uintptr) { -// panic(todo("")) -// } -// -// // int Tcl_GetCommandInfo(Tcl_Interp *interp, const char *cmdName, Tcl_CmdInfo *infoPtr); -// func XTcl_GetCommandInfo(tls *crt.TLS, interp, cmdName, infoPtr uintptr) int32 { -// panic(todo("")) -// } -// -// // Tcl_Command Tcl_CreateCommand(Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc, ClientData clientData, Tcl_CmdDeleteProc *deleteProc); -// func XTcl_CreateCommand(tls *crt.TLS, interp, cmdName, proc, clentData, deleteProc uintptr) uintptr { -// panic(todo("")) -// } -// -// // int Tcl_LinkVar(Tcl_Interp *interp, const char *varName, char *addr, int type); -// func XTcl_LinkVar(tls *crt.TLS, interp, varName, addr uintptr, type1 int32) int32 { -// panic(todo("")) -// } -// -// // void Tcl_AppendElement(Tcl_Interp *interp, const char *element); -// func XTcl_AppendElement(tls *crt.TLS, interp, element uintptr) { -// panic(todo("")) -// } -// -// // int Tcl_GetInt(Tcl_Interp *interp, const char *src, int *intPtr); -// func XTcl_GetInt(tls *crt.TLS, interp, src, intPtr uintptr) int32 { -// panic(todo("")) -// } -// -// // int Tcl_GetDouble(Tcl_Interp *interp, const char *src, double *doublePtr); -// func XTcl_GetDouble(tls *crt.TLS, interp, src, doublePtr uintptr) int32 { -// panic(todo("")) -// } -// -// // Tcl_Channel Tcl_GetChannel(Tcl_Interp *interp, const char *chanName, int *modePtr); -// func XTcl_GetChannel(tls *crt.TLS, interp, chanName, modePtr uintptr) uintptr { -// panic(todo("")) -// } -// -// // int Tcl_Flush(Tcl_Channel chan); -// func XTcl_Flush(tls *crt.TLS, chan1 uintptr) int32 { -// panic(todo("")) -// } -// -// // Tcl_WideInt Tcl_Seek(Tcl_Channel chan, Tcl_WideInt offset, int mode); -// func XTcl_Seek(tls *crt.TLS, chan1 uintptr, offset crt.Intptr, mode int32) crt.Intptr { -// panic(todo("")) -// } -// -// // ClientData Tcl_GetChannelInstanceData(Tcl_Channel chan); -// func XTcl_GetChannelInstanceData(tls *crt.TLS, chan1 uintptr) uintptr { -// panic(todo("")) -// } -// -// // int Tcl_EvalEx(Tcl_Interp *interp, const char *script, int numBytes, int flags); -// func XTcl_EvalEx(tls *crt.TLS, interp, script uintptr, numBytes, flags int32) int32 { -// panic(todo("")) -// } -// -// // __attribute__ ((noreturn)) void Tcl_Panic(const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); -// func XTcl_Panic(tls *crt.TLS, format, va uintptr) { -// panic(todo("")) -// } -// -// // int Tcl_GetBoolean(Tcl_Interp *interp, const char *src, int *boolPtr); -// func XTcl_GetBoolean(tls *crt.TLS, interp, src, boolPtr uintptr) int32 { -// panic(todo("")) -// } -// -// // char * Tcl_AttemptAlloc(unsigned int size); -// func XTcl_AttemptAlloc(tls *crt.TLS, size uint32) uintptr { -// panic(todo("")) -// } -// -// // char * Tcl_AttemptRealloc(char *ptr, unsigned int size); -// func XTcl_AttemptRealloc(tls *crt.TLS, ptr uintptr, size uint32) uintptr { -// panic(todo("")) -// } -// -// // int Tcl_UtfToLower(char *src); -// func XTcl_UtfToLower(tls *crt.TLS, src uintptr) int32 { -// panic(todo("")) -// } -// -// // void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...); -// func XTcl_AppendStringsToObj(tls *crt.TLS, objPtr, va uintptr) { -// panic(todo("")) -// } -// -// // Tcl_HashEntry * Tcl_FirstHashEntry(Tcl_HashTable *tablePtr, Tcl_HashSearch *searchPtr); -// func XTcl_FirstHashEntry(tls *crt.TLS, tablePtr, searchPtr uintptr) uintptr { -// panic(todo("")) -// } -// -// // Tcl_HashEntry * Tcl_NextHashEntry(Tcl_HashSearch *searchPtr); -// func XTcl_NextHashEntry(tls *crt.TLS, searchPtr uintptr) uintptr { -// panic(todo("")) -// } -// -// // void Tcl_DeleteHashTable(Tcl_HashTable *tablePtr); -// func XTcl_DeleteHashTable(tls *crt.TLS, tablePtr uintptr) { -// panic(todo("")) -// } -// -// // void Tcl_InitHashTable(Tcl_HashTable *tablePtr, int keyType); -// func XTcl_InitHashTable(tls *crt.TLS, tablePtr uintptr, keyType int32) { -// panic(todo("")) -// } -// -// // int Tcl_SetCommandInfo(Tcl_Interp *interp, const char *cmdName, const Tcl_CmdInfo *infoPtr); -// func XTcl_SetCommandInfo(tls *crt.TLS, interp, cmdName, infoPtr uintptr) int32 { -// panic(todo("")) -// } -// -// // void Tcl_AppendObjToObj(Tcl_Obj *objPtr, Tcl_Obj *appendObjPtr); -// func XTcl_AppendObjToObj(tls *crt.TLS, objPtr, appendObjPtr uintptr) { -// panic(todo("")) -// } -// -// // Tcl_Obj * Tcl_ObjGetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags); -// func XTcl_ObjGetVar2(tls *crt.TLS, interp, part1Ptr, part2Ptr uintptr, flags int32) uintptr { -// panic(todo("")) -// } -// -// // void Tcl_ThreadQueueEvent(Tcl_ThreadId threadId, Tcl_Event *evPtr, Tcl_QueuePosition position); -// func XTcl_ThreadQueueEvent(tls *crt.TLS, threadId, evPtr uintptr, position uint32) { -// panic(todo("")) -// } -// -// // void Tcl_ThreadAlert(Tcl_ThreadId threadId); -// func XTcl_ThreadAlert(tls *crt.TLS, threadId uintptr) { -// panic(todo("")) -// } -// -// // void Tcl_DeleteInterp(Tcl_Interp *interp); -// func XTcl_DeleteInterp(tls *crt.TLS, interp uintptr) { -// panic(todo("")) -// } -// -// // int Tcl_DoOneEvent(int flags); -// func XTcl_DoOneEvent(tls *crt.TLS, flags int32) int32 { -// panic(todo("")) -// } -// -// // void Tcl_ExitThread(int status); -// func XTcl_ExitThread(tls *crt.TLS, status int32) { -// panic(todo("")) -// } -// -// // Tcl_ThreadId Tcl_GetCurrentThread(void); -// func XTcl_GetCurrentThread(tls *crt.TLS) uintptr { -// panic(todo("")) -// } -// -// // int Tcl_CreateThread(Tcl_ThreadId *idPtr, Tcl_ThreadCreateProc *proc, ClientData clientData, int stackSize, int flags); -// func XTcl_CreateThread(tls *crt.TLS, idPtr, proc, clientData uintptr, stackSize, flags int32) int32 { -// panic(todo("")) -// } -// -// // void Tcl_GetTime(Tcl_Time *timeBuf); -// func XTcl_GetTime(tls *crt.TLS, timeBuf uintptr) { -// panic(todo("")) -// } -// -// // Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp, const char *slaveName); -// func XTcl_GetSlave(tls *crt.TLS, interp, slaveName uintptr) uintptr { -// panic(todo("")) -// } -// -// // ============================================================================ diff --git a/internal/mptest/main_linux_amd64.go b/internal/mptest/main_linux_amd64.go index 9a2f3c1..c281bb7 100644 --- a/internal/mptest/main_linux_amd64.go +++ b/internal/mptest/main_linux_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -o internal/mptest/main_linux_amd64.go testdata/sqlite-src-3320300/mptest/mptest.c -Itestdata/sqlite-amalgamation-3320300 -l modernc.org/sqlite/lib -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_DQS=0 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_UTF16 -DSQLITE_TEST -DSQLITE_THREADSAFE=2 -ccgo-long-double-is-double', DO NOT EDIT. +// Code generated by 'ccgo -o internal/mptest/main_linux_amd64.go testdata/sqlite-src-3320300/mptest/mptest.c -Itestdata/sqlite-amalgamation-3320300 -l modernc.org/sqlite/lib -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_DQS=0 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_MAX_MMAP_SIZE=8589934592 -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_NO_SYNC=1 -DSQLITE_OS_UNIX=1 -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -ccgo-long-double-is-double', DO NOT EDIT. package main @@ -3685,9 +3685,7 @@ func evalSql(tls *crt.TLS, p uintptr, zFormat uintptr, va uintptr) int32 { /* mp ap = va zSql = sqlite3.Xsqlite3_vmprintf(tls, zFormat, ap) _ = ap - if !(g.iTimeout > 0) { - crt.X__assert_fail(tls, ts+151 /* "g.iTimeout>0" */, ts+164 /* "testdata/sqlite-..." */, uint32(494), uintptr(unsafe.Pointer(&__func__))) - } + rc = sqlite3.Xsqlite3_exec(tls, g.db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr, uintptr) int32 }{evalCallback})), p, bp+8 /* &zErrMsg */) @@ -3695,7 +3693,7 @@ func evalSql(tls *crt.TLS, p uintptr, zFormat uintptr, va uintptr) int32 { /* mp if rc != 0 { // var zErr [30]int8 at bp+16, 30 - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+16 /* &zErr[0] */, ts+208 /* "error(%d)" */, crt.VaList(bp, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+16 /* &zErr[0] */, ts+151 /* "error(%d)" */, crt.VaList(bp, rc)) stringAppendTerm(tls, p, bp+16 /* &zErr[0] */) if *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */)) != 0 { stringAppendTerm(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrMsg */))) @@ -3705,8 +3703,6 @@ func evalSql(tls *crt.TLS, p uintptr, zFormat uintptr, va uintptr) int32 { /* mp return rc } -var __func__ = *(*[8]int8)(unsafe.Pointer(ts + 218 /* "evalSql" */)) /* mptest.c:486:56 */ - // Auxiliary SQL function to recursively evaluate SQL. func evalFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* mptest.c:512:13: */ bp := tls.Alloc(24) @@ -3749,57 +3745,57 @@ func startScript(tls *crt.TLS, iClient int32, pzScript uintptr, pTaskId uintptr, *(*uintptr)(unsafe.Pointer(pzScript)) = uintptr(0) g.iTimeout = 0 for 1 != 0 { - rc = trySql(tls, ts+226 /* "BEGIN IMMEDIATE" */, 0) + rc = trySql(tls, ts+161 /* "BEGIN IMMEDIATE" */, 0) if rc == 5 { sqlite3.Xsqlite3_sleep(tls, 10) totalTime = totalTime + (10) continue } if rc != 0 { - fatalError(tls, ts+242 /* "in startScript: ..." */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, g.db))) + fatalError(tls, ts+177 /* "in startScript: ..." */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, g.db))) } if (g.nError != 0) || (g.nTest != 0) { - runSql(tls, ts+261, /* "UPDATE counters ..." */ + runSql(tls, ts+196, /* "UPDATE counters ..." */ crt.VaList(bp+8, g.nError, g.nTest)) g.nError = 0 g.nTest = 0 } - pStmt = prepareSql(tls, ts+314 /* "SELECT 1 FROM cl..." */, crt.VaList(bp+24, iClient)) + pStmt = prepareSql(tls, ts+249 /* "SELECT 1 FROM cl..." */, crt.VaList(bp+24, iClient)) rc = sqlite3.Xsqlite3_step(tls, pStmt) sqlite3.Xsqlite3_finalize(tls, pStmt) if rc == 100 { - runSql(tls, ts+360 /* "DELETE FROM clie..." */, crt.VaList(bp+32, iClient)) + runSql(tls, ts+295 /* "DELETE FROM clie..." */, crt.VaList(bp+32, iClient)) g.iTimeout = 10000 - runSql(tls, ts+391 /* "COMMIT TRANSACTI..." */, 0) + runSql(tls, ts+326 /* "COMMIT TRANSACTI..." */, 0) return 101 } pStmt = prepareSql(tls, - ts+411 /* "SELECT script, i..." */, crt.VaList(bp+40, iClient)) + ts+346 /* "SELECT script, i..." */, crt.VaList(bp+40, iClient)) rc = sqlite3.Xsqlite3_step(tls, pStmt) if rc == 100 { var n int32 = sqlite3.Xsqlite3_column_bytes(tls, pStmt, 0) *(*uintptr)(unsafe.Pointer(pzScript)) = sqlite3.Xsqlite3_malloc(tls, (n + 1)) crt.Xstrcpy(tls, *(*uintptr)(unsafe.Pointer(pzScript)), sqlite3.Xsqlite3_column_text(tls, pStmt, 0)) *(*int32)(unsafe.Pointer(pTaskId)) = crt.AssignInt32(&taskId, sqlite3.Xsqlite3_column_int(tls, pStmt, 1)) - *(*uintptr)(unsafe.Pointer(pzTaskName)) = sqlite3.Xsqlite3_mprintf(tls, ts+503 /* "%s" */, crt.VaList(bp+48, sqlite3.Xsqlite3_column_text(tls, pStmt, 2))) + *(*uintptr)(unsafe.Pointer(pzTaskName)) = sqlite3.Xsqlite3_mprintf(tls, ts+438 /* "%s" */, crt.VaList(bp+48, sqlite3.Xsqlite3_column_text(tls, pStmt, 2))) sqlite3.Xsqlite3_finalize(tls, pStmt) runSql(tls, - ts+506 /* "UPDATE task SE..." */, crt.VaList(bp+56, taskId)) + ts+441 /* "UPDATE task SE..." */, crt.VaList(bp+56, taskId)) g.iTimeout = 10000 - runSql(tls, ts+391 /* "COMMIT TRANSACTI..." */, 0) + runSql(tls, ts+326 /* "COMMIT TRANSACTI..." */, 0) return 0 } sqlite3.Xsqlite3_finalize(tls, pStmt) if rc == 101 { if totalTime > 30000 { - errorMessage(tls, ts+589 /* "Waited over 30 s..." */, 0) - runSql(tls, ts+638 /* "DELETE FROM clie..." */, crt.VaList(bp+64, iClient)) + errorMessage(tls, ts+524 /* "Waited over 30 s..." */, 0) + runSql(tls, ts+573 /* "DELETE FROM clie..." */, crt.VaList(bp+64, iClient)) sqlite3.Xsqlite3_close(tls, g.db) crt.Xexit(tls, 1) } - for trySql(tls, ts+678 /* "COMMIT" */, 0) == 5 { + for trySql(tls, ts+613 /* "COMMIT" */, 0) == 5 { sqlite3.Xsqlite3_sleep(tls, 10) totalTime = totalTime + (10) } @@ -3807,7 +3803,7 @@ func startScript(tls *crt.TLS, iClient int32, pzScript uintptr, pTaskId uintptr, totalTime = totalTime + (100) continue } - fatalError(tls, ts+503 /* "%s" */, crt.VaList(bp+72, sqlite3.Xsqlite3_errmsg(tls, g.db))) + fatalError(tls, ts+438 /* "%s" */, crt.VaList(bp+72, sqlite3.Xsqlite3_errmsg(tls, g.db))) } g.iTimeout = 10000 return int32(0) @@ -3821,9 +3817,9 @@ func finishScript(tls *crt.TLS, iClient int32, taskId int32, bShutdown int32) in runSql(tls, - ts+685 /* "UPDATE task SE..." */, crt.VaList(bp, taskId)) + ts+620 /* "UPDATE task SE..." */, crt.VaList(bp, taskId)) if bShutdown != 0 { - runSql(tls, ts+360 /* "DELETE FROM clie..." */, crt.VaList(bp+8, iClient)) + runSql(tls, ts+295 /* "DELETE FROM clie..." */, crt.VaList(bp+8, iClient)) } return 0 } @@ -3835,28 +3831,28 @@ func startClient(tls *crt.TLS, iClient int32) { /* mptest.c:638:13: */ bp := tls.Alloc(96) defer tls.Free(96) - runSql(tls, ts+766 /* "INSERT OR IGNORE..." */, crt.VaList(bp, iClient)) + runSql(tls, ts+701 /* "INSERT OR IGNORE..." */, crt.VaList(bp, iClient)) if sqlite3.Xsqlite3_changes(tls, g.db) != 0 { var zSys uintptr var rc int32 - zSys = sqlite3.Xsqlite3_mprintf(tls, ts+808, /* "%s \"%s\" --client..." */ + zSys = sqlite3.Xsqlite3_mprintf(tls, ts+743, /* "%s \"%s\" --client..." */ crt.VaList(bp+8, g.argv0, g.zDbFile, iClient, g.iTrace)) if g.bSqlTrace != 0 { - zSys = sqlite3.Xsqlite3_mprintf(tls, ts+839 /* "%z --sqltrace" */, crt.VaList(bp+40, zSys)) + zSys = sqlite3.Xsqlite3_mprintf(tls, ts+774 /* "%z --sqltrace" */, crt.VaList(bp+40, zSys)) } if g.bSync != 0 { - zSys = sqlite3.Xsqlite3_mprintf(tls, ts+853 /* "%z --sync" */, crt.VaList(bp+48, zSys)) + zSys = sqlite3.Xsqlite3_mprintf(tls, ts+788 /* "%z --sync" */, crt.VaList(bp+48, zSys)) } if g.zVfs != 0 { - zSys = sqlite3.Xsqlite3_mprintf(tls, ts+863 /* "%z --vfs \"%s\"" */, crt.VaList(bp+56, zSys, g.zVfs)) + zSys = sqlite3.Xsqlite3_mprintf(tls, ts+798 /* "%z --vfs \"%s\"" */, crt.VaList(bp+56, zSys, g.zVfs)) } if g.iTrace >= 2 { - logMessage(tls, ts+877 /* "system('%q')" */, crt.VaList(bp+72, zSys)) + logMessage(tls, ts+812 /* "system('%q')" */, crt.VaList(bp+72, zSys)) } - zSys = sqlite3.Xsqlite3_mprintf(tls, ts+890 /* "%z &" */, crt.VaList(bp+80, zSys)) + zSys = sqlite3.Xsqlite3_mprintf(tls, ts+825 /* "%z &" */, crt.VaList(bp+80, zSys)) rc = crt.Xsystem(tls, zSys) if rc != 0 { - errorMessage(tls, ts+895 /* "system() fails w..." */, crt.VaList(bp+88, rc)) + errorMessage(tls, ts+830 /* "system() fails w..." */, crt.VaList(bp+88, rc)) } sqlite3.Xsqlite3_free(tls, zSys) } @@ -3867,11 +3863,11 @@ func readFile(tls *crt.TLS, zFilename uintptr) uintptr { /* mptest.c:684:13: */ bp := tls.Alloc(8) defer tls.Free(8) - var in uintptr = crt.Xfopen(tls, zFilename, ts+929 /* "rb" */) + var in uintptr = crt.Xfopen(tls, zFilename, ts+864 /* "rb" */) var sz int64 var z uintptr if in == uintptr(0) { - fatalError(tls, ts+932 /* "cannot open \"%s\"..." */, crt.VaList(bp, zFilename)) + fatalError(tls, ts+867 /* "cannot open \"%s\"..." */, crt.VaList(bp, zFilename)) } crt.Xfseek(tls, in, int64(0), 2) sz = crt.Xftell(tls, in) @@ -3956,7 +3952,7 @@ func extractToken(tls *crt.TLS, zIn uintptr, nIn int32, zOut uintptr, nOut int32 // Find the number of characters up to the start of the next "--end" token. func findEnd(tls *crt.TLS, z uintptr, pnLine uintptr) int32 { /* mptest.c:763:12: */ var n int32 = 0 - for (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) && ((crt.Xstrncmp(tls, (z+uintptr(n)), ts+961 /* "--end" */, uint64(5)) != 0) || !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 5)))))))*2))) & int32(uint16(8192))) != 0)) { + for (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) && ((crt.Xstrncmp(tls, (z+uintptr(n)), ts+896 /* "--end" */, uint64(5)) != 0) || !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 5)))))))*2))) & int32(uint16(8192))) != 0)) { n = n + (tokenLength(tls, (z + uintptr(n)), pnLine)) } return n @@ -3969,11 +3965,11 @@ func findEndif(tls *crt.TLS, z uintptr, stopAtElse int32, pnLine uintptr) int32 var n int32 = 0 for *(*int8)(unsafe.Pointer(z + uintptr(n))) != 0 { var len int32 = tokenLength(tls, (z + uintptr(n)), pnLine) - if ((crt.Xstrncmp(tls, (z+uintptr(n)), ts+967 /* "--endif" */, uint64(7)) == 0) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 7)))))))*2))) & int32(uint16(8192))) != 0)) || - (((stopAtElse != 0) && (crt.Xstrncmp(tls, (z+uintptr(n)), ts+975 /* "--else" */, uint64(6)) == 0)) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 6)))))))*2))) & int32(uint16(8192))) != 0)) { + if ((crt.Xstrncmp(tls, (z+uintptr(n)), ts+902 /* "--endif" */, uint64(7)) == 0) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 7)))))))*2))) & int32(uint16(8192))) != 0)) || + (((stopAtElse != 0) && (crt.Xstrncmp(tls, (z+uintptr(n)), ts+910 /* "--else" */, uint64(6)) == 0)) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 6)))))))*2))) & int32(uint16(8192))) != 0)) { return (n + len) } - if (crt.Xstrncmp(tls, (z+uintptr(n)), ts+982 /* "--if" */, uint64(4)) == 0) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 4)))))))*2))) & int32(uint16(8192))) != 0) { + if (crt.Xstrncmp(tls, (z+uintptr(n)), ts+917 /* "--if" */, uint64(4)) == 0) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(z + uintptr((n + 4)))))))*2))) & int32(uint16(8192))) != 0) { var skip int32 = findEndif(tls, ((z + uintptr(n)) + uintptr(len)), 0, pnLine) n = n + (skip + len) } else { @@ -3993,12 +3989,12 @@ func waitForClient(tls *crt.TLS, iClient int32, iTimeout int32, zErrPrefix uintp if iClient > 0 { pStmt = prepareSql(tls, - ts+987, /* "SELECT 1 FROM ta..." */ + ts+922, /* "SELECT 1 FROM ta..." */ crt.VaList(bp, iClient)) } else { pStmt = prepareSql(tls, - ts+1083 /* "SELECT 1 FROM ta..." */, 0) + ts+1018 /* "SELECT 1 FROM ta..." */, 0) } g.iTimeout = 0 for (((crt.AssignInt32(&rc, sqlite3.Xsqlite3_step(tls, pStmt))) == 5) || (rc == 100)) && @@ -4011,12 +4007,12 @@ func waitForClient(tls *crt.TLS, iClient int32, iTimeout int32, zErrPrefix uintp g.iTimeout = 10000 if rc != 101 { if zErrPrefix == uintptr(0) { - zErrPrefix = ts + 1164 /* "" */ + zErrPrefix = ts + 1099 /* "" */ } if iClient > 0 { - errorMessage(tls, ts+1165 /* "%stimeout waitin..." */, crt.VaList(bp+8, zErrPrefix, iClient)) + errorMessage(tls, ts+1100 /* "%stimeout waitin..." */, crt.VaList(bp+8, zErrPrefix, iClient)) } else { - errorMessage(tls, ts+1197 /* "%stimeout waitin..." */, crt.VaList(bp+24, zErrPrefix)) + errorMessage(tls, ts+1132 /* "%stimeout waitin..." */, crt.VaList(bp+24, zErrPrefix)) } } } @@ -4047,13 +4043,13 @@ func booleanValue(tls *crt.TLS, zArg uintptr) int32 { /* mptest.c:845:12: */ if (i > 0) && (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(i)))) == 0) { return crt.Xatoi(tls, zArg) } - if (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1231 /* "on" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1234 /* "yes" */) == 0) { + if (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1166 /* "on" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1169 /* "yes" */) == 0) { return 1 } - if (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1238 /* "off" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1242 /* "no" */) == 0) { + if (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1173 /* "off" */) == 0) || (sqlite3.Xsqlite3_stricmp(tls, zArg, ts+1177 /* "no" */) == 0) { return 0 } - errorMessage(tls, ts+1245 /* "unknown boolean:..." */, crt.VaList(bp, zArg)) + errorMessage(tls, ts+1180 /* "unknown boolean:..." */, crt.VaList(bp, zArg)) return 0 } @@ -4103,7 +4099,7 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // Run any prior SQL before processing the new --command if ii > iBegin { - var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+1267 /* "%.*s" */, crt.VaList(bp, (ii-iBegin), (zScript+uintptr(iBegin)))) + var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, crt.VaList(bp, (ii-iBegin), (zScript+uintptr(iBegin)))) evalSql(tls, bp+360 /* &sResult */, zSql, 0) sqlite3.Xsqlite3_free(tls, zSql) iBegin = (ii + len) @@ -4111,7 +4107,7 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // Parse the --command if g.iTrace >= 2 { - logMessage(tls, ts+1267 /* "%.*s" */, crt.VaList(bp+16, len, (zScript+uintptr(ii)))) + logMessage(tls, ts+1202 /* "%.*s" */, crt.VaList(bp+16, len, (zScript+uintptr(ii)))) } n = extractToken(tls, ((zScript + uintptr(ii)) + uintptr(2)), (len - 2), bp+380 /* &zCmd[0] */, int32(unsafe.Sizeof([30]int8{}))) for nArg = 0; (n < (len - 2)) && (nArg < 2); nArg++ { @@ -4131,7 +4127,7 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // --sleep N // // Pause for N milliseconds - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1272 /* "sleep" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1207 /* "sleep" */) == 0 { sqlite3.Xsqlite3_sleep(tls, crt.Xatoi(tls, (bp+410 /* &azArg[0] */ +uintptr(0)*100))) } else @@ -4139,7 +4135,7 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // // Exit this process. If N>0 then exit without shutting down // SQLite. (In other words, simulate a crash.) - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1278 /* "exit" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1213 /* "exit" */) == 0 { var rc int32 = crt.Xatoi(tls, (bp + 410 /* &azArg[0] */ + uintptr(0)*100)) finishScript(tls, iClient, taskId, 1) if rc == 0 { @@ -4152,9 +4148,9 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // // Begin a new test case. Announce in the log that the test case // has begun. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1283 /* "testcase" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1218 /* "testcase" */) == 0 { if g.iTrace == 1 { - logMessage(tls, ts+1267 /* "%.*s" */, crt.VaList(bp+32, (len-1), (zScript+uintptr(ii)))) + logMessage(tls, ts+1202 /* "%.*s" */, crt.VaList(bp+32, (len-1), (zScript+uintptr(ii)))) } stringReset(tls, bp+360 /* &sResult */) } else @@ -4163,28 +4159,28 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // // Mark the current task as having finished, even if it is not. // This can be used in conjunction with --exit to simulate a crash. - if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1292 /* "finish" */) == 0) && (iClient > 0) { + if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1227 /* "finish" */) == 0) && (iClient > 0) { finishScript(tls, iClient, taskId, 1) } else // --reset // // Reset accumulated results back to an empty string - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1299 /* "reset" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1234 /* "reset" */) == 0 { stringReset(tls, bp+360 /* &sResult */) } else // --match ANSWER... // // Check to see if output matches ANSWER. Report an error if not. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1305 /* "match" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1240 /* "match" */) == 0 { var jj int32 var zAns uintptr = (zScript + uintptr(ii)) for jj = 7; (jj < (len - 1)) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zAns + uintptr(jj))))))*2))) & int32(uint16(8192))) != 0); jj++ { } zAns += uintptr(jj) if (((len - jj) - 1) != (*String)(unsafe.Pointer(bp+360 /* &sResult */)).n) || (crt.Xstrncmp(tls, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z, zAns, (uint64((len-jj)-1))) != 0) { - errorMessage(tls, ts+1311, /* "line %d of %s:\nE..." */ + errorMessage(tls, ts+1246, /* "line %d of %s:\nE..." */ crt.VaList(bp+48, prevLine, zFilename, ((len-jj)-1), zAns, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z)) } g.nTest++ @@ -4196,7 +4192,7 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // // Check to see if output does or does not match the glob pattern // ANSWER. - if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1356 /* "glob" */) == 0) || (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1361 /* "notglob" */) == 0) { + if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1291 /* "glob" */) == 0) || (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1296 /* "notglob" */) == 0) { var jj int32 var zAns uintptr = (zScript + uintptr(ii)) var zCopy uintptr @@ -4204,9 +4200,9 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile for jj = (9 - (3 * isGlob)); (jj < (len - 1)) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zAns + uintptr(jj))))))*2))) & int32(uint16(8192))) != 0); jj++ { } zAns += uintptr(jj) - zCopy = sqlite3.Xsqlite3_mprintf(tls, ts+1267 /* "%.*s" */, crt.VaList(bp+88, ((len-jj)-1), zAns)) + zCopy = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, crt.VaList(bp+88, ((len-jj)-1), zAns)) if ((crt.Bool32(sqlite3.Xsqlite3_strglob(tls, zCopy, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z) == 0)) ^ isGlob) != 0 { - errorMessage(tls, ts+1369, /* "line %d of %s:\nE..." */ + errorMessage(tls, ts+1304, /* "line %d of %s:\nE..." */ crt.VaList(bp+104, prevLine, zFilename, zCopy, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z)) } sqlite3.Xsqlite3_free(tls, zCopy) @@ -4217,14 +4213,14 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // --output // // Output the result of the previous SQL. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1412 /* "output" */) == 0 { - logMessage(tls, ts+503 /* "%s" */, crt.VaList(bp+136, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z)) + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1347 /* "output" */) == 0 { + logMessage(tls, ts+438 /* "%s" */, crt.VaList(bp+136, (*String)(unsafe.Pointer(bp+360 /* &sResult */)).z)) } else // --source FILENAME // // Run a subscript from a separate file. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1419 /* "source" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1354 /* "source" */) == 0 { var zNewFile uintptr var zNewScript uintptr var zToDel uintptr = uintptr(0) @@ -4234,17 +4230,17 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile for k = (int32(crt.Xstrlen(tls, zFilename)) - 1); (k >= 0) && !((int32(*(*int8)(unsafe.Pointer(zFilename + uintptr(k))))) == '/'); k-- { } if k > 0 { - zNewFile = crt.AssignUintptr(&zToDel, sqlite3.Xsqlite3_mprintf(tls, ts+1426 /* "%.*s/%s" */, crt.VaList(bp+144, k, zFilename, zNewFile))) + zNewFile = crt.AssignUintptr(&zToDel, sqlite3.Xsqlite3_mprintf(tls, ts+1361 /* "%.*s/%s" */, crt.VaList(bp+144, k, zFilename, zNewFile))) } } zNewScript = readFile(tls, zNewFile) if g.iTrace != 0 { - logMessage(tls, ts+1434 /* "begin script [%s..." */, crt.VaList(bp+168, zNewFile)) + logMessage(tls, ts+1369 /* "begin script [%s..." */, crt.VaList(bp+168, zNewFile)) } runScript(tls, 0, 0, zNewScript, zNewFile) sqlite3.Xsqlite3_free(tls, zNewScript) if g.iTrace != 0 { - logMessage(tls, ts+1453 /* "end script [%s]\n" */, crt.VaList(bp+176, zNewFile)) + logMessage(tls, ts+1388 /* "end script [%s]\n" */, crt.VaList(bp+176, zNewFile)) } sqlite3.Xsqlite3_free(tls, zToDel) } else @@ -4252,23 +4248,23 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // --print MESSAGE.... // // Output the remainder of the line to the log file - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1470 /* "print" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1405 /* "print" */) == 0 { var jj int32 for jj = 7; (jj < len) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + jj)))))))*2))) & int32(uint16(8192))) != 0); jj++ { } - logMessage(tls, ts+1267 /* "%.*s" */, crt.VaList(bp+184, (len-jj), ((zScript+uintptr(ii))+uintptr(jj)))) + logMessage(tls, ts+1202 /* "%.*s" */, crt.VaList(bp+184, (len-jj), ((zScript+uintptr(ii))+uintptr(jj)))) } else // --if EXPR // // Skip forward to the next matching --endif or --else if EXPR is false. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1476 /* "if" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1411 /* "if" */) == 0 { var jj int32 var rc int32 var pStmt uintptr for jj = 4; (jj < len) && ((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zScript + uintptr((ii + jj)))))))*2))) & int32(uint16(8192))) != 0); jj++ { } - pStmt = prepareSql(tls, ts+1479 /* "SELECT %.*s" */, crt.VaList(bp+200, (len-jj), ((zScript+uintptr(ii))+uintptr(jj)))) + pStmt = prepareSql(tls, ts+1414 /* "SELECT %.*s" */, crt.VaList(bp+200, (len-jj), ((zScript+uintptr(ii))+uintptr(jj)))) rc = sqlite3.Xsqlite3_step(tls, pStmt) if (rc != 100) || (sqlite3.Xsqlite3_column_int(tls, pStmt, 0) == 0) { ii = ii + (findEndif(tls, ((zScript + uintptr(ii)) + uintptr(len)), 1, bp+376 /* &lineno */)) @@ -4280,7 +4276,7 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // // This command can only be encountered if currently inside an --if that // is true. Skip forward to the next matching --endif. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1491 /* "else" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1426 /* "else" */) == 0 { ii = ii + (findEndif(tls, ((zScript + uintptr(ii)) + uintptr(len)), 0, bp+376 /* &lineno */)) } else @@ -4288,13 +4284,13 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // // This command can only be encountered if currently inside an --if that // is true or an --else of a false if. This is a no-op. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1496 /* "endif" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1431 /* "endif" */) == 0 { } else // --start CLIENT // // Start up the given client. - if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1502 /* "start" */) == 0) && (iClient == 0) { + if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1437 /* "start" */) == 0) && (iClient == 0) { var iNewClient int32 = crt.Xatoi(tls, (bp + 410 /* &azArg[0] */ + uintptr(0)*100)) if iNewClient > 0 { startClient(tls, iNewClient) @@ -4306,14 +4302,14 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // Wait until all tasks complete for the given client. If CLIENT is // "all" then wait for all clients to complete. Wait no longer than // TIMEOUT milliseconds (default 10,000) - if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1508 /* "wait" */) == 0) && (iClient == 0) { + if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1443 /* "wait" */) == 0) && (iClient == 0) { var iTimeout int32 if nArg >= 2 { iTimeout = crt.Xatoi(tls, (bp + 410 /* &azArg[0] */ + uintptr(1)*100)) } else { iTimeout = 10000 } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([1000]int8{})), bp+610 /* &zError[0] */, ts+1513, /* "line %d of %s\n" */ + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([1000]int8{})), bp+610 /* &zError[0] */, ts+1448, /* "line %d of %s\n" */ crt.VaList(bp+216, prevLine, zFilename)) waitForClient(tls, crt.Xatoi(tls, (bp+410 /* &azArg[0] */ +uintptr(0)*100)), iTimeout, bp+610 /* &zError[0] */) } else @@ -4324,25 +4320,25 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // // Assign work to a client. Start the client if it is not running // already. - if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1528 /* "task" */) == 0) && (iClient == 0) { + if (crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1463 /* "task" */) == 0) && (iClient == 0) { var iTarget int32 = crt.Xatoi(tls, (bp + 410 /* &azArg[0] */ + uintptr(0)*100)) var iEnd int32 var zTask uintptr var zTName uintptr iEnd = findEnd(tls, ((zScript + uintptr(ii)) + uintptr(len)), bp+376 /* &lineno */) if iTarget < 0 { - errorMessage(tls, ts+1533, /* "line %d of %s: b..." */ + errorMessage(tls, ts+1468, /* "line %d of %s: b..." */ crt.VaList(bp+232, prevLine, zFilename, iTarget)) } else { - zTask = sqlite3.Xsqlite3_mprintf(tls, ts+1267 /* "%.*s" */, crt.VaList(bp+256, iEnd, ((zScript+uintptr(ii))+uintptr(len)))) + zTask = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, crt.VaList(bp+256, iEnd, ((zScript+uintptr(ii))+uintptr(len)))) if nArg > 1 { - zTName = sqlite3.Xsqlite3_mprintf(tls, ts+503 /* "%s" */, crt.VaList(bp+272, (bp+410 /* &azArg[0] */ +uintptr(1)*100))) + zTName = sqlite3.Xsqlite3_mprintf(tls, ts+438 /* "%s" */, crt.VaList(bp+272, (bp+410 /* &azArg[0] */ +uintptr(1)*100))) } else { - zTName = sqlite3.Xsqlite3_mprintf(tls, ts+1570 /* "%s:%d" */, crt.VaList(bp+280, filenameTail(tls, zFilename), prevLine)) + zTName = sqlite3.Xsqlite3_mprintf(tls, ts+1505 /* "%s:%d" */, crt.VaList(bp+280, filenameTail(tls, zFilename), prevLine)) } startClient(tls, iTarget) runSql(tls, - ts+1576 /* "INSERT INTO task..." */, crt.VaList(bp+296, iTarget, zTask, zTName)) + ts+1511 /* "INSERT INTO task..." */, crt.VaList(bp+296, iTarget, zTask, zTName)) sqlite3.Xsqlite3_free(tls, zTask) sqlite3.Xsqlite3_free(tls, zTName) } @@ -4355,14 +4351,14 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile // // This command calls "test_breakpoint()" which is a routine provided // as a convenient place to set a debugger breakpoint. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1632 /* "breakpoint" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1567 /* "breakpoint" */) == 0 { test_breakpoint(tls) } else // --show-sql-errors BOOLEAN // // Turn display of SQL errors on and off. - if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1643 /* "show-sql-errors" */) == 0 { + if crt.Xstrcmp(tls, bp+380 /* &zCmd[0] */, ts+1578 /* "show-sql-errors" */) == 0 { g.bIgnoreSqlErrors = func() int32 { if nArg >= 1 { return crt.BoolInt32(!(booleanValue(tls, (bp+410 /* &azArg[0] */ +uintptr(0)*100)) != 0)) @@ -4370,13 +4366,13 @@ func runScript(tls *crt.TLS, iClient int32, taskId int32, zScript uintptr, zFile return 1 }() } else { - errorMessage(tls, ts+1659, /* "line %d of %s: u..." */ + errorMessage(tls, ts+1594, /* "line %d of %s: u..." */ crt.VaList(bp+320, prevLine, zFilename, bp+380 /* &zCmd[0] */)) } ii = ii + (len) } if iBegin < ii { - var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+1267 /* "%.*s" */, crt.VaList(bp+344, (ii-iBegin), (zScript+uintptr(iBegin)))) + var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+1202 /* "%.*s" */, crt.VaList(bp+344, (ii-iBegin), (zScript+uintptr(iBegin)))) runSql(tls, zSql, 0) sqlite3.Xsqlite3_free(tls, zSql) } @@ -4398,9 +4394,6 @@ func findOption(tls *crt.TLS, azArg uintptr, pnArg uintptr, zOption uintptr, has var zReturn uintptr = uintptr(0) var nArg int32 = *(*int32)(unsafe.Pointer(pnArg)) - if !((hasArg == 0) || (hasArg == 1)) { - crt.X__assert_fail(tls, ts+1695 /* "hasArg==0 || has..." */, ts+164 /* "testdata/sqlite-..." */, uint32(1211), uintptr(unsafe.Pointer(&__func__1))) - } for i = 0; i < nArg; i++ { var z uintptr if (i + hasArg) >= nArg { @@ -4419,7 +4412,7 @@ func findOption(tls *crt.TLS, azArg uintptr, pnArg uintptr, zOption uintptr, has } if crt.Xstrcmp(tls, z, zOption) == 0 { if (hasArg != 0) && (i == (nArg - 1)) { - fatalError(tls, ts+1718 /* "command-line opt..." */, crt.VaList(bp, z)) + fatalError(tls, ts+1630 /* "command-line opt..." */, crt.VaList(bp, z)) } if hasArg != 0 { zReturn = *(*uintptr)(unsafe.Pointer(azArg + uintptr((i+1))*8)) @@ -4437,8 +4430,6 @@ func findOption(tls *crt.TLS, azArg uintptr, pnArg uintptr, zOption uintptr, has return zReturn } -var __func__1 = *(*[11]int8)(unsafe.Pointer(ts + 1766 /* "findOption" */)) /* mptest.c:1206:2 */ - // Print a usage message for the program and exit func usage(tls *crt.TLS, argv0 uintptr) { /* mptest.c:1241:13: */ bp := tls.Alloc(8) @@ -4451,10 +4442,10 @@ func usage(tls *crt.TLS, argv0 uintptr) { /* mptest.c:1241:13: */ zTail = ((argv0 + uintptr(i)) + uintptr(1)) } } - crt.Xfprintf(tls, crt.Xstderr, ts+1777 /* "Usage: %s DATABA..." */, crt.VaList(bp, zTail)) + crt.Xfprintf(tls, crt.Xstderr, ts+1678 /* "Usage: %s DATABA..." */, crt.VaList(bp, zTail)) crt.Xfprintf(tls, crt.Xstderr, - ts+1816 /* "Options:\n --er..." */, 0) + ts+1717 /* "Options:\n --er..." */, 0) crt.Xexit(tls, 1) } @@ -4464,11 +4455,11 @@ func unrecognizedArguments(tls *crt.TLS, argv0 uintptr, nArg int32, azArg uintpt defer tls.Free(16) var i int32 - crt.Xfprintf(tls, crt.Xstderr, ts+2388 /* "%s: unrecognized..." */, crt.VaList(bp, argv0)) + crt.Xfprintf(tls, crt.Xstderr, ts+2289 /* "%s: unrecognized..." */, crt.VaList(bp, argv0)) for i = 0; i < nArg; i++ { - crt.Xfprintf(tls, crt.Xstderr, ts+2416 /* " %s" */, crt.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)))) + crt.Xfprintf(tls, crt.Xstderr, ts+2317 /* " %s" */, crt.VaList(bp+8, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)))) } - crt.Xfprintf(tls, crt.Xstderr, ts+2420 /* "\n" */, 0) + crt.Xfprintf(tls, crt.Xstderr, ts+2321 /* "\n" */, 0) crt.Xexit(tls, 1) } @@ -4502,50 +4493,50 @@ func main1(tls *crt.TLS, argc int32, argv uintptr) int32 { /* mptest.c:1279:18: usage(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } g.zDbFile = *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)) - if strglob(tls, ts+2422 /* "*.test" */, g.zDbFile) != 0 { + if strglob(tls, ts+2323 /* "*.test" */, g.zDbFile) != 0 { usage(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } - if crt.Xstrcmp(tls, sqlite3.Xsqlite3_sourceid(tls), ts+2429 /* "2020-06-18 14:00..." */) != 0 { + if crt.Xstrcmp(tls, sqlite3.Xsqlite3_sourceid(tls), ts+2330 /* "2020-06-18 14:00..." */) != 0 { crt.Xfprintf(tls, crt.Xstderr, - ts+2514, /* "SQLite library a..." */ - crt.VaList(bp, sqlite3.Xsqlite3_sourceid(tls), ts+2429 /* "2020-06-18 14:00..." */)) + ts+2415, /* "SQLite library a..." */ + crt.VaList(bp, sqlite3.Xsqlite3_sourceid(tls), ts+2330 /* "2020-06-18 14:00..." */)) crt.Xexit(tls, 1) } *(*int32)(unsafe.Pointer(bp + 232 /* n */)) = (argc - 2) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), uintptr(unsafe.Pointer(&g))+64 /* &.zName */, ts+2574 /* "%05d.mptest" */, crt.VaList(bp+16, crt.Xgetpid(tls))) - zJMode = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2586 /* "journalmode" */, 1) - zNRep = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2598 /* "repeat" */, 1) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), uintptr(unsafe.Pointer(&g))+64 /* &.zName */, ts+2475 /* "%05d.mptest" */, crt.VaList(bp+16, crt.Xgetpid(tls))) + zJMode = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2487 /* "journalmode" */, 1) + zNRep = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2499 /* "repeat" */, 1) if zNRep != 0 { nRep = crt.Xatoi(tls, zNRep) } if nRep < 1 { nRep = 1 } - g.zVfs = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2605 /* "vfs" */, 1) - zClient = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2609 /* "client" */, 1) - g.zErrLog = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2616 /* "errlog" */, 1) - g.zLog = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2623 /* "log" */, 1) - zTrace = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2627 /* "trace" */, 1) + g.zVfs = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2506 /* "vfs" */, 1) + zClient = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2510 /* "client" */, 1) + g.zErrLog = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2517 /* "errlog" */, 1) + g.zLog = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2524 /* "log" */, 1) + zTrace = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2528 /* "trace" */, 1) if zTrace != 0 { g.iTrace = crt.Xatoi(tls, zTrace) } - if findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2633 /* "quiet" */, 0) != uintptr(0) { + if findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2534 /* "quiet" */, 0) != uintptr(0) { g.iTrace = 0 } - zTmout = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2639 /* "timeout" */, 1) + zTmout = findOption(tls, (argv + uintptr(2)*8), bp+232 /* &n */, ts+2540 /* "timeout" */, 1) if zTmout != 0 { iTmout = crt.Xatoi(tls, zTmout) } - g.bSqlTrace = (crt.Bool32(findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2647 /* "sqltrace" */, 0) != uintptr(0))) - g.bSync = (crt.Bool32(findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2656 /* "sync" */, 0) != uintptr(0))) + g.bSqlTrace = (crt.Bool32(findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2548 /* "sqltrace" */, 0) != uintptr(0))) + g.bSync = (crt.Bool32(findOption(tls, (argv+uintptr(2)*8), bp+232 /* &n */, ts+2557 /* "sync" */, 0) != uintptr(0))) if g.zErrLog != 0 { - g.pErrLog = crt.Xfopen(tls, g.zErrLog, ts+2661 /* "a" */) + g.pErrLog = crt.Xfopen(tls, g.zErrLog, ts+2562 /* "a" */) } else { g.pErrLog = crt.Xstderr } if g.zLog != 0 { - g.pLog = crt.Xfopen(tls, g.zLog, ts+2661 /* "a" */) + g.pLog = crt.Xfopen(tls, g.zLog, ts+2562 /* "a" */) } else { g.pLog = crt.Xstdout } @@ -4556,33 +4547,33 @@ func main1(tls *crt.TLS, argc int32, argv uintptr) int32 { /* mptest.c:1279:18: if zClient != 0 { iClient = crt.Xatoi(tls, zClient) if iClient < 1 { - fatalError(tls, ts+2663 /* "illegal client n..." */, crt.VaList(bp+40, iClient)) + fatalError(tls, ts+2564 /* "illegal client n..." */, crt.VaList(bp+40, iClient)) } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), uintptr(unsafe.Pointer(&g))+64 /* &.zName */, ts+2690, /* "%05d.client%02d" */ + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), uintptr(unsafe.Pointer(&g))+64 /* &.zName */, ts+2591, /* "%05d.client%02d" */ crt.VaList(bp+48, crt.Xgetpid(tls), iClient)) } else { var nTry int32 = 0 if g.iTrace > 0 { - crt.Xprintf(tls, ts+2706 /* "BEGIN: %s" */, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)))) + crt.Xprintf(tls, ts+2607 /* "BEGIN: %s" */, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)))) for i = 1; i < argc; i++ { - crt.Xprintf(tls, ts+2416 /* " %s" */, crt.VaList(bp+72, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) + crt.Xprintf(tls, ts+2317 /* " %s" */, crt.VaList(bp+72, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) } - crt.Xprintf(tls, ts+2420 /* "\n" */, 0) - crt.Xprintf(tls, ts+2716 /* "With SQLite 3.32..." */, 0) + crt.Xprintf(tls, ts+2321 /* "\n" */, 0) + crt.Xprintf(tls, ts+2617 /* "With SQLite 3.32..." */, 0) for i = 0; (crt.AssignUintptr(&zCOption, sqlite3.Xsqlite3_compileoption_get(tls, i))) != uintptr(0); i++ { - crt.Xprintf(tls, ts+2821 /* "-DSQLITE_%s\n" */, crt.VaList(bp+80, zCOption)) + crt.Xprintf(tls, ts+2722 /* "-DSQLITE_%s\n" */, crt.VaList(bp+80, zCOption)) } crt.Xfflush(tls, crt.Xstdout) } iClient = 0 for ok := true; ok; ok = (((rc != 0) && ((crt.PreIncInt32(&nTry, 1)) < 60)) && (sqlite3.Xsqlite3_sleep(tls, 1000) > 0)) { if (nTry % 5) == 4 { - crt.Xprintf(tls, ts+2834, /* "... %strying to ..." */ + crt.Xprintf(tls, ts+2735, /* "... %strying to ..." */ crt.VaList(bp+88, func() uintptr { if nTry > 5 { - return ts + 2863 /* "still " */ + return ts + 2764 /* "still " */ } - return ts + 1164 /* "" */ + return ts + 1099 /* "" */ }(), g.zDbFile)) } rc = crt.Xunlink(tls, g.zDbFile) @@ -4591,34 +4582,34 @@ func main1(tls *crt.TLS, argc int32, argv uintptr) int32 { /* mptest.c:1279:18: } } if rc != 0 { - fatalError(tls, ts+2870, /* "unable to unlink..." */ + fatalError(tls, ts+2771, /* "unable to unlink..." */ crt.VaList(bp+104, g.zDbFile, nTry)) } openFlags = openFlags | (0x00000004) } rc = sqlite3.Xsqlite3_open_v2(tls, g.zDbFile, (uintptr(unsafe.Pointer(&g)) + 24 /* &.db */), openFlags, g.zVfs) if rc != 0 { - fatalError(tls, ts+2911 /* "cannot open [%s]" */, crt.VaList(bp+120, g.zDbFile)) + fatalError(tls, ts+2812 /* "cannot open [%s]" */, crt.VaList(bp+120, g.zDbFile)) } if iTmout > 0 { sqlite3.Xsqlite3_busy_timeout(tls, g.db, iTmout) } if zJMode != 0 { - runSql(tls, ts+2928 /* "PRAGMA journal_m..." */, crt.VaList(bp+128, zJMode)) + runSql(tls, ts+2829 /* "PRAGMA journal_m..." */, crt.VaList(bp+128, zJMode)) } if !(g.bSync != 0) { - trySql(tls, ts+2952 /* "PRAGMA synchrono..." */, 0) + trySql(tls, ts+2853 /* "PRAGMA synchrono..." */, 0) } sqlite3.Xsqlite3_enable_load_extension(tls, g.db, 1) sqlite3.Xsqlite3_busy_handler(tls, g.db, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32) int32 }{busyHandler})), uintptr(0)) - sqlite3.Xsqlite3_create_function(tls, g.db, ts+2975 /* "vfsname" */, 0, 1, uintptr(0), + sqlite3.Xsqlite3_create_function(tls, g.db, ts+2876 /* "vfsname" */, 0, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{vfsNameFunc})), uintptr(0), uintptr(0)) - sqlite3.Xsqlite3_create_function(tls, g.db, ts+2983 /* "eval" */, 1, 1, uintptr(0), + sqlite3.Xsqlite3_create_function(tls, g.db, ts+2884 /* "eval" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{evalFunc})), uintptr(0), uintptr(0)) @@ -4633,7 +4624,7 @@ func main1(tls *crt.TLS, argc int32, argv uintptr) int32 { /* mptest.c:1279:18: unrecognizedArguments(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), *(*int32)(unsafe.Pointer(bp + 232 /* n */)), (argv + uintptr(2)*8)) } if g.iTrace != 0 { - logMessage(tls, ts+2988 /* "start-client" */, 0) + logMessage(tls, ts+2889 /* "start-client" */, 0) } for 1 != 0 { *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)) = uintptr(0) @@ -4642,54 +4633,54 @@ func main1(tls *crt.TLS, argc int32, argv uintptr) int32 { /* mptest.c:1279:18: break } if g.iTrace != 0 { - logMessage(tls, ts+3001 /* "begin %s (%d)" */, crt.VaList(bp+136, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)), *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)))) + logMessage(tls, ts+2902 /* "begin %s (%d)" */, crt.VaList(bp+136, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)), *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)))) } runScript(tls, iClient, *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)), *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)), *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */))) if g.iTrace != 0 { - logMessage(tls, ts+3015 /* "end %s (%d)" */, crt.VaList(bp+152, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)), *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)))) + logMessage(tls, ts+2916 /* "end %s (%d)" */, crt.VaList(bp+152, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */)), *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)))) } finishScript(tls, iClient, *(*int32)(unsafe.Pointer(bp + 248 /* taskId */)), 0) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 256 /* zTaskName */))) sqlite3.Xsqlite3_sleep(tls, 10) } if g.iTrace != 0 { - logMessage(tls, ts+3027 /* "end-client" */, 0) + logMessage(tls, ts+2928 /* "end-client" */, 0) } } else { var pStmt uintptr var iTimeout int32 if *(*int32)(unsafe.Pointer(bp + 232 /* n */)) == 0 { - fatalError(tls, ts+3038 /* "missing script f..." */, 0) + fatalError(tls, ts+2939 /* "missing script f..." */, 0) } if *(*int32)(unsafe.Pointer(bp + 232 /* n */)) > 1 { unrecognizedArguments(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), *(*int32)(unsafe.Pointer(bp + 232 /* n */)), (argv + uintptr(2)*8)) } runSql(tls, - ts+3062 /* "DROP TABLE IF EX..." */, 0) + ts+2963 /* "DROP TABLE IF EX..." */, 0) *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)) = readFile(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8))) for iRep = 1; iRep <= nRep; iRep++ { if g.iTrace != 0 { - logMessage(tls, ts+3498 /* "begin script [%s..." */, crt.VaList(bp+168, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), iRep)) + logMessage(tls, ts+3399 /* "begin script [%s..." */, crt.VaList(bp+168, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), iRep)) } runScript(tls, 0, 0, *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */)), *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8))) if g.iTrace != 0 { - logMessage(tls, ts+3526 /* "end script [%s] ..." */, crt.VaList(bp+184, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), iRep)) + logMessage(tls, ts+3427 /* "end script [%s] ..." */, crt.VaList(bp+184, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), iRep)) } } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 240 /* zScript */))) - waitForClient(tls, 0, 2000, ts+3552 /* "during shutdown...." */) - trySql(tls, ts+3572 /* "UPDATE client SE..." */, 0) + waitForClient(tls, 0, 2000, ts+3453 /* "during shutdown...." */) + trySql(tls, ts+3473 /* "UPDATE client SE..." */, 0) sqlite3.Xsqlite3_sleep(tls, 10) g.iTimeout = 0 iTimeout = 1000 - for (((crt.AssignInt32(&rc, trySql(tls, ts+3601 /* "SELECT 1 FROM cl..." */, 0))) == 5) || + for (((crt.AssignInt32(&rc, trySql(tls, ts+3502 /* "SELECT 1 FROM cl..." */, 0))) == 5) || (rc == 100)) && (iTimeout > 0) { sqlite3.Xsqlite3_sleep(tls, 10) iTimeout = iTimeout - (10) } sqlite3.Xsqlite3_sleep(tls, 100) - pStmt = prepareSql(tls, ts+3622 /* "SELECT nError, n..." */, 0) + pStmt = prepareSql(tls, ts+3523 /* "SELECT nError, n..." */, 0) iTimeout = 1000 for ((crt.AssignInt32(&rc, sqlite3.Xsqlite3_step(tls, pStmt))) == 5) && (iTimeout > 0) { sqlite3.Xsqlite3_sleep(tls, 10) @@ -4705,15 +4696,15 @@ func main1(tls *crt.TLS, argc int32, argv uintptr) int32 { /* mptest.c:1279:18: maybeClose(tls, g.pLog) maybeClose(tls, g.pErrLog) if iClient == 0 { - crt.Xprintf(tls, ts+3657 /* "Summary: %d erro..." */, crt.VaList(bp+200, g.nError, g.nTest)) - crt.Xprintf(tls, ts+3693 /* "END: %s" */, crt.VaList(bp+216, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)))) + crt.Xprintf(tls, ts+3558 /* "Summary: %d erro..." */, crt.VaList(bp+200, g.nError, g.nTest)) + crt.Xprintf(tls, ts+3594 /* "END: %s" */, crt.VaList(bp+216, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)))) for i = 1; i < argc; i++ { - crt.Xprintf(tls, ts+2416 /* " %s" */, crt.VaList(bp+224, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) + crt.Xprintf(tls, ts+2317 /* " %s" */, crt.VaList(bp+224, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) } - crt.Xprintf(tls, ts+2420 /* "\n" */, 0) + crt.Xprintf(tls, ts+2321 /* "\n" */, 0) } return (crt.Bool32(g.nError > 0)) } -var ts1 = "%s%.*s\n\x00%s:ERROR: \x00%s:FATAL: \x00UPDATE client SET wantHalt=1;\x00%s: \x00main\x00timeout after %dms\x00[%.*s]\x00(info) %s\x00(errcode=%d) %s\x00%s\n%s\n\x00out of memory\x00 \x00nil\x00'\x00g.iTimeout>0\x00testdata/sqlite-src-3320300/mptest/mptest.c\x00error(%d)\x00evalSql\x00BEGIN IMMEDIATE\x00in startScript: %s\x00UPDATE counters SET nError=nError+%d, nTest=nTest+%d\x00SELECT 1 FROM client WHERE id=%d AND wantHalt\x00DELETE FROM client WHERE id=%d\x00COMMIT TRANSACTION;\x00SELECT script, id, name FROM task WHERE client=%d AND starttime IS NULL ORDER BY id LIMIT 1\x00%s\x00UPDATE task SET starttime=strftime('%%Y-%%m-%%d %%H:%%M:%%f','now') WHERE id=%d;\x00Waited over 30 seconds with no work. Giving up.\x00DELETE FROM client WHERE id=%d; COMMIT;\x00COMMIT\x00UPDATE task SET endtime=strftime('%%Y-%%m-%%d %%H:%%M:%%f','now') WHERE id=%d;\x00INSERT OR IGNORE INTO client VALUES(%d,0)\x00%s \"%s\" --client %d --trace %d\x00%z --sqltrace\x00%z --sync\x00%z --vfs \"%s\"\x00system('%q')\x00%z &\x00system() fails with error code %d\x00rb\x00cannot open \"%s\" for reading\x00--end\x00--endif\x00--else\x00--if\x00SELECT 1 FROM task WHERE client=%d AND client IN (SELECT id FROM client) AND endtime IS NULL\x00SELECT 1 FROM task WHERE client IN (SELECT id FROM client) AND endtime IS NULL\x00\x00%stimeout waiting for client %d\x00%stimeout waiting for all clients\x00on\x00yes\x00off\x00no\x00unknown boolean: [%s]\x00%.*s\x00sleep\x00exit\x00testcase\x00finish\x00reset\x00match\x00line %d of %s:\nExpected [%.*s]\n Got [%s]\x00glob\x00notglob\x00line %d of %s:\nExpected [%s]\n Got [%s]\x00output\x00source\x00%.*s/%s\x00begin script [%s]\n\x00end script [%s]\n\x00print\x00if\x00SELECT %.*s\x00else\x00endif\x00start\x00wait\x00line %d of %s\n\x00task\x00line %d of %s: bad client number: %d\x00%s:%d\x00INSERT INTO task(client,script,name) VALUES(%d,'%q',%Q)\x00breakpoint\x00show-sql-errors\x00line %d of %s: unknown command --%s\x00hasArg==0 || hasArg==1\x00command-line option \"--%s\" requires an argument\x00findOption\x00Usage: %s DATABASE ?OPTIONS? ?SCRIPT?\n\x00Options:\n --errlog FILENAME Write errors to FILENAME\n --journalmode MODE Use MODE as the journal_mode\n --log FILENAME Log messages to FILENAME\n --quiet Suppress unnecessary output\n --vfs NAME Use NAME as the VFS\n --repeat N Repeat the test N times\n --sqltrace Enable SQL tracing\n --sync Enable synchronous disk writes\n --timeout MILLISEC Busy timeout is MILLISEC\n --trace BOOLEAN Enable or disable tracing\n\x00%s: unrecognized arguments:\x00 %s\x00\n\x00*.test\x002020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd\x00SQLite library and header mismatch\nLibrary: %s\nHeader: %s\n\x00%05d.mptest\x00journalmode\x00repeat\x00vfs\x00client\x00errlog\x00log\x00trace\x00quiet\x00timeout\x00sqltrace\x00sync\x00a\x00illegal client number: %d\n\x00%05d.client%02d\x00BEGIN: %s\x00With SQLite 3.32.3 2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd\n\x00-DSQLITE_%s\n\x00... %strying to unlink '%s'\n\x00still \x00unable to unlink '%s' after %d attempts\n\x00cannot open [%s]\x00PRAGMA journal_mode=%Q;\x00PRAGMA synchronous=OFF\x00vfsname\x00eval\x00start-client\x00begin %s (%d)\x00end %s (%d)\x00end-client\x00missing script filename\x00DROP TABLE IF EXISTS task;\nDROP TABLE IF EXISTS counters;\nDROP TABLE IF EXISTS client;\nCREATE TABLE task(\n id INTEGER PRIMARY KEY,\n name TEXT,\n client INTEGER,\n starttime DATE,\n endtime DATE,\n script TEXT\n);CREATE INDEX task_i1 ON task(client, starttime);\nCREATE INDEX task_i2 ON task(client, endtime);\nCREATE TABLE counters(nError,nTest);\nINSERT INTO counters VALUES(0,0);\nCREATE TABLE client(id INTEGER PRIMARY KEY, wantHalt);\n\x00begin script [%s] cycle %d\n\x00end script [%s] cycle %d\n\x00during shutdown...\n\x00UPDATE client SET wantHalt=1\x00SELECT 1 FROM client\x00SELECT nError, nTest FROM counters\x00Summary: %d errors out of %d tests\n\x00END: %s\x00" +var ts1 = "%s%.*s\n\x00%s:ERROR: \x00%s:FATAL: \x00UPDATE client SET wantHalt=1;\x00%s: \x00main\x00timeout after %dms\x00[%.*s]\x00(info) %s\x00(errcode=%d) %s\x00%s\n%s\n\x00out of memory\x00 \x00nil\x00'\x00error(%d)\x00BEGIN IMMEDIATE\x00in startScript: %s\x00UPDATE counters SET nError=nError+%d, nTest=nTest+%d\x00SELECT 1 FROM client WHERE id=%d AND wantHalt\x00DELETE FROM client WHERE id=%d\x00COMMIT TRANSACTION;\x00SELECT script, id, name FROM task WHERE client=%d AND starttime IS NULL ORDER BY id LIMIT 1\x00%s\x00UPDATE task SET starttime=strftime('%%Y-%%m-%%d %%H:%%M:%%f','now') WHERE id=%d;\x00Waited over 30 seconds with no work. Giving up.\x00DELETE FROM client WHERE id=%d; COMMIT;\x00COMMIT\x00UPDATE task SET endtime=strftime('%%Y-%%m-%%d %%H:%%M:%%f','now') WHERE id=%d;\x00INSERT OR IGNORE INTO client VALUES(%d,0)\x00%s \"%s\" --client %d --trace %d\x00%z --sqltrace\x00%z --sync\x00%z --vfs \"%s\"\x00system('%q')\x00%z &\x00system() fails with error code %d\x00rb\x00cannot open \"%s\" for reading\x00--end\x00--endif\x00--else\x00--if\x00SELECT 1 FROM task WHERE client=%d AND client IN (SELECT id FROM client) AND endtime IS NULL\x00SELECT 1 FROM task WHERE client IN (SELECT id FROM client) AND endtime IS NULL\x00\x00%stimeout waiting for client %d\x00%stimeout waiting for all clients\x00on\x00yes\x00off\x00no\x00unknown boolean: [%s]\x00%.*s\x00sleep\x00exit\x00testcase\x00finish\x00reset\x00match\x00line %d of %s:\nExpected [%.*s]\n Got [%s]\x00glob\x00notglob\x00line %d of %s:\nExpected [%s]\n Got [%s]\x00output\x00source\x00%.*s/%s\x00begin script [%s]\n\x00end script [%s]\n\x00print\x00if\x00SELECT %.*s\x00else\x00endif\x00start\x00wait\x00line %d of %s\n\x00task\x00line %d of %s: bad client number: %d\x00%s:%d\x00INSERT INTO task(client,script,name) VALUES(%d,'%q',%Q)\x00breakpoint\x00show-sql-errors\x00line %d of %s: unknown command --%s\x00command-line option \"--%s\" requires an argument\x00Usage: %s DATABASE ?OPTIONS? ?SCRIPT?\n\x00Options:\n --errlog FILENAME Write errors to FILENAME\n --journalmode MODE Use MODE as the journal_mode\n --log FILENAME Log messages to FILENAME\n --quiet Suppress unnecessary output\n --vfs NAME Use NAME as the VFS\n --repeat N Repeat the test N times\n --sqltrace Enable SQL tracing\n --sync Enable synchronous disk writes\n --timeout MILLISEC Busy timeout is MILLISEC\n --trace BOOLEAN Enable or disable tracing\n\x00%s: unrecognized arguments:\x00 %s\x00\n\x00*.test\x002020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd\x00SQLite library and header mismatch\nLibrary: %s\nHeader: %s\n\x00%05d.mptest\x00journalmode\x00repeat\x00vfs\x00client\x00errlog\x00log\x00trace\x00quiet\x00timeout\x00sqltrace\x00sync\x00a\x00illegal client number: %d\n\x00%05d.client%02d\x00BEGIN: %s\x00With SQLite 3.32.3 2020-06-18 14:00:33 7ebdfa80be8e8e73324b8d66b3460222eb74c7e9dfd655b48d6ca7e1933cc8fd\n\x00-DSQLITE_%s\n\x00... %strying to unlink '%s'\n\x00still \x00unable to unlink '%s' after %d attempts\n\x00cannot open [%s]\x00PRAGMA journal_mode=%Q;\x00PRAGMA synchronous=OFF\x00vfsname\x00eval\x00start-client\x00begin %s (%d)\x00end %s (%d)\x00end-client\x00missing script filename\x00DROP TABLE IF EXISTS task;\nDROP TABLE IF EXISTS counters;\nDROP TABLE IF EXISTS client;\nCREATE TABLE task(\n id INTEGER PRIMARY KEY,\n name TEXT,\n client INTEGER,\n starttime DATE,\n endtime DATE,\n script TEXT\n);CREATE INDEX task_i1 ON task(client, starttime);\nCREATE INDEX task_i2 ON task(client, endtime);\nCREATE TABLE counters(nError,nTest);\nINSERT INTO counters VALUES(0,0);\nCREATE TABLE client(id INTEGER PRIMARY KEY, wantHalt);\n\x00begin script [%s] cycle %d\n\x00end script [%s] cycle %d\n\x00during shutdown...\n\x00UPDATE client SET wantHalt=1\x00SELECT 1 FROM client\x00SELECT nError, nTest FROM counters\x00Summary: %d errors out of %d tests\n\x00END: %s\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data diff --git a/internal/testfixture/testfixture_linux_amd64.go b/internal/testfixture/testfixture_linux_amd64.go index f740a0b..6c73ba0 100644 --- a/internal/testfixture/testfixture_linux_amd64.go +++ b/internal/testfixture/testfixture_linux_amd64.go @@ -1,4 +1,4 @@ -// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DTCLSH -DTCLSH_INIT_PROC=sqlite3TestInit -I/usr/include/tcl8.6 -ccgo-export-defines -ccgo-export-fields F -ccgo-pkgname testfixture -o internal/testfixture/testfixture_linux_amd64.go testdata/sqlite-src-3320300/ext/expert/sqlite3expert.c testdata/sqlite-src-3320300/ext/expert/test_expert.c testdata/sqlite-src-3320300/ext/fts5/fts5_tcl.c testdata/sqlite-src-3320300/ext/misc/amatch.c testdata/sqlite-src-3320300/ext/misc/carray.c testdata/sqlite-src-3320300/ext/misc/closure.c testdata/sqlite-src-3320300/ext/misc/csv.c testdata/sqlite-src-3320300/ext/misc/eval.c testdata/sqlite-src-3320300/ext/misc/explain.c testdata/sqlite-src-3320300/ext/misc/fileio.c testdata/sqlite-src-3320300/ext/misc/fuzzer.c testdata/sqlite-src-3320300/ext/misc/ieee754.c testdata/sqlite-src-3320300/ext/misc/mmapwarm.c testdata/sqlite-src-3320300/ext/misc/nextchar.c testdata/sqlite-src-3320300/ext/misc/normalize.c testdata/sqlite-src-3320300/ext/misc/percentile.c testdata/sqlite-src-3320300/ext/misc/prefixes.c testdata/sqlite-src-3320300/ext/misc/regexp.c testdata/sqlite-src-3320300/ext/misc/remember.c testdata/sqlite-src-3320300/ext/misc/series.c testdata/sqlite-src-3320300/ext/misc/spellfix.c testdata/sqlite-src-3320300/ext/misc/totype.c testdata/sqlite-src-3320300/ext/misc/unionvtab.c testdata/sqlite-src-3320300/ext/misc/wholenumber.c testdata/sqlite-src-3320300/ext/rbu/sqlite3rbu.c testdata/sqlite-src-3320300/ext/rbu/test_rbu.c testdata/sqlite-src-3320300/src/tclsqlite.c testdata/sqlite-src-3320300/src/test1.c testdata/sqlite-src-3320300/src/test2.c testdata/sqlite-src-3320300/src/test3.c testdata/sqlite-src-3320300/src/test4.c testdata/sqlite-src-3320300/src/test5.c testdata/sqlite-src-3320300/src/test6.c testdata/sqlite-src-3320300/src/test7.c testdata/sqlite-src-3320300/src/test8.c testdata/sqlite-src-3320300/src/test9.c testdata/sqlite-src-3320300/src/test_async.c testdata/sqlite-src-3320300/src/test_autoext.c testdata/sqlite-src-3320300/src/test_backup.c testdata/sqlite-src-3320300/src/test_bestindex.c testdata/sqlite-src-3320300/src/test_blob.c testdata/sqlite-src-3320300/src/test_btree.c testdata/sqlite-src-3320300/src/test_config.c testdata/sqlite-src-3320300/src/test_delete.c testdata/sqlite-src-3320300/src/test_demovfs.c testdata/sqlite-src-3320300/src/test_devsym.c testdata/sqlite-src-3320300/src/test_fs.c testdata/sqlite-src-3320300/src/test_func.c testdata/sqlite-src-3320300/src/test_hexio.c testdata/sqlite-src-3320300/src/test_init.c testdata/sqlite-src-3320300/src/test_intarray.c testdata/sqlite-src-3320300/src/test_journal.c testdata/sqlite-src-3320300/src/test_malloc.c testdata/sqlite-src-3320300/src/test_md5.c testdata/sqlite-src-3320300/src/test_multiplex.c testdata/sqlite-src-3320300/src/test_mutex.c testdata/sqlite-src-3320300/src/test_onefile.c testdata/sqlite-src-3320300/src/test_osinst.c testdata/sqlite-src-3320300/src/test_pcache.c testdata/sqlite-src-3320300/src/test_quota.c testdata/sqlite-src-3320300/src/test_rtree.c testdata/sqlite-src-3320300/src/test_schema.c testdata/sqlite-src-3320300/src/test_superlock.c testdata/sqlite-src-3320300/src/test_syscall.c testdata/sqlite-src-3320300/src/test_tclsh.c testdata/sqlite-src-3320300/src/test_tclvar.c testdata/sqlite-src-3320300/src/test_thread.c testdata/sqlite-src-3320300/src/test_vdbecov.c testdata/sqlite-src-3320300/src/test_vfs.c testdata/sqlite-src-3320300/src/test_window.c -Itestdata/sqlite-amalgamation-3320300 -Itestdata/sqlite-src-3320300 -l modernc.org/tcl/lib,modernc.org/sqlite/internal/crt2,modernc.org/sqlite/lib -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_DQS=0 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_UTF16 -DSQLITE_TEST -DSQLITE_THREADSAFE=2 -ccgo-long-double-is-double', DO NOT EDIT. +// Code generated by 'ccgo -DSQLITE_OMIT_LOAD_EXTENSION -DTCLSH_INIT_PROC=sqlite3TestInit -I/usr/include/tcl8.6 -ccgo-export-defines -ccgo-export-fields F -ccgo-pkgname testfixture -l modernc.org/tcl/lib,modernc.org/sqlite/internal/crt2,modernc.org/sqlite/lib -o internal/testfixture/testfixture_linux_amd64.go testdata/sqlite-src-3320300/ext/expert/sqlite3expert.c testdata/sqlite-src-3320300/ext/expert/test_expert.c testdata/sqlite-src-3320300/ext/fts5/fts5_tcl.c testdata/sqlite-src-3320300/ext/misc/amatch.c testdata/sqlite-src-3320300/ext/misc/carray.c testdata/sqlite-src-3320300/ext/misc/closure.c testdata/sqlite-src-3320300/ext/misc/csv.c testdata/sqlite-src-3320300/ext/misc/eval.c testdata/sqlite-src-3320300/ext/misc/explain.c testdata/sqlite-src-3320300/ext/misc/fileio.c testdata/sqlite-src-3320300/ext/misc/fuzzer.c testdata/sqlite-src-3320300/ext/misc/ieee754.c testdata/sqlite-src-3320300/ext/misc/mmapwarm.c testdata/sqlite-src-3320300/ext/misc/nextchar.c testdata/sqlite-src-3320300/ext/misc/normalize.c testdata/sqlite-src-3320300/ext/misc/percentile.c testdata/sqlite-src-3320300/ext/misc/prefixes.c testdata/sqlite-src-3320300/ext/misc/regexp.c testdata/sqlite-src-3320300/ext/misc/remember.c testdata/sqlite-src-3320300/ext/misc/series.c testdata/sqlite-src-3320300/ext/misc/spellfix.c testdata/sqlite-src-3320300/ext/misc/totype.c testdata/sqlite-src-3320300/ext/misc/unionvtab.c testdata/sqlite-src-3320300/ext/misc/wholenumber.c testdata/sqlite-src-3320300/ext/misc/zipfile.c testdata/sqlite-src-3320300/ext/rbu/sqlite3rbu.c testdata/sqlite-src-3320300/ext/rbu/test_rbu.c testdata/sqlite-src-3320300/src/tclsqlite.c testdata/sqlite-src-3320300/src/test1.c testdata/sqlite-src-3320300/src/test2.c testdata/sqlite-src-3320300/src/test3.c testdata/sqlite-src-3320300/src/test4.c testdata/sqlite-src-3320300/src/test5.c testdata/sqlite-src-3320300/src/test6.c testdata/sqlite-src-3320300/src/test7.c testdata/sqlite-src-3320300/src/test8.c testdata/sqlite-src-3320300/src/test9.c testdata/sqlite-src-3320300/src/test_async.c testdata/sqlite-src-3320300/src/test_autoext.c testdata/sqlite-src-3320300/src/test_backup.c testdata/sqlite-src-3320300/src/test_bestindex.c testdata/sqlite-src-3320300/src/test_blob.c testdata/sqlite-src-3320300/src/test_btree.c testdata/sqlite-src-3320300/src/test_config.c testdata/sqlite-src-3320300/src/test_delete.c testdata/sqlite-src-3320300/src/test_demovfs.c testdata/sqlite-src-3320300/src/test_devsym.c testdata/sqlite-src-3320300/src/test_fs.c testdata/sqlite-src-3320300/src/test_func.c testdata/sqlite-src-3320300/src/test_hexio.c testdata/sqlite-src-3320300/src/test_init.c testdata/sqlite-src-3320300/src/test_intarray.c testdata/sqlite-src-3320300/src/test_journal.c testdata/sqlite-src-3320300/src/test_malloc.c testdata/sqlite-src-3320300/src/test_md5.c testdata/sqlite-src-3320300/src/test_multiplex.c testdata/sqlite-src-3320300/src/test_mutex.c testdata/sqlite-src-3320300/src/test_onefile.c testdata/sqlite-src-3320300/src/test_osinst.c testdata/sqlite-src-3320300/src/test_pcache.c testdata/sqlite-src-3320300/src/test_quota.c testdata/sqlite-src-3320300/src/test_rtree.c testdata/sqlite-src-3320300/src/test_schema.c testdata/sqlite-src-3320300/src/test_server.c testdata/sqlite-src-3320300/src/test_superlock.c testdata/sqlite-src-3320300/src/test_syscall.c testdata/sqlite-src-3320300/src/test_tclsh.c testdata/sqlite-src-3320300/src/test_tclvar.c testdata/sqlite-src-3320300/src/test_thread.c testdata/sqlite-src-3320300/src/test_vdbecov.c testdata/sqlite-src-3320300/src/test_vfs.c testdata/sqlite-src-3320300/src/test_window.c -Itestdata/sqlite-amalgamation-3320300 -Itestdata/sqlite-src-3320300 -DHAVE_USLEEP -DLONGDOUBLE_TYPE=double -DNDEBUG -DSQLITE_CORE -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_DEFAULT_PAGE_SIZE=1024 -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1 -DSQLITE_DQS=0 -DSQLITE_ENABLE_BYTECODE_VTAB -DSQLITE_ENABLE_DBPAGE_VTAB -DSQLITE_ENABLE_DESERIALIZE -DSQLITE_ENABLE_STMTVTAB -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_HAVE_ZLIB=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_MAX_EXPR_DEPTH=0 -DSQLITE_MAX_MMAP_SIZE=8589934592 -DSQLITE_MUTEX_APPDEF=1 -DSQLITE_MUTEX_NOOP -DSQLITE_NO_SYNC=1 -DSQLITE_OS_UNIX=1 -DSQLITE_SERIES_CONSTRAINT_VERIFY=1 -DSQLITE_SERVER=1 -DSQLITE_TEMP_STORE=1 -DSQLITE_TEST -DSQLITE_THREADSAFE=1 -ccgo-long-double-is-double', DO NOT EDIT. package testfixture @@ -37,6 +37,7 @@ const ( IDX_HASH_SIZE = 1023 L_ctermid = 9 L_tmpnam = 20 + NDEBUG = 1 NOT_WITHIN = 0 PARTLY_WITHIN = 1 P_tmpdir = "/tmp" @@ -118,6 +119,7 @@ const ( SQLITE_CONSTRAINT_UNIQUE = 2067 SQLITE_CONSTRAINT_VTAB = 2323 SQLITE_COPY = 0 + SQLITE_CORE = 1 SQLITE_CORRUPT = 11 SQLITE_CORRUPT_INDEX = 779 SQLITE_CORRUPT_SEQUENCE = 523 @@ -188,6 +190,10 @@ const ( SQLITE_DROP_VIEW = 17 SQLITE_DROP_VTABLE = 30 SQLITE_EMPTY = 16 + SQLITE_ENABLE_BYTECODE_VTAB = 1 + SQLITE_ENABLE_DBPAGE_VTAB = 1 + SQLITE_ENABLE_DESERIALIZE = 1 + SQLITE_ENABLE_STMTVTAB = 1 SQLITE_ENABLE_UNLOCK_NOTIFY = 1 SQLITE_ERROR = 1 SQLITE_ERROR_MISSING_COLLSEQ = 257 @@ -238,6 +244,7 @@ const ( SQLITE_FULL = 13 SQLITE_FUNCTION = 31 SQLITE_GET_LOCKPROXYFILE = 2 + SQLITE_HAVE_ZLIB = 1 SQLITE_IGNORE = 2 SQLITE_INDEX_CONSTRAINT_EQ = 2 SQLITE_INDEX_CONSTRAINT_FUNCTION = 150 @@ -331,6 +338,7 @@ const ( SQLITE_LOCK_RESERVED = 2 SQLITE_LOCK_SHARED = 1 SQLITE_MAX_EXPR_DEPTH = 0 + SQLITE_MAX_MMAP_SIZE = 8589934592 SQLITE_MISMATCH = 20 SQLITE_MISUSE = 21 SQLITE_MUTEX_APPDEF = 1 @@ -358,13 +366,12 @@ const ( SQLITE_NOTICE = 27 SQLITE_NOTICE_RECOVER_ROLLBACK = 539 SQLITE_NOTICE_RECOVER_WAL = 283 + SQLITE_NO_SYNC = 1 SQLITE_NULL = 5 SQLITE_OK = 0 SQLITE_OK_LOAD_PERMANENTLY = 256 SQLITE_OK_SYMLINK = 512 SQLITE_OMIT_LOAD_EXTENSION = 1 - SQLITE_OMIT_PROGRESS_CALLBACK = 1 - SQLITE_OMIT_UTF16 = 1 SQLITE_OPEN_AUTOPROXY = 0x00000020 SQLITE_OPEN_CREATE = 0x00000004 SQLITE_OPEN_DELETEONCLOSE = 0x00000008 @@ -386,6 +393,7 @@ const ( SQLITE_OPEN_TRANSIENT_DB = 0x00000400 SQLITE_OPEN_URI = 0x00000040 SQLITE_OPEN_WAL = 0x00080000 + SQLITE_OS_UNIX = 1 SQLITE_PERM = 3 SQLITE_PRAGMA = 19 SQLITE_PREPARE_NORMALIZE = 0x02 @@ -416,6 +424,8 @@ const ( SQLITE_SCHEMA = 17 SQLITE_SELECT = 21 SQLITE_SERIALIZE_NOCOPY = 0x001 + SQLITE_SERIES_CONSTRAINT_VERIFY = 1 + SQLITE_SERVER = 1 SQLITE_SET_LOCKPROXYFILE = 3 SQLITE_SHM_EXCLUSIVE = 8 SQLITE_SHM_LOCK = 2 @@ -446,6 +456,7 @@ const ( SQLITE_SYNC_FULL = 0x00003 SQLITE_SYNC_NORMAL = 0x00002 SQLITE_SYSAPI = 0 + SQLITE_TEMP_STORE = 1 SQLITE_TEST = 1 SQLITE_TESTCTRL_ALWAYS = 13 SQLITE_TESTCTRL_ASSERT = 12 @@ -477,7 +488,7 @@ const ( SQLITE_TESTCTRL_SORTER_MMAP = 24 SQLITE_TESTCTRL_VDBE_COVERAGE = 21 SQLITE_TEXT = 3 - SQLITE_THREADSAFE = 2 + SQLITE_THREADSAFE = 1 SQLITE_TOOBIG = 18 SQLITE_TRACE_CLOSE = 0x08 SQLITE_TRACE_PROFILE = 0x02 @@ -499,12 +510,10 @@ const ( SQLITE_WARNING_AUTOINDEX = 284 SQLITE_WIN32_DATA_DIRECTORY_TYPE = 1 SQLITE_WIN32_TEMP_DIRECTORY_TYPE = 2 - TCLSH = 1 TMP_MAX = 238328 UNIQUE_TABLE_NAME = "t592690916721053953805701627921227776" _ANSI_STDARG_H_ = 0 _ASSERT_H = 1 - _ASSERT_H_DECLS = 0 _ATFILE_SOURCE = 1 _BITS_STDIO_LIM_H = 1 _BITS_TYPESIZES_H = 1 @@ -1303,7 +1312,6 @@ const ( FUZZER_MX_OUTPUT_LENGTH = 100 FUZZER_MX_RULEID = 2147483647 FUZZER_NQUEUE = 20 - NDEBUG = 0 CC_AND = 24 CC_BANG = 15 CC_COMMA = 23 @@ -1388,7 +1396,6 @@ const ( SERIES_COLUMN_STEP = 3 SERIES_COLUMN_STOP = 2 SERIES_COLUMN_VALUE = 0 - SQLITE_SERIES_CONSTRAINT_VERIFY = 0 CCLASS_B = 2 CCLASS_C = 3 CCLASS_D = 4 @@ -1434,46 +1441,81 @@ const ( TOTYPE_BIGENDIAN = 0 TOTYPE_LITTLEENDIAN = 1 SWARMVTAB_MAX_OPEN = 9 - RBU_CREATE_STATE = "CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)" - RBU_DELETE = 2 - RBU_ENABLE_DELTA_CKSUM = 0 - RBU_IDX_DELETE = 4 - RBU_IDX_INSERT = 5 - RBU_INSERT = 1 - RBU_PK_EXTERNAL = 3 - RBU_PK_IPK = 2 - RBU_PK_NONE = 1 - RBU_PK_NOTABLE = 0 - RBU_PK_VTAB = 5 - RBU_PK_WITHOUT_ROWID = 4 - RBU_REPLACE = 3 - RBU_STAGE_CAPTURE = 3 - RBU_STAGE_CKPT = 4 - RBU_STAGE_DONE = 5 - RBU_STAGE_MOVE = 2 - RBU_STAGE_OAL = 1 - RBU_STATE_CKPT = 6 - RBU_STATE_COOKIE = 7 - RBU_STATE_DATATBL = 10 - RBU_STATE_IDX = 3 - RBU_STATE_OALSZ = 8 - RBU_STATE_PHASEONESTEP = 9 - RBU_STATE_PROGRESS = 5 - RBU_STATE_ROW = 4 - RBU_STATE_STAGE = 1 - RBU_STATE_TBL = 2 - RBU_UPDATE = 6 - SQLITE_FCNTL_RBUCNT = 5149216 - SQLITE_RBU_STATE_CHECKPOINT = 3 - SQLITE_RBU_STATE_DONE = 4 - SQLITE_RBU_STATE_ERROR = 5 - SQLITE_RBU_STATE_MOVE = 2 - SQLITE_RBU_STATE_OAL = 1 - SQLITE_RBU_UPDATE_CACHESIZE = 16 - WAL_LOCK_CKPT = 1 - WAL_LOCK_READ0 = 3 - WAL_LOCK_WRITE = 0 - _SQLITE3RBU_H = 0 + FAR = 0 + MAX_MEM_LEVEL = 9 + MAX_WBITS = 15 + STDC = 0 + STDC99 = 0 + ZCONF_H = 0 + ZEXPORT = 0 + ZEXPORTVA = 0 + ZIPFILE_BUFFER_SIZE = 65536 + ZIPFILE_CDS_FIXED_SZ = 46 + ZIPFILE_CDS_NFILE_OFF = 28 + ZIPFILE_CDS_SZCOMPRESSED_OFF = 20 + ZIPFILE_EOCD_FIXED_SZ = 22 + ZIPFILE_EXTRA_TIMESTAMP = 0x5455 + ZIPFILE_F_COLUMN_IDX = 7 + ZIPFILE_LFH_FIXED_SZ = 30 + ZIPFILE_NEWENTRY_FLAGS = 0x800 + ZIPFILE_NEWENTRY_MADEBY = 798 + ZIPFILE_NEWENTRY_REQUIRED = 20 + ZIPFILE_SIGNATURE_CDS = 0x02014b50 + ZIPFILE_SIGNATURE_EOCD = 0x06054b50 + ZIPFILE_SIGNATURE_LFH = 0x04034b50 + ZLIB_H = 0 + ZLIB_VERNUM = 0x12b0 + ZLIB_VERSION = "1.2.11" + ZLIB_VER_MAJOR = 1 + ZLIB_VER_MINOR = 2 + ZLIB_VER_REVISION = 11 + ZLIB_VER_SUBREVISION = 0 + Z_ASCII = 1 + Z_BEST_COMPRESSION = 9 + Z_BEST_SPEED = 1 + Z_BINARY = 0 + Z_BLOCK = 5 + Z_BUF_ERROR = -5 + Z_DATA_ERROR = -3 + Z_DEFAULT_COMPRESSION = -1 + Z_DEFAULT_STRATEGY = 0 + Z_DEFLATED = 8 + Z_ERRNO = -1 + Z_FILTERED = 1 + Z_FINISH = 4 + Z_FIXED = 4 + Z_FULL_FLUSH = 3 + Z_HAVE_STDARG_H = 0 + Z_HAVE_UNISTD_H = 0 + Z_HUFFMAN_ONLY = 2 + Z_LFS64 = 0 + Z_MEM_ERROR = -4 + Z_NEED_DICT = 2 + Z_NO_COMPRESSION = 0 + Z_NO_FLUSH = 0 + Z_NULL = 0 + Z_OK = 0 + Z_PARTIAL_FLUSH = 1 + Z_RLE = 3 + Z_STREAM_END = 1 + Z_STREAM_ERROR = -2 + Z_SYNC_FLUSH = 2 + Z_TEXT = 1 + Z_TREES = 6 + Z_UNKNOWN = 2 + Z_VERSION_ERROR = -6 + _ANSI_STDDEF_H = 0 + _BSD_PTRDIFF_T_ = 0 + _GCC_MAX_ALIGN_T = 0 + _GCC_PTRDIFF_T = 0 + _PTRDIFF_T = 0 + _PTRDIFF_T_ = 0 + _PTRDIFF_T_DECLARED = 0 + _STDDEF_H = 0 + _STDDEF_H_ = 0 + _T_PTRDIFF = 0 + _T_PTRDIFF_ = 0 + Z_const = 0 FP_XSTATE_MAGIC1 = 0x46505853 FP_XSTATE_MAGIC2 = 0x46505845 MAX_PREPARED_STMTS = 100 @@ -1532,6 +1574,7 @@ const ( SIG_UNBLOCK = 1 SQLITE_EVAL_WITHOUTNULLS = 0x00001 SQLITE_TCL_NRE = 1 + TCLSH = 1 _BITS_SIGACTION_H = 1 _BITS_SIGCONTEXT_H = 1 _BITS_SIGEVENT_CONSTS_H = 1 @@ -2146,7 +2189,6 @@ const ( SQLITE_MAX_FUNCTION_ARG = 127 SQLITE_MAX_LENGTH = 1000000000 SQLITE_MAX_LIKE_PATTERN_LENGTH = 50000 - SQLITE_MAX_MMAP_SIZE = 0x7fff0000 SQLITE_MAX_PAGE_COUNT = 1073741823 SQLITE_MAX_PAGE_SIZE = 65536 SQLITE_MAX_SCHEMA_RETRY = 50 @@ -2167,9 +2209,7 @@ const ( SQLITE_NoCkptOnClose = 0x00000800 SQLITE_NoSchemaError = 0x08000000 SQLITE_NullCallback = 0x00000100 - SQLITE_OS_OTHER = 0 SQLITE_OS_SETUP_H = 0 - SQLITE_OS_UNIX = 1 SQLITE_OS_WIN = 0 SQLITE_OmitNoopJoin = 0x0100 SQLITE_OrderByIdxJoin = 0x0040 @@ -2199,7 +2239,6 @@ const ( SQLITE_SkipScan = 0x4000 SQLITE_Stat4 = 0x0800 SQLITE_TEMP_FILE_PREFIX = "etilqs_" - SQLITE_TEMP_STORE = 1 SQLITE_TOKEN_KEYWORD = 0x2 SQLITE_TOKEN_QUOTED = 0x1 SQLITE_TRACE_LEGACY = 0x40 @@ -2429,23 +2468,12 @@ const ( WRC_Prune = 1 XN_EXPR = -2 XN_ROWID = -1 - _ANSI_STDDEF_H = 0 _BITS_UIO_LIM_H = 1 - _BSD_PTRDIFF_T_ = 0 _FILE_OFFSET_BITS = 64 - _GCC_MAX_ALIGN_T = 0 - _GCC_PTRDIFF_T = 0 _LARGEFILE_SOURCE = 1 _LARGE_FILE = 1 - _PTRDIFF_T = 0 - _PTRDIFF_T_ = 0 - _PTRDIFF_T_DECLARED = 0 _SQLITE_OS_H_ = 0 - _STDDEF_H = 0 - _STDDEF_H_ = 0 _SYS_RESOURCE_H = 1 - _T_PTRDIFF = 0 - _T_PTRDIFF_ = 0 _XOPEN_LIM_H = 1 _XOPEN_SOURCE = 600 BTCF_AtLast = 0x08 @@ -2501,6 +2529,23 @@ const ( MX_CHUNK_NUMBER = 299 SQLITE_MULTIPLEX_JOURNAL_8_3_OFFSET = 400 SQLITE_MULTIPLEX_WAL_8_3_OFFSET = 700 + CANBSIZ = 255 + DEV_BSIZE = 512 + EXEC_PAGESIZE = 4096 + HZ = 100 + MAXHOSTNAMELEN = 64 + MAXPATHLEN = 4096 + MAXPATHNAME = 512 + MAXSYMLINKS = 20 + NBBY = 8 + NCARGS = 131072 + NGROUPS = 65536 + NOFILE = 256 + NOGROUP = -1 + SQLITE_DEMOVFS_BUFFERSZ = 8192 + _LINUX_PARAM_H = 0 + _SYS_FILE_H = 1 + _SYS_PARAM_H = 1 DEVSYM_MAX_PATHNAME = 512 DEVSYM_VFS_NAME = "devsym" WRITECRASH_NAME = "writecrash" @@ -2514,7 +2559,6 @@ const ( MULTIPLEX_CTRL_ENABLE = 214014 MULTIPLEX_CTRL_SET_CHUNK_SIZE = 214015 MULTIPLEX_CTRL_SET_MAX_CHUNKS = 214016 - SQLITE_CORE = 1 SQLITE_MULTIPLEX_CHUNK_SIZE = 2147418112 SQLITE_MULTIPLEX_MAX_CHUNKS = 12 SQLITE_MULTIPLEX_VFS_NAME = "multiplex" @@ -2557,6 +2601,13 @@ const ( TESTPCACHE_NPAGE = 217 TESTPCACHE_RESERVE = 17 TESTPCACHE_VALID = 0x364585fd + MSG_Close = 6 + MSG_Done = 7 + MSG_Finalize = 5 + MSG_Open = 1 + MSG_Prepare = 2 + MSG_Reset = 4 + MSG_Step = 3 MAP_FIXED = 0x10 MAP_PRIVATE = 0x02 MAP_SHARED = 0x01 @@ -2654,11 +2705,11 @@ type sqlite32 = struct { Fmutex uintptr FaDb uintptr FnDb int32 - FmDbFlags u32 + FmDbFlags u321 Fflags u64 FlastRowid i64 FszMmap i64 - FnSchemaLock u32 + FnSchemaLock u321 FopenFlags uint32 FerrCode int32 FerrMask int32 @@ -2678,7 +2729,7 @@ type sqlite32 = struct { FnoSharedCache u8 FnSqlExec u8 FnextPagesize int32 - Fmagic u32 + Fmagic u321 FnChange int32 FnTotalChange int32 FaLimit [12]int32 @@ -2723,6 +2774,9 @@ type sqlite32 = struct { Flookaside Lookaside FxAuth sqlite3_xauth FpAuthArg uintptr + FxProgress uintptr + FpProgressArg uintptr + FnProgressOps uint32 FnVTrans int32 FaModule Hash FpVtabCtx uintptr @@ -4248,7 +4302,7 @@ type sqlite3_value1 = struct { Fz uintptr FzMalloc uintptr FszMalloc int32 - FuTemp u32 + FuTemp u321 Fdb uintptr FxDel uintptr } @@ -4837,9 +4891,9 @@ type sqlite3_mutex_methods = sqlite3_mutex_methods1 /* sqlite3.h:7522:38 */ type sqlite3_str1 = struct { Fdb uintptr FzText uintptr - FnAlloc u32 - FmxAlloc u32 - FnChar u32 + FnAlloc u321 + FmxAlloc u321 + FnChar u321 FaccError u8 FprintfFlags u8 _ [2]byte @@ -5792,12 +5846,7 @@ type IdxHash = IdxHash1 /* sqlite3expert.c:121:24 */ // If the allocation fails, set *pRc to SQLITE_NOMEM and return NULL. func idxMalloc(tls *crt.TLS, pRc uintptr, nByte int32) uintptr { /* sqlite3expert.c:158:13: */ var pRet uintptr - if !(*(*int32)(unsafe.Pointer(pRc)) == 0) { - crt.X__assert_fail(tls, ts /* "*pRc==0" */, ts+8 /* "testdata/sqlite-..." */, uint32(160), uintptr(unsafe.Pointer(&__func__))) - } - if !(nByte > 0) { - crt.X__assert_fail(tls, ts+63 /* "nByte>0" */, ts+8 /* "testdata/sqlite-..." */, uint32(161), uintptr(unsafe.Pointer(&__func__))) - } + pRet = sqlite3.Xsqlite3_malloc(tls, nByte) if pRet != 0 { crt.Xmemset(tls, pRet, 0, uint64(nByte)) @@ -5807,8 +5856,6 @@ func idxMalloc(tls *crt.TLS, pRc uintptr, nByte int32) uintptr { /* sqlite3exper return pRet } -var __func__ = *(*[10]int8)(unsafe.Pointer(ts + 71 /* "idxMalloc" */)) /* sqlite3expert.c:158:44 */ - // Initialize an IdxHash hash table. func idxHashInit(tls *crt.TLS, pHash uintptr) { /* sqlite3expert.c:174:13: */ crt.Xmemset(tls, pHash, 0, uint64(unsafe.Sizeof(IdxHash{}))) @@ -5853,9 +5900,7 @@ func idxHashAdd(tls *crt.TLS, pRc uintptr, pHash uintptr, zKey uintptr, zVal uin return 0 }() var pEntry uintptr - if !(iHash >= 0) { - crt.X__assert_fail(tls, ts+81 /* "iHash>=0" */, ts+8 /* "testdata/sqlite-..." */, uint32(223), uintptr(unsafe.Pointer(&__func__1))) - } + for pEntry = *(*uintptr)(unsafe.Pointer((pHash + 8 /* &.aHash */) + uintptr(iHash)*8)); pEntry != 0; pEntry = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpHashNext { if (int32(crt.Xstrlen(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey)) == nKey) && (0 == crt.Xmemcmp(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey, zKey, uint64(nKey))) { return 1 @@ -5878,8 +5923,6 @@ func idxHashAdd(tls *crt.TLS, pRc uintptr, pHash uintptr, zKey uintptr, zVal uin return 0 } -var __func__1 = *(*[11]int8)(unsafe.Pointer(ts + 90 /* "idxHashAdd" */)) /* sqlite3expert.c:218:2 */ - // If zKey/nKey is present in the hash table, return a pointer to the // hash-entry object. func idxHashFind(tls *crt.TLS, pHash uintptr, zKey uintptr, nKey int32) uintptr { /* sqlite3expert.c:250:21: */ @@ -5889,9 +5932,7 @@ func idxHashFind(tls *crt.TLS, pHash uintptr, zKey uintptr, nKey int32) uintptr nKey = int32(crt.Xstrlen(tls, zKey)) } iHash = idxHashString(tls, zKey, nKey) - if !(iHash >= 0) { - crt.X__assert_fail(tls, ts+81 /* "iHash>=0" */, ts+8 /* "testdata/sqlite-..." */, uint32(255), uintptr(unsafe.Pointer(&__func__2))) - } + for pEntry = *(*uintptr)(unsafe.Pointer((pHash + 8 /* &.aHash */) + uintptr(iHash)*8)); pEntry != 0; pEntry = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpHashNext { if (int32(crt.Xstrlen(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey)) == nKey) && (0 == crt.Xmemcmp(tls, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey, zKey, uint64(nKey))) { return pEntry @@ -5900,8 +5941,6 @@ func idxHashFind(tls *crt.TLS, pHash uintptr, zKey uintptr, nKey int32) uintptr return uintptr(0) } -var __func__2 = *(*[12]int8)(unsafe.Pointer(ts + 101 /* "idxHashFind" */)) /* sqlite3expert.c:250:77 */ - // If the hash table contains an entry with a key equal to the string // passed as the final two arguments to this function, return a pointer // to the payload string. Otherwise, if zKey/nKey is not present in the @@ -5920,9 +5959,6 @@ func idxNewConstraint(tls *crt.TLS, pRc uintptr, zColl uintptr) uintptr { /* sql var pNew uintptr var nColl int32 = int32(crt.Xstrlen(tls, zColl)) - if !(*(*int32)(unsafe.Pointer(pRc)) == 0) { - crt.X__assert_fail(tls, ts /* "*pRc==0" */, ts+8 /* "testdata/sqlite-..." */, uint32(284), uintptr(unsafe.Pointer(&__func__3))) - } pNew = idxMalloc(tls, pRc, (int32((uint64(unsafe.Sizeof(IdxConstraint{})) * uint64(nColl)) + uint64(1)))) if pNew != 0 { (*IdxConstraint)(unsafe.Pointer(pNew)).FzColl = (pNew + uintptr(1)*40) @@ -5931,15 +5967,13 @@ func idxNewConstraint(tls *crt.TLS, pRc uintptr, zColl uintptr) uintptr { /* sql return pNew } -var __func__3 = *(*[17]int8)(unsafe.Pointer(ts + 113 /* "idxNewConstraint" */)) /* sqlite3expert.c:280:68 */ - // An error associated with database handle db has just occurred. Pass // the error message to callback function xOut. func idxDatabaseError(tls *crt.TLS, db uintptr, pzErrmsg uintptr) { /* sqlite3expert.c:297:13: */ bp := tls.Alloc(8) defer tls.Free(8) - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) } // Prepare an SQL statement. @@ -5995,21 +6029,12 @@ func expertDequote(tls *crt.TLS, zIn uintptr) uintptr { /* sqlite3expert.c:363:1 var n int32 = int32(crt.Xstrlen(tls, zIn)) var zRet uintptr = sqlite3.Xsqlite3_malloc(tls, n) - if !(int32(*(*int8)(unsafe.Pointer(zIn + uintptr(0)))) == '\'') { - crt.X__assert_fail(tls, ts+133 /* "zIn[0]=='\\''" */, ts+8 /* "testdata/sqlite-..." */, uint32(367), uintptr(unsafe.Pointer(&__func__4))) - } - if !(int32(*(*int8)(unsafe.Pointer(zIn + uintptr((n - 1))))) == '\'') { - crt.X__assert_fail(tls, ts+146 /* "zIn[n-1]=='\\''" */, ts+8 /* "testdata/sqlite-..." */, uint32(368), uintptr(unsafe.Pointer(&__func__4))) - } - if zRet != 0 { var iOut int32 = 0 var iIn int32 = 0 for iIn = 1; iIn < (n - 1); iIn++ { if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(iIn)))) == '\'' { - if !(int32(*(*int8)(unsafe.Pointer(zIn + uintptr((iIn + 1))))) == '\'') { - crt.X__assert_fail(tls, ts+161 /* "zIn[iIn+1]=='\\''" */, ts+8 /* "testdata/sqlite-..." */, uint32(375), uintptr(unsafe.Pointer(&__func__4))) - } + iIn++ } *(*int8)(unsafe.Pointer(zRet + uintptr(crt.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) @@ -6020,8 +6045,6 @@ func expertDequote(tls *crt.TLS, zIn uintptr) uintptr { /* sqlite3expert.c:363:1 return zRet } -var __func__4 = *(*[14]int8)(unsafe.Pointer(ts + 178 /* "expertDequote" */)) /* sqlite3expert.c:363:44 */ - // This function is the implementation of both the xConnect and xCreate // methods of the r-tree virtual table. // @@ -6038,7 +6061,7 @@ func expertConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint // var rc int32 at bp, 4 if argc != 4 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+192 /* "internal error!" */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3 /* "internal error!" */, 0) *(*int32)(unsafe.Pointer(bp /* rc */)) = 1 } else { var zCreateTable uintptr = expertDequote(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8))) @@ -6050,9 +6073,6 @@ func expertConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint if *(*int32)(unsafe.Pointer(bp /* rc */)) == 0 { (*ExpertVtab)(unsafe.Pointer(p)).FpExpert = pExpert (*ExpertVtab)(unsafe.Pointer(p)).FpTab = (*sqlite3expert)(unsafe.Pointer(pExpert)).FpTable - if !(sqlite3.Xsqlite3_stricmp(tls, (*IdxTable)(unsafe.Pointer((*ExpertVtab)(unsafe.Pointer(p)).FpTab)).FzName, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8))) == 0) { - crt.X__assert_fail(tls, ts+208 /* "sqlite3_stricmp(..." */, ts+8 /* "testdata/sqlite-..." */, uint32(419), uintptr(unsafe.Pointer(&__func__5))) - } } sqlite3.Xsqlite3_free(tls, zCreateTable) } else { @@ -6064,8 +6084,6 @@ func expertConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint return *(*int32)(unsafe.Pointer(bp /* rc */)) } -var __func__5 = *(*[14]int8)(unsafe.Pointer(ts + 252 /* "expertConnect" */)) /* sqlite3expert.c:401:2 */ - func expertDisconnect(tls *crt.TLS, pVtab uintptr) int32 { /* sqlite3expert.c:431:12: */ var p uintptr = pVtab sqlite3.Xsqlite3_free(tls, p) @@ -6181,9 +6199,6 @@ func expertNext(tls *crt.TLS, cur uintptr) int32 { /* sqlite3expert.c:553:12: */ var pCsr uintptr = cur var rc int32 = 0 - if !((*ExpertCsr)(unsafe.Pointer(pCsr)).FpData != 0) { - crt.X__assert_fail(tls, ts+266 /* "pCsr->pData" */, ts+8 /* "testdata/sqlite-..." */, uint32(557), uintptr(unsafe.Pointer(&__func__6))) - } rc = sqlite3.Xsqlite3_step(tls, (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData) if rc != 100 { rc = sqlite3.Xsqlite3_finalize(tls, (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData) @@ -6195,8 +6210,6 @@ func expertNext(tls *crt.TLS, cur uintptr) int32 { /* sqlite3expert.c:553:12: */ return rc } -var __func__6 = *(*[11]int8)(unsafe.Pointer(ts + 278 /* "expertNext" */)) /* sqlite3expert.c:553:48 */ - // Virtual table module xRowid method. func expertRowid(tls *crt.TLS, cur uintptr, pRowid uintptr) int32 { /* sqlite3expert.c:572:12: */ _ = cur @@ -6233,7 +6246,7 @@ func expertFilter(tls *crt.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc (*ExpertCsr)(unsafe.Pointer(pCsr)).FpData = uintptr(0) if rc == 0 { rc = idxPrintfPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(pExpert)).Fdb, (pCsr + 8 /* &.pData */), (pVtab /* &.base */ + 16 /* &.zErrMsg */), - ts+289 /* "SELECT * FROM ma..." */, crt.VaList(bp, (*IdxTable)(unsafe.Pointer((*ExpertVtab)(unsafe.Pointer(pVtab)).FpTab)).FzName)) + ts+19 /* "SELECT * FROM ma..." */, crt.VaList(bp, (*IdxTable)(unsafe.Pointer((*ExpertVtab)(unsafe.Pointer(pVtab)).FpTab)).FzName)) } if rc == 0 { @@ -6244,7 +6257,7 @@ func expertFilter(tls *crt.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc func idxRegisterVtab(tls *crt.TLS, p uintptr) int32 { /* sqlite3expert.c:622:12: */ - return sqlite3.Xsqlite3_create_module(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, ts+326 /* "expert" */, uintptr(unsafe.Pointer(&expertModule)), p) + return sqlite3.Xsqlite3_create_module(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, ts+56 /* "expert" */, uintptr(unsafe.Pointer(&expertModule)), p) } var expertModule = sqlite3_module{FiVersion: 2, FxCreate: // iVersion @@ -6307,12 +6320,12 @@ func idxGetTableInfo(tls *crt.TLS, db uintptr, zTab uintptr, ppOut uintptr, pzEr var rc2 int32 var pCsr uintptr = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = idxPrintfPrepareStmt(tls, db, bp+8 /* &p1 */, pzErrmsg, ts+333 /* "PRAGMA table_inf..." */, crt.VaList(bp, zTab)) + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = idxPrintfPrepareStmt(tls, db, bp+8 /* &p1 */, pzErrmsg, ts+63 /* "PRAGMA table_inf..." */, crt.VaList(bp, zTab)) for (*(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* p1 */)))) { *(*uintptr)(unsafe.Pointer(bp + 16 /* zCol */)) = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* p1 */)), 1) nByte = nByte + (1 + int32(crt.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zCol */))))) *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3.Xsqlite3_table_column_metadata(tls, - db, ts+354 /* "main" */, zTab, *(*uintptr)(unsafe.Pointer(bp + 16 /* zCol */)), uintptr(0), bp+16 /* &zCol */, uintptr(0), uintptr(0), uintptr(0)) + db, ts+84 /* "main" */, zTab, *(*uintptr)(unsafe.Pointer(bp + 16 /* zCol */)), uintptr(0), bp+16 /* &zCol */, uintptr(0), uintptr(0), uintptr(0)) nByte = nByte + (1 + int32(crt.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zCol */))))) nCol++ } @@ -6341,7 +6354,7 @@ func idxGetTableInfo(tls *crt.TLS, db uintptr, zTab uintptr, ppOut uintptr, pzEr pCsr += uintptr(nCopy) *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3.Xsqlite3_table_column_metadata(tls, - db, ts+354 /* "main" */, zTab, *(*uintptr)(unsafe.Pointer(bp + 32 /* zCol */)), uintptr(0), bp+32 /* &zCol */, uintptr(0), uintptr(0), uintptr(0)) + db, ts+84 /* "main" */, zTab, *(*uintptr)(unsafe.Pointer(bp + 32 /* zCol */)), uintptr(0), bp+32 /* &zCol */, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == 0 { nCopy = (int32(crt.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* zCol */)))) + 1) (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(pNew)).FaCol + uintptr(nCol)*24)).FzColl = pCsr @@ -6432,25 +6445,25 @@ func idxAppendColDefn(tls *crt.TLS, pRc uintptr, zIn uintptr, pTab uintptr, pCon var zRet uintptr = zIn var p uintptr = ((*IdxTable)(unsafe.Pointer(pTab)).FaCol + uintptr((*IdxConstraint)(unsafe.Pointer(pCons)).FiCol)*24) if zRet != 0 { - zRet = idxAppendText(tls, pRc, zRet, ts+359 /* ", " */, 0) + zRet = idxAppendText(tls, pRc, zRet, ts+89 /* ", " */, 0) } if idxIdentifierRequiresQuotes(tls, (*IdxColumn)(unsafe.Pointer(p)).FzName) != 0 { - zRet = idxAppendText(tls, pRc, zRet, ts+362 /* "%Q" */, crt.VaList(bp, (*IdxColumn)(unsafe.Pointer(p)).FzName)) + zRet = idxAppendText(tls, pRc, zRet, ts+92 /* "%Q" */, crt.VaList(bp, (*IdxColumn)(unsafe.Pointer(p)).FzName)) } else { - zRet = idxAppendText(tls, pRc, zRet, ts+130 /* "%s" */, crt.VaList(bp+8, (*IdxColumn)(unsafe.Pointer(p)).FzName)) + zRet = idxAppendText(tls, pRc, zRet, ts /* "%s" */, crt.VaList(bp+8, (*IdxColumn)(unsafe.Pointer(p)).FzName)) } if sqlite3.Xsqlite3_stricmp(tls, (*IdxColumn)(unsafe.Pointer(p)).FzColl, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl) != 0 { if idxIdentifierRequiresQuotes(tls, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl) != 0 { - zRet = idxAppendText(tls, pRc, zRet, ts+365 /* " COLLATE %Q" */, crt.VaList(bp+16, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl)) + zRet = idxAppendText(tls, pRc, zRet, ts+95 /* " COLLATE %Q" */, crt.VaList(bp+16, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl)) } else { - zRet = idxAppendText(tls, pRc, zRet, ts+377 /* " COLLATE %s" */, crt.VaList(bp+24, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl)) + zRet = idxAppendText(tls, pRc, zRet, ts+107 /* " COLLATE %s" */, crt.VaList(bp+24, (*IdxConstraint)(unsafe.Pointer(pCons)).FzColl)) } } if (*IdxConstraint)(unsafe.Pointer(pCons)).FbDesc != 0 { - zRet = idxAppendText(tls, pRc, zRet, ts+389 /* " DESC" */, 0) + zRet = idxAppendText(tls, pRc, zRet, ts+119 /* " DESC" */, 0) } return zRet } @@ -6476,7 +6489,7 @@ func idxFindCompatible(tls *crt.TLS, pRc uintptr, dbm uintptr, pScan uintptr, pE nEq++ } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxPrintfPrepareStmt(tls, dbm, bp+16 /* &pIdxList */, uintptr(0), ts+395 /* "PRAGMA index_lis..." */, crt.VaList(bp, zTbl)) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxPrintfPrepareStmt(tls, dbm, bp+16 /* &pIdxList */, uintptr(0), ts+125 /* "PRAGMA index_lis..." */, crt.VaList(bp, zTbl)) for (*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == 0) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pIdxList */))) == 100) { var bMatch int32 = 1 var pT uintptr = pTail @@ -6488,7 +6501,7 @@ func idxFindCompatible(tls *crt.TLS, pRc uintptr, dbm uintptr, pScan uintptr, pE (*IdxConstraint)(unsafe.Pointer(pIter)).FbFlag = 0 } - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxPrintfPrepareStmt(tls, dbm, bp+24 /* &pInfo */, uintptr(0), ts+416 /* "PRAGMA index_xIn..." */, crt.VaList(bp+8, zIdx)) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = idxPrintfPrepareStmt(tls, dbm, bp+24 /* &pInfo */, uintptr(0), ts+146 /* "PRAGMA index_xIn..." */, crt.VaList(bp+8, zIdx)) for (*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == 0) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pInfo */))) == 100) { var iIdx int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pInfo */)), 0) var iCol int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pInfo */)), 1) @@ -6564,14 +6577,14 @@ func idxCreateFromCons(tls *crt.TLS, p uintptr, pScan uintptr, pEq uintptr, pTai for i = 0; *(*int8)(unsafe.Pointer(zCols + uintptr(i))) != 0; i++ { h = h + ((h << 3) + uint32(*(*int8)(unsafe.Pointer(zCols + uintptr(i))))) } - zName = sqlite3.Xsqlite3_mprintf(tls, ts+438 /* "%s_idx_%08x" */, crt.VaList(bp, zTable, h)) + zName = sqlite3.Xsqlite3_mprintf(tls, ts+168 /* "%s_idx_%08x" */, crt.VaList(bp, zTable, h)) if zName == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = 7 } else { if idxIdentifierRequiresQuotes(tls, zTable) != 0 { - zFmt = ts + 450 /* "CREATE INDEX '%q..." */ + zFmt = ts + 180 /* "CREATE INDEX '%q..." */ } else { - zFmt = ts + 478 /* "CREATE INDEX %s ..." */ + zFmt = ts + 208 /* "CREATE INDEX %s ..." */ } zIdx = sqlite3.Xsqlite3_mprintf(tls, zFmt, crt.VaList(bp+16, zName, zTable, zCols)) if !(zIdx != 0) { @@ -6623,9 +6636,7 @@ func idxCreateFromWhere(tls *crt.TLS, p uintptr, pScan uintptr, pTail uintptr) i // index for each range constraint. if pTail == uintptr(0) { for pCon = (*IdxScan)(unsafe.Pointer(pScan)).FpRange; (rc == 0) && (pCon != 0); pCon = (*IdxConstraint)(unsafe.Pointer(pCon)).FpNext { - if !((*IdxConstraint)(unsafe.Pointer(pCon)).FpLink == uintptr(0)) { - crt.X__assert_fail(tls, ts+504 /* "pCon->pLink==0" */, ts+8 /* "testdata/sqlite-..." */, uint32(1005), uintptr(unsafe.Pointer(&__func__7))) - } + if !(idxFindConstraint(tls, p1, pCon) != 0) && !(idxFindConstraint(tls, pTail, pCon) != 0) { rc = idxCreateFromCons(tls, p, pScan, p1, pCon) } @@ -6635,8 +6646,6 @@ func idxCreateFromWhere(tls *crt.TLS, p uintptr, pScan uintptr, pTail uintptr) i return rc } -var __func__7 = *(*[19]int8)(unsafe.Pointer(ts + 519 /* "idxCreateFromWhe..." */)) /* sqlite3expert.c:984:2 */ - // Create candidate indexes in database [dbm] based on the data in // linked-list pScan. func idxCreateCandidates(tls *crt.TLS, p uintptr) int32 { /* sqlite3expert.c:1019:12: */ @@ -6747,7 +6756,7 @@ __1: *(*uintptr)(unsafe.Pointer(bp + 8216 /* pExplain */)) = uintptr(0) idxHashClear(tls, bp+24 /* &hIdx */) *(*int32)(unsafe.Pointer(bp + 8224 /* rc */)) = idxPrintfPrepareStmt(tls, dbm, bp+8216 /* &pExplain */, pzErr, - ts+538 /* "EXPLAIN QUERY PL..." */, crt.VaList(bp, (*IdxStatement)(unsafe.Pointer(pStmt)).FzSql)) + ts+234 /* "EXPLAIN QUERY PL..." */, crt.VaList(bp, (*IdxStatement)(unsafe.Pointer(pStmt)).FzSql)) __4: if !((*(*int32)(unsafe.Pointer(bp + 8224 /* rc */)) == 0) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8216 /* pExplain */))) == 100)) { goto __5 @@ -6771,14 +6780,14 @@ __7: goto __9 } zIdx = uintptr(0) - if !(((i + 13) < nDetail) && (crt.Xmemcmp(tls, (zDetail+uintptr(i)), ts+560 /* " USING INDEX " */, uint64(13)) == 0)) { + if !(((i + 13) < nDetail) && (crt.Xmemcmp(tls, (zDetail+uintptr(i)), ts+256 /* " USING INDEX " */, uint64(13)) == 0)) { goto __10 } zIdx = (zDetail + uintptr((i + 13))) goto __11 __10: if !(((i + 22) < nDetail) && - (crt.Xmemcmp(tls, (zDetail+uintptr(i)), ts+574 /* " USING COVERING ..." */, uint64(22)) == 0)) { + (crt.Xmemcmp(tls, (zDetail+uintptr(i)), ts+270 /* " USING COVERING ..." */, uint64(22)) == 0)) { goto __12 } zIdx = (zDetail + uintptr((i + 22))) @@ -6825,7 +6834,7 @@ __9: if !(int32(*(*int8)(unsafe.Pointer(zDetail + uintptr(0)))) != '-') { goto __18 } - (*IdxStatement)(unsafe.Pointer(pStmt)).FzEQP = idxAppendText(tls, bp+8224 /* &rc */, (*IdxStatement)(unsafe.Pointer(pStmt)).FzEQP, ts+597 /* "%s\n" */, crt.VaList(bp+8, zDetail)) + (*IdxStatement)(unsafe.Pointer(pStmt)).FzEQP = idxAppendText(tls, bp+8224 /* &rc */, (*IdxStatement)(unsafe.Pointer(pStmt)).FzEQP, ts+293 /* "%s\n" */, crt.VaList(bp+8, zDetail)) __18: ; goto __4 @@ -6837,7 +6846,7 @@ __19: if !(pEntry != 0) { goto __21 } - (*IdxStatement)(unsafe.Pointer(pStmt)).FzIdx = idxAppendText(tls, bp+8224 /* &rc */, (*IdxStatement)(unsafe.Pointer(pStmt)).FzIdx, ts+601 /* "%s;\n" */, crt.VaList(bp+16, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey)) + (*IdxStatement)(unsafe.Pointer(pStmt)).FzIdx = idxAppendText(tls, bp+8224 /* &rc */, (*IdxStatement)(unsafe.Pointer(pStmt)).FzIdx, ts+297 /* "%s;\n" */, crt.VaList(bp+16, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzKey)) goto __20 __20: pEntry = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpNext @@ -6868,7 +6877,7 @@ func idxAuthCallback(tls *crt.TLS, pCtx uintptr, eOp int32, z3 uintptr, z4 uintp _ = z4 _ = zTrigger if ((eOp == 18) || (eOp == 23)) || (eOp == 9) { - if sqlite3.Xsqlite3_stricmp(tls, zDb, ts+354 /* "main" */) == 0 { + if sqlite3.Xsqlite3_stricmp(tls, zDb, ts+84 /* "main" */) == 0 { var p uintptr = pCtx var pTab uintptr for pTab = (*sqlite3expert)(unsafe.Pointer(p)).FpTable; pTab != 0; pTab = (*IdxTable)(unsafe.Pointer(pTab)).FpNext { @@ -6904,7 +6913,7 @@ func idxProcessOneTrigger(tls *crt.TLS, p uintptr, pWrite uintptr, pzErr uintptr var pTab uintptr = (*IdxWrite)(unsafe.Pointer(pWrite)).FpTab var zTab uintptr = (*IdxTable)(unsafe.Pointer(pTab)).FzName - var zSql uintptr = ts + 606 /* "SELECT 'CREATE T..." */ + var zSql uintptr = ts + 302 /* "SELECT 'CREATE T..." */ *(*uintptr)(unsafe.Pointer(bp + 80 /* pSelect */)) = uintptr(0) *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = 0 var zWrite uintptr = uintptr(0) @@ -6919,7 +6928,7 @@ func idxProcessOneTrigger(tls *crt.TLS, p uintptr, pWrite uintptr, pzErr uintptr // Rename the table in the temp schema to zInt if *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) == 0 { - var z uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+732 /* "ALTER TABLE temp..." */, crt.VaList(bp+16, zTab, zInt)) + var z uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+428 /* "ALTER TABLE temp..." */, crt.VaList(bp+16, zTab, zInt)) if z == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = 7 } else { @@ -6932,28 +6941,28 @@ func idxProcessOneTrigger(tls *crt.TLS, p uintptr, pWrite uintptr, pzErr uintptr case 18: { var i int32 - zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+765 /* "INSERT INTO %Q V..." */, crt.VaList(bp+32, zInt)) + zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+461 /* "INSERT INTO %Q V..." */, crt.VaList(bp+32, zInt)) for i = 0; i < (*IdxTable)(unsafe.Pointer(pTab)).FnCol; i++ { - zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+788 /* "%s?" */, crt.VaList(bp+40, func() uintptr { + zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+484 /* "%s?" */, crt.VaList(bp+40, func() uintptr { if i == 0 { - return ts + 792 /* "" */ + return ts + 488 /* "" */ } - return ts + 359 /* ", " */ + return ts + 89 /* ", " */ }())) } - zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+793 /* ")" */, 0) + zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+489 /* ")" */, 0) break } case 23: { var i int32 - zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+795 /* "UPDATE %Q SET " */, crt.VaList(bp+48, zInt)) + zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+491 /* "UPDATE %Q SET " */, crt.VaList(bp+48, zInt)) for i = 0; i < (*IdxTable)(unsafe.Pointer(pTab)).FnCol; i++ { - zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+810 /* "%s%Q=?" */, crt.VaList(bp+56, func() uintptr { + zWrite = idxAppendText(tls, bp+88 /* &rc */, zWrite, ts+506 /* "%s%Q=?" */, crt.VaList(bp+56, func() uintptr { if i == 0 { - return ts + 792 /* "" */ + return ts + 488 /* "" */ } - return ts + 359 /* ", " */ + return ts + 89 /* ", " */ }(), (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(pTab)).FaCol+uintptr(i)*24)).FzName)) } @@ -6961,11 +6970,9 @@ func idxProcessOneTrigger(tls *crt.TLS, p uintptr, pWrite uintptr, pzErr uintptr } default: { - if !((*IdxWrite)(unsafe.Pointer(pWrite)).FeOp == 9) { - crt.X__assert_fail(tls, ts+817 /* "pWrite->eOp==9" */, ts+8 /* "testdata/sqlite-..." */, uint32(1273), uintptr(unsafe.Pointer(&__func__8))) - } + if *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) == 0 { - zWrite = sqlite3.Xsqlite3_mprintf(tls, ts+832 /* "DELETE FROM %Q" */, crt.VaList(bp+72, zInt)) + zWrite = sqlite3.Xsqlite3_mprintf(tls, ts+513 /* "DELETE FROM %Q" */, crt.VaList(bp+72, zInt)) if zWrite == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = 7 } @@ -6990,9 +6997,8 @@ func idxProcessOneTrigger(tls *crt.TLS, p uintptr, pWrite uintptr, pzErr uintptr return *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) } -var __func__8 = *(*[21]int8)(unsafe.Pointer(ts + 847 /* "idxProcessOneTri..." */)) /* sqlite3expert.c:1220:2 */ -var zInt uintptr = ts + 868 /* "t592690916721053..." */ /* sqlite3expert.c:1221:21 */ -var zDrop uintptr = ts + 906 /* "DROP TABLE t5926..." */ /* sqlite3expert.c:1222:21 */ +var zInt uintptr = ts + 528 /* "t592690916721053..." */ /* sqlite3expert.c:1221:21 */ +var zDrop uintptr = ts + 566 /* "DROP TABLE t5926..." */ /* sqlite3expert.c:1222:21 */ func idxProcessTriggers(tls *crt.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1298:12: */ var rc int32 = 0 @@ -7024,7 +7030,7 @@ func idxCreateVtabSchema(tls *crt.TLS, p uintptr, pzErrmsg uintptr) int32 { /* s // 2) Create the equivalent virtual table in dbv. *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = idxPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdb, bp+40 /* &pSchema */, pzErrmsg, - ts+955 /* "SELECT type, nam..." */) + ts+615 /* "SELECT type, nam..." */) for (*(*int32)(unsafe.Pointer(bp + 56 /* rc */)) == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pSchema */)))) { var zType uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pSchema */)), 0) var zName uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pSchema */)), 1) @@ -7044,21 +7050,21 @@ func idxCreateVtabSchema(tls *crt.TLS, p uintptr, pzErrmsg uintptr) int32 { /* s (*sqlite3expert)(unsafe.Pointer(p)).FpTable = *(*uintptr)(unsafe.Pointer(bp + 48 /* pTab */)) // The statement the vtab will pass to sqlite3_declare_vtab() - zInner = idxAppendText(tls, bp+56 /* &rc */, uintptr(0), ts+1223 /* "CREATE TABLE x(" */, 0) + zInner = idxAppendText(tls, bp+56 /* &rc */, uintptr(0), ts+883 /* "CREATE TABLE x(" */, 0) for i = 0; i < (*IdxTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* pTab */)))).FnCol; i++ { - zInner = idxAppendText(tls, bp+56 /* &rc */, zInner, ts+1239, /* "%s%Q COLLATE %s" */ + zInner = idxAppendText(tls, bp+56 /* &rc */, zInner, ts+899, /* "%s%Q COLLATE %s" */ crt.VaList(bp, func() uintptr { if i == 0 { - return ts + 792 /* "" */ + return ts + 488 /* "" */ } - return ts + 359 /* ", " */ + return ts + 89 /* ", " */ }(), (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* pTab */)))).FaCol+uintptr(i)*24)).FzName, (*IdxColumn)(unsafe.Pointer((*IdxTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* pTab */)))).FaCol+uintptr(i)*24)).FzColl)) } - zInner = idxAppendText(tls, bp+56 /* &rc */, zInner, ts+793 /* ")" */, 0) + zInner = idxAppendText(tls, bp+56 /* &rc */, zInner, ts+489 /* ")" */, 0) // The CVT statement to create the vtab zOuter = idxAppendText(tls, bp+56 /* &rc */, uintptr(0), - ts+1255 /* "CREATE VIRTUAL T..." */, crt.VaList(bp+24, zName, zInner)) + ts+915 /* "CREATE VIRTUAL T..." */, crt.VaList(bp+24, zName, zInner)) if *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) == 0 { *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, zOuter, uintptr(0), uintptr(0), pzErrmsg) } @@ -7086,9 +7092,7 @@ func idxSampleFunc(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sq var bRet int32 _ = argv - if !(argc == 0) { - crt.X__assert_fail(tls, ts+1296 /* "argc==0" */, ts+8 /* "testdata/sqlite-..." */, uint32(1392), uintptr(unsafe.Pointer(&__func__9))) - } + if (*IdxSampleCtx)(unsafe.Pointer(p)).FnRow == 0.0 { bRet = 1 } else { @@ -7106,8 +7110,6 @@ func idxSampleFunc(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sq *(*float64)(unsafe.Pointer(p + 24 /* &.nRet */)) += (float64(bRet)) } -var __func__9 = *(*[14]int8)(unsafe.Pointer(ts + 1304 /* "idxSampleFunc" */)) /* sqlite3expert.c:1387:2 */ - type IdxRemCtx = struct { FnSlot int32 FaSlot [1]struct { @@ -7134,14 +7136,9 @@ func idxRemFunc(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlit var p uintptr = sqlite3.Xsqlite3_user_data(tls, pCtx) var pSlot uintptr var iSlot int32 - if !(argc == 2) { - crt.X__assert_fail(tls, ts+1318 /* "argc==2" */, ts+8 /* "testdata/sqlite-..." */, uint32(1432), uintptr(unsafe.Pointer(&__func__10))) - } iSlot = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - if !(iSlot <= (*IdxRemCtx)(unsafe.Pointer(p)).FnSlot) { - crt.X__assert_fail(tls, ts+1326 /* "iSlot<=p->nSlot" */, ts+8 /* "testdata/sqlite-..." */, uint32(1435), uintptr(unsafe.Pointer(&__func__10))) - } + pSlot = ((p + 8 /* &.aSlot */) + uintptr(iSlot)*40) switch (*IdxRemSlot)(unsafe.Pointer(pSlot)).FeType { @@ -7205,14 +7202,12 @@ func idxRemFunc(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlit } } -var __func__10 = *(*[11]int8)(unsafe.Pointer(ts + 1342 /* "idxRemFunc" */)) /* sqlite3expert.c:1428:2 */ - func idxLargestIndex(tls *crt.TLS, db uintptr, pnMax uintptr, pzErr uintptr) int32 { /* sqlite3expert.c:1497:12: */ bp := tls.Alloc(12) defer tls.Free(12) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = 0 - var zMax uintptr = ts + 1353 /* "SELECT max(i.seq..." */ + var zMax uintptr = ts + 956 /* "SELECT max(i.seq..." */ *(*uintptr)(unsafe.Pointer(bp /* pMax */)) = uintptr(0) *(*int32)(unsafe.Pointer(pnMax)) = 0 @@ -7238,33 +7233,29 @@ func idxPopulateOneStat1(tls *crt.TLS, p uintptr, pIndexXInfo uintptr, pWriteSta var aStat uintptr = uintptr(0) *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = 0 - if !((*sqlite3expert)(unsafe.Pointer(p)).FiSample > 0) { - crt.X__assert_fail(tls, ts+1490 /* "p->iSample>0" */, ts+8 /* "testdata/sqlite-..." */, uint32(1534), uintptr(unsafe.Pointer(&__func__11))) - } - // Formulate the query text sqlite3.Xsqlite3_bind_text(tls, pIndexXInfo, 1, zIdx, -1, uintptr(0)) for (0 == *(*int32)(unsafe.Pointer(bp + 112 /* rc */))) && (100 == sqlite3.Xsqlite3_step(tls, pIndexXInfo)) { var zComma uintptr if zCols == uintptr(0) { - zComma = ts + 792 /* "" */ + zComma = ts + 488 /* "" */ } else { - zComma = ts + 359 /* ", " */ + zComma = ts + 89 /* ", " */ } var zName uintptr = sqlite3.Xsqlite3_column_text(tls, pIndexXInfo, 0) var zColl uintptr = sqlite3.Xsqlite3_column_text(tls, pIndexXInfo, 1) zCols = idxAppendText(tls, bp+112 /* &rc */, zCols, - ts+1503 /* "%sx.%Q IS rem(%d..." */, crt.VaList(bp, zComma, zName, nCol, zName, zColl)) - zOrder = idxAppendText(tls, bp+112 /* &rc */, zOrder, ts+1538 /* "%s%d" */, crt.VaList(bp+40, zComma, crt.PreIncInt32(&nCol, 1))) + ts+1093 /* "%sx.%Q IS rem(%d..." */, crt.VaList(bp, zComma, zName, nCol, zName, zColl)) + zOrder = idxAppendText(tls, bp+112 /* &rc */, zOrder, ts+1128 /* "%s%d" */, crt.VaList(bp+40, zComma, crt.PreIncInt32(&nCol, 1))) } sqlite3.Xsqlite3_reset(tls, pIndexXInfo) if *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) == 0 { if (*sqlite3expert)(unsafe.Pointer(p)).FiSample == 100 { zQuery = sqlite3.Xsqlite3_mprintf(tls, - ts+1543 /* "SELECT %s FROM %..." */, crt.VaList(bp+56, zCols, zTab, zOrder)) + ts+1133 /* "SELECT %s FROM %..." */, crt.VaList(bp+56, zCols, zTab, zOrder)) } else { zQuery = sqlite3.Xsqlite3_mprintf(tls, - ts+1575 /* "SELECT %s FROM t..." */, crt.VaList(bp+80, zCols, zOrder)) + ts+1165 /* "SELECT %s FROM t..." */, crt.VaList(bp+80, zCols, zOrder)) } } sqlite3.Xsqlite3_free(tls, zCols) @@ -7305,12 +7296,12 @@ func idxPopulateOneStat1(tls *crt.TLS, p uintptr, pIndexXInfo uintptr, pWriteSta if *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) == 0 { var s0 int32 = *(*int32)(unsafe.Pointer(aStat + uintptr(0)*4)) - zStat = sqlite3.Xsqlite3_mprintf(tls, ts+1647 /* "%d" */, crt.VaList(bp+96, s0)) + zStat = sqlite3.Xsqlite3_mprintf(tls, ts+1237 /* "%d" */, crt.VaList(bp+96, s0)) if zStat == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) = 7 } for i = 1; (*(*int32)(unsafe.Pointer(bp + 112 /* rc */)) == 0) && (i <= nCol); i++ { - zStat = idxAppendText(tls, bp+112 /* &rc */, zStat, ts+1650 /* " %d" */, crt.VaList(bp+104, ((s0+(*(*int32)(unsafe.Pointer(aStat + uintptr(i)*4))/2)) / *(*int32)(unsafe.Pointer(aStat + uintptr(i)*4))))) + zStat = idxAppendText(tls, bp+112 /* &rc */, zStat, ts+1240 /* " %d" */, crt.VaList(bp+104, ((s0+(*(*int32)(unsafe.Pointer(aStat + uintptr(i)*4))/2)) / *(*int32)(unsafe.Pointer(aStat + uintptr(i)*4))))) } } @@ -7324,9 +7315,7 @@ func idxPopulateOneStat1(tls *crt.TLS, p uintptr, pIndexXInfo uintptr, pWriteSta pEntry = idxHashFind(tls, (p + 88 /* &.hIdx */), zIdx, int32(crt.Xstrlen(tls, zIdx))) if pEntry != 0 { - if !((*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal2 == uintptr(0)) { - crt.X__assert_fail(tls, ts+1654 /* "pEntry->zVal2==0" */, ts+8 /* "testdata/sqlite-..." */, uint32(1605), uintptr(unsafe.Pointer(&__func__11))) - } + (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal2 = zStat } else { sqlite3.Xsqlite3_free(tls, zStat) @@ -7338,8 +7327,6 @@ func idxPopulateOneStat1(tls *crt.TLS, p uintptr, pIndexXInfo uintptr, pWriteSta return *(*int32)(unsafe.Pointer(bp + 112 /* rc */)) } -var __func__11 = *(*[20]int8)(unsafe.Pointer(ts + 1671 /* "idxPopulateOneSt..." */)) /* sqlite3expert.c:1524:2 */ - func idxBuildSampleTable(tls *crt.TLS, p uintptr, zTab uintptr) int32 { /* sqlite3expert.c:1617:12: */ bp := tls.Alloc(8) defer tls.Free(8) @@ -7347,13 +7334,13 @@ func idxBuildSampleTable(tls *crt.TLS, p uintptr, zTab uintptr) int32 { /* sqlit var rc int32 var zSql uintptr - rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, ts+1691 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) + rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, ts+1244 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) if rc != 0 { return rc } zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+1755 /* "CREATE TABLE tem..." */, crt.VaList(bp, zTab)) + ts+1308 /* "CREATE TABLE tem..." */, crt.VaList(bp, zTab)) if zSql == uintptr(0) { return 7 } @@ -7383,9 +7370,9 @@ func idxPopulateStat1(tls *crt.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3 *(*uintptr)(unsafe.Pointer(bp + 48 /* pIndexXInfo */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 56 /* pWrite */)) = uintptr(0) - var zAllIndex uintptr = ts + 1831 /* "SELECT s.rowid, ..." */ - var zIndexXInfo uintptr = ts + 1945 /* "SELECT name, col..." */ - var zWrite uintptr = ts + 2000 /* "INSERT INTO sqli..." */ + var zAllIndex uintptr = ts + 1384 /* "SELECT s.rowid, ..." */ + var zIndexXInfo uintptr = ts + 1498 /* "SELECT name, col..." */ + var zWrite uintptr = ts + 1553 /* "INSERT INTO sqli..." */ // If iSample==0, no sqlite_stat1 data is required. if (*sqlite3expert)(unsafe.Pointer(p)).FiSample == 0 { @@ -7397,7 +7384,7 @@ func idxPopulateStat1(tls *crt.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3 return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, ts+2041 /* "ANALYZE; PRAGMA ..." */, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, ts+1594 /* "ANALYZE; PRAGMA ..." */, uintptr(0), uintptr(0), uintptr(0)) if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == 0 { var nByte int32 = (int32(uint64(unsafe.Sizeof(IdxRemCtx{})) + (uint64(unsafe.Sizeof(IdxRemSlot{})) * uint64(*(*int32)(unsafe.Pointer(bp /* nMax */)))))) @@ -7412,13 +7399,13 @@ func idxPopulateStat1(tls *crt.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3 return (*sqlite3expert)(unsafe.Pointer(p)).Fdbv }() *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_create_function(tls, - dbrem, ts+2075 /* "rem" */, 2, 1, pCtx, *(*uintptr)(unsafe.Pointer(&struct { + dbrem, ts+1628 /* "rem" */, 2, 1, pCtx, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{idxRemFunc})), uintptr(0), uintptr(0)) } if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == 0 { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_create_function(tls, - (*sqlite3expert)(unsafe.Pointer(p)).Fdb, ts+2079 /* "sample" */, 0, 1, bp+8 /* &samplectx */, *(*uintptr)(unsafe.Pointer(&struct { + (*sqlite3expert)(unsafe.Pointer(p)).Fdb, ts+1632 /* "sample" */, 0, 1, bp+8 /* &samplectx */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{idxSampleFunc})), uintptr(0), uintptr(0)) } @@ -7453,7 +7440,7 @@ func idxPopulateStat1(tls *crt.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3 } if (*(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == 0) && ((*sqlite3expert)(unsafe.Pointer(p)).FiSample < 100) { *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbv, - ts+1691 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) + ts+1244 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) } idxFinalize(tls, bp+4 /* &rc */, *(*uintptr)(unsafe.Pointer(bp + 40 /* pAllIndex */))) @@ -7466,10 +7453,10 @@ func idxPopulateStat1(tls *crt.TLS, p uintptr, pzErr uintptr) int32 { /* sqlite3 sqlite3.Xsqlite3_free(tls, pCtx) if *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) == 0 { - *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, ts+2086 /* "ANALYZE sqlite_m..." */, uintptr(0), uintptr(0), uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdbm, ts+1639 /* "ANALYZE sqlite_m..." */, uintptr(0), uintptr(0), uintptr(0)) } - sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdb, ts+1691 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) + sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(p)).Fdb, ts+1244 /* "DROP TABLE IF EX..." */, uintptr(0), uintptr(0), uintptr(0)) return *(*int32)(unsafe.Pointer(bp + 4 /* rc */)) } @@ -7491,10 +7478,10 @@ func sqlite3_expert_new(tls *crt.TLS, db uintptr, pzErrmsg uintptr) uintptr { /* if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == 0 { (*sqlite3expert)(unsafe.Pointer(pNew)).Fdb = db (*sqlite3expert)(unsafe.Pointer(pNew)).FiSample = 100 - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3.Xsqlite3_open(tls, ts+2108 /* ":memory:" */, (pNew + 24 /* &.dbv */)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3.Xsqlite3_open(tls, ts+1661 /* ":memory:" */, (pNew + 24 /* &.dbv */)) } if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == 0 { - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3.Xsqlite3_open(tls, ts+2108 /* ":memory:" */, (pNew + 16 /* &.dbm */)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3.Xsqlite3_open(tls, ts+1661 /* ":memory:" */, (pNew + 16 /* &.dbm */)) if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == 0 { sqlite3.Xsqlite3_db_config(tls, (*sqlite3expert)(unsafe.Pointer(pNew)).Fdbm, 1008, crt.VaList(bp, 1, uintptr(0))) } @@ -7506,7 +7493,7 @@ func sqlite3_expert_new(tls *crt.TLS, db uintptr, pzErrmsg uintptr) uintptr { /* *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = idxPrintfPrepareStmt(tls, (*sqlite3expert)(unsafe.Pointer(pNew)).Fdb, bp+24 /* &pSql */, pzErrmsg, - ts+2117 /* "SELECT sql FROM ..." */, 0) + ts+1670 /* "SELECT sql FROM ..." */, 0) for (*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pSql */)))) { var zSql uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pSql */)), 0) *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3.Xsqlite3_exec(tls, (*sqlite3expert)(unsafe.Pointer(pNew)).Fdbm, zSql, uintptr(0), uintptr(0), pzErrmsg) @@ -7636,12 +7623,12 @@ func sqlite3_expert_analyze(tls *crt.TLS, p uintptr, pzErr uintptr) int32 { /* s // Formulate the EXPERT_REPORT_CANDIDATES text for pEntry = (*sqlite3expert)(unsafe.Pointer(p)).FhIdx.FpFirst; pEntry != 0; pEntry = (*IdxHashEntry)(unsafe.Pointer(pEntry)).FpNext { (*sqlite3expert)(unsafe.Pointer(p)).FzCandidates = idxAppendText(tls, bp+24 /* &rc */, (*sqlite3expert)(unsafe.Pointer(p)).FzCandidates, - ts+2216 /* "%s;%s%s\n" */, crt.VaList(bp, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal, + ts+1769 /* "%s;%s%s\n" */, crt.VaList(bp, (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal, func() uintptr { if (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal2 != 0 { - return ts + 2225 /* " -- stat1: " */ + return ts + 1778 /* " -- stat1: " */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), (*IdxHashEntry)(unsafe.Pointer(pEntry)).FzVal2)) } @@ -10043,7 +10030,7 @@ func dbHandleFromObj(tls *crt.TLS, interp uintptr, pObj uintptr, pDb uintptr) in // var info Tcl_CmdInfo at bp+24, 64 if 0 == tcl.XTcl_GetCommandInfo(tls, interp, tcl.XTcl_GetString(tls, pObj), bp+24 /* &info */) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+2237 /* "no such handle: " */, tcl.XTcl_GetString(tls, pObj), 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+1790 /* "no such handle: " */, tcl.XTcl_GetString(tls, pObj), 0)) return 1 } @@ -10062,11 +10049,11 @@ func testExpertCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var pExpert uintptr = clientData *(*[6]Subcmd)(unsafe.Pointer(bp /* aSub */)) = [6]Subcmd{ - {FzSub: ts + 2254 /* "sql" */, FnArg: 1, FzMsg: ts + 2258 /* "TABLE" */}, // 0 - {FzSub: ts + 2264 /* "analyze" */, FnArg: 0, FzMsg: ts + 792 /* "" */}, // 1 - {FzSub: ts + 2272 /* "count" */, FnArg: 0, FzMsg: ts + 792 /* "" */}, // 2 - {FzSub: ts + 2278 /* "report" */, FnArg: 2, FzMsg: ts + 2285 /* "STMT EREPORT" */}, // 3 - {FzSub: ts + 2298 /* "destroy" */, FnArg: 0, FzMsg: ts + 792 /* "" */}, // 4 + {FzSub: ts + 1807 /* "sql" */, FnArg: 1, FzMsg: ts + 1811 /* "TABLE" */}, // 0 + {FzSub: ts + 1817 /* "analyze" */, FnArg: 0, FzMsg: ts + 488 /* "" */}, // 1 + {FzSub: ts + 1825 /* "count" */, FnArg: 0, FzMsg: ts + 488 /* "" */}, // 2 + {FzSub: ts + 1831 /* "report" */, FnArg: 2, FzMsg: ts + 1838 /* "STMT EREPORT" */}, // 3 + {FzSub: ts + 1851 /* "destroy" */, FnArg: 0, FzMsg: ts + 488 /* "" */}, // 4 {FzSub: uintptr(0)}, } // var iSub int32 at bp+144, 4 @@ -10075,11 +10062,11 @@ func testExpertCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) = uintptr(0) if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2306 /* "SUBCOMMAND ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1859 /* "SUBCOMMAND ..." */) return 1 } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, - *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &aSub[0] */, int32(unsafe.Sizeof(Subcmd{})), ts+2321 /* "sub-command" */, 0, bp+144 /* &iSub */) + *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &aSub[0] */, int32(unsafe.Sizeof(Subcmd{})), ts+1874 /* "sub-command" */, 0, bp+144 /* &iSub */) if rc != 0 { return rc } @@ -10112,7 +10099,7 @@ func testExpertCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, case 3: { // report *(*[5]uintptr)(unsafe.Pointer(bp + 168 /* aEnum */)) = [5]uintptr{ - ts + 2254 /* "sql" */, ts + 2333 /* "indexes" */, ts + 2341 /* "plan" */, ts + 2346 /* "candidates" */, uintptr(0), + ts + 1807 /* "sql" */, ts + 1886 /* "indexes" */, ts + 1894 /* "plan" */, ts + 1899 /* "candidates" */, uintptr(0), } // var iEnum int32 at bp+208, 4 @@ -10121,31 +10108,17 @@ func testExpertCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var zReport uintptr if (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+160 /* &iStmt */) != 0) || - (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+168 /* &aEnum[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+2278 /* "report" */, 0, bp+208 /* &iEnum */) != 0) { + (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+168 /* &aEnum[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+1831 /* "report" */, 0, bp+208 /* &iEnum */) != 0) { return 1 } - if !(1 == 1) { - crt.X__assert_fail(tls, ts+2357 /* "1==1" */, ts+2362 /* "testdata/sqlite-..." */, uint32(123), uintptr(unsafe.Pointer(&__func__12))) - } - if !(2 == 2) { - crt.X__assert_fail(tls, ts+2415 /* "2==2" */, ts+2362 /* "testdata/sqlite-..." */, uint32(124), uintptr(unsafe.Pointer(&__func__12))) - } - if !(3 == 3) { - crt.X__assert_fail(tls, ts+2420 /* "3==3" */, ts+2362 /* "testdata/sqlite-..." */, uint32(125), uintptr(unsafe.Pointer(&__func__12))) - } - if !(4 == 4) { - crt.X__assert_fail(tls, ts+2425 /* "4==4" */, ts+2362 /* "testdata/sqlite-..." */, uint32(126), uintptr(unsafe.Pointer(&__func__12))) - } zReport = sqlite3_expert_report(tls, pExpert, *(*int32)(unsafe.Pointer(bp + 160 /* iStmt */)), (1 + *(*int32)(unsafe.Pointer(bp + 208 /* iEnum */)))) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, zReport, -1)) break } default: // destroy - if !(*(*int32)(unsafe.Pointer(bp + 144 /* iSub */)) == 4) { - crt.X__assert_fail(tls, ts+2430 /* "iSub==4" */, ts+2362 /* "testdata/sqlite-..." */, uint32(133), uintptr(unsafe.Pointer(&__func__12))) - } + tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)))) break } @@ -10167,8 +10140,6 @@ type Subcmd = struct { FzMsg uintptr } -var __func__12 = *(*[14]int8)(unsafe.Pointer(ts + 2438 /* "testExpertCmd" */)) /* test_expert.c:60:2 */ - func testExpertDel(tls *crt.TLS, clientData uintptr) { /* test_expert.c:150:27: */ var pExpert uintptr = clientData sqlite3_expert_destroy(tls, pExpert) @@ -10187,16 +10158,16 @@ func test_sqlite3_expert_new(tls *crt.TLS, clientData uintptr, interp uintptr, o var rc int32 = 0 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if dbHandleFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+40 /* &db */) != 0 { return 1 } - zCmd = sqlite3.Xsqlite3_mprintf(tls, ts+2455 /* "sqlite3expert%d" */, crt.VaList(bp, crt.PreIncInt32(&iCmd, 1))) + zCmd = sqlite3.Xsqlite3_mprintf(tls, ts+1913 /* "sqlite3expert%d" */, crt.VaList(bp, crt.PreIncInt32(&iCmd, 1))) if zCmd == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+8, ts+2471 /* "out of memory" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+8, ts+1929 /* "out of memory" */, uintptr(0))) return 1 } @@ -10224,7 +10195,7 @@ func TestExpert_Init(tls *crt.TLS, interp uintptr) int32 { /* test_expert.c:202: defer tls.Free(16) *(*[1]Cmd)(unsafe.Pointer(bp /* aCmd */)) = [1]Cmd{ - {FzCmd: ts + 2485 /* "sqlite3_expert_n..." */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { + {FzCmd: ts + 1943 /* "sqlite3_expert_n..." */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_sqlite3_expert_new}))}, } @@ -11039,9 +11010,7 @@ func amatchAvlRemove(tls *crt.TLS, ppHead uintptr, pOld uintptr) { /* amatch.c:3 if (*amatch_avl)(unsafe.Pointer(pX)).FpAfter != 0 { (*amatch_avl)(unsafe.Pointer((*amatch_avl)(unsafe.Pointer(pX)).FpAfter)).FpUp = pX } else { - if !(pBalance == pOld) { - crt.X__assert_fail(tls, ts+2504 /* "pBalance==pOld" */, ts+2519 /* "testdata/sqlite-..." */, uint32(417), uintptr(unsafe.Pointer(&__func__13))) - } + pBalance = pX } (*amatch_avl)(unsafe.Pointer(pX)).FpBefore = crt.AssignUintptr(&pY, (*amatch_avl)(unsafe.Pointer(pOld)).FpBefore) @@ -11065,7 +11034,6 @@ func amatchAvlRemove(tls *crt.TLS, ppHead uintptr, pOld uintptr) { /* amatch.c:3 // assert( amatchAvlIntegrity2(*ppHead) ); } -var __func__13 = *(*[16]int8)(unsafe.Pointer(ts + 2565 /* "amatchAvlRemove" */)) /* amatch.c:399:67 */ // // End of the AVL Tree implementation // @@ -11134,10 +11102,10 @@ func amatchLoadOneRule(tls *crt.TLS, p uintptr, pStmt uintptr, ppRule uintptr, p var pRule uintptr = uintptr(0) // New rule object to return if zFrom == uintptr(0) { - zFrom = ts + 792 /* "" */ + zFrom = ts + 488 /* "" */ } if zTo == uintptr(0) { - zTo = ts + 792 /* "" */ + zTo = ts + 488 /* "" */ } nFrom = int32(crt.Xstrlen(tls, zFrom)) nTo = int32(crt.Xstrlen(tls, zTo)) @@ -11154,22 +11122,22 @@ func amatchLoadOneRule(tls *crt.TLS, p uintptr, pStmt uintptr, ppRule uintptr, p } if (rCost <= 0) || (rCost > 1000) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2581, /* "%s: cost must be..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+1962, /* "%s: cost must be..." */ crt.VaList(bp, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, 1000)) rc = 1 } else if (nFrom > 50) || (nTo > 50) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2615, /* "%s: maximum stri..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+1996, /* "%s: maximum stri..." */ crt.VaList(bp+16, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, 50)) rc = 1 } else if (iLang < int64(0)) || (iLang > int64(2147483647)) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2647, /* "%s: iLang must b..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2028, /* "%s: iLang must b..." */ crt.VaList(bp+32, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, 2147483647)) rc = 1 - } else if (crt.Xstrcmp(tls, zFrom, ts+792 /* "" */) == 0) && (crt.Xstrcmp(tls, zTo, ts+2682 /* "?" */) == 0) { + } else if (crt.Xstrcmp(tls, zFrom, ts+488 /* "" */) == 0) && (crt.Xstrcmp(tls, zTo, ts+2063 /* "?" */) == 0) { if ((*amatch_vtab)(unsafe.Pointer(p)).FrIns == 0) || ((*amatch_vtab)(unsafe.Pointer(p)).FrIns > rCost) { (*amatch_vtab)(unsafe.Pointer(p)).FrIns = rCost } - } else if (crt.Xstrcmp(tls, zFrom, ts+2682 /* "?" */) == 0) && (crt.Xstrcmp(tls, zTo, ts+792 /* "" */) == 0) { + } else if (crt.Xstrcmp(tls, zFrom, ts+2063 /* "?" */) == 0) && (crt.Xstrcmp(tls, zTo, ts+488 /* "" */) == 0) { if ((*amatch_vtab)(unsafe.Pointer(p)).FrDel == 0) || ((*amatch_vtab)(unsafe.Pointer(p)).FrDel > rCost) { (*amatch_vtab)(unsafe.Pointer(p)).FrDel = rCost } @@ -11212,7 +11180,7 @@ func amatchLoadRules(tls *crt.TLS, db uintptr, p uintptr, pzErr uintptr) int32 { var zSql uintptr // SELECT used to read from rules table var pHead uintptr = uintptr(0) - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+2684 /* "SELECT * FROM %Q..." */, crt.VaList(bp, (*amatch_vtab)(unsafe.Pointer(p)).FzDb, (*amatch_vtab)(unsafe.Pointer(p)).FzCostTab)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+2065 /* "SELECT * FROM %Q..." */, crt.VaList(bp, (*amatch_vtab)(unsafe.Pointer(p)).FzDb, (*amatch_vtab)(unsafe.Pointer(p)).FzCostTab)) if zSql == uintptr(0) { rc = 7 } else { @@ -11220,9 +11188,9 @@ func amatchLoadRules(tls *crt.TLS, db uintptr, p uintptr, pzErr uintptr) int32 { *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+56 /* &pStmt */, uintptr(0)) if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2704 /* "%s: %s" */, crt.VaList(bp+16, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, sqlite3.Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2085 /* "%s: %s" */, crt.VaList(bp+16, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, sqlite3.Xsqlite3_errmsg(tls, db))) } else if sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */))) != 4 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2711, /* "%s: %s has %d co..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2092, /* "%s: %s has %d co..." */ crt.VaList(bp+32, (*amatch_vtab)(unsafe.Pointer(p)).FzClassName, (*amatch_vtab)(unsafe.Pointer(p)).FzCostTab, sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */))))) rc = 1 } else { @@ -11271,17 +11239,13 @@ func amatchLoadRules(tls *crt.TLS, db uintptr, p uintptr, pzErr uintptr) int32 { } else { // An error has occurred. Setting p->pRule to point to the head of the // allocated list ensures that the list will be cleaned up in this case. - if !((*amatch_vtab)(unsafe.Pointer(p)).FpRule == uintptr(0)) { - crt.X__assert_fail(tls, ts+2745 /* "p->pRule==0" */, ts+2519 /* "testdata/sqlite-..." */, uint32(720), uintptr(unsafe.Pointer(&__func__14))) - } + (*amatch_vtab)(unsafe.Pointer(p)).FpRule = pHead } return rc } -var __func__14 = *(*[16]int8)(unsafe.Pointer(ts + 2757 /* "amatchLoadRules" */)) /* amatch.c:660:2 */ - // This function converts an SQL quoted string into an unquoted string // and returns a pointer to a buffer allocated using sqlite3_malloc() // containing the result. The caller should eventually free this buffer @@ -11318,15 +11282,10 @@ func amatchDequote(tls *crt.TLS, zIn uintptr) uintptr { /* amatch.c:740:13: */ *(*int8)(unsafe.Pointer(zOut + uintptr(crt.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) } } - if !(sqlite3_int64(int32(crt.Xstrlen(tls, zOut))) <= nIn) { - crt.X__assert_fail(tls, ts+2773 /* "(int)strlen(zOut..." */, ts+2519 /* "testdata/sqlite-..." */, uint32(761), uintptr(unsafe.Pointer(&__func__15))) - } } return zOut } -var __func__15 = *(*[14]int8)(unsafe.Pointer(ts + 2796 /* "amatchDequote" */)) /* amatch.c:740:44 */ - // Deallocate the pVCheck prepared statement. func amatchVCheckClear(tls *crt.TLS, p uintptr) { /* amatch.c:769:13: */ if (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck != 0 { @@ -11355,15 +11314,11 @@ func amatchFree(tls *crt.TLS, p uintptr) { /* amatch.c:779:13: */ // xDisconnect/xDestroy method for the amatch module. func amatchDisconnect(tls *crt.TLS, pVtab uintptr) int32 { /* amatch.c:798:12: */ var p uintptr = pVtab - if !((*amatch_vtab)(unsafe.Pointer(p)).FnCursor == 0) { - crt.X__assert_fail(tls, ts+2810 /* "p->nCursor==0" */, ts+2519 /* "testdata/sqlite-..." */, uint32(800), uintptr(unsafe.Pointer(&__func__16))) - } + amatchFree(tls, p) return 0 } -var __func__16 = *(*[17]int8)(unsafe.Pointer(ts + 2824 /* "amatchDisconnect" */)) /* amatch.c:798:49 */ - // Check to see if the argument is of the form: // // KEY = VALUE @@ -11425,21 +11380,21 @@ __1: rc = 7 crt.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(amatch_vtab{}))) (*amatch_vtab)(unsafe.Pointer(pNew)).Fdb = db - (*amatch_vtab)(unsafe.Pointer(pNew)).FzClassName = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zModule)) + (*amatch_vtab)(unsafe.Pointer(pNew)).FzClassName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zModule)) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzClassName == uintptr(0)) { goto __2 } goto amatchConnectError __2: ; - (*amatch_vtab)(unsafe.Pointer(pNew)).FzDb = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, zDb)) + (*amatch_vtab)(unsafe.Pointer(pNew)).FzDb = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, zDb)) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzDb == uintptr(0)) { goto __3 } goto amatchConnectError __3: ; - (*amatch_vtab)(unsafe.Pointer(pNew)).FzSelf = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) + (*amatch_vtab)(unsafe.Pointer(pNew)).FzSelf = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzSelf == uintptr(0)) { goto __4 } @@ -11451,7 +11406,7 @@ __5: if !(i < argc) { goto __7 } - zVal = amatchValueOfKey(tls, ts+2841 /* "vocabulary_table" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + zVal = amatchValueOfKey(tls, ts+2126 /* "vocabulary_table" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __8 } @@ -11466,7 +11421,7 @@ __9: goto __6 __8: ; - zVal = amatchValueOfKey(tls, ts+2858 /* "vocabulary_word" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + zVal = amatchValueOfKey(tls, ts+2143 /* "vocabulary_word" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __10 } @@ -11481,7 +11436,7 @@ __11: goto __6 __10: ; - zVal = amatchValueOfKey(tls, ts+2874 /* "vocabulary_langu..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + zVal = amatchValueOfKey(tls, ts+2159 /* "vocabulary_langu..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __12 } @@ -11496,7 +11451,7 @@ __13: goto __6 __12: ; - zVal = amatchValueOfKey(tls, ts+2894 /* "edit_distances" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + zVal = amatchValueOfKey(tls, ts+2179 /* "edit_distances" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __14 } @@ -11511,7 +11466,7 @@ __15: goto __6 __14: ; - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2909 /* "unrecognized arg..." */, crt.VaList(bp+24, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2194 /* "unrecognized arg..." */, crt.VaList(bp+24, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) amatchFree(tls, pNew) *(*uintptr)(unsafe.Pointer(ppVtab)) = uintptr(0) return 1 @@ -11526,7 +11481,7 @@ __7: if !((*amatch_vtab)(unsafe.Pointer(pNew)).FzCostTab == uintptr(0)) { goto __16 } - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2938 /* "no edit_distance..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2223 /* "no edit_distance..." */, 0) rc = 1 goto __17 __16: @@ -11539,7 +11494,7 @@ __17: sqlite3.Xsqlite3_vtab_config(tls, db, 2, 0) rc = sqlite3.Xsqlite3_declare_vtab(tls, db, - ts+2972 /* "CREATE TABLE x(w..." */) + ts+2257 /* "CREATE TABLE x(w..." */) __18: ; if !(rc != 0) { @@ -11611,7 +11566,7 @@ func amatchEncodeInt(tls *crt.TLS, x int32, z uintptr) { /* amatch.c:978:13: */ *(*int8)(unsafe.Pointer(z + uintptr(3))) = a[(x & 0x3f)] } -var a = *(*[65]int8)(unsafe.Pointer(ts + 3039 /* "0123456789ABCDEF..." */)) /* amatch.c:979:21 */ +var a = *(*[65]int8)(unsafe.Pointer(ts + 2324 /* "0123456789ABCDEF..." */)) /* amatch.c:979:21 */ // Write the zCost[] field for a amatch_word object func amatchWriteCost(tls *crt.TLS, pWord uintptr) { /* amatch.c:996:13: */ @@ -11677,9 +11632,6 @@ func amatchAddWord(tls *crt.TLS, pCur uintptr, rCost amatch_cost, nMatch int32, (*amatch_word)(unsafe.Pointer(pWord)).FrCost = rCost amatchWriteCost(tls, pWord) pOther = amatchAvlInsert(tls, (pCur + 80 /* &.pCost */), (pWord + 8 /* &.sCost */)) - if !(pOther == uintptr(0)) { - crt.X__assert_fail(tls, ts+3104 /* "pOther==0" */, ts+2519 /* "testdata/sqlite-..." */, uint32(1069), uintptr(unsafe.Pointer(&__func__17))) - } _ = pOther } return @@ -11698,22 +11650,14 @@ func amatchAddWord(tls *crt.TLS, pCur uintptr, rCost amatch_cost, nMatch int32, (*amatch_word)(unsafe.Pointer(pWord)).FsCost.FzKey = pWord + 112 /* &.zCost */ (*amatch_word)(unsafe.Pointer(pWord)).FsCost.FpWord = pWord pOther = amatchAvlInsert(tls, (pCur + 80 /* &.pCost */), (pWord + 8 /* &.sCost */)) - if !(pOther == uintptr(0)) { - crt.X__assert_fail(tls, ts+3104 /* "pOther==0" */, ts+2519 /* "testdata/sqlite-..." */, uint32(1085), uintptr(unsafe.Pointer(&__func__17))) - } _ = pOther (*amatch_word)(unsafe.Pointer(pWord)).FsWord.FzKey = pWord + 124 /* &.zWord */ (*amatch_word)(unsafe.Pointer(pWord)).FsWord.FpWord = pWord amatchStrcpy(tls, pWord+124 /* &.zWord */, (*amatch_cursor)(unsafe.Pointer(pCur)).FzBuf) pOther = amatchAvlInsert(tls, (pCur + 88 /* &.pWord */), (pWord + 56 /* &.sWord */)) - if !(pOther == uintptr(0)) { - crt.X__assert_fail(tls, ts+3104 /* "pOther==0" */, ts+2519 /* "testdata/sqlite-..." */, uint32(1090), uintptr(unsafe.Pointer(&__func__17))) - } _ = pOther } -var __func__17 = *(*[14]int8)(unsafe.Pointer(ts + 3114 /* "amatchAddWord" */)) /* amatch.c:1028:2 */ - // Advance a cursor to its next row of output func amatchNext(tls *crt.TLS, cur uintptr) int32 { /* amatch.c:1102:12: */ bp := tls.Alloc(80) @@ -11741,15 +11685,15 @@ func amatchNext(tls *crt.TLS, cur uintptr) int32 { /* amatch.c:1102:12: */ var zSql uintptr if ((*amatch_vtab)(unsafe.Pointer(p)).FzVocabLang != 0) && (*(*int8)(unsafe.Pointer((*amatch_vtab)(unsafe.Pointer(p)).FzVocabLang + uintptr(0))) != 0) { zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+3128, /* "SELECT \"%w\" FROM..." */ + ts+2389, /* "SELECT \"%w\" FROM..." */ - crt.VaList(bp, ts+3150, /* " WHERE \"%w\">=?1 ..." */ + crt.VaList(bp, ts+2411, /* " WHERE \"%w\">=?1 ..." */ (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabTab, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabLang)) } else { zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+3189, /* "SELECT \"%w\" FROM..." */ + ts+2450, /* "SELECT \"%w\" FROM..." */ crt.VaList(bp+40, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabTab, (*amatch_vtab)(unsafe.Pointer(p)).FzVocabWord)) } @@ -11799,7 +11743,7 @@ func amatchNext(tls *crt.TLS, cur uintptr) int32 { /* amatch.c:1102:12: */ if rc == 100 { zW = sqlite3.Xsqlite3_column_text(tls, (*amatch_vtab)(unsafe.Pointer(p)).FpVCheck, 0) if crt.Xstrncmp(tls, zBuf, zW, (uint64(nWord+nNextIn))) == 0 { - amatchAddWord(tls, pCur, (*amatch_word)(unsafe.Pointer(pWord)).FrCost, (int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + nNextIn), zBuf, ts+792 /* "" */) + amatchAddWord(tls, pCur, (*amatch_word)(unsafe.Pointer(pWord)).FrCost, (int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + nNextIn), zBuf, ts+488 /* "" */) } } *(*int8)(unsafe.Pointer(zBuf + uintptr(nWord))) = int8(0) @@ -11849,7 +11793,7 @@ func amatchNext(tls *crt.TLS, cur uintptr) int32 { /* amatch.c:1102:12: */ if (*amatch_vtab)(unsafe.Pointer(p)).FrDel > 0 { *(*int8)(unsafe.Pointer(zBuf + uintptr(nWord))) = int8(0) amatchAddWord(tls, pCur, ((*amatch_word)(unsafe.Pointer(pWord)).FrCost + (*amatch_vtab)(unsafe.Pointer(p)).FrDel), (int32((*amatch_word)(unsafe.Pointer(pWord)).FnMatch) + nNextIn), - zBuf, ts+792 /* "" */) + zBuf, ts+488 /* "" */) } for pRule = (*amatch_vtab)(unsafe.Pointer(p)).FpRule; pRule != 0; pRule = (*amatch_rule)(unsafe.Pointer(pRule)).FpNext { @@ -11875,7 +11819,7 @@ func amatchFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt defer tls.Free(8) var pCur uintptr = pVtabCursor - var zWord uintptr = ts + 3237 /* "*" */ + var zWord uintptr = ts + 2498 /* "*" */ var idx int32 amatchClearCursor(tls, pCur) @@ -11892,11 +11836,11 @@ func amatchFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt (*amatch_cursor)(unsafe.Pointer(pCur)).FiLang = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(idx)*8))) idx++ } - (*amatch_cursor)(unsafe.Pointer(pCur)).FzInput = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zWord)) + (*amatch_cursor)(unsafe.Pointer(pCur)).FzInput = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zWord)) if (*amatch_cursor)(unsafe.Pointer(pCur)).FzInput == uintptr(0) { return 7 } - amatchAddWord(tls, pCur, 0, 0, ts+792 /* "" */, ts+792 /* "" */) + amatchAddWord(tls, pCur, 0, 0, ts+488 /* "" */, ts+488 /* "" */) amatchNext(tls, pVtabCursor) return 0 @@ -12053,12 +11997,12 @@ func amatchUpdate(tls *crt.TLS, pVTab uintptr, argc int32, argv uintptr, pRowid var zCmd uintptr _ = pRowid if argc == 1 { - (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+3239, /* "DELETE from %s i..." */ + (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+2500, /* "DELETE from %s i..." */ crt.VaList(bp, (*amatch_vtab)(unsafe.Pointer(p)).FzSelf)) return 1 } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) != 5 { - (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+3269, /* "UPDATE of %s is ..." */ + (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+2530, /* "UPDATE of %s is ..." */ crt.VaList(bp+8, (*amatch_vtab)(unsafe.Pointer(p)).FzSelf)) return 1 } @@ -12066,7 +12010,7 @@ func amatchUpdate(tls *crt.TLS, pVTab uintptr, argc int32, argv uintptr, pRowid (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr((2+1))*8))) != 5)) || (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr((2+2))*8))) != 5) { (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, - ts+3297 /* "INSERT INTO %s a..." */, crt.VaList(bp+16, (*amatch_vtab)(unsafe.Pointer(p)).FzSelf)) + ts+2558 /* "INSERT INTO %s a..." */, crt.VaList(bp+16, (*amatch_vtab)(unsafe.Pointer(p)).FzSelf)) return 1 } zCmd = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr((2+3))*8))) @@ -12110,14 +12054,14 @@ func sqlite3_amatch_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintpt _ = pApi _ = pzErrMsg // Not used - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3346 /* "approximate_matc..." */, uintptr(unsafe.Pointer(&amatchModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+2607 /* "approximate_matc..." */, uintptr(unsafe.Pointer(&amatchModule)), uintptr(0)) return rc } // Allowed datatypes // Names of types -var azType = [4]uintptr{ts + 3364 /* "int32" */, ts + 3370 /* "int64" */, ts + 3376 /* "double" */, ts + 3383 /* "char*" */} /* carray.c:73:19 */ +var azType = [4]uintptr{ts + 2625 /* "int32" */, ts + 2631 /* "int64" */, ts + 2637 /* "double" */, ts + 2644 /* "char*" */} /* carray.c:73:19 */ // carray_cursor is a subclass of sqlite3_vtab_cursor which will // serve as the underlying representation of a cursor that scans @@ -12154,7 +12098,7 @@ func carrayConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint // Column numbers rc = sqlite3.Xsqlite3_declare_vtab(tls, db, - ts+3389 /* "CREATE TABLE x(v..." */) + ts+2650 /* "CREATE TABLE x(v..." */) if rc == 0 { pNew = crt.AssignPtrUintptr(ppVtab, sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -12269,7 +12213,7 @@ func carrayFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt var pCur uintptr = pVtabCursor if idxNum != 0 { - (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr = sqlite3.Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), ts+3452 /* "carray" */) + (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr = sqlite3.Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), ts+2713 /* "carray" */) (*carray_cursor)(unsafe.Pointer(pCur)).FiCnt = func() int64 { if (*carray_cursor)(unsafe.Pointer(pCur)).FpPtr != 0 { return sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -12288,7 +12232,7 @@ func carrayFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt } if uint64(i) >= (uint64(unsafe.Sizeof(azType)) / uint64(unsafe.Sizeof(uintptr(0)))) { (*sqlite3_vtab)(unsafe.Pointer((*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, - ts+3459 /* "unknown datatype..." */, crt.VaList(bp, zType)) + ts+2720 /* "unknown datatype..." */, crt.VaList(bp, zType)) return 1 } else { (*carray_cursor)(unsafe.Pointer(pCur)).FeType = i @@ -12420,16 +12364,16 @@ func inttoptrFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* *(*int32)(unsafe.Pointer(bp + 16 /* i32 */)) = (int32(*(*sqlite3_int64)(unsafe.Pointer(bp + 8 /* i64 */)) & int64(0xffffffff))) crt.Xmemcpy(tls, bp /* &p */, bp+16 /* &i32 */, uint64(unsafe.Sizeof(uintptr(0)))) } - sqlite3.Xsqlite3_result_pointer(tls, context, *(*uintptr)(unsafe.Pointer(bp /* p */)), ts+3452 /* "carray" */, uintptr(0)) + sqlite3.Xsqlite3_result_pointer(tls, context, *(*uintptr)(unsafe.Pointer(bp /* p */)), ts+2713 /* "carray" */, uintptr(0)) } func sqlite3_carray_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* carray.c:389:5: */ var rc int32 = 0 _ = pApi - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3452 /* "carray" */, uintptr(unsafe.Pointer(&carrayModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+2713 /* "carray" */, uintptr(unsafe.Pointer(&carrayModule)), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3480 /* "inttoptr" */, 1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+2741 /* "inttoptr" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{inttoptrFunc})), uintptr(0), uintptr(0)) @@ -12733,15 +12677,10 @@ func closureDequote(tls *crt.TLS, zIn uintptr) uintptr { /* closure.c:424:13: */ *(*int8)(unsafe.Pointer(zOut + uintptr(crt.PostIncInt32(&iOut, 1)))) = *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) } } - if !(sqlite3_int64(int32(crt.Xstrlen(tls, zOut))) <= nIn) { - crt.X__assert_fail(tls, ts+2773 /* "(int)strlen(zOut..." */, ts+3489 /* "testdata/sqlite-..." */, uint32(445), uintptr(unsafe.Pointer(&__func__18))) - } } return zOut } -var __func__18 = *(*[15]int8)(unsafe.Pointer(ts + 3536 /* "closureDequote" */)) /* closure.c:424:45 */ - // Deallocate an closure_vtab object func closureFree(tls *crt.TLS, p uintptr) { /* closure.c:453:13: */ if p != 0 { @@ -12758,15 +12697,11 @@ func closureFree(tls *crt.TLS, p uintptr) { /* closure.c:453:13: */ // xDisconnect/xDestroy method for the closure module. func closureDisconnect(tls *crt.TLS, pVtab uintptr) int32 { /* closure.c:468:12: */ var p uintptr = pVtab - if !((*closure_vtab)(unsafe.Pointer(p)).FnCursor == 0) { - crt.X__assert_fail(tls, ts+2810 /* "p->nCursor==0" */, ts+3489 /* "testdata/sqlite-..." */, uint32(470), uintptr(unsafe.Pointer(&__func__19))) - } + closureFree(tls, p) return 0 } -var __func__19 = *(*[18]int8)(unsafe.Pointer(ts + 3551 /* "closureDisconnec..." */)) /* closure.c:468:50 */ - // Check to see if the argument is of the form: // // KEY = VALUE @@ -12826,14 +12761,14 @@ __1: rc = 7 crt.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(closure_vtab{}))) (*closure_vtab)(unsafe.Pointer(pNew)).Fdb = db - (*closure_vtab)(unsafe.Pointer(pNew)).FzDb = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zDb)) + (*closure_vtab)(unsafe.Pointer(pNew)).FzDb = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zDb)) if !((*closure_vtab)(unsafe.Pointer(pNew)).FzDb == uintptr(0)) { goto __2 } goto closureConnectError __2: ; - (*closure_vtab)(unsafe.Pointer(pNew)).FzSelf = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) + (*closure_vtab)(unsafe.Pointer(pNew)).FzSelf = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) if !((*closure_vtab)(unsafe.Pointer(pNew)).FzSelf == uintptr(0)) { goto __3 } @@ -12845,7 +12780,7 @@ __4: if !(i < argc) { goto __6 } - zVal = closureValueOfKey(tls, ts+3569 /* "tablename" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + zVal = closureValueOfKey(tls, ts+2750 /* "tablename" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __7 } @@ -12860,7 +12795,7 @@ __8: goto __5 __7: ; - zVal = closureValueOfKey(tls, ts+3579 /* "idcolumn" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + zVal = closureValueOfKey(tls, ts+2760 /* "idcolumn" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __9 } @@ -12875,7 +12810,7 @@ __10: goto __5 __9: ; - zVal = closureValueOfKey(tls, ts+3588 /* "parentcolumn" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) + zVal = closureValueOfKey(tls, ts+2769 /* "parentcolumn" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if !(zVal != 0) { goto __11 } @@ -12890,7 +12825,7 @@ __12: goto __5 __11: ; - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2909 /* "unrecognized arg..." */, crt.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2194 /* "unrecognized arg..." */, crt.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) closureFree(tls, pNew) *(*uintptr)(unsafe.Pointer(ppVtab)) = uintptr(0) return 1 @@ -12903,7 +12838,7 @@ __6: ; rc = sqlite3.Xsqlite3_declare_vtab(tls, db, - ts+3601 /* "CREATE TABLE x(i..." */) + ts+2782 /* "CREATE TABLE x(i..." */) if !(rc != 0) { goto __13 } @@ -13021,19 +12956,19 @@ func closureFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintp } if (idxNum & 0x00f00) != 0 { zTableName = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(((idxNum>>8)&0x0f))*8))) - (*closure_cursor)(unsafe.Pointer(pCur)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zTableName)) + (*closure_cursor)(unsafe.Pointer(pCur)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zTableName)) } if (idxNum & 0x0f000) != 0 { zIdColumn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(((idxNum>>12)&0x0f))*8))) - (*closure_cursor)(unsafe.Pointer(pCur)).FzIdColumn = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, zIdColumn)) + (*closure_cursor)(unsafe.Pointer(pCur)).FzIdColumn = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, zIdColumn)) } if (idxNum & 0x0f0000) != 0 { zParentColumn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(((idxNum>>16)&0x0f))*8))) - (*closure_cursor)(unsafe.Pointer(pCur)).FzParentColumn = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+16, zParentColumn)) + (*closure_cursor)(unsafe.Pointer(pCur)).FzParentColumn = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+16, zParentColumn)) } zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+3691, /* "SELECT \"%w\".\"%w\"..." */ + ts+2872, /* "SELECT \"%w\".\"%w\"..." */ crt.VaList(bp+24, zTableName, zIdColumn, zTableName, zTableName, zParentColumn)) if zSql == uintptr(0) { return 7 @@ -13042,7 +12977,7 @@ func closureFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintp sqlite3.Xsqlite3_free(tls, zSql) if rc != 0 { sqlite3.Xsqlite3_free(tls, (*closure_vtab)(unsafe.Pointer(pVtab)).Fbase.FzErrMsg) - (*closure_vtab)(unsafe.Pointer(pVtab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+64, sqlite3.Xsqlite3_errmsg(tls, (*closure_vtab)(unsafe.Pointer(pVtab)).Fdb))) + (*closure_vtab)(unsafe.Pointer(pVtab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+64, sqlite3.Xsqlite3_errmsg(tls, (*closure_vtab)(unsafe.Pointer(pVtab)).Fdb))) return rc } } @@ -13314,7 +13249,7 @@ func sqlite3_closure_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintp _ = pApi _ = pzErrMsg - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3737 /* "transitive_closu..." */, uintptr(unsafe.Pointer(&closureModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+2918 /* "transitive_closu..." */, uintptr(unsafe.Pointer(&closureModule)), uintptr(0)) return rc } @@ -13397,39 +13332,31 @@ func csv_reader_open(tls *crt.TLS, p uintptr, zFilename uintptr, zData uintptr) if zFilename != 0 { (*CsvReader)(unsafe.Pointer(p)).FzIn = sqlite3.Xsqlite3_malloc(tls, 1024) if (*CsvReader)(unsafe.Pointer(p)).FzIn == uintptr(0) { - csv_errmsg(tls, p, ts+2471 /* "out of memory" */, 0) + csv_errmsg(tls, p, ts+1929 /* "out of memory" */, 0) return 1 } - (*CsvReader)(unsafe.Pointer(p)).Fin = crt.Xfopen(tls, zFilename, ts+3756 /* "rb" */) + (*CsvReader)(unsafe.Pointer(p)).Fin = crt.Xfopen(tls, zFilename, ts+2937 /* "rb" */) if (*CsvReader)(unsafe.Pointer(p)).Fin == uintptr(0) { sqlite3.Xsqlite3_free(tls, (*CsvReader)(unsafe.Pointer(p)).FzIn) csv_reader_reset(tls, p) - csv_errmsg(tls, p, ts+3759 /* "cannot open '%s'..." */, crt.VaList(bp, zFilename)) + csv_errmsg(tls, p, ts+2940 /* "cannot open '%s'..." */, crt.VaList(bp, zFilename)) return 1 } } else { - if !((*CsvReader)(unsafe.Pointer(p)).Fin == uintptr(0)) { - crt.X__assert_fail(tls, ts+3788 /* "p->in==0" */, ts+3797 /* "testdata/sqlite-..." */, uint32(141), uintptr(unsafe.Pointer(&__func__20))) - } + (*CsvReader)(unsafe.Pointer(p)).FzIn = zData (*CsvReader)(unsafe.Pointer(p)).FnIn = crt.Xstrlen(tls, zData) } return 0 } -var __func__20 = *(*[16]int8)(unsafe.Pointer(ts + 3840 /* "csv_reader_open" */)) /* csv.c:126:2 */ - // The input buffer has overflowed. Refill the input buffer, then // return the next character func csv_getc_refill(tls *crt.TLS, p uintptr) int32 { /* csv.c:151:25: */ var got size_t - if !((*CsvReader)(unsafe.Pointer(p)).FiIn >= (*CsvReader)(unsafe.Pointer(p)).FnIn) { - crt.X__assert_fail(tls, ts+3856 /* "p->iIn>=p->nIn" */, ts+3797 /* "testdata/sqlite-..." */, uint32(154), uintptr(unsafe.Pointer(&__func__21))) - } // Only called on an empty input buffer - if !((*CsvReader)(unsafe.Pointer(p)).Fin != uintptr(0)) { - crt.X__assert_fail(tls, ts+3871 /* "p->in!=0" */, ts+3797 /* "testdata/sqlite-..." */, uint32(155), uintptr(unsafe.Pointer(&__func__21))) - } // Only called if reading froma file + // Only called on an empty input buffer + // Only called if reading froma file got = crt.Xfread(tls, (*CsvReader)(unsafe.Pointer(p)).FzIn, uint64(1), uint64(1024), (*CsvReader)(unsafe.Pointer(p)).Fin) if got == uint64(0) { @@ -13440,8 +13367,6 @@ func csv_getc_refill(tls *crt.TLS, p uintptr) int32 { /* csv.c:151:25: */ return int32(*(*int8)(unsafe.Pointer((*CsvReader)(unsafe.Pointer(p)).FzIn + uintptr(0)))) } -var __func__21 = *(*[16]int8)(unsafe.Pointer(ts + 3880 /* "csv_getc_refill" */)) /* csv.c:151:54 */ - // Return the next character of input. Return EOF at end of input. func csv_getc(tls *crt.TLS, p uintptr) int32 { /* csv.c:165:12: */ if (*CsvReader)(unsafe.Pointer(p)).FiIn >= (*CsvReader)(unsafe.Pointer(p)).FnIn { @@ -13465,7 +13390,7 @@ func csv_resize_and_append(tls *crt.TLS, p uintptr, c int8) int32 { /* csv.c:175 *(*int8)(unsafe.Pointer((*CsvReader)(unsafe.Pointer(p)).Fz + uintptr(crt.PostIncInt32(&(*CsvReader)(unsafe.Pointer(p)).Fn, 1)))) = c return 0 } else { - csv_errmsg(tls, p, ts+2471 /* "out of memory" */, 0) + csv_errmsg(tls, p, ts+1929 /* "out of memory" */, 0) return 1 } return int32(0) @@ -13532,11 +13457,11 @@ func csv_read_one_field(tls *crt.TLS, p uintptr) uintptr { /* csv.c:211:13: */ break } if (pc == '"') && (c != '\r') { - csv_errmsg(tls, p, ts+3896 /* "line %d: unescap..." */, crt.VaList(bp, (*CsvReader)(unsafe.Pointer(p)).FnLine, '"')) + csv_errmsg(tls, p, ts+2969 /* "line %d: unescap..." */, crt.VaList(bp, (*CsvReader)(unsafe.Pointer(p)).FnLine, '"')) break } if c == (-1) { - csv_errmsg(tls, p, ts+3928, /* "line %d: untermi..." */ + csv_errmsg(tls, p, ts+3001, /* "line %d: untermi..." */ crt.VaList(bp+16, startLine, '"')) (*CsvReader)(unsafe.Pointer(p)).FcTerm = int32(int8(c)) break @@ -13620,7 +13545,7 @@ func csv_xfer_error(tls *crt.TLS, pTab uintptr, pRdr uintptr) { /* csv.c:329:13: defer tls.Free(8) sqlite3.Xsqlite3_free(tls, (*CsvTable)(unsafe.Pointer(pTab)).Fbase.FzErrMsg) - (*CsvTable)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, pRdr+64 /* &.zErr */)) + (*CsvTable)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, pRdr+64 /* &.zErr */)) } // This method is the destructor fo a CsvTable object. @@ -13706,12 +13631,12 @@ func csv_string_parameter(tls *crt.TLS, p uintptr, zParam uintptr, zArg uintptr, } *(*int8)(unsafe.Pointer((p + 64 /* &.zErr */) + uintptr(0))) = int8(0) if *(*uintptr)(unsafe.Pointer(pzVal)) != 0 { - csv_errmsg(tls, p, ts+3967 /* "more than one '%..." */, crt.VaList(bp, zParam)) + csv_errmsg(tls, p, ts+3040 /* "more than one '%..." */, crt.VaList(bp, zParam)) return 1 } - *(*uintptr)(unsafe.Pointer(pzVal)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, zValue)) + *(*uintptr)(unsafe.Pointer(pzVal)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, zValue)) if *(*uintptr)(unsafe.Pointer(pzVal)) == uintptr(0) { - csv_errmsg(tls, p, ts+2471 /* "out of memory" */, 0) + csv_errmsg(tls, p, ts+1929 /* "out of memory" */, 0) return 1 } csv_trim_whitespace(tls, *(*uintptr)(unsafe.Pointer(pzVal))) @@ -13722,15 +13647,15 @@ func csv_string_parameter(tls *crt.TLS, p uintptr, zParam uintptr, zArg uintptr, // Return 0 if the argument is false and 1 if it is true. Return -1 if // we cannot really tell. func csv_boolean(tls *crt.TLS, z uintptr) int32 { /* csv.c:421:12: */ - if (((sqlite3.Xsqlite3_stricmp(tls, ts+3996 /* "yes" */, z) == 0) || - (sqlite3.Xsqlite3_stricmp(tls, ts+4000 /* "on" */, z) == 0)) || - (sqlite3.Xsqlite3_stricmp(tls, ts+4003 /* "true" */, z) == 0)) || + if (((sqlite3.Xsqlite3_stricmp(tls, ts+3069 /* "yes" */, z) == 0) || + (sqlite3.Xsqlite3_stricmp(tls, ts+3073 /* "on" */, z) == 0)) || + (sqlite3.Xsqlite3_stricmp(tls, ts+3076 /* "true" */, z) == 0)) || ((int32(*(*int8)(unsafe.Pointer(z + uintptr(0)))) == '1') && (int32(*(*int8)(unsafe.Pointer(z + uintptr(1)))) == 0)) { return 1 } - if (((sqlite3.Xsqlite3_stricmp(tls, ts+4008 /* "no" */, z) == 0) || - (sqlite3.Xsqlite3_stricmp(tls, ts+4011 /* "off" */, z) == 0)) || - (sqlite3.Xsqlite3_stricmp(tls, ts+4015 /* "false" */, z) == 0)) || + if (((sqlite3.Xsqlite3_stricmp(tls, ts+3081 /* "no" */, z) == 0) || + (sqlite3.Xsqlite3_stricmp(tls, ts+3084 /* "off" */, z) == 0)) || + (sqlite3.Xsqlite3_stricmp(tls, ts+3088 /* "false" */, z) == 0)) || ((int32(*(*int8)(unsafe.Pointer(z + uintptr(0)))) == '0') && (int32(*(*int8)(unsafe.Pointer(z + uintptr(1)))) == 0)) { return 0 } @@ -13809,9 +13734,6 @@ func csvtabConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint tstFlags = 0 nCol = -99 // Parameter values - if !(uint64(unsafe.Sizeof([3]uintptr{})) == uint64(unsafe.Sizeof(azParam))) { - crt.X__assert_fail(tls, ts+4021 /* "sizeof(azPValue)..." */, ts+3797 /* "testdata/sqlite-..." */, uint32(513), uintptr(unsafe.Pointer(&__func__22))) - } crt.Xmemset(tls, bp+80 /* &sRdr */, 0, uint64(unsafe.Sizeof(CsvReader{}))) crt.Xmemset(tls, bp+344 /* &azPValue[0] */, 0, uint64(unsafe.Sizeof([3]uintptr{}))) i = 3 @@ -13849,32 +13771,32 @@ __10: ; goto __9 __8: - if !(csv_boolean_parameter(tls, ts+4055 /* "header" */, 6, z, bp+368 /* &b */) != 0) { + if !(csv_boolean_parameter(tls, ts+3094 /* "header" */, 6, z, bp+368 /* &b */) != 0) { goto __11 } if !(bHeader >= 0) { goto __13 } - csv_errmsg(tls, bp+80 /* &sRdr */, ts+4062 /* "more than one 'h..." */, 0) + csv_errmsg(tls, bp+80 /* &sRdr */, ts+3101 /* "more than one 'h..." */, 0) goto csvtab_connect_error __13: ; bHeader = *(*int32)(unsafe.Pointer(bp + 368 /* b */)) goto __12 __11: - if !((crt.AssignUintptr(&zValue, csv_parameter(tls, ts+4095 /* "testflags" */, 9, z))) != uintptr(0)) { + if !((crt.AssignUintptr(&zValue, csv_parameter(tls, ts+3134 /* "testflags" */, 9, z))) != uintptr(0)) { goto __14 } tstFlags = int32(uint32(crt.Xatoi(tls, zValue))) goto __15 __14: - if !((crt.AssignUintptr(&zValue, csv_parameter(tls, ts+4105 /* "columns" */, 7, z))) != uintptr(0)) { + if !((crt.AssignUintptr(&zValue, csv_parameter(tls, ts+3144 /* "columns" */, 7, z))) != uintptr(0)) { goto __16 } if !(nCol > 0) { goto __18 } - csv_errmsg(tls, bp+80 /* &sRdr */, ts+4113 /* "more than one 'c..." */, 0) + csv_errmsg(tls, bp+80 /* &sRdr */, ts+3152 /* "more than one 'c..." */, 0) goto csvtab_connect_error __18: ; @@ -13882,14 +13804,14 @@ __18: if !(nCol <= 0) { goto __19 } - csv_errmsg(tls, bp+80 /* &sRdr */, ts+4147 /* "column= value mu..." */, 0) + csv_errmsg(tls, bp+80 /* &sRdr */, ts+3186 /* "column= value mu..." */, 0) goto csvtab_connect_error __19: ; goto __17 __16: - csv_errmsg(tls, bp+80 /* &sRdr */, ts+4178 /* "bad parameter: '..." */, crt.VaList(bp, z)) + csv_errmsg(tls, bp+80 /* &sRdr */, ts+3217 /* "bad parameter: '..." */, crt.VaList(bp, z)) goto csvtab_connect_error __17: ; @@ -13909,7 +13831,7 @@ __3: if !((crt.Bool32((*(*uintptr)(unsafe.Pointer(bp + 344 /* &azPValue[0] */ + uintptr(0)*8))) == uintptr(0))) == (crt.Bool32((*(*uintptr)(unsafe.Pointer(bp + 344 /* &azPValue[0] */ + uintptr(1)*8))) == uintptr(0)))) { goto __20 } - csv_errmsg(tls, bp+80 /* &sRdr */, ts+4198 /* "must specify eit..." */, 0) + csv_errmsg(tls, bp+80 /* &sRdr */, ts+3237 /* "must specify eit..." */, 0) goto csvtab_connect_error __20: ; @@ -13934,9 +13856,9 @@ __22: goto __23 } pStr = sqlite3.Xsqlite3_str_new(tls, uintptr(0)) - zSep = ts + 792 /* "" */ + zSep = ts + 488 /* "" */ iCol = 0 - sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+1223 /* "CREATE TABLE x(" */, 0) + sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+883 /* "CREATE TABLE x(" */, 0) if !((nCol < 0) && (bHeader < 1)) { goto __25 } @@ -13962,8 +13884,8 @@ __31: if !(iCol < nCol) { goto __33 } - sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+4250 /* "%sc%d TEXT" */, crt.VaList(bp+8, zSep, iCol)) - zSep = ts + 4261 /* "," */ + sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+3289 /* "%sc%d TEXT" */, crt.VaList(bp+8, zSep, iCol)) + zSep = ts + 3300 /* "," */ goto __32 __32: iCol++ @@ -13978,8 +13900,8 @@ __34: if !(((nCol > 0) && (iCol < nCol)) || ((nCol < 0) && (bHeader != 0))) { goto __37 } - sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+4263 /* "%s\"%w\" TEXT" */, crt.VaList(bp+24, zSep, z1)) - zSep = ts + 4261 /* "," */ + sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+3302 /* "%s\"%w\" TEXT" */, crt.VaList(bp+24, zSep, z1)) + zSep = ts + 3300 /* "," */ iCol++ __37: ; @@ -14001,8 +13923,8 @@ __40: if !(iCol < nCol) { goto __41 } - sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+4250 /* "%sc%d TEXT" */, crt.VaList(bp+40, zSep, crt.PreIncInt32(&iCol, 1))) - zSep = ts + 4261 /* "," */ + sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+3289 /* "%sc%d TEXT" */, crt.VaList(bp+40, zSep, crt.PreIncInt32(&iCol, 1))) + zSep = ts + 3300 /* "," */ goto __40 __41: ; @@ -14011,7 +13933,7 @@ __39: __30: ; (*CsvTable)(unsafe.Pointer(pNew)).FnCol = nCol - sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+793 /* ")" */, 0) + sqlite3.Xsqlite3_str_appendf(tls, pStr, ts+489 /* ")" */, 0) (*(*uintptr)(unsafe.Pointer(bp + 344 /* &azPValue[0] */ + uintptr(2)*8))) = sqlite3.Xsqlite3_str_finish(tls, pStr) if !((*(*uintptr)(unsafe.Pointer(bp + 344 /* &azPValue[0] */ + uintptr(2)*8))) == uintptr(0)) { goto __42 @@ -14069,7 +13991,7 @@ __49: if !(rc != 0) { goto __52 } - csv_errmsg(tls, bp+80 /* &sRdr */, ts+4275 /* "bad schema: '%s'..." */, crt.VaList(bp+56, *(*uintptr)(unsafe.Pointer(bp + 344 /* &azPValue[0] */ + uintptr(2)*8)), sqlite3.Xsqlite3_errmsg(tls, db))) + csv_errmsg(tls, bp+80 /* &sRdr */, ts+3314 /* "bad schema: '%s'..." */, crt.VaList(bp+56, *(*uintptr)(unsafe.Pointer(bp + 344 /* &azPValue[0] */ + uintptr(2)*8)), sqlite3.Xsqlite3_errmsg(tls, db))) goto csvtab_connect_error __52: ; @@ -14098,7 +14020,7 @@ __55: csvtab_connect_oom: rc = 7 - csv_errmsg(tls, bp+80 /* &sRdr */, ts+2471 /* "out of memory" */, 0) + csv_errmsg(tls, bp+80 /* &sRdr */, ts+1929 /* "out of memory" */, 0) csvtab_connect_error: if !(pNew != 0) { @@ -14124,7 +14046,7 @@ __59: goto __60 } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErr))) - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+72, bp+80 /* &sRdr */ +64 /* &.zErr */)) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+72, bp+80 /* &sRdr */ +64 /* &.zErr */)) __60: ; csv_reader_reset(tls, bp+80 /* &sRdr */) @@ -14137,9 +14059,8 @@ __61: return rc } -var __func__22 = *(*[14]int8)(unsafe.Pointer(ts + 4297 /* "csvtabConnect" */)) /* csv.c:492:2 */ var azParam = [3]uintptr{ - ts + 4311 /* "filename" */, ts + 4320 /* "data" */, ts + 4325, /* "schema" */ + ts + 3336 /* "filename" */, ts + 3345 /* "data" */, ts + 3350, /* "schema" */ } /* csv.c:504:21 */ // Reset the current row content held by a CsvCursor. @@ -14205,7 +14126,7 @@ func csvtabNext(tls *crt.TLS, cur uintptr) int32 { /* csv.c:728:12: */ if *(*int32)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FaLen + uintptr(i)*4)) < ((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fn + 1) { var zNew uintptr = sqlite3.Xsqlite3_realloc64(tls, *(*uintptr)(unsafe.Pointer((*CsvCursor)(unsafe.Pointer(pCur)).FazVal + uintptr(i)*8)), (uint64((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fn + 1))) if zNew == uintptr(0) { - csv_errmsg(tls, (pCur + 8 /* &.rdr */), ts+2471 /* "out of memory" */, 0) + csv_errmsg(tls, (pCur + 8 /* &.rdr */), ts+1929 /* "out of memory" */, 0) csv_xfer_error(tls, pTab, (pCur + 8 /* &.rdr */)) break } @@ -14262,15 +14183,7 @@ func csvtabFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab (*CsvCursor)(unsafe.Pointer(pCur)).FiRowid = int64(0) if (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fin == uintptr(0) { - if !((*CsvCursor)(unsafe.Pointer(pCur)).Frdr.FzIn == (*CsvTable)(unsafe.Pointer(pTab)).FzData) { - crt.X__assert_fail(tls, ts+4332 /* "pCur->rdr.zIn==p..." */, ts+3797 /* "testdata/sqlite-..." */, uint32(815), uintptr(unsafe.Pointer(&__func__23))) - } - if !((*CsvTable)(unsafe.Pointer(pTab)).FiStart >= int64(0)) { - crt.X__assert_fail(tls, ts+4359 /* "pTab->iStart>=0" */, ts+3797 /* "testdata/sqlite-..." */, uint32(816), uintptr(unsafe.Pointer(&__func__23))) - } - if !(size_t((*CsvTable)(unsafe.Pointer(pTab)).FiStart) <= (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.FnIn) { - crt.X__assert_fail(tls, ts+4375 /* "(size_t)pTab->iS..." */, ts+3797 /* "testdata/sqlite-..." */, uint32(817), uintptr(unsafe.Pointer(&__func__23))) - } + (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.FiIn = size_t((*CsvTable)(unsafe.Pointer(pTab)).FiStart) } else { crt.Xfseek(tls, (*CsvCursor)(unsafe.Pointer(pCur)).Frdr.Fin, (*CsvTable)(unsafe.Pointer(pTab)).FiStart, 0) @@ -14280,8 +14193,6 @@ func csvtabFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt return csvtabNext(tls, pVtabCursor) } -var __func__23 = *(*[13]int8)(unsafe.Pointer(ts + 4411 /* "csvtabFilter" */)) /* csv.c:810:2 */ - // Only a forward full table scan is supported. xBestIndex is mostly // a no-op. If CSVTEST_FIDX is set, then the presence of equality // constraints lowers the estimated cost, which is fiction, but is useful @@ -14377,9 +14288,9 @@ func sqlite3_csv_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) var rc int32 _ = pApi - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+4424 /* "csv" */, uintptr(unsafe.Pointer(&CsvModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3357 /* "csv" */, uintptr(unsafe.Pointer(&CsvModule)), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+4428 /* "csv_wr" */, uintptr(unsafe.Pointer(&CsvModuleFauxWrite)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3361 /* "csv_wr" */, uintptr(unsafe.Pointer(&CsvModuleFauxWrite)), uintptr(0)) } return rc } @@ -14405,7 +14316,7 @@ func callback(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr, colnames uin if *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) != 0 { z = *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) } else { - z = ts + 792 /* "" */ + z = ts + 488 /* "" */ } var sz size_t = crt.Xstrlen(tls, z) if (((sqlite3_int64(sz) + (*EvalResult)(unsafe.Pointer(p)).FnUsed) + sqlite3_int64((*EvalResult)(unsafe.Pointer(p)).FszSep)) + int64(1)) > (*EvalResult)(unsafe.Pointer(p)).FnAlloc { @@ -14451,7 +14362,7 @@ func sqlEvalFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* e // var x EvalResult at bp, 40 crt.Xmemset(tls, bp /* &x */, 0, uint64(unsafe.Sizeof(EvalResult{}))) - (*EvalResult)(unsafe.Pointer(bp /* &x */)).FzSep = ts + 4435 /* " " */ + (*EvalResult)(unsafe.Pointer(bp /* &x */)).FzSep = ts + 3368 /* " " */ zSql = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) if zSql == uintptr(0) { return @@ -14483,13 +14394,13 @@ func sqlite3_eval_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) _ = pApi _ = pzErrMsg // Unused parameter - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4437 /* "eval" */, 1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3370 /* "eval" */, 1, (1 | 0x000080000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{sqlEvalFunc})), uintptr(0), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4437 /* "eval" */, 2, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3370 /* "eval" */, 2, (1 | 0x000080000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) @@ -14544,7 +14455,7 @@ func explainConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uin // Column numbers rc = sqlite3.Xsqlite3_declare_vtab(tls, db, - ts+4442 /* "CREATE TABLE x(a..." */) + ts+3375 /* "CREATE TABLE x(a..." */) if rc == 0 { pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(explain_vtab{}))) *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew @@ -14642,9 +14553,9 @@ func explainFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintp return 0 } sqlite3.Xsqlite3_free(tls, (*explain_cursor)(unsafe.Pointer(pCur)).FzSql) - (*explain_cursor)(unsafe.Pointer(pCur)).FzSql = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))))) + (*explain_cursor)(unsafe.Pointer(pCur)).FzSql = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))))) if (*explain_cursor)(unsafe.Pointer(pCur)).FzSql != 0 { - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+4504 /* "EXPLAIN %s" */, crt.VaList(bp+8, (*explain_cursor)(unsafe.Pointer(pCur)).FzSql)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+3437 /* "EXPLAIN %s" */, crt.VaList(bp+8, (*explain_cursor)(unsafe.Pointer(pCur)).FzSql)) } if zSql == uintptr(0) { rc = 7 @@ -14733,7 +14644,7 @@ uintptr(0), // xShadowName func sqlite3ExplainVtabInit(tls *crt.TLS, db uintptr) int32 { /* explain.c:300:5: */ var rc int32 = 0 - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+4515 /* "explain" */, uintptr(unsafe.Pointer(&explainModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3448 /* "explain" */, uintptr(unsafe.Pointer(&explainModule)), uintptr(0)) return rc } @@ -15331,7 +15242,7 @@ func readFileContents(tls *crt.TLS, ctx uintptr, zName uintptr) { /* fileio.c:13 var db uintptr var mxBlob int32 - in = crt.Xfopen(tls, zName, ts+3756 /* "rb" */) + in = crt.Xfopen(tls, zName, ts+2937 /* "rb" */) if in == uintptr(0) { // File does not exist or is unreadable. Leave the result set to NULL. return @@ -15419,7 +15330,7 @@ func makeDirectory(tls *crt.TLS, zFile uintptr) int32 { /* fileio.c:303:12: */ bp := tls.Alloc(152) defer tls.Free(152) - var zCopy uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zFile)) + var zCopy uintptr = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zFile)) var rc int32 = 0 if zCopy == uintptr(0) { @@ -15539,7 +15450,7 @@ func writeFile(tls *crt.TLS, pCtx uintptr, zFile uintptr, pData uintptr, mode mo var nWrite sqlite3_int64 = int64(0) var z uintptr var rc int32 = 0 - var out uintptr = crt.Xfopen(tls, zFile, ts+4523 /* "wb" */) + var out uintptr = crt.Xfopen(tls, zFile, ts+3456 /* "wb" */) if out == uintptr(0) { return 1 } @@ -15590,7 +15501,7 @@ func writefileFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* if (argc < 2) || (argc > 4) { sqlite3.Xsqlite3_result_error(tls, context, - ts+4526 /* "wrong number of ..." */, -1) + ts+3459 /* "wrong number of ..." */, -1) return } @@ -15614,11 +15525,11 @@ func writefileFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* if (argc > 2) && (res != 0) { if ((mode) & mode_t(0170000)) == (mode_t(0120000)) { - ctxErrorMsg(tls, context, ts+4576 /* "failed to create..." */, crt.VaList(bp, zFile)) + ctxErrorMsg(tls, context, ts+3509 /* "failed to create..." */, crt.VaList(bp, zFile)) } else if ((mode) & mode_t(0170000)) == (mode_t(0040000)) { - ctxErrorMsg(tls, context, ts+4605 /* "failed to create..." */, crt.VaList(bp+8, zFile)) + ctxErrorMsg(tls, context, ts+3538 /* "failed to create..." */, crt.VaList(bp+8, zFile)) } else { - ctxErrorMsg(tls, context, ts+4636 /* "failed to write ..." */, crt.VaList(bp+16, zFile)) + ctxErrorMsg(tls, context, ts+3569 /* "failed to write ..." */, crt.VaList(bp+16, zFile)) } } } @@ -15730,7 +15641,7 @@ func fsdirConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintp _ = argc _ = argv _ = pzErr - rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+4661 /* "CREATE TABLE x(n..." */) + rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+3594 /* "CREATE TABLE x(n..." */) if rc == 0 { pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(fsdir_tab{}))) if pNew == uintptr(0) { @@ -15835,7 +15746,7 @@ func fsdirNext(tls *crt.TLS, cur uintptr) int32 { /* fileio.c:666:12: */ (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = uintptr(0) (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir = crt.Xopendir(tls, (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir) if (*FsdirLevel)(unsafe.Pointer(pLvl)).FpDir == uintptr(0) { - fsdirSetErrmsg(tls, pCur, ts+4721 /* "cannot read dire..." */, crt.VaList(bp, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) + fsdirSetErrmsg(tls, pCur, ts+3654 /* "cannot read dire..." */, crt.VaList(bp, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) return 1 } } @@ -15853,12 +15764,12 @@ func fsdirNext(tls *crt.TLS, cur uintptr) int32 { /* fileio.c:666:12: */ } } sqlite3.Xsqlite3_free(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath) - (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts+4747 /* "%s/%s" */, crt.VaList(bp+8, (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir, pEntry+19 /* &.d_name */)) + (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts+3680 /* "%s/%s" */, crt.VaList(bp+8, (*FsdirLevel)(unsafe.Pointer(pLvl)).FzDir, pEntry+19 /* &.d_name */)) if (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath == uintptr(0) { return 7 } if fileLinkStat(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath, (pCur+40 /* &.sStat */)) != 0 { - fsdirSetErrmsg(tls, pCur, ts+4753 /* "cannot stat file..." */, crt.VaList(bp+24, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) + fsdirSetErrmsg(tls, pCur, ts+3686 /* "cannot stat file..." */, crt.VaList(bp+24, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) return 1 } return 0 @@ -15977,16 +15888,13 @@ func fsdirFilter(tls *crt.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc i fsdirResetCursor(tls, pCur) if idxNum == 0 { - fsdirSetErrmsg(tls, pCur, ts+4774 /* "table function f..." */, 0) + fsdirSetErrmsg(tls, pCur, ts+3707 /* "table function f..." */, 0) return 1 } - if !((argc == idxNum) && ((argc == 1) || (argc == 2))) { - crt.X__assert_fail(tls, ts+4816 /* "argc==idxNum && ..." */, ts+4853 /* "testdata/sqlite-..." */, uint32(831), uintptr(unsafe.Pointer(&__func__24))) - } zDir = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) if zDir == uintptr(0) { - fsdirSetErrmsg(tls, pCur, ts+4899 /* "table function f..." */, 0) + fsdirSetErrmsg(tls, pCur, ts+3749 /* "table function f..." */, 0) return 1 } if argc == 2 { @@ -15994,24 +15902,22 @@ func fsdirFilter(tls *crt.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc i } if (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase != 0 { (*fsdir_cursor)(unsafe.Pointer(pCur)).FnBase = (int32(crt.Xstrlen(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase)) + 1) - (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts+4747 /* "%s/%s" */, crt.VaList(bp, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase, zDir)) + (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts+3680 /* "%s/%s" */, crt.VaList(bp, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzBase, zDir)) } else { - (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+16, zDir)) + (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+16, zDir)) } if (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath == uintptr(0) { return 7 } if fileLinkStat(tls, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath, (pCur+40 /* &.sStat */)) != 0 { - fsdirSetErrmsg(tls, pCur, ts+4753 /* "cannot stat file..." */, crt.VaList(bp+24, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) + fsdirSetErrmsg(tls, pCur, ts+3686 /* "cannot stat file..." */, crt.VaList(bp+24, (*fsdir_cursor)(unsafe.Pointer(pCur)).FzPath)) return 1 } return 0 } -var __func__24 = *(*[12]int8)(unsafe.Pointer(ts + 4949 /* "fsdirFilter" */)) /* fileio.c:820:2 */ - // SQLite will invoke this method one or more times while planning a query // that uses the generate_series virtual table. This routine needs to create // a query plan for each invocation and compute an estimated cost for that @@ -16104,7 +16010,7 @@ __3: // Register the "fsdir" virtual table. func fsdirRegister(tls *crt.TLS, db uintptr) int32 { /* fileio.c:938:12: */ - var rc int32 = sqlite3.Xsqlite3_create_module(tls, db, ts+4961 /* "fsdir" */, uintptr(unsafe.Pointer(&fsdirModule1)), uintptr(0)) + var rc int32 = sqlite3.Xsqlite3_create_module(tls, db, ts+3799 /* "fsdir" */, uintptr(unsafe.Pointer(&fsdirModule1)), uintptr(0)) return rc } @@ -16139,20 +16045,20 @@ func sqlite3_fileio_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintpt _ = pApi _ = pzErrMsg // Unused parameter - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4967 /* "readfile" */, 1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3805 /* "readfile" */, 1, (1 | 0x000080000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{readfileFunc})), uintptr(0), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4976 /* "writefile" */, -1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3814 /* "writefile" */, -1, (1 | 0x000080000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{writefileFunc})), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4986 /* "lsmode" */, 1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3824 /* "lsmode" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{lsModeFunc})), uintptr(0), uintptr(0)) @@ -16287,10 +16193,10 @@ func fuzzerLoadOneRule(tls *crt.TLS, p uintptr, pStmt uintptr, ppRule uintptr, p var pRule uintptr = uintptr(0) // New rule object to return if zFrom == uintptr(0) { - zFrom = ts + 792 /* "" */ + zFrom = ts + 488 /* "" */ } if zTo == uintptr(0) { - zTo = ts + 792 /* "" */ + zTo = ts + 488 /* "" */ } nFrom = int32(crt.Xstrlen(tls, zFrom)) nTo = int32(crt.Xstrlen(tls, zTo)) @@ -16302,15 +16208,15 @@ func fuzzerLoadOneRule(tls *crt.TLS, p uintptr, pStmt uintptr, ppRule uintptr, p } if (nCost <= 0) || (nCost > 1000) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2581, /* "%s: cost must be..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+1962, /* "%s: cost must be..." */ crt.VaList(bp, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, 1000)) rc = 1 } else if (nFrom > 50) || (nTo > 50) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2615, /* "%s: maximum stri..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+1996, /* "%s: maximum stri..." */ crt.VaList(bp+16, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, 50)) rc = 1 } else if (iRuleset < int64(0)) || (iRuleset > int64(2147483647)) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+4993, /* "%s: ruleset must..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+3831, /* "%s: ruleset must..." */ crt.VaList(bp+32, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, 2147483647)) rc = 1 } else { @@ -16344,7 +16250,7 @@ func fuzzerLoadRules(tls *crt.TLS, db uintptr, p uintptr, zDb uintptr, zData uin var zSql uintptr // SELECT used to read from rules table var pHead uintptr = uintptr(0) - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+2684 /* "SELECT * FROM %Q..." */, crt.VaList(bp, zDb, zData)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+2065 /* "SELECT * FROM %Q..." */, crt.VaList(bp, zDb, zData)) if zSql == uintptr(0) { rc = 7 } else { @@ -16352,9 +16258,9 @@ func fuzzerLoadRules(tls *crt.TLS, db uintptr, p uintptr, zDb uintptr, zData uin *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+56 /* &pStmt */, uintptr(0)) if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2704 /* "%s: %s" */, crt.VaList(bp+16, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, sqlite3.Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2085 /* "%s: %s" */, crt.VaList(bp+16, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, sqlite3.Xsqlite3_errmsg(tls, db))) } else if sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */))) != 4 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2711, /* "%s: %s has %d co..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+2092, /* "%s: %s has %d co..." */ crt.VaList(bp+32, (*fuzzer_vtab)(unsafe.Pointer(p)).FzClassName, zData, sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */))))) rc = 1 } else { @@ -16480,7 +16386,7 @@ func fuzzerConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint if argc != 4 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, - ts+5030 /* "%s: wrong number..." */, crt.VaList(bp, zModule)) + ts+3868 /* "%s: wrong number..." */, crt.VaList(bp, zModule)) rc = 1 } else { var nModule sqlite3_int64 // Length of zModule, in bytes @@ -16505,7 +16411,7 @@ func fuzzerConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint } if rc == 0 { - rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+5081 /* "CREATE TABLE x(w..." */) + rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+3919 /* "CREATE TABLE x(w..." */) } if rc != 0 { fuzzerDisconnect(tls, pNew) @@ -16885,7 +16791,7 @@ func fuzzerNext(tls *crt.TLS, cur uintptr) int32 { /* fuzzer.c:901:12: */ // prior to any fuzzerColumn, fuzzerRowid, or fuzzerEof call. func fuzzerFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* fuzzer.c:969:12: */ var pCur uintptr = pVtabCursor - var zWord uintptr = ts + 792 /* "" */ + var zWord uintptr = ts + 488 /* "" */ var pStem uintptr var idx int32 @@ -16908,7 +16814,7 @@ func fuzzerFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FrCost = 0 (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FnFrom = int8(0) (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FnTo = int8(0) - (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FzFrom = ts + 792 /* "" */ + (*fuzzer_cursor)(unsafe.Pointer(pCur)).FnullRule.FzFrom = ts + 488 /* "" */ (*fuzzer_cursor)(unsafe.Pointer(pCur)).FiRowid = int64(1) // If the query term is longer than FUZZER_MX_OUTPUT_LENGTH bytes, this @@ -17086,7 +16992,7 @@ func sqlite3_fuzzer_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintpt var rc int32 = 0 _ = pApi - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+5119 /* "fuzzer" */, uintptr(unsafe.Pointer(&fuzzerModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+3957 /* "fuzzer" */, uintptr(unsafe.Pointer(&fuzzerModule)), uintptr(0)) return rc } @@ -17105,9 +17011,6 @@ func ieee754func(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* i var isNeg int32 // var zResult [100]int8 at bp+32, 100 - if !(uint64(unsafe.Sizeof(m)) == uint64(unsafe.Sizeof(float64(0)))) { - crt.X__assert_fail(tls, ts+5126 /* "sizeof(m)==sizeo..." */, ts+5147 /* "testdata/sqlite-..." */, uint32(53), uintptr(unsafe.Pointer(&__func__25))) - } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) != 2 { return } @@ -17134,7 +17037,7 @@ func ieee754func(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* i m = -m } } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+32 /* &zResult[0] */, ts+5194, /* "ieee754(%lld,%d)" */ + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+32 /* &zResult[0] */, ts+3964, /* "ieee754(%lld,%d)" */ crt.VaList(bp, m, (e-1075))) sqlite3.Xsqlite3_result_text(tls, context, bp+32 /* &zResult[0] */, -1, crt.UintptrFromInt32(-1)) } else if argc == 2 { @@ -17182,20 +17085,18 @@ func ieee754func(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* i } } -var __func__25 = *(*[12]int8)(unsafe.Pointer(ts + 5211 /* "ieee754func" */)) /* ieee754.c:46:2 */ - func sqlite3_ieee_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* ieee754.c:116:5: */ var rc int32 = 0 _ = pApi _ = pzErrMsg // Unused parameter - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5223 /* "ieee754" */, 1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3981 /* "ieee754" */, 1, (1 | 0x000200000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{ieee754func})), uintptr(0), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5223 /* "ieee754" */, 2, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+3981 /* "ieee754" */, 2, (1 | 0x000200000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) @@ -17241,22 +17142,22 @@ func sqlite3_mmap_warm(tls *crt.TLS, db uintptr, zDb uintptr) int32 { /* mmapwar } // Open a read-only transaction on the file in question - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+5231, /* "BEGIN; SELECT * ..." */ + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+3989, /* "BEGIN; SELECT * ..." */ crt.VaList(bp, func() uintptr { if zDb != 0 { - return ts + 5272 /* "'" */ + return ts + 4030 /* "'" */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), func() uintptr { if zDb != 0 { return zDb } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), func() uintptr { if zDb != 0 { - return ts + 5274 /* "'." */ + return ts + 4032 /* "'." */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }())) if zSql == uintptr(0) { return 7 @@ -17266,22 +17167,22 @@ func sqlite3_mmap_warm(tls *crt.TLS, db uintptr, zDb uintptr) int32 { /* mmapwar // Find the SQLite page size of the file if rc == 0 { - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+5277, /* "PRAGMA %s%q%spag..." */ + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+4035, /* "PRAGMA %s%q%spag..." */ crt.VaList(bp+24, func() uintptr { if zDb != 0 { - return ts + 5272 /* "'" */ + return ts + 4030 /* "'" */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), func() uintptr { if zDb != 0 { return zDb } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), func() uintptr { if zDb != 0 { - return ts + 5274 /* "'." */ + return ts + 4032 /* "'." */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }())) if zSql == uintptr(0) { rc = 7 @@ -17327,7 +17228,7 @@ func sqlite3_mmap_warm(tls *crt.TLS, db uintptr, zDb uintptr) int32 { /* mmapwar iPg++ } sqlite3.Xsqlite3_log(tls, 0, - ts+5300 /* "sqlite3_mmap_war..." */, crt.VaList(bp+48, func() int64 { + ts+4058 /* "sqlite3_mmap_war..." */, crt.VaList(bp+48, func() int64 { if iPg == int64(1) { return int64(0) } @@ -17336,7 +17237,7 @@ func sqlite3_mmap_warm(tls *crt.TLS, db uintptr, zDb uintptr) int32 { /* mmapwar sqlite3.Xsqlite3_db_filename(tls, db, zDb))) } - rc2 = sqlite3.Xsqlite3_exec(tls, db, ts+5350 /* "END" */, uintptr(0), uintptr(0), uintptr(0)) + rc2 = sqlite3.Xsqlite3_exec(tls, db, ts+4108 /* "END" */, uintptr(0), uintptr(0), uintptr(0)) if rc == 0 { rc = rc2 } @@ -17514,18 +17415,18 @@ func nextCharFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* if ((argc >= 4) && ((crt.AssignUintptr(&zWhere, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8))))) != uintptr(0))) && (int32(*(*uint8)(unsafe.Pointer(zWhere + uintptr(0)))) != 0) { - zWhereClause = sqlite3.Xsqlite3_mprintf(tls, ts+5354 /* "AND (%s)" */, crt.VaList(bp, zWhere)) + zWhereClause = sqlite3.Xsqlite3_mprintf(tls, ts+4112 /* "AND (%s)" */, crt.VaList(bp, zWhere)) if zWhereClause == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) return } } else { - zWhereClause = ts + 792 /* "" */ + zWhereClause = ts + 488 /* "" */ } if ((argc >= 5) && ((crt.AssignUintptr(&zCollName, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8))))) != uintptr(0))) && (int32(*(*uint8)(unsafe.Pointer(zCollName + uintptr(0)))) != 0) { - zColl = sqlite3.Xsqlite3_mprintf(tls, ts+5363 /* "collate \"%w\"" */, crt.VaList(bp+8, zCollName)) + zColl = sqlite3.Xsqlite3_mprintf(tls, ts+4121 /* "collate \"%w\"" */, crt.VaList(bp+8, zCollName)) if zColl == uintptr(0) { sqlite3.Xsqlite3_result_error_nomem(tls, context) if *(*int8)(unsafe.Pointer(zWhereClause + uintptr(0))) != 0 { @@ -17534,13 +17435,13 @@ func nextCharFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* return } } else { - zColl = ts + 792 /* "" */ + zColl = ts + 488 /* "" */ } zSql = sqlite3.Xsqlite3_mprintf(tls, // 1114111 == 0x10ffff - ts+5376, /* "SELECT %s FROM %..." */ + ts+4134, /* "SELECT %s FROM %..." */ crt.VaList(bp+16, zField, zTable, zField, zColl, zField, zColl, zWhereClause, zColl)) if *(*int8)(unsafe.Pointer(zWhereClause + uintptr(0))) != 0 { sqlite3.Xsqlite3_free(tls, zWhereClause) @@ -17586,20 +17487,20 @@ func sqlite3_nextchar_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uint _ = pApi _ = pzErrMsg // Unused parameter - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5484 /* "next_char" */, 3, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4242 /* "next_char" */, 3, (1 | 0x000200000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{nextCharFunc})), uintptr(0), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5484 /* "next_char" */, 4, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4242 /* "next_char" */, 4, (1 | 0x000200000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{nextCharFunc})), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5484 /* "next_char" */, 5, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4242 /* "next_char" */, 5, (1 | 0x000200000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) @@ -18112,9 +18013,9 @@ func sqlite3_normalize(tls *crt.TLS, zSql uintptr) uintptr { /* normalize.c:546: fallthrough case 1: { - if (n == 4) && (sqlite3.Xsqlite3_strnicmp(tls, (zSql+uintptr(i)), ts+5494 /* "NULL" */, 4) == 0) { - if (((j >= 3) && (crt.Xstrncmp(tls, ((z+uintptr(j))-uintptr(2)), ts+5499 /* "is" */, uint64(2)) == 0)) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((j - 3)))))]) & 0x46) != 0)) || - (((j >= 4) && (crt.Xstrncmp(tls, ((z+uintptr(j))-uintptr(3)), ts+5502 /* "not" */, uint64(3)) == 0)) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((j - 4)))))]) & 0x46) != 0)) { + if (n == 4) && (sqlite3.Xsqlite3_strnicmp(tls, (zSql+uintptr(i)), ts+4252 /* "NULL" */, 4) == 0) { + if (((j >= 3) && (crt.Xstrncmp(tls, ((z+uintptr(j))-uintptr(2)), ts+4257 /* "is" */, uint64(2)) == 0)) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((j - 3)))))]) & 0x46) != 0)) || + (((j >= 4) && (crt.Xstrncmp(tls, ((z+uintptr(j))-uintptr(3)), ts+4260 /* "not" */, uint64(3)) == 0)) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(z + uintptr((j - 4)))))]) & 0x46) != 0)) { } else { // Here the NULL is a literal value *(*int8)(unsafe.Pointer(z + uintptr(crt.PostIncInt32(&j, 1)))) = int8('?') @@ -18142,7 +18043,7 @@ func sqlite3_normalize(tls *crt.TLS, zSql uintptr) uintptr { /* normalize.c:546: // Make a second pass converting "in(...)" where the "..." is not a // SELECT statement into "in(?,?,?)" for i = 0; i < j; i = n { - var zIn uintptr = crt.Xstrstr(tls, (z + uintptr(i)), ts+5506 /* "in(" */) + var zIn uintptr = crt.Xstrstr(tls, (z + uintptr(i)), ts+4264 /* "in(" */) var nParen int32 if zIn == uintptr(0) { break @@ -18151,10 +18052,10 @@ func sqlite3_normalize(tls *crt.TLS, zSql uintptr) uintptr { /* normalize.c:546: if (n != 0) && ((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zIn + crt.UintptrFromInt32(-1))))]) & 0x46) != 0) { continue } - if (crt.Xstrncmp(tls, zIn, ts+5510 /* "in(select" */, uint64(9)) == 0) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zIn + uintptr(9))))]) & 0x46) != 0) { + if (crt.Xstrncmp(tls, zIn, ts+4268 /* "in(select" */, uint64(9)) == 0) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zIn + uintptr(9))))]) & 0x46) != 0) { continue } - if (crt.Xstrncmp(tls, zIn, ts+5520 /* "in(with" */, uint64(7)) == 0) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zIn + uintptr(7))))]) & 0x46) != 0) { + if (crt.Xstrncmp(tls, zIn, ts+4278 /* "in(with" */, uint64(7)) == 0) && !((int32(sqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zIn + uintptr(7))))]) & 0x46) != 0) { continue } nParen = 1 @@ -18182,7 +18083,7 @@ func sqlite3_normalize(tls *crt.TLS, zSql uintptr) uintptr { /* normalize.c:546: } j = ((j - k) + 5) *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) - crt.Xmemcpy(tls, (z + uintptr(n)), ts+5528 /* "?,?,?" */, uint64(5)) + crt.Xmemcpy(tls, (z + uintptr(n)), ts+4286 /* "?,?,?" */, uint64(5)) } return z } @@ -18256,15 +18157,10 @@ func isInfinity(tls *crt.TLS, r float64) int32 { /* percentile.c:82:12: */ // var u sqlite3_uint64 at bp, 8 - if !(uint64(unsafe.Sizeof(sqlite3_uint64(0))) == uint64(unsafe.Sizeof(float64(0)))) { - crt.X__assert_fail(tls, ts+5534 /* "sizeof(u)==sizeo..." */, ts+5555 /* "testdata/sqlite-..." */, uint32(84), uintptr(unsafe.Pointer(&__func__26))) - } crt.Xmemcpy(tls, bp /* &u */, bp+8 /* &r */, uint64(unsafe.Sizeof(sqlite3_uint64(0)))) return (crt.Bool32(((*(*sqlite3_uint64)(unsafe.Pointer(bp /* u */)) >> 52) & uint64(0x7ff)) == uint64(0x7ff))) } -var __func__26 = *(*[11]int8)(unsafe.Pointer(ts + 5605 /* "isInfinity" */)) /* percentile.c:82:32 */ - // Return TRUE if two doubles differ by 0.001 or less func sameValue(tls *crt.TLS, a float64, b float64) int32 { /* percentile.c:92:12: */ a = a - (b) @@ -18278,9 +18174,6 @@ func percentStep(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* perc var rPct float64 var eType int32 var y float64 - if !(argc == 2) { - crt.X__assert_fail(tls, ts+1318 /* "argc==2" */, ts+5555 /* "testdata/sqlite-..." */, uint32(106), uintptr(unsafe.Pointer(&__func__27))) - } // Requirement 3: P must be a number between 0 and 100 eType = sqlite3.Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -18288,7 +18181,7 @@ func percentStep(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* perc if (((eType != 1) && (eType != 2)) || (rPct < 0.0)) || (rPct > 100.0) { sqlite3.Xsqlite3_result_error(tls, pCtx, - ts+5616 /* "2nd argument to ..." */, -1) + ts+4292 /* "2nd argument to ..." */, -1) return } @@ -18304,7 +18197,7 @@ func percentStep(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* perc (*Percentile)(unsafe.Pointer(p)).FrPct = (rPct + 1.0) } else if !(sameValue(tls, (*Percentile)(unsafe.Pointer(p)).FrPct, (rPct+1.0)) != 0) { sqlite3.Xsqlite3_result_error(tls, pCtx, - ts+5683 /* "2nd argument to ..." */, -1) + ts+4359 /* "2nd argument to ..." */, -1) return } @@ -18318,14 +18211,14 @@ func percentStep(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* perc // Requirement 4 if (eType != 1) && (eType != 2) { sqlite3.Xsqlite3_result_error(tls, pCtx, - ts+5747 /* "1st argument to ..." */, -1) + ts+4423 /* "1st argument to ..." */, -1) return } // Throw an error if the Y value is infinity or NaN y = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) if isInfinity(tls, y) != 0 { - sqlite3.Xsqlite3_result_error(tls, pCtx, ts+5791 /* "Inf input to per..." */, -1) + sqlite3.Xsqlite3_result_error(tls, pCtx, ts+4467 /* "Inf input to per..." */, -1) return } @@ -18345,8 +18238,6 @@ func percentStep(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* perc *(*float64)(unsafe.Pointer((*Percentile)(unsafe.Pointer(p)).Fa + uintptr(crt.PostIncUint32(&(*Percentile)(unsafe.Pointer(p)).FnUsed, 1))*8)) = y } -var __func__27 = *(*[12]int8)(unsafe.Pointer(ts + 5817 /* "percentStep" */)) /* percentile.c:101:79 */ - // Compare to doubles for sorting using qsort() func doubleCmp(tls *crt.TLS, pA uintptr, pB uintptr) int32 { /* percentile.c:170:25: */ var a float64 = *(*float64)(unsafe.Pointer(pA)) @@ -18402,7 +18293,7 @@ func sqlite3_percentile_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi ui _ = pApi _ = pzErrMsg // Unused parameter - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+5829 /* "percentile" */, 2, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4493 /* "percentile" */, 2, (1 | 0x000200000), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) @@ -18410,29 +18301,103 @@ func sqlite3_percentile_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi ui return rc } -// When possible, define assert so that it does not add extra -// parentheses around EXPR. Otherwise, those added parentheses would -// suppress warnings we'd expect to be detected by gcc's -Wparentheses. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. -// Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' -// which contains the name of the function currently being defined. -// This is broken in G++ before version 2.6. -// C9x has a similar variable called __func__, but prefer the GCC one since -// it demangles C++ function names. +// ISO C99 Standard: 7.2 Diagnostics <assert.h> + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// void assert (int expression); +// +// If NDEBUG is defined, do nothing. +// If not, and EXPRESSION is zero, print an error message and abort. + +// void assert_perror (int errnum); +// +// If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an +// error message with the error text for ERRNUM and abort. +// (This is a GNU extension.) // prefixes_vtab is a subclass of sqlite3_vtab which is // underlying representation of the virtual table type prefixes_vtab1 = struct{ Fbase sqlite3_vtab } -// When possible, define assert so that it does not add extra -// parentheses around EXPR. Otherwise, those added parentheses would -// suppress warnings we'd expect to be detected by gcc's -Wparentheses. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.2 Diagnostics <assert.h> -// Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' -// which contains the name of the function currently being defined. -// This is broken in G++ before version 2.6. -// C9x has a similar variable called __func__, but prefer the GCC one since -// it demangles C++ function names. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// void assert (int expression); +// +// If NDEBUG is defined, do nothing. +// If not, and EXPRESSION is zero, print an error message and abort. + +// void assert_perror (int errnum); +// +// If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an +// error message with the error text for ERRNUM and abort. +// (This is a GNU extension.) // prefixes_vtab is a subclass of sqlite3_vtab which is // underlying representation of the virtual table @@ -18470,7 +18435,7 @@ func prefixesConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv ui var rc int32 rc = sqlite3.Xsqlite3_declare_vtab(tls, db, - ts+5840 /* "CREATE TABLE pre..." */) + ts+4504 /* "CREATE TABLE pre..." */) if rc == 0 { pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(prefixes_vtab{}))) *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew @@ -18559,7 +18524,7 @@ func prefixesFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uint var pCur uintptr = pVtabCursor sqlite3.Xsqlite3_free(tls, (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr) if argc > 0 { - (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))))) + (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))))) (*prefixes_cursor)(unsafe.Pointer(pCur)).FnStr = func() int32 { if (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr != 0 { return int32(crt.Xstrlen(tls, (*prefixes_cursor)(unsafe.Pointer(pCur)).FzStr)) @@ -18698,10 +18663,10 @@ func sqlite3_prefixes_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uint var rc int32 = 0 _ = pApi - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+5904 /* "prefixes" */, uintptr(unsafe.Pointer(&prefixesModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+4568 /* "prefixes" */, uintptr(unsafe.Pointer(&prefixesModule)), uintptr(0)) if rc == 0 { rc = sqlite3.Xsqlite3_create_function(tls, - db, ts+5913 /* "prefix_length" */, 2, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + db, ts+4577 /* "prefix_length" */, 2, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{prefixLengthFunc})), uintptr(0), uintptr(0)) } @@ -19259,13 +19224,13 @@ func re_esc_char(tls *crt.TLS, p uintptr) uint32 { /* regexp.c:403:17: */ } (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ } else { - (*ReCompiled)(unsafe.Pointer(p)).FzErr = ts + 5927 /* "unknown \\ escape" */ + (*ReCompiled)(unsafe.Pointer(p)).FzErr = ts + 4591 /* "unknown \\ escape" */ } return uint32(c) } -var zEsc = *(*[21]int8)(unsafe.Pointer(ts + 5944 /* "afnrtv\\()*.+?[$^..." */)) /* regexp.c:404:21 */ -var zTrans = *(*[7]int8)(unsafe.Pointer(ts + 5965 /* "\a\f\n\r\t\v" */)) /* regexp.c:405:21 */ +var zEsc = *(*[21]int8)(unsafe.Pointer(ts + 4608 /* "afnrtv\\()*.+?[$^..." */)) /* regexp.c:404:21 */ +var zTrans = *(*[7]int8)(unsafe.Pointer(ts + 4629 /* "\a\f\n\r\t\v" */)) /* regexp.c:405:21 */ // Peek at the next byte of input func rePeek(tls *crt.TLS, p uintptr) uint8 { /* regexp.c:444:22: */ @@ -19329,7 +19294,7 @@ func re_subcompile_string(tls *crt.TLS, p uintptr) uintptr { /* regexp.c:474:19: return zErr } if int32(rePeek(tls, p)) != ')' { - return ts + 5972 /* "unmatched '('" */ + return ts + 4636 /* "unmatched '('" */ } (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ break @@ -19347,7 +19312,7 @@ func re_subcompile_string(tls *crt.TLS, p uintptr) uintptr { /* regexp.c:474:19: case uint32('*'): { if iPrev < 0 { - return ts + 5986 /* "'*' without oper..." */ + return ts + 4650 /* "'*' without oper..." */ } re_insert(tls, p, iPrev, 5, (int32(((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iPrev)) + uint32(1)))) re_append(tls, p, 4, (int32((uint32(iPrev) - (*ReCompiled)(unsafe.Pointer(p)).FnState) + uint32(1)))) @@ -19356,7 +19321,7 @@ func re_subcompile_string(tls *crt.TLS, p uintptr) uintptr { /* regexp.c:474:19: case uint32('+'): { if iPrev < 0 { - return ts + 6006 /* "'+' without oper..." */ + return ts + 4670 /* "'+' without oper..." */ } re_append(tls, p, 4, (int32(uint32(iPrev) - (*ReCompiled)(unsafe.Pointer(p)).FnState))) break @@ -19364,7 +19329,7 @@ func re_subcompile_string(tls *crt.TLS, p uintptr) uintptr { /* regexp.c:474:19: case uint32('?'): { if iPrev < 0 { - return ts + 6026 /* "'?' without oper..." */ + return ts + 4690 /* "'?' without oper..." */ } re_insert(tls, p, iPrev, 4, (int32(((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iPrev)) + uint32(1)))) break @@ -19376,7 +19341,7 @@ func re_subcompile_string(tls *crt.TLS, p uintptr) uintptr { /* regexp.c:474:19: var sz int32 var j int32 if iPrev < 0 { - return ts + 6046 /* "'{m,n}' without ..." */ + return ts + 4710 /* "'{m,n}' without ..." */ } for ((crt.AssignUint32(&c, uint32(rePeek(tls, p)))) >= uint32('0')) && (c <= uint32('9')) { m = (int32(((uint32(m * 10)) + c) - uint32('0'))) @@ -19392,16 +19357,16 @@ func re_subcompile_string(tls *crt.TLS, p uintptr) uintptr { /* regexp.c:474:19: } } if c != uint32('}') { - return ts + 6070 /* "unmatched '{'" */ + return ts + 4734 /* "unmatched '{'" */ } if (n > 0) && (n < m) { - return ts + 6084 /* "n less than m in..." */ + return ts + 4748 /* "n less than m in..." */ } (*ReCompiled)(unsafe.Pointer(p)).FsIn.Fi++ sz = (int32((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iPrev))) if m == 0 { if n == 0 { - return ts + 6109 /* "both m and n are..." */ + return ts + 4773 /* "both m and n are..." */ } re_insert(tls, p, iPrev, 4, (sz + 1)) n-- @@ -19430,7 +19395,7 @@ func re_subcompile_string(tls *crt.TLS, p uintptr) uintptr { /* regexp.c:474:19: } for (crt.AssignUint32(&c, (*(*func(*crt.TLS, uintptr) uint32)(unsafe.Pointer((p + 40 /* &.xNextChar */))))(tls, (p /* &.sIn */)))) != uint32(0) { if (c == uint32('[')) && (int32(rePeek(tls, p)) == ':') { - return ts + 6142 /* "POSIX character ..." */ + return ts + 4806 /* "POSIX character ..." */ } if c == uint32('\\') { c = re_esc_char(tls, p) @@ -19452,7 +19417,7 @@ func re_subcompile_string(tls *crt.TLS, p uintptr) uintptr { /* regexp.c:474:19: } } if c == uint32(0) { - return ts + 6180 /* "unclosed '['" */ + return ts + 4844 /* "unclosed '['" */ } *(*int32)(unsafe.Pointer((*ReCompiled)(unsafe.Pointer(p)).FaArg + uintptr(iFirst)*4)) = (int32((*ReCompiled)(unsafe.Pointer(p)).FnState - uint32(iFirst))) break @@ -19527,7 +19492,7 @@ func sqlite3re_compile(tls *crt.TLS, ppRe uintptr, zIn uintptr, noCase int32) ui *(*uintptr)(unsafe.Pointer(ppRe)) = uintptr(0) pRe = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(ReCompiled{}))) if pRe == uintptr(0) { - return ts + 2471 /* "out of memory" */ + return ts + 1929 /* "out of memory" */ } crt.Xmemset(tls, pRe, 0, uint64(unsafe.Sizeof(ReCompiled{}))) (*ReCompiled)(unsafe.Pointer(pRe)).FxNextChar = func() uintptr { @@ -19542,7 +19507,7 @@ func sqlite3re_compile(tls *crt.TLS, ppRe uintptr, zIn uintptr, noCase int32) ui }() if re_resize(tls, pRe, 30) != 0 { sqlite3re_free(tls, pRe) - return ts + 2471 /* "out of memory" */ + return ts + 1929 /* "out of memory" */ } if int32(*(*int8)(unsafe.Pointer(zIn + uintptr(0)))) == '^' { zIn++ @@ -19566,7 +19531,7 @@ func sqlite3re_compile(tls *crt.TLS, ppRe uintptr, zIn uintptr, noCase int32) ui *(*uintptr)(unsafe.Pointer(ppRe)) = pRe } else { sqlite3re_free(tls, pRe) - return ts + 6193 /* "unrecognized cha..." */ + return ts + 4857 /* "unrecognized cha..." */ } // The following is a performance optimization. If the regex begins with @@ -19654,22 +19619,436 @@ func sqlite3_regexp_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintpt var rc int32 = 0 _ = pApi - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6216 /* "regexp" */, 2, (1 | 0x000200000), + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4880 /* "regexp" */, 2, (1 | 0x000200000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{re_sql_func})), uintptr(0), uintptr(0)) return rc } -// When possible, define assert so that it does not add extra -// parentheses around EXPR. Otherwise, those added parentheses would -// suppress warnings we'd expect to be detected by gcc's -Wparentheses. +// The following macros redefine the API routines so that they are +// redirected through the global sqlite3_api structure. +// +// This header file is also used by the loadext.c source file +// (part of the main SQLite library - not an extension) so that +// it can get access to the sqlite3_api_routines structure +// definition. But the main library does not want to redefine +// the API. So the redefinition macros are only valid if the +// SQLITE_CORE macros is undefined. -// Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' -// which contains the name of the function currently being defined. -// This is broken in G++ before version 2.6. -// C9x has a similar variable called __func__, but prefer the GCC one since -// it demangles C++ function names. +// This case when the file is being statically linked into the +// application + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.2 Diagnostics <assert.h> + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// These are defined by the user (or the compiler) +// to specify the desired environment: +// +// __STRICT_ANSI__ ISO Standard C. +// _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. +// _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. +// __STDC_WANT_LIB_EXT2__ +// Extensions to ISO C99 from TR 27431-2:2010. +// __STDC_WANT_IEC_60559_BFP_EXT__ +// Extensions to ISO C11 from TS 18661-1:2014. +// __STDC_WANT_IEC_60559_FUNCS_EXT__ +// Extensions to ISO C11 from TS 18661-4:2015. +// __STDC_WANT_IEC_60559_TYPES_EXT__ +// Extensions to ISO C11 from TS 18661-3:2015. +// +// _POSIX_SOURCE IEEE Std 1003.1. +// _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; +// if >=199309L, add IEEE Std 1003.1b-1993; +// if >=199506L, add IEEE Std 1003.1c-1995; +// if >=200112L, all of IEEE 1003.1-2004 +// if >=200809L, all of IEEE 1003.1-2008 +// _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if +// Single Unix conformance is wanted, to 600 for the +// sixth revision, to 700 for the seventh revision. +// _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. +// _LARGEFILE_SOURCE Some more functions for correct standard I/O. +// _LARGEFILE64_SOURCE Additional functionality from LFS for large files. +// _FILE_OFFSET_BITS=N Select default filesystem interface. +// _ATFILE_SOURCE Additional *at interfaces. +// _GNU_SOURCE All of the above, plus GNU extensions. +// _DEFAULT_SOURCE The default set of features (taking precedence over +// __STRICT_ANSI__). +// +// _FORTIFY_SOURCE Add security hardening to many library functions. +// Set to 1 or 2; 2 performs stricter checks than 1. +// +// _REENTRANT, _THREAD_SAFE +// Obsolete; equivalent to _POSIX_C_SOURCE=199506L. +// +// The `-ansi' switch to the GNU C compiler, and standards conformance +// options such as `-std=c99', define __STRICT_ANSI__. If none of +// these are defined, or if _DEFAULT_SOURCE is defined, the default is +// to have _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to +// 200809L, as well as enabling miscellaneous functions from BSD and +// SVID. If more than one of these are defined, they accumulate. For +// example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together +// give you ISO C, 1003.1, and 1003.2, but nothing else. +// +// These are defined by this file and are used by the +// header files to decide what to declare or define: +// +// __GLIBC_USE (F) Define things from feature set F. This is defined +// to 1 or 0; the subsequent macros are either defined +// or undefined, and those tests should be moved to +// __GLIBC_USE. +// __USE_ISOC11 Define ISO C11 things. +// __USE_ISOC99 Define ISO C99 things. +// __USE_ISOC95 Define ISO C90 AMD1 (C95) things. +// __USE_ISOCXX11 Define ISO C++11 things. +// __USE_POSIX Define IEEE Std 1003.1 things. +// __USE_POSIX2 Define IEEE Std 1003.2 things. +// __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. +// __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. +// __USE_XOPEN Define XPG things. +// __USE_XOPEN_EXTENDED Define X/Open Unix things. +// __USE_UNIX98 Define Single Unix V2 things. +// __USE_XOPEN2K Define XPG6 things. +// __USE_XOPEN2KXSI Define XPG6 XSI things. +// __USE_XOPEN2K8 Define XPG7 things. +// __USE_XOPEN2K8XSI Define XPG7 XSI things. +// __USE_LARGEFILE Define correct standard I/O things. +// __USE_LARGEFILE64 Define LFS things with separate names. +// __USE_FILE_OFFSET64 Define 64bit interface as default. +// __USE_MISC Define things from 4.3BSD or System V Unix. +// __USE_ATFILE Define *at interfaces and AT_* constants for them. +// __USE_GNU Define GNU extensions. +// __USE_FORTIFY_LEVEL Additional security measures used, according to level. +// +// The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are +// defined by this file unconditionally. `__GNU_LIBRARY__' is provided +// only for compatibility. All new code should use the other symbols +// to test for features. +// +// All macros listed above as possibly being defined by this file are +// explicitly undefined if they are not explicitly defined. +// Feature-test macros that are not defined by the user or compiler +// but are implied by the other feature-test macros defined (or by the +// lack of any definitions) are defined by the file. +// +// ISO C feature test macros depend on the definition of the macro +// when an affected header is included, not when the first system +// header is included, and so they are handled in +// <bits/libc-header-start.h>, which does not have a multiple include +// guard. Feature test macros that can be handled from the first +// system header included are handled here. + +// Undefine everything, so we get a clean slate. + +// Suppress kernel-name space pollution unless user expressedly asks +// for it. + +// Convenience macro to test the version of gcc. +// Use like this: +// #if __GNUC_PREREQ (2,8) +// ... code requiring gcc 2.8 or later ... +// #endif +// Note: only works for GCC 2.0 and later, because __GNUC_MINOR__ was +// added in 2.0. + +// Similarly for clang. Features added to GCC after version 4.2 may +// or may not also be available in clang, and clang's definitions of +// __GNUC(_MINOR)__ are fixed at 4 and 2 respectively. Not all such +// features can be queried via __has_extension/__has_feature. + +// Whether to use feature set F. + +// _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for +// _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not +// issue a warning; the expectation is that the source is being +// transitioned to use the new macro. + +// If _GNU_SOURCE was defined by the user, turn on all the other features. + +// If nothing (other than _GNU_SOURCE and _DEFAULT_SOURCE) is defined, +// define _DEFAULT_SOURCE. + +// This is to enable the ISO C11 extension. + +// This is to enable the ISO C99 extension. + +// This is to enable the ISO C90 Amendment 1:1995 extension. + +// If none of the ANSI/POSIX macros are defined, or if _DEFAULT_SOURCE +// is defined, use POSIX.1-2008 (or another version depending on +// _XOPEN_SOURCE). + +// Some C libraries once required _REENTRANT and/or _THREAD_SAFE to be +// defined in all multithreaded code. GNU libc has not required this +// for many years. We now treat them as compatibility synonyms for +// _POSIX_C_SOURCE=199506L, which is the earliest level of POSIX with +// comprehensive support for multithreaded code. Using them never +// lowers the selected level of POSIX conformance, only raises it. + +// The function 'gets' existed in C89, but is impossible to use +// safely. It has been removed from ISO C11 and ISO C++14. Note: for +// compatibility with various implementations of <cstdio>, this test +// must consider only the value of __cplusplus when compiling C++. + +// Get definitions of __STDC_* predefined macros, if the compiler has +// not preincluded this header automatically. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// This macro indicates that the installed library is the GNU C Library. +// For historic reasons the value now is 6 and this will stay from now +// on. The use of this variable is deprecated. Use __GLIBC__ and +// __GLIBC_MINOR__ now (see below) when you want to test for a specific +// GNU C library version and use the values in <gnu/lib-names.h> to get +// the sonames of the shared libraries. + +// Major and minor version number of the GNU C library package. Use +// these macros to test for features in specific releases. + +// This is here only because every header file already includes this one. +// Copyright (C) 1992-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// We are almost always included from features.h. + +// The GNU libc does not support any K&R compilers or the traditional mode +// of ISO C compilers anymore. Check for some of the combinations not +// anymore supported. + +// Some user header file might have defined this before. + +// Compilers that are not clang may object to +// #if defined __clang__ && __has_extension(...) +// even though they do not need to evaluate the right-hand side of the &&. + +// These two macros are not used in glibc anymore. They are kept here +// only because some other projects expect the macros to be defined. + +// For these things, GCC behaves the ANSI way normally, +// and the non-ANSI way under -traditional. + +// This is not a typedef so `const __ptr_t' does the right thing. + +// C++ needs to know that types and declarations are C, not C++. + +// Fortify support. + +// Support for flexible arrays. +// Headers that should use flexible arrays only if they're "real" +// (e.g. only if they won't affect sizeof()) should test +// #if __glibc_c99_flexarr_available. + +// __asm__ ("xyz") is used throughout the headers to rename functions +// at the assembly language level. This is wrapped by the __REDIRECT +// macro, in order to support compilers that can do this some other +// way. When compilers don't support asm-names at all, we have to do +// preprocessor tricks instead (which don't have exactly the right +// semantics, but it's the best we can do). +// +// Example: +// int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); + +// GCC has various useful declarations that can be made with the +// `__attribute__' syntax. All of the ways we use this do fine if +// they are omitted for compilers that don't understand it. + +// At some point during the gcc 2.96 development the `malloc' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Tell the compiler which arguments to an allocation function +// indicate the size of the allocation. + +// At some point during the gcc 2.96 development the `pure' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// This declaration tells the compiler that the value is constant. + +// At some point during the gcc 3.1 development the `used' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. + +// Since version 3.2, gcc allows marking deprecated functions. + +// Since version 4.5, gcc also allows one to specify the message printed +// when a deprecated function is used. clang claims to be gcc 4.2, but +// may also support this feature. + +// At some point during the gcc 2.8 development the `format_arg' attribute +// for functions was introduced. We don't want to use it unconditionally +// (although this would be possible) since it generates warnings. +// If several `format_arg' attributes are given for the same function, in +// gcc-3.0 and older, all but the last one are ignored. In newer gccs, +// all designated arguments are considered. + +// At some point during the gcc 2.97 development the `strfmon' format +// attribute for functions was introduced. We don't want to use it +// unconditionally (although this would be possible) since it +// generates warnings. + +// The nonull function attribute allows to mark pointer parameters which +// must not be NULL. + +// If fortification mode, we warn about unused results of certain +// function calls which can lead to problems. + +// Forces a function to be always inlined. + +// Associate error messages with the source location of the call site rather +// than with the source location inside the function. + +// GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 +// inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ +// or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions +// older than 4.3 may define these macros and still not guarantee GNU inlining +// semantics. +// +// clang++ identifies itself as gcc-4.2, but has support for GNU inlining +// semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and +// __GNUC_GNU_INLINE__ macro definitions. + +// GCC 4.3 and above allow passing all anonymous arguments of an +// __extern_always_inline function to some other vararg function. + +// It is possible to compile containing GCC extensions even if GCC is +// run in pedantic mode if the uses are carefully marked using the +// `__extension__' keyword. But this is not generally available before +// version 2.8. + +// __restrict is known in EGCS 1.2 and above. + +// ISO C99 also allows to declare arrays as non-overlapping. The syntax is +// array_name[restrict] +// GCC 3.1 supports this. + +// Determine the wordsize from the preprocessor defines. + +// Both x86-64 and x32 use the 64-bit system call interface. +// Properties of long double type. ldbl-96 version. +// Copyright (C) 2016-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// long double is distinct from double, so there is nothing to +// define here. + +// __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is +// intended for use in preprocessor macros. +// +// Note: MESSAGE must be a _single_ string; concatenation of string +// literals is not supported. + +// Generic selection (ISO C11) is a C-only feature, available in GCC +// since version 4.9. Previous versions do not provide generic +// selection, even though they might set __STDC_VERSION__ to 201112L, +// when in -std=c11 mode. Thus, we must check for !defined __GNUC__ +// when testing __STDC_VERSION__ for generic selection support. +// On the other hand, Clang also defines __GNUC__, so a clang-specific +// check is required to enable the use of generic selection. + +// If we don't have __REDIRECT, prototypes will be missing if +// __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. + +// Decide whether we can define 'extern inline' functions in headers. + +// This is here only because every header file already includes this one. +// Get the definitions of all the appropriate `__stub_FUNCTION' symbols. +// <gnu/stubs.h> contains `#define __stub_FUNCTION' when FUNCTION is a stub +// that will always return failure (and set errno to ENOSYS). +// This file is automatically generated. +// This file selects the right generated file of `__stub_FUNCTION' macros +// based on the architecture being compiled for. + +// This file is automatically generated. +// It defines a symbol `__stub_FUNCTION' for each function +// in the C library which is a stub, meaning it will fail +// every time called, usually setting errno to ENOSYS. + +// void assert (int expression); +// +// If NDEBUG is defined, do nothing. +// If not, and EXPRESSION is zero, print an error message and abort. + +// void assert_perror (int errnum); +// +// If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an +// error message with the error text for ERRNUM and abort. +// (This is a GNU extension.) // remember(V,PTR) // @@ -19678,24 +20057,20 @@ func sqlite3_regexp_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintpt func rememberFunc(tls *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* remember.c:45:13: */ var v sqlite3_int64 var ptr uintptr - if !(argc == 2) { - crt.X__assert_fail(tls, ts+1318 /* "argc==2" */, ts+6223 /* "testdata/sqlite-..." */, uint32(52), uintptr(unsafe.Pointer(&__func__28))) - } + v = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - ptr = sqlite3.Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+3452 /* "carray" */) + ptr = sqlite3.Xsqlite3_value_pointer(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+2713 /* "carray" */) if ptr != 0 { *(*sqlite3_int64)(unsafe.Pointer(ptr)) = v } sqlite3.Xsqlite3_result_int64(tls, pCtx, v) } -var __func__28 = *(*[13]int8)(unsafe.Pointer(ts + 6271 /* "rememberFunc" */)) /* remember.c:49:2 */ - func sqlite3_remember_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* remember.c:62:5: */ var rc int32 = 0 _ = pApi - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6284 /* "remember" */, 2, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+4887 /* "remember" */, 2, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{rememberFunc})), uintptr(0), uintptr(0)) @@ -19738,7 +20113,7 @@ func seriesConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint // Column numbers rc = sqlite3.Xsqlite3_declare_vtab(tls, db, - ts+6293 /* "CREATE TABLE x(v..." */) + ts+4896 /* "CREATE TABLE x(v..." */) if rc == 0 { pNew = crt.AssignPtrUintptr(ppVtab, sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(sqlite3_vtab{})))) if pNew == uintptr(0) { @@ -19926,12 +20301,7 @@ func seriesBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* ser // This implementation assumes that the start, stop, and step columns // are the last three columns in the virtual table. - if !(2 == (1 + 1)) { - crt.X__assert_fail(tls, ts+6352 /* "2 == 1+1" */, ts+6361 /* "testdata/sqlite-..." */, uint32(326), uintptr(unsafe.Pointer(&__func__29))) - } - if !(3 == (1 + 2)) { - crt.X__assert_fail(tls, ts+6407 /* "3 == 1+2" */, ts+6361 /* "testdata/sqlite-..." */, uint32(327), uintptr(unsafe.Pointer(&__func__29))) - } + *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */ + uintptr(0)*4)) = crt.AssignPtrInt32(bp /* &aIdx */ +uintptr(1)*4, crt.AssignPtrInt32(bp /* &aIdx */ +uintptr(2)*4, -1)) pConstraint = (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint i = 0 @@ -19946,9 +20316,7 @@ __1: goto __2 } iCol = ((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).FiColumn - 1) - if !((iCol >= 0) && (iCol <= 2)) { - crt.X__assert_fail(tls, ts+6416 /* "iCol>=0 && iCol<..." */, ts+6361 /* "testdata/sqlite-..." */, uint32(335), uintptr(unsafe.Pointer(&__func__29))) - } + iMask = (int32(1) << iCol) if int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fusable) == 0 { unusableMask = unusableMask | (iMask) @@ -19969,7 +20337,7 @@ __3: for i = 0; i < 3; i++ { if (crt.AssignInt32(&j, *(*int32)(unsafe.Pointer(bp /* &aIdx[0] */ + uintptr(i)*4)))) >= 0 { (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).FargvIndex = crt.PreIncInt32(&nArg, 1) - (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).Fomit = crt.BoolUint8(!(0 != 0)) + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(j)*8)).Fomit = crt.BoolUint8(!(1 != 0)) } } if (unusableMask & ^idxNum) != 0 { @@ -19999,8 +20367,6 @@ __3: return 0 } -var __func__29 = *(*[16]int8)(unsafe.Pointer(ts + 6435 /* "seriesBestIndex" */)) /* series.c:316:2 */ - // This following structure defines all the methods for the // generate_series virtual table. var seriesModule = sqlite3_module{FiVersion: 0, FxCreate: // iVersion @@ -20031,10 +20397,10 @@ func sqlite3_series_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintpt if sqlite3.Xsqlite3_libversion_number(tls) < 3008012 { *(*uintptr)(unsafe.Pointer(pzErrMsg)) = sqlite3.Xsqlite3_mprintf(tls, - ts+6451 /* "generate_series(..." */, 0) + ts+4955 /* "generate_series(..." */, 0) return 1 } - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+6501 /* "generate_series" */, uintptr(unsafe.Pointer(&seriesModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+5005 /* "generate_series" */, uintptr(unsafe.Pointer(&seriesModule)), uintptr(0)) return rc } @@ -20223,7 +20589,7 @@ var initClass = [128]uint8{ // Mapping from the character class number (0-13) to a symbol for each // character class. Note that initClass[] can be used to map the class // symbol back into the class number. -var className = *(*[14]uint8)(unsafe.Pointer(ts + 6517 /* ".ABCDHLRMY9 ?" */)) /* spellfix.c:176:28 */ +var className = *(*[14]uint8)(unsafe.Pointer(ts + 5021 /* ".ABCDHLRMY9 ?" */)) /* spellfix.c:176:28 */ // Generate a "phonetic hash" from a string of ASCII characters // in zIn[0..nIn-1]. @@ -20606,9 +20972,9 @@ func editdistSqlFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { if res == (-3) { sqlite3.Xsqlite3_result_error_nomem(tls, context) } else if res == (-2) { - sqlite3.Xsqlite3_result_error(tls, context, ts+6531 /* "non-ASCII input ..." */, -1) + sqlite3.Xsqlite3_result_error(tls, context, ts+5035 /* "non-ASCII input ..." */, -1) } else { - sqlite3.Xsqlite3_result_error(tls, context, ts+6561 /* "NULL input to ed..." */, -1) + sqlite3.Xsqlite3_result_error(tls, context, ts+5065 /* "NULL input to ed..." */, -1) } } else { sqlite3.Xsqlite3_result_int(tls, context, res) @@ -20803,7 +21169,7 @@ func editDist3ConfigLoad(tls *crt.TLS, p uintptr, db uintptr, zTable uintptr) in var pLang uintptr = uintptr(0) zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+6586 /* "SELECT iLang, cF..." */, crt.VaList(bp, zTable)) + ts+5090 /* "SELECT iLang, cF..." */, crt.VaList(bp, zTable)) if zSql == uintptr(0) { return 7 } @@ -21452,20 +21818,20 @@ func editDist3Install(tls *crt.TLS, db uintptr) int32 { /* spellfix.c:1210:12: * return 7 } crt.Xmemset(tls, pConfig, 0, uint64(unsafe.Sizeof(EditDist3Config{}))) - rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+6658, /* "editdist3" */ + rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+5162, /* "editdist3" */ 2, (1 | 0x000000800), pConfig, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{editDist3SqlFunc})), uintptr(0), uintptr(0), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+6658, /* "editdist3" */ + rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+5162, /* "editdist3" */ 3, (1 | 0x000000800), pConfig, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{editDist3SqlFunc})), uintptr(0), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+6658, /* "editdist3" */ + rc = sqlite3.Xsqlite3_create_function_v2(tls, db, ts+5162, /* "editdist3" */ 1, (1 | 0x000000800), pConfig, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) @@ -22239,7 +22605,7 @@ func spellfix1Uninit(tls *crt.TLS, isDestroy int32, pVTab uintptr) int32 { /* sp *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = 0 if isDestroy != 0 { var db uintptr = (*spellfix1_vtab)(unsafe.Pointer(p)).Fdb - spellfix1DbExec(tls, bp+16 /* &rc */, db, ts+6668, /* "DROP TABLE IF EX..." */ + spellfix1DbExec(tls, bp+16 /* &rc */, db, ts+5172, /* "DROP TABLE IF EX..." */ crt.VaList(bp, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName)) } if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == 0 { @@ -22270,7 +22636,7 @@ func spellfix1Dequote(tls *crt.TLS, zIn uintptr) uintptr { /* spellfix.c:2005:13 for (int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zIn + uintptr(0))))))*2))) & int32(uint16(8192))) != 0 { zIn++ } - zOut = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zIn)) + zOut = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zIn)) if zOut == uintptr(0) { return uintptr(0) } @@ -22321,7 +22687,7 @@ func spellfix1Init(tls *crt.TLS, isCreate int32, db uintptr, pAux uintptr, argc crt.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(spellfix1_vtab{}))) (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzDbName = (pNew + uintptr(1)*64) crt.Xmemcpy(tls, (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzDbName, zDbName, (uint64(nDbName + 1))) - (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zTableName)) + (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zTableName)) (*spellfix1_vtab)(unsafe.Pointer(pNew)).Fdb = db if (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzTableName == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = 7 @@ -22329,27 +22695,27 @@ func spellfix1Init(tls *crt.TLS, isCreate int32, db uintptr, pAux uintptr, argc sqlite3.Xsqlite3_vtab_config(tls, db, 2, 0) *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = sqlite3.Xsqlite3_declare_vtab(tls, db, - ts+6705 /* "CREATE TABLE x(w..." */) + ts+5209 /* "CREATE TABLE x(w..." */) } if (*(*int32)(unsafe.Pointer(bp + 56 /* rc */)) == 0) && (isCreate != 0) { spellfix1DbExec(tls, bp+56 /* &rc */, db, - ts+6859, /* "CREATE TABLE IF ..." */ + ts+5363, /* "CREATE TABLE IF ..." */ crt.VaList(bp+8, zDbName, zTableName)) spellfix1DbExec(tls, bp+56 /* &rc */, db, - ts+6993, /* "CREATE INDEX IF ..." */ + ts+5497, /* "CREATE INDEX IF ..." */ crt.VaList(bp+24, zDbName, zTableName, zTableName)) } for i = 3; (*(*int32)(unsafe.Pointer(bp + 56 /* rc */)) == 0) && (i < argc); i++ { - if (crt.Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), ts+7078 /* "edit_cost_table=" */, uint64(16)) == 0) && ((*spellfix1_vtab)(unsafe.Pointer(pNew)).FzCostTable == uintptr(0)) { + if (crt.Xstrncmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), ts+5582 /* "edit_cost_table=" */, uint64(16)) == 0) && ((*spellfix1_vtab)(unsafe.Pointer(pNew)).FzCostTable == uintptr(0)) { (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzCostTable = spellfix1Dequote(tls, (*(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) + uintptr(16))) if (*spellfix1_vtab)(unsafe.Pointer(pNew)).FzCostTable == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = 7 } continue } - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7095 /* "bad argument to ..." */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+5599 /* "bad argument to ..." */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) *(*int32)(unsafe.Pointer(bp + 56 /* rc */)) = 1 } } @@ -22713,7 +23079,7 @@ func spellfix1RunQuery(tls *crt.TLS, p uintptr, zQuery uintptr, nQuery int32) { continue } - (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(idx)*64)).FzWord = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_column_text(tls, pStmt, 1))) + (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa + uintptr(idx)*64)).FzWord = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_column_text(tls, pStmt, 1))) if (*spellfix1_row)(unsafe.Pointer((*spellfix1_cursor)(unsafe.Pointer(pCur)).Fa+uintptr(idx)*64)).FzWord == uintptr(0) { (*MatchQuery)(unsafe.Pointer(p)).Frc = 7 break @@ -22899,7 +23265,7 @@ __18: ; zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+7129, /* "SELECT id, word,..." */ + ts+5633, /* "SELECT id, word,..." */ crt.VaList(bp, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, iLang)) if !(zSql == uintptr(0)) { goto __19 @@ -22959,13 +23325,13 @@ func spellfix1FilterForFullScan(tls *crt.TLS, pCur uintptr, argc int32, argv uin spellfix1ResetCursor(tls, pCur) zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+7229, /* "SELECT word, ran..." */ + ts+5733, /* "SELECT word, ran..." */ crt.VaList(bp, (*spellfix1_vtab)(unsafe.Pointer(pVTab)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(pVTab)).FzTableName, func() uintptr { if (idxNum & 64) != 0 { - return ts + 7288 /* " WHERE rowid=?" */ + return ts + 5792 /* " WHERE rowid=?" */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }())) if zSql == uintptr(0) { return 7 @@ -23153,7 +23519,7 @@ func spellfix1GetConflict(tls *crt.TLS, db uintptr) uintptr { /* spellfix.c:2828 var azConflict = [5]uintptr{ // Note: Instead of "FAIL" - "ABORT". - ts + 7303 /* "ROLLBACK" */, ts + 7312 /* "IGNORE" */, ts + 7319 /* "ABORT" */, ts + 7319 /* "ABORT" */, ts + 7325, /* "REPLACE" */ + ts + 5807 /* "ROLLBACK" */, ts + 5816 /* "IGNORE" */, ts + 5823 /* "ABORT" */, ts + 5823 /* "ABORT" */, ts + 5829, /* "REPLACE" */ } /* spellfix.c:2829:21 */ // The xUpdate() method. @@ -23171,7 +23537,7 @@ func spellfix1Update(tls *crt.TLS, pVTab uintptr, argc int32, argv uintptr, pRow // A delete operation on the rowid given by argv[0] rowid = crt.AssignPtrInt64(pRowid, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)))) spellfix1DbExec(tls, bp+280 /* &rc */, db, - ts+7333, /* "DELETE FROM \"%w\"..." */ + ts+5837, /* "DELETE FROM \"%w\"..." */ crt.VaList(bp, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, rowid)) } else { var zWord uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr((0+2))*8))) @@ -23192,17 +23558,17 @@ func spellfix1Update(tls *crt.TLS, pVTab uintptr, argc int32, argv uintptr, pRow // what special actions to take var zCmd uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr((11+2))*8))) if zCmd == uintptr(0) { - (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+7376, /* "NOT NULL constra..." */ + (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+5880, /* "NOT NULL constra..." */ crt.VaList(bp+24, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName)) return (19 | (int32(5) << 8)) } - if crt.Xstrcmp(tls, zCmd, ts+7412 /* "reset" */) == 0 { + if crt.Xstrcmp(tls, zCmd, ts+5916 /* "reset" */) == 0 { // Reset the edit cost table (if there is one). editDist3ConfigDelete(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3) (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 = uintptr(0) return 0 } - if crt.Xstrncmp(tls, zCmd, ts+7078 /* "edit_cost_table=" */, uint64(16)) == 0 { + if crt.Xstrncmp(tls, zCmd, ts+5582 /* "edit_cost_table=" */, uint64(16)) == 0 { editDist3ConfigDelete(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3) (*spellfix1_vtab)(unsafe.Pointer(p)).FpConfig3 = uintptr(0) sqlite3.Xsqlite3_free(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable) @@ -23210,13 +23576,13 @@ func spellfix1Update(tls *crt.TLS, pVTab uintptr, argc int32, argv uintptr, pRow if (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable == uintptr(0) { return 7 } - if (int32(*(*int8)(unsafe.Pointer((*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable + uintptr(0)))) == 0) || (sqlite3.Xsqlite3_stricmp(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable, ts+7418 /* "null" */) == 0) { + if (int32(*(*int8)(unsafe.Pointer((*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable + uintptr(0)))) == 0) || (sqlite3.Xsqlite3_stricmp(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable, ts+5922 /* "null" */) == 0) { sqlite3.Xsqlite3_free(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable) (*spellfix1_vtab)(unsafe.Pointer(p)).FzCostTable = uintptr(0) } return 0 } - (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+7423, /* "unknown value fo..." */ + (*sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+5927, /* "unknown value fo..." */ crt.VaList(bp+32, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, zCmd)) return 1 } @@ -23245,14 +23611,14 @@ func spellfix1Update(tls *crt.TLS, pVTab uintptr, argc int32, argv uintptr, pRow if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) == 5 { spellfix1DbExec(tls, bp+280 /* &rc */, db, - ts+7458, /* "INSERT INTO \"%w\"..." */ + ts+5962, /* "INSERT INTO \"%w\"..." */ crt.VaList(bp+48, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, iRank, iLang, zWord, zK1, zWord, zK2)) } else { newRowid = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) spellfix1DbExec(tls, bp+280 /* &rc */, db, - ts+7544, /* "INSERT OR %s INT..." */ + ts+6048, /* "INSERT OR %s INT..." */ crt.VaList(bp+112, zConflict, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, newRowid, iRank, iLang, zWord, zK1, zWord, zK2)) } @@ -23262,7 +23628,7 @@ func spellfix1Update(tls *crt.TLS, pVTab uintptr, argc int32, argv uintptr, pRow newRowid = crt.AssignPtrInt64(pRowid, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)))) spellfix1DbExec(tls, bp+280 /* &rc */, db, - ts+7644, /* "UPDATE OR %s \"%w..." */ + ts+6148, /* "UPDATE OR %s \"%w..." */ crt.VaList(bp+192, zConflict, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, newRowid, iRank, iLang, zWord, zK1, zWord, zK2, rowid)) } @@ -23280,12 +23646,12 @@ func spellfix1Rename(tls *crt.TLS, pVTab uintptr, zNew uintptr) int32 { /* spell var p uintptr = pVTab var db uintptr = (*spellfix1_vtab)(unsafe.Pointer(p)).Fdb *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = 0 - var zNewName uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zNew)) + var zNewName uintptr = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zNew)) if zNewName == uintptr(0) { return 7 } spellfix1DbExec(tls, bp+32 /* &rc */, db, - ts+7753, /* "ALTER TABLE \"%w\"..." */ + ts+6257, /* "ALTER TABLE \"%w\"..." */ crt.VaList(bp+8, (*spellfix1_vtab)(unsafe.Pointer(p)).FzDbName, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName, zNewName)) if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == 0 { sqlite3.Xsqlite3_free(tls, (*spellfix1_vtab)(unsafe.Pointer(p)).FzTableName) @@ -23323,34 +23689,34 @@ uintptr(0), FxRename:// xFindMethod func spellfix1Register(tls *crt.TLS, db uintptr) int32 { /* spellfix.c:3017:12: */ var rc int32 = 0 var i int32 - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7802 /* "spellfix1_transl..." */, 1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6306 /* "spellfix1_transl..." */, 1, (1 | 0x000000800), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{transliterateSqlFunc})), uintptr(0), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7821 /* "spellfix1_editdi..." */, 2, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6325 /* "spellfix1_editdi..." */, 2, (1 | 0x000000800), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{editdistSqlFunc})), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7840 /* "spellfix1_phoneh..." */, 1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6344 /* "spellfix1_phoneh..." */, 1, (1 | 0x000000800), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{phoneticHashSqlFunc})), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7860 /* "spellfix1_script..." */, 1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6364 /* "spellfix1_script..." */, 1, (1 | 0x000000800), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{scriptCodeSqlFunc})), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+7881 /* "spellfix1" */, uintptr(unsafe.Pointer(&spellfix1Module)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+6385 /* "spellfix1" */, uintptr(unsafe.Pointer(&spellfix1Module)), uintptr(0)) } if rc == 0 { rc = editDist3Install(tls, db) @@ -23404,7 +23770,7 @@ func totypeCompare2pow63(tls *crt.TLS, zNum uintptr) int32 { /* totype.c:95:12: var c int32 = 0 var i int32 // 012345678901234567 - var pow63 uintptr = ts + 7891 /* "9223372036854775..." */ + var pow63 uintptr = ts + 6395 /* "9223372036854775..." */ for i = 0; (c == 0) && (i < 18); i++ { c = ((int32(*(*int8)(unsafe.Pointer(zNum + uintptr(i)))) - int32(*(*int8)(unsafe.Pointer(pow63 + uintptr(i))))) * 10) } @@ -23468,18 +23834,14 @@ func totypeAtoi64(tls *crt.TLS, zNum uintptr, pNum uintptr, length int32) int32 return 1 } else if i < 19 { // Less than 19 digits, so we know that it fits in 64 bits - if !(u <= (uint64(int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)))) { - crt.X__assert_fail(tls, ts+7910 /* "u<=(0xffffffff|(..." */, ts+7960 /* "testdata/sqlite-..." */, uint32(161), uintptr(unsafe.Pointer(&__func__30))) - } + return 0 } else { // zNum is a 19-digit numbers. Compare it against 9223372036854775808. c = totypeCompare2pow63(tls, zNum) if c < 0 { // zNum is less than 9223372036854775808 so it fits - if !(u <= (uint64(int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)))) { - crt.X__assert_fail(tls, ts+7910 /* "u<=(0xffffffff|(..." */, ts+7960 /* "testdata/sqlite-..." */, uint32(168), uintptr(unsafe.Pointer(&__func__30))) - } + return 0 } else if c > 0 { // zNum is greater than 9223372036854775808 so it overflows @@ -23487,12 +23849,7 @@ func totypeAtoi64(tls *crt.TLS, zNum uintptr, pNum uintptr, length int32) int32 } else { // zNum is exactly 9223372036854775808. Fits if negative. The // special case 2 overflow if positive - if !((u - uint64(1)) == (uint64(int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)))) { - crt.X__assert_fail(tls, ts+8006 /* "u-1==(0xffffffff..." */, ts+7960 /* "testdata/sqlite-..." */, uint32(176), uintptr(unsafe.Pointer(&__func__30))) - } - if !((*(*sqlite3_int64)(unsafe.Pointer(pNum))) == ((int64(-1)) - (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)))) { - crt.X__assert_fail(tls, ts+8058 /* "(*pNum)==(((sqli..." */, ts+7960 /* "testdata/sqlite-..." */, uint32(177), uintptr(unsafe.Pointer(&__func__30))) - } + if neg != 0 { return 0 } @@ -23502,8 +23859,6 @@ func totypeAtoi64(tls *crt.TLS, zNum uintptr, pNum uintptr, length int32) int32 return int32(0) } -var __func__30 = *(*[13]int8)(unsafe.Pointer(ts + 8138 /* "totypeAtoi64" */)) /* totype.c:125:75 */ - // The string z[] is an text representation of a real number. // Convert this string to a double and write it into *pResult. // @@ -23883,9 +24238,6 @@ func tointegerFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* bp := tls.Alloc(24) defer tls.Free(24) - if !(argc == 1) { - crt.X__assert_fail(tls, ts+8151 /* "argc==1" */, ts+7960 /* "testdata/sqlite-..." */, uint32(363), uintptr(unsafe.Pointer(&__func__31))) - } _ = argc switch sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) { case 2: @@ -23943,16 +24295,12 @@ func tointegerFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* } default: { - if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) == 5) { - crt.X__assert_fail(tls, ts+8159 /* "sqlite3_value_ty..." */, ts+7960 /* "testdata/sqlite-..." */, uint32(413), uintptr(unsafe.Pointer(&__func__31))) - } + break } } } -var __func__31 = *(*[14]int8)(unsafe.Pointer(ts + 8190 /* "tointegerFunc" */)) /* totype.c:362:2 */ - // toreal(X): If X is any value (integer, double, blob, or string) that can // be losslessly converted into a real number, then do so and return that // real number. Otherwise return NULL. @@ -23960,9 +24308,6 @@ func torealFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* to bp := tls.Alloc(24) defer tls.Free(24) - if !(argc == 1) { - crt.X__assert_fail(tls, ts+8151 /* "argc==1" */, ts+7960 /* "testdata/sqlite-..." */, uint32(433), uintptr(unsafe.Pointer(&__func__32))) - } _ = argc switch sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) { case 2: @@ -24021,28 +24366,24 @@ func torealFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* to } default: { - if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) == 5) { - crt.X__assert_fail(tls, ts+8159 /* "sqlite3_value_ty..." */, ts+7960 /* "testdata/sqlite-..." */, uint32(484), uintptr(unsafe.Pointer(&__func__32))) - } + break } } } -var __func__32 = *(*[11]int8)(unsafe.Pointer(ts + 8204 /* "torealFunc" */)) /* totype.c:432:2 */ - func sqlite3_totype_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* totype.c:497:5: */ var rc int32 = 0 _ = pApi _ = pzErrMsg // Unused parameter - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+8215 /* "tointeger" */, 1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6414 /* "tointeger" */, 1, ((1 | 0x000000800) | 0x000200000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tointegerFunc})), uintptr(0), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+8225 /* "toreal" */, 1, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+6424 /* "toreal" */, 1, ((1 | 0x000000800) | 0x000200000), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) @@ -24163,9 +24504,7 @@ type UnionSrc = UnionSrc1 /* unionvtab.c:183:25 */ // SQLITE_NOMEM. func unionMalloc(tls *crt.TLS, pRc uintptr, nByte sqlite3_int64) uintptr { /* unionvtab.c:253:13: */ var pRet uintptr - if !(nByte > int64(0)) { - crt.X__assert_fail(tls, ts+63 /* "nByte>0" */, ts+8232 /* "testdata/sqlite-..." */, uint32(255), uintptr(unsafe.Pointer(&__func__33))) - } + if *(*int32)(unsafe.Pointer(pRc)) == 0 { pRet = sqlite3.Xsqlite3_malloc64(tls, uint64(nByte)) if pRet != 0 { @@ -24179,8 +24518,6 @@ func unionMalloc(tls *crt.TLS, pRc uintptr, nByte sqlite3_int64) uintptr { /* un return pRet } -var __func__33 = *(*[12]int8)(unsafe.Pointer(ts + 8281 /* "unionMalloc" */)) /* unionvtab.c:253:56 */ - // If *pRc is other than SQLITE_OK when this function is called, it // always returns NULL. Otherwise, it attempts to allocate and return // a copy of the nul-terminated string passed as the second argument. @@ -24216,17 +24553,7 @@ func unionDequote(tls *crt.TLS, z uintptr) { /* unionvtab.c:297:13: */ if int32(q) == '[' { q = int8(']') } - for func() int32 { - if *(*int8)(unsafe.Pointer(z + uintptr(iIn))) != 0 { - return 1 - } - return func() int32 { - if !(0 != 0) { - crt.X__assert_fail(tls, ts+8293 /* "0" */, ts+8232 /* "testdata/sqlite-..." */, uint32(306), uintptr(unsafe.Pointer(&__func__34))) - } - return 0 - }() - }() != 0 { + for *(*int8)(unsafe.Pointer(z + uintptr(iIn))) != 0 { if int32(*(*int8)(unsafe.Pointer(z + uintptr(iIn)))) == int32(q) { if int32(*(*int8)(unsafe.Pointer(z + uintptr((iIn + 1))))) != int32(q) { // Character iIn was the close quote. @@ -24248,8 +24575,6 @@ func unionDequote(tls *crt.TLS, z uintptr) { /* unionvtab.c:297:13: */ } } -var __func__34 = *(*[13]int8)(unsafe.Pointer(ts + 8295 /* "unionDequote" */)) /* unionvtab.c:297:34 */ - // This function is a no-op if *pRc is set to other than SQLITE_OK when it // is called. NULL is returned in this case. // @@ -24266,21 +24591,17 @@ func unionPrepare(tls *crt.TLS, pRc uintptr, db uintptr, zSql uintptr, pzErr uin defer tls.Free(16) *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) = uintptr(0) - if !(pzErr != 0) { - crt.X__assert_fail(tls, ts+8308 /* "pzErr" */, ts+8232 /* "testdata/sqlite-..." */, uint32(348), uintptr(unsafe.Pointer(&__func__35))) - } + if *(*int32)(unsafe.Pointer(pRc)) == 0 { var rc int32 = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8 /* &pRet */, uintptr(0)) if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8314 /* "sql error: %s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6431 /* "sql error: %s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) *(*int32)(unsafe.Pointer(pRc)) = rc } } return *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) } -var __func__35 = *(*[13]int8)(unsafe.Pointer(ts + 8328 /* "unionPrepare" */)) /* unionvtab.c:346:2 */ - // Like unionPrepare(), except prepare the results of vprintf(zFmt, ...) // instead of a constant SQL string. func unionPreparePrintf(tls *crt.TLS, pRc uintptr, pzErr uintptr, db uintptr, zFmt uintptr, va uintptr) uintptr { /* unionvtab.c:363:21: */ @@ -24322,7 +24643,7 @@ func unionFinalize(tls *crt.TLS, pRc uintptr, pStmt uintptr, pzErr uintptr) { /* if *(*int32)(unsafe.Pointer(pRc)) == 0 { *(*int32)(unsafe.Pointer(pRc)) = rc if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) } } } @@ -24349,7 +24670,7 @@ func unionInvokeOpenClose(tls *crt.TLS, pTab uintptr, pSrc uintptr, bClose int32 sqlite3.Xsqlite3_step(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose) if 0 != (crt.AssignInt32(&rc, sqlite3.Xsqlite3_reset(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose))) { if pzErr != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, (*UnionTab)(unsafe.Pointer(pTab)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, (*UnionTab)(unsafe.Pointer(pTab)).Fdb))) } } } @@ -24366,9 +24687,7 @@ func unionCloseSources(tls *crt.TLS, pTab uintptr, nMax int32) { /* unionvtab.c: for pp = (pTab + 88 /* &.pClosable */); (*UnionSrc)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNextClosable != 0; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 64 /* &.pNextClosable */) { } p = *(*uintptr)(unsafe.Pointer(pp)) - if !((*UnionSrc)(unsafe.Pointer(p)).Fdb != 0) { - crt.X__assert_fail(tls, ts+8341 /* "p->db" */, ts+8232 /* "testdata/sqlite-..." */, uint32(469), uintptr(unsafe.Pointer(&__func__36))) - } + sqlite3.Xsqlite3_close(tls, (*UnionSrc)(unsafe.Pointer(p)).Fdb) (*UnionSrc)(unsafe.Pointer(p)).Fdb = uintptr(0) *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) @@ -24377,8 +24696,6 @@ func unionCloseSources(tls *crt.TLS, pTab uintptr, nMax int32) { /* unionvtab.c: } } -var __func__36 = *(*[18]int8)(unsafe.Pointer(ts + 8347 /* "unionCloseSource..." */)) /* unionvtab.c:463:56 */ - // xDisconnect method. func unionDisconnect(tls *crt.TLS, pVtab uintptr) int32 { /* unionvtab.c:481:12: */ if pVtab != 0 { @@ -24418,23 +24735,23 @@ func unionIsIntkeyTable(tls *crt.TLS, db uintptr, pSrc uintptr, pzErr uintptr) i var rc int32 sqlite3.Xsqlite3_table_column_metadata(tls, - db, (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, ts+8365 /* "_rowid_" */, bp+24 /* &zType */, uintptr(0), uintptr(0), bp+32 /* &bPk */, uintptr(0)) + db, (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, ts+6445 /* "_rowid_" */, bp+24 /* &zType */, uintptr(0), uintptr(0), bp+32 /* &bPk */, uintptr(0)) rc = sqlite3.Xsqlite3_errcode(tls, db) if (rc == 1) || - ((rc == 0) && (!(*(*int32)(unsafe.Pointer(bp + 32 /* bPk */)) != 0) || (sqlite3.Xsqlite3_stricmp(tls, ts+8373 /* "integer" */, *(*uintptr)(unsafe.Pointer(bp + 24 /* zType */))) != 0))) { + ((rc == 0) && (!(*(*int32)(unsafe.Pointer(bp + 32 /* bPk */)) != 0) || (sqlite3.Xsqlite3_stricmp(tls, ts+6453 /* "integer" */, *(*uintptr)(unsafe.Pointer(bp + 24 /* zType */))) != 0))) { rc = 1 - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8381, /* "no such rowid ta..." */ + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6461, /* "no such rowid ta..." */ crt.VaList(bp, func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { return (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { - return ts + 8409 /* "." */ + return ts + 6489 /* "." */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab)) } @@ -24471,7 +24788,7 @@ func unionSourceToStr(tls *crt.TLS, pRc uintptr, pTab uintptr, pSrc uintptr, pzE *(*int32)(unsafe.Pointer(bp /* rc */)) = unionIsIntkeyTable(tls, db, pSrc, pzErr) var pStmt uintptr = unionPrepare(tls, bp /* &rc */, db, - ts+8411 /* "SELECT group_con..." */, pzErr) + ts+6491 /* "SELECT group_con..." */, pzErr) if *(*int32)(unsafe.Pointer(bp /* rc */)) == 0 { sqlite3.Xsqlite3_bind_text(tls, pStmt, 1, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, -1, uintptr(0)) sqlite3.Xsqlite3_bind_text(tls, pStmt, 2, (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb, -1, uintptr(0)) @@ -24501,14 +24818,11 @@ func unionSourceCheck(tls *crt.TLS, pTab uintptr, pzErr uintptr) int32 { /* unio var z0 uintptr = uintptr(0) var i int32 - if !(*(*uintptr)(unsafe.Pointer(pzErr)) == uintptr(0)) { - crt.X__assert_fail(tls, ts+8495 /* "*pzErr==0" */, ts+8232 /* "testdata/sqlite-..." */, uint32(597), uintptr(unsafe.Pointer(&__func__37))) - } z0 = unionSourceToStr(tls, bp /* &rc */, pTab, ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(0)*72), pzErr) for i = 1; i < (*UnionTab)(unsafe.Pointer(pTab)).FnSrc; i++ { var z uintptr = unionSourceToStr(tls, bp /* &rc */, pTab, ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(i)*72), pzErr) if (*(*int32)(unsafe.Pointer(bp /* rc */)) == 0) && (sqlite3.Xsqlite3_stricmp(tls, z, z0) != 0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8505 /* "source table sch..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6575 /* "source table sch..." */, 0) *(*int32)(unsafe.Pointer(bp /* rc */)) = 1 } sqlite3.Xsqlite3_free(tls, z) @@ -24518,8 +24832,6 @@ func unionSourceCheck(tls *crt.TLS, pTab uintptr, pzErr uintptr) int32 { /* unio return *(*int32)(unsafe.Pointer(bp /* rc */)) } -var __func__37 = *(*[17]int8)(unsafe.Pointer(ts + 8534 /* "unionSourceCheck" */)) /* unionvtab.c:592:58 */ - // Try to open the swarmvtab database. If initially unable, invoke the // not-found callback UDF and then try again. func unionOpenDatabaseInner(tls *crt.TLS, pTab uintptr, pSrc uintptr, pzErr uintptr) int32 { /* unionvtab.c:616:12: */ @@ -24546,13 +24858,13 @@ func unionOpenDatabaseInner(tls *crt.TLS, pTab uintptr, pSrc uintptr, pzErr uint } sqlite3.Xsqlite3_step(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound) if 0 != (crt.AssignInt32(&rc, sqlite3.Xsqlite3_reset(tls, (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound))) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, (*UnionTab)(unsafe.Pointer(pTab)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, (*UnionTab)(unsafe.Pointer(pTab)).Fdb))) return rc } rc = sqlite3.Xsqlite3_open_v2(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).FzFile, (pSrc + 56 /* &.db */), openFlags, uintptr(0)) } if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, sqlite3.Xsqlite3_errmsg(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, sqlite3.Xsqlite3_errmsg(tls, (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb))) } return rc } @@ -24579,9 +24891,6 @@ func unionOpenDatabase(tls *crt.TLS, pTab uintptr, iSrc int32, pzErr uintptr) in *(*int32)(unsafe.Pointer(bp /* rc */)) = 0 var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(iSrc)*72) - if !(((*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0) && (iSrc < (*UnionTab)(unsafe.Pointer(pTab)).FnSrc)) { - crt.X__assert_fail(tls, ts+8551 /* "pTab->bSwarm && ..." */, ts+8232 /* "testdata/sqlite-..." */, uint32(664), uintptr(unsafe.Pointer(&__func__38))) - } if (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb == uintptr(0) { unionCloseSources(tls, pTab, ((*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen - 1)) *(*int32)(unsafe.Pointer(bp /* rc */)) = unionOpenDatabaseInner(tls, pTab, pSrc, pzErr) @@ -24592,7 +24901,7 @@ func unionOpenDatabase(tls *crt.TLS, pTab uintptr, iSrc int32, pzErr uintptr) in (*UnionTab)(unsafe.Pointer(pTab)).FzSourceStr = z } else { if sqlite3.Xsqlite3_stricmp(tls, z, (*UnionTab)(unsafe.Pointer(pTab)).FzSourceStr) != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8505 /* "source table sch..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6575 /* "source table sch..." */, 0) *(*int32)(unsafe.Pointer(bp /* rc */)) = 1 } sqlite3.Xsqlite3_free(tls, z) @@ -24614,8 +24923,6 @@ func unionOpenDatabase(tls *crt.TLS, pTab uintptr, iSrc int32, pzErr uintptr) in return *(*int32)(unsafe.Pointer(bp /* rc */)) } -var __func__38 = *(*[18]int8)(unsafe.Pointer(ts + 8583 /* "unionOpenDatabas..." */)) /* unionvtab.c:660:69 */ - // This function is a no-op for unionvtab tables. For swarmvtab, increment // the reference count for source table iTab. If the reference count was // zero before it was incremented, also remove the source from the closable @@ -24623,9 +24930,7 @@ var __func__38 = *(*[18]int8)(unsafe.Pointer(ts + 8583 /* "unionOpenDatabas..." func unionIncrRefcount(tls *crt.TLS, pTab uintptr, iTab int32) { /* unionvtab.c:704:13: */ if (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0 { var pSrc uintptr = ((*UnionTab)(unsafe.Pointer(pTab)).FaSrc + uintptr(iTab)*72) - if !(((*UnionSrc)(unsafe.Pointer(pSrc)).FnUser >= 0) && ((*UnionSrc)(unsafe.Pointer(pSrc)).Fdb != 0)) { - crt.X__assert_fail(tls, ts+8601 /* "pSrc->nUser>=0 &..." */, ts+8232 /* "testdata/sqlite-..." */, uint32(707), uintptr(unsafe.Pointer(&__func__39))) - } + if (*UnionSrc)(unsafe.Pointer(pSrc)).FnUser == 0 { var pp uintptr for pp = (pTab + 88 /* &.pClosable */); *(*uintptr)(unsafe.Pointer(pp)) != pSrc; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 64 /* &.pNextClosable */) { @@ -24637,8 +24942,6 @@ func unionIncrRefcount(tls *crt.TLS, pTab uintptr, iTab int32) { /* unionvtab.c: } } -var __func__39 = *(*[18]int8)(unsafe.Pointer(ts + 8628 /* "unionIncrRefcoun..." */)) /* unionvtab.c:704:56 */ - // Finalize the SQL statement pCsr->pStmt and return the result. // // If this is a swarmvtab table (not unionvtab) and pCsr->pStmt was not @@ -24654,9 +24957,7 @@ func unionFinalizeCsrStmt(tls *crt.TLS, pCsr uintptr) int32 { /* unionvtab.c:726 (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt = uintptr(0) if (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm != 0 { (*UnionSrc)(unsafe.Pointer(pSrc)).FnUser-- - if !((*UnionSrc)(unsafe.Pointer(pSrc)).FnUser >= 0) { - crt.X__assert_fail(tls, ts+8646 /* "pSrc->nUser>=0" */, ts+8232 /* "testdata/sqlite-..." */, uint32(735), uintptr(unsafe.Pointer(&__func__40))) - } + if (*UnionSrc)(unsafe.Pointer(pSrc)).FnUser == 0 { (*UnionSrc)(unsafe.Pointer(pSrc)).FpNextClosable = (*UnionTab)(unsafe.Pointer(pTab)).FpClosable (*UnionTab)(unsafe.Pointer(pTab)).FpClosable = pSrc @@ -24667,8 +24968,6 @@ func unionFinalizeCsrStmt(tls *crt.TLS, pCsr uintptr) int32 { /* unionvtab.c:726 return rc } -var __func__40 = *(*[21]int8)(unsafe.Pointer(ts + 8661 /* "unionFinalizeCsr..." */)) /* unionvtab.c:726:48 */ - // Return true if the argument is a space, tab, CR or LF character. func union_isspace(tls *crt.TLS, c int8) int32 { /* unionvtab.c:749:12: */ return (crt.Bool32((((int32(c) == ' ') || (int32(c) == '\n')) || (int32(c) == '\r')) || (int32(c) == '\t'))) @@ -24741,47 +25040,47 @@ func unionConfigureVtab(tls *crt.TLS, pRc uintptr, pTab uintptr, pStmt uintptr, var iParam int32 = sqlite3.Xsqlite3_bind_parameter_index(tls, pStmt, zOpt) if iParam == 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, - ts+8682 /* "swarmvtab: no su..." */, crt.VaList(bp, zOpt)) + ts+6604 /* "swarmvtab: no su..." */, crt.VaList(bp, zOpt)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = 1 } else { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = sqlite3.Xsqlite3_bind_text(tls, pStmt, iParam, zVal, -1, crt.UintptrFromInt32(-1)) } - } else if (nOpt == 7) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+8719 /* "maxopen" */, 7)) { + } else if (nOpt == 7) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+6641 /* "maxopen" */, 7)) { (*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen = crt.Xatoi(tls, zVal) if (*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen <= 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8727 /* "swarmvtab: illeg..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6649 /* "swarmvtab: illeg..." */, 0) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = 1 } - } else if (nOpt == 7) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+8760 /* "missing" */, 7)) { + } else if (nOpt == 7) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+6682 /* "missing" */, 7)) { if (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, - ts+8768 /* "swarmvtab: dupli..." */, 0) + ts+6690 /* "swarmvtab: dupli..." */, 0) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = 1 } else { (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound = unionPreparePrintf(tls, bp+64 /* &rc */, pzErr, (*UnionTab)(unsafe.Pointer(pTab)).Fdb, - ts+8806 /* "SELECT \"%w\"(?%s)" */, crt.VaList(bp+8, zVal, func() uintptr { + ts+6728 /* "SELECT \"%w\"(?%s)" */, crt.VaList(bp+8, zVal, func() uintptr { if (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext != 0 { - return ts + 8823 /* ",?" */ + return ts + 6745 /* ",?" */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }())) } - } else if (nOpt == 9) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+8826 /* "openclose" */, 9)) { + } else if (nOpt == 9) && (0 == sqlite3.Xsqlite3_strnicmp(tls, zOpt, ts+6748 /* "openclose" */, 9)) { if (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, - ts+8836 /* "swarmvtab: dupli..." */, 0) + ts+6758 /* "swarmvtab: dupli..." */, 0) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = 1 } else { (*UnionTab)(unsafe.Pointer(pTab)).FpOpenClose = unionPreparePrintf(tls, bp+64 /* &rc */, pzErr, (*UnionTab)(unsafe.Pointer(pTab)).Fdb, - ts+8876 /* "SELECT \"%w\"(?,?%..." */, crt.VaList(bp+24, zVal, func() uintptr { + ts+6798 /* "SELECT \"%w\"(?,?%..." */, crt.VaList(bp+24, zVal, func() uintptr { if (*UnionTab)(unsafe.Pointer(pTab)).FbHasContext != 0 { - return ts + 8823 /* ",?" */ + return ts + 6745 /* ",?" */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }())) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8895 /* "swarmvtab: unrec..." */, crt.VaList(bp+40, zOpt)) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6817 /* "swarmvtab: unrec..." */, crt.VaList(bp+40, zOpt)) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = 1 } sqlite3.Xsqlite3_free(tls, zVal) @@ -24789,9 +25088,9 @@ func unionConfigureVtab(tls *crt.TLS, pRc uintptr, pTab uintptr, pStmt uintptr, } else { if (i == 0) && (nArg == 1) { (*UnionTab)(unsafe.Pointer(pTab)).FpNotFound = unionPreparePrintf(tls, bp+64 /* &rc */, pzErr, (*UnionTab)(unsafe.Pointer(pTab)).Fdb, - ts+8930 /* "SELECT \"%w\"(?)" */, crt.VaList(bp+48, zArg)) + ts+6852 /* "SELECT \"%w\"(?)" */, crt.VaList(bp+48, zArg)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8945 /* "swarmvtab: parse..." */, crt.VaList(bp+56, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6867 /* "swarmvtab: parse..." */, crt.VaList(bp+56, *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)))) *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = 1 } } @@ -24824,17 +25123,17 @@ func unionConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintp }() var zVtab uintptr = func() uintptr { if bSwarm != 0 { - return ts + 8972 /* "swarmvtab" */ + return ts + 6894 /* "swarmvtab" */ } - return ts + 8982 /* "unionvtab" */ + return ts + 6904 /* "unionvtab" */ }() - if sqlite3.Xsqlite3_stricmp(tls, ts+8992 /* "temp" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) != 0 { + if sqlite3.Xsqlite3_stricmp(tls, ts+6914 /* "temp" */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) != 0 { // unionvtab tables may only be created in the temp schema - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+8997 /* "%s tables must b..." */, crt.VaList(bp, zVtab)) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6919 /* "%s tables must b..." */, crt.VaList(bp, zVtab)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = 1 } else if (argc < 4) || ((argc > 4) && (bSwarm == 0)) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9038 /* "wrong number of ..." */, crt.VaList(bp+8, zVtab)) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+6960 /* "wrong number of ..." */, crt.VaList(bp+8, zVtab)) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = 1 } else { var nAlloc int32 = 0 // Allocated size of pTab->aSrc[] @@ -24847,14 +25146,12 @@ func unionConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintp // and that the UnionTab.aSrc[] array is always sorted by rowid. unionDequote(tls, zArg) pStmt = unionPreparePrintf(tls, bp+40 /* &rc */, pzErr, db, - ts+9071 /* "SELECT * FROM (%..." */, crt.VaList(bp+16, zArg)) + ts+6993 /* "SELECT * FROM (%..." */, crt.VaList(bp+16, zArg)) // Allocate the UnionTab structure pTab = unionMalloc(tls, bp+40 /* &rc */, int64(unsafe.Sizeof(UnionTab{}))) if pTab != 0 { - if !(*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == 0) { - crt.X__assert_fail(tls, ts+9101 /* "rc==0" */, ts+8232 /* "testdata/sqlite-..." */, uint32(919), uintptr(unsafe.Pointer(&__func__41))) - } + (*UnionTab)(unsafe.Pointer(pTab)).Fdb = db (*UnionTab)(unsafe.Pointer(pTab)).FbSwarm = bSwarm (*UnionTab)(unsafe.Pointer(pTab)).FnMaxOpen = 9 @@ -24896,7 +25193,7 @@ func unionConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintp // Check for problems with the specified range of rowids if (iMax < iMin) || (((*UnionTab)(unsafe.Pointer(pTab)).FnSrc > 0) && (iMin <= (*UnionSrc)(unsafe.Pointer((*UnionTab)(unsafe.Pointer(pTab)).FaSrc+uintptr(((*UnionTab)(unsafe.Pointer(pTab)).FnSrc-1))*72)).FiMax)) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9107 /* "rowid range mism..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7023 /* "rowid range mism..." */, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = 1 } @@ -24923,7 +25220,7 @@ func unionConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintp // because there is no way to determine the schema of the virtual // table in this case. if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == 0) && ((*UnionTab)(unsafe.Pointer(pTab)).FnSrc == 0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+9134 /* "no source tables..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7050 /* "no source tables..." */, 0) *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = 1 } @@ -24949,7 +25246,7 @@ func unionConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintp }() pStmt = unionPreparePrintf(tls, bp+40 /* &rc */, pzErr, tdb, - ts+9162, /* "SELECT 'CREATE T..." */ + ts+7078, /* "SELECT 'CREATE T..." */ crt.VaList(bp+24, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb)) } if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == 0) && (100 == sqlite3.Xsqlite3_step(tls, pStmt)) { @@ -24970,8 +25267,6 @@ func unionConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintp return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } -var __func__41 = *(*[13]int8)(unsafe.Pointer(ts + 9340 /* "unionConnect" */)) /* unionvtab.c:889:2 */ - // xOpen func unionOpen(tls *crt.TLS, p uintptr, ppCursor uintptr) int32 { /* unionvtab.c:1033:12: */ bp := tls.Alloc(4) @@ -25001,9 +25296,7 @@ func doUnionNext(tls *crt.TLS, pCsr uintptr) int32 { /* unionvtab.c:1057:12: */ defer tls.Free(28) *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = 0 - if !((*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt != 0) { - crt.X__assert_fail(tls, ts+9353 /* "pCsr->pStmt" */, ts+8232 /* "testdata/sqlite-..." */, uint32(1059), uintptr(unsafe.Pointer(&__func__42))) - } + if sqlite3.Xsqlite3_step(tls, (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt) != 100 { var pTab uintptr = (*UnionCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = unionFinalizeCsrStmt(tls, pCsr) @@ -25015,19 +25308,17 @@ func doUnionNext(tls *crt.TLS, pCsr uintptr) int32 { /* unionvtab.c:1057:12: */ // It is necessary to scan the next table. *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = unionOpenDatabase(tls, pTab, (*UnionCsr)(unsafe.Pointer(pCsr)).FiTab, (pTab /* &.base */ + 16 /* &.zErrMsg */)) (*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt = unionPreparePrintf(tls, bp+24 /* &rc */, (pTab /* &.base */ + 16 /* &.zErrMsg */), (*UnionSrc)(unsafe.Pointer(pSrc)).Fdb, - ts+9365, /* "SELECT rowid, * ..." */ + ts+7256, /* "SELECT rowid, * ..." */ crt.VaList(bp, (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab, func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FiMax > (*UnionCsr)(unsafe.Pointer(pCsr)).FiMaxRowid { - return ts + 9397 /* "WHERE _rowid_ <=" */ + return ts + 7288 /* "WHERE _rowid_ <=" */ } - return ts + 9414 /* "-- " */ + return ts + 7305 /* "-- " */ }(), (*UnionCsr)(unsafe.Pointer(pCsr)).FiMaxRowid)) if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == 0 { - if !((*UnionCsr)(unsafe.Pointer(pCsr)).FpStmt != 0) { - crt.X__assert_fail(tls, ts+9353 /* "pCsr->pStmt" */, ts+8232 /* "testdata/sqlite-..." */, uint32(1077), uintptr(unsafe.Pointer(&__func__42))) - } + unionIncrRefcount(tls, pTab, (*UnionCsr)(unsafe.Pointer(pCsr)).FiTab) *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = 100 } @@ -25039,8 +25330,6 @@ func doUnionNext(tls *crt.TLS, pCsr uintptr) int32 { /* unionvtab.c:1057:12: */ return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } -var __func__42 = *(*[12]int8)(unsafe.Pointer(ts + 9418 /* "doUnionNext" */)) /* unionvtab.c:1057:39 */ - // xNext func unionNext(tls *crt.TLS, cur uintptr) int32 { /* unionvtab.c:1092:12: */ var rc int32 @@ -25085,23 +25374,15 @@ func unionFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr var iMin sqlite3_int64 = ((int64(-1)) - (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32))) var iMax sqlite3_int64 = (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)) - if !(((((((idxNum == 0) || (idxNum == 2)) || (idxNum == 8)) || (idxNum == 32)) || (idxNum == 16)) || (idxNum == 4)) || (idxNum == (32 | 8))) { - crt.X__assert_fail(tls, ts+9430 /* "idxNum==0 || idx..." */, ts+8232 /* "testdata/sqlite-..." */, uint32(1148), uintptr(unsafe.Pointer(&__func__43))) - } - _ = idxStr // Suppress harmless warning if idxNum == 2 { - if !(argc == 1) { - crt.X__assert_fail(tls, ts+8151 /* "argc==1" */, ts+8232 /* "testdata/sqlite-..." */, uint32(1160), uintptr(unsafe.Pointer(&__func__43))) - } + iMin = crt.AssignInt64(&iMax, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)))) } else { if (idxNum & (8 | 16)) != 0 { - if !(argc >= 1) { - crt.X__assert_fail(tls, ts+9525 /* "argc>=1" */, ts+8232 /* "testdata/sqlite-..." */, uint32(1165), uintptr(unsafe.Pointer(&__func__43))) - } + iMax = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) if (idxNum & 16) != 0 { if iMax == ((int64(-1)) - (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32))) { @@ -25113,9 +25394,7 @@ func unionFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr } if (idxNum & (32 | 4)) != 0 { - if !(argc >= 1) { - crt.X__assert_fail(tls, ts+9525 /* "argc>=1" */, ts+8232 /* "testdata/sqlite-..." */, uint32(1177), uintptr(unsafe.Pointer(&__func__43))) - } + iMin = sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr((argc-1))*8))) if (idxNum & 4) != 0 { if iMin == (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)) { @@ -25138,26 +25417,26 @@ func unionFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr continue } - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+9533 /* "%z%sSELECT rowid..." */, crt.VaList(bp, zSql, func() uintptr { + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+7309 /* "%z%sSELECT rowid..." */, crt.VaList(bp, zSql, func() uintptr { if zSql != 0 { - return ts + 9567 /* " UNION ALL " */ + return ts + 7343 /* " UNION ALL " */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { - return ts + 5272 /* "'" */ + return ts + 4030 /* "'" */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { return (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), func() uintptr { if (*UnionSrc)(unsafe.Pointer(pSrc)).FzDb != 0 { - return ts + 5274 /* "'." */ + return ts + 4032 /* "'." */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), (*UnionSrc)(unsafe.Pointer(pSrc)).FzTab)) if zSql == uintptr(0) { *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = 7 @@ -25165,15 +25444,15 @@ func unionFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr } if iMin == iMax { - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+9579 /* "%z WHERE rowid=%..." */, crt.VaList(bp+48, zSql, iMin)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+7355 /* "%z WHERE rowid=%..." */, crt.VaList(bp+48, zSql, iMin)) } else { - var zWhere uintptr = ts + 9599 /* "WHERE" */ + var zWhere uintptr = ts + 7375 /* "WHERE" */ if (iMin != ((int64(-1)) - (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32)))) && (iMin > (*UnionSrc)(unsafe.Pointer(pSrc)).FiMin) { - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+9605 /* "%z WHERE rowid>=..." */, crt.VaList(bp+64, zSql, iMin)) - zWhere = ts + 9626 /* "AND" */ + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+7381 /* "%z WHERE rowid>=..." */, crt.VaList(bp+64, zSql, iMin)) + zWhere = ts + 7402 /* "AND" */ } if (iMax != (int64(0xffffffff) | (sqlite3_int64((int64(0x7fffffff))) << 32))) && (iMax < (*UnionSrc)(unsafe.Pointer(pSrc)).FiMax) { - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+9630 /* "%z %s rowid<=%ll..." */, crt.VaList(bp+80, zSql, zWhere, iMax)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+7406 /* "%z %s rowid<=%ll..." */, crt.VaList(bp+80, zSql, zWhere, iMax)) } } @@ -25206,8 +25485,6 @@ func unionFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr return unionNext(tls, pVtabCursor) } -var __func__43 = *(*[12]int8)(unsafe.Pointer(ts + 9648 /* "unionFilter" */)) /* unionvtab.c:1137:2 */ - // xBestIndex. // // This implementation searches for constraints on the rowid field. EQ, @@ -25289,9 +25566,9 @@ func unionBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* unio func createUnionVtab(tls *crt.TLS, db uintptr) int32 { /* unionvtab.c:1329:12: */ var rc int32 - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+8982 /* "unionvtab" */, uintptr(unsafe.Pointer(&unionModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+6904 /* "unionvtab" */, uintptr(unsafe.Pointer(&unionModule)), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+8972 /* "swarmvtab" */, uintptr(unsafe.Pointer(&unionModule)), db) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+6894 /* "swarmvtab" */, uintptr(unsafe.Pointer(&unionModule)), db) } return rc } @@ -25344,7 +25621,7 @@ func wholenumberConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv if pNew == uintptr(0) { return 7 } - sqlite3.Xsqlite3_declare_vtab(tls, db, ts+9660 /* "CREATE TABLE x(v..." */) + sqlite3.Xsqlite3_declare_vtab(tls, db, ts+7424 /* "CREATE TABLE x(v..." */) sqlite3.Xsqlite3_vtab_config(tls, db, 2, 0) crt.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(sqlite3_vtab{}))) return 0 @@ -25540,6242 +25817,3271 @@ func sqlite3_wholenumber_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi u var rc int32 = 0 _ = pApi - rc = sqlite3.Xsqlite3_create_module(tls, db, ts+9682 /* "wholenumber" */, uintptr(unsafe.Pointer(&wholenumberModule)), uintptr(0)) + rc = sqlite3.Xsqlite3_create_module(tls, db, ts+7446 /* "wholenumber" */, uintptr(unsafe.Pointer(&wholenumberModule)), uintptr(0)) return rc } -// -// END OF REGISTRATION API -// +// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. +// are already defined. +// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. +// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. -//******* End of fts5.h ******** +// A null pointer constant. -// 2014 August 30 -// -// The author disclaims copyright to this source code. In place of -// a legal notice, here is a blessing: -// -// May you do good and not evil. -// May you find forgiveness for yourself and forgive others. -// May you share freely, never taking more than you give. -// -// -// -// This file contains the public interface for the RBU extension. +// Offset of member MEMBER in a struct of type TYPE. -// SUMMARY -// -// Writing a transaction containing a large number of operations on -// b-tree indexes that are collectively larger than the available cache -// memory can be very inefficient. -// -// The problem is that in order to update a b-tree, the leaf page (at least) -// containing the entry being inserted or deleted must be modified. If the -// working set of leaves is larger than the available cache memory, then a -// single leaf that is modified more than once as part of the transaction -// may be loaded from or written to the persistent media multiple times. -// Additionally, because the index updates are likely to be applied in -// random order, access to pages within the database is also likely to be in -// random order, which is itself quite inefficient. -// -// One way to improve the situation is to sort the operations on each index -// by index key before applying them to the b-tree. This leads to an IO -// pattern that resembles a single linear scan through the index b-tree, -// and all but guarantees each modified leaf page is loaded and stored -// exactly once. SQLite uses this trick to improve the performance of -// CREATE INDEX commands. This extension allows it to be used to improve -// the performance of large transactions on existing databases. -// -// Additionally, this extension allows the work involved in writing the -// large transaction to be broken down into sub-transactions performed -// sequentially by separate processes. This is useful if the system cannot -// guarantee that a single update process will run for long enough to apply -// the entire update, for example because the update is being applied on a -// mobile device that is frequently rebooted. Even after the writer process -// has committed one or more sub-transactions, other database clients continue -// to read from the original database snapshot. In other words, partially -// applied transactions are not visible to other clients. -// -// "RBU" stands for "Resumable Bulk Update". As in a large database update -// transmitted via a wireless network to a mobile device. A transaction -// applied using this extension is hence refered to as an "RBU update". -// -// -// LIMITATIONS -// -// An "RBU update" transaction is subject to the following limitations: -// -// * The transaction must consist of INSERT, UPDATE and DELETE operations -// only. -// -// * INSERT statements may not use any default values. -// -// * UPDATE and DELETE statements must identify their target rows by -// non-NULL PRIMARY KEY values. Rows with NULL values stored in PRIMARY -// KEY fields may not be updated or deleted. If the table being written -// has no PRIMARY KEY, affected rows must be identified by rowid. -// -// * UPDATE statements may not modify PRIMARY KEY columns. -// -// * No triggers will be fired. -// -// * No foreign key violations are detected or reported. -// -// * CHECK constraints are not enforced. -// -// * No constraint handling mode except for "OR ROLLBACK" is supported. -// -// -// PREPARATION -// -// An "RBU update" is stored as a separate SQLite database. A database -// containing an RBU update is an "RBU database". For each table in the -// target database to be updated, the RBU database should contain a table -// named "data_<target name>" containing the same set of columns as the -// target table, and one more - "rbu_control". The data_% table should -// have no PRIMARY KEY or UNIQUE constraints, but each column should have -// the same type as the corresponding column in the target database. -// The "rbu_control" column should have no type at all. For example, if -// the target database contains: -// -// CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c UNIQUE); -// -// Then the RBU database should contain: -// -// CREATE TABLE data_t1(a INTEGER, b TEXT, c, rbu_control); -// -// The order of the columns in the data_% table does not matter. -// -// Instead of a regular table, the RBU database may also contain virtual -// tables or view named using the data_<target> naming scheme. -// -// Instead of the plain data_<target> naming scheme, RBU database tables -// may also be named data<integer>_<target>, where <integer> is any sequence -// of zero or more numeric characters (0-9). This can be significant because -// tables within the RBU database are always processed in order sorted by -// name. By judicious selection of the <integer> portion of the names -// of the RBU tables the user can therefore control the order in which they -// are processed. This can be useful, for example, to ensure that "external -// content" FTS4 tables are updated before their underlying content tables. -// -// If the target database table is a virtual table or a table that has no -// PRIMARY KEY declaration, the data_% table must also contain a column -// named "rbu_rowid". This column is mapped to the tables implicit primary -// key column - "rowid". Virtual tables for which the "rowid" column does -// not function like a primary key value cannot be updated using RBU. For -// example, if the target db contains either of the following: -// -// CREATE VIRTUAL TABLE x1 USING fts3(a, b); -// CREATE TABLE x1(a, b) -// -// then the RBU database should contain: -// -// CREATE TABLE data_x1(a, b, rbu_rowid, rbu_control); -// -// All non-hidden columns (i.e. all columns matched by "SELECT *") of the -// target table must be present in the input table. For virtual tables, -// hidden columns are optional - they are updated by RBU if present in -// the input table, or not otherwise. For example, to write to an fts4 -// table with a hidden languageid column such as: -// -// CREATE VIRTUAL TABLE ft1 USING fts4(a, b, languageid='langid'); -// -// Either of the following input table schemas may be used: -// -// CREATE TABLE data_ft1(a, b, langid, rbu_rowid, rbu_control); -// CREATE TABLE data_ft1(a, b, rbu_rowid, rbu_control); -// -// For each row to INSERT into the target database as part of the RBU -// update, the corresponding data_% table should contain a single record -// with the "rbu_control" column set to contain integer value 0. The -// other columns should be set to the values that make up the new record -// to insert. -// -// If the target database table has an INTEGER PRIMARY KEY, it is not -// possible to insert a NULL value into the IPK column. Attempting to -// do so results in an SQLITE_MISMATCH error. -// -// For each row to DELETE from the target database as part of the RBU -// update, the corresponding data_% table should contain a single record -// with the "rbu_control" column set to contain integer value 1. The -// real primary key values of the row to delete should be stored in the -// corresponding columns of the data_% table. The values stored in the -// other columns are not used. -// -// For each row to UPDATE from the target database as part of the RBU -// update, the corresponding data_% table should contain a single record -// with the "rbu_control" column set to contain a value of type text. -// The real primary key values identifying the row to update should be -// stored in the corresponding columns of the data_% table row, as should -// the new values of all columns being update. The text value in the -// "rbu_control" column must contain the same number of characters as -// there are columns in the target database table, and must consist entirely -// of 'x' and '.' characters (or in some special cases 'd' - see below). For -// each column that is being updated, the corresponding character is set to -// 'x'. For those that remain as they are, the corresponding character of the -// rbu_control value should be set to '.'. For example, given the tables -// above, the update statement: -// -// UPDATE t1 SET c = 'usa' WHERE a = 4; -// -// is represented by the data_t1 row created by: -// -// INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x'); -// -// Instead of an 'x' character, characters of the rbu_control value specified -// for UPDATEs may also be set to 'd'. In this case, instead of updating the -// target table with the value stored in the corresponding data_% column, the -// user-defined SQL function "rbu_delta()" is invoked and the result stored in -// the target table column. rbu_delta() is invoked with two arguments - the -// original value currently stored in the target table column and the -// value specified in the data_xxx table. -// -// For example, this row: -// -// INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..d'); -// -// is similar to an UPDATE statement such as: -// -// UPDATE t1 SET c = rbu_delta(c, 'usa') WHERE a = 4; -// -// Finally, if an 'f' character appears in place of a 'd' or 's' in an -// ota_control string, the contents of the data_xxx table column is assumed -// to be a "fossil delta" - a patch to be applied to a blob value in the -// format used by the fossil source-code management system. In this case -// the existing value within the target database table must be of type BLOB. -// It is replaced by the result of applying the specified fossil delta to -// itself. -// -// If the target database table is a virtual table or a table with no PRIMARY -// KEY, the rbu_control value should not include a character corresponding -// to the rbu_rowid value. For example, this: -// -// INSERT INTO data_ft1(a, b, rbu_rowid, rbu_control) -// VALUES(NULL, 'usa', 12, '.x'); -// -// causes a result similar to: -// -// UPDATE ft1 SET b = 'usa' WHERE rowid = 12; -// -// The data_xxx tables themselves should have no PRIMARY KEY declarations. -// However, RBU is more efficient if reading the rows in from each data_xxx -// table in "rowid" order is roughly the same as reading them sorted by -// the PRIMARY KEY of the corresponding target database table. In other -// words, rows should be sorted using the destination table PRIMARY KEY -// fields before they are inserted into the data_xxx tables. -// -// USAGE -// -// The API declared below allows an application to apply an RBU update -// stored on disk to an existing target database. Essentially, the -// application: -// -// 1) Opens an RBU handle using the sqlite3rbu_open() function. -// -// 2) Registers any required virtual table modules with the database -// handle returned by sqlite3rbu_db(). Also, if required, register -// the rbu_delta() implementation. -// -// 3) Calls the sqlite3rbu_step() function one or more times on -// the new handle. Each call to sqlite3rbu_step() performs a single -// b-tree operation, so thousands of calls may be required to apply -// a complete update. -// -// 4) Calls sqlite3rbu_close() to close the RBU update handle. If -// sqlite3rbu_step() has been called enough times to completely -// apply the update to the target database, then the RBU database -// is marked as fully applied. Otherwise, the state of the RBU -// update application is saved in the RBU database for later -// resumption. -// -// See comments below for more detail on APIs. -// -// If an update is only partially applied to the target database by the -// time sqlite3rbu_close() is called, various state information is saved -// within the RBU database. This allows subsequent processes to automatically -// resume the RBU update from where it left off. -// -// To remove all RBU extension state information, returning an RBU database -// to its original contents, it is sufficient to drop all tables that begin -// with the prefix "rbu_" -// -// DATABASE LOCKING -// -// An RBU update may not be applied to a database in WAL mode. Attempting -// to do so is an error (SQLITE_ERROR). -// -// While an RBU handle is open, a SHARED lock may be held on the target -// database file. This means it is possible for other clients to read the -// database, but not to write it. -// -// If an RBU update is started and then suspended before it is completed, -// then an external client writes to the database, then attempting to resume -// the suspended RBU update is also an error (SQLITE_BUSY). +// Type whose alignment is supported in every context and is at least +// as great as that of any standard type not using alignment +// specifiers. +type max_align_t = struct { + F__max_align_ll int64 + F__max_align_ld float64 +} /* stddef.h:437:3 */ -// 2001-09-15 -// -// The author disclaims copyright to this source code. In place of -// a legal notice, here is a blessing: -// -// May you do good and not evil. -// May you find forgiveness for yourself and forgive others. -// May you share freely, never taking more than you give. -// -// -// This header file defines the interface that the SQLite library -// presents to client programs. If a C-function, structure, datatype, -// or constant definition does not appear in this file, then it is -// not a published API of SQLite, is subject to change without -// notice, and should not be referenced by programs that use SQLite. -// -// Some of the definitions that are in this file are marked as -// "experimental". Experimental interfaces are normally new -// features recently added to SQLite. We do not anticipate changes -// to experimental interfaces but reserve the right to make minor changes -// if experience from use "in the wild" suggest such changes are prudent. -// -// The official C-language API documentation for SQLite is derived -// from comments in this file. This file is the authoritative source -// on how SQLite interfaces are supposed to operate. -// -// The name of this file under configuration management is "sqlite.h.in". -// The makefile makes some minor changes to this file (such as inserting -// the version number) and changes its name to "sqlite3.h" as -// part of the build process. +type z_size_t = size_t /* zconf.h:248:21 */ -//******* Begin file sqlite3rtree.h ******** -// 2010 August 30 -// -// The author disclaims copyright to this source code. In place of -// a legal notice, here is a blessing: -// -// May you do good and not evil. -// May you find forgiveness for yourself and forgive others. -// May you share freely, never taking more than you give. -// -// +// Maximum value for memLevel in deflateInit2 -//******* End of sqlite3rtree.h ******** -//******* Begin file sqlite3session.h ******** +// Maximum value for windowBits in deflateInit2 and inflateInit2. +// WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files +// created by gzip. (Files created by minigzip can still be extracted by +// gzip.) -//******* End of sqlite3session.h ******** -//******* Begin file fts5.h ******** -// 2014 May 31 -// -// The author disclaims copyright to this source code. In place of -// a legal notice, here is a blessing: -// -// May you do good and not evil. -// May you find forgiveness for yourself and forgive others. -// May you share freely, never taking more than you give. -// -// +// The memory requirements for deflate are (in bytes): +// (1 << (windowBits+2)) + (1 << (memLevel+9)) +// that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) +// plus a few kilobytes for small objects. For example, if you want to reduce +// the default memory requirements from 256K to 128K, compile with +// make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" +// Of course this will generally degrade compression (there's no free lunch). // -// Interfaces to extend FTS5. Using the interfaces defined in this file, -// FTS5 may be extended with: -// -// * custom tokenizers, and -// * custom auxiliary functions. +// The memory requirements for inflate are (in bytes) 1 << windowBits +// that is, 32K for windowBits=15 (default value) plus about 7 kilobytes +// for small objects. -//******* End of fts5.h ******** +// Type declarations -type sqlite3rbu1 = struct { - FeStage int32 - FdbMain uintptr - FdbRbu uintptr - FzTarget uintptr - FzRbu uintptr - FzState uintptr - FzStateDb [5]int8 - Frc int32 - FzErrmsg uintptr - FnStep int32 - FnProgress int32 - Fobjiter RbuObjIter - FzVfsName uintptr - FpTargetFd uintptr - FnPagePerSector int32 - FiOalSz i64 - FnPhaseOneStep i64 - FiMaxFrame u32 - FmLock u32 - FnFrame int32 - FnFrameAlloc int32 - FaFrame uintptr - Fpgsz int32 - FaBuf uintptr - FiWalCksum i64 - FszTemp i64 - FszTempLimit i64 - FnRbu int32 - FpRbuFd uintptr -} +// The following definitions for FAR are needed only for MSDOS mixed +// model programming (small or medium model with some far allocations). +// This was tested only with MSC; for other MSDOS compilers you may have +// to define NO_MEMCPY in zutil.h. If you don't need the mixed model, +// just define FAR to be empty. -// -// END OF REGISTRATION API -// +type Byte = uint8 /* zconf.h:391:24 */ // 8 bits +type uInt = uint32 /* zconf.h:393:24 */ // 16 bits or more +type uLong = uint64 /* zconf.h:394:24 */ // 32 bits or more -//******* End of fts5.h ******** +type Bytef = Byte /* zconf.h:400:22 */ +type charf = int8 /* zconf.h:402:19 */ +type intf = int32 /* zconf.h:403:19 */ +type uIntf = uInt /* zconf.h:404:19 */ +type uLongf = uLong /* zconf.h:405:19 */ -// 2014 August 30 -// -// The author disclaims copyright to this source code. In place of -// a legal notice, here is a blessing: -// -// May you do good and not evil. -// May you find forgiveness for yourself and forgive others. -// May you share freely, never taking more than you give. -// -// -// -// This file contains the public interface for the RBU extension. +type voidpc = uintptr /* zconf.h:408:23 */ +type voidpf = uintptr /* zconf.h:409:23 */ +type voidp = uintptr /* zconf.h:410:23 */ -// SUMMARY -// -// Writing a transaction containing a large number of operations on -// b-tree indexes that are collectively larger than the available cache -// memory can be very inefficient. -// -// The problem is that in order to update a b-tree, the leaf page (at least) -// containing the entry being inserted or deleted must be modified. If the -// working set of leaves is larger than the available cache memory, then a -// single leaf that is modified more than once as part of the transaction -// may be loaded from or written to the persistent media multiple times. -// Additionally, because the index updates are likely to be applied in -// random order, access to pages within the database is also likely to be in -// random order, which is itself quite inefficient. -// -// One way to improve the situation is to sort the operations on each index -// by index key before applying them to the b-tree. This leads to an IO -// pattern that resembles a single linear scan through the index b-tree, -// and all but guarantees each modified leaf page is loaded and stored -// exactly once. SQLite uses this trick to improve the performance of -// CREATE INDEX commands. This extension allows it to be used to improve -// the performance of large transactions on existing databases. -// -// Additionally, this extension allows the work involved in writing the -// large transaction to be broken down into sub-transactions performed -// sequentially by separate processes. This is useful if the system cannot -// guarantee that a single update process will run for long enough to apply -// the entire update, for example because the update is being applied on a -// mobile device that is frequently rebooted. Even after the writer process -// has committed one or more sub-transactions, other database clients continue -// to read from the original database snapshot. In other words, partially -// applied transactions are not visible to other clients. -// -// "RBU" stands for "Resumable Bulk Update". As in a large database update -// transmitted via a wireless network to a mobile device. A transaction -// applied using this extension is hence refered to as an "RBU update". -// -// -// LIMITATIONS -// -// An "RBU update" transaction is subject to the following limitations: -// -// * The transaction must consist of INSERT, UPDATE and DELETE operations -// only. -// -// * INSERT statements may not use any default values. -// -// * UPDATE and DELETE statements must identify their target rows by -// non-NULL PRIMARY KEY values. Rows with NULL values stored in PRIMARY -// KEY fields may not be updated or deleted. If the table being written -// has no PRIMARY KEY, affected rows must be identified by rowid. -// -// * UPDATE statements may not modify PRIMARY KEY columns. -// -// * No triggers will be fired. -// -// * No foreign key violations are detected or reported. -// -// * CHECK constraints are not enforced. -// -// * No constraint handling mode except for "OR ROLLBACK" is supported. -// -// -// PREPARATION -// -// An "RBU update" is stored as a separate SQLite database. A database -// containing an RBU update is an "RBU database". For each table in the -// target database to be updated, the RBU database should contain a table -// named "data_<target name>" containing the same set of columns as the -// target table, and one more - "rbu_control". The data_% table should -// have no PRIMARY KEY or UNIQUE constraints, but each column should have -// the same type as the corresponding column in the target database. -// The "rbu_control" column should have no type at all. For example, if -// the target database contains: -// -// CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c UNIQUE); -// -// Then the RBU database should contain: -// -// CREATE TABLE data_t1(a INTEGER, b TEXT, c, rbu_control); -// -// The order of the columns in the data_% table does not matter. -// -// Instead of a regular table, the RBU database may also contain virtual -// tables or view named using the data_<target> naming scheme. -// -// Instead of the plain data_<target> naming scheme, RBU database tables -// may also be named data<integer>_<target>, where <integer> is any sequence -// of zero or more numeric characters (0-9). This can be significant because -// tables within the RBU database are always processed in order sorted by -// name. By judicious selection of the <integer> portion of the names -// of the RBU tables the user can therefore control the order in which they -// are processed. This can be useful, for example, to ensure that "external -// content" FTS4 tables are updated before their underlying content tables. -// -// If the target database table is a virtual table or a table that has no -// PRIMARY KEY declaration, the data_% table must also contain a column -// named "rbu_rowid". This column is mapped to the tables implicit primary -// key column - "rowid". Virtual tables for which the "rowid" column does -// not function like a primary key value cannot be updated using RBU. For -// example, if the target db contains either of the following: -// -// CREATE VIRTUAL TABLE x1 USING fts3(a, b); -// CREATE TABLE x1(a, b) -// -// then the RBU database should contain: -// -// CREATE TABLE data_x1(a, b, rbu_rowid, rbu_control); -// -// All non-hidden columns (i.e. all columns matched by "SELECT *") of the -// target table must be present in the input table. For virtual tables, -// hidden columns are optional - they are updated by RBU if present in -// the input table, or not otherwise. For example, to write to an fts4 -// table with a hidden languageid column such as: -// -// CREATE VIRTUAL TABLE ft1 USING fts4(a, b, languageid='langid'); -// -// Either of the following input table schemas may be used: -// -// CREATE TABLE data_ft1(a, b, langid, rbu_rowid, rbu_control); -// CREATE TABLE data_ft1(a, b, rbu_rowid, rbu_control); -// -// For each row to INSERT into the target database as part of the RBU -// update, the corresponding data_% table should contain a single record -// with the "rbu_control" column set to contain integer value 0. The -// other columns should be set to the values that make up the new record -// to insert. -// -// If the target database table has an INTEGER PRIMARY KEY, it is not -// possible to insert a NULL value into the IPK column. Attempting to -// do so results in an SQLITE_MISMATCH error. -// -// For each row to DELETE from the target database as part of the RBU -// update, the corresponding data_% table should contain a single record -// with the "rbu_control" column set to contain integer value 1. The -// real primary key values of the row to delete should be stored in the -// corresponding columns of the data_% table. The values stored in the -// other columns are not used. -// -// For each row to UPDATE from the target database as part of the RBU -// update, the corresponding data_% table should contain a single record -// with the "rbu_control" column set to contain a value of type text. -// The real primary key values identifying the row to update should be -// stored in the corresponding columns of the data_% table row, as should -// the new values of all columns being update. The text value in the -// "rbu_control" column must contain the same number of characters as -// there are columns in the target database table, and must consist entirely -// of 'x' and '.' characters (or in some special cases 'd' - see below). For -// each column that is being updated, the corresponding character is set to -// 'x'. For those that remain as they are, the corresponding character of the -// rbu_control value should be set to '.'. For example, given the tables -// above, the update statement: -// -// UPDATE t1 SET c = 'usa' WHERE a = 4; -// -// is represented by the data_t1 row created by: -// -// INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x'); -// -// Instead of an 'x' character, characters of the rbu_control value specified -// for UPDATEs may also be set to 'd'. In this case, instead of updating the -// target table with the value stored in the corresponding data_% column, the -// user-defined SQL function "rbu_delta()" is invoked and the result stored in -// the target table column. rbu_delta() is invoked with two arguments - the -// original value currently stored in the target table column and the -// value specified in the data_xxx table. -// -// For example, this row: -// -// INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..d'); -// -// is similar to an UPDATE statement such as: -// -// UPDATE t1 SET c = rbu_delta(c, 'usa') WHERE a = 4; -// -// Finally, if an 'f' character appears in place of a 'd' or 's' in an -// ota_control string, the contents of the data_xxx table column is assumed -// to be a "fossil delta" - a patch to be applied to a blob value in the -// format used by the fossil source-code management system. In this case -// the existing value within the target database table must be of type BLOB. -// It is replaced by the result of applying the specified fossil delta to -// itself. -// -// If the target database table is a virtual table or a table with no PRIMARY -// KEY, the rbu_control value should not include a character corresponding -// to the rbu_rowid value. For example, this: -// -// INSERT INTO data_ft1(a, b, rbu_rowid, rbu_control) -// VALUES(NULL, 'usa', 12, '.x'); -// -// causes a result similar to: -// -// UPDATE ft1 SET b = 'usa' WHERE rowid = 12; -// -// The data_xxx tables themselves should have no PRIMARY KEY declarations. -// However, RBU is more efficient if reading the rows in from each data_xxx -// table in "rowid" order is roughly the same as reading them sorted by -// the PRIMARY KEY of the corresponding target database table. In other -// words, rows should be sorted using the destination table PRIMARY KEY -// fields before they are inserted into the data_xxx tables. -// -// USAGE -// -// The API declared below allows an application to apply an RBU update -// stored on disk to an existing target database. Essentially, the -// application: -// -// 1) Opens an RBU handle using the sqlite3rbu_open() function. -// -// 2) Registers any required virtual table modules with the database -// handle returned by sqlite3rbu_db(). Also, if required, register -// the rbu_delta() implementation. -// -// 3) Calls the sqlite3rbu_step() function one or more times on -// the new handle. Each call to sqlite3rbu_step() performs a single -// b-tree operation, so thousands of calls may be required to apply -// a complete update. -// -// 4) Calls sqlite3rbu_close() to close the RBU update handle. If -// sqlite3rbu_step() has been called enough times to completely -// apply the update to the target database, then the RBU database -// is marked as fully applied. Otherwise, the state of the RBU -// update application is saved in the RBU database for later -// resumption. -// -// See comments below for more detail on APIs. -// -// If an update is only partially applied to the target database by the -// time sqlite3rbu_close() is called, various state information is saved -// within the RBU database. This allows subsequent processes to automatically -// resume the RBU update from where it left off. +// Copyright (C) 1992-2018 Free Software Foundation, Inc. // -// To remove all RBU extension state information, returning an RBU database -// to its original contents, it is sufficient to drop all tables that begin -// with the prefix "rbu_" +//This file is part of GCC. // -// DATABASE LOCKING +//GCC is free software; you can redistribute it and/or modify it under +//the terms of the GNU General Public License as published by the Free +//Software Foundation; either version 3, or (at your option) any later +//version. // -// An RBU update may not be applied to a database in WAL mode. Attempting -// to do so is an error (SQLITE_ERROR). +//GCC is distributed in the hope that it will be useful, but WITHOUT ANY +//WARRANTY; without even the implied warranty of MERCHANTABILITY or +//FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +//for more details. // -// While an RBU handle is open, a SHARED lock may be held on the target -// database file. This means it is possible for other clients to read the -// database, but not to write it. +//Under Section 7 of GPL version 3, you are granted additional +//permissions described in the GCC Runtime Library Exception, version +//3.1, as published by the Free Software Foundation. // -// If an RBU update is started and then suspended before it is completed, -// then an external client writes to the database, then attempting to resume -// the suspended RBU update is also an error (SQLITE_BUSY). +//You should have received a copy of the GNU General Public License and +//a copy of the GCC Runtime Library Exception along with this program; +//see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +//<http://www.gnu.org/licenses/>. -// 2001-09-15 -// -// The author disclaims copyright to this source code. In place of -// a legal notice, here is a blessing: -// -// May you do good and not evil. -// May you find forgiveness for yourself and forgive others. -// May you share freely, never taking more than you give. -// -// -// This header file defines the interface that the SQLite library -// presents to client programs. If a C-function, structure, datatype, -// or constant definition does not appear in this file, then it is -// not a published API of SQLite, is subject to change without -// notice, and should not be referenced by programs that use SQLite. -// -// Some of the definitions that are in this file are marked as -// "experimental". Experimental interfaces are normally new -// features recently added to SQLite. We do not anticipate changes -// to experimental interfaces but reserve the right to make minor changes -// if experience from use "in the wild" suggest such changes are prudent. -// -// The official C-language API documentation for SQLite is derived -// from comments in this file. This file is the authoritative source -// on how SQLite interfaces are supposed to operate. -// -// The name of this file under configuration management is "sqlite.h.in". -// The makefile makes some minor changes to this file (such as inserting -// the version number) and changes its name to "sqlite3.h" as -// part of the build process. +// This administrivia gets added to the beginning of limits.h +// if the system has its own version of limits.h. -//******* Begin file sqlite3rtree.h ******** -// 2010 August 30 -// -// The author disclaims copyright to this source code. In place of -// a legal notice, here is a blessing: +// We use _GCC_LIMITS_H_ because we want this not to match +// any macros that the system's limits.h uses for its own purposes. + +// Use "..." so that we find syslimits.h only in this same directory. +// syslimits.h stands for the system's own limits.h file. +// If we can use it ok unmodified, then we install this text. +// If fixincludes fixes it, then the fixed version is installed +// instead of this text. + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. // -// May you do good and not evil. -// May you find forgiveness for yourself and forgive others. -// May you share freely, never taking more than you give. +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. -//******* End of sqlite3rtree.h ******** -//******* Begin file sqlite3session.h ******** +// ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types <limits.h> -//******* End of sqlite3session.h ******** -//******* Begin file fts5.h ******** -// 2014 May 31 +// Handle feature test macros at the start of a header. +// Copyright (C) 2016-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. // -// The author disclaims copyright to this source code. In place of -// a legal notice, here is a blessing: +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// May you do good and not evil. -// May you find forgiveness for yourself and forgive others. -// May you share freely, never taking more than you give. +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// This header is internal to glibc and should not be included outside +// of glibc headers. Headers including it must define +// __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION first. This header +// cannot have multiple include guards because ISO C feature test +// macros depend on the definition of the macro when an affected +// header is included, not when the first system header is +// included. + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. // +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// Interfaces to extend FTS5. Using the interfaces defined in this file, -// FTS5 may be extended with: +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// * custom tokenizers, and -// * custom auxiliary functions. +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. -//******* End of fts5.h ******** +// ISO/IEC TR 24731-2:2010 defines the __STDC_WANT_LIB_EXT2__ +// macro. -type sqlite3rbu = sqlite3rbu1 /* sqlite3rbu.h:276:27 */ +// ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__ +// macro. -// Maximum number of prepared UPDATE statements held by this module +// ISO/IEC TS 18661-4:2015 defines the +// __STDC_WANT_IEC_60559_FUNCS_EXT__ macro. -// Delta checksums disabled by default. Compile with -DRBU_ENABLE_DELTA_CKSUM -// to enable checksum verification. +// ISO/IEC TS 18661-3:2015 defines the +// __STDC_WANT_IEC_60559_TYPES_EXT__ macro. -// Swap two objects of type TYPE. +// Maximum length of any multibyte character in any locale. +// We define this value here since the gcc header does not define +// the correct value. -// The rbu_state table is used to save the state of a partially applied -// update so that it can be resumed later. The table consists of integer -// keys mapped to values as follows: -// -// RBU_STATE_STAGE: -// May be set to integer values 1, 2, 4 or 5. As follows: -// 1: the *-rbu file is currently under construction. -// 2: the *-rbu file has been constructed, but not yet moved -// to the *-wal path. -// 4: the checkpoint is underway. -// 5: the rbu update has been checkpointed. -// -// RBU_STATE_TBL: -// Only valid if STAGE==1. The target database name of the table -// currently being written. -// -// RBU_STATE_IDX: -// Only valid if STAGE==1. The target database name of the index -// currently being written, or NULL if the main table is currently being -// updated. -// -// RBU_STATE_ROW: -// Only valid if STAGE==1. Number of rows already processed for the current -// table/index. -// -// RBU_STATE_PROGRESS: -// Trbul number of sqlite3rbu_step() calls made so far as part of this -// rbu update. -// -// RBU_STATE_CKPT: -// Valid if STAGE==4. The 64-bit checksum associated with the wal-index -// header created by recovering the *-wal file. This is used to detect -// cases when another client appends frames to the *-wal file in the -// middle of an incremental checkpoint (an incremental checkpoint cannot -// be continued if this happens). -// -// RBU_STATE_COOKIE: -// Valid if STAGE==1. The current change-counter cookie value in the -// target db file. -// -// RBU_STATE_OALSZ: -// Valid if STAGE==1. The size in bytes of the *-oal file. -// -// RBU_STATE_DATATBL: -// Only valid if STAGE==1. The RBU database name of the table -// currently being read. - -type RbuFrame1 = struct { - FiDbPage u32 - FiWalFrame u32 -} - -// Maximum number of prepared UPDATE statements held by this module - -// Delta checksums disabled by default. Compile with -DRBU_ENABLE_DELTA_CKSUM -// to enable checksum verification. - -// Swap two objects of type TYPE. - -// The rbu_state table is used to save the state of a partially applied -// update so that it can be resumed later. The table consists of integer -// keys mapped to values as follows: -// -// RBU_STATE_STAGE: -// May be set to integer values 1, 2, 4 or 5. As follows: -// 1: the *-rbu file is currently under construction. -// 2: the *-rbu file has been constructed, but not yet moved -// to the *-wal path. -// 4: the checkpoint is underway. -// 5: the rbu update has been checkpointed. -// -// RBU_STATE_TBL: -// Only valid if STAGE==1. The target database name of the table -// currently being written. -// -// RBU_STATE_IDX: -// Only valid if STAGE==1. The target database name of the index -// currently being written, or NULL if the main table is currently being -// updated. -// -// RBU_STATE_ROW: -// Only valid if STAGE==1. Number of rows already processed for the current -// table/index. -// -// RBU_STATE_PROGRESS: -// Trbul number of sqlite3rbu_step() calls made so far as part of this -// rbu update. -// -// RBU_STATE_CKPT: -// Valid if STAGE==4. The 64-bit checksum associated with the wal-index -// header created by recovering the *-wal file. This is used to detect -// cases when another client appends frames to the *-wal file in the -// middle of an incremental checkpoint (an incremental checkpoint cannot -// be continued if this happens). -// -// RBU_STATE_COOKIE: -// Valid if STAGE==1. The current change-counter cookie value in the -// target db file. -// -// RBU_STATE_OALSZ: -// Valid if STAGE==1. The size in bytes of the *-oal file. -// -// RBU_STATE_DATATBL: -// Only valid if STAGE==1. The RBU database name of the table -// currently being read. - -type RbuFrame = RbuFrame1 /* sqlite3rbu.c:182:25 */ -type RbuObjIter1 = struct { - FpTblIter uintptr - FpIdxIter uintptr - FnTblCol int32 - FazTblCol uintptr - FazTblType uintptr - FaiSrcOrder uintptr - FabTblPk uintptr - FabNotNull uintptr - FabIndexed uintptr - FeType int32 - FbCleanup int32 - FzTbl uintptr - FzDataTbl uintptr - FzIdx uintptr - FiTnum int32 - FiPkTnum int32 - FbUnique int32 - FnIndex int32 - FnCol int32 - FpSelect uintptr - FpInsert uintptr - FpDelete uintptr - FpTmpInsert uintptr - FnIdxCol int32 - FaIdxCol uintptr - FzIdxSql uintptr - FpRbuUpdate uintptr -} - -type RbuObjIter = RbuObjIter1 /* sqlite3rbu.c:183:27 */ -type RbuState1 = struct { - FeStage int32 - FzTbl uintptr - FzDataTbl uintptr - FzIdx uintptr - FiWalCksum i64 - FnRow int32 - FnProgress i64 - FiCookie u32 - FiOalSz i64 - FnPhaseOneStep i64 -} - -type RbuState = RbuState1 /* sqlite3rbu.c:184:25 */ -type RbuSpan1 = struct { - FzSpan uintptr - FnSpan int32 - _ [4]byte -} +// If we are not using GNU CC we have to define all the symbols ourself. +// Otherwise use gcc's definitions (see below). -type RbuSpan = RbuSpan1 /* sqlite3rbu.c:185:24 */ -type rbu_vfs1 = struct { - Fbase sqlite3_vfs - FpRealVfs uintptr - Fmutex uintptr - FpRbu uintptr - FpMain uintptr - FpMainRbu uintptr -} - -type rbu_vfs = rbu_vfs1 /* sqlite3rbu.c:186:24 */ -type rbu_file1 = struct { - Fbase sqlite3_file - FpReal uintptr - FpRbuVfs uintptr - FpRbu uintptr - Fsz i64 - FopenFlags int32 - FiCookie u32 - FiWriteVer u8 - FbNolock u8 - FnShm int32 - FapShm uintptr - FzDel uintptr - FzWal uintptr - FpWalFd uintptr - FpMainNext uintptr - FpMainRbuNext uintptr -} - -type rbu_file = rbu_file1 /* sqlite3rbu.c:187:25 */ -type RbuUpdateStmt1 = struct { - FzMask uintptr - FpUpdate uintptr - FpNext uintptr -} +// We only protect from multiple inclusion here, because all the other +// #include's protect themselves, and in GCC 2 we may #include_next through +// multiple copies of this file before we get to GCC's. -type RbuUpdateStmt = RbuUpdateStmt1 /* sqlite3rbu.c:188:30 */ +// Determine the wordsize from the preprocessor defines. -type u32 = uint32 /* sqlite3rbu.c:191:22 */ +// Both x86-64 and x32 use the 64-bit system call interface. -// True for an RBU vacuum handle, or false otherwise. +// We don't have #include_next. +// Define ANSI <limits.h> for standard 32-bit words. -// ************************************************************************ -// -// The following three functions, found below: -// -// rbuDeltaGetInt() -// rbuDeltaChecksum() -// rbuDeltaApply() -// -// are lifted from the fossil source code (http://fossil-scm.org). They -// are used to implement the scalar SQL function rbu_fossil_delta(). +// These assume 8-bit `char's, 16-bit `short int's, +// and 32-bit `int's and `long int's. -// Read bytes from *pz and convert them into a positive integer. When -// 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 *crt.TLS, pz uintptr, pLen uintptr) uint32 { /* sqlite3rbu.c:478:21: */ - var v uint32 = uint32(0) - var c int32 - var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) - var zStart uintptr = z - for (crt.AssignInt32(&c, int32(zValue[(0x7f&int32(*(*uint8)(unsafe.Pointer(crt.PostIncUintptr(&z, 1)))))]))) >= 0 { - v = ((v << 6) + uint32(c)) - } - z-- - *(*int32)(unsafe.Pointer(pLen)) -= int32(((int64(z) - int64(zStart)) / 1)) - *(*uintptr)(unsafe.Pointer(pz)) = z - return v -} - -var zValue = [128]int8{ - int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), - int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), - int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), - int8(0), int8(1), int8(2), int8(3), int8(4), int8(5), int8(6), int8(7), int8(8), int8(9), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), int8(-1), - int8(-1), int8(10), int8(11), int8(12), int8(13), int8(14), int8(15), int8(16), int8(17), int8(18), int8(19), int8(20), int8(21), int8(22), int8(23), int8(24), - 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), -} /* sqlite3rbu.c:479:28 */ - -// Apply a delta. -// -// The output buffer should be big enough to hold the whole output -// file and a NUL terminator at the end. The delta_output_size() -// routine will determine this size for you. -// -// The delta string should be null-terminated. But the delta string -// may contain embedded NUL characters (if the input and output are -// binary files) so we also have to pass in the length of the delta in -// the lenDelta parameter. -// -// This function returns the size of the output file in bytes (excluding -// the final NUL terminator character). Except, if the delta string is -// malformed or intended for use with a source file other than zSrc, -// then this routine returns -1. -// -// Refer to the delta_create() documentation above for a description -// of the delta file format. -func rbuDeltaApply(tls *crt.TLS, zSrc uintptr, lenSrc int32, zDelta uintptr, lenDelta int32, zOut uintptr) int32 { /* sqlite3rbu.c:559:12: */ - bp := tls.Alloc(12) - defer tls.Free(12) - *(*uintptr)(unsafe.Pointer(bp)) = zDelta - *(*int32)(unsafe.Pointer(bp + 8)) = lenDelta +// Number of bits in a `char'. - var limit uint32 - var total uint32 = uint32(0) +// Minimum and maximum values a `signed char' can hold. - limit = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+8 /* &lenDelta */) - if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) != '\n' { - // ERROR: size integer not terminated by "\n" - return -1 - } - *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ - *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- - for (*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */)))) != 0) && (*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) > 0) { - var cnt uint32 - var ofst uint32 - cnt = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+8 /* &lenDelta */) - switch int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */)) + uintptr(0)))) { - case '@': - { - *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ - *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- - ofst = rbuDeltaGetInt(tls, bp /* &zDelta */, bp+8 /* &lenDelta */) - if (*(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) > 0) && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */)) + uintptr(0)))) != ',') { - // ERROR: copy command not terminated by ',' - return -1 - } - *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ - *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- - total = total + (cnt) - if total > limit { - // ERROR: copy exceeds output file size - return -1 - } - if (int32(ofst + cnt)) > lenSrc { - // ERROR: copy extends past end of input - return -1 - } - crt.Xmemcpy(tls, zOut, (zSrc + uintptr(ofst)), uint64(cnt)) - zOut += uintptr(cnt) - break - } - case ':': - { - *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ - *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- - total = total + (cnt) - if total > limit { - // ERROR: insert command gives an output larger than predicted - return -1 - } - if int32(cnt) > *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) { - // ERROR: insert count exceeds size of delta - return -1 - } - crt.Xmemcpy(tls, zOut, *(*uintptr)(unsafe.Pointer(bp /* zDelta */)), uint64(cnt)) - zOut += uintptr(cnt) - *(*uintptr)(unsafe.Pointer(bp /* zDelta */)) += uintptr(cnt) - *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */)) -= int32(cnt) - break - } - case ';': - { - *(*uintptr)(unsafe.Pointer(bp /* zDelta */))++ - *(*int32)(unsafe.Pointer(bp + 8 /* lenDelta */))-- - *(*int8)(unsafe.Pointer(zOut + uintptr(0))) = int8(0) - if total != limit { - // ERROR: generated size does not match predicted size - return -1 - } - return int32(total) - } - default: - { - // ERROR: unknown delta operator - return -1 - } - } - } - // ERROR: unterminated delta - return -1 -} +// Maximum value an `unsigned char' can hold. (Minimum is 0.) -func rbuDeltaOutputSize(tls *crt.TLS, zDelta uintptr, lenDelta int32) int32 { /* sqlite3rbu.c:645:12: */ - bp := tls.Alloc(12) - defer tls.Free(12) - *(*uintptr)(unsafe.Pointer(bp)) = zDelta - *(*int32)(unsafe.Pointer(bp + 8)) = lenDelta +// Minimum and maximum values a `char' can hold. - var size int32 - size = int32(rbuDeltaGetInt(tls, bp /* &zDelta */, bp+8 /* &lenDelta */)) - if int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zDelta */))))) != '\n' { - // ERROR: size integer not terminated by "\n" - return -1 - } - return size -} +// Minimum and maximum values a `signed short int' can hold. -// -// End of code taken from fossil. -// +// Maximum value an `unsigned short int' can hold. (Minimum is 0.) -// Implementation of SQL scalar function rbu_fossil_delta(). -// -// This function applies a fossil delta patch to a blob. Exactly two -// 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 *crt.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3rbu.c:667:13: */ - var aDelta uintptr - var nDelta int32 - var aOrig uintptr - var nOrig int32 - var nOut int32 - var nOut2 int32 - var aOut uintptr +// Minimum and maximum values a `signed int' can hold. - if !(argc == 2) { - crt.X__assert_fail(tls, ts+1318 /* "argc==2" */, ts+9694 /* "testdata/sqlite-..." */, uint32(681), uintptr(unsafe.Pointer(&__func__44))) - } +// Maximum value an `unsigned int' can hold. (Minimum is 0.) - nOrig = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - aOrig = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - nDelta = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) - aDelta = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) +// Minimum and maximum values a `signed long int' can hold. - // Figure out the size of the output - nOut = rbuDeltaOutputSize(tls, aDelta, nDelta) - if nOut < 0 { - sqlite3.Xsqlite3_result_error(tls, context, ts+9743 /* "corrupt fossil d..." */, -1) - return - } +// Maximum value an `unsigned long int' can hold. (Minimum is 0.) - aOut = sqlite3.Xsqlite3_malloc(tls, (nOut + 1)) - if aOut == uintptr(0) { - sqlite3.Xsqlite3_result_error_nomem(tls, context) - } else { - nOut2 = rbuDeltaApply(tls, aOrig, nOrig, aDelta, nDelta, aOut) - if nOut2 != nOut { - sqlite3.Xsqlite3_free(tls, aOut) - sqlite3.Xsqlite3_result_error(tls, context, ts+9743 /* "corrupt fossil d..." */, -1) - } else { - sqlite3.Xsqlite3_result_blob(tls, context, aOut, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) - } - } -} +// Minimum and maximum values a `signed long long int' can hold. -var __func__44 = *(*[19]int8)(unsafe.Pointer(ts + 9764 /* "rbuFossilDeltaFu..." */)) /* sqlite3rbu.c:671:2 */ +// Maximum value an `unsigned long long int' can hold. (Minimum is 0.) -// Prepare the SQL statement in buffer zSql against database handle db. -// If successful, set *ppStmt to point to the new statement and return -// SQLITE_OK. +// Get the compiler's limits.h, which defines almost all the ISO constants. // -// Otherwise, if an error does occur, set *ppStmt to NULL and return -// 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 *crt.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3rbu.c:720:12: */ - bp := tls.Alloc(8) - defer tls.Free(8) - - var rc int32 = sqlite3.Xsqlite3_prepare_v2(tls, db, zSql, -1, ppStmt, uintptr(0)) - if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) - *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) - } - return rc -} +// We put this #include_next outside the double inclusion check because +// it should be possible to include this file more than once and still get +// the definitions from gcc's header. -// Reset the SQL statement passed as the first argument. Return a copy -// of the value returned by sqlite3_reset(). -// -// 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 *crt.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3rbu.c:742:12: */ - bp := tls.Alloc(8) - defer tls.Free(8) +// The <limits.h> files in some gcc versions don't define LLONG_MIN, +// LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for +// ages are available. - var rc int32 = sqlite3.Xsqlite3_reset(tls, pStmt) - if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, sqlite3.Xsqlite3_db_handle(tls, pStmt)))) - } - return rc -} +// The integer width macros are not defined by GCC's <limits.h> before +// GCC 7, or if _GNU_SOURCE rather than +// __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. -// Unless it is NULL, argument zSql points to a buffer allocated using -// sqlite3_malloc containing an SQL statement. This function prepares the SQL -// statement against database db and frees the buffer. If statement -// compilation is successful, *ppStmt is set to point to the new statement -// handle and SQLITE_OK is returned. +// POSIX adds things to <limits.h>. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. // -// Otherwise, if an error occurs, *ppStmt is set to NULL and an error code -// returned. In this case, *pzErrmsg may also be set to point to an error -// message. It is the responsibility of the caller to free this error message -// buffer using sqlite3_free(). +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// 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 *crt.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3rbu.c:765:12: */ - var rc int32 - if !(*(*uintptr)(unsafe.Pointer(pzErrmsg)) == uintptr(0)) { - crt.X__assert_fail(tls, ts+9783 /* "*pzErrmsg==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(772), uintptr(unsafe.Pointer(&__func__45))) - } - if zSql == uintptr(0) { - rc = 7 - *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) - } else { - rc = prepareAndCollectError(tls, db, ppStmt, pzErrmsg, zSql) - sqlite3.Xsqlite3_free(tls, zSql) - } - return rc -} - -var __func__45 = *(*[27]int8)(unsafe.Pointer(ts + 9796 /* "prepareFreeAndCo..." */)) /* sqlite3rbu.c:770:2 */ - -// Free the RbuObjIter.azTblCol[] and RbuObjIter.abTblPk[] arrays allocated -// by an earlier call to rbuObjIterCacheTableInfo(). -func rbuObjIterFreeCols(tls *crt.TLS, pIter uintptr) { /* sqlite3rbu.c:787:13: */ - var i int32 - for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { - sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) - sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(i)*8))) - } - sqlite3.Xsqlite3_free(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol) - (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol = 0 - (*RbuObjIter)(unsafe.Pointer(pIter)).FeType = 0 // Invalid value -} - -// Finalize all statements and free all allocations that are specific to -// the current object (table/index pair). -func rbuObjIterClearStatements(tls *crt.TLS, pIter uintptr) { /* sqlite3rbu.c:807:13: */ - var pUp uintptr - - sqlite3.Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) - sqlite3.Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpInsert) - sqlite3.Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpDelete) - sqlite3.Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTmpInsert) - pUp = (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate - for pUp != 0 { - var pTmp uintptr = (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext - sqlite3.Xsqlite3_finalize(tls, (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate) - sqlite3.Xsqlite3_free(tls, pUp) - pUp = pTmp - } - sqlite3.Xsqlite3_free(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol) - sqlite3.Xsqlite3_free(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql) - - (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FpInsert = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FpDelete = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FpTmpInsert = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = 0 - (*RbuObjIter)(unsafe.Pointer(pIter)).FnIdxCol = 0 - (*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol = uintptr(0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql = uintptr(0) -} - -// Clean up any resources allocated as part of the iterator object passed -// as the only argument. -func rbuObjIterFinalize(tls *crt.TLS, pIter uintptr) { /* sqlite3rbu.c:839:13: */ - rbuObjIterClearStatements(tls, pIter) - sqlite3.Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) - sqlite3.Xsqlite3_finalize(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) - rbuObjIterFreeCols(tls, pIter) - crt.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(RbuObjIter{}))) -} - -// Advance the iterator to the next position. -// -// If no error occurs, SQLITE_OK is returned and the iterator is left -// 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 *crt.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3rbu.c:855:12: */ - var rc int32 = (*sqlite3rbu)(unsafe.Pointer(p)).Frc - if rc == 0 { - - /* Free any SQLite statements used while processing the previous object */ - rbuObjIterClearStatements(tls, pIter) - if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { - rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. - ts+9823 /* "DROP TRIGGER IF ..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } +// POSIX Standard: 2.9.2 Minimum Values Added to <limits.h> +// +// Never include this file directly; use <limits.h> instead. - if rc == 0 { - if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { - rbuObjIterFreeCols(tls, pIter) - (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 0 - rc = sqlite3.Xsqlite3_step(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter) - if rc != 100 { - rc = resetAndCollectError(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter, (p + 64 /* &.zErrmsg */)) - (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl = uintptr(0) - } else { - (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl = sqlite3.Xsqlite3_column_text(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter, 0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl = sqlite3.Xsqlite3_column_text(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpTblIter, 1) - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl != 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0) { - rc = 0 - } else { - rc = 7 - } - } - } else { - if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { - var pIdx uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter - rc = sqlite3.Xsqlite3_bind_text(tls, pIdx, 1, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, -1, uintptr(0)) - } - if rc == 0 { - rc = sqlite3.Xsqlite3_step(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter) - if rc != 100 { - rc = resetAndCollectError(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter, (p + 64 /* &.zErrmsg */)) - (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 - (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx = uintptr(0) - } else { - (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx = sqlite3.Xsqlite3_column_text(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter, 0) - (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum = sqlite3.Xsqlite3_column_int(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter, 1) - (*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique = sqlite3.Xsqlite3_column_int(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpIdxIter, 2) - if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx != 0 { - rc = 0 - } else { - rc = 7 - } - } - } - } - } - } +// Determine the wordsize from the preprocessor defines. - if rc != 0 { - rbuObjIterFinalize(tls, pIter) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc - } - return rc -} +// Both x86-64 and x32 use the 64-bit system call interface. -// The implementation of the rbu_target_name() SQL function. This function -// accepts one or two arguments. The first argument is the name of a table - -// the name of a table in the RBU database. The second, if it is present, is 1 -// for a view or 0 for a table. -// -// For a non-vacuum RBU handle, if the table name matches the pattern: -// -// data[0-9]_<name> -// -// where <name> is any sequence of 1 or more characters, <name> is returned. -// Otherwise, if the only argument does not match the above pattern, an SQL -// NULL is returned. -// -// "data_t1" -> "t1" -// "data0123_t2" -> "t2" -// "dataAB_t3" -> NULL -// -// 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 *crt.TLS, pCtx uintptr, argc int32, argv uintptr) { /* sqlite3rbu.c:935:13: */ - var p uintptr = sqlite3.Xsqlite3_user_data(tls, pCtx) - var zIn uintptr - if !((argc == 1) || (argc == 2)) { - crt.X__assert_fail(tls, ts+9994 /* "argc==1 || argc=..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(942), uintptr(unsafe.Pointer(&__func__46))) - } +// These are the standard-mandated minimum values. - zIn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - if zIn != 0 { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - if !((argc == 2) || (argc == 1)) { - crt.X__assert_fail(tls, ts+10013 /* "argc==2 || argc=..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(947), uintptr(unsafe.Pointer(&__func__46))) - } - if (argc == 1) || (0 == sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)))) { - sqlite3.Xsqlite3_result_text(tls, pCtx, zIn, -1, uintptr(0)) - } - } else { - if (crt.Xstrlen(tls, zIn) > uint64(4)) && (crt.Xmemcmp(tls, ts+4320 /* "data" */, zIn, uint64(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++ { - } - if (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(i)))) == '_') && (*(*int8)(unsafe.Pointer(zIn + uintptr((i + 1)))) != 0) { - sqlite3.Xsqlite3_result_text(tls, pCtx, (zIn + uintptr((i + 1))), -1, uintptr(0)) - } - } - } - } -} +// Minimum number of operations in one list I/O call. -var __func__46 = *(*[18]int8)(unsafe.Pointer(ts + 10032 /* "rbuTargetNameFun..." */)) /* sqlite3rbu.c:939:2 */ +// Minimal number of outstanding asynchronous I/O operations. -// Initialize the iterator structure passed as the second argument. -// -// If no error occurs, SQLITE_OK is returned and the iterator is left -// 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 *crt.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3rbu.c:971:12: */ - bp := tls.Alloc(8) - defer tls.Free(8) +// Maximum length of arguments to `execve', including environment. - var rc int32 - crt.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(RbuObjIter{}))) +// Maximum simultaneous processes per real user ID. - rc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, (pIter /* &.pTblIter */), (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, +// Minimal number of timer expiration overruns. - ts+10050 /* "SELECT rbu_targe..." */, crt.VaList(bp, func() uintptr { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - return ts + 10200 /* "AND rootpage!=0 ..." */ - } - return ts + 792 /* "" */ - }()))) +// Maximum length of a host name (not including the terminating null) +// as returned from the GETHOSTNAME function. - if rc == 0 { - rc = prepareAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 8 /* &.pIdxIter */), (p + 64 /* &.zErrmsg */), +// Maximum link count of a file. - ts+10241 /* "SELECT name, roo..." */) - } +// Maximum length of login name. - (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc - return rbuObjIterNext(tls, p, pIter) -} +// Number of bytes in a terminal canonical input queue. -// This is a wrapper around "sqlite3_mprintf(zFmt, ...)". If an OOM occurs, -// an error code is stored in the RBU handle passed as the first argument. -// -// If an error has already occurred (p->rc is already set to something other -// 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 *crt.TLS, p uintptr, zFmt uintptr, va uintptr) uintptr { /* sqlite3rbu.c:1006:13: */ - var zSql uintptr = uintptr(0) - var ap va_list - _ = ap - ap = va - zSql = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if zSql == uintptr(0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 7 - } - } else { - sqlite3.Xsqlite3_free(tls, zSql) - zSql = uintptr(0) - } - _ = ap - return zSql -} +// Number of bytes for which space will be +// available in a terminal input queue. -// Argument zFmt is a sqlite3_mprintf() style format string. The trailing -// arguments are the usual subsitution values. This function performs -// the printf() style substitutions and executes the result as an SQL -// statement on the RBU handles database. -// -// 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 *crt.TLS, p uintptr, db uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3rbu.c:1031:12: */ - var ap va_list - _ = ap - var zSql uintptr - ap = va - zSql = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if zSql == uintptr(0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 7 - } else { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } - } - sqlite3.Xsqlite3_free(tls, zSql) - _ = ap - return (*sqlite3rbu)(unsafe.Pointer(p)).Frc -} +// Maximum number of message queues open for a process. -// Attempt to allocate and return a pointer to a zeroed block of nByte -// bytes. -// -// If an error (i.e. an OOM condition) occurs, return NULL and leave an -// error code in the rbu handle passed as the first argument. Or, if an -// 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 *crt.TLS, p uintptr, nByte sqlite3_int64) uintptr { /* sqlite3rbu.c:1058:13: */ - var pRet uintptr = uintptr(0) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if !(nByte > int64(0)) { - crt.X__assert_fail(tls, ts+63 /* "nByte>0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(1061), uintptr(unsafe.Pointer(&__func__47))) - } - pRet = sqlite3.Xsqlite3_malloc64(tls, uint64(nByte)) - if pRet == uintptr(0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 7 - } else { - crt.Xmemset(tls, pRet, 0, uint64(nByte)) - } - } - return pRet -} +// Maximum number of supported message priorities. -var __func__47 = *(*[10]int8)(unsafe.Pointer(ts + 10366 /* "rbuMalloc" */)) /* sqlite3rbu.c:1058:59 */ +// Number of bytes in a filename. -// 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 *crt.TLS, p uintptr, pIter uintptr, nCol int32) { /* sqlite3rbu.c:1078:13: */ - var nByte sqlite3_int64 = (sqlite3_int64((((uint64(2) * uint64(unsafe.Sizeof(uintptr(0)))) + uint64(unsafe.Sizeof(int32(0)))) + (uint64(3) * uint64(unsafe.Sizeof(u8(0))))) * uint64(nCol))) - var azNew uintptr +// Number of simultaneous supplementary group IDs per process. - azNew = rbuMalloc(tls, p, nByte) - if azNew != 0 { - (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol = azNew - (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType = (azNew + uintptr(nCol)*8) - (*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder = ((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(nCol)*8) - (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk = ((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(nCol)*4) - (*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull = ((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(nCol)) - (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed = ((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(nCol)) - } -} +// Number of files one process can have open at once. -// The first argument must be a nul-terminated string. This function -// returns a copy of the string in memory obtained from sqlite3_malloc(). -// It is the responsibility of the caller to eventually free this memory -// using sqlite3_free(). -// -// 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 *crt.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3rbu.c:1103:13: */ - var zRet uintptr = uintptr(0) +// Number of bytes in a pathname. - if *(*int32)(unsafe.Pointer(pRc)) == 0 { - if zStr != 0 { - var nCopy size_t = (crt.Xstrlen(tls, zStr) + uint64(1)) - zRet = sqlite3.Xsqlite3_malloc64(tls, uint64(nCopy)) - if zRet != 0 { - crt.Xmemcpy(tls, zRet, zStr, nCopy) - } else { - *(*int32)(unsafe.Pointer(pRc)) = 7 - } - } - } +// Number of bytes than can be written atomically to a pipe. - return zRet -} +// The number of repeated occurrences of a BRE permitted by the +// REGEXEC and REGCOMP functions when using the interval notation. -// Finalize the statement passed as the second argument. -// -// 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 *crt.TLS, p uintptr, pStmt uintptr) { /* sqlite3rbu.c:1128:13: */ - bp := tls.Alloc(8) - defer tls.Free(8) +// Minimal number of realtime signals reserved for the application. - var db uintptr = sqlite3.Xsqlite3_db_handle(tls, pStmt) - var rc int32 = sqlite3.Xsqlite3_finalize(tls, pStmt) - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (rc != 0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) - } -} - -// Determine the type of a table. -// -// peType is of type (int*), a pointer to an output parameter of type -// (int). This call sets the output parameter as follows, depending -// on the type of the table specified by parameters dbName and zTbl. -// -// RBU_PK_NOTABLE: No such table. -// RBU_PK_NONE: Table has an implicit rowid. -// RBU_PK_IPK: Table has an explicit IPK column. -// RBU_PK_EXTERNAL: Table has an external PK index. -// RBU_PK_WITHOUT_ROWID: Table is WITHOUT ROWID. -// RBU_PK_VTAB: Table is a virtual table. -// -// Argument *piPk is also of type (int*), and also points to an output -// parameter. Unless the table has an external primary key index -// (i.e. unless *peType is set to 3), then *piPk is set to zero. Or, -// if the table does have an external primary key index, then *piPk -// is set to the root page number of the primary key index before -// returning. -// -// ALGORITHM: -// -// if( no entry exists in sqlite_master ){ -// return RBU_PK_NOTABLE -// }else if( sql for the entry starts with "CREATE VIRTUAL" ){ -// return RBU_PK_VTAB -// }else if( "PRAGMA index_list()" for the table contains a "pk" index ){ -// if( the index that is the pk exists in sqlite_master ){ -// *piPK = rootpage of that index. -// return RBU_PK_EXTERNAL -// }else{ -// return RBU_PK_WITHOUT_ROWID -// } -// }else if( "PRAGMA table_info()" lists one or more "pk" columns ){ -// return RBU_PK_IPK -// }else{ -// return RBU_PK_NONE -// } -func rbuTableType(tls *crt.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3rbu.c:1176:13: */ - bp := tls.Alloc(64) - defer tls.Free(64) +// Number of semaphores a process can have. - // 0) SELECT count(*) FROM sqlite_master where name=%Q AND IsVirtual(%Q) - // 1) PRAGMA index_list = ? - // 2) SELECT count(*) FROM sqlite_master where name=%Q - // 3) PRAGMA table_info = ? - // var aStmt [4]uintptr at bp+32, 32 +// Maximal value of a semaphore. - var zOrig uintptr - var zIdx uintptr - var i uint32 - *(*[4]uintptr)(unsafe.Pointer(bp + 32 /* aStmt */)) = [4]uintptr{uintptr(0), uintptr(0), uintptr(0), uintptr(0)} +// Number of pending realtime signals. - *(*int32)(unsafe.Pointer(peType)) = 0 - *(*int32)(unsafe.Pointer(piPk)) = 0 +// Largest value of a `ssize_t'. - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - crt.X__assert_fail(tls, ts+10376 /* "p->rc==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(1194), uintptr(unsafe.Pointer(&__func__48))) - } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + uintptr(0)*8), (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, +// Number of streams a process can have open at once. - ts+10385 /* "SELECT (sql LIKE..." */, crt.VaList(bp, zTab))) - if !(((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) || (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(0)*8))) != 100)) { - goto __1 - } - // Either an error, or no such table. - goto rbuTableType_end -__1: - ; - if !(sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(0)*8)), 0) != 0) { - goto __2 - } - *(*int32)(unsafe.Pointer(peType)) = 5 // virtual table - goto rbuTableType_end -__2: - ; - *(*int32)(unsafe.Pointer(piTnum)) = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(0)*8)), 1) +// The number of bytes in a symbolic link. - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + uintptr(1)*8), (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+395 /* "PRAGMA index_lis..." */, crt.VaList(bp+8, zTab))) - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { - goto __3 - } - goto rbuTableType_end -__3: - ; -__4: - if !(sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(1)*8))) == 100) { - goto __5 - } - zOrig = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(1)*8)), 3) - zIdx = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(1)*8)), 1) - if !(((zOrig != 0) && (zIdx != 0)) && (int32(*(*u8)(unsafe.Pointer(zOrig + uintptr(0)))) == 'p')) { - goto __6 - } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + uintptr(2)*8), (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, - ts+10466 /* "SELECT rootpage ..." */, crt.VaList(bp+16, zIdx))) - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - goto __7 - } - if !(sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(2)*8))) == 100) { - goto __8 - } - *(*int32)(unsafe.Pointer(piPk)) = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(2)*8)), 0) - *(*int32)(unsafe.Pointer(peType)) = 3 - goto __9 -__8: - *(*int32)(unsafe.Pointer(peType)) = 4 -__9: - ; -__7: - ; - goto rbuTableType_end -__6: - ; - goto __4 -__5: - ; +// The number of symbolic links that can be traversed in the +// resolution of a pathname in the absence of a loop. - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + uintptr(3)*8), (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+333 /* "PRAGMA table_inf..." */, crt.VaList(bp+24, zTab))) - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - goto __10 - } -__11: - if !(sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(3)*8))) == 100) { - goto __12 - } - if !(sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(3)*8)), 5) > 0) { - goto __13 - } - *(*int32)(unsafe.Pointer(peType)) = 2 // explicit IPK column - goto rbuTableType_end -__13: - ; - goto __11 -__12: - ; - *(*int32)(unsafe.Pointer(peType)) = 1 -__10: - ; +// Number of timer for a process. -rbuTableType_end: - i = uint32(0) -__14: - if !(uint64(i) < (uint64(unsafe.Sizeof([4]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) { - goto __16 - } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(i)*8))) - goto __15 -__15: - i++ - goto __14 - goto __16 -__16: -} +// Maximum number of characters in a tty name. -var __func__48 = *(*[13]int8)(unsafe.Pointer(ts + 10517 /* "rbuTableType" */)) /* sqlite3rbu.c:1182:2 */ +// Maximum length of a timezone name (element of `tzname'). -// This is a helper function for rbuObjIterCacheTableInfo(). It populates -// the pIter->abIndexed[] array. -func rbuObjIterCacheIndexedCols(tls *crt.TLS, p uintptr, pIter uintptr) { /* sqlite3rbu.c:1260:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) +// Maximum clock resolution in nanoseconds. - *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)) = uintptr(0) - var bIndex int32 = 0 +// Get the implementation-specific values for the above. +// Minimum guaranteed maximum values for system limits. Linux version. +// Copyright (C) 1993-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 2.1 of the +// License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; see the file COPYING.LIB. If +// not, see <http://www.gnu.org/licenses/>. - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - crt.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, (uint64(unsafe.Sizeof(u8(0))) * uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol))) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16 /* &pList */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10530 /* "PRAGMA main.inde..." */, crt.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) - } +// The kernel header pollutes the namespace with the NR_OPEN symbol +// and defines LINK_MAX although filesystems have different maxima. A +// similar thing is true for OPEN_MAX: the limit can be changed at +// runtime and therefore the macro must not be defined. Remove this +// after including the header if necessary. - (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)))) { - var zIdx uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)), 1) - var bPartial int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)), 4) - *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)) = uintptr(0) - if zIdx == uintptr(0) { - break - } - if bPartial != 0 { - crt.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, (uint64(unsafe.Sizeof(u8(0))) * uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol))) - } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24 /* &pXInfo */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10558 /* "PRAGMA main.inde..." */, crt.VaList(bp+8, zIdx))) - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)))) { - var iCid int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) - if iCid >= 0 { - *(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(iCid))) = u8(1) - } - if iCid == -2 { - crt.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, (uint64(unsafe.Sizeof(u8(0))) * uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol))) - } - } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */))) - bIndex = 1 - (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex++ - } +// The kernel sources contain a file with all the needed information. +// SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note - if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 4 { - // "PRAGMA index_list" includes the main PK b-tree - (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex-- - } +// Have to remove NR_OPEN? +// Have to remove LINK_MAX? +// Have to remove OPEN_MAX? +// Have to remove ARG_MAX? - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */))) - if bIndex == 0 { - (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed = uintptr(0) - } -} +// The number of data keys per process. +// This is the value this implementation supports. -// If they are not already populated, populate the pIter->azTblCol[], -// pIter->abTblPk[], pIter->nTblCol and pIter->bRowid variables according to -// the table (not index) that the iterator currently points to. -// -// 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 *crt.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3rbu.c:1314:12: */ - bp := tls.Alloc(72) - defer tls.Free(72) +// Controlling the iterations of destructors for thread-specific data. +// Number of iterations this implementation does. - if (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol == uintptr(0) { - *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) = uintptr(0) - var nCol int32 = 0 - var i int32 // for() loop iterator variable - var bRbuRowid int32 = 0 // If input table has column "rbu_rowid" - var iOrder int32 = 0 - *(*int32)(unsafe.Pointer(bp + 56 /* iTnum */)) = 0 - - // Figure out the type of table this step will deal with. - if !((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 0) { - crt.X__assert_fail(tls, ts+10587 /* "pIter->eType==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(1324), uintptr(unsafe.Pointer(&__func__49))) - } - rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, (pIter + 72 /* &.eType */), bp+56 /* &iTnum */, (pIter + 108 /* &.iPkTnum */)) - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+10603 /* "no such table: %..." */, crt.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - return (*sqlite3rbu)(unsafe.Pointer(p)).Frc - } - if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { - (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum = *(*int32)(unsafe.Pointer(bp + 56 /* iTnum */)) - } - - if !((((((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 2)) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3)) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 4)) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 5)) { - crt.X__assert_fail(tls, ts+10621 /* "pIter->eType==1 ..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(1333), uintptr(unsafe.Pointer(&__func__49))) - } - - // 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+64 /* &pStmt */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10713 /* "SELECT * FROM '%..." */, crt.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - nCol = sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) - rbuAllocateIterArrays(tls, p, pIter, nCol) - } - for i = 0; ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (i < nCol); i++ { - var zName uintptr = sqlite3.Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) - if sqlite3.Xsqlite3_strnicmp(tls, ts+10732 /* "rbu_" */, zName, 4) != 0 { - var zCopy uintptr = rbuStrndup(tls, zName, (p + 56 /* &.rc */)) - *(*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(crt.PostIncInt32(&(*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol, 1))*8)) = zCopy - } else if 0 == sqlite3.Xsqlite3_stricmp(tls, ts+10737 /* "rbu_rowid" */, zName) { - bRbuRowid = 1 - } - } - sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) - *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) = uintptr(0) - - if (((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && - ((crt.Bool32((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0)) && - (bRbuRowid != (crt.Bool32(((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 5) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1)))) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, - ts+10747 /* "table %q %s rbu_..." */, crt.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, - func() uintptr { - if bRbuRowid != 0 { - return ts + 10776 /* "may not have" */ - } - return ts + 10789 /* "requires" */ - }())) - } +// The number of threads per process. +// We have no predefined limit on the number of threads. - // Check that all non-HIDDEN columns in the destination table are also - // present in the input table. Populate the abTblPk[], azTblType[] and - // aiTblOrder[] arrays at the same time. - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64 /* &pStmt */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10798 /* "PRAGMA table_inf..." */, crt.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) - } - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)))) { - var zName uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) - if zName == uintptr(0) { - break - } // An OOM - finalize() below returns S_NOMEM - for i = iOrder; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { - if 0 == crt.Xstrcmp(tls, zName, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8))) { - break - } - } - if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+10820, /* "column missing f..." */ - crt.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) - } else { - var iPk int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) - var bNotNull int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 3) - var zType uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 2) - - if i != iOrder { - { - var t int32 = *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)) - *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4)) = *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(iOrder)*4)) - *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(iOrder)*4)) = t - } +// Maximum amount by which a process can descrease its asynchronous I/O +// priority level. - { - var t uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iOrder)*8)) - *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iOrder)*8)) = t - } - } +// Minimum size for a thread. We are free to choose a reasonable value. - *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iOrder)*8)) = rbuStrndup(tls, zType, (p + 56 /* &.rc */)) - if !(iPk >= 0) { - crt.X__assert_fail(tls, ts+10847 /* "iPk>=0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(1403), uintptr(unsafe.Pointer(&__func__49))) - } - *(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iOrder))) = u8(iPk) - *(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iOrder))) = (u8(crt.Bool32((u8(bNotNull) != 0) || (iPk != 0)))) - iOrder++ - } - } +// Maximum number of timer expiration overruns. - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) - rbuObjIterCacheIndexedCols(tls, p, pIter) - if !(((*RbuObjIter)(unsafe.Pointer(pIter)).FeType != 5) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed == uintptr(0))) { - crt.X__assert_fail(tls, ts+10854 /* "pIter->eType!=5 ..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(1412), uintptr(unsafe.Pointer(&__func__49))) - } - if !(((*RbuObjIter)(unsafe.Pointer(pIter)).FeType != 5) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex == 0)) { - crt.X__assert_fail(tls, ts+10893 /* "pIter->eType!=5 ..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(1413), uintptr(unsafe.Pointer(&__func__49))) - } - } +// Maximum tty name length. - return (*sqlite3rbu)(unsafe.Pointer(p)).Frc -} +// Maximum login name length. This is arbitrary. -var __func__49 = *(*[25]int8)(unsafe.Pointer(ts + 10929 /* "rbuObjIterCacheT..." */)) /* sqlite3rbu.c:1314:70 */ +// Maximum host name length. -// 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 *crt.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3rbu.c:1424:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) +// Maximum message queue priority level. - var zList uintptr = uintptr(0) - var zSep uintptr = ts + 792 /* "" */ - 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)*8)) - zList = rbuMPrintf(tls, p, ts+10954 /* "%z%s\"%w\"" */, crt.VaList(bp, zList, zSep, z)) - zSep = ts + 359 /* ", " */ - } - return zList -} +// Maximum value the semaphore can have. -// Return a comma separated list of the quoted PRIMARY KEY column names, -// 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 *crt.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3rbu.c:1445:13: */ - bp := tls.Alloc(40) - defer tls.Free(40) +// ssize_t is not formally required to be the signed type +// corresponding to size_t, but it is for all configurations supported +// by glibc. - var iPk int32 = 1 - var zRet uintptr = uintptr(0) - var zSep uintptr = ts + 792 /* "" */ - 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)*8)) - zRet = rbuMPrintf(tls, p, ts+10963 /* "%z%s%s\"%w\"%s" */, crt.VaList(bp, zRet, zSep, zPre, zCol, zPost)) - zSep = zSeparator - break - } - } - if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { - break - } - iPk++ - } - return zRet -} +// This value is a guaranteed minimum maximum. +// The current maximum can be got from `sysconf'. -// This function is called as part of restarting an RBU vacuum within -// stage 1 of the process (while the *-oal file is being built) while -// updating a table (not an index). The table may be a rowid table or -// a WITHOUT ROWID table. It queries the target database to find the -// largest key that has already been written to the target table and -// constructs a WHERE clause that can be used to extract the remaining -// rows from the source table. For a rowid table, the WHERE clause -// is of the form: -// -// "WHERE _rowid_ > ?" +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. // -// and for WITHOUT ROWID tables: +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// "WHERE (key1, key2) > (?, ?)" +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// Instead of "?" placeholders, the actual WHERE clauses created by -// this function contain literal SQL values. -func rbuVacuumTableStart(tls *crt.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3rbu.c:1490:13: */ - bp := tls.Alloc(80) - defer tls.Free(80) - - *(*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 + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, - ts+10976 /* "SELECT max(_rowi..." */, crt.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)))) { - var iMax sqlite3_int64 = sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+11008 /* " WHERE _rowid_ >..." */, crt.VaList(bp+16, iMax)) - } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) - } else { - var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+792 /* "" */, ts+359 /* ", " */, ts+389 /* " DESC" */) - var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+11031 /* "quote(" */, ts+11038 /* "||','||" */, ts+793 /* ")" */) - var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+792 /* "" */, ts+359 /* ", " */, ts+792 /* "" */) - - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72 /* &pMax */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, - ts+11046, /* "SELECT %s FROM \"..." */ - crt.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)))) { - var zVal uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+11088 /* " WHERE (%s) > (%..." */, crt.VaList(bp+56, zList, zVal)) - } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) - } +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. - sqlite3.Xsqlite3_free(tls, zOrder) - sqlite3.Xsqlite3_free(tls, zSelect) - sqlite3.Xsqlite3_free(tls, zList) - } - return zRet -} +// Never include this file directly; include <limits.h> instead. -// This function is called as part of restating an RBU vacuum when the -// current operation is writing content to an index. If possible, it -// queries the target index b-tree for the largest key already written to -// it, then composes and returns an expression that can be used in a WHERE -// clause to select the remaining required rows from the source table. -// It is only possible to return such an expression if: -// -// * The index contains no DESC columns, and -// * The last key written to the index before the operation was -// suspended does not contain any NULL values. -// -// The expression is of the form: -// -// (index-field1, index-field2, ...) > (?, ?, ...) -// -// except that the "?" placeholders are replaced with literal values. -// -// 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 rbuVacuumIndexStart(tls *crt.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3rbu.c:1557:6: */ - bp := tls.Alloc(192) - defer tls.Free(192) +// The maximum `ibase' and `obase' values allowed by the `bc' utility. - var zOrder uintptr - var zLhs uintptr - var zSelect uintptr - var zVector uintptr - var zRet uintptr - var bFailed int32 - var zSep uintptr - var iCol int32 - // var pXInfo uintptr at bp+176, 8 +// The maximum number of elements allowed in an array by the `bc' utility. - var i int32 - var iCid int32 - var zCollate uintptr - var zCol uintptr - var zQuoted uintptr - // var pSel uintptr at bp+184, 8 - zOrder = uintptr(0) - zLhs = uintptr(0) - zSelect = uintptr(0) - zVector = uintptr(0) - zRet = uintptr(0) - bFailed = 0 - zSep = ts + 792 /* "" */ - iCol = 0 - *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) +// The maximum `scale' value allowed by the `bc' utility. - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176 /* &pXInfo */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10558 /* "PRAGMA main.inde..." */, crt.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) -__1: - if !(((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))))) { - goto __2 - } - iCid = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) - zCollate = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - if !(sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) != 0) { - goto __3 - } - bFailed = 1 - goto __2 -__3: - ; +// The maximum length of a string constant accepted by the `bc' utility. - if !(iCid < 0) { - goto __4 - } - if !((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 2) { - goto __6 - } - i = 0 -__8: - if !(int32(*(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == 0) { - goto __10 - } - goto __9 -__9: - i++ - goto __8 - goto __10 -__10: - ; - if !(i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol) { - crt.X__assert_fail(tls, ts+11108 /* "i<pIter->nTblCol" */, ts+9694 /* "testdata/sqlite-..." */, uint32(1587), uintptr(unsafe.Pointer(&__func__50))) - } - zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - goto __7 -__6: - zCol = ts + 8365 /* "_rowid_" */ -__7: - ; - goto __5 -__4: - zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) -__5: - ; +// The maximum number of weights that can be assigned to an entry of +// the LC_COLLATE `order' keyword in the locale definition file. - zLhs = rbuMPrintf(tls, p, ts+11125, /* "%z%s \"%w\" COLLAT..." */ - crt.VaList(bp+8, zLhs, zSep, zCol, zCollate)) - zOrder = rbuMPrintf(tls, p, ts+11146, /* "%z%s \"rbu_imp_%d..." */ - crt.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) - zSelect = rbuMPrintf(tls, p, ts+11182, /* "%z%s quote(\"rbu_..." */ - crt.VaList(bp+80, zSelect, zSep, iCol, zCol)) - zSep = ts + 359 /* ", " */ - iCol++ - goto __1 -__2: - ; - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) - if !(bFailed != 0) { - goto __11 - } - goto index_start_out -__11: - ; +// The maximum number of expressions that can be nested +// within parentheses by the `expr' utility. - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - goto __12 - } - *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) +// The maximum length, in bytes, of an input line. - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184 /* &pSel */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+11209, /* "SELECT %s FROM \"..." */ - crt.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) - if !(((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */))))) { - goto __13 - } - zSep = ts + 792 /* "" */ - iCol = 0 -__14: - if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { - goto __16 - } - zQuoted = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)), iCol) - if !(int32(*(*int8)(unsafe.Pointer(zQuoted + uintptr(0)))) == 'N') { - goto __17 - } - bFailed = 1 - goto __16 -__17: - ; - zVector = rbuMPrintf(tls, p, ts+11257 /* "%z%s%s" */, crt.VaList(bp+136, zVector, zSep, zQuoted)) - zSep = ts + 359 /* ", " */ - goto __15 -__15: - iCol++ - goto __14 - goto __16 -__16: - ; +// The maximum number of repeated occurrences of a regular expression +// permitted when using the interval notation `\{M,N\}'. - if !(!(bFailed != 0)) { - goto __18 - } - zRet = rbuMPrintf(tls, p, ts+11264 /* "(%s) > (%s)" */, crt.VaList(bp+160, zLhs, zVector)) -__18: - ; -__13: - ; - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */))) -__12: - ; +// The maximum number of bytes in a character class name. We have no +// fixed limit, 2048 is a high number. -index_start_out: - sqlite3.Xsqlite3_free(tls, zOrder) - sqlite3.Xsqlite3_free(tls, zSelect) - sqlite3.Xsqlite3_free(tls, zVector) - sqlite3.Xsqlite3_free(tls, zLhs) - return zRet -} +// These values are implementation-specific, +// and may vary within the implementation. +// Their precise values can be obtained from sysconf. -var __func__50 = *(*[20]int8)(unsafe.Pointer(ts + 11276 /* "rbuVacuumIndexSt..." */)) /* sqlite3rbu.c:1560:2 */ +// This value is defined like this in regex.h. -// This function is used to create a SELECT list (the list of SQL -// expressions that follows a SELECT keyword) for a SELECT statement -// used to read from an data_xxx or rbu_tmp_xxx table while updating the -// index object currently indicated by the iterator object passed as the -// second argument. A "PRAGMA index_xinfo = <idxname>" statement is used -// to obtain the required information. -// -// If the index is of the following form: +// Copyright (C) 1991-2018 Free Software Foundation, Inc. // -// CREATE INDEX i1 ON t1(c, b COLLATE nocase); +//This file is part of GCC. // -// and "t1" is a table with an explicit INTEGER PRIMARY KEY column -// "ipk", the returned string is: +//GCC is free software; you can redistribute it and/or modify it under +//the terms of the GNU General Public License as published by the Free +//Software Foundation; either version 3, or (at your option) any later +//version. // -// "`c` COLLATE 'BINARY', `b` COLLATE 'NOCASE', `ipk` COLLATE 'BINARY'" +//GCC is distributed in the hope that it will be useful, but WITHOUT ANY +//WARRANTY; without even the implied warranty of MERCHANTABILITY or +//FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +//for more details. // -// As well as the returned string, three other malloc'd strings are -// returned via output parameters. As follows: +//Under Section 7 of GPL version 3, you are granted additional +//permissions described in the GCC Runtime Library Exception, version +//3.1, as published by the Free Software Foundation. // -// pzImposterCols: ... -// pzImposterPk: ... -// pzWhere: ... -func rbuObjIterGetIndexCols(tls *crt.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3rbu.c:1670:13: */ - bp := tls.Alloc(208) - defer tls.Free(208) +//You should have received a copy of the GNU General Public License and +//a copy of the GCC Runtime Library Exception along with this program; +//see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +//<http://www.gnu.org/licenses/>. - var rc int32 = (*sqlite3rbu)(unsafe.Pointer(p)).Frc // Error code - var rc2 int32 // sqlite3_finalize() return code - var zRet uintptr = uintptr(0) // String to return - var zImpCols uintptr = uintptr(0) // String to return via *pzImposterCols - 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 + 792 /* "" */ // Set to ", " later on - var zAnd uintptr = ts + 792 /* "" */ // Set to " AND " later on - *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = ? +// Number of bits in a `char'. - if rc == 0 { - if !((*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg == uintptr(0)) { - crt.X__assert_fail(tls, ts+11296 /* "p->zErrmsg==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(1690), uintptr(unsafe.Pointer(&__func__51))) - } - rc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200 /* &pXInfo */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10558 /* "PRAGMA main.inde..." */, crt.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) - } +// Maximum length of a multibyte character. - for (rc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)))) { - var iCid int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 1) - var bDesc int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 3) - var zCollate uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 4) - var zCol uintptr = uintptr(0) - var zType uintptr +// Minimum and maximum values a `signed char' can hold. - if iCid == -2 { - var iSeq int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) - zRet = sqlite3.Xsqlite3_mprintf(tls, ts+11310 /* "%z%s(%.*s) COLLA..." */, crt.VaList(bp+8, zRet, zCom, - (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) - zType = ts + 792 /* "" */ - } else { - if iCid < 0 { - // An integer primary key. If the table has an explicit IPK, use - // its name. Otherwise, use "rbu_rowid". - if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 2 { - var i int32 - for i = 0; int32(*(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == 0; i++ { - } - if !(i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol) { - crt.X__assert_fail(tls, ts+11108 /* "i<pIter->nTblCol" */, ts+9694 /* "testdata/sqlite-..." */, uint32(1716), uintptr(unsafe.Pointer(&__func__51))) - } - zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - } else if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - zCol = ts + 8365 /* "_rowid_" */ - } else { - zCol = ts + 10737 /* "rbu_rowid" */ - } - zType = ts + 11332 /* "INTEGER" */ - } else { - zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) - zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) - } - zRet = sqlite3.Xsqlite3_mprintf(tls, ts+11340 /* "%z%s\"%w\" COLLATE..." */, crt.VaList(bp+48, zRet, zCom, zCol, zCollate)) - } +// Maximum value an `unsigned char' can hold. (Minimum is 0). - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0) || (sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 5) != 0) { - var zOrder uintptr = func() uintptr { - if bDesc != 0 { - return ts + 389 /* " DESC" */ - } - return ts + 792 /* "" */ - }() - zImpPK = sqlite3.Xsqlite3_mprintf(tls, ts+11360, /* "%z%s\"rbu_imp_%d%..." */ - crt.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) - } - zImpCols = sqlite3.Xsqlite3_mprintf(tls, ts+11381, /* "%z%s\"rbu_imp_%d%..." */ - crt.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) - zWhere = sqlite3.Xsqlite3_mprintf(tls, - ts+11414 /* "%z%s\"rbu_imp_%d%..." */, crt.VaList(bp+168, zWhere, zAnd, nBind, zCol)) - if (((zRet == uintptr(0)) || (zImpPK == uintptr(0))) || (zImpCols == uintptr(0))) || (zWhere == uintptr(0)) { - rc = 7 - } - zCom = ts + 359 /* ", " */ - zAnd = ts + 11438 /* " AND " */ - nBind++ - } +// Minimum and maximum values a `char' can hold. - rc2 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */))) - if rc == 0 { - rc = rc2 - } +// Minimum and maximum values a `signed short int' can hold. - if rc != 0 { - sqlite3.Xsqlite3_free(tls, zRet) - sqlite3.Xsqlite3_free(tls, zImpCols) - sqlite3.Xsqlite3_free(tls, zImpPK) - sqlite3.Xsqlite3_free(tls, zWhere) - zRet = uintptr(0) - zImpCols = uintptr(0) - zImpPK = uintptr(0) - zWhere = uintptr(0) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc - } - - *(*uintptr)(unsafe.Pointer(pzImposterCols)) = zImpCols - *(*uintptr)(unsafe.Pointer(pzImposterPk)) = zImpPK - *(*uintptr)(unsafe.Pointer(pzWhere)) = zWhere - *(*int32)(unsafe.Pointer(pnBind)) = nBind - return zRet -} +// Maximum value an `unsigned short int' can hold. (Minimum is 0). -var __func__51 = *(*[23]int8)(unsafe.Pointer(ts + 11444 /* "rbuObjIterGetInd..." */)) /* sqlite3rbu.c:1677:2 */ +// Minimum and maximum values a `signed int' can hold. -// Assuming the current table columns are "a", "b" and "c", and the zObj -// paramter is passed "old", return a string of the form: -// -// "old.a, old.b, old.b" -// -// With the column names escaped. -// -// For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append -// the text ", old._rowid_" to the returned value. -func rbuObjIterGetOldlist(tls *crt.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3rbu.c:1782:13: */ - bp := tls.Alloc(64) - defer tls.Free(64) +// Maximum value an `unsigned int' can hold. (Minimum is 0). - var zList uintptr = uintptr(0) - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0) { - var zS uintptr = ts + 792 /* "" */ - 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)*8)) - zList = sqlite3.Xsqlite3_mprintf(tls, ts+11467 /* "%z%s%s.\"%w\"" */, crt.VaList(bp, zList, zS, zObj, zCol)) - } else { - zList = sqlite3.Xsqlite3_mprintf(tls, ts+11479 /* "%z%sNULL" */, crt.VaList(bp+32, zList, zS)) - } - zS = ts + 359 /* ", " */ - if zList == uintptr(0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 7 - break - } - } +// Minimum and maximum values a `signed long int' can hold. +// (Same as `int'). - // For a table with implicit rowids, append "old._rowid_" to the list. - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1) { - zList = rbuMPrintf(tls, p, ts+11488 /* "%z, %s._rowid_" */, crt.VaList(bp+48, zList, zObj)) - } - } - return zList -} +// Maximum value an `unsigned long int' can hold. (Minimum is 0). -// Return an expression that can be used in a WHERE clause to match the -// primary key of the current table. For example, if the table is: -// -// CREATE TABLE t1(a, b, c, PRIMARY KEY(b, c)); -// -// Return the string: -// -// "b = ?1 AND c = ?2" -func rbuObjIterGetWhere(tls *crt.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3rbu.c:1823:13: */ - bp := tls.Alloc(80) - defer tls.Free(80) +// Minimum and maximum values a `signed long long int' can hold. - var zList uintptr = uintptr(0) - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 5) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1) { - zList = rbuMPrintf(tls, p, ts+11503 /* "_rowid_ = ?%d" */, crt.VaList(bp, ((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol+1))) - } else if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3 { - var zSep uintptr = ts + 792 /* "" */ - 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+11517 /* "%z%sc%d=?%d" */, crt.VaList(bp+8, zList, zSep, i, (i+1))) - zSep = ts + 11438 /* " AND " */ - } - } - zList = rbuMPrintf(tls, p, - ts+11529 /* "_rowid_ = (SELEC..." */, crt.VaList(bp+40, zList)) - } else { - var zSep uintptr = ts + 792 /* "" */ - 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)*8)) - zList = rbuMPrintf(tls, p, ts+11579 /* "%z%s\"%w\"=?%d" */, crt.VaList(bp+48, zList, zSep, zCol, (i+1))) - zSep = ts + 11438 /* " AND " */ - } - } - } - return zList -} +// Maximum value an `unsigned long long int' can hold. (Minimum is 0). -// The SELECT statement iterating through the keys for the current object -// (p->objiter.pSelect) currently points to a valid row. However, there -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:1864:13: */ - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+11592 /* "invalid rbu_cont..." */, 0) -} +// This administrivia gets added to the end of limits.h +// if the system has its own version of limits.h. -// Return a nul-terminated string containing the comma separated list of -// assignments that should be included following the "SET" keyword of -// an UPDATE statement used to update the table object that the iterator -// passed as the second argument currently points to if the rbu_control -// column of the data_xxx table entry is set to zMask. -// -// The memory for the returned string is obtained from sqlite3_malloc(). -// It is the responsibility of the caller to eventually free it using -// sqlite3_free(). -// -// If an OOM error is encountered when allocating space for the new -// string, an error code is left in the rbu handle passed as the first -// 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 *crt.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3rbu.c:1887:13: */ - bp := tls.Alloc(112) - defer tls.Free(112) +type z_crc_t = uint32 /* zconf.h:429:17 */ - var zList uintptr = uintptr(0) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var i int32 +// Define some macros helping to catch buffer overflows. - if int32(crt.Xstrlen(tls, zMask)) != (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { - rbuBadControlError(tls, p) - } else { - var zSep uintptr = ts + 792 /* "" */ - 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+11579, /* "%z%s\"%w\"=?%d" */ - crt.VaList(bp, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1))) - zSep = ts + 359 /* ", " */ - } else if int32(c) == 'd' { - zList = rbuMPrintf(tls, p, ts+11618, /* "%z%s\"%w\"=rbu_del..." */ - crt.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1))) - zSep = ts + 359 /* ", " */ - } else if int32(c) == 'f' { - zList = rbuMPrintf(tls, p, ts+11648, /* "%z%s\"%w\"=rbu_fos..." */ - crt.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1))) - zSep = ts + 359 /* ", " */ - } - } - } - } - return zList -} +// MVS linker does not support external names larger than 8 bytes -// Return a nul-terminated string consisting of nByte comma separated -// "?" expressions. For example, if nByte is 3, return a pointer to -// a buffer containing the string "?,?,?". // -// The memory for the returned string is obtained from sqlite3_malloc(). -// It is the responsibility of the caller to eventually free it using -// sqlite3_free(). +// The 'zlib' compression library provides in-memory compression and +// decompression functions, including integrity checks of the uncompressed data. +// This version of the library supports only one compression method (deflation) +// but other algorithms will be added later and will have the same stream +// interface. // -// If an OOM error is encountered when allocating space for the new -// string, an error code is left in the rbu handle passed as the first -// 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 *crt.TLS, p uintptr, nBind int32) uintptr { /* sqlite3rbu.c:1941:13: */ - var zRet uintptr = uintptr(0) - var nByte sqlite3_int64 = ((int64(2) * sqlite3_int64(nBind)) + int64(1)) - - zRet = rbuMalloc(tls, p, nByte) - if zRet != 0 { - var i int32 - for i = 0; i < nBind; i++ { - *(*int8)(unsafe.Pointer(zRet + uintptr((i * 2)))) = int8('?') - *(*int8)(unsafe.Pointer(zRet + uintptr(((i * 2) + 1)))) = func() int8 { - if (i + 1) == nBind { - return int8(0) - } - return int8(',') - }() - } - } - return zRet +// Compression can be done in a single step if the buffers are large enough, +// or can be done by repeated calls of the compression function. In the latter +// case, the application must provide more input and/or consume the output +// (providing more output space) before each call. +// +// The compressed data format used by default by the in-memory functions is +// the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped +// around a deflate stream, which is itself documented in RFC 1951. +// +// The library also supports reading and writing files in gzip (.gz) format +// with an interface similar to that of stdio using the functions that start +// with "gz". The gzip format is different from the zlib format. gzip is a +// gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. +// +// This library can optionally read and write gzip and raw deflate streams in +// memory as well. +// +// The zlib format was designed to be compact and fast for use in memory +// and on communications channels. The gzip format was designed for single- +// file compression on file systems, has a larger header than zlib to maintain +// directory information, and uses a different, slower check method than zlib. +// +// The library does not install any signal handler. The decoder checks +// the consistency of the compressed data, so the library should never crash +// even in the case of corrupted input. + +type alloc_func = uintptr /* zlib.h:81:16 */ +type free_func = uintptr /* zlib.h:82:16 */ + +type z_stream_s = struct { + Fnext_in uintptr + Favail_in uInt + Ftotal_in uLong + Fnext_out uintptr + Favail_out uInt + Ftotal_out uLong + Fmsg uintptr + Fstate uintptr + Fzalloc alloc_func + Fzfree free_func + Fopaque voidpf + Fdata_type int32 + Fadler uLong + Freserved uLong +} + +type z_stream = z_stream_s /* zlib.h:106:3 */ + +type z_streamp = uintptr /* zlib.h:108:22 */ + +// +// gzip header information passed to and from zlib routines. See RFC 1952 +// for more details on the meanings of these fields. +type gz_header_s = struct { + Ftext int32 + Ftime uLong + Fxflags int32 + Fos int32 + Fextra uintptr + Fextra_len uInt + Fextra_max uInt + Fname uintptr + Fname_max uInt + Fcomment uintptr + Fcomm_max uInt + Fhcrc int32 + Fdone int32 + _ [4]byte } -// The iterator currently points to a table (not index) of type -// RBU_PK_WITHOUT_ROWID. This function creates the PRIMARY KEY -// declaration for the corresponding imposter table. For example, -// if the iterator points to a table created as: -// -// CREATE TABLE t1(a, b, c, PRIMARY KEY(b, a DESC)) WITHOUT ROWID // -// this function returns: -// -// PRIMARY KEY("b", "a" DESC) -func rbuWithoutRowidPK(tls *crt.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3rbu.c:1968:13: */ - bp := tls.Alloc(72) - defer tls.Free(72) - - var z uintptr = uintptr(0) - if !((*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0)) { - crt.X__assert_fail(tls, ts+11685 /* "pIter->zIdx==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(1970), uintptr(unsafe.Pointer(&__func__52))) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var zSep uintptr = ts + 11700 /* "PRIMARY KEY(" */ - *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) - *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = <pk-index> - - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56 /* &pXList */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10530 /* "PRAGMA main.inde..." */, crt.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)))) { - var zOrig uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) - if (zOrig != 0) && (crt.Xstrcmp(tls, zOrig, ts+11713 /* "pk" */) == 0) { - var zIdx uintptr = sqlite3.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+64 /* &pXInfo */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10558 /* "PRAGMA main.inde..." */, crt.VaList(bp+8, zIdx))) - } - break - } - } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */))) - - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)))) { - if sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 5) != 0 { - // int iCid = sqlite3_column_int(pXInfo, 0); - var zCol uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) - var zDesc uintptr - if sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 3) != 0 { - zDesc = ts + 389 /* " DESC" */ - } else { - zDesc = ts + 792 /* "" */ - } - z = rbuMPrintf(tls, p, ts+11716 /* "%z%s\"%w\"%s" */, crt.VaList(bp+16, z, zSep, zCol, zDesc)) - zSep = ts + 359 /* ", " */ - } - } - z = rbuMPrintf(tls, p, ts+11727 /* "%z)" */, crt.VaList(bp+48, z)) - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) - } - return z +// gzip header information passed to and from zlib routines. See RFC 1952 +// for more details on the meanings of these fields. +type gz_header = gz_header_s /* zlib.h:129:3 */ + +type gz_headerp = uintptr /* zlib.h:131:23 */ +// +// inflateGetHeader() requests that gzip header information be stored in the +// provided gz_header structure. inflateGetHeader() may be called after +// inflateInit2() or inflateReset(), and before the first call of inflate(). +// As inflate() processes the gzip stream, head->done is zero until the header +// is completed, at which time head->done is set to one. If a zlib stream is +// being decoded, then head->done is set to -1 to indicate that there will be +// no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be +// used to force inflate() to return immediately after header processing is +// complete and before any actual data is decompressed. +// +// The text, time, xflags, and os fields are filled in with the gzip header +// contents. hcrc is set to true if there is a header CRC. (The header CRC +// was valid if done is set to one.) If extra is not Z_NULL, then extra_max +// contains the maximum number of bytes to write to extra. Once done is true, +// extra_len contains the actual extra field length, and extra contains the +// extra field, or that field truncated if extra_max is less than extra_len. +// If name is not Z_NULL, then up to name_max characters are written there, +// terminated with a zero unless the length is greater than name_max. If +// comment is not Z_NULL, then up to comm_max characters are written there, +// terminated with a zero unless the length is greater than comm_max. When any +// of extra, name, or comment are not Z_NULL and the respective field is not +// present in the header, then that field is set to Z_NULL to signal its +// absence. This allows the use of deflateSetHeader() with the returned +// structure to duplicate the header. However if those fields are set to +// allocated memory, then the application will need to save those pointers +// elsewhere so that they can be eventually freed. +// +// If inflateGetHeader is not used, then the header information is simply +// discarded. The header is always checked for validity, including the header +// CRC if present. inflateReset() will reset the process to discard the header +// information. The application would need to call inflateGetHeader() again to +// retrieve the header from the next gzip stream. +// +// inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source +// stream state was inconsistent. + +// +//ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, +// unsigned char FAR *window)); +// +// Initialize the internal stream state for decompression using inflateBack() +// calls. The fields zalloc, zfree and opaque in strm must be initialized +// before the call. If zalloc and zfree are Z_NULL, then the default library- +// derived memory allocation routines are used. windowBits is the base two +// logarithm of the window size, in the range 8..15. window is a caller +// supplied buffer of that size. Except for special applications where it is +// assured that deflate was used with small window sizes, windowBits must be 15 +// and a 32K byte window must be supplied to be able to decompress general +// deflate streams. +// +// See inflateBack() for the usage of these routines. +// +// inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of +// the parameters are invalid, Z_MEM_ERROR if the internal state could not be +// allocated, or Z_VERSION_ERROR if the version of the library does not match +// the version of the header file. + +type in_func = uintptr /* zlib.h:1092:18 */ +type out_func = uintptr /* zlib.h:1094:13 */ +// +// Same as uncompress, except that sourceLen is a pointer, where the +// length of the source is *sourceLen. On return, *sourceLen is the number of +// source bytes consumed. + +// gzip file access functions + +// +// This library supports reading and writing files in gzip (.gz) format with +// an interface similar to that of stdio, using the functions that start with +// "gz". The gzip format is different from the zlib format. gzip is a gzip +// wrapper, documented in RFC 1952, wrapped around a deflate stream. + +type gzFile_s = struct { + Fhave uint32 + Fnext uintptr + Fpos off_t } -var __func__52 = *(*[18]int8)(unsafe.Pointer(ts + 11731 /* "rbuWithoutRowidP..." */)) /* sqlite3rbu.c:1968:65 */ - -// This function creates the second imposter table used when writing to -// a table b-tree where the table has an external primary key. If the -// iterator passed as the second argument does not currently point to -// a table (not index) with an external primary key, this function is a -// no-op. // -// Assuming the iterator does point to a table with an external PK, this -// function creates a WITHOUT ROWID imposter table named "rbu_imposter2" -// used to access that PK index. For example, if the target table is -// declared as follows: -// -// CREATE TABLE t1(a, b TEXT, c REAL, PRIMARY KEY(b, c)); -// -// then the imposter table schema is: -// -// CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; +// Same as uncompress, except that sourceLen is a pointer, where the +// length of the source is *sourceLen. On return, *sourceLen is the number of +// source bytes consumed. + +// gzip file access functions + // -func rbuCreateImposterTable2(tls *crt.TLS, p uintptr, pIter uintptr) { /* sqlite3rbu.c:2027:13: */ - bp := tls.Alloc(184) - defer tls.Free(184) +// This library supports reading and writing files in gzip (.gz) format with +// an interface similar to that of stdio, using the functions that start with +// "gz". The gzip format is different from the zlib format. gzip is a gzip +// wrapper, documented in RFC 1952, wrapped around a deflate stream. - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3) { - var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiPkTnum // Root page of PK index - *(*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 + 176 /* pXInfo */)) = uintptr(0) // PRAGMA main.index_xinfo = $zIdx - var zComma uintptr = ts + 792 /* "" */ - 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 + 64 /* &.zErrmsg */), - ts+11749 /* "SELECT name FROM..." */) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - sqlite3.Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) - if 100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) { - zIdx = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 0) - } - } - if zIdx != 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176 /* &pXInfo */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+10558 /* "PRAGMA main.inde..." */, crt.VaList(bp, zIdx))) - } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) - - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)))) { - var bKey int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 5) - if bKey != 0 { - var iCid int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) - var bDesc int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) - var zCollate uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+11799 /* "%z%sc%d %s COLLA..." */, crt.VaList(bp+8, zCols, zComma, - iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+11821 /* "%z%sc%d%s" */, crt.VaList(bp+48, zPk, zComma, iCid, func() uintptr { - if bDesc != 0 { - return ts + 389 /* " DESC" */ - } - return ts + 792 /* "" */ - }())) - zComma = ts + 359 /* ", " */ - } - } - zCols = rbuMPrintf(tls, p, ts+11831 /* "%z, id INTEGER" */, crt.VaList(bp+80, zCols)) - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) - - sqlite3.Xsqlite3_test_control(tls, 25, crt.VaList(bp+88, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 1, tnum)) - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+11846, /* "CREATE TABLE rbu..." */ - crt.VaList(bp+120, zCols, zPk)) - sqlite3.Xsqlite3_test_control(tls, 25, crt.VaList(bp+136, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 0, 0)) - } -} - -// If an error has already occurred when this function is called, it -// immediately returns zero (without doing any work). Or, if an error -// occurs during the execution of this function, it sets the error code -// in the sqlite3rbu object indicated by the first argument and returns -// zero. -// -// The iterator passed as the second argument is guaranteed to point to -// a table (not an index) when this function is called. This function -// attempts to create any imposter table required to write to the main -// table b-tree of the table before returning. Non-zero is returned if -// an imposter table are created, or zero otherwise. -// -// An imposter table is required in all cases except RBU_PK_VTAB. Only -// virtual tables are written to directly. The imposter table has the -// same schema as the actual target table (less any UNIQUE constraints). -// 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 *crt.TLS, p uintptr, pIter uintptr) { /* sqlite3rbu.c:2101:13: */ - bp := tls.Alloc(200) - defer tls.Free(200) - - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType != 5) { - var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum - var zComma uintptr = ts + 792 /* "" */ - var zSql uintptr = uintptr(0) - var iCol int32 - sqlite3.Xsqlite3_test_control(tls, 25, crt.VaList(bp, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 0, 1)) - - for iCol = 0; ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol); iCol++ { - var zPk uintptr = ts + 792 /* "" */ - var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) - *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)) = uintptr(0) - - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_table_column_metadata(tls, - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192 /* &zColl */, uintptr(0), uintptr(0), uintptr(0)) - - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 2) && (*(*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 + 11908 /* "PRIMARY KEY " */ - } - zSql = rbuMPrintf(tls, p, ts+11921, /* "%z%s\"%w\" %s %sCO..." */ - crt.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), - func() uintptr { - if *(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { - return ts + 11948 /* " NOT NULL" */ - } - return ts + 792 /* "" */ - }())) - zComma = ts + 359 /* ", " */ - } +type gzFile = uintptr /* zlib.h:1300:25 */ +type u32 = uint64 /* zipfile.c:42:23 */ - if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 4 { - var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) - if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+11958 /* "%z, %z" */, crt.VaList(bp+88, zSql, zPk)) - } - } +// Definitions for mode bitmasks S_IFDIR, S_IFREG and S_IFLNK. +// +// In some ways it would be better to obtain these values from system +// header files. But, the dependency is undesirable and (a) these +// have been stable for decades, (b) the values are part of POSIX and +// are also made explicit in [man stat], and (c) are part of the +// file format for zip archives. - sqlite3.Xsqlite3_test_control(tls, 25, crt.VaList(bp+104, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 1, tnum)) - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+11965, /* "CREATE TABLE \"rb..." */ - crt.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, - func() uintptr { - if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 4 { - return ts + 11997 /* " WITHOUT ROWID" */ - } - return ts + 792 /* "" */ - }())) - sqlite3.Xsqlite3_test_control(tls, 25, crt.VaList(bp+160, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 0, 0)) - } -} +var ZIPFILE_SCHEMA = *(*[91]int8)(unsafe.Pointer(ts + 7458 /* "CREATE TABLE y(n..." */)) /* zipfile.c:77:19 */ -// Prepare a statement used to insert rows into the "rbu_tmp_xxx" table. -// Specifically a statement of the form: +// Magic numbers used to read and write zip files. // -// INSERT INTO rbu_tmp_xxx VALUES(?, ?, ? ...); +// ZIPFILE_NEWENTRY_MADEBY: +// Use this value for the "version-made-by" field in new zip file +// entries. The upper byte indicates "unix", and the lower byte +// indicates that the zip file matches pkzip specification 3.0. +// This is what info-zip seems to do. // -// The number of bound variables is equal to the number of columns in -// 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 *crt.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3rbu.c:2157:13: */ - bp := tls.Alloc(40) - defer tls.Free(40) - - var bRbuRowid int32 = (crt.Bool32(((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1))) - var zBind uintptr = rbuObjIterGetBindlist(tls, p, (((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol + 1) + bRbuRowid)) - if zBind != 0 { - if !((*RbuObjIter)(unsafe.Pointer(pIter)).FpTmpInsert == uintptr(0)) { - crt.X__assert_fail(tls, ts+12012 /* "pIter->pTmpInser..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(2166), uintptr(unsafe.Pointer(&__func__53))) - } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, - (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, (pIter + 152 /* &.pTmpInsert */), (p + 64 /* &.zErrmsg */), sqlite3.Xsqlite3_mprintf(tls, - ts+12033, /* "INSERT INTO %s.'..." */ - crt.VaList(bp, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zCollist, zRbuRowid, zBind))) - } +// ZIPFILE_NEWENTRY_REQUIRED: +// Value for "version-required-to-extract" field of new entries. +// Version 2.0 is required to support folders and deflate compression. +// +// ZIPFILE_NEWENTRY_FLAGS: +// Value for "general-purpose-bit-flags" field of new entries. Bit +// 11 means "utf-8 filename and comment". +// +// ZIPFILE_SIGNATURE_CDS: +// First 4 bytes of a valid CDS record. +// +// ZIPFILE_SIGNATURE_LFH: +// First 4 bytes of a valid LFH record. +// +// ZIPFILE_SIGNATURE_EOCD +// First 4 bytes of a valid EOCD record. + +// The sizes of the fixed-size part of each of the three main data +// structures in a zip archive. + +// 4.3.16 End of central directory record: +// +// end of central dir signature 4 bytes (0x06054b50) +// number of this disk 2 bytes +// number of the disk with the +// start of the central directory 2 bytes +// total number of entries in the +// central directory on this disk 2 bytes +// total number of entries in +// the central directory 2 bytes +// size of the central directory 4 bytes +// offset of start of central +// directory with respect to +// the starting disk number 4 bytes +// .ZIP file comment length 2 bytes +// .ZIP file comment (variable size) +type ZipfileEOCD1 = struct { + FiDisk u16 + FiFirstDisk u16 + FnEntry u16 + FnEntryTotal u16 + FnSize u32 + FiOffset u32 +} + +// Magic numbers used to read and write zip files. +// +// ZIPFILE_NEWENTRY_MADEBY: +// Use this value for the "version-made-by" field in new zip file +// entries. The upper byte indicates "unix", and the lower byte +// indicates that the zip file matches pkzip specification 3.0. +// This is what info-zip seems to do. +// +// ZIPFILE_NEWENTRY_REQUIRED: +// Value for "version-required-to-extract" field of new entries. +// Version 2.0 is required to support folders and deflate compression. +// +// ZIPFILE_NEWENTRY_FLAGS: +// Value for "general-purpose-bit-flags" field of new entries. Bit +// 11 means "utf-8 filename and comment". +// +// ZIPFILE_SIGNATURE_CDS: +// First 4 bytes of a valid CDS record. +// +// ZIPFILE_SIGNATURE_LFH: +// First 4 bytes of a valid LFH record. +// +// ZIPFILE_SIGNATURE_EOCD +// First 4 bytes of a valid EOCD record. + +// The sizes of the fixed-size part of each of the three main data +// structures in a zip archive. + +// 4.3.16 End of central directory record: +// +// end of central dir signature 4 bytes (0x06054b50) +// number of this disk 2 bytes +// number of the disk with the +// start of the central directory 2 bytes +// total number of entries in the +// central directory on this disk 2 bytes +// total number of entries in +// the central directory 2 bytes +// size of the central directory 4 bytes +// offset of start of central +// directory with respect to +// the starting disk number 4 bytes +// .ZIP file comment length 2 bytes +// .ZIP file comment (variable size) +type ZipfileEOCD = ZipfileEOCD1 /* zipfile.c:153:28 */ + +// 4.3.12 Central directory structure: +// +// ... +// +// central file header signature 4 bytes (0x02014b50) +// version made by 2 bytes +// version needed to extract 2 bytes +// general purpose bit flag 2 bytes +// compression method 2 bytes +// last mod file time 2 bytes +// last mod file date 2 bytes +// crc-32 4 bytes +// compressed size 4 bytes +// uncompressed size 4 bytes +// file name length 2 bytes +// extra field length 2 bytes +// file comment length 2 bytes +// disk number start 2 bytes +// internal file attributes 2 bytes +// external file attributes 4 bytes +// relative offset of local header 4 bytes +type ZipfileCDS1 = struct { + FiVersionMadeBy u16 + FiVersionExtract u16 + Fflags u16 + FiCompression u16 + FmTime u16 + FmDate u16 + Fcrc32 u32 + FszCompressed u32 + FszUncompressed u32 + FnFile u16 + FnExtra u16 + FnComment u16 + FiDiskStart u16 + FiInternalAttr u16 + FiExternalAttr u32 + FiOffset u32 + FzFile uintptr +} + +// 4.3.12 Central directory structure: +// +// ... +// +// central file header signature 4 bytes (0x02014b50) +// version made by 2 bytes +// version needed to extract 2 bytes +// general purpose bit flag 2 bytes +// compression method 2 bytes +// last mod file time 2 bytes +// last mod file date 2 bytes +// crc-32 4 bytes +// compressed size 4 bytes +// uncompressed size 4 bytes +// file name length 2 bytes +// extra field length 2 bytes +// file comment length 2 bytes +// disk number start 2 bytes +// internal file attributes 2 bytes +// external file attributes 4 bytes +// relative offset of local header 4 bytes +type ZipfileCDS = ZipfileCDS1 /* zipfile.c:186:27 */ + +// 4.3.7 Local file header: +// +// local file header signature 4 bytes (0x04034b50) +// version needed to extract 2 bytes +// general purpose bit flag 2 bytes +// compression method 2 bytes +// last mod file time 2 bytes +// last mod file date 2 bytes +// crc-32 4 bytes +// compressed size 4 bytes +// uncompressed size 4 bytes +// file name length 2 bytes +// extra field length 2 bytes +// +type ZipfileLFH1 = struct { + FiVersionExtract u16 + Fflags u16 + FiCompression u16 + FmTime u16 + FmDate u16 + Fcrc32 u32 + FszCompressed u32 + FszUncompressed u32 + FnFile u16 + FnExtra u16 + _ [4]byte +} + +// 4.3.7 Local file header: +// +// local file header signature 4 bytes (0x04034b50) +// version needed to extract 2 bytes +// general purpose bit flag 2 bytes +// compression method 2 bytes +// last mod file time 2 bytes +// last mod file date 2 bytes +// crc-32 4 bytes +// compressed size 4 bytes +// uncompressed size 4 bytes +// file name length 2 bytes +// extra field length 2 bytes +// +type ZipfileLFH = ZipfileLFH1 /* zipfile.c:223:27 */ + +type ZipfileEntry1 = struct { + Fcds ZipfileCDS + FmUnixTime u32 + FaExtra uintptr + FiDataOff i64 + FaData uintptr + FpNext uintptr } -var __func__53 = *(*[27]int8)(unsafe.Pointer(ts + 12090 /* "rbuObjIterPrepar..." */)) /* sqlite3rbu.c:2162:2 */ - -func rbuTmpInsertFunc(tls *crt.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3rbu.c:2175:13: */ - var p uintptr = sqlite3.Xsqlite3_user_data(tls, pCtx) - var rc int32 = 0 - var i int32 - - if !(((sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(0)*8))) != 0) || ((*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FeType == 3)) || ((*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FeType == 1)) { - crt.X__assert_fail(tls, ts+12117 /* "sqlite3_value_in..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(2184), uintptr(unsafe.Pointer(&__func__54))) - } - if sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(0)*8))) != 0 { - *(*i64)(unsafe.Pointer(p + 304 /* &.nPhaseOneStep */)) += (i64((*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex)) - } +type ZipfileEntry = ZipfileEntry1 /* zipfile.c:237:29 */ - for i = 0; (rc == 0) && (i < nVal); i++ { - rc = sqlite3.Xsqlite3_bind_value(tls, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpTmpInsert, (i + 1), *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8))) - } - if rc == 0 { - sqlite3.Xsqlite3_step(tls, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpTmpInsert) - rc = sqlite3.Xsqlite3_reset(tls, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpTmpInsert) - } - - if rc != 0 { - sqlite3.Xsqlite3_result_error_code(tls, pCtx, rc) - } +// Cursor type for zipfile tables. +type ZipfileCsr1 = struct { + Fbase sqlite3_vtab_cursor + FiId i64 + FbEof u8 + FbNoop u8 + FpFile uintptr + FiNextOff i64 + Feocd ZipfileEOCD + FpFreeEntry uintptr + FpCurrent uintptr + FpCsrNext uintptr } -var __func__54 = *(*[17]int8)(unsafe.Pointer(ts + 12194 /* "rbuTmpInsertFunc" */)) /* sqlite3rbu.c:2179:2 */ +// Cursor type for zipfile tables. +type ZipfileCsr = ZipfileCsr1 /* zipfile.c:250:27 */ -func rbuObjIterGetIndexWhere(tls *crt.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3rbu.c:2205:13: */ - bp := tls.Alloc(12) - defer tls.Free(12) - - *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = (*sqlite3rbu)(unsafe.Pointer(p)).Frc - var zRet uintptr = uintptr(0) - - if !((((*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql == uintptr(0)) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FnIdxCol == 0)) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol == uintptr(0))) { - crt.X__assert_fail(tls, ts+12211 /* "pIter->zIdxSql==..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(2210), uintptr(unsafe.Pointer(&__func__55))) - } - - if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == 0 { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = prepareAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp /* &pStmt */, (p + 64 /* &.zErrmsg */), - ts+12271 /* "SELECT trim(sql)..." */) - } - if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == 0 { - var rc2 int32 - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 1, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx, -1, uintptr(0)) - if (*(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)))) { - var zSql uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) - if zSql != 0 { - (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdxSql = crt.AssignUintptr(&zSql, rbuStrndup(tls, zSql, bp+8 /* &rc */)) - } - if zSql != 0 { - var nParen int32 = 0 // Number of open parenthesis - var i int32 - var iIdxCol int32 = 0 - var nIdxAlloc int32 = 0 - for i = 0; *(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0; i++ { - var c int8 = *(*int8)(unsafe.Pointer(zSql + uintptr(i))) - - // If necessary, grow the pIter->aIdxCol[] array - if iIdxCol == nIdxAlloc { - var aIdxCol uintptr = sqlite3.Xsqlite3_realloc(tls, - (*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol, (int32((uint64(nIdxAlloc + 16)) * uint64(unsafe.Sizeof(RbuSpan{}))))) - if aIdxCol == uintptr(0) { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = 7 - break - } - (*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol = aIdxCol - nIdxAlloc = nIdxAlloc + (16) - } - - if int32(c) == '(' { - if nParen == 0 { - if !(iIdxCol == 0) { - crt.X__assert_fail(tls, ts+12337 /* "iIdxCol==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(2248), uintptr(unsafe.Pointer(&__func__55))) - } - (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(0)*16)).FzSpan = (zSql + uintptr((i + 1))) - } - nParen++ - } else if int32(c) == ')' { - nParen-- - if nParen == 0 { - var nSpan int32 = (int32((int64((zSql + uintptr(i))) - int64((*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iIdxCol)*16)).FzSpan)) / 1)) - (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(crt.PostIncInt32(&iIdxCol, 1))*16)).FnSpan = nSpan - i++ - break - } - } else if (int32(c) == ',') && (nParen == 1) { - var nSpan int32 = (int32((int64((zSql + uintptr(i))) - int64((*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iIdxCol)*16)).FzSpan)) / 1)) - (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(crt.PostIncInt32(&iIdxCol, 1))*16)).FnSpan = nSpan - (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol + uintptr(iIdxCol)*16)).FzSpan = (zSql + uintptr((i + 1))) - } else if ((int32(c) == '"') || (int32(c) == '\'')) || (int32(c) == '`') { - for i++; 1 != 0; i++ { - if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == int32(c) { - if int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1))))) != int32(c) { - break - } - i++ - } - } - } else if int32(c) == '[' { - for i++; 1 != 0; i++ { - if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == ']' { - break - } - } - } else if (int32(c) == '-') && (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1))))) == '-') { - for i = (i + 2); (*(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) != '\n'); i++ { - } - if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == 0 { - break - } - } else if (int32(c) == '/') && (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1))))) == '*') { - for i = (i + 2); (*(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0) && ((int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) != '*') || (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1))))) != '/')); i++ { - } - if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == 0 { - break - } - i++ - } - } - if *(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0 { - zRet = rbuStrndup(tls, (zSql + uintptr(i)), bp+8 /* &rc */) - } - (*RbuObjIter)(unsafe.Pointer(pIter)).FnIdxCol = iIdxCol - } - } - - rc2 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) - if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == 0 { - *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = rc2 - } - } - - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) - return zRet +type ZipfileTab1 = struct { + Fbase sqlite3_vtab + FzFile uintptr + Fdb uintptr + FaBuffer uintptr + FpCsrList uintptr + FiNextCsrid i64 + FpFirstEntry uintptr + FpLastEntry uintptr + FpWriteFd uintptr + FszCurrent i64 + FszOrig i64 } -var __func__55 = *(*[24]int8)(unsafe.Pointer(ts + 12348 /* "rbuObjIterGetInd..." */)) /* sqlite3rbu.c:2205:71 */ - -// 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 *crt.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3rbu.c:2305:12: */ - bp := tls.Alloc(628) - defer tls.Free(628) - - if !((*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup == 0) { - crt.X__assert_fail(tls, ts+12372 /* "pIter->bCleanup=..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(2310), uintptr(unsafe.Pointer(&__func__56))) - } - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect == uintptr(0)) && (rbuObjIterCacheTableInfo(tls, p, pIter) == 0) { - var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum - var zCollist uintptr = uintptr(0) // List of indexed columns - var pz uintptr = (p + 64 /* &.zErrmsg */) - var zIdx uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx - var zLimit uintptr = uintptr(0) - - if nOffset != 0 { - zLimit = sqlite3.Xsqlite3_mprintf(tls, ts+12391 /* " LIMIT -1 OFFSET..." */, crt.VaList(bp, nOffset)) - if !(zLimit != 0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 7 - } - } - - if zIdx != 0 { - var zTbl uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl - *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)) = uintptr(0) // Columns for imposter table - *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)) = uintptr(0) // Primary key declaration for imposter - *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */)) = uintptr(0) // WHERE clause on PK columns - var zBind uintptr = uintptr(0) - var zPart uintptr = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 624 /* nBind */)) = 0 - - if !((*RbuObjIter)(unsafe.Pointer(pIter)).FeType != 5) { - crt.X__assert_fail(tls, ts+12411 /* "pIter->eType!=5" */, ts+9694 /* "testdata/sqlite-..." */, uint32(2332), uintptr(unsafe.Pointer(&__func__56))) - } - zPart = rbuObjIterGetIndexWhere(tls, p, pIter) - zCollist = rbuObjIterGetIndexCols(tls, - p, pIter, bp+600 /* &zImposterCols */, bp+608 /* &zImposterPK */, bp+616 /* &zWhere */, bp+624 /* &nBind */) - zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624 /* nBind */))) - - // Create the imposter table used to write to this index. - sqlite3.Xsqlite3_test_control(tls, 25, crt.VaList(bp+8, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 0, 1)) - sqlite3.Xsqlite3_test_control(tls, 25, crt.VaList(bp+40, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 1, tnum)) - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+12427, /* "CREATE TABLE \"rb..." */ - crt.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) - sqlite3.Xsqlite3_test_control(tls, 25, crt.VaList(bp+96, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 0, 0)) - - // Create the statement to insert index entries - (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624 /* nBind */)) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 136 /* &.pInsert */), (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+12492 /* "INSERT INTO \"rbu..." */, crt.VaList(bp+128, zTbl, zBind))) - } - - // And to delete index entries - if ((crt.Bool32((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 144 /* &.pDelete */), (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+12528 /* "DELETE FROM \"rbu..." */, crt.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) - } - - // Create the SELECT statement to read keys in sorted order - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var zSql uintptr - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - var zStart uintptr = uintptr(0) - if nOffset != 0 { - zStart = rbuVacuumIndexStart(tls, p, pIter) - if zStart != 0 { - sqlite3.Xsqlite3_free(tls, zLimit) - zLimit = uintptr(0) - } - } +type ZipfileTab = ZipfileTab1 /* zipfile.c:267:27 */ - zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+12562, /* "SELECT %s, 0 AS ..." */ - crt.VaList(bp+160, zCollist, - (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, - zPart, - func() uintptr { - if zStart != 0 { - return func() uintptr { - if zPart != 0 { - return ts + 9626 /* "AND" */ - } - return ts + 9599 /* "WHERE" */ - }() - } - return ts + 792 /* "" */ - }(), zStart, - zCollist, zLimit)) - sqlite3.Xsqlite3_free(tls, zStart) - } else if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1) { - zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+12623, /* "SELECT %s, rbu_c..." */ - crt.VaList(bp+216, zCollist, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, - zPart, zCollist, zLimit)) - } else { - zSql = sqlite3.Xsqlite3_mprintf(tls, - - ts+12684, /* "SELECT %s, rbu_c..." */ - crt.VaList(bp+264, zCollist, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, - zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, - zPart, - func() uintptr { - if zPart != 0 { - return ts + 9626 /* "AND" */ - } - return ts + 9599 /* "WHERE" */ - }(), - zCollist, zLimit)) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, (pIter + 128 /* &.pSelect */), pz, zSql) - } else { - sqlite3.Xsqlite3_free(tls, zSql) - } - } - - sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */))) - sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */))) - sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))) - sqlite3.Xsqlite3_free(tls, zBind) - sqlite3.Xsqlite3_free(tls, zPart) - } else { - var bRbuRowid int32 = (crt.Bool32((((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 5) || - ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1)) || - (((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3) && ((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))))) - var zTbl uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl // Table this step applies to - var zWrite uintptr // Imposter table name - - 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+12843 /* "old" */) - var zNewlist uintptr = rbuObjIterGetOldlist(tls, p, pIter, ts+12847 /* "new" */) - - zCollist = rbuObjIterGetCollist(tls, p, pIter) - (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol - - // Create the imposter table or tables (if required). - rbuCreateImposterTable(tls, p, pIter) - rbuCreateImposterTable2(tls, p, pIter) - zWrite = func() uintptr { - if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 5 { - return ts + 792 /* "" */ - } - return ts + 12851 /* "rbu_imp_" */ - }() - - // Create the INSERT statement to write to the target PK b-tree - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 136 /* &.pInsert */), pz, - sqlite3.Xsqlite3_mprintf(tls, - ts+12860, /* "INSERT INTO \"%s%..." */ - crt.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { - if bRbuRowid != 0 { - return ts + 12896 /* ", _rowid_" */ - } - return ts + 792 /* "" */ - }(), zBindings))) - } - - // Create the DELETE statement to write to the target PK b-tree. - // Because it only performs INSERT operations, this is not required for - // an rbu vacuum handle. - if ((crt.Bool32((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 144 /* &.pDelete */), pz, - sqlite3.Xsqlite3_mprintf(tls, - ts+12906 /* "DELETE FROM \"%s%..." */, crt.VaList(bp+384, zWrite, zTbl, zWhere))) - } - - if ((crt.Bool32((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0) { - var zRbuRowid uintptr = ts + 792 /* "" */ - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1) { - zRbuRowid = ts + 12934 /* ", rbu_rowid" */ - } - - // Create the rbu_tmp_xxx table and the triggers to populate it. - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - - ts+12946 /* "CREATE TABLE IF ..." */, crt.VaList(bp+408, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { - if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3 { - return ts + 13022 /* ", 0 AS rbu_rowid" */ - } - return ts + 792 /* "" */ - }(), (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) - - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - - ts+13039, /* "CREATE TEMP TRIG..." */ - crt.VaList(bp+440, zWrite, zTbl, zOldlist, - zWrite, zTbl, zOldlist, - zWrite, zTbl, zNewlist)) - - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1) { - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - - ts+13338, /* "CREATE TEMP TRIG..." */ - crt.VaList(bp+512, zWrite, zTbl, zNewlist)) - } - - rbuObjIterPrepareTmpInsert(tls, p, pIter, zCollist, zRbuRowid) - } - - // Create the SELECT statement to read keys from data_xxx - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var zRbuRowid uintptr = ts + 792 /* "" */ - var zStart uintptr = uintptr(0) - var zOrder uintptr = uintptr(0) - if bRbuRowid != 0 { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - zRbuRowid = ts + 13437 /* ",_rowid_ " */ - } else { - zRbuRowid = ts + 13447 /* ",rbu_rowid" */ - } - } - - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - if nOffset != 0 { - zStart = rbuVacuumTableStart(tls, p, pIter, bRbuRowid, zWrite) - if zStart != 0 { - sqlite3.Xsqlite3_free(tls, zLimit) - zLimit = uintptr(0) - } - } - if bRbuRowid != 0 { - zOrder = rbuMPrintf(tls, p, ts+8365 /* "_rowid_" */, 0) - } else { - zOrder = rbuObjIterGetPkList(tls, p, pIter, ts+792 /* "" */, ts+359 /* ", " */, ts+792 /* "" */) - } - } +// Set the error message contained in context ctx to the results of +// vprintf(zFmt, ...). +func zipfileCtxErrorMsg(tls *crt.TLS, ctx uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:289:13: */ + var zMsg uintptr = uintptr(0) + var ap va_list + _ = ap + ap = va + zMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) + sqlite3.Xsqlite3_result_error(tls, ctx, zMsg, -1) + sqlite3.Xsqlite3_free(tls, zMsg) + _ = ap +} - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, (pIter + 128 /* &.pSelect */), pz, - sqlite3.Xsqlite3_mprintf(tls, - ts+13458, /* "SELECT %s,%s rbu..." */ - crt.VaList(bp+536, zCollist, - func() uintptr { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - return ts + 13506 /* "0 AS " */ - } - return ts + 792 /* "" */ - }(), - zRbuRowid, - (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { - if zStart != 0 { - return zStart - } - return ts + 792 /* "" */ - }(), - func() uintptr { - if zOrder != 0 { - return ts + 13512 /* "ORDER BY" */ - } - return ts + 792 /* "" */ - }(), zOrder, - zLimit))) - } - sqlite3.Xsqlite3_free(tls, zStart) - sqlite3.Xsqlite3_free(tls, zOrder) +// If string zIn is quoted, dequote it in place. Otherwise, if the string +// is not quoted, do nothing. +func zipfileDequote(tls *crt.TLS, zIn uintptr) { /* zipfile.c:303:13: */ + var q int8 = *(*int8)(unsafe.Pointer(zIn + uintptr(0))) + if (((int32(q) == '"') || (int32(q) == '\'')) || (int32(q) == '`')) || (int32(q) == '[') { + var iIn int32 = 1 + var iOut int32 = 0 + if int32(q) == '[' { + q = int8(']') + } + for *(*int8)(unsafe.Pointer(zIn + uintptr(iIn))) != 0 { + var c int8 = *(*int8)(unsafe.Pointer(zIn + uintptr(crt.PostIncInt32(&iIn, 1)))) + if (int32(c) == int32(q)) && (int32(*(*int8)(unsafe.Pointer(zIn + uintptr(crt.PostIncInt32(&iIn, 1))))) != int32(q)) { + break } - - sqlite3.Xsqlite3_free(tls, zWhere) - sqlite3.Xsqlite3_free(tls, zOldlist) - sqlite3.Xsqlite3_free(tls, zNewlist) - sqlite3.Xsqlite3_free(tls, zBindings) + *(*int8)(unsafe.Pointer(zIn + uintptr(crt.PostIncInt32(&iOut, 1)))) = c } - sqlite3.Xsqlite3_free(tls, zCollist) - sqlite3.Xsqlite3_free(tls, zLimit) + *(*int8)(unsafe.Pointer(zIn + uintptr(iOut))) = int8(0) } - - return (*sqlite3rbu)(unsafe.Pointer(p)).Frc } -var __func__56 = *(*[21]int8)(unsafe.Pointer(ts + 13521 /* "rbuObjIterPrepar..." */)) /* sqlite3rbu.c:2309:2 */ - -// Set output variable *ppStmt to point to an UPDATE statement that may -// be used to update the imposter table for the main table b-tree of the -// table object that pIter currently points to, assuming that the -// rbu_control column of the data_xyz table contains zMask. +// Construct a new ZipfileTab virtual table object. // -// 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 *crt.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3rbu.c:2572:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) - - var pp uintptr - var pUp uintptr = uintptr(0) - var nUp int32 = 0 +// argv[0] -> module name ("zipfile") +// argv[1] -> database name +// argv[2] -> table name +// argv[...] -> "column name" and other module argument fields. +func zipfileConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* zipfile.c:326:12: */ + var nByte int32 = (int32(uint64(unsafe.Sizeof(ZipfileTab{})) + (uint64(64 * 1024)))) + var nFile int32 = 0 + var zFile uintptr = uintptr(0) + var pNew uintptr = uintptr(0) + var rc int32 - // In case an error occurs - *(*uintptr)(unsafe.Pointer(ppStmt)) = uintptr(0) + // If the table name is not "zipfile", require that the argument be + // specified. This stops zipfile tables from being created as: + // + // CREATE VIRTUAL TABLE zzz USING zipfile(); + // + // It does not prevent: + // + // CREATE VIRTUAL TABLE zipfile USING zipfile(); - // Search for an existing statement. If one is found, shift it to the front - // of the LRU queue and return immediately. Otherwise, leave nUp pointing - // to the number of statements currently in the cache and pUp to the - // last object in the list. - for pp = (pIter + 184 /* &.pRbuUpdate */); *(*uintptr)(unsafe.Pointer(pp)) != 0; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 16 /* &.pNext */) { - pUp = *(*uintptr)(unsafe.Pointer(pp)) - if crt.Xstrcmp(tls, (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FzMask, zMask) == 0 { - *(*uintptr)(unsafe.Pointer(pp)) = (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext - (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext = (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate - (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp - *(*uintptr)(unsafe.Pointer(ppStmt)) = (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate - return 0 - } - nUp++ - } - if !((pUp == uintptr(0)) || ((*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext == uintptr(0))) { - crt.X__assert_fail(tls, ts+13542 /* "pUp==0 || pUp->p..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(2600), uintptr(unsafe.Pointer(&__func__57))) + if ((0 != sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+7549 /* "zipfile" */)) && (argc < 4)) || (argc > 4) { + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7557 /* "zipfile construc..." */, 0) + return 1 } - if nUp >= 16 { - for pp = (pIter + 184 /* &.pRbuUpdate */); *(*uintptr)(unsafe.Pointer(pp)) != pUp; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 16 /* &.pNext */) { - } - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) - sqlite3.Xsqlite3_finalize(tls, (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate) - (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate = uintptr(0) - } else { - pUp = rbuMalloc(tls, p, (int64((uint64(unsafe.Sizeof(RbuUpdateStmt{})) + uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) + uint64(1)))) + if argc > 3 { + zFile = *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8)) + nFile = (int32(crt.Xstrlen(tls, zFile)) + 1) } - if pUp != 0 { - var zWhere uintptr = rbuObjIterGetWhere(tls, p, pIter) - var zSet uintptr = rbuObjIterGetSetlist(tls, p, pIter, zMask) - var zUpdate uintptr = uintptr(0) - - (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FzMask = (pUp + uintptr(1)*24) - crt.Xmemcpy(tls, (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FzMask, zMask, uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)) - (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpNext = (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate - (*RbuObjIter)(unsafe.Pointer(pIter)).FpRbuUpdate = pUp - - if zSet != 0 { - var zPrefix uintptr = ts + 792 /* "" */ - - if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType != 5 { - zPrefix = ts + 12851 /* "rbu_imp_" */ - } - zUpdate = sqlite3.Xsqlite3_mprintf(tls, ts+13566, /* "UPDATE \"%s%w\" SE..." */ - crt.VaList(bp, zPrefix, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSet, zWhere)) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pUp + 8 /* &.pUpdate */), (p + 64 /* &.zErrmsg */), zUpdate) - *(*uintptr)(unsafe.Pointer(ppStmt)) = (*RbuUpdateStmt)(unsafe.Pointer(pUp)).FpUpdate + rc = sqlite3.Xsqlite3_declare_vtab(tls, db, uintptr(unsafe.Pointer(&ZIPFILE_SCHEMA))) + if rc == 0 { + pNew = sqlite3.Xsqlite3_malloc64(tls, (uint64(sqlite3_int64(nByte) + sqlite3_int64(nFile)))) + if pNew == uintptr(0) { + return 7 } - sqlite3.Xsqlite3_free(tls, zWhere) - sqlite3.Xsqlite3_free(tls, zSet) - } - - return (*sqlite3rbu)(unsafe.Pointer(p)).Frc -} - -var __func__57 = *(*[17]int8)(unsafe.Pointer(ts + 13596 /* "rbuGetUpdateStmt" */)) /* sqlite3rbu.c:2577:2 */ - -func rbuOpenDbhandle(tls *crt.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3rbu.c:2640:16: */ - bp := tls.Alloc(16) - defer tls.Free(16) - - *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var flags int32 = ((0x00000002 | 0x00000004) | 0x00000040) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_open_v2(tls, zName, bp+8 /* &db */, 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 = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))))) - sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))) - *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0) + crt.Xmemset(tls, pNew, 0, (uint64(nByte + nFile))) + (*ZipfileTab)(unsafe.Pointer(pNew)).Fdb = db + (*ZipfileTab)(unsafe.Pointer(pNew)).FaBuffer = (pNew + uintptr(1)*104) + if zFile != 0 { + (*ZipfileTab)(unsafe.Pointer(pNew)).FzFile = ((*ZipfileTab)(unsafe.Pointer(pNew)).FaBuffer + uintptr((64 * 1024))) + crt.Xmemcpy(tls, (*ZipfileTab)(unsafe.Pointer(pNew)).FzFile, zFile, uint64(nFile)) + zipfileDequote(tls, (*ZipfileTab)(unsafe.Pointer(pNew)).FzFile) } } - return *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) + sqlite3.Xsqlite3_vtab_config(tls, db, 3, 0) + *(*uintptr)(unsafe.Pointer(ppVtab)) = pNew + return rc } -// Free an RbuState object allocated by rbuLoadState(). -func rbuFreeState(tls *crt.TLS, p uintptr) { /* sqlite3rbu.c:2661:13: */ +// Free the ZipfileEntry structure indicated by the only argument. +func zipfileEntryFree(tls *crt.TLS, p uintptr) { /* zipfile.c:380:13: */ if p != 0 { - sqlite3.Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzTbl) - sqlite3.Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzDataTbl) - sqlite3.Xsqlite3_free(tls, (*RbuState)(unsafe.Pointer(p)).FzIdx) + sqlite3.Xsqlite3_free(tls, (*ZipfileEntry)(unsafe.Pointer(p)).Fcds.FzFile) sqlite3.Xsqlite3_free(tls, p) } } -// Allocate an RbuState object and load the contents of the rbu_state -// table into it. Return a pointer to the new object. It is the -// responsibility of the caller to eventually free the object using -// sqlite3_free(). -// -// If an error occurs, leave an error code and message in the rbu handle -// and return NULL. -func rbuLoadState(tls *crt.TLS, p uintptr) uintptr { /* sqlite3rbu.c:2679:17: */ - bp := tls.Alloc(20) - defer tls.Free(20) - - var pRet uintptr = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) - // var rc int32 at bp+16, 4 - - var rc2 int32 - - pRet = rbuMalloc(tls, p, int64(unsafe.Sizeof(RbuState{}))) - if pRet == uintptr(0) { - return uintptr(0) - } - - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8 /* &pStmt */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+13613 /* "SELECT k, v FROM..." */, crt.VaList(bp, p+48 /* &.zStateDb */))) - for (*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)))) { - switch sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { - case 1: - (*RbuState)(unsafe.Pointer(pRet)).FeStage = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) - if (((*RbuState)(unsafe.Pointer(pRet)).FeStage != 1) && - ((*RbuState)(unsafe.Pointer(pRet)).FeStage != 2)) && - ((*RbuState)(unsafe.Pointer(pRet)).FeStage != 4) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 11 - } - break - - case 2: - (*RbuState)(unsafe.Pointer(pRet)).FzTbl = rbuStrndup(tls, sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16 /* &rc */) - break - - case 3: - (*RbuState)(unsafe.Pointer(pRet)).FzIdx = rbuStrndup(tls, sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16 /* &rc */) - break - - case 4: - (*RbuState)(unsafe.Pointer(pRet)).FnRow = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) - break - - case 5: - (*RbuState)(unsafe.Pointer(pRet)).FnProgress = sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) - break - - case 6: - (*RbuState)(unsafe.Pointer(pRet)).FiWalCksum = sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) - break - - case 7: - (*RbuState)(unsafe.Pointer(pRet)).FiCookie = u32(sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1)) - break - - case 8: - (*RbuState)(unsafe.Pointer(pRet)).FiOalSz = i64(u32(sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1))) - break - - case 9: - (*RbuState)(unsafe.Pointer(pRet)).FnPhaseOneStep = sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) - break - - case 10: - (*RbuState)(unsafe.Pointer(pRet)).FzDataTbl = rbuStrndup(tls, sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16 /* &rc */) - break +// Release resources that should be freed at the end of a write +// transaction. +func zipfileCleanupTransaction(tls *crt.TLS, pTab uintptr) { /* zipfile.c:391:13: */ + var pEntry uintptr + var pNext uintptr - default: - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = 11 - break - } + if (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd != 0 { + crt.Xfclose(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd) + (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd = uintptr(0) } - rc2 = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) - if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == 0 { - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = rc2 + for pEntry = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry; pEntry != 0; pEntry = pNext { + pNext = (*ZipfileEntry)(unsafe.Pointer(pEntry)).FpNext + zipfileEntryFree(tls, pEntry) } - - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) - return pRet + (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry = uintptr(0) + (*ZipfileTab)(unsafe.Pointer(pTab)).FpLastEntry = uintptr(0) + (*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent = int64(0) + (*ZipfileTab)(unsafe.Pointer(pTab)).FszOrig = int64(0) } -// Open the database handle and attach the RBU database as "rbu". If an -// error occurs, leave an error code and message in the RBU handle. -func rbuOpenDatabase(tls *crt.TLS, p uintptr, pbRetry uintptr) { /* sqlite3rbu.c:2756:13: */ - bp := tls.Alloc(56) - defer tls.Free(56) - - if !(((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) || (((*sqlite3rbu)(unsafe.Pointer(p)).FdbMain == uintptr(0)) && ((*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu == uintptr(0)))) { - crt.X__assert_fail(tls, ts+13643 /* "p->rc || (p->dbM..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(2757), uintptr(unsafe.Pointer(&__func__58))) - } - if !((((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) || ((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) || ((*sqlite3rbu)(unsafe.Pointer(p)).FzTarget != uintptr(0))) { - crt.X__assert_fail(tls, ts+13682 /* "p->rc || ((p)->z..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(2758), uintptr(unsafe.Pointer(&__func__58))) - } - - // Open the RBU database - (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu = rbuOpenDbhandle(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FzRbu, 1) - - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) { - sqlite3.Xsqlite3_file_control(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+354 /* "main" */, 5149216, p) - if (*sqlite3rbu)(unsafe.Pointer(p)).FzState == uintptr(0) { - var zFile uintptr = sqlite3.Xsqlite3_db_filename(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+354 /* "main" */) - (*sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+13726 /* "file://%s-vacuum..." */, crt.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+13753 /* "ATTACH %Q AS sta..." */, crt.VaList(bp+16, (*sqlite3rbu)(unsafe.Pointer(p)).FzState)) - crt.Xmemcpy(tls, p+48 /* &.zStateDb */, ts+13771 /* "stat" */, uint64(4)) - } else { - crt.Xmemcpy(tls, p+48 /* &.zStateDb */, ts+354 /* "main" */, uint64(4)) - } - - // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+13776 /* "CREATE TABLE IF ..." */, crt.VaList(bp+24, p+48 /* &.zStateDb */)) - - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*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 = sqlite3.Xsqlite3_file_control(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+354 /* "main" */, 5149216, p) - if rc != 12 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc - } - if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage >= 2 { - bOpen = 1 - } else { - var pState uintptr = rbuLoadState(tls, p) - if pState != 0 { - bOpen = (crt.Bool32((*RbuState)(unsafe.Pointer(pState)).FeStage >= 2)) - rbuFreeState(tls, pState) - } - } - if bOpen != 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain = rbuOpenDbhandle(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FzRbu, (crt.Bool32((*sqlite3rbu)(unsafe.Pointer(p)).FnRbu <= 1))) - } - } - - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).FdbMain == uintptr(0)) { - if !((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) { - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain = rbuOpenDbhandle(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FzTarget, 1) - } else if (*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd)).FpWalFd != 0 { - if pbRetry != 0 { - (*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd)).FbNolock = u8(0) - sqlite3.Xsqlite3_close(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu) - sqlite3.Xsqlite3_close(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain) - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain = uintptr(0) - (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu = uintptr(0) - *(*int32)(unsafe.Pointer(pbRetry)) = 1 - return - } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+13842 /* "cannot vacuum wa..." */, 0) - } else { - var zTarget uintptr - var zExtra uintptr = uintptr(0) - if (crt.Xstrlen(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FzRbu) >= uint64(5)) && (0 == crt.Xmemcmp(tls, ts+13874 /* "file:" */, (*sqlite3rbu)(unsafe.Pointer(p)).FzRbu, uint64(5))) { - zExtra = ((*sqlite3rbu)(unsafe.Pointer(p)).FzRbu + uintptr(5)) - for *(*int8)(unsafe.Pointer(zExtra)) != 0 { - if int32(*(*int8)(unsafe.Pointer(crt.PostIncUintptr(&zExtra, 1)))) == '?' { - break - } - } - if int32(*(*int8)(unsafe.Pointer(zExtra))) == 0 { - zExtra = uintptr(0) - } - } - - zTarget = sqlite3.Xsqlite3_mprintf(tls, ts+13880, /* "file:%s-vactmp?r..." */ - crt.VaList(bp+32, sqlite3.Xsqlite3_db_filename(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+354 /* "main" */), - func() uintptr { - if zExtra == uintptr(0) { - return ts + 792 /* "" */ - } - return ts + 13912 /* "&" */ - }(), func() uintptr { - if zExtra == uintptr(0) { - return ts + 792 /* "" */ - } - return zExtra - }())) +// This method is the destructor for zipfile vtab objects. +func zipfileDisconnect(tls *crt.TLS, pVtab uintptr) int32 { /* zipfile.c:412:12: */ + zipfileCleanupTransaction(tls, pVtab) + sqlite3.Xsqlite3_free(tls, pVtab) + return 0 +} - if zTarget == uintptr(0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 7 - return - } - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain = rbuOpenDbhandle(tls, p, zTarget, (crt.Bool32((*sqlite3rbu)(unsafe.Pointer(p)).FnRbu <= 1))) - sqlite3.Xsqlite3_free(tls, zTarget) - } +// Constructor for a new ZipfileCsr object. +func zipfileOpen(tls *crt.TLS, p uintptr, ppCsr uintptr) int32 { /* zipfile.c:421:12: */ + var pTab uintptr = p + var pCsr uintptr + pCsr = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(ZipfileCsr{}))) + *(*uintptr)(unsafe.Pointer(ppCsr)) = pCsr + if pCsr == uintptr(0) { + return 7 } + crt.Xmemset(tls, pCsr, 0, uint64(unsafe.Sizeof(ZipfileCsr{}))) + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiId = crt.PreIncInt64(&(*ZipfileTab)(unsafe.Pointer(pTab)).FiNextCsrid, 1) + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCsrNext = (*ZipfileTab)(unsafe.Pointer(pTab)).FpCsrList + (*ZipfileTab)(unsafe.Pointer(pTab)).FpCsrList = pCsr + return 0 +} - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_create_function(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+13914 /* "rbu_tmp_insert" */, -1, 1, p, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32, uintptr) - }{rbuTmpInsertFunc})), uintptr(0), uintptr(0)) - } +// Reset a cursor back to the state it was in when first returned +// by zipfileOpen(). +func zipfileResetCursor(tls *crt.TLS, pCsr uintptr) { /* zipfile.c:440:13: */ + var p uintptr + var pNext uintptr - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_create_function(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, - ts+13929 /* "rbu_fossil_delta" */, 2, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32, uintptr) - }{rbuFossilDeltaFunc})), uintptr(0), uintptr(0)) + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof = u8(0) + if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile != 0 { + crt.Xfclose(tls, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile) + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile = uintptr(0) + zipfileEntryFree(tls, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent) + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = uintptr(0) } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_create_function(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+13946 /* "rbu_target_name" */, -1, 1, p, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32, uintptr) - }{rbuTargetNameFunc})), uintptr(0), uintptr(0)) + for p = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFreeEntry; p != 0; p = pNext { + pNext = (*ZipfileEntry)(unsafe.Pointer(p)).FpNext + zipfileEntryFree(tls, p) } +} - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_file_control(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 26, p) - } - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+13962 /* "SELECT * FROM sq..." */, 0) +// Destructor for an ZipfileCsr. +func zipfileClose(tls *crt.TLS, cur uintptr) int32 { /* zipfile.c:461:12: */ + var pCsr uintptr = cur + var pTab uintptr = (*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab + var pp uintptr + zipfileResetCursor(tls, pCsr) - // 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 == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_file_control(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */, 26, p) + // Remove this cursor from the ZipfileTab.pCsrList list. + for pp = (pTab + 48 /* &.pCsrList */); *(*uintptr)(unsafe.Pointer(pp)) != pCsr; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 80 /* &.pCsrNext */) { } + *(*uintptr)(unsafe.Pointer(pp)) = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCsrNext - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 12 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+13990 /* "rbu vfs not foun..." */, 0) - } + sqlite3.Xsqlite3_free(tls, pCsr) + return 0 } -var __func__58 = *(*[16]int8)(unsafe.Pointer(ts + 14008 /* "rbuOpenDatabase" */)) /* sqlite3rbu.c:2756:57 */ - -// This routine is a copy of the sqlite3FileSuffix3() routine from the core. -// It is a no-op unless SQLITE_ENABLE_8_3_NAMES is defined. -// -// If SQLITE_ENABLE_8_3_NAMES is set at compile-time and if the database -// filename in zBaseFilename is a URI with the "8_3_names=1" parameter and -// if filename in z[] has a suffix (a.k.a. "extension") that is longer than -// three characters, then shorten the suffix on z[] to be the last three -// characters of the original suffix. -// -// If SQLITE_ENABLE_8_3_NAMES is set to 2 at compile-time, then always -// do the suffix shortening regardless of URI parameter. -// -// Examples: -// -// test.db-journal => test.nal -// test.db-wal => test.wal -// test.db-shm => test.shm -// test.db-mj7f3319fa => test.9fa -func rbuFileSuffix3(tls *crt.TLS, zBase uintptr, z uintptr) { /* sqlite3rbu.c:2935:13: */ +// Set the error message for the virtual table associated with cursor +// pCsr to the results of vprintf(zFmt, ...). +func zipfileTableErr(tls *crt.TLS, pTab uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:479:13: */ + var ap va_list + _ = ap + ap = va + sqlite3.Xsqlite3_free(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg) + (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) + _ = ap } - -// Return the current wal-index header checksum for the target database -// as a 64-bit integer. -// -// The checksum is store in the first page of xShmMap memory as an 8-byte -// blob starting at byte offset 40. -func rbuShmChecksum(tls *crt.TLS, p uintptr) i64 { /* sqlite3rbu.c:2956:12: */ - bp := tls.Alloc(8) - defer tls.Free(8) - - var iRet i64 = int64(0) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var pDb uintptr = (*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal - // var ptr uintptr at bp, 8 - - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp /* &ptr */) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - iRet = ((i64(*(*u32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* ptr */)) + uintptr(10)*4))) << 32) + i64(*(*u32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* ptr */)) + uintptr(11)*4)))) - } - } - return iRet +func zipfileCursorErr(tls *crt.TLS, pCsr uintptr, zFmt uintptr, va uintptr) { /* zipfile.c:486:13: */ + var ap va_list + _ = ap + ap = va + sqlite3.Xsqlite3_free(tls, (*sqlite3_vtab)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg) + (*sqlite3_vtab)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = sqlite3.Xsqlite3_vmprintf(tls, zFmt, ap) + _ = ap } -// This function is called as part of initializing or reinitializing an -// incremental checkpoint. -// -// It populates the sqlite3rbu.aFrame[] array with the set of -// (wal frame -> db page) copy operations required to checkpoint the -// current wal file, and obtains the set of shm locks required to safely -// perform the copy operations directly on the file-system. +// Read nRead bytes of data from offset iOff of file pFile into buffer +// aRead[]. Return SQLITE_OK if successful, or an SQLite error code +// otherwise. // -// If argument pState is not NULL, then the incremental checkpoint is -// being resumed. In this case, if the checksum of the wal-index-header -// following recovery is not the same as the checksum saved in the RbuState -// 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 *crt.TLS, p uintptr, pState uintptr) { /* sqlite3rbu.c:2985: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 - // does not interfere with the "capture" process below. - if pState == uintptr(0) { - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 0 - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+13962 /* "SELECT * FROM sq..." */, uintptr(0), uintptr(0), uintptr(0)) - } - } - - // Assuming no error has occurred, run a "restart" checkpoint with the - // sqlite3rbu.eStage variable set to CAPTURE. This turns on the following - // special behaviour in the rbu VFS: - // - // * If the exclusive shm WRITER or READ0 lock cannot be obtained, - // the checkpoint fails with SQLITE_BUSY (normally SQLite would - // proceed with running a passive checkpoint instead of failing). - // - // * Attempts to read from the *-wal file or write to the database file - // do not perform any IO. Instead, the frame/page combinations that - // would be read/written are recorded in the sqlite3rbu.aFrame[] - // array. - // - // * Calls to xShmLock(UNLOCK) to release the exclusive shm WRITER, - // READ0 and CHECKPOINT locks taken as part of the checkpoint are - // no-ops. These locks will not be released until the connection - // is closed. - // - // * Attempting to xSync() the database file causes an SQLITE_INTERNAL - // error. - // - // As a result, unless an error (i.e. OOM or SQLITE_BUSY) occurs, the - // checkpoint below fails with SQLITE_INTERNAL, and leaves the aFrame[] - // array populated with a set of (frame -> page) mappings. Because the - // WRITER, CHECKPOINT and READ0 locks are still held, it is safe to copy - // data from the wal file into the database file according to the - // contents of aFrame[]. - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var rc2 int32 - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 3 - rc2 = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14024 /* "PRAGMA main.wal_..." */, uintptr(0), uintptr(0), uintptr(0)) - if rc2 != 2 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 - } - } - - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).FnFrame > 0) { - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 4 - (*sqlite3rbu)(unsafe.Pointer(p)).FnStep = func() int32 { - if pState != 0 { - return (*RbuState)(unsafe.Pointer(pState)).FnRow - } - return 0 - }() - (*sqlite3rbu)(unsafe.Pointer(p)).FaBuf = rbuMalloc(tls, p, int64((*sqlite3rbu)(unsafe.Pointer(p)).Fpgsz)) - (*sqlite3rbu)(unsafe.Pointer(p)).FiWalCksum = rbuShmChecksum(tls, p) - } - - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if ((*sqlite3rbu)(unsafe.Pointer(p)).FnFrame == 0) || ((pState != 0) && ((*RbuState)(unsafe.Pointer(pState)).FiWalCksum != (*sqlite3rbu)(unsafe.Pointer(p)).FiWalCksum)) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 101 - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 5 - } else { - var nSectorSize int32 - var pDb uintptr = (*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal - var pWal uintptr = (*rbu_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd)).FpReal - if !((*sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector == 0) { - crt.X__assert_fail(tls, ts+14059 /* "p->nPagePerSecto..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3047), uintptr(unsafe.Pointer(&__func__59))) - } - nSectorSize = (*(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 88 /* &.xSectorSize */))))(tls, pDb) - if nSectorSize > (*sqlite3rbu)(unsafe.Pointer(p)).Fpgsz { - (*sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector = (nSectorSize / (*sqlite3rbu)(unsafe.Pointer(p)).Fpgsz) - } else { - (*sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector = 1 - } - - // Call xSync() on the wal file. This causes SQLite to sync the - // directory in which the target database and the wal file reside, in - // case it has not been synced since the rename() call in - // rbuMoveOalFile(). - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pWal)).FpMethods + 40 /* &.xSync */))))(tls, pWal, 0x00002) - } +// If an error does occur, output variable (*pzErrmsg) may be set to point +// to an English language error message. It is the responsibility of the +// caller to eventually free this buffer using +// sqlite3_free(). +func zipfileReadData(tls *crt.TLS, pFile uintptr, aRead uintptr, nRead int32, iOff i64, pzErrmsg uintptr) int32 { /* zipfile.c:504:12: */ + var n size_t + crt.Xfseek(tls, pFile, int64(iOff), 0) + n = crt.Xfread(tls, aRead, uint64(1), uint64(nRead), pFile) + if int32(n) != nRead { + *(*uintptr)(unsafe.Pointer(pzErrmsg)) = sqlite3.Xsqlite3_mprintf(tls, ts+7599 /* "error in fread()" */, 0) + return 1 } + return 0 } -var __func__59 = *(*[19]int8)(unsafe.Pointer(ts + 14080 /* "rbuSetupCheckpoi..." */)) /* sqlite3rbu.c:2985:64 */ - -// 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 *crt.TLS, pRbu uintptr, iOff i64, iAmt int32) int32 { /* sqlite3rbu.c:3069:12: */ - var mReq u32 = (u32(((int32(1) << 0) | (int32(1) << 1)) | (int32(1) << 3))) - var iFrame u32 - - if (*sqlite3rbu)(unsafe.Pointer(pRbu)).FmLock != mReq { - (*sqlite3rbu)(unsafe.Pointer(pRbu)).Frc = 5 - return 2 - } - - (*sqlite3rbu)(unsafe.Pointer(pRbu)).Fpgsz = iAmt - if (*sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrame == (*sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrameAlloc { - var nNew int32 = ((func() int32 { - if (*sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrameAlloc != 0 { - return (*sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrameAlloc - } - return 64 - }()) * 2) - var aNew uintptr - aNew = sqlite3.Xsqlite3_realloc64(tls, (*sqlite3rbu)(unsafe.Pointer(pRbu)).FaFrame, (uint64(uint64(nNew) * uint64(unsafe.Sizeof(RbuFrame{}))))) - if aNew == uintptr(0) { - return 7 - } - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FaFrame = aNew - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrameAlloc = nNew - } - - iFrame = ((u32((iOff - int64(32)) / (i64(iAmt + 24)))) + u32(1)) - if (*sqlite3rbu)(unsafe.Pointer(pRbu)).FiMaxFrame < iFrame { - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FiMaxFrame = iFrame +func zipfileAppendData(tls *crt.TLS, pTab uintptr, aWrite uintptr, nWrite int32) int32 { /* zipfile.c:521:12: */ + var n size_t + crt.Xfseek(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd, int64((*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent), 0) + n = crt.Xfwrite(tls, aWrite, uint64(1), uint64(nWrite), (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd) + if int32(n) != nWrite { + (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+7616 /* "error in fwrite(..." */, 0) + return 1 } - (*RbuFrame)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(pRbu)).FaFrame + uintptr((*sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrame)*8)).FiWalFrame = iFrame - (*RbuFrame)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(pRbu)).FaFrame + uintptr((*sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrame)*8)).FiDbPage = u32(0) - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FnFrame++ + *(*i64)(unsafe.Pointer(pTab + 88 /* &.szCurrent */)) += (i64(nWrite)) return 0 } -// 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 *crt.TLS, pRbu uintptr, iOff i64) int32 { /* sqlite3rbu.c:3101: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 0 +// Read and return a 16-bit little-endian unsigned integer from buffer aBuf. +func zipfileGetU16(tls *crt.TLS, aBuf uintptr) u16 { /* zipfile.c:540:12: */ + return (u16((int32(*(*u8)(unsafe.Pointer(aBuf + uintptr(1)))) << 8) + int32(*(*u8)(unsafe.Pointer(aBuf + uintptr(0)))))) } -// 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 *crt.TLS, p uintptr, pFrame uintptr) { /* sqlite3rbu.c:3111: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 - - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - crt.X__assert_fail(tls, ts+10376 /* "p->rc==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3116), uintptr(unsafe.Pointer(&__func__60))) - } - iOff = ((((i64((*RbuFrame)(unsafe.Pointer(pFrame)).FiWalFrame - u32(1))) * (i64((*sqlite3rbu)(unsafe.Pointer(p)).Fpgsz + 24))) + int64(32)) + int64(24)) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pWal)).FpMethods + 16 /* &.xRead */))))(tls, pWal, (*sqlite3rbu)(unsafe.Pointer(p)).FaBuf, (*sqlite3rbu)(unsafe.Pointer(p)).Fpgsz, iOff) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - return - } - - iOff = ((i64((*RbuFrame)(unsafe.Pointer(pFrame)).FiDbPage - u32(1))) * i64((*sqlite3rbu)(unsafe.Pointer(p)).Fpgsz)) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 24 /* &.xWrite */))))(tls, pDb, (*sqlite3rbu)(unsafe.Pointer(p)).FaBuf, (*sqlite3rbu)(unsafe.Pointer(p)).Fpgsz, iOff) +// Read and return a 32-bit little-endian unsigned integer from buffer aBuf. +func zipfileGetU32(tls *crt.TLS, aBuf uintptr) u32 { /* zipfile.c:547:12: */ + return (((((u32(*(*u8)(unsafe.Pointer(aBuf + uintptr(3))))) << 24) + + ((u32(*(*u8)(unsafe.Pointer(aBuf + uintptr(2))))) << 16)) + + ((u32(*(*u8)(unsafe.Pointer(aBuf + uintptr(1))))) << 8)) + + ((u32(*(*u8)(unsafe.Pointer(aBuf + uintptr(0))))) << 0)) } -var __func__60 = *(*[19]int8)(unsafe.Pointer(ts + 14099 /* "rbuCheckpointFra..." */)) /* sqlite3rbu.c:3111:64 */ +// Write a 16-bit little endiate integer into buffer aBuf. +func zipfilePutU16(tls *crt.TLS, aBuf uintptr, val u16) { /* zipfile.c:557:13: */ + *(*u8)(unsafe.Pointer(aBuf + uintptr(0))) = (u8(int32(val) & 0xFF)) + *(*u8)(unsafe.Pointer(aBuf + uintptr(1))) = (u8((int32(val) >> 8) & 0xFF)) +} -// Take an EXCLUSIVE lock on the database file. -func rbuLockDatabase(tls *crt.TLS, p uintptr) { /* sqlite3rbu.c:3129:13: */ - var pReal uintptr = (*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - crt.X__assert_fail(tls, ts+10376 /* "p->rc==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3131), uintptr(unsafe.Pointer(&__func__61))) - } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 56 /* &.xLock */))))(tls, pReal, 1) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pReal)).FpMethods + 56 /* &.xLock */))))(tls, pReal, 4) - } +// Write a 32-bit little endiate integer into buffer aBuf. +func zipfilePutU32(tls *crt.TLS, aBuf uintptr, val u32) { /* zipfile.c:565:13: */ + *(*u8)(unsafe.Pointer(aBuf + uintptr(0))) = (u8(val & uint64(0xFF))) + *(*u8)(unsafe.Pointer(aBuf + uintptr(1))) = (u8((val >> 8) & uint64(0xFF))) + *(*u8)(unsafe.Pointer(aBuf + uintptr(2))) = (u8((val >> 16) & uint64(0xFF))) + *(*u8)(unsafe.Pointer(aBuf + uintptr(3))) = (u8((val >> 24) & uint64(0xFF))) } -var __func__61 = *(*[16]int8)(unsafe.Pointer(ts + 14118 /* "rbuLockDatabase" */)) /* sqlite3rbu.c:3129:43 */ +// Magic numbers used to read CDS records. -// The RBU handle is currently in RBU_STAGE_OAL state, with a SHARED lock -// on the database file. This proc moves the *-oal file to the *-wal path, -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:3169:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) +// Decode the CDS record in buffer aBuf into (*pCDS). Return SQLITE_ERROR +// if the record is not well-formed, or SQLITE_OK otherwise. +func zipfileReadCDS(tls *crt.TLS, aBuf uintptr, pCDS uintptr) int32 { /* zipfile.c:588:12: */ + var aRead uintptr = aBuf + var sig u32 = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + var rc int32 = 0 + if sig != uint64(0x02014b50) { + rc = 1 + } else { + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiVersionMadeBy = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiVersionExtract = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).Fflags = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).Fcrc32 = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FszCompressed = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FszUncompressed = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnExtra = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnComment = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiDiskStart = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiInternalAttr = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiExternalAttr = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiOffset = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + } - var zBase uintptr = sqlite3.Xsqlite3_db_filename(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+354 /* "main" */) - var zMove uintptr = zBase - var zOal uintptr - var zWal uintptr + return rc +} - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - zMove = sqlite3.Xsqlite3_db_filename(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+354 /* "main" */) - } - zOal = sqlite3.Xsqlite3_mprintf(tls, ts+14134 /* "%s-oal" */, crt.VaList(bp, zMove)) - zWal = sqlite3.Xsqlite3_mprintf(tls, ts+14141 /* "%s-wal" */, crt.VaList(bp+8, zMove)) +// Decode the LFH record in buffer aBuf into (*pLFH). Return SQLITE_ERROR +// if the record is not well-formed, or SQLITE_OK otherwise. +func zipfileReadLFH(tls *crt.TLS, aBuffer uintptr, pLFH uintptr) int32 { /* zipfile.c:622:12: */ + var aRead uintptr = aBuffer + var rc int32 = 0 - if !((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 2) { - crt.X__assert_fail(tls, ts+14148 /* "p->eStage==2" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3181), uintptr(unsafe.Pointer(&__func__62))) - } - if !(((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg == uintptr(0))) { - crt.X__assert_fail(tls, ts+14161 /* "p->rc==0 && p->z..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3182), uintptr(unsafe.Pointer(&__func__62))) - } - if (zWal == uintptr(0)) || (zOal == uintptr(0)) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 7 + var sig u32 = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + if sig != uint64(0x04034b50) { + rc = 1 } else { - // Move the *-oal file to *-wal. At this point connection p->db is - // holding a SHARED lock on the target database file (because it is - // in WAL mode). So no other connection may be writing the db. - // - // In order to ensure that there are no database readers, an EXCLUSIVE - // lock is obtained here before the *-oal is moved to *-wal. - rbuLockDatabase(tls, p) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - rbuFileSuffix3(tls, zBase, zWal) - rbuFileSuffix3(tls, zBase, zOal) - - // Re-open the databases. - rbuObjIterFinalize(tls, (p + 80 /* &.objiter */)) - sqlite3.Xsqlite3_close(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu) - sqlite3.Xsqlite3_close(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain) - (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain = uintptr(0) - (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu = uintptr(0) - - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = func() int32 { - if crt.Xrename(tls, zOal, zWal) != 0 { - return 10 - } - return 0 - }() - - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - rbuOpenDatabase(tls, p, uintptr(0)) - rbuSetupCheckpoint(tls, p, uintptr(0)) - } - } + (*ZipfileLFH)(unsafe.Pointer(pLFH)).FiVersionExtract = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).Fflags = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).FiCompression = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).FmTime = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).FmDate = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).Fcrc32 = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).FszCompressed = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).FszUncompressed = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).FnFile = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileLFH)(unsafe.Pointer(pLFH)).FnExtra = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() } - - sqlite3.Xsqlite3_free(tls, zWal) - sqlite3.Xsqlite3_free(tls, zOal) + return rc } -var __func__62 = *(*[15]int8)(unsafe.Pointer(ts + 14187 /* "rbuMoveOalFile" */)) /* sqlite3rbu.c:3169:42 */ - -// The SELECT statement iterating through the keys for the current object -// (p->objiter.pSelect) currently points to a valid row. This function -// determines the type of operation requested by this row and returns -// one of the following values to indicate the result: +// Buffer aExtra (size nExtra bytes) contains zip archive "extra" fields. +// Scan through this buffer to find an "extra-timestamp" field. If one +// exists, extract the 32-bit modification-timestamp from it and store +// the value in output parameter *pmTime. // -// * RBU_INSERT -// * RBU_DELETE -// * RBU_IDX_DELETE -// * RBU_UPDATE +// Zero is returned if no extra-timestamp record could be found (and so +// *pmTime is left unchanged), or non-zero otherwise. // -// If RBU_UPDATE is returned, then output variable *pzMask is set to -// point to the text value indicating the columns to update. +// The general format of an extra field is: // -// 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 *crt.TLS, p uintptr, pzMask uintptr) int32 { /* sqlite3rbu.c:3260:12: */ - var iCol int32 = (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnCol // Index of rbu_control column - var res int32 = 0 // Return value +// Header ID 2 bytes +// Data Size 2 bytes +// Data N bytes +func zipfileScanExtra(tls *crt.TLS, aExtra uintptr, nExtra int32, pmTime uintptr) int32 { /* zipfile.c:663:12: */ + var ret int32 = 0 + var p uintptr = aExtra + var pEnd uintptr = (aExtra + uintptr(nExtra)) - switch sqlite3.Xsqlite3_column_type(tls, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpSelect, iCol) { - case 1: - { - var iVal int32 = sqlite3.Xsqlite3_column_int(tls, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpSelect, iCol) - switch iVal { - case 0: - res = 1 - break - case 1: - res = 2 - break - case 2: - res = 3 - break - case 3: - res = 4 - break - case 4: - res = 5 - break - } - break - } + for p < pEnd { + var id u16 = func() u16 { p += uintptr(2); return zipfileGetU16(tls, (p - uintptr(2))) }() + var nByte u16 = func() u16 { p += uintptr(2); return zipfileGetU16(tls, (p - uintptr(2))) }() - case 3: - { - var z uintptr = sqlite3.Xsqlite3_column_text(tls, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FpSelect, iCol) - if z == uintptr(0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 7 - } else { - *(*uintptr)(unsafe.Pointer(pzMask)) = z + switch int32(id) { + case 0x5455: + { + var b u8 = *(*u8)(unsafe.Pointer(p + uintptr(0))) + if (int32(b) & 0x01) != 0 { // 0x01 -> modtime is present + *(*u32)(unsafe.Pointer(pmTime)) = zipfileGetU32(tls, (p + uintptr(1))) + ret = 1 + } + break } - res = 6 - - break } - default: - break - } - - if res == 0 { - rbuBadControlError(tls, p) + p += uintptr(nByte) } - return res + return ret } -// 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 *crt.TLS, p uintptr, eType int32) { /* sqlite3rbu.c:3316:13: */ - var pIter uintptr = (p + 80 /* &.objiter */) - var pVal uintptr - var pWriter uintptr - var i int32 - - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - crt.X__assert_fail(tls, ts+10376 /* "p->rc==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3322), uintptr(unsafe.Pointer(&__func__63))) - } - if !((eType != 2) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0))) { - crt.X__assert_fail(tls, ts+14202 /* "eType!=2 || pIte..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3323), uintptr(unsafe.Pointer(&__func__63))) - } - if !((((eType == 2) || (eType == 4)) || (eType == 1)) || (eType == 5)) { - crt.X__assert_fail(tls, ts+14229 /* "eType==2 || eTyp..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3324), uintptr(unsafe.Pointer(&__func__63))) +// Convert the standard MS-DOS timestamp stored in the mTime and mDate +// fields of the CDS structure passed as the only argument to a 32-bit +// UNIX seconds-since-the-epoch timestamp. Return the result. +// +// "Standard" MS-DOS time format: +// +// File modification time: +// Bits 00-04: seconds divided by 2 +// Bits 05-10: minute +// Bits 11-15: hour +// File modification date: +// Bits 00-04: day +// Bits 05-08: month (1-12) +// Bits 09-15: years from 1980 +// +// https://msdn.microsoft.com/en-us/library/9kkf9tah.aspx +func zipfileMtime(tls *crt.TLS, pCDS uintptr) u32 { /* zipfile.c:706:12: */ + var Y int32 = (1980 + ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate) >> 9) & 0x7F)) + var M int32 = ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate) >> 5) & 0x0F) + var D int32 = (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate) & 0x1F) + var B int32 = -13 + + var sec int32 = ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime) & 0x1F) * 2) + var min int32 = ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime) >> 5) & 0x3F) + var hr int32 = ((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime) >> 11) & 0x1F) + var JD i64 + + // JD = INT(365.25 * (Y+4716)) + INT(30.6001 * (M+1)) + D + B - 1524.5 + + // Calculate the JD in seconds for noon on the day in question + if M < 3 { + Y = (Y - 1) + M = (M + 12) + } + JD = ((int64((24 * 60) * 60)) * (i64(((((int32(365.25 * (float64(Y + 4716)))) + + (int32(30.6001 * (float64(M + 1))))) + + D) + B) - 1524))) + + // Correct the JD for the time within the day + JD = JD + (i64((((hr - 12) * 3600) + (min * 60)) + sec)) + + // Convert JD to unix timestamp (the JD epoch is 2440587.5) + return (u32(JD - ((((int64(24405875)) * int64(24)) * int64(60)) * int64(6)))) +} + +// The opposite of zipfileMtime(). This function populates the mTime and +// mDate fields of the CDS structure passed as the first argument according +// to the UNIX timestamp value passed as the second. +func zipfileMtimeToDos(tls *crt.TLS, pCds uintptr, mUnixTime u32) { /* zipfile.c:742:13: */ + // Convert unix timestamp to JD (2440588 is noon on 1/1/1970) + var JD i64 = (i64(uint64(int64(2440588)) + (uint64(mUnixTime / (uint64((24 * 60) * 60)))))) + var A int32 + var B int32 + var C int32 + var D int32 + var E int32 + var yr int32 + var mon int32 + var day int32 + var hr int32 + var min int32 + var sec int32 + + A = (int32((float64(JD) - 1867216.25) / 36524.25)) + A = (int32(((JD + int64(1)) + i64(A)) - (i64(A / 4)))) + B = (A + 1524) + C = (int32((float64(B) - 122.1) / 365.25)) + D = ((36525 * (C & 32767)) / 100) + E = (int32((float64(B - D)) / 30.6001)) + + day = ((B - D) - (int32(30.6001 * float64(E)))) + mon = func() int32 { + if E < 14 { + return (E - 1) + } + return (E - 13) + }() + if mon > 2 { + yr = (C - 4716) + } else { + yr = (C - 4715) } - // If this is a delete, decrement nPhaseOneStep by nIndex. If the DELETE - // statement below does actually delete a row, nPhaseOneStep will be - // incremented by the same amount when SQL function rbu_tmp_insert() - // is invoked by the trigger. - if eType == 2 { - *(*i64)(unsafe.Pointer(p + 304 /* &.nPhaseOneStep */)) -= (i64((*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex)) - } + hr = (int32((mUnixTime % (uint64((24 * 60) * 60))) / (uint64(60 * 60)))) + min = (int32((mUnixTime % (uint64(60 * 60))) / uint64(60))) + sec = (int32(mUnixTime % uint64(60))) - if (eType == 4) || (eType == 2) { - pWriter = (*RbuObjIter)(unsafe.Pointer(pIter)).FpDelete + if yr >= 1980 { + (*ZipfileCDS)(unsafe.Pointer(pCds)).FmDate = (u16((day + (mon << 5)) + ((yr - 1980) << 9))) + (*ZipfileCDS)(unsafe.Pointer(pCds)).FmTime = (u16(((sec / 2) + (min << 5)) + (hr << 11))) } else { - pWriter = (*RbuObjIter)(unsafe.Pointer(pIter)).FpInsert - } - - for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol; i++ { - // If this is an INSERT into a table b-tree and the table has an - // explicit INTEGER PRIMARY KEY, check that this is not an attempt - // to write a NULL into the IPK column. That is not permitted. - if ((((eType == 1) && - ((*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0))) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 2)) && (*(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0)) && - (sqlite3.Xsqlite3_column_type(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) == 5) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 20 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+14274 /* "datatype mismatc..." */, 0) - return - } - - if (eType == 2) && (int32(*(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i)))) == 0) { - continue - } - - pVal = sqlite3.Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_bind_value(tls, pWriter, (i + 1), pVal) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - return - } + (*ZipfileCDS)(unsafe.Pointer(pCds)).FmDate = crt.AssignPtrUint16(pCds+8 /* &.mTime */, u16(0)) } - if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { - if (((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 5) || - ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1)) || - (((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 3) && ((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) { - // For a virtual table, or a table with no primary key, the - // SELECT statement is: - // - // SELECT <cols>, rbu_control, rbu_rowid FROM .... - // - // Hence column_value(pIter->nCol+1). - pVal = sqlite3.Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, ((*RbuObjIter)(unsafe.Pointer(pIter)).FnCol + 1)) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_bind_value(tls, pWriter, ((*RbuObjIter)(unsafe.Pointer(pIter)).FnCol + 1), pVal) - } - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - sqlite3.Xsqlite3_step(tls, pWriter) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = resetAndCollectError(tls, pWriter, (p + 64 /* &.zErrmsg */)) - } } -var __func__63 = *(*[13]int8)(unsafe.Pointer(ts + 14292 /* "rbuStepOneOp" */)) /* sqlite3rbu.c:3316:51 */ - -// This function does the work for an sqlite3rbu_step() call. -// -// The object-iterator (p->objiter) currently points to a valid object, -// and the input cursor (p->objiter.pSelect) currently points to a valid -// input row. Perform whatever processing is required and return. +// If aBlob is not NULL, then it is a pointer to a buffer (nBlob bytes in +// size) containing an entire zip archive image. Or, if aBlob is NULL, +// then pFile is a file-handle open on a zip file. In either case, this +// function creates a ZipfileEntry object based on the zip archive entry +// for which the CDS record is at offset iOff. // -// 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 *crt.TLS, p uintptr) int32 { /* sqlite3rbu.c:3399:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) +// If successful, SQLITE_OK is returned and (*ppEntry) set to point to +// the new object. Otherwise, an SQLite error code is returned and the +// final value of (*ppEntry) undefined. +func zipfileGetEntry(tls *crt.TLS, pTab uintptr, aBlob uintptr, nBlob int32, pFile uintptr, iOff i64, ppEntry uintptr) int32 { /* zipfile.c:790:12: */ + bp := tls.Alloc(80) + defer tls.Free(80) - var pIter uintptr = (p + 80 /* &.objiter */) - *(*uintptr)(unsafe.Pointer(bp /* zMask */)) = uintptr(0) - var eType int32 = rbuStepType(tls, p, bp /* &zMask */) + var aRead uintptr + var pzErr uintptr = (pTab /* &.base */ + 16 /* &.zErrMsg */) + var rc int32 = 0 - if eType != 0 { - if !((((((eType == 1) || (eType == 2)) || (eType == 3)) || (eType == 4)) || (eType == 5)) || (eType == 6)) { - crt.X__assert_fail(tls, ts+14305 /* "eType==1 || eTyp..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3405), uintptr(unsafe.Pointer(&__func__64))) - } - if !((eType != 6) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0))) { - crt.X__assert_fail(tls, ts+14374 /* "eType!=6 || pIte..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3409), uintptr(unsafe.Pointer(&__func__64))) + if aBlob == uintptr(0) { + aRead = (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer + rc = zipfileReadData(tls, pFile, aRead, 46, iOff, pzErr) + } else { + aRead = (aBlob + uintptr(iOff)) + } + + if rc == 0 { + var nAlloc sqlite3_int64 + var pNew uintptr + + var nFile int32 = int32(zipfileGetU16(tls, (aRead + uintptr(28)))) + var nExtra int32 = int32(zipfileGetU16(tls, (aRead + uintptr((28 + 2))))) + nExtra = nExtra + (int32(zipfileGetU16(tls, (aRead + uintptr((28 + 4)))))) + + nAlloc = (sqlite3_int64(uint64(unsafe.Sizeof(ZipfileEntry{})) + uint64(nExtra))) + if aBlob != 0 { + nAlloc = sqlite3_int64(uint64(nAlloc) + (uint64(zipfileGetU32(tls, (aRead + uintptr(20)))))) } - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0)) && ((eType == 4) || (eType == 5)) { - rbuBadControlError(tls, p) - } else if eType == 3 { - if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { - *(*i64)(unsafe.Pointer(p + 304 /* &.nPhaseOneStep */)) += (i64((*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex)) - rbuStepOneOp(tls, p, 2) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - rbuStepOneOp(tls, p, 1) - } - } else if eType != 6 { - rbuStepOneOp(tls, p, eType) + pNew = sqlite3.Xsqlite3_malloc64(tls, uint64(nAlloc)) + if pNew == uintptr(0) { + rc = 7 } else { - var pVal uintptr - *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)) = uintptr(0) - if !(eType == 6) { - crt.X__assert_fail(tls, ts+14401 /* "eType==6" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3427), uintptr(unsafe.Pointer(&__func__64))) + crt.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(ZipfileEntry{}))) + rc = zipfileReadCDS(tls, aRead, (pNew /* &.cds */)) + if rc != 0 { + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7634 /* "failed to read C..." */, crt.VaList(bp, iOff)) + } else if aBlob == uintptr(0) { + rc = zipfileReadData(tls, + pFile, aRead, (nExtra + nFile), (iOff + int64(46)), pzErr) + } else { + aRead = (aBlob + uintptr((iOff + int64(46)))) } - *(*i64)(unsafe.Pointer(p + 304 /* &.nPhaseOneStep */)) -= (i64((*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FnIndex)) - rbuGetUpdateStmt(tls, p, pIter, *(*uintptr)(unsafe.Pointer(bp /* zMask */)), bp+8 /* &pUpdate */) - if *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)) != 0 { - var i int32 - for i = 0; ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol); i++ { - var c int8 = *(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* zMask */)) + uintptr(*(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr(i)*4))))) - pVal = sqlite3.Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, i) - if (*(*u8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0) || (int32(c) != '.') { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)), (i + 1), pVal) - } - } - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && - (((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 5) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == 1)) { - // Bind the rbu_rowid value to column _rowid_ + } - pVal = sqlite3.Xsqlite3_column_value(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect, ((*RbuObjIter)(unsafe.Pointer(pIter)).FnCol + 1)) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)), ((*RbuObjIter)(unsafe.Pointer(pIter)).FnCol + 1), pVal) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */))) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = resetAndCollectError(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pUpdate */)), (p + 64 /* &.zErrmsg */)) - } + if rc == 0 { + var pt uintptr = (pNew + 80 /* &.mUnixTime */) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FzFile = sqlite3.Xsqlite3_mprintf(tls, ts+7668 /* "%.*s" */, crt.VaList(bp+8, nFile, aRead)) + (*ZipfileEntry)(unsafe.Pointer(pNew)).FaExtra = (pNew + uintptr(1)*120) + crt.Xmemcpy(tls, (*ZipfileEntry)(unsafe.Pointer(pNew)).FaExtra, (aRead + uintptr(nFile)), uint64(nExtra)) + if (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FzFile == uintptr(0) { + rc = 7 + } else if 0 == zipfileScanExtra(tls, (aRead+uintptr(nFile)), int32((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FnExtra), pt) { + (*ZipfileEntry)(unsafe.Pointer(pNew)).FmUnixTime = zipfileMtime(tls, (pNew /* &.cds */)) } } - } - return (*sqlite3rbu)(unsafe.Pointer(p)).Frc -} -var __func__64 = *(*[8]int8)(unsafe.Pointer(ts + 14410 /* "rbuStep" */)) /* sqlite3rbu.c:3399:34 */ - -// Increment the schema cookie of the main database opened by p->dbMain. -// -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:3464:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + if rc == 0 { + // var lfh ZipfileLFH at bp+32, 48 - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var dbread uintptr = func() uintptr { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - return (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu + if pFile != 0 { + rc = zipfileReadData(tls, pFile, aRead, szFix, int64((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset), pzErr) + } else { + aRead = (aBlob + uintptr((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset)) } - return (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain - }() - var iCookie int32 = 1000000 - // var pStmt uintptr at bp+8, 8 - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8 /* &pStmt */, (p + 64 /* &.zErrmsg */), - ts+14418 /* "PRAGMA schema_ve..." */) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - // Coverage: it may be that this sqlite3_step() cannot fail. There - // is already a transaction open, so the prepared statement cannot - // throw an SQLITE_SCHEMA exception. The only database page the - // statement reads is page 1, which is guaranteed to be in the cache. - // And no memory allocations are required. - if 100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) { - iCookie = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) + rc = zipfileReadLFH(tls, aRead, bp+32 /* &lfh */) + if rc == 0 { + (*ZipfileEntry)(unsafe.Pointer(pNew)).FiDataOff = (i64((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset + uint64(30))) + *(*i64)(unsafe.Pointer(pNew + 96 /* &.iDataOff */)) += (i64(int32((*ZipfileLFH)(unsafe.Pointer(bp+32 /* &lfh */)).FnFile) + int32((*ZipfileLFH)(unsafe.Pointer(bp+32 /* &lfh */)).FnExtra))) + if (aBlob != 0) && ((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FszCompressed != 0) { + (*ZipfileEntry)(unsafe.Pointer(pNew)).FaData = ((*ZipfileEntry)(unsafe.Pointer(pNew)).FaExtra + uintptr(nExtra)) + crt.Xmemcpy(tls, (*ZipfileEntry)(unsafe.Pointer(pNew)).FaData, (aBlob + uintptr((*ZipfileEntry)(unsafe.Pointer(pNew)).FiDataOff)), (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FszCompressed) + } + } else { + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7673, /* "failed to read L..." */ + crt.VaList(bp+24, int32((*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset))) } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14440 /* "PRAGMA schema_ve..." */, crt.VaList(bp, (iCookie+1))) + + if rc != 0 { + zipfileEntryFree(tls, pNew) + } else { + *(*uintptr)(unsafe.Pointer(ppEntry)) = pNew } } + + return rc } -// 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 *crt.TLS, p uintptr, eStage int32) { /* sqlite3rbu.c:3495:13: */ - bp := tls.Alloc(176) - defer tls.Free(176) +var szFix int32 = 30 /* zipfile.c:852:24 */ - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) || ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 101) { - *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */)) = uintptr(0) - var pFd uintptr = func() uintptr { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - return (*sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd - } - return (*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd - }() - var rc int32 +// Advance an ZipfileCsr to its next row of output. +func zipfileNext(tls *crt.TLS, cur uintptr) int32 { /* zipfile.c:888:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) - if !((*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg == uintptr(0)) { - crt.X__assert_fail(tls, ts+11296 /* "p->zErrmsg==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3501), uintptr(unsafe.Pointer(&__func__65))) - } - rc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168 /* &pInsert */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, + var pCsr uintptr = cur + var rc int32 = 0 - ts+14467, /* "INSERT OR REPLAC..." */ - crt.VaList(bp, p+48, /* &.zStateDb */ - 1, eStage, - 2, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl, - 3, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzIdx, - 4, (*sqlite3rbu)(unsafe.Pointer(p)).FnStep, - 5, (*sqlite3rbu)(unsafe.Pointer(p)).FnProgress, - 6, (*sqlite3rbu)(unsafe.Pointer(p)).FiWalCksum, - 7, i64((*rbu_file)(unsafe.Pointer(pFd)).FiCookie), - 8, (*sqlite3rbu)(unsafe.Pointer(p)).FiOalSz, - 9, (*sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep, - 10, (*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzDataTbl))) - if !((*(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */)) == uintptr(0)) || (rc == 0)) { - crt.X__assert_fail(tls, ts+14625 /* "pInsert==0 || rc..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3528), uintptr(unsafe.Pointer(&__func__65))) + if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile != 0 { + var iEof i64 = (i64((*ZipfileCsr)(unsafe.Pointer(pCsr)).Feocd.FiOffset + (*ZipfileCsr)(unsafe.Pointer(pCsr)).Feocd.FnSize)) + zipfileEntryFree(tls, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent) + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = uintptr(0) + if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiNextOff >= iEof { + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof = u8(1) + } else { + *(*uintptr)(unsafe.Pointer(bp /* p */)) = uintptr(0) + var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab + rc = zipfileGetEntry(tls, pTab, uintptr(0), 0, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiNextOff, bp /* &p */) + if rc == 0 { + *(*i64)(unsafe.Pointer(pCsr + 32 /* &.iNextOff */)) += (int64(46)) + *(*i64)(unsafe.Pointer(pCsr + 32 /* &.iNextOff */)) += (i64((int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fcds.FnExtra) + int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fcds.FnFile)) + int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* p */)))).Fcds.FnComment))) + } + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = *(*uintptr)(unsafe.Pointer(bp /* p */)) } - - if rc == 0 { - sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */))) - rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */))) + } else { + if !(int32((*ZipfileCsr)(unsafe.Pointer(pCsr)).FbNoop) != 0) { + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FpNext } - if rc != 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent == uintptr(0) { + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof = u8(1) } } + + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbNoop = u8(0) + return rc } -var __func__65 = *(*[13]int8)(unsafe.Pointer(ts + 14645 /* "rbuSaveState" */)) /* sqlite3rbu.c:3495:52 */ +func zipfileFree(tls *crt.TLS, p uintptr) { /* zipfile.c:921:13: */ + sqlite3.Xsqlite3_free(tls, p) +} -// The second argument passed to this function is the name of a PRAGMA -// setting - "page_size", "auto_vacuum", "user_version" or "application_id". -// This function executes the following on sqlite3rbu.dbRbu: -// -// "PRAGMA main.$zPragma" +// Buffer aIn (size nIn bytes) contains compressed data. Uncompressed, the +// size is nOut bytes. This function uncompresses the data and sets the +// return value in context pCtx to the result (a blob). // -// where $zPragma is the string passed as the second argument, then -// on sqlite3rbu.dbMain: -// -// "PRAGMA main.$zPragma = $val" -// -// where $val is the value returned by the first PRAGMA invocation. -// -// In short, it copies the value of the specified PRAGMA setting from -// dbRbu to dbMain. -func rbuCopyPragma(tls *crt.TLS, p uintptr, zPragma uintptr) { /* sqlite3rbu.c:3556:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) +// If an error occurs, an error code is left in pCtx instead. +func zipfileInflate(tls *crt.TLS, pCtx uintptr, aIn uintptr, nIn int32, nOut int32) { /* zipfile.c:932:13: */ + bp := tls.Alloc(128) + defer tls.Free(128) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24 /* &pPragma */, (p + 64 /* &.zErrmsg */), - sqlite3.Xsqlite3_mprintf(tls, ts+14658 /* "PRAGMA main.%s" */, crt.VaList(bp, zPragma))) - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)))) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14673, /* "PRAGMA main.%s =..." */ - crt.VaList(bp+8, zPragma, sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) - } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) - } -} + var aRes uintptr = sqlite3.Xsqlite3_malloc(tls, nOut) + if aRes == uintptr(0) { + sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) + } else { + var err int32 + // var str z_stream at bp+16, 112 -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:3576:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + crt.Xmemset(tls, bp+16 /* &str */, 0, uint64(unsafe.Sizeof(z_stream{}))) - *(*uintptr)(unsafe.Pointer(bp /* pSql */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)) = uintptr(0) + (*z_stream)(unsafe.Pointer(bp + 16 /* &str */)).Fnext_in = aIn + (*z_stream)(unsafe.Pointer(bp + 16 /* &str */)).Favail_in = uInt(nIn) + (*z_stream)(unsafe.Pointer(bp + 16 /* &str */)).Fnext_out = aRes + (*z_stream)(unsafe.Pointer(bp + 16 /* &str */)).Favail_out = uInt(nOut) - if !((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) { - crt.X__assert_fail(tls, ts+14693 /* "((p)->zTarget==0..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3580), uintptr(unsafe.Pointer(&__func__66))) + err = tcl.XinflateInit2_(tls, bp+16 /* &str */, -15, ts+7705 /* "1.2.11" */, int32(unsafe.Sizeof(z_stream{}))) + if err != 0 { + zipfileCtxErrorMsg(tls, pCtx, ts+7712 /* "inflateInit2() f..." */, crt.VaList(bp, err)) + } else { + err = tcl.Xinflate(tls, bp+16 /* &str */, 0) + if err != 1 { + zipfileCtxErrorMsg(tls, pCtx, ts+7739 /* "inflate() failed..." */, crt.VaList(bp+8, err)) + } else { + sqlite3.Xsqlite3_result_blob(tls, pCtx, aRes, nOut, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{zipfileFree}))) + aRes = uintptr(0) + } + } + sqlite3.Xsqlite3_free(tls, aRes) + tcl.XinflateEnd(tls, bp+16 /* &str */) } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14711 /* "PRAGMA writable_..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pSql */, (p + 64 /* &.zErrmsg */), +} - ts+14736 /* "SELECT sql FROM ..." */) - } +// Buffer aIn (size nIn bytes) contains uncompressed data. This function +// compresses it and sets (*ppOut) to point to a buffer containing the +// compressed data. The caller is responsible for eventually calling +// sqlite3_free() to release buffer (*ppOut). Before returning, (*pnOut) +// is set to the size of buffer (*ppOut) in bytes. +// +// If no error occurs, SQLITE_OK is returned. Otherwise, an SQLite error +// code is returned and an error message left in virtual-table handle +// pTab. The values of (*ppOut) and (*pnOut) are left unchanged in this +// case. +func zipfileDeflate(tls *crt.TLS, aIn uintptr, nIn int32, ppOut uintptr, pnOut uintptr, pzErr uintptr) int32 { /* zipfile.c:980:12: */ + bp := tls.Alloc(112) + defer tls.Free(112) - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) == 100) { - var zSql uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pSql */)), 0) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, zSql, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - return - } + var rc int32 = 0 + var nAlloc sqlite3_int64 + // var str z_stream at bp, 112 - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pSql */, (p + 64 /* &.zErrmsg */), - ts+14844 /* "SELECT * FROM sq..." */) - } + var aOut uintptr - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+8 /* &pInsert */, (p + 64 /* &.zErrmsg */), - ts+14909 /* "INSERT INTO sqli..." */) - } + crt.Xmemset(tls, bp /* &str */, 0, uint64(unsafe.Sizeof(z_stream{}))) + (*z_stream)(unsafe.Pointer(bp /* &str */)).Fnext_in = aIn + (*z_stream)(unsafe.Pointer(bp /* &str */)).Favail_in = uInt(nIn) + tcl.XdeflateInit2_(tls, bp /* &str */, 9, 8, -15, 8, 0, ts+7705 /* "1.2.11" */, int32(unsafe.Sizeof(z_stream{}))) - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) == 100) { - var i int32 - for i = 0; i < 5; i++ { - sqlite3.Xsqlite3_bind_value(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */)), (i + 1), sqlite3.Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp /* pSql */)), i)) + nAlloc = sqlite3_int64(tcl.XdeflateBound(tls, bp /* &str */, uint64(nIn))) + aOut = sqlite3.Xsqlite3_malloc64(tls, uint64(nAlloc)) + if aOut == uintptr(0) { + rc = 7 + } else { + var res int32 + (*z_stream)(unsafe.Pointer(bp /* &str */)).Fnext_out = aOut + (*z_stream)(unsafe.Pointer(bp /* &str */)).Favail_out = uInt(nAlloc) + res = tcl.Xdeflate(tls, bp /* &str */, 4) + if res == 1 { + *(*uintptr)(unsafe.Pointer(ppOut)) = aOut + *(*int32)(unsafe.Pointer(pnOut)) = int32((*z_stream)(unsafe.Pointer(bp /* &str */)).Ftotal_out) + } else { + sqlite3.Xsqlite3_free(tls, aOut) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7761 /* "zipfile: deflate..." */, 0) + rc = 1 } - sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+14953 /* "PRAGMA writable_..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) + tcl.XdeflateEnd(tls, bp /* &str */) } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp /* pSql */))) - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pInsert */))) + return rc } -var __func__66 = *(*[22]int8)(unsafe.Pointer(ts + 14978 /* "rbuCreateTargetS..." */)) /* sqlite3rbu.c:3576:49 */ - -// Step the RBU object. -func sqlite3rbu_step(tls *crt.TLS, p uintptr) int32 { /* sqlite3rbu.c:3628:5: */ - bp := tls.Alloc(24) - defer tls.Free(24) - - if p != 0 { - switch (*sqlite3rbu)(unsafe.Pointer(p)).FeStage { - case 1: - { - var pIter uintptr = (p + 80 /* &.objiter */) - - // If this is an RBU vacuum operation and the state table was empty - // 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 == 0) { - rbuCreateTargetSchema(tls, p) - rbuCopyPragma(tls, p, ts+15000 /* "user_version" */) - rbuCopyPragma(tls, p, ts+15013 /* "application_id" */) - } - - for ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0) { - - if (*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0 { - // Clean up the rbu_tmp_xxx table for the previous table. It - // cannot be dropped as there are currently active SQL statements. - // But the contents can be deleted. - if ((crt.Bool32((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0) { - rbuMPrintfExec(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+15028 /* "DELETE FROM %s.'..." */, crt.VaList(bp, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl)) - } +// Return values of columns for the row at which the series_cursor +// is currently pointing. +func zipfileColumn(tls *crt.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* zipfile.c:1023:12: */ + var pCsr uintptr = cur + var pCDS uintptr = ((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent /* &.cds */) + var rc int32 = 0 + switch i { + case 0: // name + sqlite3.Xsqlite3_result_text(tls, ctx, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FzFile, -1, crt.UintptrFromInt32(-1)) + break + case 1: // mode + // TODO: Whether or not the following is correct surely depends on + // the platform on which the archive was created. + sqlite3.Xsqlite3_result_int(tls, ctx, (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiExternalAttr >> 16))) + break + case 2: + { // mtime + sqlite3.Xsqlite3_result_int64(tls, ctx, int64((*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FmUnixTime)) + break + } + case 3: + { // sz + if sqlite3.Xsqlite3_vtab_nochange(tls, ctx) == 0 { + sqlite3.Xsqlite3_result_int64(tls, ctx, int64((*ZipfileCDS)(unsafe.Pointer(pCDS)).FszUncompressed)) + } + break + } + case 4: // rawdata + if sqlite3.Xsqlite3_vtab_nochange(tls, ctx) != 0 { + break + } + fallthrough + case 5: + { // data + if ((i == 4) || (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression) == 0)) || (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression) == 8) { + var sz int32 = int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FszCompressed) + var szFinal int32 = int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FszUncompressed) + if szFinal > 0 { + var aBuf uintptr + var aFree uintptr = uintptr(0) + if (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FaData != 0 { + aBuf = (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FaData } else { - rbuObjIterPrepareAll(tls, p, pIter, 0) - - // Advance to the next row to process. - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var rc int32 = sqlite3.Xsqlite3_step(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) - if rc == 100 { - (*sqlite3rbu)(unsafe.Pointer(p)).FnProgress++ - (*sqlite3rbu)(unsafe.Pointer(p)).FnStep++ - return rbuStep(tls, p) + aBuf = crt.AssignUintptr(&aFree, sqlite3.Xsqlite3_malloc64(tls, uint64(sz))) + if aBuf == uintptr(0) { + rc = 7 + } else { + var pFile uintptr = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile + if pFile == uintptr(0) { + pFile = (*ZipfileTab)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FpWriteFd } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_reset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect) - (*sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 + rc = zipfileReadData(tls, pFile, aBuf, sz, (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FiDataOff, + ((*ZipfileCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab + 16 /* &.zErrMsg */)) } } - - rbuObjIterNext(tls, p, pIter) - } - - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if !((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl == uintptr(0)) { - crt.X__assert_fail(tls, ts+15056 /* "pIter->zTbl==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3673), uintptr(unsafe.Pointer(&__func__67))) - } - rbuSaveState(tls, p, 2) - rbuIncrSchemaCookie(tls, p) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15071 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15071 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 2 - } - break - } - fallthrough - - case 2: - { - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - rbuMoveOalFile(tls, p) - (*sqlite3rbu)(unsafe.Pointer(p)).FnProgress++ - } - break - } - fallthrough - - case 4: - { - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if (*sqlite3rbu)(unsafe.Pointer(p)).FnStep >= (*sqlite3rbu)(unsafe.Pointer(p)).FnFrame { - var pDb uintptr = (*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal - - // Sync the db file - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 40 /* &.xSync */))))(tls, pDb, 0x00002) - - // Update nBackfill - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - // var ptr uintptr at bp+16, 8 - - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+16 /* &ptr */) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*u32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* ptr */))) + uintptr(24)*4)) = (*sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame - } - } - - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 5 - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 101 - } - } else { - // At one point the following block copied a single frame from the - // wal file to the database file. So that one call to sqlite3rbu_step() - // checkpointed a single frame. - // - // However, if the sector-size is larger than the page-size, and the - // application calls sqlite3rbu_savestate() or close() immediately - // after this step, then rbu_step() again, then a power failure occurs, - // then the database page written here may be damaged. Work around - // this by checkpointing frames until the next page in the aFrame[] - // lies on a different disk sector to the current one. - var iSector u32 - for ok := true; ok; ok = ((((*sqlite3rbu)(unsafe.Pointer(p)).FnStep < (*sqlite3rbu)(unsafe.Pointer(p)).FnFrame) && - (iSector == (((*RbuFrame)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FaFrame+uintptr((*sqlite3rbu)(unsafe.Pointer(p)).FnStep)*8)).FiDbPage - u32(1)) / u32((*sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector)))) && - ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0)) { - var pFrame uintptr = ((*sqlite3rbu)(unsafe.Pointer(p)).FaFrame + uintptr((*sqlite3rbu)(unsafe.Pointer(p)).FnStep)*8) - iSector = (((*RbuFrame)(unsafe.Pointer(pFrame)).FiDbPage - u32(1)) / u32((*sqlite3rbu)(unsafe.Pointer(p)).FnPagePerSector)) - rbuCheckpointFrame(tls, p, pFrame) - (*sqlite3rbu)(unsafe.Pointer(p)).FnStep++ + if rc == 0 { + if (i == 5) && ((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression != 0) { + zipfileInflate(tls, ctx, aBuf, sz, szFinal) + } else { + sqlite3.Xsqlite3_result_blob(tls, ctx, aBuf, sz, crt.UintptrFromInt32(-1)) } } - (*sqlite3rbu)(unsafe.Pointer(p)).FnProgress++ + sqlite3.Xsqlite3_free(tls, aFree) + } else { + // Figure out if this is a directory or a zero-sized file. Consider + // it to be a directory either if the mode suggests so, or if + // the final character in the name is '/'. + var mode u32 = ((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiExternalAttr >> 16) + if !((mode & uint64(0040000)) != 0) && (int32(*(*int8)(unsafe.Pointer((*ZipfileCDS)(unsafe.Pointer(pCDS)).FzFile + uintptr((int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile) - 1))))) != '/') { + sqlite3.Xsqlite3_result_blob(tls, ctx, ts+488 /* "" */, 0, uintptr(0)) + } } - break } - fallthrough - - default: break } - return (*sqlite3rbu)(unsafe.Pointer(p)).Frc - } else { - return 7 + case 6: // method + sqlite3.Xsqlite3_result_int(tls, ctx, int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression)) + break + default: // z + + sqlite3.Xsqlite3_result_int64(tls, ctx, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiId) + break } - return int32(0) -} -var __func__67 = *(*[16]int8)(unsafe.Pointer(ts + 15078 /* "sqlite3rbu_step" */)) /* sqlite3rbu.c:3628:35 */ + return rc +} -// 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 *crt.TLS, z1 uintptr, z2 uintptr) int32 { /* sqlite3rbu.c:3757:12: */ - if (z1 == uintptr(0)) && (z2 == uintptr(0)) { - return 0 - } - if (z1 == uintptr(0)) || (z2 == uintptr(0)) { - return 1 - } - return (crt.Bool32(sqlite3.Xsqlite3_stricmp(tls, z1, z2) != 0)) +// Return TRUE if the cursor is at EOF. +func zipfileEof(tls *crt.TLS, cur uintptr) int32 { /* zipfile.c:1110:12: */ + var pCsr uintptr = cur + return int32((*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof) } -// This function is called as part of sqlite3rbu_open() when initializing -// an rbu handle in OAL stage. If the rbu update has not started (i.e. -// the rbu_state table was empty) it is a no-op. Otherwise, it arranges -// things so that the next call to sqlite3rbu_step() continues on from -// where the previous rbu handle left off. +// If aBlob is not NULL, then it points to a buffer nBlob bytes in size +// containing an entire zip archive image. Or, if aBlob is NULL, then pFile +// is guaranteed to be a file-handle open on a zip file. // -// If an error occurs, an error code and error message are left in the -// rbu handle passed as the first argument. -func rbuSetupOal(tls *crt.TLS, p uintptr, pState uintptr) { /* sqlite3rbu.c:3773:13: */ - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - crt.X__assert_fail(tls, ts+10376 /* "p->rc==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3774), uintptr(unsafe.Pointer(&__func__68))) - } - if (*RbuState)(unsafe.Pointer(pState)).FzTbl != 0 { - var pIter uintptr = (p + 80 /* &.objiter */) - var rc int32 = 0 +// This function attempts to locate the EOCD record within the zip archive +// and populate *pEOCD with the results of decoding it. SQLITE_OK is +// returned if successful. Otherwise, an SQLite error code is returned and +// an English language error message may be left in virtual-table pTab. +func zipfileReadEOCD(tls *crt.TLS, pTab uintptr, aBlob uintptr, nBlob int32, pFile uintptr, pEOCD uintptr) int32 { /* zipfile.c:1125:12: */ + var aRead uintptr = (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer // Temporary buffer + var nRead int32 // Bytes to read from file + var rc int32 = 0 - for ((rc == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl != 0)) && (((((*RbuObjIter)(unsafe.Pointer(pIter)).FbCleanup != 0) || - (rbuStrCompare(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx, (*RbuState)(unsafe.Pointer(pState)).FzIdx) != 0)) || - (((*RbuState)(unsafe.Pointer(pState)).FzDataTbl == uintptr(0)) && (rbuStrCompare(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, (*RbuState)(unsafe.Pointer(pState)).FzTbl) != 0))) || - (((*RbuState)(unsafe.Pointer(pState)).FzDataTbl != 0) && (rbuStrCompare(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, (*RbuState)(unsafe.Pointer(pState)).FzDataTbl) != 0))) { - rc = rbuObjIterNext(tls, p, pIter) + if aBlob == uintptr(0) { + var iOff i64 // Offset to read from + var szFile i64 // Total size of file in bytes + crt.Xfseek(tls, pFile, int64(0), 2) + szFile = i64(crt.Xftell(tls, pFile)) + if szFile == int64(0) { + crt.Xmemset(tls, pEOCD, 0, uint64(unsafe.Sizeof(ZipfileEOCD{}))) + return 0 } + nRead = func() int32 { + if (szFile) < (int64(64 * 1024)) { + return int32(szFile) + } + return (64 * 1024) + }() + iOff = (szFile - i64(nRead)) + rc = zipfileReadData(tls, pFile, aRead, nRead, iOff, (pTab /* &.base */ + 16 /* &.zErrMsg */)) + } else { + nRead = func() int32 { + if (nBlob) < (64 * 1024) { + return nBlob + } + return (64 * 1024) + }() + aRead = (aBlob + uintptr((nBlob - nRead))) + } - if (rc == 0) && !(int32((*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl) != 0) { - rc = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+15094 /* "rbu_state mismat..." */, 0) - } + if rc == 0 { + var i int32 - if rc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).FnStep = (*RbuState)(unsafe.Pointer(pState)).FnRow - rc = rbuObjIterPrepareAll(tls, p, (p + 80 /* &.objiter */), (*sqlite3rbu)(unsafe.Pointer(p)).FnStep) + // Scan backwards looking for the signature bytes + for i = (nRead - 20); i >= 0; i-- { + if (((int32(*(*u8)(unsafe.Pointer(aRead + uintptr(i)))) == 0x50) && (int32(*(*u8)(unsafe.Pointer(aRead + uintptr((i + 1))))) == 0x4b)) && + (int32(*(*u8)(unsafe.Pointer(aRead + uintptr((i + 2))))) == 0x05)) && (int32(*(*u8)(unsafe.Pointer(aRead + uintptr((i + 3))))) == 0x06) { + break + } + } + if i < 0 { + (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, + ts+7786 /* "cannot find end ..." */, 0) + return 1 } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc + aRead += (uintptr(i + 4)) + (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FiDisk = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FiFirstDisk = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FnEntry = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FnEntryTotal = func() u16 { aRead += uintptr(2); return zipfileGetU16(tls, (aRead - uintptr(2))) }() + (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FnSize = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() + (*ZipfileEOCD)(unsafe.Pointer(pEOCD)).FiOffset = func() u32 { aRead += uintptr(4); return zipfileGetU32(tls, (aRead - uintptr(4))) }() } -} - -var __func__68 = *(*[12]int8)(unsafe.Pointer(ts + 15119 /* "rbuSetupOal" */)) /* sqlite3rbu.c:3773:57 */ - -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:3806:13: */ - bp := tls.Alloc(8) - defer tls.Free(8) - var zOal uintptr = rbuMPrintf(tls, p, ts+14134 /* "%s-oal" */, crt.VaList(bp, (*sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) - if zOal != 0 { - var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) - if !(((pVfs != 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0)) && ((*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg == uintptr(0))) { - crt.X__assert_fail(tls, ts+15131 /* "pVfs && p->rc==0..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3810), uintptr(unsafe.Pointer(&__func__69))) - } - (*(*func(*crt.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pVfs + 48 /* &.xDelete */))))(tls, pVfs, zOal, 0) - sqlite3.Xsqlite3_free(tls, zOal) - } + return rc } -var __func__69 = *(*[17]int8)(unsafe.Pointer(ts + 15165 /* "rbuDeleteOalFile" */)) /* sqlite3rbu.c:3806:44 */ - -// Allocate a private rbu VFS for the rbu handle passed as the only -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:3822:13: */ - bp := tls.Alloc(76) - defer tls.Free(76) - - // var rnd int32 at bp+8, 4 +// Add object pNew to the linked list that begins at ZipfileTab.pFirstEntry +// and ends with pLastEntry. If argument pBefore is NULL, then pNew is added +// to the end of the list. Otherwise, it is added to the list immediately +// before pBefore (which is guaranteed to be a part of said list). +func zipfileAddEntry(tls *crt.TLS, pTab uintptr, pBefore uintptr, pNew uintptr) { /* zipfile.c:1189:13: */ - // var zRnd [64]int8 at bp+12, 64 + if pBefore == uintptr(0) { + if (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry == uintptr(0) { + (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry = crt.AssignPtrUintptr(pTab+72 /* &.pLastEntry */, pNew) + } else { - if !((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) { - crt.X__assert_fail(tls, ts+10376 /* "p->rc==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3826), uintptr(unsafe.Pointer(&__func__70))) - } - sqlite3.Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8 /* &rnd */) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12 /* &zRnd[0] */, ts+15182 /* "rbu_vfs_%d" */, crt.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3rbu_create_vfs(tls, bp+12 /* &zRnd[0] */, uintptr(0)) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, bp+12 /* &zRnd[0] */) - if !(pVfs != 0) { - crt.X__assert_fail(tls, ts+15193 /* "pVfs" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3832), uintptr(unsafe.Pointer(&__func__70))) + (*ZipfileEntry)(unsafe.Pointer((*ZipfileTab)(unsafe.Pointer(pTab)).FpLastEntry)).FpNext = pNew + (*ZipfileTab)(unsafe.Pointer(pTab)).FpLastEntry = pNew } - (*sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName - (*rbu_vfs)(unsafe.Pointer(pVfs)).FpRbu = p + } else { + var pp uintptr + for pp = (pTab + 64 /* &.pFirstEntry */); *(*uintptr)(unsafe.Pointer(pp)) != pBefore; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 112 /* &.pNext */) { + } + (*ZipfileEntry)(unsafe.Pointer(pNew)).FpNext = pBefore + *(*uintptr)(unsafe.Pointer(pp)) = pNew } } -var __func__70 = *(*[13]int8)(unsafe.Pointer(ts + 15198 /* "rbuCreateVfs" */)) /* sqlite3rbu.c:3822:40 */ - -// Destroy the private VFS created for the rbu handle passed as the only -// argument by an earlier call to rbuCreateVfs(). -func rbuDeleteVfs(tls *crt.TLS, p uintptr) { /* sqlite3rbu.c:3842:13: */ - if (*sqlite3rbu)(unsafe.Pointer(p)).FzVfsName != 0 { - sqlite3rbu_destroy_vfs(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FzVfsName) - (*sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = uintptr(0) - } -} +func zipfileLoadDirectory(tls *crt.TLS, pTab uintptr, aBlob uintptr, nBlob int32) int32 { /* zipfile.c:1212:12: */ + bp := tls.Alloc(32) + defer tls.Free(32) -// 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 *crt.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3rbu.c:3854:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + // var eocd ZipfileEOCD at bp, 24 - var p uintptr = sqlite3.Xsqlite3_user_data(tls, pCtx) - *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)) = uintptr(0) var rc int32 - var db uintptr = func() uintptr { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - return (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu - } - return (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain - }() + var i int32 + var iOff i64 - if !(nVal == 1) { - crt.X__assert_fail(tls, ts+15211 /* "nVal==1" */, ts+9694 /* "testdata/sqlite-..." */, uint32(3865), uintptr(unsafe.Pointer(&__func__71))) - } + rc = zipfileReadEOCD(tls, pTab, aBlob, nBlob, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd, bp /* &eocd */) + iOff = i64((*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiOffset) + for i = 0; (rc == 0) && (i < int32((*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntry)); i++ { + *(*uintptr)(unsafe.Pointer(bp + 24 /* pNew */)) = uintptr(0) + rc = zipfileGetEntry(tls, pTab, aBlob, nBlob, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd, iOff, bp+24 /* &pNew */) - rc = prepareFreeAndCollectError(tls, db, bp+8 /* &pStmt */, bp+16, /* &zErrmsg */ - sqlite3.Xsqlite3_mprintf(tls, - ts+15219 /* "SELECT count(*) ..." */, crt.VaList(bp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(0)*8)))))) - if rc != 0 { - sqlite3.Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) - } else { - var nIndex int32 = 0 - if 100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) { - nIndex = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) - } - rc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) if rc == 0 { - sqlite3.Xsqlite3_result_int(tls, pCtx, nIndex) - } else { - sqlite3.Xsqlite3_result_error(tls, pCtx, sqlite3.Xsqlite3_errmsg(tls, db), -1) + zipfileAddEntry(tls, pTab, uintptr(0), *(*uintptr)(unsafe.Pointer(bp + 24 /* pNew */))) + iOff = iOff + (int64(46)) + iOff = iOff + (i64((int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pNew */)))).Fcds.FnExtra) + int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pNew */)))).Fcds.FnFile)) + int32((*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pNew */)))).Fcds.FnComment))) } } - - sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */))) + return rc } -var __func__71 = *(*[16]int8)(unsafe.Pointer(ts + 15291 /* "rbuIndexCntFunc" */)) /* sqlite3rbu.c:3858:2 */ - -// If the RBU database contains the rbu_count table, use it to initialize -// the sqlite3rbu.nPhaseOneStep variable. The schema of the rbu_count table -// is assumed to contain the same columns as: -// -// CREATE TABLE rbu_count(tbl TEXT PRIMARY KEY, cnt INTEGER) WITHOUT ROWID; -// -// There should be one row in the table for each data_xxx table in the -// database. The 'tbl' column should contain the name of a data_xxx table, -// and the cnt column the number of rows it contains. -// -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:3904:13: */ +// xFilter callback. +func zipfileFilter(tls *crt.TLS, cur uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* zipfile.c:1236:12: */ bp := tls.Alloc(8) defer tls.Free(8) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) - var bExists int32 = 0 // True if rbu_count exists - - (*sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = int64(-1) - - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_create_function(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+15307 /* "rbu_index_cnt" */, 1, 1, p, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32, uintptr) - }{rbuIndexCntFunc})), uintptr(0), uintptr(0)) + var pTab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab + var pCsr uintptr = cur + var zFile uintptr = uintptr(0) // Zip file to scan + var rc int32 = 0 // Return Code + var bInMemory int32 = 0 // True for an in-memory zipfile - // 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 == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pStmt */, (p + 64 /* &.zErrmsg */), - ts+15321 /* "SELECT 1 FROM sq..." */) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if 100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) { - bExists = 1 - } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) - } + zipfileResetCursor(tls, pCsr) - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && (bExists != 0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp /* &pStmt */, (p + 64 /* &.zErrmsg */), + if (*ZipfileTab)(unsafe.Pointer(pTab)).FzFile != 0 { + zFile = (*ZipfileTab)(unsafe.Pointer(pTab)).FzFile + } else if idxNum == 0 { + zipfileCursorErr(tls, pCsr, ts+7830 /* "zipfile() functi..." */, 0) + return 1 + } else if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) == 4 { + var aBlob uintptr = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + var nBlob int32 = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - ts+15378 /* "SELECT sum(cnt *..." */) - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if 100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) { - (*sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = sqlite3.Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) - } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) - } + rc = zipfileLoadDirectory(tls, pTab, aBlob, nBlob) + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFreeEntry = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry + (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry = crt.AssignPtrUintptr(pTab+72 /* &.pLastEntry */, uintptr(0)) + if rc != 0 { + return rc } - } -} - -func openRbuHandle(tls *crt.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3rbu.c:3945:19: */ - bp := tls.Alloc(20) - defer tls.Free(20) - - var p uintptr - var nTarget size_t - if zTarget != 0 { - nTarget = crt.Xstrlen(tls, zTarget) + bInMemory = 1 } else { - nTarget = uint64(0) + zFile = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } - var nRbu size_t = crt.Xstrlen(tls, zRbu) - var nByte size_t = ((((uint64(unsafe.Sizeof(sqlite3rbu{})) + nTarget) + uint64(1)) + nRbu) + uint64(1)) - p = sqlite3.Xsqlite3_malloc64(tls, uint64(nByte)) - if p != 0 { - var pState uintptr = uintptr(0) - - // Create the custom VFS. - crt.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(sqlite3rbu{}))) - rbuCreateVfs(tls, p) - - // Open the target, RBU and state databases - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - var pCsr uintptr = (p + uintptr(1)*392) - *(*int32)(unsafe.Pointer(bp + 16 /* bRetry */)) = 0 - if zTarget != 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr - crt.Xmemcpy(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FzTarget, zTarget, (nTarget + uint64(1))) - pCsr += (uintptr(nTarget + uint64(1))) - } - (*sqlite3rbu)(unsafe.Pointer(p)).FzRbu = pCsr - crt.Xmemcpy(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FzRbu, zRbu, (nRbu + uint64(1))) - pCsr += (uintptr(nRbu + uint64(1))) - if zState != 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).FzState = rbuMPrintf(tls, p, ts+130 /* "%s" */, crt.VaList(bp, zState)) - } - - // If the first attempt to open the database file fails and the bRetry - // flag it set, this means that the db was not opened because it seemed - // to be a wal-mode db. But, this may have happened due to an earlier - // RBU vacuum operation leaving an old wal file in the directory. - // 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, bp+16 /* &bRetry */) - if *(*int32)(unsafe.Pointer(bp + 16 /* bRetry */)) != 0 { - rbuOpenDatabase(tls, p, uintptr(0)) - } - } - - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - pState = rbuLoadState(tls, p) - if !((pState != 0) || ((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0)) { - crt.X__assert_fail(tls, ts+15452 /* "pState || p->rc!..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(3994), uintptr(unsafe.Pointer(&__func__72))) - } - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - - if (*RbuState)(unsafe.Pointer(pState)).FeStage == 0 { - rbuDeleteOalFile(tls, p) - rbuInitPhaseOneSteps(tls, p) - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 1 + if (uintptr(0) == (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd) && (0 == bInMemory) { + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile = crt.Xfopen(tls, zFile, ts+2937 /* "rb" */) + if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile == uintptr(0) { + zipfileCursorErr(tls, pCsr, ts+7870 /* "cannot open file..." */, crt.VaList(bp, zFile)) + rc = 1 + } else { + rc = zipfileReadEOCD(tls, pTab, uintptr(0), 0, (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFile, (pCsr + 40 /* &.eocd */)) + if rc == 0 { + if int32((*ZipfileCsr)(unsafe.Pointer(pCsr)).Feocd.FnEntry) == 0 { + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbEof = u8(1) } else { - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = (*RbuState)(unsafe.Pointer(pState)).FeStage - (*sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep = (*RbuState)(unsafe.Pointer(pState)).FnPhaseOneStep + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiNextOff = i64((*ZipfileCsr)(unsafe.Pointer(pCsr)).Feocd.FiOffset) + rc = zipfileNext(tls, cur) } - (*sqlite3rbu)(unsafe.Pointer(p)).FnProgress = int32((*RbuState)(unsafe.Pointer(pState)).FnProgress) - (*sqlite3rbu)(unsafe.Pointer(p)).FiOalSz = (*RbuState)(unsafe.Pointer(pState)).FiOalSz } } - if !(((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) || ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage != 0)) { - crt.X__assert_fail(tls, ts+15471 /* "p->rc!=0 || p->e..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4009), uintptr(unsafe.Pointer(&__func__72))) - } - - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpWalFd != 0) { - if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 1 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 1 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+15496 /* "cannot update wa..." */, 0) - } else if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 2 { - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 4 - (*sqlite3rbu)(unsafe.Pointer(p)).FnStep = 0 - } - } - - if (((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && - (((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 1) || ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 2))) && - ((*RbuState)(unsafe.Pointer(pState)).FeStage != 0) { - var pFd uintptr = func() uintptr { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - return (*sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd - } - return (*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd - }() - if (*rbu_file)(unsafe.Pointer(pFd)).FiCookie != (*RbuState)(unsafe.Pointer(pState)).FiCookie { - // At this point (pTargetFd->iCookie) contains the value of the - // change-counter cookie (the thing that gets incremented when a - // transaction is committed in rollback mode) currently stored on - // page 1 of the database file. - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 5 - (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+15528, /* "database modifie..." */ - crt.VaList(bp+8, func() uintptr { - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - return ts + 15560 /* "vacuum" */ - } - return ts + 15567 /* "update" */ - }())) + } else { + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbNoop = u8(1) + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = func() uintptr { + if (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFreeEntry != 0 { + return (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpFreeEntry } - } - - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 1 { - var db uintptr = (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15574 /* "BEGIN" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - - // Point the object iterator at the first object - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuObjIterFirst(tls, p, (p + 80 /* &.objiter */)) - } - - // If the RBU database contains no data_xxx tables, declare the RBU - // update finished. - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzTbl == uintptr(0)) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 101 - (*sqlite3rbu)(unsafe.Pointer(p)).FeStage = 5 - } else { - if (((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*RbuState)(unsafe.Pointer(pState)).FeStage == 0)) && ((*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) { - rbuCopyPragma(tls, p, ts+15580 /* "page_size" */) - rbuCopyPragma(tls, p, ts+15590 /* "auto_vacuum" */) - } + return (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry + }() + rc = zipfileNext(tls, cur) + } - // Open transactions both databases. The *-oal file is opened or - // created at this point. - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, db, ts+15602 /* "BEGIN IMMEDIATE" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } + return rc +} - // 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 == 0 { - var frc int32 = sqlite3.Xsqlite3_file_control(tls, db, ts+354 /* "main" */, 25, uintptr(0)) - if frc == 0 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, - db, ts+15618 /* "PRAGMA journal_m..." */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } - } +// xBestIndex callback. +func zipfileBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* zipfile.c:1295:12: */ + var i int32 + var idx int32 = -1 + var unusable int32 = 0 - if (*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0 { - rbuSetupOal(tls, p, pState) - } - } - } else if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 2 { - } else if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 4 { - rbuSetupCheckpoint(tls, p, pState) - } else if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 5 { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 101 - } else { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = 11 - } + for i = 0; i < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; i++ { + var pCons uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(i)*12) + if (*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn != 7 { + continue + } + if int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fusable) == 0 { + unusable = 1 + } else if int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) == 2 { + idx = i } - - rbuFreeState(tls, pState) } - - return p + (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedCost = 1000.0 + if idx >= 0 { + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idx)*8)).FargvIndex = 1 + (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(idx)*8)).Fomit = uint8(1) + (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 1 + } else if unusable != 0 { + return 19 + } + return 0 } -var __func__72 = *(*[14]int8)(unsafe.Pointer(ts + 15642 /* "openRbuHandle" */)) /* sqlite3rbu.c:3949:2 */ +func zipfileNewEntry(tls *crt.TLS, zPath uintptr) uintptr { /* zipfile.c:1323:21: */ + bp := tls.Alloc(8) + defer tls.Free(8) -// Allocate and return an RBU handle with all fields zeroed except for the -// error code, which is set to SQLITE_MISUSE. -func rbuMisuseError(tls *crt.TLS) uintptr { /* sqlite3rbu.c:4101:19: */ - var pRet uintptr - pRet = sqlite3.Xsqlite3_malloc64(tls, uint64(unsafe.Sizeof(sqlite3rbu{}))) - if pRet != 0 { - crt.Xmemset(tls, pRet, 0, uint64(unsafe.Sizeof(sqlite3rbu{}))) - (*sqlite3rbu)(unsafe.Pointer(pRet)).Frc = 21 + var pNew uintptr + pNew = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(ZipfileEntry{}))) + if pNew != 0 { + crt.Xmemset(tls, pNew, 0, uint64(unsafe.Sizeof(ZipfileEntry{}))) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FzFile = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zPath)) + if (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FzFile == uintptr(0) { + sqlite3.Xsqlite3_free(tls, pNew) + pNew = uintptr(0) + } } - return pRet + return pNew } -// Open and return a new RBU handle. -func sqlite3rbu_open(tls *crt.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3rbu.c:4114:12: */ - if (zTarget == uintptr(0)) || (zRbu == uintptr(0)) { - return rbuMisuseError(tls) +func zipfileSerializeLFH(tls *crt.TLS, pEntry uintptr, aBuf uintptr) int32 { /* zipfile.c:1337:12: */ + var pCds uintptr = (pEntry /* &.cds */) + var a uintptr = aBuf + + (*ZipfileCDS)(unsafe.Pointer(pCds)).FnExtra = u16(9) + + /* Write the LFH itself */ + { + zipfilePutU32(tls, a, uint64(0x04034b50)) + a += uintptr(4) } - // TODO: Check that zTarget and zRbu are non-NULL - return openRbuHandle(tls, zTarget, zRbu, zState) -} -// Open a handle to begin or resume an RBU VACUUM operation. -func sqlite3rbu_vacuum(tls *crt.TLS, zTarget uintptr, zState uintptr) uintptr { /* sqlite3rbu.c:4127:12: */ - if zTarget == uintptr(0) { - return rbuMisuseError(tls) + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FiVersionExtract) + a += uintptr(2) } - if zState != 0 { - var n int32 = int32(crt.Xstrlen(tls, zState)) - if (n >= 7) && (0 == crt.Xmemcmp(tls, ts+15656 /* "-vactmp" */, (zState+uintptr((n-7))), uint64(7))) { - return rbuMisuseError(tls) - } + + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).Fflags) + a += uintptr(2) } - // TODO: Check that both arguments are non-NULL - return openRbuHandle(tls, uintptr(0), zTarget, zState) -} -// Return the database handle used by pRbu. -func sqlite3rbu_db(tls *crt.TLS, pRbu uintptr, bRbu int32) uintptr { /* sqlite3rbu.c:4145:9: */ - var db uintptr = uintptr(0) - if pRbu != 0 { - db = func() uintptr { - if bRbu != 0 { - return (*sqlite3rbu)(unsafe.Pointer(pRbu)).FdbRbu - } - return (*sqlite3rbu)(unsafe.Pointer(pRbu)).FdbMain - }() + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FiCompression) + a += uintptr(2) } - return db -} -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:4159:13: */ - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 19) && ((*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg != 0) { - var i uint32 - var nErrmsg size_t = crt.Xstrlen(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) - for i = uint32(0); size_t(i) < (nErrmsg - uint64(8)); i++ { - if crt.Xmemcmp(tls, ((*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg+uintptr(i)), ts+12851 /* "rbu_imp_" */, uint64(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++ - } - crt.Xmemmove(tls, ((*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr(i)), ((*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg + uintptr((i + uint32(nDel)))), (((nErrmsg + uint64(1)) - size_t(i)) - size_t(nDel))) - nErrmsg = nErrmsg - (size_t(nDel)) - } - } + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FmTime) + a += uintptr(2) } -} -// Close the RBU handle. -func sqlite3rbu_close(tls *crt.TLS, p uintptr, pzErrmsg uintptr) int32 { /* sqlite3rbu.c:4177:5: */ - var rc int32 - if p != 0 { + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FmDate) + a += uintptr(2) + } - // Commit the transaction to the *-oal file. - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 1) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15071 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } + { + zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).Fcrc32) + a += uintptr(4) + } - // Sync the db file if currently doing an incremental checkpoint - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 4) { - var pDb uintptr = (*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 40 /* &.xSync */))))(tls, pDb, 0x00002) - } + { + zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FszCompressed) + a += uintptr(4) + } - rbuSaveState(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FeStage) + { + zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FszUncompressed) + a += uintptr(4) + } - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 1) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15071 /* "COMMIT" */, uintptr(0), uintptr(0), (p + 64 /* &.zErrmsg */)) - } + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FnFile) + a += uintptr(2) + } - // Close any open statement handles. - rbuObjIterFinalize(tls, (p + 80 /* &.objiter */)) + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FnExtra) + a += uintptr(2) + } - // If this is an RBU vacuum handle and the vacuum has either finished - // successfully or encountered an error, delete the contents of the - // state table. This causes the next call to sqlite3rbu_vacuum() - // 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 != 0)) && ((*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu != 0) { - var rc2 int32 = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15664 /* "DELETE FROM stat..." */, uintptr(0), uintptr(0), uintptr(0)) - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc == 101) && (rc2 != 0) { - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc2 - } - } + // Add the file name + crt.Xmemcpy(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCds)).FzFile, uint64(int32((*ZipfileCDS)(unsafe.Pointer(pCds)).FnFile))) + a += uintptr(int32((*ZipfileCDS)(unsafe.Pointer(pCds)).FnFile)) - // Close the open database handle and VFS object. - sqlite3.Xsqlite3_close(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu) - sqlite3.Xsqlite3_close(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain) - if !((*sqlite3rbu)(unsafe.Pointer(p)).FszTemp == int64(0)) { - crt.X__assert_fail(tls, ts+15691 /* "p->szTemp==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4214), uintptr(unsafe.Pointer(&__func__73))) - } - rbuDeleteVfs(tls, p) - sqlite3.Xsqlite3_free(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FaBuf) - sqlite3.Xsqlite3_free(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FaFrame) + /* The "extra" data */ + { + zipfilePutU16(tls, a, uint16(0x5455)) + a += uintptr(2) + } - rbuEditErrmsg(tls, p) - rc = (*sqlite3rbu)(unsafe.Pointer(p)).Frc - if pzErrmsg != 0 { - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg - } else { - sqlite3.Xsqlite3_free(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg) - } - sqlite3.Xsqlite3_free(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FzState) - sqlite3.Xsqlite3_free(tls, p) - } else { - rc = 7 - *(*uintptr)(unsafe.Pointer(pzErrmsg)) = uintptr(0) + { + zipfilePutU16(tls, a, uint16(5)) + a += uintptr(2) } - return rc -} -var __func__73 = *(*[17]int8)(unsafe.Pointer(ts + 15704 /* "sqlite3rbu_close" */)) /* sqlite3rbu.c:4177:53 */ + *(*u8)(unsafe.Pointer(crt.PostIncUintptr(&a, 1))) = u8(0x01) + { + zipfilePutU32(tls, a, (*ZipfileEntry)(unsafe.Pointer(pEntry)).FmUnixTime) + a += uintptr(4) + } -// 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 sqlite3rbu_progress(tls *crt.TLS, pRbu uintptr) sqlite3_int64 { /* sqlite3rbu.c:4240:15: */ - return sqlite3_int64((*sqlite3rbu)(unsafe.Pointer(pRbu)).FnProgress) + return (int32((int64(a) - int64(aBuf)) / 1)) } -// Return permyriadage progress indications for the two main stages of -// an RBU update. -func sqlite3rbu_bp_progress(tls *crt.TLS, p uintptr, pnOne uintptr, pnTwo uintptr) { /* sqlite3rbu.c:4248:6: */ - var MAX_PROGRESS int32 = 10000 - switch (*sqlite3rbu)(unsafe.Pointer(p)).FeStage { - case 1: - if (*sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep > int64(0) { - *(*int32)(unsafe.Pointer(pnOne)) = (int32((i64(MAX_PROGRESS) * i64((*sqlite3rbu)(unsafe.Pointer(p)).FnProgress)) / (*sqlite3rbu)(unsafe.Pointer(p)).FnPhaseOneStep)) - } else { - *(*int32)(unsafe.Pointer(pnOne)) = -1 - } - *(*int32)(unsafe.Pointer(pnTwo)) = 0 - break - - case 2: - *(*int32)(unsafe.Pointer(pnOne)) = MAX_PROGRESS - *(*int32)(unsafe.Pointer(pnTwo)) = 0 - break - - case 4: - *(*int32)(unsafe.Pointer(pnOne)) = MAX_PROGRESS - *(*int32)(unsafe.Pointer(pnTwo)) = (int32((i64(MAX_PROGRESS) * i64((*sqlite3rbu)(unsafe.Pointer(p)).FnStep)) / i64((*sqlite3rbu)(unsafe.Pointer(p)).FnFrame))) - break - - case 5: - *(*int32)(unsafe.Pointer(pnOne)) = MAX_PROGRESS - *(*int32)(unsafe.Pointer(pnTwo)) = MAX_PROGRESS - break +func zipfileAppendEntry(tls *crt.TLS, pTab uintptr, pEntry uintptr, pData uintptr, nData int32) int32 { /* zipfile.c:1370:12: */ + var aBuf uintptr = (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer + var nBuf int32 + var rc int32 - default: - if !(0 != 0) { - crt.X__assert_fail(tls, ts+8293 /* "0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4276), uintptr(unsafe.Pointer(&__func__74))) - } + nBuf = zipfileSerializeLFH(tls, pEntry, aBuf) + rc = zipfileAppendData(tls, pTab, aBuf, nBuf) + if rc == 0 { + (*ZipfileEntry)(unsafe.Pointer(pEntry)).FiDataOff = (*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent + rc = zipfileAppendData(tls, pTab, pData, nData) } + + return rc } -var __func__74 = *(*[23]int8)(unsafe.Pointer(ts + 15721 /* "sqlite3rbu_bp_pr..." */)) /* sqlite3rbu.c:4248:67 */ +func zipfileGetMode(tls *crt.TLS, pVal uintptr, bIsDir int32, pMode uintptr, pzErr uintptr) int32 { /* zipfile.c:1390:12: */ + bp := tls.Alloc(19) + defer tls.Free(19) -// Return the current state of the RBU vacuum or update operation. -func sqlite3rbu_state(tls *crt.TLS, p uintptr) int32 { /* sqlite3rbu.c:4283:5: */ - bp := tls.Alloc(24) - defer tls.Free(24) - - *(*[6]int32)(unsafe.Pointer(bp /* aRes */)) = [6]int32{ - 0, 1, 2, - 0, 3, 4, - } + var z uintptr + var mode u32 + // var zTemplate [11]int8 at bp+8, 11 - if !(1 == 1) { - crt.X__assert_fail(tls, ts+2357 /* "1==1" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4289), uintptr(unsafe.Pointer(&__func__75))) + var i int32 + z = sqlite3.Xsqlite3_value_text(tls, pVal) + mode = uint64(0) + if !(z == uintptr(0)) { + goto __1 } - if !(2 == 2) { - crt.X__assert_fail(tls, ts+2415 /* "2==2" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4290), uintptr(unsafe.Pointer(&__func__75))) + mode = func() uint64 { + if bIsDir != 0 { + return (uint64(0040000 + 0755)) + } + return (uint64(0100000 + 0644)) + }() + goto __2 +__1: + if !((int32(*(*int8)(unsafe.Pointer(z + uintptr(0)))) >= '0') && (int32(*(*int8)(unsafe.Pointer(z + uintptr(0)))) <= '9')) { + goto __3 } - if !(4 == 4) { - crt.X__assert_fail(tls, ts+2425 /* "4==4" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4291), uintptr(unsafe.Pointer(&__func__75))) + mode = u32(uint32(sqlite3.Xsqlite3_value_int(tls, pVal))) + goto __4 +__3: + *(*[11]int8)(unsafe.Pointer(bp + 8 /* zTemplate */)) = *(*[11]int8)(unsafe.Pointer(ts + 7891 /* "-rwxrwxrwx" */)) + if !(crt.Xstrlen(tls, z) != uint64(10)) { + goto __5 } - if !(5 == 5) { - crt.X__assert_fail(tls, ts+15744 /* "5==5" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4292), uintptr(unsafe.Pointer(&__func__75))) + goto parse_error +__5: + ; + switch int32(*(*int8)(unsafe.Pointer(z + uintptr(0)))) { + case '-': + goto __7 + case 'd': + goto __8 + case 'l': + goto __9 + default: + goto __10 } - if !(*(*int32)(unsafe.Pointer(bp /* &aRes[0] */ + uintptr(1)*4)) == 1) { - crt.X__assert_fail(tls, ts+15749 /* "aRes[1]==1" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4293), uintptr(unsafe.Pointer(&__func__75))) + goto __6 +__7: + mode = mode | (uint64(0100000)) + goto __6 +__8: + mode = mode | (uint64(0040000)) + goto __6 +__9: + mode = mode | (uint64(0120000)) + goto __6 +__10: + goto parse_error +__6: + ; + i = 1 +__11: + if !(i < 10) { + goto __13 } - if !(*(*int32)(unsafe.Pointer(bp /* &aRes[0] */ + uintptr(2)*4)) == 2) { - crt.X__assert_fail(tls, ts+15760 /* "aRes[2]==2" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4294), uintptr(unsafe.Pointer(&__func__75))) + if !(int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) == int32(*(*int8)(unsafe.Pointer(bp + 8 /* &zTemplate[0] */ + uintptr(i))))) { + goto __14 } - if !(*(*int32)(unsafe.Pointer(bp /* &aRes[0] */ + uintptr(4)*4)) == 3) { - crt.X__assert_fail(tls, ts+15771 /* "aRes[4]==3" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4295), uintptr(unsafe.Pointer(&__func__75))) + mode = mode | (u32(int32(1) << (9 - i))) + goto __15 +__14: + if !(int32(*(*int8)(unsafe.Pointer(z + uintptr(i)))) != '-') { + goto __16 } - if !(*(*int32)(unsafe.Pointer(bp /* &aRes[0] */ + uintptr(5)*4)) == 4) { - crt.X__assert_fail(tls, ts+15782 /* "aRes[5]==4" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4296), uintptr(unsafe.Pointer(&__func__75))) + goto parse_error +__16: + ; +__15: + ; + goto __12 +__12: + i++ + goto __11 + goto __13 +__13: + ; +__4: + ; +__2: + ; + if !((crt.Bool32((mode & uint64(0040000)) == uint64(0))) == bIsDir) { + goto __17 } + // The "mode" attribute is a directory, but data has been specified. + // Or vice-versa - no data but "mode" is a file or symlink. + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7902 /* "zipfile: mode do..." */, 0) + return 19 +__17: + ; + *(*u32)(unsafe.Pointer(pMode)) = mode + return 0 - if ((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 101) { - return 5 - } else { - if !(((*sqlite3rbu)(unsafe.Pointer(p)).Frc != 101) || ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 5)) { - crt.X__assert_fail(tls, ts+15793 /* "p->rc!=101 || p-..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4301), uintptr(unsafe.Pointer(&__func__75))) - } - if !(((((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 1) || ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 2)) || ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 4)) || ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 5)) { - crt.X__assert_fail(tls, ts+15820 /* "p->eStage==1 || ..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4302), uintptr(unsafe.Pointer(&__func__75))) - } - return *(*int32)(unsafe.Pointer(bp /* &aRes[0] */ + uintptr((*sqlite3rbu)(unsafe.Pointer(p)).FeStage)*4)) - } - return int32(0) +parse_error: + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+7936 /* "zipfile: parse e..." */, crt.VaList(bp, z)) + return 1 } -var __func__75 = *(*[17]int8)(unsafe.Pointer(ts + 15881 /* "sqlite3rbu_state" */)) /* sqlite3rbu.c:4283:36 */ - -func sqlite3rbu_savestate(tls *crt.TLS, p uintptr) int32 { /* sqlite3rbu.c:4311:5: */ - var rc int32 = (*sqlite3rbu)(unsafe.Pointer(p)).Frc - if rc == 101 { - return 0 +// +// Both (const char*) arguments point to nul-terminated strings. Argument +// nB is the value of strlen(zB). This function returns 0 if the strings are +// identical, ignoring any trailing '/' character in either path. +func zipfileComparePath(tls *crt.TLS, zA uintptr, zB uintptr, nB int32) int32 { /* zipfile.c:1435:12: */ + var nA int32 = int32(crt.Xstrlen(tls, zA)) + if (nA > 0) && (int32(*(*int8)(unsafe.Pointer(zA + uintptr((nA - 1))))) == '/') { + nA-- } - - if !(((*sqlite3rbu)(unsafe.Pointer(p)).FeStage >= 1) && ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage <= 5)) { - crt.X__assert_fail(tls, ts+15898 /* "p->eStage>=1 && ..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4315), uintptr(unsafe.Pointer(&__func__76))) + if (nB > 0) && (int32(*(*int8)(unsafe.Pointer(zB + uintptr((nB - 1))))) == '/') { + nB-- } - if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 1 { - if !(rc != 101) { - crt.X__assert_fail(tls, ts+15927 /* "rc!=101" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4317), uintptr(unsafe.Pointer(&__func__76))) - } - if rc == 0 { - rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15071 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0)) - } + if (nA == nB) && (crt.Xmemcmp(tls, zA, zB, uint64(nA)) == 0) { + return 0 } + return 1 +} - // Sync the db file - if (rc == 0) && ((*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 4) { - var pDb uintptr = (*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(p)).FpTargetFd)).FpReal - rc = (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 40 /* &.xSync */))))(tls, pDb, 0x00002) +func zipfileBegin(tls *crt.TLS, pVtab uintptr) int32 { /* zipfile.c:1443:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var pTab uintptr = pVtab + var rc int32 = 0 + + if ((*ZipfileTab)(unsafe.Pointer(pTab)).FzFile == uintptr(0)) || (int32(*(*int8)(unsafe.Pointer((*ZipfileTab)(unsafe.Pointer(pTab)).FzFile + uintptr(0)))) == 0) { + (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+7969 /* "zipfile: missing..." */, 0) + return 1 } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc - rbuSaveState(tls, p, (*sqlite3rbu)(unsafe.Pointer(p)).FeStage) - rc = (*sqlite3rbu)(unsafe.Pointer(p)).Frc + // Open a write fd on the file. Also load the entire central directory + // structure into memory. During the transaction any new file data is + // appended to the archive file, but the central directory is accumulated + // in main-memory until the transaction is committed. + (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd = crt.Xfopen(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FzFile, ts+7995 /* "ab+" */) + if (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd == uintptr(0) { + (*ZipfileTab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, + ts+7999 /* "zipfile: failed ..." */, crt.VaList(bp, (*ZipfileTab)(unsafe.Pointer(pTab)).FzFile)) + rc = 1 + } else { + crt.Xfseek(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd, int64(0), 2) + (*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent = crt.AssignPtrInt64(pTab+96 /* &.szOrig */, i64(crt.Xftell(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd))) + rc = zipfileLoadDirectory(tls, pTab, uintptr(0), 0) + } - if (*sqlite3rbu)(unsafe.Pointer(p)).FeStage == 1 { - if !(rc != 101) { - crt.X__assert_fail(tls, ts+15927 /* "rc!=101" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4332), uintptr(unsafe.Pointer(&__func__76))) - } - if rc == 0 { - rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+15071 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0)) - } - if rc == 0 { - var zBegin uintptr - if (*sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { - zBegin = ts + 15574 /* "BEGIN" */ - } else { - zBegin = ts + 15602 /* "BEGIN IMMEDIATE" */ - } - rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, zBegin, uintptr(0), uintptr(0), uintptr(0)) - } - if rc == 0 { - rc = sqlite3.Xsqlite3_exec(tls, (*sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+15602 /* "BEGIN IMMEDIATE" */, uintptr(0), uintptr(0), uintptr(0)) - } + if rc != 0 { + zipfileCleanupTransaction(tls, pTab) } - (*sqlite3rbu)(unsafe.Pointer(p)).Frc = rc return rc } -var __func__76 = *(*[21]int8)(unsafe.Pointer(ts + 15935 /* "sqlite3rbu_saves..." */)) /* sqlite3rbu.c:4311:40 */ +// Return the current time as a 32-bit timestamp in UNIX epoch format (like +// time(2)). +func zipfileTime(tls *crt.TLS) u32 { /* zipfile.c:1480:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) -// ************************************************************************* -// -// Beginning of RBU VFS shim methods. The VFS shim modifies the behaviour -// of a standard VFS in the following ways: -// -// 1. Whenever the first page of a main database file is read or -// written, the value of the change-counter cookie is stored in -// rbu_file.iCookie. Similarly, the value of the "write-version" -// database header field is stored in rbu_file.iWriteVer. This ensures -// that the values are always trustworthy within an open transaction. -// -// 2. Whenever an SQLITE_OPEN_WAL file is opened, the (rbu_file.pWalFd) -// member variable of the associated database file descriptor is set -// to point to the new file. A mutex protected linked list of all main -// db fds opened using a particular RBU VFS is maintained at -// rbu_vfs.pMain to facilitate this. -// -// 3. Using a new file-control "SQLITE_FCNTL_RBU", a main db rbu_file -// object can be marked as the target database of an RBU update. This -// turns on the following extra special behaviour: -// -// 3a. If xAccess() is called to check if there exists a *-wal file -// associated with an RBU target database currently in RBU_STAGE_OAL -// stage (preparing the *-oal file), the following special handling -// applies: -// -// * if the *-wal file does exist, return SQLITE_CANTOPEN. An RBU -// target database may not be in wal mode already. -// -// * if the *-wal file does not exist, set the output parameter to -// non-zero (to tell SQLite that it does exist) anyway. -// -// Then, when xOpen() is called to open the *-wal file associated with -// the RBU target in RBU_STAGE_OAL stage, instead of opening the *-wal -// file, the rbu vfs opens the corresponding *-oal file instead. -// -// 3b. The *-shm pages returned by xShmMap() for a target db file in -// RBU_STAGE_OAL mode are actually stored in heap memory. This is to -// avoid creating a *-shm file on disk. Additionally, xShmLock() calls -// are no-ops on target database files in RBU_STAGE_OAL mode. This is -// because assert() statements in some VFS implementations fail if -// xShmLock() is called before xShmMap(). -// -// 3c. If an EXCLUSIVE lock is attempted on a target database file in any -// mode except RBU_STAGE_DONE (all work completed and checkpointed), it -// fails with an SQLITE_BUSY error. This is to stop RBU connections -// from automatically checkpointing a *-wal (or *-oal) file from within -// sqlite3_close(). -// -// 3d. In RBU_STAGE_CAPTURE mode, all xRead() calls on the wal file, and -// all xWrite() calls on the target database file perform no IO. -// Instead the frame and page numbers that would be read and written -// are recorded. Additionally, successful attempts to obtain exclusive -// xShmLock() WRITER, CHECKPOINTER and READ0 locks on the target -// database file are recorded. xShmLock() calls to unlock the same -// locks are no-ops (so that once obtained, these locks are never -// relinquished). Finally, calls to xSync() on the target database -// file fail with SQLITE_INTERNAL errors. - -func rbuUnlockShm(tls *crt.TLS, p uintptr) { /* sqlite3rbu.c:4404:13: */ - if !(((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0) { - crt.X__assert_fail(tls, ts+15956 /* "p->openFlags & 0..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4405), uintptr(unsafe.Pointer(&__func__77))) - } - if (*rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { - var xShmLock uintptr = (*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxShmLock - var i int32 - for i = 0; i < 8; i++ { - if ((u32(int32(1) << i)) & (*sqlite3rbu)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpRbu)).FmLock) != 0 { - (*(*func(*crt.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(&xShmLock)))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, i, 1, (1 | 8)) - } - } - (*sqlite3rbu)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpRbu)).FmLock = u32(0) - } -} + var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) + var ret u32 + if ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion >= 2) && ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FxCurrentTimeInt64 != 0) { + // var ms i64 at bp, 8 -var __func__77 = *(*[13]int8)(unsafe.Pointer(ts + 15982 /* "rbuUnlockShm" */)) /* sqlite3rbu.c:4404:38 */ + (*(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, pVfs, bp /* &ms */) + ret = (u32((*(*i64)(unsafe.Pointer(bp /* ms */)) / int64(1000)) - (int64(24405875) * int64(8640)))) + } else { + // var day float64 at bp+8, 8 -// -func rbuUpdateTempSize(tls *crt.TLS, pFd uintptr, nNew sqlite3_int64) int32 { /* sqlite3rbu.c:4420:12: */ - var pRbu uintptr = (*rbu_file)(unsafe.Pointer(pFd)).FpRbu - var nDiff i64 = (nNew - (*rbu_file)(unsafe.Pointer(pFd)).Fsz) - *(*i64)(unsafe.Pointer(pRbu + 360 /* &.szTemp */)) += (nDiff) - (*rbu_file)(unsafe.Pointer(pFd)).Fsz = nNew - if !((*sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp >= int64(0)) { - crt.X__assert_fail(tls, ts+15995 /* "pRbu->szTemp>=0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4425), uintptr(unsafe.Pointer(&__func__78))) - } - if ((*sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit != 0) && ((*sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp > (*sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit) { - return 13 + (*(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 120 /* &.xCurrentTime */))))(tls, pVfs, bp+8 /* &day */) + ret = (u32((*(*float64)(unsafe.Pointer(bp + 8 /* day */)) - 2440587.5) * float64(86400))) } - return 0 + return ret } -var __func__78 = *(*[18]int8)(unsafe.Pointer(ts + 16011 /* "rbuUpdateTempSiz..." */)) /* sqlite3rbu.c:4420:64 */ - -// Add an item to the main-db lists, if it is not already present. +// Return a 32-bit timestamp in UNIX epoch format. // -// There are two main-db lists. One for all file descriptors, and one -// 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 *crt.TLS, p uintptr) { /* sqlite3rbu.c:4438:13: */ - var pRbuVfs uintptr = (*rbu_file)(unsafe.Pointer(p)).FpRbuVfs - var pIter uintptr - if !(((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0) { - crt.X__assert_fail(tls, ts+16029 /* "(p->openFlags & ..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4441), uintptr(unsafe.Pointer(&__func__79))) +// If the value passed as the only argument is either NULL or an SQL NULL, +// return the current time. Otherwise, return the value stored in (*pVal) +// cast to a 32-bit unsigned integer. +func zipfileGetTime(tls *crt.TLS, pVal uintptr) u32 { /* zipfile.c:1502:12: */ + if (pVal == uintptr(0)) || (sqlite3.Xsqlite3_value_type(tls, pVal) == 5) { + return zipfileTime(tls) } - sqlite3.Xsqlite3_mutex_enter(tls, (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) - if (*rbu_file)(unsafe.Pointer(p)).FpRbu == uintptr(0) { - for pIter = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMain; pIter != 0; pIter = (*rbu_file)(unsafe.Pointer(pIter)).FpMainNext { - } - (*rbu_file)(unsafe.Pointer(p)).FpMainNext = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMain - (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMain = p - } else { - for pIter = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMainRbu; (pIter != 0) && (pIter != p); pIter = (*rbu_file)(unsafe.Pointer(pIter)).FpMainRbuNext { - } - if pIter == uintptr(0) { - (*rbu_file)(unsafe.Pointer(p)).FpMainRbuNext = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMainRbu - (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMainRbu = p + return u32(sqlite3.Xsqlite3_value_int64(tls, pVal)) +} + +// Unless it is NULL, entry pOld is currently part of the pTab->pFirstEntry +// linked list. Remove it from the list and free the object. +func zipfileRemoveEntryFromList(tls *crt.TLS, pTab uintptr, pOld uintptr) { /* zipfile.c:1513:13: */ + if pOld != 0 { + var pp uintptr + for pp = (pTab + 64 /* &.pFirstEntry */); (*(*uintptr)(unsafe.Pointer(pp))) != pOld; pp = (*(*uintptr)(unsafe.Pointer(pp)) + 112 /* &.pNext */) { } + *(*uintptr)(unsafe.Pointer(pp)) = (*ZipfileEntry)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pp)))).FpNext + zipfileEntryFree(tls, pOld) } - sqlite3.Xsqlite3_mutex_leave(tls, (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) } -var __func__79 = *(*[15]int8)(unsafe.Pointer(ts + 16057 /* "rbuMainlistAdd" */)) /* sqlite3rbu.c:4438:40 */ +// xUpdate method. +func zipfileUpdate(tls *crt.TLS, pVtab uintptr, nVal int32, apVal uintptr, pRowid uintptr) int32 { /* zipfile.c:1525:12: */ + bp := tls.Alloc(48) + defer tls.Free(48) -// Remove an item from the main-db lists. -func rbuMainlistRemove(tls *crt.TLS, p uintptr) { /* sqlite3rbu.c:4460:13: */ - var pp uintptr - sqlite3.Xsqlite3_mutex_enter(tls, (*rbu_vfs)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) - for pp = ((*rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 192 /* &.pMain */); (*(*uintptr)(unsafe.Pointer(pp)) != 0) && (*(*uintptr)(unsafe.Pointer(pp)) != p); pp = (*(*uintptr)(unsafe.Pointer(pp)) + 88 /* &.pMainNext */) { + var pTab uintptr + var rc int32 // Return Code + var pNew uintptr // New in-memory CDS entry + + // var mode u32 at bp+40, 8 + // Mode for new entry + var mTime u32 // Modification time for new entry + var sz i64 // Uncompressed size + var zPath uintptr // Path for new entry + var nPath int32 // strlen(zPath) + var pData uintptr // Pointer to buffer containing content + var nData int32 // Size of pData buffer in bytes + var iMethod int32 // Compression method for new entry + // var pFree uintptr at bp+24, 8 + // Free this + var zFree uintptr // Also free this + var pOld uintptr + var pOld2 uintptr + var bUpdate int32 // True for an update that modifies "name" + var bIsDir int32 + var iCrc32 u32 + var zUpdate uintptr + var zDelete uintptr + var nDelete int32 + // var nCmp int32 at bp+32, 4 + + // Value specified for "data", and possibly "method". This must be + // a regular file or a symlink. + var aIn uintptr + var nIn int32 + var bAuto int32 + var p uintptr + var pCsr uintptr + pTab = pVtab + rc = 0 + pNew = uintptr(0) + *(*u32)(unsafe.Pointer(bp + 40 /* mode */)) = uint64(0) + mTime = uint64(0) + sz = int64(0) + zPath = uintptr(0) + nPath = 0 + pData = uintptr(0) + nData = 0 + iMethod = 0 + *(*uintptr)(unsafe.Pointer(bp + 24 /* pFree */)) = uintptr(0) + zFree = uintptr(0) + pOld = uintptr(0) + pOld2 = uintptr(0) + bUpdate = 0 + bIsDir = 0 + iCrc32 = uint64(0) + + if !((*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd == uintptr(0)) { + goto __1 } - if *(*uintptr)(unsafe.Pointer(pp)) != 0 { - *(*uintptr)(unsafe.Pointer(pp)) = (*rbu_file)(unsafe.Pointer(p)).FpMainNext + rc = zipfileBegin(tls, pVtab) + if !(rc != 0) { + goto __2 } - (*rbu_file)(unsafe.Pointer(p)).FpMainNext = uintptr(0) - for pp = ((*rbu_file)(unsafe.Pointer(p)).FpRbuVfs + 200 /* &.pMainRbu */); (*(*uintptr)(unsafe.Pointer(pp)) != 0) && (*(*uintptr)(unsafe.Pointer(pp)) != p); pp = (*(*uintptr)(unsafe.Pointer(pp)) + 96 /* &.pMainRbuNext */) { + return rc +__2: + ; +__1: + ; + + // If this is a DELETE or UPDATE, find the archive entry to delete. + if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(0)*8))) != 5) { + goto __3 } - if *(*uintptr)(unsafe.Pointer(pp)) != 0 { - *(*uintptr)(unsafe.Pointer(pp)) = (*rbu_file)(unsafe.Pointer(p)).FpMainRbuNext + zDelete = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(0)*8))) + nDelete = int32(crt.Xstrlen(tls, zDelete)) + if !(nVal > 1) { + goto __4 } - (*rbu_file)(unsafe.Pointer(p)).FpMainRbuNext = uintptr(0) - sqlite3.Xsqlite3_mutex_leave(tls, (*rbu_vfs)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).Fmutex) -} - -// Given that zWal points to a buffer containing a wal file name passed to -// either the xOpen() or xAccess() VFS method, search the main-db list for -// a file-handle opened by the same database connection on the corresponding -// database file. -// -// If parameter bRbu is true, only search for file-descriptors with -// rbu_file.pDb!=0. -func rbuFindMaindb(tls *crt.TLS, pRbuVfs uintptr, zWal uintptr, bRbu int32) uintptr { /* sqlite3rbu.c:4481:17: */ - var pDb uintptr - sqlite3.Xsqlite3_mutex_enter(tls, (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) - if bRbu != 0 { - for pDb = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMainRbu; (pDb != 0) && ((*rbu_file)(unsafe.Pointer(pDb)).FzWal != zWal); pDb = (*rbu_file)(unsafe.Pointer(pDb)).FpMainRbuNext { - } - } else { - for pDb = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpMain; (pDb != 0) && ((*rbu_file)(unsafe.Pointer(pDb)).FzWal != zWal); pDb = (*rbu_file)(unsafe.Pointer(pDb)).FpMainNext { - } + zUpdate = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(1)*8))) + if !((zUpdate != 0) && (zipfileComparePath(tls, zUpdate, zDelete, nDelete) != 0)) { + goto __5 } - sqlite3.Xsqlite3_mutex_leave(tls, (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fmutex) - return pDb -} - -// Close an rbu file. -func rbuVfsClose(tls *crt.TLS, pFile uintptr) int32 { /* sqlite3rbu.c:4496:12: */ - var p uintptr = pFile - var rc int32 - var i int32 - - // Free the contents of the apShm[] array. And the array itself. - for i = 0; i < (*rbu_file)(unsafe.Pointer(p)).FnShm; i++ { - sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(i)*8))) + bUpdate = 1 +__5: + ; +__4: + ; + pOld = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry +__6: + if !(1 != 0) { + goto __8 + } + if !(zipfileComparePath(tls, (*ZipfileEntry)(unsafe.Pointer(pOld)).Fcds.FzFile, zDelete, nDelete) == 0) { + goto __9 } - sqlite3.Xsqlite3_free(tls, (*rbu_file)(unsafe.Pointer(p)).FapShm) - (*rbu_file)(unsafe.Pointer(p)).FapShm = uintptr(0) - sqlite3.Xsqlite3_free(tls, (*rbu_file)(unsafe.Pointer(p)).FzDel) + goto __8 +__9: + ; + goto __7 +__7: + pOld = (*ZipfileEntry)(unsafe.Pointer(pOld)).FpNext + goto __6 + goto __8 +__8: + ; +__3: + ; - if ((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0 { - rbuMainlistRemove(tls, p) - rbuUnlockShm(tls, p) - (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 128 /* &.xShmUnmap */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, 0) - } else if (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000008) != 0) && ((*rbu_file)(unsafe.Pointer(p)).FpRbu != 0) { - rbuUpdateTempSize(tls, p, int64(0)) + if !(nVal > 1) { + goto __10 } - if !(((*rbu_file)(unsafe.Pointer(p)).FpMainNext == uintptr(0)) && ((*rbu_vfs)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpRbuVfs)).FpMain != p)) { - crt.X__assert_fail(tls, ts+16072 /* "p->pMainNext==0 ..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4517), uintptr(unsafe.Pointer(&__func__80))) + // Check that "sz" and "rawdata" are both NULL: + if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(5)*8))) != 5) { + goto __11 } + zipfileTableErr(tls, pTab, ts+8043 /* "sz must be NULL" */, 0) + rc = 19 +__11: + ; + if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(6)*8))) != 5) { + goto __12 + } + zipfileTableErr(tls, pTab, ts+8059 /* "rawdata must be ..." */, 0) + rc = 19 +__12: + ; - // Close the underlying file handle - rc = (*(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 8 /* &.xClose */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal) - return rc -} - -var __func__80 = *(*[12]int8)(unsafe.Pointer(ts + 16112 /* "rbuVfsClose" */)) /* sqlite3rbu.c:4496:44 */ + if !(rc == 0) { + goto __13 + } + if !(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(7)*8))) == 5) { + goto __14 + } + // data=NULL. A directory + bIsDir = 1 + goto __15 +__14: + // Value specified for "data", and possibly "method". This must be + // a regular file or a symlink. + aIn = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(7)*8))) + nIn = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(7)*8))) + bAuto = (crt.Bool32(sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(8)*8))) == 5)) + + iMethod = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(8)*8))) + sz = i64(nIn) + pData = aIn + nData = nIn + if !((iMethod != 0) && (iMethod != 8)) { + goto __16 + } + zipfileTableErr(tls, pTab, ts+8080 /* "unknown compress..." */, crt.VaList(bp, iMethod)) + rc = 19 + goto __17 +__16: + if !((bAuto != 0) || (iMethod != 0)) { + goto __18 + } + rc = zipfileDeflate(tls, aIn, nIn, bp+24 /* &pFree */, bp+32 /* &nCmp */, (pTab /* &.base */ + 16 /* &.zErrMsg */)) + if !(rc == 0) { + goto __19 + } + if !((iMethod != 0) || (*(*int32)(unsafe.Pointer(bp + 32 /* nCmp */)) < nIn)) { + goto __20 + } + iMethod = 8 + pData = *(*uintptr)(unsafe.Pointer(bp + 24 /* pFree */)) + nData = *(*int32)(unsafe.Pointer(bp + 32 /* nCmp */)) +__20: + ; +__19: + ; +__18: + ; + iCrc32 = tcl.Xcrc32(tls, uint64(0), aIn, uint32(nIn)) +__17: + ; +__15: + ; +__13: + ; -// Read and return an unsigned 32-bit big-endian integer from the buffer -// passed as the only argument. -func rbuGetU32(tls *crt.TLS, aBuf uintptr) u32 { /* sqlite3rbu.c:4529:12: */ - return ((((u32(*(*u8)(unsafe.Pointer(aBuf + uintptr(0)))) << 24) + - (u32(*(*u8)(unsafe.Pointer(aBuf + uintptr(1)))) << 16)) + - (u32(*(*u8)(unsafe.Pointer(aBuf + uintptr(2)))) << 8)) + - (u32(*(*u8)(unsafe.Pointer(aBuf + uintptr(3)))))) -} + if !(rc == 0) { + goto __21 + } + rc = zipfileGetMode(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(3)*8)), bIsDir, bp+40 /* &mode */, (pTab /* &.base */ + 16 /* &.zErrMsg */)) +__21: + ; -// Write an unsigned 32-bit value in big-endian format to the supplied -// buffer. -func rbuPutU32(tls *crt.TLS, aBuf uintptr, iVal u32) { /* sqlite3rbu.c:4540:13: */ - *(*u8)(unsafe.Pointer(aBuf + uintptr(0))) = (u8((iVal >> 24) & u32(0xFF))) - *(*u8)(unsafe.Pointer(aBuf + uintptr(1))) = (u8((iVal >> 16) & u32(0xFF))) - *(*u8)(unsafe.Pointer(aBuf + uintptr(2))) = (u8((iVal >> 8) & u32(0xFF))) - *(*u8)(unsafe.Pointer(aBuf + uintptr(3))) = (u8((iVal >> 0) & u32(0xFF))) -} + if !(rc == 0) { + goto __22 + } + zPath = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(2)*8))) + if !(zPath == uintptr(0)) { + goto __23 + } + zPath = ts + 488 /* "" */ +__23: + ; + nPath = int32(crt.Xstrlen(tls, zPath)) + mTime = zipfileGetTime(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr(4)*8))) +__22: + ; -func rbuPutU16(tls *crt.TLS, aBuf uintptr, iVal u16) { /* sqlite3rbu.c:4547:13: */ - *(*u8)(unsafe.Pointer(aBuf + uintptr(0))) = (u8((int32(iVal) >> 8) & 0xFF)) - *(*u8)(unsafe.Pointer(aBuf + uintptr(1))) = (u8((int32(iVal) >> 0) & 0xFF)) -} + if !((rc == 0) && (bIsDir != 0)) { + goto __24 + } + // For a directory, check that the last character in the path is a + // '/'. This appears to be required for compatibility with info-zip + // (the unzip command on unix). It does not create directories + // otherwise. + if !((nPath <= 0) || (int32(*(*int8)(unsafe.Pointer(zPath + uintptr((nPath - 1))))) != '/')) { + goto __25 + } + zFree = sqlite3.Xsqlite3_mprintf(tls, ts+8111 /* "%s/" */, crt.VaList(bp+8, zPath)) + zPath = zFree + if !(zFree == uintptr(0)) { + goto __26 + } + rc = 7 + nPath = 0 + goto __27 +__26: + nPath = int32(crt.Xstrlen(tls, zPath)) +__27: + ; +__25: + ; +__24: + ; -// Read data from an rbuVfs-file. -func rbuVfsRead(tls *crt.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* sqlite3rbu.c:4555:12: */ - var p uintptr = pFile - var pRbu uintptr = (*rbu_file)(unsafe.Pointer(p)).FpRbu - var rc int32 + // Check that we're not inserting a duplicate entry -OR- updating an + // entry with a path, thereby making it into a duplicate. + if !(((pOld == uintptr(0)) || (bUpdate != 0)) && (rc == 0)) { + goto __28 + } + p = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry +__29: + if !(p != 0) { + goto __31 + } + if !(zipfileComparePath(tls, (*ZipfileEntry)(unsafe.Pointer(p)).Fcds.FzFile, zPath, nPath) == 0) { + goto __32 + } + switch sqlite3.Xsqlite3_vtab_on_conflict(tls, (*ZipfileTab)(unsafe.Pointer(pTab)).Fdb) { + case 2: + goto __34 + case 5: + goto __35 + default: + goto __36 + } + goto __33 +__34: + goto zipfile_update_done +__35: + pOld2 = p + goto __33 +__36: + zipfileTableErr(tls, pTab, ts+8115 /* "duplicate name: ..." */, crt.VaList(bp+16, zPath)) + rc = 19 + goto __33 +__33: + ; + goto __31 +__32: + ; + goto __30 +__30: + p = (*ZipfileEntry)(unsafe.Pointer(p)).FpNext + goto __29 + goto __31 +__31: + ; +__28: + ; - if (pRbu != 0) && ((*sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == 3) { - if !(((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00080000) != 0) { - crt.X__assert_fail(tls, ts+16124 /* "p->openFlags & 0..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4566), uintptr(unsafe.Pointer(&__func__81))) - } - rc = rbuCaptureWalRead(tls, (*rbu_file)(unsafe.Pointer(p)).FpRbu, iOfst, iAmt) - } else { - if (((pRbu != 0) && ((*sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == 1)) && - (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00080000) != 0)) && - (iOfst >= (*sqlite3rbu)(unsafe.Pointer(pRbu)).FiOalSz) { - rc = 0 - crt.Xmemset(tls, zBuf, 0, uint64(iAmt)) - } else { - rc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 16 /* &.xRead */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) - // If this is being called to read the first page of the target - // database as part of an rbu vacuum operation, synthesize the - // contents of the first page if it does not yet exist. Otherwise, - // SQLite will not check for a *-wal file. - if (((((pRbu != 0) && ((*sqlite3rbu)(unsafe.Pointer((pRbu))).FzTarget == uintptr(0))) && - (rc == (10 | (int32(2) << 8)))) && (iOfst == int64(0))) && - (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0)) && - ((*sqlite3rbu)(unsafe.Pointer(pRbu)).Frc == 0) { - var pFd uintptr = (*sqlite3rbu)(unsafe.Pointer(pRbu)).FpRbuFd - rc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pFd)).FpMethods + 16 /* &.xRead */))))(tls, pFd, zBuf, iAmt, iOfst) - if rc == 0 { - var aBuf uintptr = zBuf - var iRoot u32 - if rbuGetU32(tls, (aBuf+uintptr(52))) != 0 { - iRoot = uint32(1) - } else { - iRoot = uint32(0) - } - rbuPutU32(tls, (aBuf + uintptr(52)), iRoot) // largest root page number - rbuPutU32(tls, (aBuf + uintptr(36)), uint32(0)) // number of free pages - rbuPutU32(tls, (aBuf + uintptr(32)), uint32(0)) // first page on free list trunk - rbuPutU32(tls, (aBuf + uintptr(28)), uint32(1)) // size of db file in pages - rbuPutU32(tls, (aBuf + uintptr(24)), ((*rbu_file)(unsafe.Pointer((*sqlite3rbu)(unsafe.Pointer(pRbu)).FpRbuFd)).FiCookie + u32(1))) // Change counter - - if iAmt > 100 { - crt.Xmemset(tls, (aBuf + uintptr(100)), 0, (uint64(iAmt - 100))) - rbuPutU16(tls, (aBuf + uintptr(105)), (uint16(iAmt & 0xFFFF))) - *(*u8)(unsafe.Pointer(aBuf + uintptr(100))) = u8(0x0D) - } - } - } - } - if ((rc == 0) && (iOfst == int64(0))) && (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0) { - // These look like magic numbers. But they are stable, as they are part - // of the definition of the SQLite file format, which may not change. - var pBuf uintptr = zBuf - (*rbu_file)(unsafe.Pointer(p)).FiCookie = rbuGetU32(tls, (pBuf + uintptr(24))) - (*rbu_file)(unsafe.Pointer(p)).FiWriteVer = *(*u8)(unsafe.Pointer(pBuf + uintptr(19))) - } + if !(rc == 0) { + goto __37 } - return rc -} + // Create the new CDS record. + pNew = zipfileNewEntry(tls, zPath) + if !(pNew == uintptr(0)) { + goto __38 + } + rc = 7 + goto __39 +__38: + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiVersionMadeBy = (u16((int32(3) << 8) + 30)) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiVersionExtract = u16(20) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.Fflags = u16(0x800) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiCompression = u16(iMethod) + zipfileMtimeToDos(tls, (pNew /* &.cds */), mTime) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.Fcrc32 = iCrc32 + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FszCompressed = u32(nData) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FszUncompressed = u32(sz) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiExternalAttr = (*(*u32)(unsafe.Pointer(bp + 40 /* mode */)) << 16) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FiOffset = u32((*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent) + (*ZipfileEntry)(unsafe.Pointer(pNew)).Fcds.FnFile = u16(nPath) + (*ZipfileEntry)(unsafe.Pointer(pNew)).FmUnixTime = mTime + rc = zipfileAppendEntry(tls, pTab, pNew, pData, nData) + zipfileAddEntry(tls, pTab, pOld, pNew) +__39: + ; +__37: + ; +__10: + ; -var __func__81 = *(*[11]int8)(unsafe.Pointer(ts + 16150 /* "rbuVfsRead" */)) /* sqlite3rbu.c:4560:2 */ + if !((rc == 0) && ((pOld != 0) || (pOld2 != 0))) { + goto __40 + } + pCsr = (*ZipfileTab)(unsafe.Pointer(pTab)).FpCsrList +__41: + if !(pCsr != 0) { + goto __43 + } + if !(((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent != 0) && (((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent == pOld) || ((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent == pOld2))) { + goto __44 + } + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent = (*ZipfileEntry)(unsafe.Pointer((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent)).FpNext + (*ZipfileCsr)(unsafe.Pointer(pCsr)).FbNoop = u8(1) +__44: + ; + goto __42 +__42: + pCsr = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCsrNext + goto __41 + goto __43 +__43: + ; -// Write data to an rbuVfs-file. -func rbuVfsWrite(tls *crt.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* sqlite3rbu.c:4621:12: */ - var p uintptr = pFile - var pRbu uintptr = (*rbu_file)(unsafe.Pointer(p)).FpRbu - var rc int32 + zipfileRemoveEntryFromList(tls, pTab, pOld) + zipfileRemoveEntryFromList(tls, pTab, pOld2) +__40: + ; - if (pRbu != 0) && ((*sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == 3) { - if !(((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0) { - crt.X__assert_fail(tls, ts+15956 /* "p->openFlags & 0..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4632), uintptr(unsafe.Pointer(&__func__82))) - } - rc = rbuCaptureDbWrite(tls, (*rbu_file)(unsafe.Pointer(p)).FpRbu, iOfst) - } else { - if pRbu != 0 { - if (((*sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == 1) && - (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00080000) != 0)) && - (iOfst >= (*sqlite3rbu)(unsafe.Pointer(pRbu)).FiOalSz) { - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FiOalSz = (sqlite_int64(iAmt) + iOfst) - } else if ((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000008) != 0 { - var szNew i64 = (sqlite_int64(iAmt) + iOfst) - if szNew > (*rbu_file)(unsafe.Pointer(p)).Fsz { - rc = rbuUpdateTempSize(tls, p, szNew) - if rc != 0 { - return rc - } - } - } - } - rc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 24 /* &.xWrite */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, zBuf, iAmt, iOfst) - if ((rc == 0) && (iOfst == int64(0))) && (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0) { - // These look like magic numbers. But they are stable, as they are part - // of the definition of the SQLite file format, which may not change. - var pBuf uintptr = zBuf - (*rbu_file)(unsafe.Pointer(p)).FiCookie = rbuGetU32(tls, (pBuf + uintptr(24))) - (*rbu_file)(unsafe.Pointer(p)).FiWriteVer = *(*u8)(unsafe.Pointer(pBuf + uintptr(19))) - } - } +zipfile_update_done: + sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pFree */))) + sqlite3.Xsqlite3_free(tls, zFree) return rc } -var __func__82 = *(*[12]int8)(unsafe.Pointer(ts + 16161 /* "rbuVfsWrite" */)) /* sqlite3rbu.c:4626:2 */ +func zipfileSerializeEOCD(tls *crt.TLS, p uintptr, aBuf uintptr) int32 { /* zipfile.c:1716:12: */ + var a uintptr = aBuf + { + zipfilePutU32(tls, a, uint64(0x06054b50)) + a += uintptr(4) + } -// Truncate an rbuVfs-file. -func rbuVfsTruncate(tls *crt.TLS, pFile uintptr, size sqlite_int64) int32 { /* sqlite3rbu.c:4664:12: */ - var p uintptr = pFile - if (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000008) != 0) && ((*rbu_file)(unsafe.Pointer(p)).FpRbu != 0) { - var rc int32 = rbuUpdateTempSize(tls, p, size) - if rc != 0 { - return rc - } + { + zipfilePutU16(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FiDisk) + a += uintptr(2) } - return (*(*func(*crt.TLS, uintptr, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 32 /* &.xTruncate */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, size) -} -// Sync an rbuVfs-file. -func rbuVfsSync(tls *crt.TLS, pFile uintptr, flags int32) int32 { /* sqlite3rbu.c:4676:12: */ - var p uintptr = pFile - if ((*rbu_file)(unsafe.Pointer(p)).FpRbu != 0) && ((*sqlite3rbu)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage == 3) { - if ((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0 { - return 2 - } - return 0 + { + zipfilePutU16(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FiFirstDisk) + a += uintptr(2) } - return (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 40 /* &.xSync */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, flags) -} -// Return the current file-size of an rbuVfs-file. -func rbuVfsFileSize(tls *crt.TLS, pFile uintptr, pSize uintptr) int32 { /* sqlite3rbu.c:4690:12: */ - var p uintptr = pFile - var rc int32 - rc = (*(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 48 /* &.xFileSize */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, pSize) + { + zipfilePutU16(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FnEntry) + a += uintptr(2) + } - // If this is an RBU vacuum operation and this is the target database, - // pretend that it has at least one page. Otherwise, SQLite will not - // check for the existance of a *-wal file. rbuVfsRead() contains - // similar logic. - if ((((rc == 0) && (*(*sqlite_int64)(unsafe.Pointer(pSize)) == int64(0))) && - ((*rbu_file)(unsafe.Pointer(p)).FpRbu != 0)) && ((*sqlite3rbu)(unsafe.Pointer(((*rbu_file)(unsafe.Pointer(p)).FpRbu))).FzTarget == uintptr(0))) && - (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & 0x00000100) != 0) { - *(*sqlite_int64)(unsafe.Pointer(pSize)) = int64(1024) + { + zipfilePutU16(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FnEntryTotal) + a += uintptr(2) } - return rc -} -// Lock an rbuVfs-file. -func rbuVfsLock(tls *crt.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3rbu.c:4711:12: */ - var p uintptr = pFile - var pRbu uintptr = (*rbu_file)(unsafe.Pointer(p)).FpRbu - var rc int32 = 0 + { + zipfilePutU32(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FnSize) + a += uintptr(4) + } - if !(((*rbu_file)(unsafe.Pointer(p)).FopenFlags & (0x00000100 | 0x00000200)) != 0) { - crt.X__assert_fail(tls, ts+16173 /* "p->openFlags & (..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4716), uintptr(unsafe.Pointer(&__func__83))) + { + zipfilePutU32(tls, a, (*ZipfileEOCD)(unsafe.Pointer(p)).FiOffset) + a += uintptr(4) } - if (eLock == 4) && - (((*rbu_file)(unsafe.Pointer(p)).FbNolock != 0) || ((pRbu != 0) && ((*sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage != 5))) { - // Do not allow EXCLUSIVE locks. Preventing SQLite from taking this - // prevents it from checkpointing the database from sqlite3_close(). - rc = 5 - } else { - rc = (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 56 /* &.xLock */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, eLock) + + { + zipfilePutU16(tls, a, uint16(0)) + a += uintptr(2) } + // Size of trailing comment in bytes - return rc + return (int32((int64(a) - int64(aBuf)) / 1)) } -var __func__83 = *(*[11]int8)(unsafe.Pointer(ts + 16212 /* "rbuVfsLock" */)) /* sqlite3rbu.c:4711:54 */ +func zipfileAppendEOCD(tls *crt.TLS, pTab uintptr, p uintptr) int32 { /* zipfile.c:1730:12: */ + var nBuf int32 = zipfileSerializeEOCD(tls, p, (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer) -// Unlock an rbuVfs-file. -func rbuVfsUnlock(tls *crt.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3rbu.c:4733:12: */ - var p uintptr = pFile - return (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 64 /* &.xUnlock */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, eLock) + return zipfileAppendData(tls, pTab, (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer, nBuf) } -// Check if another file-handle holds a RESERVED lock on an rbuVfs-file. -func rbuVfsCheckReservedLock(tls *crt.TLS, pFile uintptr, pResOut uintptr) int32 { /* sqlite3rbu.c:4741:12: */ - var p uintptr = pFile - return (*(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 72 /* &.xCheckReservedLock */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, pResOut) -} - -// File control method. For custom operations on an rbuVfs-file. -func rbuVfsFileControl(tls *crt.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3rbu.c:4749:12: */ - bp := tls.Alloc(24) - defer tls.Free(24) +// Serialize the CDS structure into buffer aBuf[]. Return the number +// of bytes written. +func zipfileSerializeCDS(tls *crt.TLS, pEntry uintptr, aBuf uintptr) int32 { /* zipfile.c:1740:12: */ + var a uintptr = aBuf + var pCDS uintptr = (pEntry /* &.cds */) - var p uintptr = pFile - var xControl uintptr = (*sqlite3_io_methods1)(unsafe.Pointer((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxFileControl - var rc int32 - - if !((((*rbu_file)(unsafe.Pointer(p)).FopenFlags & (0x00000100 | 0x00000200)) != 0) || (((*rbu_file)(unsafe.Pointer(p)).FopenFlags & (0x00000400 | 0x00001000)) != 0)) { - crt.X__assert_fail(tls, ts+16223 /* "p->openFlags & (..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4754), uintptr(unsafe.Pointer(&__func__84))) + if (*ZipfileEntry)(unsafe.Pointer(pEntry)).FaExtra == uintptr(0) { + (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnExtra = u16(9) } - if op == 26 { - var pRbu uintptr = pArg - // First try to find another RBU vfs lower down in the vfs stack. If - // one is found, this vfs will operate in pass-through mode. The lower - // level vfs will do the special RBU handling. - rc = (*(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xControl)))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, op, pArg) - - if rc == 12 { - // Now search for a zipvfs instance lower down in the VFS stack. If - // one is found, this is an error. - *(*uintptr)(unsafe.Pointer(bp + 16 /* dummy */)) = uintptr(0) - rc = (*(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xControl)))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, 25, bp+16 /* &dummy */) - if rc == 0 { - rc = 1 - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = sqlite3.Xsqlite3_mprintf(tls, ts+16304 /* "rbu/zipvfs setup..." */, 0) - } else if rc == 12 { - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FpTargetFd = p - (*rbu_file)(unsafe.Pointer(p)).FpRbu = pRbu - rbuMainlistAdd(tls, p) - if (*rbu_file)(unsafe.Pointer(p)).FpWalFd != 0 { - (*rbu_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpWalFd)).FpRbu = pRbu - } - rc = 0 - } - } - return rc - } else if op == 5149216 { - var pRbu uintptr = pArg - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FnRbu++ - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FpRbuFd = p - (*rbu_file)(unsafe.Pointer(p)).FbNolock = u8(1) - } - - rc = (*(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xControl)))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, op, pArg) - if (rc == 0) && (op == 12) { - var pRbuVfs uintptr = (*rbu_file)(unsafe.Pointer(p)).FpRbuVfs - var zIn uintptr = *(*uintptr)(unsafe.Pointer(pArg)) - var zOut uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+16327 /* "rbu(%s)/%z" */, crt.VaList(bp, (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).Fbase.FzName, zIn)) - *(*uintptr)(unsafe.Pointer(pArg)) = zOut - if zOut == uintptr(0) { - rc = 7 - } + { + zipfilePutU32(tls, a, uint64(0x02014b50)) + a += uintptr(4) } - return rc -} - -var __func__84 = *(*[18]int8)(unsafe.Pointer(ts + 16338 /* "rbuVfsFileContro..." */)) /* sqlite3rbu.c:4749:70 */ + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiVersionMadeBy) + a += uintptr(2) + } -// Return the sector-size in bytes for an rbuVfs-file. -func rbuVfsSectorSize(tls *crt.TLS, pFile uintptr) int32 { /* sqlite3rbu.c:4805:12: */ - var p uintptr = pFile - return (*(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 88 /* &.xSectorSize */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal) -} + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiVersionExtract) + a += uintptr(2) + } -// Return the device characteristic flags supported by an rbuVfs-file. -func rbuVfsDeviceCharacteristics(tls *crt.TLS, pFile uintptr) int32 { /* sqlite3rbu.c:4813:12: */ - var p uintptr = pFile - return (*(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal) -} + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).Fflags) + a += uintptr(2) + } -// Take or release a shared-memory lock. -func rbuVfsShmLock(tls *crt.TLS, pFile uintptr, ofst int32, n int32, flags int32) int32 { /* sqlite3rbu.c:4821:12: */ - var p uintptr = pFile - var pRbu uintptr = (*rbu_file)(unsafe.Pointer(p)).FpRbu - var rc int32 = 0 + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiCompression) + a += uintptr(2) + } - if !(((*rbu_file)(unsafe.Pointer(p)).FopenFlags & (0x00000100 | 0x00000200)) != 0) { - crt.X__assert_fail(tls, ts+16173 /* "p->openFlags & (..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4830), uintptr(unsafe.Pointer(&__func__85))) + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FmTime) + a += uintptr(2) } - if (pRbu != 0) && (((*sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == 1) || ((*sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == 2)) { - // Magic number 1 is the WAL_CKPT_LOCK lock. Preventing SQLite from - // taking this lock also prevents any checkpoints from occurring. - // todo: really, it's not clear why this might occur, as - // wal_autocheckpoint ought to be turned off. - if (ofst == 1) && (n == 1) { - rc = 5 - } - } else { - var bCapture int32 = 0 - if (pRbu != 0) && ((*sqlite3rbu)(unsafe.Pointer(pRbu)).FeStage == 3) { - bCapture = 1 - } - if (bCapture == 0) || (0 == (flags & 1)) { - rc = (*(*func(*crt.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 112 /* &.xShmLock */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, ofst, n, flags) - if (bCapture != 0) && (rc == 0) { - *(*u32)(unsafe.Pointer(pRbu + 316 /* &.mLock */)) |= (u32(int32(1) << ofst)) - } - } + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FmDate) + a += uintptr(2) } - return rc -} + { + zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).Fcrc32) + a += uintptr(4) + } -var __func__85 = *(*[14]int8)(unsafe.Pointer(ts + 16356 /* "rbuVfsShmLock" */)) /* sqlite3rbu.c:4821:74 */ + { + zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FszCompressed) + a += uintptr(4) + } -// Obtain a pointer to a mapping of a single 32KiB page of the *-shm file. -func rbuVfsShmMap(tls *crt.TLS, pFile uintptr, iRegion int32, szRegion int32, isWrite int32, pp uintptr) int32 { /* sqlite3rbu.c:4857:12: */ - var p uintptr = pFile - var rc int32 = 0 - var eStage int32 = func() int32 { - if (*rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { - return (*sqlite3rbu)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage - } - return 0 - }() + { + zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FszUncompressed) + a += uintptr(4) + } - // If not in RBU_STAGE_OAL, allow this call to pass through. Or, if this - // rbu is in the RBU_STAGE_OAL state, use heap memory for *-shm space - // instead of a file on disk. - if !(((*rbu_file)(unsafe.Pointer(p)).FopenFlags & (0x00000100 | 0x00000200)) != 0) { - crt.X__assert_fail(tls, ts+16173 /* "p->openFlags & (..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4871), uintptr(unsafe.Pointer(&__func__86))) + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile) + a += uintptr(2) } - if eStage == 1 { - var nByte sqlite3_int64 = (sqlite3_int64((uint64(iRegion + 1)) * uint64(unsafe.Sizeof(uintptr(0))))) - var apNew uintptr = sqlite3.Xsqlite3_realloc64(tls, (*rbu_file)(unsafe.Pointer(p)).FapShm, uint64(nByte)) - // This is an RBU connection that uses its own heap memory for the - // pages of the *-shm file. Since no other process can have run - // recovery, the connection must request *-shm pages in order - // from start to finish. - if !(iRegion == (*rbu_file)(unsafe.Pointer(p)).FnShm) { - crt.X__assert_fail(tls, ts+16370 /* "iRegion==p->nShm" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4880), uintptr(unsafe.Pointer(&__func__86))) - } - if apNew == uintptr(0) { - rc = 7 - } else { - crt.Xmemset(tls, (apNew + uintptr((*rbu_file)(unsafe.Pointer(p)).FnShm)*8), 0, (uint64(unsafe.Sizeof(uintptr(0))) * (uint64((1 + iRegion) - (*rbu_file)(unsafe.Pointer(p)).FnShm)))) - (*rbu_file)(unsafe.Pointer(p)).FapShm = apNew - (*rbu_file)(unsafe.Pointer(p)).FnShm = (iRegion + 1) - } + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnExtra) + a += uintptr(2) + } - if rc == 0 { - var pNew uintptr = sqlite3.Xsqlite3_malloc64(tls, uint64(szRegion)) - if pNew == uintptr(0) { - rc = 7 - } else { - crt.Xmemset(tls, pNew, 0, uint64(szRegion)) - *(*uintptr)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) = pNew - } - } + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FnComment) + a += uintptr(2) + } - if rc == 0 { - *(*uintptr)(unsafe.Pointer(pp)) = *(*uintptr)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FapShm + uintptr(iRegion)*8)) - } else { - *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) - } - } else { - if !((*rbu_file)(unsafe.Pointer(p)).FapShm == uintptr(0)) { - crt.X__assert_fail(tls, ts+16387 /* "p->apShm==0" */, ts+9694 /* "testdata/sqlite-..." */, uint32(4905), uintptr(unsafe.Pointer(&__func__86))) - } - rc = (*(*func(*crt.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 104 /* &.xShmMap */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, iRegion, szRegion, isWrite, pp) + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiDiskStart) + a += uintptr(2) } - return rc -} + { + zipfilePutU16(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiInternalAttr) + a += uintptr(2) + } -var __func__86 = *(*[13]int8)(unsafe.Pointer(ts + 16399 /* "rbuVfsShmMap" */)) /* sqlite3rbu.c:4863:2 */ + { + zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiExternalAttr) + a += uintptr(4) + } -// Memory barrier. -func rbuVfsShmBarrier(tls *crt.TLS, pFile uintptr) { /* sqlite3rbu.c:4915:13: */ - var p uintptr = pFile - (*(*func(*crt.TLS, uintptr))(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 120 /* &.xShmBarrier */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal) -} + { + zipfilePutU32(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FiOffset) + a += uintptr(4) + } -// The xShmUnmap method. -func rbuVfsShmUnmap(tls *crt.TLS, pFile uintptr, delFlag int32) int32 { /* sqlite3rbu.c:4923:12: */ - var p uintptr = pFile - var rc int32 = 0 - var eStage int32 = func() int32 { - if (*rbu_file)(unsafe.Pointer(p)).FpRbu != 0 { - return (*sqlite3rbu)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpRbu)).FeStage - } - return 0 - }() + crt.Xmemcpy(tls, a, (*ZipfileCDS)(unsafe.Pointer(pCDS)).FzFile, uint64((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile)) + a += uintptr((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnFile) - if !(((*rbu_file)(unsafe.Pointer(p)).FopenFlags & (0x00000100 | 0x00000200)) != 0) { - crt.X__assert_fail(tls, ts+16173 /* "p->openFlags & (..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(4928), uintptr(unsafe.Pointer(&__func__87))) - } - if (eStage == 1) || (eStage == 2) { + if (*ZipfileEntry)(unsafe.Pointer(pEntry)).FaExtra != 0 { + var n int32 = (int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnExtra) + int32((*ZipfileCDS)(unsafe.Pointer(pCDS)).FnComment)) + crt.Xmemcpy(tls, a, (*ZipfileEntry)(unsafe.Pointer(pEntry)).FaExtra, uint64(n)) + a += uintptr(n) } else { - // Release the checkpointer and writer locks - rbuUnlockShm(tls, p) - rc = (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods + 128 /* &.xShmUnmap */))))(tls, (*rbu_file)(unsafe.Pointer(p)).FpReal, delFlag) - } - return rc -} - -var __func__87 = *(*[15]int8)(unsafe.Pointer(ts + 16412 /* "rbuVfsShmUnmap" */)) /* sqlite3rbu.c:4923:60 */ -// Open an rbu file handle. -func rbuVfsOpen(tls *crt.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* sqlite3rbu.c:4942:12: */ - var pRbuVfs uintptr = pVfs - var pRealVfs uintptr = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs - var pFd uintptr = pFile - var rc int32 = 0 - var zOpen uintptr = zName - var oflags int32 = flags - - crt.Xmemset(tls, pFd, 0, uint64(unsafe.Sizeof(rbu_file{}))) - (*rbu_file)(unsafe.Pointer(pFd)).FpReal = (pFd + uintptr(1)*104) - (*rbu_file)(unsafe.Pointer(pFd)).FpRbuVfs = pRbuVfs - (*rbu_file)(unsafe.Pointer(pFd)).FopenFlags = flags - if zName != 0 { - if (flags & 0x00000100) != 0 { - // A main database has just been opened. The following block sets - // (pFd->zWal) to point to a buffer owned by SQLite that contains - // the name of the *-wal file this db connection will use. SQLite - // happens to pass a pointer to this buffer when using xAccess() - // or xOpen() to operate on the *-wal file. - (*rbu_file)(unsafe.Pointer(pFd)).FzWal = sqlite3.Xsqlite3_filename_wal(tls, zName) - } else if (flags & 0x00080000) != 0 { - var pDb uintptr = rbuFindMaindb(tls, pRbuVfs, zName, 0) - if pDb != 0 { - if ((*rbu_file)(unsafe.Pointer(pDb)).FpRbu != 0) && ((*sqlite3rbu)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == 1) { - // This call is to open a *-wal file. Intead, open the *-oal. This - // code ensures that the string passed to xOpen() is terminated by a - // pair of '\0' bytes in case the VFS attempts to extract a URI - // parameter from it. - var zBase uintptr = zName - var nCopy size_t - var zCopy uintptr - if (*sqlite3rbu)(unsafe.Pointer(((*rbu_file)(unsafe.Pointer(pDb)).FpRbu))).FzTarget == uintptr(0) { - zBase = sqlite3.Xsqlite3_db_filename(tls, (*sqlite3rbu)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FdbRbu, ts+354 /* "main" */) - zBase = sqlite3.Xsqlite3_filename_wal(tls, zBase) - } - nCopy = crt.Xstrlen(tls, zBase) - zCopy = sqlite3.Xsqlite3_malloc64(tls, (uint64(nCopy + uint64(2)))) - if zCopy != 0 { - crt.Xmemcpy(tls, zCopy, zBase, nCopy) - *(*int8)(unsafe.Pointer(zCopy + uintptr((nCopy - uint64(3))))) = int8('o') - *(*int8)(unsafe.Pointer(zCopy + uintptr(nCopy))) = int8(0) - *(*int8)(unsafe.Pointer(zCopy + uintptr((nCopy + uint64(1))))) = int8(0) - zOpen = crt.AssignPtrUintptr(pFd+64 /* &.zDel */, zCopy) - } else { - rc = 7 - } - (*rbu_file)(unsafe.Pointer(pFd)).FpRbu = (*rbu_file)(unsafe.Pointer(pDb)).FpRbu - } - (*rbu_file)(unsafe.Pointer(pDb)).FpWalFd = pFd - } + { + zipfilePutU16(tls, a, uint16(0x5455)) + a += uintptr(2) } - } else { - (*rbu_file)(unsafe.Pointer(pFd)).FpRbu = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRbu - } - if ((oflags & 0x00000100) != 0) && - (sqlite3.Xsqlite3_uri_boolean(tls, zName, ts+16427 /* "rbu_memory" */, 0) != 0) { - if !((oflags & 0x00000100) != 0) { - crt.X__assert_fail(tls, ts+16438 /* "oflags & 0x00000..." */, ts+9694 /* "testdata/sqlite-..." */, uint32(5027), uintptr(unsafe.Pointer(&__func__88))) + { + zipfilePutU16(tls, a, uint16(5)) + a += uintptr(2) } - oflags = ((((0x00000200 | 0x00000002) | 0x00000004) | 0x00000010) | 0x00000008) - zOpen = uintptr(0) - } - if rc == 0 { - rc = (*(*func(*crt.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRealVfs + 40 /* &.xOpen */))))(tls, pRealVfs, zOpen, (*rbu_file)(unsafe.Pointer(pFd)).FpReal, oflags, pOutFlags) - } - if (*sqlite3_file)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(pFd)).FpReal)).FpMethods != 0 { - // The xOpen() operation has succeeded. Set the sqlite3_file.pMethods - // pointer and, if the file is a main database file, link it into the - // mutex protected linked list of all such files. - (*sqlite3_file)(unsafe.Pointer(pFile)).FpMethods = uintptr(unsafe.Pointer(&rbuvfs_io_methods)) - if (flags & 0x00000100) != 0 { - rbuMainlistAdd(tls, pFd) + *(*u8)(unsafe.Pointer(crt.PostIncUintptr(&a, 1))) = u8(0x01) + { + zipfilePutU32(tls, a, (*ZipfileEntry)(unsafe.Pointer(pEntry)).FmUnixTime) + a += uintptr(4) } - } else { - sqlite3.Xsqlite3_free(tls, (*rbu_file)(unsafe.Pointer(pFd)).FzDel) } - return rc + return (int32((int64(a) - int64(aBuf)) / 1)) } -var __func__88 = *(*[11]int8)(unsafe.Pointer(ts + 16458 /* "rbuVfsOpen" */)) /* sqlite3rbu.c:4948:2 */ -var rbuvfs_io_methods = sqlite3_io_methods{FiVersion: 2, FxClose: // iVersion -0, FxRead:// xClose -0, FxWrite:// xRead -0, FxTruncate:// xWrite -0, FxSync:// xTruncate -0, FxFileSize:// xSync -0, FxLock:// xFileSize -0, FxUnlock:// xLock -0, FxCheckReservedLock:// xUnlock -0, FxFileControl:// xCheckReservedLock -0, FxSectorSize:// xFileControl -0, FxDeviceCharacteristics:// xSectorSize -0, FxShmMap:// xDeviceCharacteristics -0, FxShmLock:// xShmMap -0, FxShmBarrier:// xShmLock -0, FxShmUnmap:// xShmBarrier -0, FxFetch:// xShmUnmap -uintptr(0), FxUnfetch: uintptr(0), // xFetch, xUnfetch -} /* sqlite3rbu.c:4949:29 */ +func zipfileCommit(tls *crt.TLS, pVtab uintptr) int32 { /* zipfile.c:1785:12: */ + bp := tls.Alloc(24) + defer tls.Free(24) -// Delete the file located at zPath. -func rbuVfsDelete(tls *crt.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* sqlite3rbu.c:5054:12: */ - var pRealVfs uintptr = (*rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs - return (*(*func(*crt.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pRealVfs + 48 /* &.xDelete */))))(tls, pRealVfs, zPath, dirSync) -} + var pTab uintptr = pVtab + var rc int32 = 0 + if (*ZipfileTab)(unsafe.Pointer(pTab)).FpWriteFd != 0 { + var iOffset i64 = (*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent + var p uintptr + // var eocd ZipfileEOCD at bp, 24 -// Test for access permissions. Return true if the requested permission -// is available, or false otherwise. -func rbuVfsAccess(tls *crt.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* sqlite3rbu.c:5063:12: */ - bp := tls.Alloc(8) - defer tls.Free(8) + var nEntry int32 = 0 - var pRbuVfs uintptr = pVfs - var pRealVfs uintptr = (*rbu_vfs)(unsafe.Pointer(pRbuVfs)).FpRealVfs - var rc int32 + // Write out all entries + for p = (*ZipfileTab)(unsafe.Pointer(pTab)).FpFirstEntry; (rc == 0) && (p != 0); p = (*ZipfileEntry)(unsafe.Pointer(p)).FpNext { + var n int32 = zipfileSerializeCDS(tls, p, (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer) + rc = zipfileAppendData(tls, pTab, (*ZipfileTab)(unsafe.Pointer(pTab)).FaBuffer, n) + nEntry++ + } - rc = (*(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRealVfs + 56 /* &.xAccess */))))(tls, pRealVfs, zPath, flags, pResOut) + // Write out the EOCD record + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiDisk = u16(0) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiFirstDisk = u16(0) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntry = u16(nEntry) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntryTotal = u16(nEntry) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnSize = (u32((*ZipfileTab)(unsafe.Pointer(pTab)).FszCurrent - iOffset)) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiOffset = u32(iOffset) + rc = zipfileAppendEOCD(tls, pTab, bp /* &eocd */) - // If this call is to check if a *-wal file associated with an RBU target - // database connection exists, and the RBU update is in RBU_STAGE_OAL, - // the following special handling is activated: - // - // a) if the *-wal file does exist, return SQLITE_CANTOPEN. This - // ensures that the RBU extension never tries to update a database - // in wal mode, even if the first page of the database file has - // been damaged. - // - // b) if the *-wal file does not exist, claim that it does anyway, - // causing SQLite to call xOpen() to open it. This call will also - // be intercepted (see the rbuVfsOpen() function) and the *-oal - // file opened instead. - if (rc == 0) && (flags == 0) { - var pDb uintptr = rbuFindMaindb(tls, pRbuVfs, zPath, 1) - if (pDb != 0) && ((*sqlite3rbu)(unsafe.Pointer((*rbu_file)(unsafe.Pointer(pDb)).FpRbu)).FeStage == 1) { - if !((*rbu_file)(unsafe.Pointer(pDb)).FpRbu != 0) { - crt.X__assert_fail(tls, ts+16469 /* "pDb->pRbu" */, ts+9694 /* "testdata/sqlite-..." */, uint32(5092), uintptr(unsafe.Pointer(&__func__89))) - } - if *(*int32)(unsafe.Pointer(pResOut)) != 0 { - rc = 14 - } else { - *(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)) = int64(0) - rc = rbuVfsFileSize(tls, (pDb /* &.base */), bp /* &sz */) - *(*int32)(unsafe.Pointer(pResOut)) = (crt.Bool32(*(*sqlite3_int64)(unsafe.Pointer(bp /* sz */)) > int64(0))) - } - } + zipfileCleanupTransaction(tls, pTab) } - return rc } -var __func__89 = *(*[13]int8)(unsafe.Pointer(ts + 16479 /* "rbuVfsAccess" */)) /* sqlite3rbu.c:5068:2 */ - -// 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 *crt.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3rbu.c:5111:12: */ - var pRealVfs uintptr = (*rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs - return (*(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRealVfs + 64 /* &.xFullPathname */))))(tls, pRealVfs, zPath, nOut, zOut) +func zipfileRollback(tls *crt.TLS, pVtab uintptr) int32 { /* zipfile.c:1815:12: */ + return zipfileCommit(tls, pVtab) } -// Populate the buffer pointed to by zBufOut with nByte bytes of -// random data. -func rbuVfsRandomness(tls *crt.TLS, pVfs uintptr, nByte int32, zBufOut uintptr) int32 { /* sqlite3rbu.c:5165:12: */ - var pRealVfs uintptr = (*rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs - return (*(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer((pRealVfs + 104 /* &.xRandomness */))))(tls, pRealVfs, nByte, zBufOut) +func zipfileFindCursor(tls *crt.TLS, pTab uintptr, iId i64) uintptr { /* zipfile.c:1819:19: */ + var pCsr uintptr + for pCsr = (*ZipfileTab)(unsafe.Pointer(pTab)).FpCsrList; pCsr != 0; pCsr = (*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCsrNext { + if iId == (*ZipfileCsr)(unsafe.Pointer(pCsr)).FiId { + break + } + } + return pCsr } -// Sleep for nMicro microseconds. Return the number of microseconds -// actually slept. -func rbuVfsSleep(tls *crt.TLS, pVfs uintptr, nMicro int32) int32 { /* sqlite3rbu.c:5174:12: */ - var pRealVfs uintptr = (*rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs - return (*(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer((pRealVfs + 112 /* &.xSleep */))))(tls, pRealVfs, nMicro) -} +func zipfileFunctionCds(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* zipfile.c:1827:13: */ + bp := tls.Alloc(128) + defer tls.Free(128) -// Return the current time as a Julian Day number in *pTimeOut. -func rbuVfsCurrentTime(tls *crt.TLS, pVfs uintptr, pTimeOut uintptr) int32 { /* sqlite3rbu.c:5182:12: */ - var pRealVfs uintptr = (*rbu_vfs)(unsafe.Pointer(pVfs)).FpRealVfs - return (*(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pRealVfs + 120 /* &.xCurrentTime */))))(tls, pRealVfs, pTimeOut) + var pCsr uintptr + var pTab uintptr = sqlite3.Xsqlite3_user_data(tls, context) + + pCsr = zipfileFindCursor(tls, pTab, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)))) + if pCsr != 0 { + var p uintptr = ((*ZipfileCsr)(unsafe.Pointer(pCsr)).FpCurrent /* &.cds */) + var zRes uintptr = sqlite3.Xsqlite3_mprintf(tls, + + ts+8136, /* "{\"version-made-b..." */ + crt.VaList(bp, u32((*ZipfileCDS)(unsafe.Pointer(p)).FiVersionMadeBy), u32((*ZipfileCDS)(unsafe.Pointer(p)).FiVersionExtract), + u32((*ZipfileCDS)(unsafe.Pointer(p)).Fflags), u32((*ZipfileCDS)(unsafe.Pointer(p)).FiCompression), + u32((*ZipfileCDS)(unsafe.Pointer(p)).FmTime), u32((*ZipfileCDS)(unsafe.Pointer(p)).FmDate), + (*ZipfileCDS)(unsafe.Pointer(p)).Fcrc32, (*ZipfileCDS)(unsafe.Pointer(p)).FszCompressed, + (*ZipfileCDS)(unsafe.Pointer(p)).FszUncompressed, u32((*ZipfileCDS)(unsafe.Pointer(p)).FnFile), + u32((*ZipfileCDS)(unsafe.Pointer(p)).FnExtra), u32((*ZipfileCDS)(unsafe.Pointer(p)).FnComment), + u32((*ZipfileCDS)(unsafe.Pointer(p)).FiDiskStart), u32((*ZipfileCDS)(unsafe.Pointer(p)).FiInternalAttr), + (*ZipfileCDS)(unsafe.Pointer(p)).FiExternalAttr, (*ZipfileCDS)(unsafe.Pointer(p)).FiOffset)) + + if zRes == uintptr(0) { + sqlite3.Xsqlite3_result_error_nomem(tls, context) + } else { + sqlite3.Xsqlite3_result_text(tls, context, zRes, -1, crt.UintptrFromInt32(-1)) + sqlite3.Xsqlite3_free(tls, zRes) + } + } } -// No-op. -func rbuVfsGetLastError(tls *crt.TLS, pVfs uintptr, a int32, b uintptr) int32 { /* sqlite3rbu.c:5190:12: */ +// xFindFunction method. +func zipfileFindFunction(tls *crt.TLS, pVtab uintptr, nArg int32, zName uintptr, pxFunc uintptr, ppArg uintptr) int32 { /* zipfile.c:1878:12: */ + if sqlite3.Xsqlite3_stricmp(tls, ts+8478 /* "zipfile_cds" */, zName) == 0 { + *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr) + }{zipfileFunctionCds})) + *(*uintptr)(unsafe.Pointer(ppArg)) = pVtab + return 1 + } return 0 } -// Deregister and destroy an RBU vfs created by an earlier call to -// sqlite3rbu_create_vfs(). -func sqlite3rbu_destroy_vfs(tls *crt.TLS, zName uintptr) { /* sqlite3rbu.c:5198:6: */ - var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, zName) - if (pVfs != 0) && ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FxOpen == *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 - }{rbuVfsOpen}))) { - sqlite3.Xsqlite3_mutex_free(tls, (*rbu_vfs)(unsafe.Pointer(pVfs)).Fmutex) - sqlite3.Xsqlite3_vfs_unregister(tls, pVfs) - sqlite3.Xsqlite3_free(tls, pVfs) - } +type ZipfileBuffer1 = struct { + Fa uintptr + Fn int32 + FnAlloc int32 } -// 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 sqlite3rbu_create_vfs(tls *crt.TLS, zName uintptr, zParent uintptr) int32 { /* sqlite3rbu.c:5212:5: */ +type ZipfileBuffer = ZipfileBuffer1 /* zipfile.c:1893:30 */ - var pNew uintptr = uintptr(0) // Newly allocated VFS - var rc int32 = 0 - var nName size_t - var nByte size_t +type ZipfileCtx1 = struct { + FnEntry int32 + Fbody ZipfileBuffer + Fcds ZipfileBuffer +} - nName = crt.Xstrlen(tls, zName) - nByte = ((uint64(unsafe.Sizeof(rbu_vfs{})) + nName) + uint64(1)) - pNew = sqlite3.Xsqlite3_malloc64(tls, uint64(nByte)) - if pNew == uintptr(0) { - rc = 7 - } else { - var pParent uintptr // Parent VFS - crt.Xmemset(tls, pNew, 0, nByte) - pParent = sqlite3.Xsqlite3_vfs_find(tls, zParent) - if pParent == uintptr(0) { - rc = 12 +type ZipfileCtx = ZipfileCtx1 /* zipfile.c:1900:27 */ + +func zipfileBufferGrow(tls *crt.TLS, pBuf uintptr, nByte int32) int32 { /* zipfile.c:1907:12: */ + if ((*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fn + nByte) > (*ZipfileBuffer)(unsafe.Pointer(pBuf)).FnAlloc { + var aNew uintptr + var nNew sqlite3_int64 + if (*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fn != 0 { + nNew = (int64((*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fn * 2)) } else { - var zSpace uintptr - crt.Xmemcpy(tls, (pNew /* &.base */), uintptr(unsafe.Pointer(&vfs_template)), uint64(unsafe.Sizeof(sqlite3_vfs{}))) - (*rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FmxPathname = (*sqlite3_vfs)(unsafe.Pointer(pParent)).FmxPathname - (*rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FszOsFile = (int32(uint64(unsafe.Sizeof(rbu_file{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile))) - (*rbu_vfs)(unsafe.Pointer(pNew)).FpRealVfs = pParent - (*rbu_vfs)(unsafe.Pointer(pNew)).Fbase.FzName = crt.AssignUintptr(&zSpace, (pNew + uintptr(1)*208)) - crt.Xmemcpy(tls, zSpace, zName, nName) - - // Allocate the mutex and register the new VFS (not as the default) - (*rbu_vfs)(unsafe.Pointer(pNew)).Fmutex = sqlite3.Xsqlite3_mutex_alloc(tls, 1) - if (*rbu_vfs)(unsafe.Pointer(pNew)).Fmutex == uintptr(0) { - rc = 7 - } else { - rc = sqlite3.Xsqlite3_vfs_register(tls, (pNew /* &.base */), 0) - } + nNew = int64(512) } + var nReq int32 = ((*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fn + nByte) - if rc != 0 { - sqlite3.Xsqlite3_mutex_free(tls, (*rbu_vfs)(unsafe.Pointer(pNew)).Fmutex) - sqlite3.Xsqlite3_free(tls, pNew) + for nNew < sqlite3_int64(nReq) { + nNew = (nNew * int64(2)) + } + aNew = sqlite3.Xsqlite3_realloc64(tls, (*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fa, uint64(nNew)) + if aNew == uintptr(0) { + return 7 } + (*ZipfileBuffer)(unsafe.Pointer(pBuf)).Fa = aNew + (*ZipfileBuffer)(unsafe.Pointer(pBuf)).FnAlloc = int32(nNew) } - - return rc + return 0 } -var vfs_template = sqlite3_vfs{FiVersion: 1, FszOsFile: // iVersion -0, FmxPathname:// szOsFile -0, FpNext:// mxPathname -uintptr(0), FzName:// pNext -uintptr(0), FpAppData:// zName -uintptr(0), FxOpen:// pAppData -0, FxDelete:// xOpen -0, FxAccess:// xDelete -0, FxFullPathname:// xAccess -0, FxDlOpen:// xFullPathname +// xStep() callback for the zipfile() aggregate. This can be called in +// any of the following ways: +// +// SELECT zipfile(name,data) ... +// SELECT zipfile(name,mode,mtime,data) ... +// SELECT zipfile(name,mode,mtime,data,method) ... +func zipfileStep(tls *crt.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* zipfile.c:1930:6: */ + bp := tls.Alloc(168) + defer tls.Free(168) -uintptr(0), FxDlError: uintptr(0), FxDlSym: uintptr(0), FxDlClose: uintptr(0), FxRandomness: 0, FxSleep: // xRandomness -0, FxCurrentTime:// xSleep -0, FxGetLastError:// xCurrentTime -0, FxCurrentTimeInt64:// xGetLastError -uintptr(0), FxSetSystemCall:// xCurrentTimeInt64 (version 2) -uintptr(0), FxGetSystemCall: uintptr(0), FxNextSystemCall: uintptr(0), // Unimplemented version 3 methods -} /* sqlite3rbu.c:5215:22 */ + var p uintptr // Aggregate function context + // var e ZipfileEntry at bp+16, 120 + // New entry to add to zip archive -// Configure the aggregate temp file size limit for this RBU handle. -func sqlite3rbu_temp_size_limit(tls *crt.TLS, pRbu uintptr, n sqlite3_int64) sqlite3_int64 { /* sqlite3rbu.c:5290:15: */ - if n >= int64(0) { - (*sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit = n - } - return (*sqlite3rbu)(unsafe.Pointer(pRbu)).FszTempLimit -} + var pName uintptr + var pMode uintptr + var pMtime uintptr + var pData uintptr + var pMethod uintptr + var bIsDir int32 + // var mode u32 at bp+160, 8 -func sqlite3rbu_temp_size(tls *crt.TLS, pRbu uintptr) sqlite3_int64 { /* sqlite3rbu.c:5297:15: */ - return (*sqlite3rbu)(unsafe.Pointer(pRbu)).FszTemp -} + var rc int32 + // var zErr uintptr at bp+152, 8 -//************************************************************************ + var iMethod int32 // Compression method to use (0 or 8) -func test_rbu_delta(tls *crt.TLS, pCtx uintptr, nArg int32, apVal uintptr) { /* test_rbu.c:34:6: */ - var interp uintptr = sqlite3.Xsqlite3_user_data(tls, pCtx) - var pScript uintptr - var i int32 + var aData uintptr // Possibly compressed data for new entry + var nData int32 // Size of aData[] in bytes + var szUncompressed int32 // Size of data before compression + // var aFree uintptr at bp+136, 8 + // Free this before returning + var iCrc32 u32 // crc32 of uncompressed data - pScript = tcl.XTcl_NewObj(tls) - (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ - tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, tcl.XTcl_NewStringObj(tls, ts+16492 /* "rbu_delta" */, -1)) - for i = 0; i < nArg; i++ { - var pIn uintptr = *(*uintptr)(unsafe.Pointer(apVal + uintptr(i)*8)) - var z uintptr = sqlite3.Xsqlite3_value_text(tls, pIn) - tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pScript, tcl.XTcl_NewStringObj(tls, z, -1)) + var zName uintptr // Path (name) of new entry + var nName int32 // Size of zName in bytes + var zFree uintptr // Free this before returning + var nByte int32 + // var nOut int32 at bp+144, 4 + pName = uintptr(0) + pMode = uintptr(0) + pMtime = uintptr(0) + pData = uintptr(0) + pMethod = uintptr(0) + bIsDir = 0 + rc = 0 + *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) = uintptr(0) + iMethod = -1 + aData = uintptr(0) + nData = 0 + szUncompressed = 0 + *(*uintptr)(unsafe.Pointer(bp + 136 /* aFree */)) = uintptr(0) + iCrc32 = uint64(0) + zName = uintptr(0) + nName = 0 + zFree = uintptr(0) + + crt.Xmemset(tls, bp+16 /* &e */, 0, uint64(unsafe.Sizeof(ZipfileEntry{}))) + p = sqlite3.Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(ZipfileCtx{}))) + if !(p == uintptr(0)) { + goto __1 } + return +__1: + ; - if 0 == tcl.XTcl_EvalObjEx(tls, interp, pScript, 1) { - var z uintptr = tcl.XTcl_GetStringResult(tls, interp) - sqlite3.Xsqlite3_result_text(tls, pCtx, z, -1, crt.UintptrFromInt32(-1)) - } else { - tcl.XTcl_BackgroundError(tls, interp) + // Martial the arguments into stack variables + if !(((nVal != 2) && (nVal != 4)) && (nVal != 5)) { + goto __2 } - - for ok := true; ok; ok = 0 != 0 { - var _objPtr uintptr = pScript - if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { - tcl.XTclFreeObj(tls, _objPtr) - } + *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) = sqlite3.Xsqlite3_mprintf(tls, ts+8490 /* "wrong number of ..." */, 0) + rc = 1 + goto zipfile_step_out +__2: + ; + pName = *(*uintptr)(unsafe.Pointer(apVal + uintptr(0)*8)) + if !(nVal == 2) { + goto __3 } -} + pData = *(*uintptr)(unsafe.Pointer(apVal + uintptr(1)*8)) + goto __4 +__3: + pMode = *(*uintptr)(unsafe.Pointer(apVal + uintptr(1)*8)) + pMtime = *(*uintptr)(unsafe.Pointer(apVal + uintptr(2)*8)) + pData = *(*uintptr)(unsafe.Pointer(apVal + uintptr(3)*8)) + if !(nVal == 5) { + goto __5 + } + pMethod = *(*uintptr)(unsafe.Pointer(apVal + uintptr(4)*8)) +__5: + ; +__4: + ; -func test_sqlite3rbu_cmd(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:59:26: */ - bp := tls.Alloc(496) - defer tls.Free(496) + // Check that the 'name' parameter looks ok. + zName = sqlite3.Xsqlite3_value_text(tls, pName) + nName = sqlite3.Xsqlite3_value_bytes(tls, pName) + if !(zName == uintptr(0)) { + goto __6 + } + *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) = sqlite3.Xsqlite3_mprintf(tls, ts+8538 /* "first argument t..." */, 0) + rc = 1 + goto zipfile_step_out +__6: + ; - var ret int32 = 0 - var pRbu uintptr = clientData - *(*[14]RbuCmd)(unsafe.Pointer(bp + 24 /* aCmd */)) = [14]RbuCmd{ - {FzName: ts + 16502 /* "step" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 0 - {FzName: ts + 16507 /* "close" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 1 - {FzName: ts + 16513 /* "create_rbu_delta" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 2 - {FzName: ts + 16530 /* "savestate" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 3 - {FzName: ts + 16540 /* "dbMain_eval" */, FnArg: 3, FzUsage: ts + 16552 /* "SQL" */}, // 4 - {FzName: ts + 16556 /* "bp_progress" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 5 - {FzName: ts + 16568 /* "db" */, FnArg: 3, FzUsage: ts + 16571 /* "RBU" */}, // 6 - {FzName: ts + 16575 /* "state" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 7 - {FzName: ts + 16581 /* "progress" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 8 - {FzName: ts + 16590 /* "close_no_error" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 9 - {FzName: ts + 16605 /* "temp_size_limit" */, FnArg: 3, FzUsage: ts + 16621 /* "LIMIT" */}, // 10 - {FzName: ts + 16627 /* "temp_size" */, FnArg: 2, FzUsage: ts + 792 /* "" */}, // 11 - {FzName: ts + 16637 /* "dbRbu_eval" */, FnArg: 3, FzUsage: ts + 16552 /* "SQL" */}, // 12 - {FzName: uintptr(0), FnArg: 0, FzUsage: uintptr(0)}, - } - // var iCmd int32 at bp+360, 4 + // Inspect the 'method' parameter. This must be either 0 (store), 8 (use + // deflate compression) or NULL (choose automatically). + if !((pMethod != 0) && (5 != sqlite3.Xsqlite3_value_type(tls, pMethod))) { + goto __7 + } + iMethod = int32(sqlite3.Xsqlite3_value_int64(tls, pMethod)) + if !((iMethod != 0) && (iMethod != 8)) { + goto __8 + } + *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) = sqlite3.Xsqlite3_mprintf(tls, ts+8583 /* "illegal method v..." */, crt.VaList(bp, iMethod)) + rc = 1 + goto zipfile_step_out +__8: + ; +__7: + ; - if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16648 /* "METHOD" */) - return 1 + // Now inspect the data. If this is NULL, then the new entry must be a + // directory. Otherwise, figure out whether or not the data should + // be deflated or simply stored in the zip archive. + if !(sqlite3.Xsqlite3_value_type(tls, pData) == 5) { + goto __9 } - ret = tcl.XTcl_GetIndexFromObjStruct(tls, - interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+24 /* &aCmd[0] */, int32(unsafe.Sizeof(RbuCmd{})), ts+16655 /* "method" */, 0, bp+360 /* &iCmd */) - if ret != 0 { - return 1 + bIsDir = 1 + iMethod = 0 + goto __10 +__9: + aData = sqlite3.Xsqlite3_value_blob(tls, pData) + szUncompressed = crt.AssignInt32(&nData, sqlite3.Xsqlite3_value_bytes(tls, pData)) + iCrc32 = tcl.Xcrc32(tls, uint64(0), aData, uint32(nData)) + if !((iMethod < 0) || (iMethod == 8)) { + goto __11 } - if objc != (*RbuCmd)(unsafe.Pointer(bp+24 /* &aCmd */ +uintptr(*(*int32)(unsafe.Pointer(bp + 360 /* iCmd */)))*24)).FnArg { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, (*RbuCmd)(unsafe.Pointer(bp+24 /* &aCmd */ +uintptr(*(*int32)(unsafe.Pointer(bp + 360 /* iCmd */)))*24)).FzUsage) - return 1 + *(*int32)(unsafe.Pointer(bp + 144 /* nOut */)) = 0 + rc = zipfileDeflate(tls, aData, nData, bp+136 /* &aFree */, bp+144 /* &nOut */, bp+152 /* &zErr */) + if !(rc != 0) { + goto __12 } - - switch *(*int32)(unsafe.Pointer(bp + 360 /* iCmd */)) { - case 0: /* step */ - { - var rc int32 = sqlite3rbu_step(tls, pRbu) - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) - break - } - - case 9: - fallthrough /* close_no_error */ - case 1: /* close */ - { - *(*uintptr)(unsafe.Pointer(bp + 368 /* zErrmsg */)) = uintptr(0) - var rc int32 - tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)))) - if *(*int32)(unsafe.Pointer(bp + 360 /* iCmd */)) == 1 { - rc = sqlite3rbu_close(tls, pRbu, bp+368 /* &zErrmsg */) - } else { - rc = sqlite3rbu_close(tls, pRbu, uintptr(0)) - } - if (rc == 0) || (rc == 101) { - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) - if !(*(*uintptr)(unsafe.Pointer(bp + 368 /* zErrmsg */)) == uintptr(0)) { - crt.X__assert_fail(tls, ts+16662 /* "zErrmsg==0" */, ts+16673 /* "testdata/sqlite-..." */, uint32(121), uintptr(unsafe.Pointer(&__func__90))) - } - } else { - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) - if *(*uintptr)(unsafe.Pointer(bp + 368 /* zErrmsg */)) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+16720 /* " - " */, *(*uintptr)(unsafe.Pointer(bp + 368 /* zErrmsg */)), 0)) - sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 368 /* zErrmsg */))) - } - ret = 1 - } - break - } - - case 2: /* create_rbu_delta */ - { - var db uintptr = sqlite3rbu_db(tls, pRbu, 0) - var rc int32 = sqlite3.Xsqlite3_create_function(tls, - db, ts+16492 /* "rbu_delta" */, -1, 1, interp, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32, uintptr) - }{test_rbu_delta})), uintptr(0), uintptr(0)) - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) - ret = func() int32 { - if rc == 0 { - return 0 - } - return 1 - }() - break - } - - case 3: /* savestate */ - { - var rc int32 = sqlite3rbu_savestate(tls, pRbu) - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) - ret = func() int32 { - if rc == 0 { - return 0 - } - return 1 - }() - break - } - - case 12: - fallthrough /* dbRbu_eval */ - case 4: /* dbMain_eval */ - { - var db uintptr = sqlite3rbu_db(tls, pRbu, (crt.Bool32(*(*int32)(unsafe.Pointer(bp + 360 /* iCmd */)) == 12))) - var rc int32 = sqlite3.Xsqlite3_exec(tls, db, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), uintptr(0), uintptr(0), uintptr(0)) - if rc != 0 { - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_errmsg(tls, db), -1)) - ret = 1 - } - break - } - - case 5: /* bp_progress */ - { - // var one int32 at bp+376, 4 - - // var two int32 at bp+380, 4 - - var pObj uintptr - sqlite3rbu_bp_progress(tls, pRbu, bp+376 /* &one */, bp+380 /* &two */) - - pObj = tcl.XTcl_NewObj(tls) - tcl.XTcl_ListObjAppendElement(tls, interp, pObj, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 376 /* one */)))) - tcl.XTcl_ListObjAppendElement(tls, interp, pObj, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 380 /* two */)))) - tcl.XTcl_SetObjResult(tls, interp, pObj) - break - } - - case 6: /* db */ - { - // var bArg int32 at bp+384, 4 - - if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+384 /* &bArg */) != 0 { - ret = 1 - } else { - // var zBuf [50]int8 at bp+388, 50 - - var db uintptr = sqlite3rbu_db(tls, pRbu, *(*int32)(unsafe.Pointer(bp + 384 /* bArg */))) - if sqlite3TestMakePointerStr(tls, interp, bp+388 /* &zBuf[0] */, db) != 0 { - ret = 1 - } else { - tcl.XTcl_SetResult(tls, interp, bp+388 /* &zBuf[0] */, uintptr(1)) - } - } - break - } - case 7: /* state */ - { - *(*[6]uintptr)(unsafe.Pointer(bp + 440 /* aRes */)) = [6]uintptr{uintptr(0), ts + 16724 /* "oal" */, ts + 16728 /* "move" */, ts + 16733 /* "checkpoint" */, ts + 16744 /* "done" */, ts + 16749 /* "error" */} - var eState int32 = sqlite3rbu_state(tls, pRbu) - if !((eState > 0) && (eState <= 5)) { - crt.X__assert_fail(tls, ts+16755 /* "eState>0 && eSta..." */, ts+16673 /* "testdata/sqlite-..." */, uint32(191), uintptr(unsafe.Pointer(&__func__90))) - } - tcl.XTcl_SetResult(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 440 /* &aRes[0] */ + uintptr(eState)*8)), uintptr(0)) - break - } - case 8: /* progress */ - { - var nStep sqlite3_int64 = sqlite3rbu_progress(tls, pRbu) - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(nStep))) - break - } - - case 10: /* temp_size_limit */ - { - // var nLimit sqlite3_int64 at bp+488, 8 - - if tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+488 /* &nLimit */) != 0 { - ret = 1 - } else { - *(*sqlite3_int64)(unsafe.Pointer(bp + 488 /* nLimit */)) = sqlite3rbu_temp_size_limit(tls, pRbu, *(*sqlite3_int64)(unsafe.Pointer(bp + 488 /* nLimit */))) - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(*(*sqlite3_int64)(unsafe.Pointer(bp + 488 /* nLimit */))))) - } - break - } - case 11: /* temp_size */ - { - var sz sqlite3_int64 = sqlite3rbu_temp_size(tls, pRbu) - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewWideIntObj(tls, int64(sz))) - break - } - - default: // seems unlikely - if !(!(1 != 0)) { - crt.X__assert_fail(tls, ts+16777 /* "!\"cannot happen\"" */, ts+16673 /* "testdata/sqlite-..." */, uint32(218), uintptr(unsafe.Pointer(&__func__90))) - } - break + goto zipfile_step_out +__12: + ; + if !((iMethod == 8) || (*(*int32)(unsafe.Pointer(bp + 144 /* nOut */)) < nData)) { + goto __13 } + aData = *(*uintptr)(unsafe.Pointer(bp + 136 /* aFree */)) + nData = *(*int32)(unsafe.Pointer(bp + 144 /* nOut */)) + iMethod = 8 + goto __14 +__13: + iMethod = 0 +__14: + ; +__11: + ; +__10: + ; - return ret -} + // Decode the "mode" argument. + rc = zipfileGetMode(tls, pMode, bIsDir, bp+160 /* &mode */, bp+152 /* &zErr */) + if !(rc != 0) { + goto __15 + } + goto zipfile_step_out +__15: + ; -type RbuCmd = struct { - FzName uintptr - FnArg int32 - FzUsage uintptr -} + // Decode the "mtime" argument. + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).FmUnixTime = zipfileGetTime(tls, pMtime) -var __func__90 = *(*[20]int8)(unsafe.Pointer(ts + 16794 /* "test_sqlite3rbu_..." */)) /* test_rbu.c:64:2 */ + // If this is a directory entry, ensure that there is exactly one '/' + // at the end of the path. Or, if this is not a directory and the path + // ends in '/' it is an error. + if !(bIsDir == 0) { + goto __16 + } + if !((nName > 0) && (int32(*(*int8)(unsafe.Pointer(zName + uintptr((nName - 1))))) == '/')) { + goto __18 + } + *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) = sqlite3.Xsqlite3_mprintf(tls, ts+8608 /* "non-directory na..." */, 0) + rc = 1 + goto zipfile_step_out +__18: + ; + goto __17 +__16: + if !((nName == 0) || (int32(*(*int8)(unsafe.Pointer(zName + uintptr((nName - 1))))) != '/')) { + goto __19 + } + zName = crt.AssignUintptr(&zFree, sqlite3.Xsqlite3_mprintf(tls, ts+8111 /* "%s/" */, crt.VaList(bp+8, zName))) + if !(zName == uintptr(0)) { + goto __21 + } + rc = 7 + goto zipfile_step_out +__21: + ; + nName = int32(crt.Xstrlen(tls, zName)) + goto __20 +__19: +__22: + if !((nName > 1) && (int32(*(*int8)(unsafe.Pointer(zName + uintptr((nName - 2))))) == '/')) { + goto __23 + } + nName-- + goto __22 +__23: + ; +__20: + ; +__17: + ; -// Tclcmd: sqlite3rbu CMD <target-db> <rbu-db> ?<state-db>? -func test_sqlite3rbu(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:228:26: */ - var pRbu uintptr = uintptr(0) - var zCmd uintptr - var zTarget uintptr - var zRbu uintptr - var zStateDb uintptr = uintptr(0) + // Assemble the ZipfileEntry object for the new zip archive entry + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FiVersionMadeBy = (u16((int32(3) << 8) + 30)) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FiVersionExtract = u16(20) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.Fflags = u16(0x800) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FiCompression = u16(iMethod) + zipfileMtimeToDos(tls, (bp + 16 /* &e */ /* &.cds */), (*ZipfileEntry)(unsafe.Pointer(bp+16 /* &e */)).FmUnixTime) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.Fcrc32 = iCrc32 + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FszCompressed = u32(nData) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FszUncompressed = u32(szUncompressed) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FiExternalAttr = (*(*u32)(unsafe.Pointer(bp + 160 /* mode */)) << 16) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FiOffset = u32((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FnFile = u16(nName) + (*ZipfileEntry)(unsafe.Pointer(bp + 16 /* &e */)).Fcds.FzFile = zName + + // Append the LFH to the body of the new archive + nByte = ((30 + int32((*ZipfileEntry)(unsafe.Pointer(bp+16 /* &e */)).Fcds.FnFile)) + 9) + if !(crt.AssignInt32(&rc, zipfileBufferGrow(tls, (p+8 /* &.body */), nByte)) != 0) { + goto __24 + } + goto zipfile_step_out +__24: + ; + *(*int32)(unsafe.Pointer(p + 8 /* &.body */ + 8 /* &.n */)) += (zipfileSerializeLFH(tls, bp+16 /* &e */, ((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fa + uintptr((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn)))) - if (objc != 4) && (objc != 5) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16814 /* "NAME TARGET-DB R..." */) - return 1 + // Append the data to the body of the new archive + if !(nData > 0) { + goto __25 } - zCmd = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) - zTarget = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - zRbu = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) - if objc == 5 { - zStateDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8))) + if !(crt.AssignInt32(&rc, zipfileBufferGrow(tls, (p+8 /* &.body */), nData)) != 0) { + goto __26 } + goto zipfile_step_out +__26: + ; + crt.Xmemcpy(tls, ((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fa + uintptr((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn)), aData, uint64(nData)) + *(*int32)(unsafe.Pointer(p + 8 /* &.body */ + 8 /* &.n */)) += (nData) +__25: + ; - pRbu = sqlite3rbu_open(tls, zTarget, zRbu, zStateDb) - tcl.XTcl_CreateObjCommand(tls, interp, zCmd, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 - }{test_sqlite3rbu_cmd})), pRbu, uintptr(0)) - tcl.XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) - return 0 -} + // Append the CDS record to the directory of the new archive + nByte = ((46 + int32((*ZipfileEntry)(unsafe.Pointer(bp+16 /* &e */)).Fcds.FnFile)) + 9) + if !(crt.AssignInt32(&rc, zipfileBufferGrow(tls, (p+24 /* &.cds */), nByte)) != 0) { + goto __27 + } + goto zipfile_step_out +__27: + ; + *(*int32)(unsafe.Pointer(p + 24 /* &.cds */ + 8 /* &.n */)) += (zipfileSerializeCDS(tls, bp+16 /* &e */, ((*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fa + uintptr((*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn)))) -// Tclcmd: sqlite3rbu_vacuum CMD <target-db> <state-db> -func test_sqlite3rbu_vacuum(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:258:26: */ - var pRbu uintptr = uintptr(0) - var zCmd uintptr - var zTarget uintptr - var zStateDb uintptr = uintptr(0) + // Increment the count of entries in the archive + (*ZipfileCtx)(unsafe.Pointer(p)).FnEntry++ - if (objc != 3) && (objc != 4) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16847 /* "NAME TARGET-DB ?..." */) - return 1 - } - zCmd = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) - zTarget = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - if objc == 4 { - zStateDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) +zipfile_step_out: + sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 136 /* aFree */))) + sqlite3.Xsqlite3_free(tls, zFree) + if !(rc != 0) { + goto __28 } - if (zStateDb != 0) && (int32(*(*int8)(unsafe.Pointer(zStateDb + uintptr(0)))) == 0) { - zStateDb = uintptr(0) + if !(*(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)) != 0) { + goto __29 } - - pRbu = sqlite3rbu_vacuum(tls, zTarget, zStateDb) - tcl.XTcl_CreateObjCommand(tls, interp, zCmd, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 - }{test_sqlite3rbu_cmd})), pRbu, uintptr(0)) - tcl.XTcl_SetObjResult(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) - return 0 + sqlite3.Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */)), -1) + goto __30 +__29: + sqlite3.Xsqlite3_result_error_code(tls, pCtx, rc) +__30: + ; +__28: + ; + sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 152 /* zErr */))) } -// Tclcmd: sqlite3rbu_create_vfs ?-default? NAME PARENT -func test_sqlite3rbu_create_vfs(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:287:26: */ - var zName uintptr - var zParent uintptr - var rc int32 +// xFinalize() callback for zipfile aggregate function. +func zipfileFinal(tls *crt.TLS, pCtx uintptr) { /* zipfile.c:2105:6: */ + bp := tls.Alloc(24) + defer tls.Free(24) - if (objc != 3) && (objc != 4) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16873 /* "?-default? NAME ..." */) - return 1 - } + var p uintptr + // var eocd ZipfileEOCD at bp, 24 - zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8))) - zParent = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8))) - if int32(*(*int8)(unsafe.Pointer(zParent + uintptr(0)))) == 0 { - zParent = uintptr(0) + var nZip sqlite3_int64 + var aZip uintptr + + p = sqlite3.Xsqlite3_aggregate_context(tls, pCtx, int32(unsafe.Sizeof(ZipfileCtx{}))) + if p == uintptr(0) { + return } + if (*ZipfileCtx)(unsafe.Pointer(p)).FnEntry > 0 { + crt.Xmemset(tls, bp /* &eocd */, 0, uint64(unsafe.Sizeof(ZipfileEOCD{}))) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntry = u16((*ZipfileCtx)(unsafe.Pointer(p)).FnEntry) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnEntryTotal = u16((*ZipfileCtx)(unsafe.Pointer(p)).FnEntry) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FnSize = u32((*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn) + (*ZipfileEOCD)(unsafe.Pointer(bp /* &eocd */)).FiOffset = u32((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn) - rc = sqlite3rbu_create_vfs(tls, zName, zParent) - if rc != 0 { - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3ErrName(tls, rc), -1)) - return 1 - } else if objc == 4 { - var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, zName) - sqlite3.Xsqlite3_vfs_register(tls, pVfs, 1) + nZip = (sqlite3_int64(((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn + (*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn) + 22)) + aZip = sqlite3.Xsqlite3_malloc64(tls, uint64(nZip)) + if aZip == uintptr(0) { + sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) + } else { + crt.Xmemcpy(tls, aZip, (*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fa, uint64((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn)) + crt.Xmemcpy(tls, (aZip + uintptr((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn)), (*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fa, uint64((*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn)) + zipfileSerializeEOCD(tls, bp /* &eocd */, (aZip + uintptr(((*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fn + (*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fn)))) + sqlite3.Xsqlite3_result_blob(tls, pCtx, aZip, int32(nZip), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{zipfileFree}))) + } } - tcl.XTcl_ResetResult(tls, interp) - return 0 + sqlite3.Xsqlite3_free(tls, (*ZipfileCtx)(unsafe.Pointer(p)).Fbody.Fa) + sqlite3.Xsqlite3_free(tls, (*ZipfileCtx)(unsafe.Pointer(p)).Fcds.Fa) } -// Tclcmd: sqlite3rbu_destroy_vfs NAME -func test_sqlite3rbu_destroy_vfs(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:322:26: */ - var zName uintptr +// Register the "zipfile" virtual table. +func zipfileRegister(tls *crt.TLS, db uintptr) int32 { /* zipfile.c:2140:12: */ - if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16896 /* "NAME" */) - return 1 + var rc int32 = sqlite3.Xsqlite3_create_module(tls, db, ts+7549 /* "zipfile" */, uintptr(unsafe.Pointer(&zipfileModule)), uintptr(0)) + if rc == 0 { + rc = sqlite3.Xsqlite3_overload_function(tls, db, ts+8478 /* "zipfile_cds" */, -1) } - - zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) - sqlite3rbu_destroy_vfs(tls, zName) - return 0 + if rc == 0 { + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+7549 /* "zipfile" */, -1, 1, uintptr(0), uintptr(0), + *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr) + }{zipfileStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{zipfileFinal}))) + } + return rc } -// Tclcmd: sqlite3rbu_internal_test -func test_sqlite3rbu_internal_test(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_rbu.c:343:26: */ - bp := tls.Alloc(16) - defer tls.Free(16) +var zipfileModule = sqlite3_module{FiVersion: 1, FxCreate: // iVersion +0, FxConnect:// xCreate +0, FxBestIndex:// xConnect +0, FxDisconnect:// xBestIndex +0, FxDestroy:// xDisconnect +0, FxOpen:// xDestroy +0, FxClose:// xOpen - open a cursor +0, FxFilter:// xClose - close a cursor +0, FxNext:// xFilter - configure scan constraints +0, FxEof:// xNext - advance a cursor +0, FxColumn:// xEof - check for end of scan +0, FxRowid:// xColumn - read data +uintptr(0), FxUpdate:// xRowid - read data +0, FxBegin:// xUpdate +0, FxSync:// xBegin +uintptr(0), FxCommit:// xSync +0, FxRollback:// xCommit +0, FxFindFunction:// xRollback +0, FxRename:// xFindMethod +uintptr(0), // xRename +} /* zipfile.c:2141:25 */ - var db uintptr +func sqlite3_zipfile_init(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* zipfile.c:2180:5: */ + _ = pApi - if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) - return 1 - } + _ = pzErrMsg // Unused parameter + return zipfileRegister(tls, db) +} - db = sqlite3rbu_db(tls, uintptr(0), 0) - if db != uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+16901 /* "sqlite3rbu_db(0,..." */, 0)) - return 1 - } +// +// END OF REGISTRATION API +// - return 0 -} +//******* End of fts5.h ******** -func SqliteRbu_Init(tls *crt.TLS, interp uintptr) int32 { /* test_rbu.c:365:5: */ - var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd)) / uint64(unsafe.Sizeof(struct { - FzName uintptr - FxProc uintptr - }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd[i].FzName, aObjCmd[i].FxProc, uintptr(0), uintptr(0)) - } - return 0 -} +// end block for C++ -var aObjCmd = [5]struct { - FzName uintptr - FxProc uintptr -}{ - {FzName: ts + 16924 /* "sqlite3rbu" */, FxProc: 0}, - {FzName: ts + 16935 /* "sqlite3rbu_vacuu..." */, FxProc: 0}, - {FzName: ts + 16953 /* "sqlite3rbu_creat..." */, FxProc: 0}, - {FzName: ts + 16975 /* "sqlite3rbu_destr..." */, FxProc: 0}, - {FzName: ts + 16998 /* "sqlite3rbu_inter..." */, FxProc: 0}, -} /* test_rbu.c:369:5 */ +// Local Variables: +// mode: c +// c-basic-offset: 4 +// fill-column: 78 +// End: +func SqliteRbu_Init(tls *crt.TLS, interp uintptr) int32 { /* test_rbu.c:389:5: */ return 0 } // Used to get the current process ID // Copyright (C) 1991-2018 Free Software Foundation, Inc. @@ -32678,16 +29984,11 @@ func incrblobSeek(tls *crt.TLS, instanceData ClientData, offset int64, seekMode break default: - if !(!(1 != 0)) { - crt.X__assert_fail(tls, ts+17023 /* "!\"Bad seekMode\"" */, ts+17039 /* "testdata/sqlite-..." */, uint32(348), uintptr(unsafe.Pointer(&__func__91))) - } } return (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek } -var __func__91 = *(*[13]int8)(unsafe.Pointer(ts + 17083 /* "incrblobSeek" */)) /* tclsqlite.c:334:2 */ - func incrblobWatch(tls *crt.TLS, instanceData ClientData, mode int32) { /* tclsqlite.c:355:27: */ // NO-OP } @@ -32695,7 +29996,7 @@ func incrblobHandle(tls *crt.TLS, instanceData ClientData, dir int32, hPtr uintp return 1 } -var IncrblobChannelType = Tcl_ChannelType{FtypeName: ts + 17096 /* "incrblob" */, Fversion: // typeName +var IncrblobChannelType = Tcl_ChannelType{FtypeName: ts + 8647 /* "incrblob" */, Fversion: // typeName uintptr(0x2), FcloseProc:// version 0, FinputProc:// closeProc 0, FoutputProc:// inputProc @@ -32740,7 +30041,7 @@ func createIncrblobChannel(tls *crt.TLS, interp uintptr, pDb uintptr, zDb uintpt (*IncrblobChannel)(unsafe.Pointer(p)).FiSeek = 0 (*IncrblobChannel)(unsafe.Pointer(p)).FpBlob = *(*uintptr)(unsafe.Pointer(bp + 8 /* pBlob */)) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+16 /* &zChannel[0] */, ts+17105 /* "incrblob_%d" */, crt.VaList(bp, crt.PreIncInt32(&count, 1))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+16 /* &zChannel[0] */, ts+8656 /* "incrblob_%d" */, crt.VaList(bp, crt.PreIncInt32(&count, 1))) (*IncrblobChannel)(unsafe.Pointer(p)).Fchannel = tcl.XTcl_CreateChannel(tls, uintptr(unsafe.Pointer(&IncrblobChannelType)), bp+16 /* &zChannel[0] */, p, flags) tcl.XTcl_RegisterChannel(tls, interp, (*IncrblobChannel)(unsafe.Pointer(p)).Fchannel) @@ -32846,9 +30147,7 @@ func DbDeleteCmd(tls *crt.TLS, db uintptr) { /* tclsqlite.c:524:27: */ for (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc != 0 { var pFunc uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc (*SqliteDb)(unsafe.Pointer(pDb)).FpFunc = (*SqlFunc)(unsafe.Pointer(pFunc)).FpNext - if !((*SqlFunc)(unsafe.Pointer(pFunc)).FpDb == pDb) { - crt.X__assert_fail(tls, ts+17117 /* "pFunc->pDb==pDb" */, ts+17039 /* "testdata/sqlite-..." */, uint32(532), uintptr(unsafe.Pointer(&__func__92))) - } + for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { @@ -32926,8 +30225,6 @@ func DbDeleteCmd(tls *crt.TLS, db uintptr) { /* tclsqlite.c:524:27: */ tcl.XTcl_Free(tls, pDb) } -var __func__92 = *(*[12]int8)(unsafe.Pointer(ts + 17133 /* "DbDeleteCmd" */)) /* tclsqlite.c:524:48 */ - // This routine is called when a database file is locked while trying // to execute SQL. func DbBusyHandler(tls *crt.TLS, cd uintptr, nTries int32) int32 { /* tclsqlite.c:584:12: */ @@ -32938,14 +30235,26 @@ func DbBusyHandler(tls *crt.TLS, cd uintptr, nTries int32) int32 { /* tclsqlite. var rc int32 // var zVal [30]int8 at bp+40, 30 - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+40 /* &zVal[0] */, ts+1647 /* "%d" */, crt.VaList(bp, nTries)) - rc = tcl.XTcl_VarEval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, crt.VaList(bp+8, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, ts+4435 /* " " */, bp+40 /* &zVal[0] */, uintptr(0))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+40 /* &zVal[0] */, ts+1237 /* "%d" */, crt.VaList(bp, nTries)) + rc = tcl.XTcl_VarEval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, crt.VaList(bp+8, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, ts+3368 /* " " */, bp+40 /* &zVal[0] */, uintptr(0))) if (rc != 0) || (crt.Xatoi(tls, tcl.XTcl_GetStringResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp)) != 0) { return 0 } return 1 } +// This routine is invoked as the 'progress callback' for the database. +func DbProgressHandler(tls *crt.TLS, cd uintptr) int32 { /* tclsqlite.c:601:12: */ + var pDb uintptr = cd + var rc int32 + + rc = tcl.XTcl_Eval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress) + if (rc != 0) || (crt.Xatoi(tls, tcl.XTcl_GetStringResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp)) != 0) { + return 1 + } + return 0 +} + // This routine is called by the SQLite trace handler whenever a new // block of SQL is executed. The TCL script in pDb->zTrace is executed. func DbTraceHandler(tls *crt.TLS, cd uintptr, zSql uintptr) { /* tclsqlite.c:620:13: */ @@ -33065,7 +30374,7 @@ func DbProfileHandler(tls *crt.TLS, cd uintptr, zSql uintptr, tm sqlite_uint64) // var zTm [100]int8 at bp+8, 100 - sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([100]int8{})) - uint64(1))), bp+8 /* &zTm[0] */, ts+17145 /* "%lld" */, crt.VaList(bp, tm)) + sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([100]int8{})) - uint64(1))), bp+8 /* &zTm[0] */, ts+8668 /* "%lld" */, crt.VaList(bp, tm)) tcl.XTcl_DStringInit(tls, bp+112 /* &str */) tcl.XTcl_DStringAppend(tls, bp+112 /* &str */, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile, -1) tcl.XTcl_DStringAppendElement(tls, bp+112 /* &str */, zSql) @@ -33092,16 +30401,12 @@ func DbCommitHandler(tls *crt.TLS, cd uintptr) int32 { /* tclsqlite.c:737:12: */ func DbRollbackHandler(tls *crt.TLS, clientData uintptr) { /* tclsqlite.c:748:13: */ var pDb uintptr = clientData - if !((*SqliteDb)(unsafe.Pointer(pDb)).FpRollbackHook != 0) { - crt.X__assert_fail(tls, ts+17150 /* "pDb->pRollbackHo..." */, ts+17039 /* "testdata/sqlite-..." */, uint32(750), uintptr(unsafe.Pointer(&__func__93))) - } + if 0 != tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*SqliteDb)(unsafe.Pointer(pDb)).FpRollbackHook, 0) { tcl.XTcl_BackgroundError(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) } } -var __func__93 = *(*[18]int8)(unsafe.Pointer(ts + 17169 /* "DbRollbackHandle..." */)) /* tclsqlite.c:748:48 */ - // This procedure handles wal_hook callbacks. func DbWalHandler(tls *crt.TLS, clientData uintptr, db uintptr, zDb uintptr, nEntry int32) int32 { /* tclsqlite.c:759:12: */ bp := tls.Alloc(4) @@ -33111,13 +30416,7 @@ func DbWalHandler(tls *crt.TLS, clientData uintptr, db uintptr, zDb uintptr, nEn var p uintptr var pDb uintptr = clientData var interp uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).Finterp - if !((*SqliteDb)(unsafe.Pointer(pDb)).FpWalHook != 0) { - crt.X__assert_fail(tls, ts+17187 /* "pDb->pWalHook" */, ts+17039 /* "testdata/sqlite-..." */, uint32(769), uintptr(unsafe.Pointer(&__func__94))) - } - if !(db == (*SqliteDb)(unsafe.Pointer(pDb)).Fdb) { - crt.X__assert_fail(tls, ts+17201 /* "db==pDb->db" */, ts+17039 /* "testdata/sqlite-..." */, uint32(771), uintptr(unsafe.Pointer(&__func__94))) - } p = tcl.XTcl_DuplicateObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FpWalHook) (*Tcl_Obj)(unsafe.Pointer(p)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, interp, p, tcl.XTcl_NewStringObj(tls, zDb, -1)) @@ -33136,18 +30435,16 @@ func DbWalHandler(tls *crt.TLS, clientData uintptr, db uintptr, zDb uintptr, nEn return *(*int32)(unsafe.Pointer(bp /* ret */)) } -var __func__94 = *(*[13]int8)(unsafe.Pointer(ts + 17213 /* "DbWalHandler" */)) /* tclsqlite.c:764:2 */ - func setTestUnlockNotifyVars(tls *crt.TLS, interp uintptr, iArg int32, nArg int32) { /* tclsqlite.c:787:13: */ bp := tls.Alloc(80) defer tls.Free(80) // var zBuf [64]int8 at bp+16, 64 - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+16 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp, iArg)) - tcl.XTcl_SetVar2(tls, interp, ts+17226 /* "sqlite_unlock_no..." */, uintptr(0), bp+16 /* &zBuf[0] */, 1) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+16 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+8, nArg)) - tcl.XTcl_SetVar2(tls, interp, ts+17251 /* "sqlite_unlock_no..." */, uintptr(0), bp+16 /* &zBuf[0] */, 1) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+16 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp, iArg)) + tcl.XTcl_SetVar2(tls, interp, ts+8673 /* "sqlite_unlock_no..." */, uintptr(0), bp+16 /* &zBuf[0] */, 1) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+16 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+8, nArg)) + tcl.XTcl_SetVar2(tls, interp, ts+8698 /* "sqlite_unlock_no..." */, uintptr(0), bp+16 /* &zBuf[0] */, 1) } func DbUnlockNotify(tls *crt.TLS, apArg uintptr, nArg int32) { /* tclsqlite.c:799:13: */ @@ -33156,9 +30453,7 @@ func DbUnlockNotify(tls *crt.TLS, apArg uintptr, nArg int32) { /* tclsqlite.c:79 var flags int32 = (0x020000 | 0x040000) var pDb uintptr = *(*uintptr)(unsafe.Pointer(apArg + uintptr(i)*8)) setTestUnlockNotifyVars(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, i, nArg) - if !((*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify != 0) { - crt.X__assert_fail(tls, ts+17281 /* "pDb->pUnlockNoti..." */, ts+17039 /* "testdata/sqlite-..." */, uint32(805), uintptr(unsafe.Pointer(&__func__95))) - } + tcl.XTcl_EvalObjEx(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify, flags) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify @@ -33170,29 +30465,10 @@ func DbUnlockNotify(tls *crt.TLS, apArg uintptr, nArg int32) { /* tclsqlite.c:79 } } -var __func__95 = *(*[15]int8)(unsafe.Pointer(ts + 17300 /* "DbUnlockNotify" */)) /* tclsqlite.c:799:51 */ - func DbUpdateHandler(tls *crt.TLS, p uintptr, op int32, zDb uintptr, zTbl uintptr, rowid sqlite_int64) { /* tclsqlite.c:849:13: */ var pDb uintptr = p var pCmd uintptr - if !(((9 - 1) / 9) == 0) { - crt.X__assert_fail(tls, ts+17315 /* "(9-1)/9 == 0" */, ts+17039 /* "testdata/sqlite-..." */, uint32(860), uintptr(unsafe.Pointer(&__func__96))) - } - if !(((18 - 1) / 9) == 1) { - crt.X__assert_fail(tls, ts+17328 /* "(18-1)/9 == 1" */, ts+17039 /* "testdata/sqlite-..." */, uint32(861), uintptr(unsafe.Pointer(&__func__96))) - } - if !(((23 - 1) / 9) == 2) { - crt.X__assert_fail(tls, ts+17342 /* "(23-1)/9 == 2" */, ts+17039 /* "testdata/sqlite-..." */, uint32(862), uintptr(unsafe.Pointer(&__func__96))) - } - - if !((*SqliteDb)(unsafe.Pointer(pDb)).FpUpdateHook != 0) { - crt.X__assert_fail(tls, ts+17356 /* "pDb->pUpdateHook" */, ts+17039 /* "testdata/sqlite-..." */, uint32(864), uintptr(unsafe.Pointer(&__func__96))) - } - if !(((op == 18) || (op == 23)) || (op == 9)) { - crt.X__assert_fail(tls, ts+17373 /* "op==18 || op==23..." */, ts+17039 /* "testdata/sqlite-..." */, uint32(865), uintptr(unsafe.Pointer(&__func__96))) - } - pCmd = tcl.XTcl_DuplicateObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FpUpdateHook) (*Tcl_Obj)(unsafe.Pointer(pCmd)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pCmd, tcl.XTcl_NewStringObj(tls, azStr[((op-1)/9)], -1)) @@ -33208,8 +30484,7 @@ func DbUpdateHandler(tls *crt.TLS, p uintptr, op int32, zDb uintptr, zTbl uintpt } } -var __func__96 = *(*[16]int8)(unsafe.Pointer(ts + 17399 /* "DbUpdateHandler" */)) /* tclsqlite.c:855:2 */ -var azStr = [3]uintptr{ts + 17415 /* "DELETE" */, ts + 17422 /* "INSERT" */, ts + 17429 /* "UPDATE" */} /* tclsqlite.c:858:21 */ +var azStr = [3]uintptr{ts + 8728 /* "DELETE" */, ts + 8735 /* "INSERT" */, ts + 8742 /* "UPDATE" */} /* tclsqlite.c:858:21 */ func tclCollateNeeded(tls *crt.TLS, pCtx uintptr, db uintptr, enc int32, zName uintptr) { /* tclsqlite.c:877:13: */ var pDb uintptr = pCtx @@ -33371,21 +30646,21 @@ func tclSqlFunc(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* tc if (*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr != 0 { return (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr)).Fname } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }() var c int8 = *(*int8)(unsafe.Pointer(zType + uintptr(0))) var eType int32 = (*SqlFunc)(unsafe.Pointer(p)).FeType if eType == 5 { - if ((int32(c) == 'b') && (crt.Xstrcmp(tls, zType, ts+17436 /* "bytearray" */) == 0)) && ((*Tcl_Obj)(unsafe.Pointer(pVar)).Fbytes == uintptr(0)) { + if ((int32(c) == 'b') && (crt.Xstrcmp(tls, zType, ts+8749 /* "bytearray" */) == 0)) && ((*Tcl_Obj)(unsafe.Pointer(pVar)).Fbytes == uintptr(0)) { // Only return a BLOB type if the Tcl variable is a bytearray and // has no string representation. eType = 4 - } else if (((int32(c) == 'b') && (crt.Xstrcmp(tls, zType, ts+17446 /* "boolean" */) == 0)) || - ((int32(c) == 'w') && (crt.Xstrcmp(tls, zType, ts+17454 /* "wideInt" */) == 0))) || - ((int32(c) == 'i') && (crt.Xstrcmp(tls, zType, ts+17462 /* "int" */) == 0)) { + } else if (((int32(c) == 'b') && (crt.Xstrcmp(tls, zType, ts+8759 /* "boolean" */) == 0)) || + ((int32(c) == 'w') && (crt.Xstrcmp(tls, zType, ts+8767 /* "wideInt" */) == 0))) || + ((int32(c) == 'i') && (crt.Xstrcmp(tls, zType, ts+8775 /* "int" */) == 0)) { eType = 1 - } else if (int32(c) == 'd') && (crt.Xstrcmp(tls, zType, ts+3376 /* "double" */) == 0) { + } else if (int32(c) == 'd') && (crt.Xstrcmp(tls, zType, ts+2637 /* "double" */) == 0) { eType = 2 } else { eType = 3 @@ -33458,109 +30733,109 @@ func auth_callback(tls *crt.TLS, pArg uintptr, code int32, zArg1 uintptr, zArg2 // authorized. switch code { case 0: - zCode = ts + 17466 /* "SQLITE_COPY" */ + zCode = ts + 8779 /* "SQLITE_COPY" */ break case 1: - zCode = ts + 17478 /* "SQLITE_CREATE_IN..." */ + zCode = ts + 8791 /* "SQLITE_CREATE_IN..." */ break case 2: - zCode = ts + 17498 /* "SQLITE_CREATE_TA..." */ + zCode = ts + 8811 /* "SQLITE_CREATE_TA..." */ break case 3: - zCode = ts + 17518 /* "SQLITE_CREATE_TE..." */ + zCode = ts + 8831 /* "SQLITE_CREATE_TE..." */ break case 4: - zCode = ts + 17543 /* "SQLITE_CREATE_TE..." */ + zCode = ts + 8856 /* "SQLITE_CREATE_TE..." */ break case 5: - zCode = ts + 17568 /* "SQLITE_CREATE_TE..." */ + zCode = ts + 8881 /* "SQLITE_CREATE_TE..." */ break case 6: - zCode = ts + 17595 /* "SQLITE_CREATE_TE..." */ + zCode = ts + 8908 /* "SQLITE_CREATE_TE..." */ break case 7: - zCode = ts + 17619 /* "SQLITE_CREATE_TR..." */ + zCode = ts + 8932 /* "SQLITE_CREATE_TR..." */ break case 8: - zCode = ts + 17641 /* "SQLITE_CREATE_VI..." */ + zCode = ts + 8954 /* "SQLITE_CREATE_VI..." */ break case 9: - zCode = ts + 17660 /* "SQLITE_DELETE" */ + zCode = ts + 8973 /* "SQLITE_DELETE" */ break case 10: - zCode = ts + 17674 /* "SQLITE_DROP_INDE..." */ + zCode = ts + 8987 /* "SQLITE_DROP_INDE..." */ break case 11: - zCode = ts + 17692 /* "SQLITE_DROP_TABL..." */ + zCode = ts + 9005 /* "SQLITE_DROP_TABL..." */ break case 12: - zCode = ts + 17710 /* "SQLITE_DROP_TEMP..." */ + zCode = ts + 9023 /* "SQLITE_DROP_TEMP..." */ break case 13: - zCode = ts + 17733 /* "SQLITE_DROP_TEMP..." */ + zCode = ts + 9046 /* "SQLITE_DROP_TEMP..." */ break case 14: - zCode = ts + 17756 /* "SQLITE_DROP_TEMP..." */ + zCode = ts + 9069 /* "SQLITE_DROP_TEMP..." */ break case 15: - zCode = ts + 17781 /* "SQLITE_DROP_TEMP..." */ + zCode = ts + 9094 /* "SQLITE_DROP_TEMP..." */ break case 16: - zCode = ts + 17803 /* "SQLITE_DROP_TRIG..." */ + zCode = ts + 9116 /* "SQLITE_DROP_TRIG..." */ break case 17: - zCode = ts + 17823 /* "SQLITE_DROP_VIEW" */ + zCode = ts + 9136 /* "SQLITE_DROP_VIEW" */ break case 18: - zCode = ts + 17840 /* "SQLITE_INSERT" */ + zCode = ts + 9153 /* "SQLITE_INSERT" */ break case 19: - zCode = ts + 17854 /* "SQLITE_PRAGMA" */ + zCode = ts + 9167 /* "SQLITE_PRAGMA" */ break case 20: - zCode = ts + 17868 /* "SQLITE_READ" */ + zCode = ts + 9181 /* "SQLITE_READ" */ break case 21: - zCode = ts + 17880 /* "SQLITE_SELECT" */ + zCode = ts + 9193 /* "SQLITE_SELECT" */ break case 22: - zCode = ts + 17894 /* "SQLITE_TRANSACTI..." */ + zCode = ts + 9207 /* "SQLITE_TRANSACTI..." */ break case 23: - zCode = ts + 17913 /* "SQLITE_UPDATE" */ + zCode = ts + 9226 /* "SQLITE_UPDATE" */ break case 24: - zCode = ts + 17927 /* "SQLITE_ATTACH" */ + zCode = ts + 9240 /* "SQLITE_ATTACH" */ break case 25: - zCode = ts + 17941 /* "SQLITE_DETACH" */ + zCode = ts + 9254 /* "SQLITE_DETACH" */ break case 26: - zCode = ts + 17955 /* "SQLITE_ALTER_TAB..." */ + zCode = ts + 9268 /* "SQLITE_ALTER_TAB..." */ break case 27: - zCode = ts + 17974 /* "SQLITE_REINDEX" */ + zCode = ts + 9287 /* "SQLITE_REINDEX" */ break case 28: - zCode = ts + 17989 /* "SQLITE_ANALYZE" */ + zCode = ts + 9302 /* "SQLITE_ANALYZE" */ break case 29: - zCode = ts + 18004 /* "SQLITE_CREATE_VT..." */ + zCode = ts + 9317 /* "SQLITE_CREATE_VT..." */ break case 30: - zCode = ts + 18025 /* "SQLITE_DROP_VTAB..." */ + zCode = ts + 9338 /* "SQLITE_DROP_VTAB..." */ break case 31: - zCode = ts + 18044 /* "SQLITE_FUNCTION" */ + zCode = ts + 9357 /* "SQLITE_FUNCTION" */ break case 32: - zCode = ts + 18060 /* "SQLITE_SAVEPOINT" */ + zCode = ts + 9373 /* "SQLITE_SAVEPOINT" */ break case 33: - zCode = ts + 18077 /* "SQLITE_RECURSIVE" */ + zCode = ts + 9390 /* "SQLITE_RECURSIVE" */ break default: - zCode = ts + 18094 /* "????" */ + zCode = ts + 9407 /* "????" */ break } tcl.XTcl_DStringInit(tls, bp /* &str */) @@ -33570,38 +30845,38 @@ func auth_callback(tls *crt.TLS, pArg uintptr, code int32, zArg1 uintptr, zArg2 if zArg1 != 0 { return zArg1 } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }()) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, func() uintptr { if zArg2 != 0 { return zArg2 } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }()) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, func() uintptr { if zArg3 != 0 { return zArg3 } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }()) tcl.XTcl_DStringAppendElement(tls, bp /* &str */, func() uintptr { if zArg4 != 0 { return zArg4 } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }()) rc = tcl.XTcl_GlobalEval(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp, (*Tcl_DString)(unsafe.Pointer(bp /* &str */)).Fstring) tcl.XTcl_DStringFree(tls, bp /* &str */) if rc == 0 { zReply = tcl.XTcl_GetStringResult(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Finterp) } else { - zReply = ts + 18099 /* "SQLITE_DENY" */ + zReply = ts + 9412 /* "SQLITE_DENY" */ } - if crt.Xstrcmp(tls, zReply, ts+18111 /* "SQLITE_OK" */) == 0 { + if crt.Xstrcmp(tls, zReply, ts+9424 /* "SQLITE_OK" */) == 0 { rc = 0 - } else if crt.Xstrcmp(tls, zReply, ts+18099 /* "SQLITE_DENY" */) == 0 { + } else if crt.Xstrcmp(tls, zReply, ts+9412 /* "SQLITE_DENY" */) == 0 { rc = 1 - } else if crt.Xstrcmp(tls, zReply, ts+18121 /* "SQLITE_IGNORE" */) == 0 { + } else if crt.Xstrcmp(tls, zReply, ts+9434 /* "SQLITE_IGNORE" */) == 0 { rc = 2 } else { rc = 999 @@ -33690,7 +30965,7 @@ func DbTransPostCmd(tls *crt.TLS, data uintptr, interp uintptr, result int32) in tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) rc = 1 } - sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, ts+7303 /* "ROLLBACK" */, uintptr(0), uintptr(0), uintptr(0)) + sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, ts+5807 /* "ROLLBACK" */, uintptr(0), uintptr(0), uintptr(0)) } (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth-- @@ -33698,10 +30973,10 @@ func DbTransPostCmd(tls *crt.TLS, data uintptr, interp uintptr, result int32) in } var azEnd = [4]uintptr{ - ts + 18135, /* "RELEASE _tcl_tra..." */ // rc==TCL_ERROR, nTransaction!=0 - ts + 15071, /* "COMMIT" */ // rc!=TCL_ERROR, nTransaction==0 - ts + 18160, /* "ROLLBACK TO _tcl..." */ - ts + 7303, /* "ROLLBACK" */ // rc==TCL_ERROR, nTransaction==0 + ts + 9448, /* "RELEASE _tcl_tra..." */ // rc==TCL_ERROR, nTransaction!=0 + ts + 9473, /* "COMMIT" */ // rc!=TCL_ERROR, nTransaction==0 + ts + 9480, /* "ROLLBACK TO _tcl..." */ + ts + 5807, /* "ROLLBACK" */ // rc==TCL_ERROR, nTransaction==0 } /* tclsqlite.c:1216:21 */ // Unless SQLITE_TEST is defined, this function is a simple wrapper around @@ -33809,9 +31084,6 @@ func dbPrepareAndBind(tls *crt.TLS, pDb uintptr, zIn uintptr, pzOut uintptr, ppP } } - if !(pPreStmt == uintptr(0)) { - crt.X__assert_fail(tls, ts+18216 /* "pPreStmt==0" */, ts+17039 /* "testdata/sqlite-..." */, uint32(1369), uintptr(unsafe.Pointer(&__func__97))) - } nVar = sqlite3.Xsqlite3_bind_parameter_count(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) nByte = (int32(uint64(unsafe.Sizeof(SqlPreparedStmt{})) + (uint64(nVar) * uint64(unsafe.Sizeof(uintptr(0)))))) pPreStmt = tcl.XTcl_Alloc(tls, uint32(nByte)) @@ -33828,15 +31100,6 @@ func dbPrepareAndBind(tls *crt.TLS, pDb uintptr, zIn uintptr, pzOut uintptr, ppP (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FzSql = zCopy } } - if !(pPreStmt != 0) { - crt.X__assert_fail(tls, ts+18228 /* "pPreStmt" */, ts+17039 /* "testdata/sqlite-..." */, uint32(1388), uintptr(unsafe.Pointer(&__func__97))) - } - if !(strlen30(tls, (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FzSql) == (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnSql) { - crt.X__assert_fail(tls, ts+18237 /* "strlen30(pPreStm..." */, ts+17039 /* "testdata/sqlite-..." */, uint32(1389), uintptr(unsafe.Pointer(&__func__97))) - } - if !(0 == crt.Xmemcmp(tls, (*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FzSql, zSql, uint64((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FnSql))) { - crt.X__assert_fail(tls, ts+18278 /* "0==memcmp(pPreSt..." */, ts+17039 /* "testdata/sqlite-..." */, uint32(1390), uintptr(unsafe.Pointer(&__func__97))) - } // Bind values to parameters that begin with $ or : for i = 1; i <= nVar; i++ { @@ -33877,10 +31140,10 @@ func dbPrepareAndBind(tls *crt.TLS, pDb uintptr, zIn uintptr, pzOut uintptr, ppP if (*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr != 0 { return (*Tcl_ObjType)(unsafe.Pointer((*Tcl_Obj)(unsafe.Pointer(pVar)).FtypePtr)).Fname } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }() c = *(*int8)(unsafe.Pointer(zType + uintptr(0))) - if (int32(*(*int8)(unsafe.Pointer(zVar + uintptr(0)))) == '@') || (((int32(c) == 'b') && (crt.Xstrcmp(tls, zType, ts+17436 /* "bytearray" */) == 0)) && ((*Tcl_Obj)(unsafe.Pointer(pVar)).Fbytes == uintptr(0))) { + if (int32(*(*int8)(unsafe.Pointer(zVar + uintptr(0)))) == '@') || (((int32(c) == 'b') && (crt.Xstrcmp(tls, zType, ts+8749 /* "bytearray" */) == 0)) && ((*Tcl_Obj)(unsafe.Pointer(pVar)).Fbytes == uintptr(0))) { // Load a BLOB type if the Tcl variable is a bytearray and // it has no string representation or the host // parameter name begins with "@". @@ -33888,15 +31151,15 @@ func dbPrepareAndBind(tls *crt.TLS, pDb uintptr, zIn uintptr, pzOut uintptr, ppP sqlite3.Xsqlite3_bind_blob(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i, data, *(*int32)(unsafe.Pointer(bp + 8 /* n */)), uintptr(0)) (*Tcl_Obj)(unsafe.Pointer(pVar)).FrefCount++ *(*uintptr)(unsafe.Pointer((*SqlPreparedStmt)(unsafe.Pointer(pPreStmt)).FapParm + uintptr(crt.PostIncInt32(&iParm, 1))*8)) = pVar - } else if (int32(c) == 'b') && (crt.Xstrcmp(tls, zType, ts+17446 /* "boolean" */) == 0) { + } else if (int32(c) == 'b') && (crt.Xstrcmp(tls, zType, ts+8759 /* "boolean" */) == 0) { tcl.XTcl_GetIntFromObj(tls, interp, pVar, bp+8 /* &n */) sqlite3.Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i, *(*int32)(unsafe.Pointer(bp + 8 /* n */))) - } else if (int32(c) == 'd') && (crt.Xstrcmp(tls, zType, ts+3376 /* "double" */) == 0) { + } else if (int32(c) == 'd') && (crt.Xstrcmp(tls, zType, ts+2637 /* "double" */) == 0) { // var r float64 at bp+16, 8 tcl.XTcl_GetDoubleFromObj(tls, interp, pVar, bp+16 /* &r */) sqlite3.Xsqlite3_bind_double(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), i, *(*float64)(unsafe.Pointer(bp + 16 /* r */))) - } else if ((int32(c) == 'w') && (crt.Xstrcmp(tls, zType, ts+17454 /* "wideInt" */) == 0)) || ((int32(c) == 'i') && (crt.Xstrcmp(tls, zType, ts+17462 /* "int" */) == 0)) { + } else if ((int32(c) == 'w') && (crt.Xstrcmp(tls, zType, ts+8767 /* "wideInt" */) == 0)) || ((int32(c) == 'i') && (crt.Xstrcmp(tls, zType, ts+8775 /* "int" */) == 0)) { // var v Tcl_WideInt at bp+24, 8 tcl.XTcl_GetWideIntFromObj(tls, interp, pVar, bp+24 /* &v */) @@ -33924,8 +31187,6 @@ func dbPrepareAndBind(tls *crt.TLS, pDb uintptr, zIn uintptr, pzOut uintptr, ppP return rc } -var __func__97 = *(*[17]int8)(unsafe.Pointer(ts + 18326 /* "dbPrepareAndBind" */)) /* tclsqlite.c:1299:2 */ - // Release a statement reference obtained by calling dbPrepareAndBind(). // There should be exactly one call to this function for each call to // dbPrepareAndBind(). @@ -33959,14 +31220,9 @@ func dbReleaseStmt(tls *crt.TLS, pDb uintptr, pPreStmt uintptr, discard int32) { } (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList = pPreStmt if (*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast == uintptr(0) { - if !((*SqliteDb)(unsafe.Pointer(pDb)).FnStmt == 0) { - crt.X__assert_fail(tls, ts+18343 /* "pDb->nStmt==0" */, ts+17039 /* "testdata/sqlite-..." */, uint32(1495), uintptr(unsafe.Pointer(&__func__98))) - } + (*SqliteDb)(unsafe.Pointer(pDb)).FstmtLast = pPreStmt } else { - if !((*SqliteDb)(unsafe.Pointer(pDb)).FnStmt > 0) { - crt.X__assert_fail(tls, ts+18357 /* "pDb->nStmt>0" */, ts+17039 /* "testdata/sqlite-..." */, uint32(1498), uintptr(unsafe.Pointer(&__func__98))) - } } (*SqliteDb)(unsafe.Pointer(pDb)).FnStmt++ @@ -33982,8 +31238,6 @@ func dbReleaseStmt(tls *crt.TLS, pDb uintptr, pPreStmt uintptr, discard int32) { } } -var __func__98 = *(*[14]int8)(unsafe.Pointer(ts + 18370 /* "dbReleaseStmt" */)) /* tclsqlite.c:1474:2 */ - // Structure used with dbEvalXXX() functions: // // dbEvalInit() @@ -34078,7 +31332,7 @@ func dbEvalRowInfo(tls *crt.TLS, p uintptr, pnCol uintptr, papColName uintptr) { if (*DbEvalContext)(unsafe.Pointer(p)).FpArray != 0 { var interp uintptr = (*SqliteDb)(unsafe.Pointer((*DbEvalContext)(unsafe.Pointer(p)).FpDb)).Finterp var pColList uintptr = tcl.XTcl_NewObj(tls) - var pStar uintptr = tcl.XTcl_NewStringObj(tls, ts+3237 /* "*" */, -1) + var pStar uintptr = tcl.XTcl_NewStringObj(tls, ts+2498 /* "*" */, -1) for i = 0; i < nCol; i++ { tcl.XTcl_ListObjAppendElement(tls, interp, pColList, *(*uintptr)(unsafe.Pointer(apColName + uintptr(i)*8))) @@ -34351,9 +31605,7 @@ func DbHookCmd(tls *crt.TLS, interp uintptr, pDb uintptr, pArg uintptr, ppHook u } } if pArg != 0 { - if !(!(int32(*(*uintptr)(unsafe.Pointer(ppHook))) != 0)) { - crt.X__assert_fail(tls, ts+18384 /* "!(*ppHook)" */, ts+17039 /* "testdata/sqlite-..." */, uint32(1879), uintptr(unsafe.Pointer(&__func__99))) - } + if tcl.XTcl_GetCharLength(tls, pArg) > 0 { *(*uintptr)(unsafe.Pointer(ppHook)) = pArg (*Tcl_Obj)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(ppHook)))).FrefCount++ @@ -34384,8 +31636,6 @@ func DbHookCmd(tls *crt.TLS, interp uintptr, pDb uintptr, pArg uintptr, ppHook u }(), pDb) } -var __func__99 = *(*[10]int8)(unsafe.Pointer(ts + 18395 /* "DbHookCmd" */)) /* tclsqlite.c:1868:2 */ - // The "sqlite" command below creates a new Tcl command for each // connection it opens to an SQLite database. This routine is invoked // whenever one of those connection-specific commands is executed @@ -34398,68 +31648,208 @@ var __func__99 = *(*[10]int8)(unsafe.Pointer(ts + 18395 /* "DbHookCmd" */)) /* t // and calls that connection "db1". The second command causes this // subroutine to be invoked. func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* tclsqlite.c:1907:26: */ - bp := tls.Alloc(1516) - defer tls.Free(1516) - *(*uintptr)(unsafe.Pointer(bp + 1408)) = cd + bp := tls.Alloc(1564) + defer tls.Free(1564) + *(*uintptr)(unsafe.Pointer(bp + 1456)) = cd - var pDb uintptr = *(*uintptr)(unsafe.Pointer(bp + 1408 /* cd */)) - // var choice int32 at bp+992, 4 + var pDb uintptr + // var choice int32 at bp+1016, 4 - var rc int32 = 0 - const ( /* tclsqlite.c:1932:3: */ - DB_AUTHORIZER = 0 - DB_BACKUP = 1 - DB_BIND_FALLBACK = 2 - DB_BUSY = 3 - DB_CACHE = 4 - DB_CHANGES = 5 - DB_CLOSE = 6 - DB_COLLATE = 7 - DB_COLLATION_NEEDED = 8 - DB_COMMIT_HOOK = 9 - DB_COMPLETE = 10 - DB_CONFIG = 11 - DB_COPY = 12 - DB_DESERIALIZE = 13 - DB_ENABLE_LOAD_EXTENSION = 14 - DB_ERRORCODE = 15 - DB_EVAL = 16 - DB_EXISTS = 17 - DB_FUNCTION = 18 - DB_INCRBLOB = 19 - DB_INTERRUPT = 20 - DB_LAST_INSERT_ROWID = 21 - DB_NULLVALUE = 22 - DB_ONECOLUMN = 23 - DB_PREUPDATE = 24 - DB_PROFILE = 25 - DB_PROGRESS = 26 - DB_REKEY = 27 - DB_RESTORE = 28 - DB_ROLLBACK_HOOK = 29 - DB_SERIALIZE = 30 - DB_STATUS = 31 - DB_TIMEOUT = 32 - DB_TOTAL_CHANGES = 33 - DB_TRACE = 34 - DB_TRACE_V2 = 35 - DB_TRANSACTION = 36 - DB_UNLOCK_NOTIFY = 37 - DB_UPDATE_HOOK = 38 - DB_VERSION = 39 - DB_WAL_HOOK = 40 - ) + var rc int32 + var zAuth uintptr + // var len int32 at bp+1020, 4 + + var zDestFile uintptr + var zSrcDb uintptr + // var pDest uintptr at bp+1024, 8 + + var pBackup uintptr + var zCallback uintptr + // var len1 int32 at bp+1032, 4 + + var zBusy uintptr + // var len2 int32 at bp+1036, 4 + + var subCmd uintptr + // var n int32 at bp+1040, 4 + + var pResult uintptr + var pCollate uintptr + var zName uintptr + var zScript uintptr + // var nScript int32 at bp+1044, 4 + + var _objPtr uintptr + var zCommit uintptr + // var len3 int32 at bp+1048, 4 + + var pResult1 uintptr + var isComplete int32 + // var v int32 at bp+1052, 4 + + var zOpt uintptr + // var onoff int32 at bp+1056, 4 + + // var v1 int32 at bp+1060, 4 + + var pResult2 uintptr + var ii int32 + var zErr uintptr + var nErr int32 + var z uintptr + var zTable uintptr // Insert data into this table + var zFile uintptr // The file from which to extract data + var zConflict uintptr // The conflict algorithm to use + // var pStmt uintptr at bp+1064, 8 + // A statement + var nCol int32 // Number of columns in the table + var nByte int32 // Number of bytes in an SQL string + var i int32 + var j int32 // Loop counters + var nSep int32 // Number of bytes in zSep[] + var nNull int32 // Number of bytes in zNull[] + var zSql uintptr // An SQL statement + var zLine uintptr // A single line of input from the file + var azCol uintptr // zLine[] broken up into columns + var zCommit1 uintptr // How to commit changes + var in uintptr // The input file + var lineno int32 // Line number of input file + // var zLineNum [80]int8 at bp+1072, 80 + // Line number print buffer + var pResult3 uintptr // interp result + + var zSep uintptr + var zNull uintptr + var z1 uintptr + var flags int32 + var zSchema uintptr + var pValue uintptr + var pBA uintptr + var pData uintptr + // var len4 int32 at bp+1164, 4 + + var xrc int32 + // var mxSize sqlite3_int64 at bp+1152, 8 + + var i1 int32 + // var isReadonly int32 at bp+1160, 4 + + var pResult4 uintptr + // var sEval DbEvalContext at bp+1168, 56 + + var i2 int32 + // var nCol1 int32 at bp+1280, 4 + + var _objPtr1 uintptr + // var sEval1 DbEvalContext at bp+1224, 56 + + var pRet uintptr + // var cd2 [2]ClientData at bp+1288, 16 + + var p uintptr + var pArray uintptr + var pScript uintptr + var evalFlags int32 + var zOpt1 uintptr + // var azType [6]uintptr at bp+1312, 48 + + var z2 uintptr + var n1 int32 + var _objPtr2 uintptr + var flags1 int32 + var pFunc uintptr + var pScript1 uintptr + var zName1 uintptr + // var nArg int32 at bp+1304, 4 + + var i3 int32 + // var eType int32 at bp+1360, 4 + + var isReadonly1 int32 + var zDb uintptr + var zTable1 uintptr + var zColumn uintptr + // var iRow Tcl_WideInt at bp+1368, 8 + + // var len5 int32 at bp+1376, 4 + + var zNull1 uintptr + var pResult5 uintptr + var rowid Tcl_WideInt + var zProgress uintptr + // var len6 int32 at bp+1384, 4 + + // var N int32 at bp+1380, 4 + + var zProfile uintptr + // var len7 int32 at bp+1388, 4 + + var zSrcFile uintptr + var zDestDb uintptr + // var pSrc uintptr at bp+1392, 8 + + var pBackup1 uintptr + var nTimeout int32 + var needFree int32 + var zSchema1 uintptr + // var sz sqlite3_int64 at bp+1400, 8 + + var pData1 uintptr + var v2 int32 + var zOp uintptr + // var ms int32 at bp+1408, 4 + + var pResult6 uintptr + var zTrace uintptr + // var len8 int32 at bp+1412, 4 + + var _objPtr3 uintptr + var _objPtr4 uintptr + // var wType Tcl_WideInt at bp+1440, 8 + + var pError uintptr + // var pObj uintptr at bp+1424, 8 + + // var ttype int32 at bp+1432, 4 + + var i4 int32 + var zTraceV2 uintptr + // var len9 int32 at bp+1416, 4 + + var wMask Tcl_WideInt + // var ttype1 int32 at bp+1448, 4 + + var pScript2 uintptr + var zBegin uintptr + var _objPtr5 uintptr + var xNotify uintptr + var pNotifyArg uintptr + // set ppHook to point at pUpdateHook or pRollbackHook, depending on + // whether [$db update_hook] or [$db rollback_hook] was invoked. + var ppHook uintptr + // var zBuf [100]int8 at bp+1464, 100 + + var zArg uintptr + var i5 int32 + pDb = *(*uintptr)(unsafe.Pointer(bp + 1456 /* cd */)) + rc = 0 // don't leave trailing commas on DB_enum, it confuses the AIX xlc compiler - if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2306 /* "SUBCOMMAND ..." */) - return 1 + if !(objc < 2) { + goto __1 } - if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(unsafe.Pointer(&DB_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+18405 /* "option" */, 0, bp+992 /* &choice */) != 0 { - return 1 + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1859 /* "SUBCOMMAND ..." */) + return 1 +__1: + ; + if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(unsafe.Pointer(&DB_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+9536 /* "option" */, 0, bp+1016 /* &choice */) != 0) { + goto __2 } + return 1 +__2: + ; - switch uint32(*(*int32)(unsafe.Pointer(bp + 992 /* choice */))) { + switch uint32(*(*int32)(unsafe.Pointer(bp + 1016 /* choice */))) { // $db authorizer ?CALLBACK? // @@ -34478,92 +31868,457 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // // If this method is invoked with no arguments, the current authorization // callback string is returned. - case DB_AUTHORIZER: - { - if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18412 /* "?CALLBACK?" */) - return 1 - } else if objc == 2 { - if (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth, uintptr(0))) - } - } else { - var zAuth uintptr - // var len int32 at bp+996, 4 - - if (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth) - } - zAuth = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+996 /* &len */) - if (zAuth != 0) && (*(*int32)(unsafe.Pointer(bp + 996 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 996 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth, zAuth, (uint64(*(*int32)(unsafe.Pointer(bp + 996 /* len */)) + 1))) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth = uintptr(0) - } - if (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0 { - (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp - sqlite3.Xsqlite3_set_authorizer(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 - }{auth_callback})), pDb) - } else { - sqlite3.Xsqlite3_set_authorizer(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) - } - } - break - } + case uint32(0): + goto __4 // $db backup ?DATABASE? FILENAME // // Open or create a database file named FILENAME. Transfer the // content of local database DATABASE (default: "main") into the // FILENAME database. - case DB_BACKUP: - { - var zDestFile uintptr - var zSrcDb uintptr - // var pDest uintptr at bp+1000, 8 + case uint32(1): + goto __5 - var pBackup uintptr + // $db bind_fallback ?CALLBACK? + // + // When resolving bind parameters in an SQL statement, if the parameter + // cannot be associated with a TCL variable then invoke CALLBACK with a + // single argument that is the name of the parameter and use the return + // value of the CALLBACK as the binding. If CALLBACK returns something + // other than TCL_OK or TCL_ERROR then bind a NULL. + // + // If CALLBACK is an empty string, then revert to the default behavior + // which is to set the binding to NULL. + // + // If CALLBACK returns an error, that causes the statement execution to + // abort. Hence, to configure a connection so that it throws an error + // on an attempt to bind an unknown variable, do something like this: + // + // proc bind_error {name} {error "no such variable: $name"} + // db bind_fallback bind_error + case uint32(2): + goto __6 - if objc == 3 { - zSrcDb = ts + 354 /* "main" */ - zDestFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - } else if objc == 4 { - zSrcDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - zDestFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) - } else { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18423 /* "?DATABASE? FILEN..." */) - return 1 - } - rc = sqlite3.Xsqlite3_open_v2(tls, zDestFile, bp+1000, /* &pDest */ - ((0x00000002 | 0x00000004) | (*SqliteDb)(unsafe.Pointer(pDb)).FopenFlags), uintptr(0)) - if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+18443, /* "cannot open targ..." */ - sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1000 /* pDest */))), uintptr(0))) - sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1000 /* pDest */))) - return 1 - } - pBackup = sqlite3.Xsqlite3_backup_init(tls, *(*uintptr)(unsafe.Pointer(bp + 1000 /* pDest */)), ts+354 /* "main" */, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSrcDb) - if pBackup == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, ts+18473, /* "backup failed: " */ - sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1000 /* pDest */))), uintptr(0))) - sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1000 /* pDest */))) - return 1 - } - for (crt.AssignInt32(&rc, sqlite3.Xsqlite3_backup_step(tls, pBackup, 100))) == 0 { - } - sqlite3.Xsqlite3_backup_finish(tls, pBackup) - if rc == 101 { - rc = 0 - } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+64, ts+18473, /* "backup failed: " */ - sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1000 /* pDest */))), uintptr(0))) - rc = 1 - } - sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1000 /* pDest */))) - break - } + // $db busy ?CALLBACK? + // + // Invoke the given callback if an SQL statement attempts to open + // a locked database file. + case uint32(3): + goto __7 + + // $db cache flush + // $db cache size n + // + // Flush the prepared statement cache, or set the maximum number of + // cached statements. + case uint32(4): + goto __8 + + // $db changes + // + // Return the number of rows that were modified, inserted, or deleted by + // the most recent INSERT, UPDATE or DELETE statement, not including + // any changes made by trigger programs. + case uint32(5): + goto __9 + + // $db close + // + // Shutdown the database + case uint32(6): + goto __10 + + // $db collate NAME SCRIPT + // + // Create a new SQL collation function called NAME. Whenever + // that function is called, invoke SCRIPT to evaluate the function. + case uint32(7): + goto __11 + + // $db collation_needed SCRIPT + // + // Create a new SQL collation function called NAME. Whenever + // that function is called, invoke SCRIPT to evaluate the function. + case uint32(8): + goto __12 + + // $db commit_hook ?CALLBACK? + // + // Invoke the given callback just before committing every SQL transaction. + // If the callback throws an exception or returns non-zero, then the + // transaction is aborted. If CALLBACK is an empty string, the callback + // is disabled. + case uint32(9): + goto __13 + + // $db complete SQL + // + // Return TRUE if SQL is a complete SQL statement. Return FALSE if + // additional lines of input are needed. This is similar to the + // built-in "info complete" command of Tcl. + case uint32(10): + goto __14 + + // $db config ?OPTION? ?BOOLEAN? + // + // Configure the database connection using the sqlite3_db_config() + // interface. + case uint32(11): + goto __15 + + // $db copy conflict-algorithm table filename ?SEPARATOR? ?NULLINDICATOR? + // + // Copy data into table from filename, optionally using SEPARATOR + // as column separators. If a column contains a null string, or the + // value of NULLINDICATOR, a NULL is inserted for the column. + // conflict-algorithm is one of the sqlite conflict algorithms: + // rollback, abort, fail, ignore, replace + // On success, return the number of lines processed, not necessarily same + // as 'db changes' due to conflict-algorithm selected. + // + // This code is basically an implementation/enhancement of + // the sqlite3 shell.c ".import" command. + // + // This command usage is equivalent to the sqlite2.x COPY statement, + // which imports file data into a table using the PostgreSQL COPY file format: + // $db copy $conflit_algo $table_name $filename \t \\N + case uint32(12): + goto __16 + + // $db deserialize ?-maxsize N? ?-readonly BOOL? ?DATABASE? VALUE + // + // Reopen DATABASE (default "main") using the content in $VALUE + case uint32(13): + goto __17 + + // $db enable_load_extension BOOLEAN + // + // Turn the extension loading feature on or off. It if off by + // default. + case uint32(14): + goto __18 + + // $db errorcode + // + // Return the numeric error code that was returned by the most recent + // call to sqlite3_exec(). + case uint32(15): + goto __19 + + // $db exists $sql + // $db onecolumn $sql + // + // The onecolumn method is the equivalent of: + // lindex [$db eval $sql] 0 + case uint32(17): + goto __20 + case uint32(23): + goto __21 + + // $db eval ?options? $sql ?array? ?{ ...code... }? + // + // The SQL statement in $sql is evaluated. For each row, the values are + // placed in elements of the array named "array" and ...code... is executed. + // If "array" and "code" are omitted, then no callback is every invoked. + // If "array" is an empty string, then the values are placed in variables + // that have the same name as the fields extracted by the query. + case uint32(16): + goto __22 + + // $db function NAME [OPTIONS] SCRIPT + // + // Create a new SQL function called NAME. Whenever that function is + // called, invoke SCRIPT to evaluate the function. + // + // Options: + // --argcount N Function has exactly N arguments + // --deterministic The function is pure + // --directonly Prohibit use inside triggers and views + // --innocuous Has no side effects or information leaks + // --returntype TYPE Specify the return type of the function + case uint32(18): + goto __23 + + // $db incrblob ?-readonly? ?DB? TABLE COLUMN ROWID + case uint32(19): + goto __24 + + // $db interrupt + // + // Interrupt the execution of the inner-most SQL interpreter. This + // causes the SQL statement to return an error of SQLITE_INTERRUPT. + case uint32(20): + goto __25 + + // $db nullvalue ?STRING? + // + // Change text used when a NULL comes back from the database. If ?STRING? + // is not present, then the current string used for NULL is returned. + // If STRING is present, then STRING is returned. + // + case uint32(22): + goto __26 + + // $db last_insert_rowid + // + // Return an integer which is the ROWID for the most recent insert. + case uint32(21): + goto __27 + + // The DB_ONECOLUMN method is implemented together with DB_EXISTS. + + // $db progress ?N CALLBACK? + // + // Invoke the given callback every N virtual machine opcodes while executing + // queries. + case uint32(26): + goto __28 + + // $db profile ?CALLBACK? + // + // Make arrangements to invoke the CALLBACK routine after each SQL statement + // that has run. The text of the SQL and the amount of elapse time are + // appended to CALLBACK before the script is run. + case uint32(25): + goto __29 + + // $db rekey KEY + // + // Change the encryption key on the currently open database. + case uint32(27): + goto __30 + + // $db restore ?DATABASE? FILENAME + // + // Open a database file named FILENAME. Transfer the content + // of FILENAME into the local database DATABASE (default: "main"). + case uint32(28): + goto __31 + + // $db serialize ?DATABASE? + // + // Return a serialization of a database. + case uint32(30): + goto __32 + + // $db status (step|sort|autoindex|vmstep) + // + // Display SQLITE_STMTSTATUS_FULLSCAN_STEP or + // SQLITE_STMTSTATUS_SORT for the most recent eval. + case uint32(31): + goto __33 + + // $db timeout MILLESECONDS + // + // Delay for the number of milliseconds specified when a file is locked. + case uint32(32): + goto __34 + + // $db total_changes + // + // Return the number of rows that were modified, inserted, or deleted + // since the database handle was created. + case uint32(33): + goto __35 + + // $db trace ?CALLBACK? + // + // Make arrangements to invoke the CALLBACK routine for each SQL statement + // that is executed. The text of the SQL is appended to CALLBACK before + // it is executed. + case uint32(34): + goto __36 + + // $db trace_v2 ?CALLBACK? ?MASK? + // + // Make arrangements to invoke the CALLBACK routine for each trace event + // matching the mask that is generated. The parameters are appended to + // CALLBACK before it is executed. + case uint32(35): + goto __37 + + // $db transaction [-deferred|-immediate|-exclusive] SCRIPT + // + // Start a new transaction (if we are not already in the midst of a + // transaction) and execute the TCL script SCRIPT. After SCRIPT + // completes, either commit the transaction or roll it back if SCRIPT + // throws an exception. Or if no new transation was started, do nothing. + // pass the exception on up the stack. + // + // This command was inspired by Dave Thomas's talk on Ruby at the + // 2005 O'Reilly Open Source Convention (OSCON). + case uint32(36): + goto __38 + + // $db unlock_notify ?script? + case uint32(37): + goto __39 + + // $db preupdate_hook count + // $db preupdate_hook hook ?SCRIPT? + // $db preupdate_hook new INDEX + // $db preupdate_hook old INDEX + case uint32(24): + goto __40 + + // $db wal_hook ?script? + // $db update_hook ?script? + // $db rollback_hook ?script? + case uint32(40): + goto __41 + case uint32(38): + goto __42 + case uint32(29): + goto __43 + + // $db version + // + // Return the version string for this database. + case uint32(39): + goto __44 + } + goto __3 + + // $db authorizer ?CALLBACK? + // + // Invoke the given callback to authorize each SQL operation as it is + // compiled. 5 arguments are appended to the callback before it is + // invoked: + // + // (1) The authorization type (ex: SQLITE_CREATE_TABLE, SQLITE_INSERT, ...) + // (2) First descriptive name (depends on authorization type) + // (3) Second descriptive name + // (4) Name of the database (ex: "main", "temp") + // (5) Name of trigger that is doing the access + // + // The callback should return on of the following strings: SQLITE_OK, + // SQLITE_IGNORE, or SQLITE_DENY. Any other return value is an error. + // + // If this method is invoked with no arguments, the current authorization + // callback string is returned. +__4: + if !(objc > 3) { + goto __45 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9543 /* "?CALLBACK?" */) + return 1 + goto __46 +__45: + if !(objc == 2) { + goto __47 + } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0) { + goto __49 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth, uintptr(0))) +__49: + ; + goto __48 +__47: + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0) { + goto __50 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth) +__50: + ; + zAuth = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1020 /* &len */) + if !((zAuth != 0) && (*(*int32)(unsafe.Pointer(bp + 1020 /* len */)) > 0)) { + goto __51 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1020 /* len */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth, zAuth, (uint64(*(*int32)(unsafe.Pointer(bp + 1020 /* len */)) + 1))) + goto __52 +__51: + (*SqliteDb)(unsafe.Pointer(pDb)).FzAuth = uintptr(0) +__52: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzAuth != 0) { + goto __53 + } + (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp + sqlite3.Xsqlite3_set_authorizer(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, uintptr, uintptr, uintptr) int32 + }{auth_callback})), pDb) + goto __54 +__53: + sqlite3.Xsqlite3_set_authorizer(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) +__54: + ; +__48: + ; +__46: + ; + goto __3 + + // $db backup ?DATABASE? FILENAME + // + // Open or create a database file named FILENAME. Transfer the + // content of local database DATABASE (default: "main") into the + // FILENAME database. +__5: + + if !(objc == 3) { + goto __55 + } + zSrcDb = ts + 84 /* "main" */ + zDestFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) + goto __56 +__55: + if !(objc == 4) { + goto __57 + } + zSrcDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) + zDestFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) + goto __58 +__57: + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9554 /* "?DATABASE? FILEN..." */) + return 1 +__58: + ; +__56: + ; + rc = sqlite3.Xsqlite3_open_v2(tls, zDestFile, bp+1024, /* &pDest */ + ((0x00000002 | 0x00000004) | (*SqliteDb)(unsafe.Pointer(pDb)).FopenFlags), uintptr(0)) + if !(rc != 0) { + goto __59 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+9574, /* "cannot open targ..." */ + sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1024 /* pDest */))), uintptr(0))) + sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1024 /* pDest */))) + return 1 +__59: + ; + pBackup = sqlite3.Xsqlite3_backup_init(tls, *(*uintptr)(unsafe.Pointer(bp + 1024 /* pDest */)), ts+84 /* "main" */, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSrcDb) + if !(pBackup == uintptr(0)) { + goto __60 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, ts+9604, /* "backup failed: " */ + sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1024 /* pDest */))), uintptr(0))) + sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1024 /* pDest */))) + return 1 +__60: + ; +__61: + if !((crt.AssignInt32(&rc, sqlite3.Xsqlite3_backup_step(tls, pBackup, 100))) == 0) { + goto __62 + } + goto __61 +__62: + ; + sqlite3.Xsqlite3_backup_finish(tls, pBackup) + if !(rc == 101) { + goto __63 + } + rc = 0 + goto __64 +__63: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+64, ts+9604, /* "backup failed: " */ + sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1024 /* pDest */))), uintptr(0))) + rc = 1 +__64: + ; + sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1024 /* pDest */))) + goto __3 // $db bind_fallback ?CALLBACK? // @@ -34582,209 +32337,287 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // // proc bind_error {name} {error "no such variable: $name"} // db bind_fallback bind_error - case DB_BIND_FALLBACK: - { - if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18412 /* "?CALLBACK?" */) - return 1 - } else if objc == 2 { - if (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+88, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback, uintptr(0))) - } - } else { - var zCallback uintptr - // var len int32 at bp+1008, 4 - - if (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback) - } - zCallback = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1008 /* &len */) - if (zCallback != 0) && (*(*int32)(unsafe.Pointer(bp + 1008 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1008 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback, zCallback, (uint64(*(*int32)(unsafe.Pointer(bp + 1008 /* len */)) + 1))) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback = uintptr(0) - } - } - break - } +__6: + if !(objc > 3) { + goto __65 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9543 /* "?CALLBACK?" */) + return 1 + goto __66 +__65: + if !(objc == 2) { + goto __67 + } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback != 0) { + goto __69 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+88, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback, uintptr(0))) +__69: + ; + goto __68 +__67: + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback != 0) { + goto __70 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback) +__70: + ; + zCallback = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1032 /* &len1 */) + if !((zCallback != 0) && (*(*int32)(unsafe.Pointer(bp + 1032 /* len1 */)) > 0)) { + goto __71 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1032 /* len1 */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback, zCallback, (uint64(*(*int32)(unsafe.Pointer(bp + 1032 /* len1 */)) + 1))) + goto __72 +__71: + (*SqliteDb)(unsafe.Pointer(pDb)).FzBindFallback = uintptr(0) +__72: + ; +__68: + ; +__66: + ; + goto __3 // $db busy ?CALLBACK? // // Invoke the given callback if an SQL statement attempts to open // a locked database file. - case DB_BUSY: - { - if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18489 /* "CALLBACK" */) - return 1 - } else if objc == 2 { - if (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+104, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, uintptr(0))) - } - } else { - var zBusy uintptr - // var len int32 at bp+1012, 4 - - if (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy) - } - zBusy = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1012 /* &len */) - if (zBusy != 0) && (*(*int32)(unsafe.Pointer(bp + 1012 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1012 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, zBusy, (uint64(*(*int32)(unsafe.Pointer(bp + 1012 /* len */)) + 1))) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy = uintptr(0) - } - if (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0 { - (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp - sqlite3.Xsqlite3_busy_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32) int32 - }{DbBusyHandler})), pDb) - } else { - sqlite3.Xsqlite3_busy_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) - } - } - break - } +__7: + if !(objc > 3) { + goto __73 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9620 /* "CALLBACK" */) + return 1 + goto __74 +__73: + if !(objc == 2) { + goto __75 + } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0) { + goto __77 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+104, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, uintptr(0))) +__77: + ; + goto __76 +__75: + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0) { + goto __78 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy) +__78: + ; + zBusy = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1036 /* &len2 */) + if !((zBusy != 0) && (*(*int32)(unsafe.Pointer(bp + 1036 /* len2 */)) > 0)) { + goto __79 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1036 /* len2 */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy, zBusy, (uint64(*(*int32)(unsafe.Pointer(bp + 1036 /* len2 */)) + 1))) + goto __80 +__79: + (*SqliteDb)(unsafe.Pointer(pDb)).FzBusy = uintptr(0) +__80: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzBusy != 0) { + goto __81 + } + (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp + sqlite3.Xsqlite3_busy_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32) int32 + }{DbBusyHandler})), pDb) + goto __82 +__81: + sqlite3.Xsqlite3_busy_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) +__82: + ; +__76: + ; +__74: + ; + goto __3 // $db cache flush // $db cache size n // // Flush the prepared statement cache, or set the maximum number of // cached statements. - case DB_CACHE: - { - var subCmd uintptr - // var n int32 at bp+1016, 4 +__8: - if objc <= 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18498 /* "cache option ?ar..." */) - return 1 - } - subCmd = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)) - if (int32(*(*int8)(unsafe.Pointer(subCmd))) == 'f') && (crt.Xstrcmp(tls, subCmd, ts+18517 /* "flush" */) == 0) { - if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18517 /* "flush" */) - return 1 - } else { - flushStmtCache(tls, pDb) - } - } else if (int32(*(*int8)(unsafe.Pointer(subCmd))) == 's') && (crt.Xstrcmp(tls, subCmd, ts+18523 /* "size" */) == 0) { - if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18528 /* "size n" */) - return 1 - } else { - if 1 == tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1016 /* &n */) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+120, ts+18535, /* "cannot convert \"" */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), uintptr(0)), ts+18552 /* "\" to integer" */, uintptr(0))) - return 1 - } else { - if *(*int32)(unsafe.Pointer(bp + 1016 /* n */)) < 0 { - flushStmtCache(tls, pDb) - *(*int32)(unsafe.Pointer(bp + 1016 /* n */)) = 0 - } else if *(*int32)(unsafe.Pointer(bp + 1016 /* n */)) > 100 { - *(*int32)(unsafe.Pointer(bp + 1016 /* n */)) = 100 - } - (*SqliteDb)(unsafe.Pointer(pDb)).FmaxStmt = *(*int32)(unsafe.Pointer(bp + 1016 /* n */)) - } - } - } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+152, ts+18565, /* "bad option \"" */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)), ts+18578, /* "\": must be flush..." */ - uintptr(0))) - return 1 - } - break - } + if !(objc <= 2) { + goto __83 + } + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+9629 /* "cache option ?ar..." */) + return 1 +__83: + ; + subCmd = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)) + if !((int32(*(*int8)(unsafe.Pointer(subCmd))) == 'f') && (crt.Xstrcmp(tls, subCmd, ts+9648 /* "flush" */) == 0)) { + goto __84 + } + if !(objc != 3) { + goto __86 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9648 /* "flush" */) + return 1 + goto __87 +__86: + flushStmtCache(tls, pDb) +__87: + ; + goto __85 +__84: + if !((int32(*(*int8)(unsafe.Pointer(subCmd))) == 's') && (crt.Xstrcmp(tls, subCmd, ts+9654 /* "size" */) == 0)) { + goto __88 + } + if !(objc != 4) { + goto __90 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9659 /* "size n" */) + return 1 + goto __91 +__90: + if !(1 == tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1040 /* &n */)) { + goto __92 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+120, ts+9666, /* "cannot convert \"" */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), uintptr(0)), ts+9683 /* "\" to integer" */, uintptr(0))) + return 1 + goto __93 +__92: + if !(*(*int32)(unsafe.Pointer(bp + 1040 /* n */)) < 0) { + goto __94 + } + flushStmtCache(tls, pDb) + *(*int32)(unsafe.Pointer(bp + 1040 /* n */)) = 0 + goto __95 +__94: + if !(*(*int32)(unsafe.Pointer(bp + 1040 /* n */)) > 100) { + goto __96 + } + *(*int32)(unsafe.Pointer(bp + 1040 /* n */)) = 100 +__96: + ; +__95: + ; + (*SqliteDb)(unsafe.Pointer(pDb)).FmaxStmt = *(*int32)(unsafe.Pointer(bp + 1040 /* n */)) +__93: + ; +__91: + ; + goto __89 +__88: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+152, ts+9696, /* "bad option \"" */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)), ts+9709, /* "\": must be flush..." */ + uintptr(0))) + return 1 +__89: + ; +__85: + ; + goto __3 // $db changes // // Return the number of rows that were modified, inserted, or deleted by // the most recent INSERT, UPDATE or DELETE statement, not including // any changes made by trigger programs. - case DB_CHANGES: - { - var pResult uintptr - if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+792 /* "" */) - return 1 - } - pResult = tcl.XTcl_GetObjResult(tls, interp) - tcl.XTcl_SetIntObj(tls, pResult, sqlite3.Xsqlite3_changes(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) - break - } +__9: + if !(objc != 2) { + goto __97 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+488 /* "" */) + return 1 +__97: + ; + pResult = tcl.XTcl_GetObjResult(tls, interp) + tcl.XTcl_SetIntObj(tls, pResult, sqlite3.Xsqlite3_changes(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) + goto __3 // $db close // // Shutdown the database - case DB_CLOSE: - { - tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0))) - break - } +__10: + tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0))) + goto __3 // $db collate NAME SCRIPT // // Create a new SQL collation function called NAME. Whenever // that function is called, invoke SCRIPT to evaluate the function. - case DB_COLLATE: - { - var pCollate uintptr - var zName uintptr - var zScript uintptr - // var nScript int32 at bp+1020, 4 - - if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18603 /* "NAME SCRIPT" */) - return 1 - } - zName = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)) - zScript = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1020 /* &nScript */) - pCollate = tcl.XTcl_Alloc(tls, (uint32((uint64(unsafe.Sizeof(SqlCollate{})) + uint64(*(*int32)(unsafe.Pointer(bp + 1020 /* nScript */)))) + uint64(1)))) - if pCollate == uintptr(0) { - return 1 - } - (*SqlCollate)(unsafe.Pointer(pCollate)).Finterp = interp - (*SqlCollate)(unsafe.Pointer(pCollate)).FpNext = (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate - (*SqlCollate)(unsafe.Pointer(pCollate)).FzScript = (pCollate + uintptr(1)*24) - (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate = pCollate - crt.Xmemcpy(tls, (*SqlCollate)(unsafe.Pointer(pCollate)).FzScript, zScript, (uint64(*(*int32)(unsafe.Pointer(bp + 1020 /* nScript */)) + 1))) - if sqlite3.Xsqlite3_create_collation(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zName, 1, - pCollate, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 - }{tclSqlCollate}))) != 0 { - tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(1)) - return 1 - } - break - } +__11: + if !(objc != 4) { + goto __98 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9734 /* "NAME SCRIPT" */) + return 1 +__98: + ; + zName = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)) + zScript = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1044 /* &nScript */) + pCollate = tcl.XTcl_Alloc(tls, (uint32((uint64(unsafe.Sizeof(SqlCollate{})) + uint64(*(*int32)(unsafe.Pointer(bp + 1044 /* nScript */)))) + uint64(1)))) + if !(pCollate == uintptr(0)) { + goto __99 + } + return 1 +__99: + ; + (*SqlCollate)(unsafe.Pointer(pCollate)).Finterp = interp + (*SqlCollate)(unsafe.Pointer(pCollate)).FpNext = (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate + (*SqlCollate)(unsafe.Pointer(pCollate)).FzScript = (pCollate + uintptr(1)*24) + (*SqliteDb)(unsafe.Pointer(pDb)).FpCollate = pCollate + crt.Xmemcpy(tls, (*SqlCollate)(unsafe.Pointer(pCollate)).FzScript, zScript, (uint64(*(*int32)(unsafe.Pointer(bp + 1044 /* nScript */)) + 1))) + if !(sqlite3.Xsqlite3_create_collation(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zName, 1, + pCollate, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{tclSqlCollate}))) != 0) { + goto __100 + } + tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(1)) + return 1 +__100: + ; + goto __3 // $db collation_needed SCRIPT // // Create a new SQL collation function called NAME. Whenever // that function is called, invoke SCRIPT to evaluate the function. - case DB_COLLATION_NEEDED: - { - if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18615 /* "SCRIPT" */) - return 1 - } - if (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded != 0 { - for ok := true; ok; ok = 0 != 0 { - var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded - if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { - tcl.XTclFreeObj(tls, _objPtr) - } - } - } - (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - (*Tcl_Obj)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded)).FrefCount++ - sqlite3.Xsqlite3_collation_needed(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, pDb, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, uintptr, int32, uintptr) - }{tclCollateNeeded}))) - break - } +__12: + if !(objc != 3) { + goto __101 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9746 /* "SCRIPT" */) + return 1 +__101: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded != 0) { + goto __102 + } +__103: + _objPtr = (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded + if !(crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1) { + goto __106 + } + tcl.XTclFreeObj(tls, _objPtr) +__106: + ; + goto __104 +__104: + if 0 != 0 { + goto __103 + } + goto __105 +__105: + ; +__102: + ; + (*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded = tcl.XTcl_DuplicateObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) + (*Tcl_Obj)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FpCollateNeeded)).FrefCount++ + sqlite3.Xsqlite3_collation_needed(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, pDb, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) + }{tclCollateNeeded}))) + goto __3 // $db commit_hook ?CALLBACK? // @@ -34792,110 +32625,166 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // If the callback throws an exception or returns non-zero, then the // transaction is aborted. If CALLBACK is an empty string, the callback // is disabled. - case DB_COMMIT_HOOK: - { - if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18412 /* "?CALLBACK?" */) - return 1 - } else if objc == 2 { - if (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+184, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit, uintptr(0))) - } - } else { - var zCommit uintptr - // var len int32 at bp+1024, 4 - - if (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit) - } - zCommit = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1024 /* &len */) - if (zCommit != 0) && (*(*int32)(unsafe.Pointer(bp + 1024 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1024 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit, zCommit, (uint64(*(*int32)(unsafe.Pointer(bp + 1024 /* len */)) + 1))) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit = uintptr(0) - } - if (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0 { - (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp - sqlite3.Xsqlite3_commit_hook(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) int32 }{DbCommitHandler})), pDb) - } else { - sqlite3.Xsqlite3_commit_hook(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) - } - } - break - } +__13: + if !(objc > 3) { + goto __107 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9543 /* "?CALLBACK?" */) + return 1 + goto __108 +__107: + if !(objc == 2) { + goto __109 + } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0) { + goto __111 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+184, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit, uintptr(0))) +__111: + ; + goto __110 +__109: + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0) { + goto __112 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit) +__112: + ; + zCommit = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1048 /* &len3 */) + if !((zCommit != 0) && (*(*int32)(unsafe.Pointer(bp + 1048 /* len3 */)) > 0)) { + goto __113 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1048 /* len3 */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit, zCommit, (uint64(*(*int32)(unsafe.Pointer(bp + 1048 /* len3 */)) + 1))) + goto __114 +__113: + (*SqliteDb)(unsafe.Pointer(pDb)).FzCommit = uintptr(0) +__114: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzCommit != 0) { + goto __115 + } + (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp + sqlite3.Xsqlite3_commit_hook(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) int32 }{DbCommitHandler})), pDb) + goto __116 +__115: + sqlite3.Xsqlite3_commit_hook(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) +__116: + ; +__110: + ; +__108: + ; + goto __3 // $db complete SQL // // Return TRUE if SQL is a complete SQL statement. Return FALSE if // additional lines of input are needed. This is similar to the // built-in "info complete" command of Tcl. - case DB_COMPLETE: - { - var pResult uintptr - var isComplete int32 - if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+16552 /* "SQL" */) - return 1 - } - isComplete = sqlite3.Xsqlite3_complete(tls, tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0))) - pResult = tcl.XTcl_GetObjResult(tls, interp) - tcl.XTcl_SetIntObj(tls, pResult, (crt.Bool32((isComplete) != 0))) - break - } +__14: + if !(objc != 3) { + goto __117 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9753 /* "SQL" */) + return 1 +__117: + ; + isComplete = sqlite3.Xsqlite3_complete(tls, tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0))) + pResult1 = tcl.XTcl_GetObjResult(tls, interp) + tcl.XTcl_SetIntObj(tls, pResult1, (crt.Bool32((isComplete) != 0))) + goto __3 // $db config ?OPTION? ?BOOLEAN? // // Configure the database connection using the sqlite3_db_config() // interface. - case DB_CONFIG: - { - var pResult uintptr - var ii int32 - if objc > 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18622 /* "?OPTION? ?BOOLEA..." */) - return 1 - } - if objc == 2 { - // With no arguments, list all configuration options and with the - // current value - pResult = tcl.XTcl_NewListObj(tls, 0, uintptr(0)) - for ii = 0; uint64(ii) < (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{}))); ii++ { - *(*int32)(unsafe.Pointer(bp + 1028 /* v */)) = 0 - sqlite3.Xsqlite3_db_config(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, aDbConfig[ii].Fop, crt.VaList(bp+200, -1, bp+1028 /* &v */)) - tcl.XTcl_ListObjAppendElement(tls, interp, pResult, - tcl.XTcl_NewStringObj(tls, aDbConfig[ii].FzName, -1)) - tcl.XTcl_ListObjAppendElement(tls, interp, pResult, - tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 1028 /* v */)))) - } - } else { - var zOpt uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - *(*int32)(unsafe.Pointer(bp + 1032 /* onoff */)) = -1 - *(*int32)(unsafe.Pointer(bp + 1036 /* v */)) = 0 - if int32(*(*int8)(unsafe.Pointer(zOpt + uintptr(0)))) == '-' { - zOpt++ - } - for ii = 0; uint64(ii) < (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{}))); ii++ { - if crt.Xstrcmp(tls, aDbConfig[ii].FzName, zOpt) == 0 { - break - } - } - if uint64(ii) >= (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{}))) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+216, ts+18641 /* "unknown config o..." */, zOpt, - ts+18666 /* "\"" */, uintptr(0))) - return 1 - } - if objc == 4 { - if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1032 /* &onoff */) != 0 { - return 1 - } - } - sqlite3.Xsqlite3_db_config(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, aDbConfig[ii].Fop, crt.VaList(bp+248, *(*int32)(unsafe.Pointer(bp + 1032 /* onoff */)), bp+1036 /* &v */)) - pResult = tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 1036 /* v */))) - } - tcl.XTcl_SetObjResult(tls, interp, pResult) - break - } +__15: + if !(objc > 4) { + goto __118 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9757 /* "?OPTION? ?BOOLEA..." */) + return 1 +__118: + ; + if !(objc == 2) { + goto __119 + } + // With no arguments, list all configuration options and with the + // current value + pResult2 = tcl.XTcl_NewListObj(tls, 0, uintptr(0)) + ii = 0 +__121: + if !(uint64(ii) < (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{})))) { + goto __123 + } + *(*int32)(unsafe.Pointer(bp + 1052 /* v */)) = 0 + sqlite3.Xsqlite3_db_config(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, aDbConfig[ii].Fop, crt.VaList(bp+200, -1, bp+1052 /* &v */)) + tcl.XTcl_ListObjAppendElement(tls, interp, pResult2, + tcl.XTcl_NewStringObj(tls, aDbConfig[ii].FzName, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pResult2, + tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 1052 /* v */)))) + goto __122 +__122: + ii++ + goto __121 + goto __123 +__123: + ; + goto __120 +__119: + zOpt = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) + *(*int32)(unsafe.Pointer(bp + 1056 /* onoff */)) = -1 + *(*int32)(unsafe.Pointer(bp + 1060 /* v1 */)) = 0 + if !(int32(*(*int8)(unsafe.Pointer(zOpt + uintptr(0)))) == '-') { + goto __124 + } + zOpt++ +__124: + ; + ii = 0 +__125: + if !(uint64(ii) < (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{})))) { + goto __127 + } + if !(crt.Xstrcmp(tls, aDbConfig[ii].FzName, zOpt) == 0) { + goto __128 + } + goto __127 +__128: + ; + goto __126 +__126: + ii++ + goto __125 + goto __127 +__127: + ; + if !(uint64(ii) >= (uint64(unsafe.Sizeof(aDbConfig)) / uint64(unsafe.Sizeof(DbConfigChoices{})))) { + goto __129 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+216, ts+9776 /* "unknown config o..." */, zOpt, + ts+9801 /* "\"" */, uintptr(0))) + return 1 +__129: + ; + if !(objc == 4) { + goto __130 + } + if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1056 /* &onoff */) != 0) { + goto __131 + } + return 1 +__131: + ; +__130: + ; + sqlite3.Xsqlite3_db_config(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, aDbConfig[ii].Fop, crt.VaList(bp+248, *(*int32)(unsafe.Pointer(bp + 1056 /* onoff */)), bp+1060 /* &v1 */)) + pResult2 = tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 1060 /* v1 */))) +__120: + ; + tcl.XTcl_SetObjResult(tls, interp, pResult2) + goto __3 // $db copy conflict-algorithm table filename ?SEPARATOR? ?NULLINDICATOR? // @@ -34913,253 +32802,440 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // This command usage is equivalent to the sqlite2.x COPY statement, // which imports file data into a table using the PostgreSQL COPY file format: // $db copy $conflit_algo $table_name $filename \t \\N - case DB_COPY: - { - var zTable uintptr // Insert data into this table - var zFile uintptr // The file from which to extract data - var zConflict uintptr // The conflict algorithm to use - // var pStmt uintptr at bp+1040, 8 - // A statement - var nCol int32 // Number of columns in the table - var nByte int32 // Number of bytes in an SQL string - var i int32 - var j int32 // Loop counters - var nSep int32 // Number of bytes in zSep[] - var nNull int32 // Number of bytes in zNull[] - var zSql uintptr // An SQL statement - var zLine uintptr // A single line of input from the file - var azCol uintptr // zLine[] broken up into columns - var zCommit uintptr // How to commit changes - var in uintptr // The input file - var lineno int32 = 0 // Line number of input file - // var zLineNum [80]int8 at bp+1048, 80 - // Line number print buffer - var pResult uintptr // interp result - - var zSep uintptr - var zNull uintptr - if (objc < 5) || (objc > 7) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, - ts+18668 /* "CONFLICT-ALGORIT..." */) - return 1 - } - if objc >= 6 { - zSep = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(5)*8)), uintptr(0)) - } else { - zSep = ts + 18730 /* "\t" */ - } - if objc >= 7 { - zNull = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(6)*8)), uintptr(0)) - } else { - zNull = ts + 792 /* "" */ - } - zConflict = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)) - zTable = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), uintptr(0)) - zFile = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), uintptr(0)) - nSep = strlen30(tls, zSep) - nNull = strlen30(tls, zNull) - if nSep == 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+264, ts+18732, /* "Error: non-null ..." */ - uintptr(0))) - return 1 - } - if ((((crt.Xstrcmp(tls, zConflict, ts+18776 /* "rollback" */) != 0) && (crt.Xstrcmp(tls, zConflict, ts+18785 /* "abort" */) != 0)) && (crt.Xstrcmp(tls, zConflict, ts+18791 /* "fail" */) != 0)) && (crt.Xstrcmp(tls, zConflict, ts+18796 /* "ignore" */) != 0)) && (crt.Xstrcmp(tls, zConflict, ts+18803 /* "replace" */) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+280, ts+18811 /* "Error: \"" */, zConflict, +__16: // The input file + lineno = 0 + if !((objc < 5) || (objc > 7)) { + goto __132 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, + ts+9803 /* "CONFLICT-ALGORIT..." */) + return 1 +__132: + ; + if !(objc >= 6) { + goto __133 + } + zSep = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(5)*8)), uintptr(0)) + goto __134 +__133: + zSep = ts + 9865 /* "\t" */ +__134: + ; + if !(objc >= 7) { + goto __135 + } + zNull = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(6)*8)), uintptr(0)) + goto __136 +__135: + zNull = ts + 488 /* "" */ +__136: + ; + zConflict = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)) + zTable = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), uintptr(0)) + zFile = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), uintptr(0)) + nSep = strlen30(tls, zSep) + nNull = strlen30(tls, zNull) + if !(nSep == 0) { + goto __137 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+264, ts+9867, /* "Error: non-null ..." */ + uintptr(0))) + return 1 +__137: + ; + if !(((((crt.Xstrcmp(tls, zConflict, ts+9911 /* "rollback" */) != 0) && (crt.Xstrcmp(tls, zConflict, ts+9920 /* "abort" */) != 0)) && (crt.Xstrcmp(tls, zConflict, ts+9926 /* "fail" */) != 0)) && (crt.Xstrcmp(tls, zConflict, ts+9931 /* "ignore" */) != 0)) && (crt.Xstrcmp(tls, zConflict, ts+9938 /* "replace" */) != 0)) { + goto __138 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+280, ts+9946 /* "Error: \"" */, zConflict, - ts+18820 /* "\", conflict-algo..." */, uintptr(0))) - return 1 - } - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+10713 /* "SELECT * FROM '%..." */, crt.VaList(bp+312, zTable)) - if zSql == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+320, ts+18900 /* "Error: no such t..." */, zTable, uintptr(0))) - return 1 - } - nByte = strlen30(tls, zSql) - rc = sqlite3.Xsqlite3_prepare(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSql, -1, bp+1040 /* &pStmt */, uintptr(0)) - sqlite3.Xsqlite3_free(tls, zSql) - if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+344, ts+18923 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) - nCol = 0 - } else { - nCol = sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */))) - } - sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */))) - if nCol == 0 { - return 1 - } - zSql = crt.Xmalloc(tls, (uint64((nByte + 50) + (nCol * 2)))) - if zSql == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+368, ts+18931 /* "Error: can't mal..." */, uintptr(0))) - return 1 - } - sqlite3.Xsqlite3_snprintf(tls, (nByte + 50), zSql, ts+18953, /* "INSERT OR %q INT..." */ - crt.VaList(bp+384, zConflict, zTable)) - j = strlen30(tls, zSql) - for i = 1; i < nCol; i++ { - *(*int8)(unsafe.Pointer(zSql + uintptr(crt.PostIncInt32(&j, 1)))) = int8(',') - *(*int8)(unsafe.Pointer(zSql + uintptr(crt.PostIncInt32(&j, 1)))) = int8('?') - } - *(*int8)(unsafe.Pointer(zSql + uintptr(crt.PostIncInt32(&j, 1)))) = int8(')') - *(*int8)(unsafe.Pointer(zSql + uintptr(j))) = int8(0) - rc = sqlite3.Xsqlite3_prepare(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSql, -1, bp+1040 /* &pStmt */, uintptr(0)) - crt.Xfree(tls, zSql) - if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+400, ts+18923 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) - sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */))) - return 1 - } - in = crt.Xfopen(tls, zFile, ts+3756 /* "rb" */) - if in == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+424, ts+18985 /* "Error: cannot op..." */, zFile, uintptr(0))) - sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */))) - return 1 - } - azCol = crt.Xmalloc(tls, (uint64(unsafe.Sizeof(uintptr(0))) * (uint64(nCol + 1)))) - if azCol == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+448, ts+18931 /* "Error: can't mal..." */, uintptr(0))) - crt.Xfclose(tls, in) - return 1 - } - sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, ts+15574 /* "BEGIN" */, uintptr(0), uintptr(0), uintptr(0)) - zCommit = ts + 15071 /* "COMMIT" */ - for (crt.AssignUintptr(&zLine, local_getline(tls, uintptr(0), in))) != uintptr(0) { - var z uintptr - lineno++ - *(*uintptr)(unsafe.Pointer(azCol + uintptr(0)*8)) = zLine - i = 0 - z = zLine - for ; *(*int8)(unsafe.Pointer(z)) != 0; z++ { - if (int32(*(*int8)(unsafe.Pointer(z))) == int32(*(*int8)(unsafe.Pointer(zSep + uintptr(0))))) && (crt.Xstrncmp(tls, z, zSep, uint64(nSep)) == 0) { - *(*int8)(unsafe.Pointer(z)) = int8(0) - i++ - if i < nCol { - *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)) = (z + uintptr(nSep)) - z += (uintptr(nSep - 1)) - } - } - } - if (i + 1) != nCol { - var zErr uintptr - var nErr int32 = (strlen30(tls, zFile) + 200) - zErr = crt.Xmalloc(tls, uint64(nErr)) - if zErr != 0 { - sqlite3.Xsqlite3_snprintf(tls, nErr, zErr, - ts+19011, /* "Error: %s line %..." */ - crt.VaList(bp+464, zFile, lineno, nCol, (i+1))) - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+496, zErr, uintptr(0))) - crt.Xfree(tls, zErr) - } - zCommit = ts + 7303 /* "ROLLBACK" */ - break - } - for i = 0; i < nCol; i++ { - // check for null data, if so, bind as null - if ((nNull > 0) && (crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zNull) == 0)) || - (strlen30(tls, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8))) == 0) { - sqlite3.Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */)), (i + 1)) - } else { - sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */)), (i + 1), *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), -1, uintptr(0)) - } - } - sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */))) - rc = sqlite3.Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */))) - crt.Xfree(tls, zLine) - if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+512, ts+18923 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) - zCommit = ts + 7303 /* "ROLLBACK" */ - break - } - } - crt.Xfree(tls, azCol) - crt.Xfclose(tls, in) - sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1040 /* pStmt */))) - sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zCommit, uintptr(0), uintptr(0), uintptr(0)) + ts+9955 /* "\", conflict-algo..." */, uintptr(0))) + return 1 +__138: + ; + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+10035 /* "SELECT * FROM '%..." */, crt.VaList(bp+312, zTable)) + if !(zSql == uintptr(0)) { + goto __139 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+320, ts+10054 /* "Error: no such t..." */, zTable, uintptr(0))) + return 1 +__139: + ; + nByte = strlen30(tls, zSql) + rc = sqlite3.Xsqlite3_prepare(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSql, -1, bp+1064 /* &pStmt */, uintptr(0)) + sqlite3.Xsqlite3_free(tls, zSql) + if !(rc != 0) { + goto __140 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+344, ts+10077 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) + nCol = 0 + goto __141 +__140: + nCol = sqlite3.Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */))) +__141: + ; + sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */))) + if !(nCol == 0) { + goto __142 + } + return 1 +__142: + ; + zSql = crt.Xmalloc(tls, (uint64((nByte + 50) + (nCol * 2)))) + if !(zSql == uintptr(0)) { + goto __143 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+368, ts+10085 /* "Error: can't mal..." */, uintptr(0))) + return 1 +__143: + ; + sqlite3.Xsqlite3_snprintf(tls, (nByte + 50), zSql, ts+10107, /* "INSERT OR %q INT..." */ + crt.VaList(bp+384, zConflict, zTable)) + j = strlen30(tls, zSql) + i = 1 +__144: + if !(i < nCol) { + goto __146 + } + *(*int8)(unsafe.Pointer(zSql + uintptr(crt.PostIncInt32(&j, 1)))) = int8(',') + *(*int8)(unsafe.Pointer(zSql + uintptr(crt.PostIncInt32(&j, 1)))) = int8('?') + goto __145 +__145: + i++ + goto __144 + goto __146 +__146: + ; + *(*int8)(unsafe.Pointer(zSql + uintptr(crt.PostIncInt32(&j, 1)))) = int8(')') + *(*int8)(unsafe.Pointer(zSql + uintptr(j))) = int8(0) + rc = sqlite3.Xsqlite3_prepare(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSql, -1, bp+1064 /* &pStmt */, uintptr(0)) + crt.Xfree(tls, zSql) + if !(rc != 0) { + goto __147 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+400, ts+10077 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) + sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */))) + return 1 +__147: + ; + in = crt.Xfopen(tls, zFile, ts+2937 /* "rb" */) + if !(in == uintptr(0)) { + goto __148 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+424, ts+10139 /* "Error: cannot op..." */, zFile, uintptr(0))) + sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */))) + return 1 +__148: + ; + azCol = crt.Xmalloc(tls, (uint64(unsafe.Sizeof(uintptr(0))) * (uint64(nCol + 1)))) + if !(azCol == uintptr(0)) { + goto __149 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+448, ts+10085 /* "Error: can't mal..." */, uintptr(0))) + crt.Xfclose(tls, in) + return 1 +__149: + ; + sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, ts+10165 /* "BEGIN" */, uintptr(0), uintptr(0), uintptr(0)) + zCommit1 = ts + 9473 /* "COMMIT" */ +__150: + if !((crt.AssignUintptr(&zLine, local_getline(tls, uintptr(0), in))) != uintptr(0)) { + goto __151 + } + lineno++ + *(*uintptr)(unsafe.Pointer(azCol + uintptr(0)*8)) = zLine + i = 0 + z = zLine +__152: + if !(*(*int8)(unsafe.Pointer(z)) != 0) { + goto __154 + } + if !((int32(*(*int8)(unsafe.Pointer(z))) == int32(*(*int8)(unsafe.Pointer(zSep + uintptr(0))))) && (crt.Xstrncmp(tls, z, zSep, uint64(nSep)) == 0)) { + goto __155 + } + *(*int8)(unsafe.Pointer(z)) = int8(0) + i++ + if !(i < nCol) { + goto __156 + } + *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)) = (z + uintptr(nSep)) + z += (uintptr(nSep - 1)) +__156: + ; +__155: + ; + goto __153 +__153: + z++ + goto __152 + goto __154 +__154: + ; + if !((i + 1) != nCol) { + goto __157 + } + nErr = (strlen30(tls, zFile) + 200) + zErr = crt.Xmalloc(tls, uint64(nErr)) + if !(zErr != 0) { + goto __158 + } + sqlite3.Xsqlite3_snprintf(tls, nErr, zErr, + ts+10171, /* "Error: %s line %..." */ + crt.VaList(bp+464, zFile, lineno, nCol, (i+1))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+496, zErr, uintptr(0))) + crt.Xfree(tls, zErr) +__158: + ; + zCommit1 = ts + 5807 /* "ROLLBACK" */ + goto __151 +__157: + ; + i = 0 +__159: + if !(i < nCol) { + goto __161 + } + // check for null data, if so, bind as null + if !(((nNull > 0) && (crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), zNull) == 0)) || + (strlen30(tls, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8))) == 0)) { + goto __162 + } + sqlite3.Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */)), (i + 1)) + goto __163 +__162: + sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */)), (i + 1), *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), -1, uintptr(0)) +__163: + ; + goto __160 +__160: + i++ + goto __159 + goto __161 +__161: + ; + sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */))) + rc = sqlite3.Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */))) + crt.Xfree(tls, zLine) + if !(rc != 0) { + goto __164 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+512, ts+10077 /* "Error: " */, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) + zCommit1 = ts + 5807 /* "ROLLBACK" */ + goto __151 +__164: + ; + goto __150 +__151: + ; + crt.Xfree(tls, azCol) + crt.Xfclose(tls, in) + sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 1064 /* pStmt */))) + sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zCommit1, uintptr(0), uintptr(0), uintptr(0)) - if int32(*(*int8)(unsafe.Pointer(zCommit + uintptr(0)))) == 'C' { - // success, set result as number of lines processed - pResult = tcl.XTcl_GetObjResult(tls, interp) - tcl.XTcl_SetIntObj(tls, pResult, lineno) - rc = 0 - } else { - // failure, append lineno where failed - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([80]int8{})), bp+1048 /* &zLineNum[0] */, ts+1647 /* "%d" */, crt.VaList(bp+536, lineno)) - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+544, ts+19071 /* ", failed while p..." */, bp+1048, /* &zLineNum[0] */ - uintptr(0))) - rc = 1 - } - break - } + if !(int32(*(*int8)(unsafe.Pointer(zCommit1 + uintptr(0)))) == 'C') { + goto __165 + } + // success, set result as number of lines processed + pResult3 = tcl.XTcl_GetObjResult(tls, interp) + tcl.XTcl_SetIntObj(tls, pResult3, lineno) + rc = 0 + goto __166 +__165: + // failure, append lineno where failed + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([80]int8{})), bp+1072 /* &zLineNum[0] */, ts+1237 /* "%d" */, crt.VaList(bp+536, lineno)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+544, ts+10231 /* ", failed while p..." */, bp+1072, /* &zLineNum[0] */ + uintptr(0))) + rc = 1 +__166: + ; + goto __3 // $db deserialize ?-maxsize N? ?-readonly BOOL? ?DATABASE? VALUE // // Reopen DATABASE (default "main") using the content in $VALUE - case DB_DESERIALIZE: - { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+568, ts+19104, /* "MEMDB not availa..." */ - uintptr(0))) - rc = 1 - break - } +__17: + zSchema = uintptr(0) + pValue = uintptr(0) + *(*sqlite3_int64)(unsafe.Pointer(bp + 1152 /* mxSize */)) = int64(0) + *(*int32)(unsafe.Pointer(bp + 1160 /* isReadonly */)) = 0 + + if !(objc < 3) { + goto __167 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10264 /* "?DATABASE? VALUE" */) + rc = 1 + goto __3 +__167: + ; + i1 = 2 +__168: + if !(i1 < (objc - 1)) { + goto __170 + } + z1 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i1)*8))) + if !((crt.Xstrcmp(tls, z1, ts+10281 /* "-maxsize" */) == 0) && (i1 < (objc - 2))) { + goto __171 + } + rc = tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(crt.PreIncInt32(&i1, 1))*8)), bp+1152 /* &mxSize */) + if !(rc != 0) { + goto __172 + } + goto deserialize_error +__172: + ; + goto __169 +__171: + ; + if !((crt.Xstrcmp(tls, z1, ts+10290 /* "-readonly" */) == 0) && (i1 < (objc - 2))) { + goto __173 + } + rc = tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(crt.PreIncInt32(&i1, 1))*8)), bp+1160 /* &isReadonly */) + if !(rc != 0) { + goto __174 + } + goto deserialize_error +__174: + ; + goto __169 +__173: + ; + if !(((zSchema == uintptr(0)) && (i1 == (objc - 2))) && (int32(*(*int8)(unsafe.Pointer(z1 + uintptr(0)))) != '-')) { + goto __175 + } + zSchema = z1 + goto __169 +__175: + ; + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+568, ts+10300 /* "unknown option: " */, z1, uintptr(0))) + rc = 1 + goto deserialize_error + goto __169 +__169: + i1++ + goto __168 + goto __170 +__170: + ; + pValue = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) + pBA = tcl.XTcl_GetByteArrayFromObj(tls, pValue, bp+1164 /* &len4 */) + pData = sqlite3.Xsqlite3_malloc64(tls, uint64(*(*int32)(unsafe.Pointer(bp + 1164 /* len4 */)))) + if !((pData == uintptr(0)) && (*(*int32)(unsafe.Pointer(bp + 1164 /* len4 */)) > 0)) { + goto __176 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+592, ts+1929 /* "out of memory" */, uintptr(0))) + rc = 1 + goto __177 +__176: + if !(*(*int32)(unsafe.Pointer(bp + 1164 /* len4 */)) > 0) { + goto __178 + } + crt.Xmemcpy(tls, pData, pBA, uint64(*(*int32)(unsafe.Pointer(bp + 1164 /* len4 */)))) +__178: + ; + if !(*(*int32)(unsafe.Pointer(bp + 1160 /* isReadonly */)) != 0) { + goto __179 + } + flags = (1 | 4) + goto __180 +__179: + flags = (1 | 2) +__180: + ; + xrc = sqlite3.Xsqlite3_deserialize(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSchema, pData, int64(*(*int32)(unsafe.Pointer(bp + 1164 /* len4 */))), int64(*(*int32)(unsafe.Pointer(bp + 1164 /* len4 */))), uint32(flags)) + if !(xrc != 0) { + goto __181 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+608, ts+10317 /* "unable to set ME..." */, uintptr(0))) + rc = 1 +__181: + ; + if !(*(*sqlite3_int64)(unsafe.Pointer(bp + 1152 /* mxSize */)) > int64(0)) { + goto __182 + } + sqlite3.Xsqlite3_file_control(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSchema, 36, bp+1152 /* &mxSize */) +__182: + ; +__177: + ; +deserialize_error: + goto __3 // $db enable_load_extension BOOLEAN // // Turn the extension loading feature on or off. It if off by // default. - case DB_ENABLE_LOAD_EXTENSION: - { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+584, ts+19138, /* "extension loadin..." */ - uintptr(0))) - return 1 - } +__18: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+624, ts+10345, /* "extension loadin..." */ + uintptr(0))) + return 1 // $db errorcode // // Return the numeric error code that was returned by the most recent // call to sqlite3_exec(). - case DB_ERRORCODE: - { - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_errcode(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb))) - break - } +__19: + tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_errcode(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb))) + goto __3 // $db exists $sql // $db onecolumn $sql // // The onecolumn method is the equivalent of: // lindex [$db eval $sql] 0 - case DB_EXISTS: - fallthrough - case DB_ONECOLUMN: - { - var pResult uintptr = uintptr(0) - // var sEval DbEvalContext at bp+1128, 56 - - if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+16552 /* "SQL" */) - return 1 - } +__20: +__21: + pResult4 = uintptr(0) + if !(objc != 3) { + goto __183 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9753 /* "SQL" */) + return 1 +__183: + ; - dbEvalInit(tls, bp+1128 /* &sEval */, pDb, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0), 0) - rc = dbEvalStep(tls, bp+1128 /* &sEval */) - if *(*int32)(unsafe.Pointer(bp + 992 /* choice */)) == DB_ONECOLUMN { - if rc == 0 { - pResult = dbEvalColumnValue(tls, bp+1128 /* &sEval */, 0) - } else if rc == 3 { - tcl.XTcl_ResetResult(tls, interp) - } - } else if (rc == 3) || (rc == 0) { - pResult = tcl.XTcl_NewIntObj(tls, (crt.Bool32((crt.Bool32(rc == 0)) != 0))) - } - dbEvalFinalize(tls, bp+1128 /* &sEval */) - if pResult != 0 { - tcl.XTcl_SetObjResult(tls, interp, pResult) - } + dbEvalInit(tls, bp+1168 /* &sEval */, pDb, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0), 0) + rc = dbEvalStep(tls, bp+1168 /* &sEval */) + if !(*(*int32)(unsafe.Pointer(bp + 1016 /* choice */)) == 23) { + goto __184 + } + if !(rc == 0) { + goto __186 + } + pResult4 = dbEvalColumnValue(tls, bp+1168 /* &sEval */, 0) + goto __187 +__186: + if !(rc == 3) { + goto __188 + } + tcl.XTcl_ResetResult(tls, interp) +__188: + ; +__187: + ; + goto __185 +__184: + if !((rc == 3) || (rc == 0)) { + goto __189 + } + pResult4 = tcl.XTcl_NewIntObj(tls, (crt.Bool32((crt.Bool32(rc == 0)) != 0))) +__189: + ; +__185: + ; + dbEvalFinalize(tls, bp+1168 /* &sEval */) + if !(pResult4 != 0) { + goto __190 + } + tcl.XTcl_SetObjResult(tls, interp, pResult4) +__190: + ; - if rc == 3 { - rc = 0 - } - break - } + if !(rc == 3) { + goto __191 + } + rc = 0 +__191: + ; + goto __3 // $db eval ?options? $sql ?array? ?{ ...code... }? // @@ -35168,74 +33244,109 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // If "array" and "code" are omitted, then no callback is every invoked. // If "array" is an empty string, then the values are placed in variables // that have the same name as the fields extracted by the query. - case DB_EVAL: - { - var evalFlags int32 = 0 - var zOpt uintptr - for ((objc > 3) && ((crt.AssignUintptr(&zOpt, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))))) != uintptr(0))) && (int32(*(*int8)(unsafe.Pointer(zOpt + uintptr(0)))) == '-') { - if crt.Xstrcmp(tls, zOpt, ts+19186 /* "-withoutnulls" */) == 0 { - evalFlags = evalFlags | (0x00001) - } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+600, ts+19200 /* "unknown option: ..." */, zOpt, ts+18666 /* "\"" */, uintptr(0))) - return 1 - } - objc-- - objv += 8 - } - if (objc < 3) || (objc > 5) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, - ts+19218 /* "?OPTIONS? SQL ?A..." */) - return 1 - } - - if objc == 3 { - // var sEval DbEvalContext at bp+1184, 56 - - var pRet uintptr = tcl.XTcl_NewObj(tls) - (*Tcl_Obj)(unsafe.Pointer(pRet)).FrefCount++ - dbEvalInit(tls, bp+1184 /* &sEval */, pDb, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0), 0) - for 0 == (crt.AssignInt32(&rc, dbEvalStep(tls, bp+1184 /* &sEval */))) { - var i int32 - // var nCol int32 at bp+1240, 4 - - dbEvalRowInfo(tls, bp+1184 /* &sEval */, bp+1240 /* &nCol */, uintptr(0)) - for i = 0; i < *(*int32)(unsafe.Pointer(bp + 1240 /* nCol */)); i++ { - tcl.XTcl_ListObjAppendElement(tls, interp, pRet, dbEvalColumnValue(tls, bp+1184 /* &sEval */, i)) - } - } - dbEvalFinalize(tls, bp+1184 /* &sEval */) - if rc == 3 { - tcl.XTcl_SetObjResult(tls, interp, pRet) - rc = 0 - } - for ok1 := true; ok1; ok1 = 0 != 0 { - var _objPtr uintptr = pRet - if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { - tcl.XTclFreeObj(tls, _objPtr) - } - } - } else { - // var cd2 [2]ClientData at bp+1248, 16 +__22: + evalFlags = 0 +__192: + if !(((objc > 3) && ((crt.AssignUintptr(&zOpt1, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))))) != uintptr(0))) && (int32(*(*int8)(unsafe.Pointer(zOpt1 + uintptr(0)))) == '-')) { + goto __193 + } + if !(crt.Xstrcmp(tls, zOpt1, ts+10393 /* "-withoutnulls" */) == 0) { + goto __194 + } + evalFlags = evalFlags | (0x00001) + goto __195 +__194: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+640, ts+10407 /* "unknown option: ..." */, zOpt1, ts+9801 /* "\"" */, uintptr(0))) + return 1 +__195: + ; + objc-- + objv += 8 + goto __192 +__193: + ; + if !((objc < 3) || (objc > 5)) { + goto __196 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, + ts+10425 /* "?OPTIONS? SQL ?A..." */) + return 1 +__196: + ; - var p uintptr - var pArray uintptr = uintptr(0) - var pScript uintptr + if !(objc == 3) { + goto __197 + } + pRet = tcl.XTcl_NewObj(tls) + (*Tcl_Obj)(unsafe.Pointer(pRet)).FrefCount++ + dbEvalInit(tls, bp+1224 /* &sEval1 */, pDb, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0), 0) +__199: + if !(0 == (crt.AssignInt32(&rc, dbEvalStep(tls, bp+1224 /* &sEval1 */)))) { + goto __200 + } + dbEvalRowInfo(tls, bp+1224 /* &sEval1 */, bp+1280 /* &nCol1 */, uintptr(0)) + i2 = 0 +__201: + if !(i2 < *(*int32)(unsafe.Pointer(bp + 1280 /* nCol1 */))) { + goto __203 + } + tcl.XTcl_ListObjAppendElement(tls, interp, pRet, dbEvalColumnValue(tls, bp+1224 /* &sEval1 */, i2)) + goto __202 +__202: + i2++ + goto __201 + goto __203 +__203: + ; + goto __199 +__200: + ; + dbEvalFinalize(tls, bp+1224 /* &sEval1 */) + if !(rc == 3) { + goto __204 + } + tcl.XTcl_SetObjResult(tls, interp, pRet) + rc = 0 +__204: + ; +__205: + _objPtr1 = pRet + if !(crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr1))).FrefCount, 1) <= 1) { + goto __208 + } + tcl.XTclFreeObj(tls, _objPtr1) +__208: + ; + goto __206 +__206: + if 0 != 0 { + goto __205 + } + goto __207 +__207: + ; + goto __198 +__197: + pArray = uintptr(0) - if (objc >= 5) && (*(*int8)(unsafe.Pointer(tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))))) != 0) { - pArray = *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)) - } - pScript = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) - (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ + if !((objc >= 5) && (*(*int8)(unsafe.Pointer(tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))))) != 0)) { + goto __209 + } + pArray = *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)) +__209: + ; + pScript = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) + (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ - p = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(DbEvalContext{}))) - dbEvalInit(tls, p, pDb, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), pArray, evalFlags) + p = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(DbEvalContext{}))) + dbEvalInit(tls, p, pDb, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), pArray, evalFlags) - *(*ClientData)(unsafe.Pointer(bp + 1248 /* &cd2[0] */ + uintptr(0)*8)) = p - *(*ClientData)(unsafe.Pointer(bp + 1248 /* &cd2[0] */ + uintptr(1)*8)) = pScript - rc = DbEvalNextCmd(tls, bp+1248 /* &cd2[0] */, interp, 0) - } - break - } + *(*ClientData)(unsafe.Pointer(bp + 1288 /* &cd2[0] */ + uintptr(0)*8)) = p + *(*ClientData)(unsafe.Pointer(bp + 1288 /* &cd2[0] */ + uintptr(1)*8)) = pScript + rc = DbEvalNextCmd(tls, bp+1288 /* &cd2[0] */, interp, 0) +__198: + ; + goto __3 // $db function NAME [OPTIONS] SCRIPT // @@ -35248,138 +33359,207 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // --directonly Prohibit use inside triggers and views // --innocuous Has no side effects or information leaks // --returntype TYPE Specify the return type of the function - case DB_FUNCTION: - { - var flags int32 = 1 - var pFunc uintptr - var pScript uintptr - var zName uintptr - *(*int32)(unsafe.Pointer(bp + 1264 /* nArg */)) = -1 - var i int32 - *(*int32)(unsafe.Pointer(bp + 1320 /* eType */)) = 5 - if objc < 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19254 /* "NAME ?SWITCHES? ..." */) - return 1 - } - for i = 3; i < (objc - 1); i++ { - var z uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) - var n int32 = strlen30(tls, z) - if (n > 1) && (crt.Xstrncmp(tls, z, ts+19277 /* "-argcount" */, uint64(n)) == 0) { - if i == (objc - 2) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+632, ts+19287 /* "option requires ..." */, z, uintptr(0))) - return 1 - } - if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+1264 /* &nArg */) != 0 { - return 1 - } - if *(*int32)(unsafe.Pointer(bp + 1264 /* nArg */)) < 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+656, ts+19317, /* "number of argume..." */ - uintptr(0))) - return 1 - } - i++ - } else if (n > 1) && (crt.Xstrncmp(tls, z, ts+19358 /* "-deterministic" */, uint64(n)) == 0) { - flags = flags | (0x000000800) - } else if (n > 1) && (crt.Xstrncmp(tls, z, ts+19373 /* "-directonly" */, uint64(n)) == 0) { - flags = flags | (0x000080000) - } else if (n > 1) && (crt.Xstrncmp(tls, z, ts+19385 /* "-innocuous" */, uint64(n)) == 0) { - flags = flags | (0x000200000) - } else if (n > 1) && (crt.Xstrncmp(tls, z, ts+19396 /* "-returntype" */, uint64(n)) == 0) { - *(*[6]uintptr)(unsafe.Pointer(bp + 1272 /* azType */)) = [6]uintptr{ts + 8373 /* "integer" */, ts + 19408 /* "real" */, ts + 19413 /* "text" */, ts + 19418 /* "blob" */, ts + 19423 /* "any" */, uintptr(0)} - if !(((1 == 1) && (2 == 2)) && (3 == 3)) { - crt.X__assert_fail(tls, ts+19427 /* "1==1 && 2==2 && ..." */, ts+17039 /* "testdata/sqlite-..." */, uint32(2865), uintptr(unsafe.Pointer(&__func__100))) - } - if !((4 == 4) && (5 == 5)) { - crt.X__assert_fail(tls, ts+19448 /* "4==4 && 5==5" */, ts+17039 /* "testdata/sqlite-..." */, uint32(2866), uintptr(unsafe.Pointer(&__func__100))) - } - if i == (objc - 2) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+672, ts+19287 /* "option requires ..." */, z, uintptr(0))) - return 1 - } - i++ - if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+1272 /* &azType[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+19461 /* "type" */, 0, bp+1320 /* &eType */) != 0 { - return 1 - } - *(*int32)(unsafe.Pointer(bp + 1320 /* eType */))++ - } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+696, ts+18565 /* "bad option \"" */, z, +__23: + flags1 = 1 + *(*int32)(unsafe.Pointer(bp + 1304 /* nArg */)) = -1 + *(*int32)(unsafe.Pointer(bp + 1360 /* eType */)) = 5 + if !(objc < 4) { + goto __210 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10461 /* "NAME ?SWITCHES? ..." */) + return 1 +__210: + ; + i3 = 3 +__211: + if !(i3 < (objc - 1)) { + goto __213 + } + z2 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8))) + n1 = strlen30(tls, z2) + if !((n1 > 1) && (crt.Xstrncmp(tls, z2, ts+10484 /* "-argcount" */, uint64(n1)) == 0)) { + goto __214 + } + if !(i3 == (objc - 2)) { + goto __216 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+672, ts+10494 /* "option requires ..." */, z2, uintptr(0))) + return 1 +__216: + ; + if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i3+1))*8)), bp+1304 /* &nArg */) != 0) { + goto __217 + } + return 1 +__217: + ; + if !(*(*int32)(unsafe.Pointer(bp + 1304 /* nArg */)) < 0) { + goto __218 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+696, ts+10524, /* "number of argume..." */ + uintptr(0))) + return 1 +__218: + ; + i3++ + goto __215 +__214: + if !((n1 > 1) && (crt.Xstrncmp(tls, z2, ts+10565 /* "-deterministic" */, uint64(n1)) == 0)) { + goto __219 + } + flags1 = flags1 | (0x000000800) + goto __220 +__219: + if !((n1 > 1) && (crt.Xstrncmp(tls, z2, ts+10580 /* "-directonly" */, uint64(n1)) == 0)) { + goto __221 + } + flags1 = flags1 | (0x000080000) + goto __222 +__221: + if !((n1 > 1) && (crt.Xstrncmp(tls, z2, ts+10592 /* "-innocuous" */, uint64(n1)) == 0)) { + goto __223 + } + flags1 = flags1 | (0x000200000) + goto __224 +__223: + if !((n1 > 1) && (crt.Xstrncmp(tls, z2, ts+10603 /* "-returntype" */, uint64(n1)) == 0)) { + goto __225 + } + *(*[6]uintptr)(unsafe.Pointer(bp + 1312 /* azType */)) = [6]uintptr{ts + 6453 /* "integer" */, ts + 10615 /* "real" */, ts + 10620 /* "text" */, ts + 10625 /* "blob" */, ts + 10630 /* "any" */, uintptr(0)} + + if !(i3 == (objc - 2)) { + goto __227 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+712, ts+10494 /* "option requires ..." */, z2, uintptr(0))) + return 1 +__227: + ; + i3++ + if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i3)*8)), bp+1312 /* &azType[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+10634 /* "type" */, 0, bp+1360 /* &eType */) != 0) { + goto __228 + } + return 1 +__228: + ; + *(*int32)(unsafe.Pointer(bp + 1360 /* eType */))++ + goto __226 +__225: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+736, ts+9696 /* "bad option \"" */, z2, - ts+19466 /* "\": must be -argc..." */, uintptr(0))) - return 1 - } - } + ts+10639 /* "\": must be -argc..." */, uintptr(0))) + return 1 +__226: + ; +__224: + ; +__222: + ; +__220: + ; +__215: + ; + goto __212 +__212: + i3++ + goto __211 + goto __213 +__213: + ; - pScript = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) - zName = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)) - pFunc = findSqlFunc(tls, pDb, zName) - if pFunc == uintptr(0) { - return 1 - } - if (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript != 0 { - for ok2 := true; ok2; ok2 = 0 != 0 { - var _objPtr uintptr = (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript - if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { - tcl.XTclFreeObj(tls, _objPtr) - } - } - } - (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript = pScript - (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ - (*SqlFunc)(unsafe.Pointer(pFunc)).FuseEvalObjv = safeToUseEvalObjv(tls, interp, pScript) - (*SqlFunc)(unsafe.Pointer(pFunc)).FeType = *(*int32)(unsafe.Pointer(bp + 1320 /* eType */)) - rc = sqlite3.Xsqlite3_create_function(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zName, *(*int32)(unsafe.Pointer(bp + 1264 /* nArg */)), flags, - pFunc, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32, uintptr) - }{tclSqlFunc})), uintptr(0), uintptr(0)) - if rc != 0 { - rc = 1 - tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(1)) - } - break - } + pScript1 = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) + zName1 = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(0)) + pFunc = findSqlFunc(tls, pDb, zName1) + if !(pFunc == uintptr(0)) { + goto __229 + } + return 1 +__229: + ; + if !((*SqlFunc)(unsafe.Pointer(pFunc)).FpScript != 0) { + goto __230 + } +__231: + _objPtr2 = (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript + if !(crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr2))).FrefCount, 1) <= 1) { + goto __234 + } + tcl.XTclFreeObj(tls, _objPtr2) +__234: + ; + goto __232 +__232: + if 0 != 0 { + goto __231 + } + goto __233 +__233: + ; +__230: + ; + (*SqlFunc)(unsafe.Pointer(pFunc)).FpScript = pScript1 + (*Tcl_Obj)(unsafe.Pointer(pScript1)).FrefCount++ + (*SqlFunc)(unsafe.Pointer(pFunc)).FuseEvalObjv = safeToUseEvalObjv(tls, interp, pScript1) + (*SqlFunc)(unsafe.Pointer(pFunc)).FeType = *(*int32)(unsafe.Pointer(bp + 1360 /* eType */)) + rc = sqlite3.Xsqlite3_create_function(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zName1, *(*int32)(unsafe.Pointer(bp + 1304 /* nArg */)), flags1, + pFunc, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr) + }{tclSqlFunc})), uintptr(0), uintptr(0)) + if !(rc != 0) { + goto __235 + } + rc = 1 + tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(1)) +__235: + ; + goto __3 // $db incrblob ?-readonly? ?DB? TABLE COLUMN ROWID - case DB_INCRBLOB: - { - var isReadonly int32 = 0 - var zDb uintptr = ts + 354 /* "main" */ - var zTable uintptr - var zColumn uintptr - // var iRow Tcl_WideInt at bp+1328, 8 +__24: + isReadonly1 = 0 + zDb = ts + 84 /* "main" */ - // Check for the -readonly option - if (objc > 3) && (crt.Xstrcmp(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), ts+19544 /* "-readonly" */) == 0) { - isReadonly = 1 - } + // Check for the -readonly option + if !((objc > 3) && (crt.Xstrcmp(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), ts+10290 /* "-readonly" */) == 0)) { + goto __236 + } + isReadonly1 = 1 +__236: + ; - if (objc != (5 + isReadonly)) && (objc != (6 + isReadonly)) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19554 /* "?-readonly? ?DB?..." */) - return 1 - } + if !((objc != (5 + isReadonly1)) && (objc != (6 + isReadonly1))) { + goto __237 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10717 /* "?-readonly? ?DB?..." */) + return 1 +__237: + ; - if objc == (6 + isReadonly) { - zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - } - zTable = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-3))*8))) - zColumn = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8))) - rc = tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)), bp+1328 /* &iRow */) + if !(objc == (6 + isReadonly1)) { + goto __238 + } + zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) +__238: + ; + zTable1 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-3))*8))) + zColumn = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8))) + rc = tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)), bp+1368 /* &iRow */) - if rc == 0 { - rc = createIncrblobChannel(tls, - interp, pDb, zDb, zTable, zColumn, sqlite3_int64(*(*Tcl_WideInt)(unsafe.Pointer(bp + 1328 /* iRow */))), isReadonly) - } - break - } + if !(rc == 0) { + goto __239 + } + rc = createIncrblobChannel(tls, + interp, pDb, zDb, zTable1, zColumn, sqlite3_int64(*(*Tcl_WideInt)(unsafe.Pointer(bp + 1368 /* iRow */))), isReadonly1) +__239: + ; + goto __3 // $db interrupt // // Interrupt the execution of the inner-most SQL interpreter. This // causes the SQL statement to return an error of SQLITE_INTERRUPT. - case DB_INTERRUPT: - { - sqlite3.Xsqlite3_interrupt(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb) - break - } +__25: + sqlite3.Xsqlite3_interrupt(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb) + goto __3 // $db nullvalue ?STRING? // @@ -35387,47 +33567,55 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // is not present, then the current string used for NULL is returned. // If STRING is present, then STRING is returned. // - case DB_NULLVALUE: - { - if (objc != 2) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19590 /* "NULLVALUE" */) - return 1 - } - if objc == 3 { - // var len int32 at bp+1336, 4 - - var zNull uintptr = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1336 /* &len */) - if (*SqliteDb)(unsafe.Pointer(pDb)).FzNull != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull) - } - if (zNull != 0) && (*(*int32)(unsafe.Pointer(bp + 1336 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzNull = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1336 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull, zNull, uint64(*(*int32)(unsafe.Pointer(bp + 1336 /* len */)))) - *(*int8)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FzNull + uintptr(*(*int32)(unsafe.Pointer(bp + 1336 /* len */))))) = int8(0) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzNull = uintptr(0) - } - } - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull, -1)) - break - } +__26: + if !((objc != 2) && (objc != 3)) { + goto __240 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10753 /* "NULLVALUE" */) + return 1 +__240: + ; + if !(objc == 3) { + goto __241 + } + zNull1 = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1376 /* &len5 */) + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzNull != 0) { + goto __242 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull) +__242: + ; + if !((zNull1 != 0) && (*(*int32)(unsafe.Pointer(bp + 1376 /* len5 */)) > 0)) { + goto __243 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzNull = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1376 /* len5 */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull, zNull1, uint64(*(*int32)(unsafe.Pointer(bp + 1376 /* len5 */)))) + *(*int8)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FzNull + uintptr(*(*int32)(unsafe.Pointer(bp + 1376 /* len5 */))))) = int8(0) + goto __244 +__243: + (*SqliteDb)(unsafe.Pointer(pDb)).FzNull = uintptr(0) +__244: + ; +__241: + ; + tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzNull, -1)) + goto __3 // $db last_insert_rowid // // Return an integer which is the ROWID for the most recent insert. - case DB_LAST_INSERT_ROWID: - { - var pResult uintptr - var rowid Tcl_WideInt - if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+792 /* "" */) - return 1 - } - rowid = Tcl_WideInt(sqlite3.Xsqlite3_last_insert_rowid(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) - pResult = tcl.XTcl_GetObjResult(tls, interp) - tcl.XTcl_SetWideIntObj(tls, pResult, rowid) - break - } +__27: + if !(objc != 2) { + goto __245 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+488 /* "" */) + return 1 +__245: + ; + rowid = Tcl_WideInt(sqlite3.Xsqlite3_last_insert_rowid(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) + pResult5 = tcl.XTcl_GetObjResult(tls, interp) + tcl.XTcl_SetWideIntObj(tls, pResult5, rowid) + goto __3 // The DB_ONECOLUMN method is implemented together with DB_EXISTS. @@ -35435,375 +33623,583 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // // Invoke the given callback every N virtual machine opcodes while executing // queries. - case DB_PROGRESS: - { - if objc == 2 { - if (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+728, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress, uintptr(0))) - } - } else if objc == 4 { - var zProgress uintptr - // var len int32 at bp+1344, 4 - - // var N int32 at bp+1340, 4 - - if 0 != tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1340 /* &N */) { - return 1 - } +__28: + if !(objc == 2) { + goto __246 + } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProgress != 0) { + goto __248 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+768, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress, uintptr(0))) +__248: + ; + goto __247 +__246: + if !(objc == 4) { + goto __249 + } + if !(0 != tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1380 /* &N */)) { + goto __251 + } + return 1 +__251: + ; - if (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress) - } - zProgress = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1344 /* &len */) - if (zProgress != 0) && (*(*int32)(unsafe.Pointer(bp + 1344 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1344 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress, zProgress, (uint64(*(*int32)(unsafe.Pointer(bp + 1344 /* len */)) + 1))) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress = uintptr(0) - } - } else { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19600 /* "N CALLBACK" */) - return 1 - } - break - } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProgress != 0) { + goto __252 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress) +__252: + ; + zProgress = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1384 /* &len6 */) + if !((zProgress != 0) && (*(*int32)(unsafe.Pointer(bp + 1384 /* len6 */)) > 0)) { + goto __253 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1384 /* len6 */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress, zProgress, (uint64(*(*int32)(unsafe.Pointer(bp + 1384 /* len6 */)) + 1))) + goto __254 +__253: + (*SqliteDb)(unsafe.Pointer(pDb)).FzProgress = uintptr(0) +__254: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProgress != 0) { + goto __255 + } + (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp + sqlite3.Xsqlite3_progress_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*int32)(unsafe.Pointer(bp + 1380 /* N */)), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) int32 }{DbProgressHandler})), pDb) + goto __256 +__255: + sqlite3.Xsqlite3_progress_handler(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, 0, uintptr(0), uintptr(0)) +__256: + ; + goto __250 +__249: + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10763 /* "N CALLBACK" */) + return 1 +__250: + ; +__247: + ; + goto __3 // $db profile ?CALLBACK? // // Make arrangements to invoke the CALLBACK routine after each SQL statement // that has run. The text of the SQL and the amount of elapse time are // appended to CALLBACK before the script is run. - case DB_PROFILE: - { - if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18412 /* "?CALLBACK?" */) - return 1 - } else if objc == 2 { - if (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+744, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile, uintptr(0))) - } - } else { - var zProfile uintptr - // var len int32 at bp+1348, 4 - - if (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile) - } - zProfile = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1348 /* &len */) - if (zProfile != 0) && (*(*int32)(unsafe.Pointer(bp + 1348 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1348 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile, zProfile, (uint64(*(*int32)(unsafe.Pointer(bp + 1348 /* len */)) + 1))) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile = uintptr(0) - } - if (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0 { - (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp - sqlite3.Xsqlite3_profile(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, uintptr, sqlite_uint64) - }{DbProfileHandler})), pDb) - } else { - sqlite3.Xsqlite3_profile(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) - } - } - break - } +__29: + if !(objc > 3) { + goto __257 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9543 /* "?CALLBACK?" */) + return 1 + goto __258 +__257: + if !(objc == 2) { + goto __259 + } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0) { + goto __261 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+784, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile, uintptr(0))) +__261: + ; + goto __260 +__259: + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0) { + goto __262 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile) +__262: + ; + zProfile = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1388 /* &len7 */) + if !((zProfile != 0) && (*(*int32)(unsafe.Pointer(bp + 1388 /* len7 */)) > 0)) { + goto __263 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1388 /* len7 */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile, zProfile, (uint64(*(*int32)(unsafe.Pointer(bp + 1388 /* len7 */)) + 1))) + goto __264 +__263: + (*SqliteDb)(unsafe.Pointer(pDb)).FzProfile = uintptr(0) +__264: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzProfile != 0) { + goto __265 + } + (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp + sqlite3.Xsqlite3_profile(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, sqlite_uint64) + }{DbProfileHandler})), pDb) + goto __266 +__265: + sqlite3.Xsqlite3_profile(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) +__266: + ; +__260: + ; +__258: + ; + goto __3 // $db rekey KEY // // Change the encryption key on the currently open database. - case DB_REKEY: - { - if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19611 /* "KEY" */) - return 1 - } - break - } +__30: + if !(objc != 3) { + goto __267 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10774 /* "KEY" */) + return 1 +__267: + ; + goto __3 // $db restore ?DATABASE? FILENAME // // Open a database file named FILENAME. Transfer the content // of FILENAME into the local database DATABASE (default: "main"). - case DB_RESTORE: - { - var zSrcFile uintptr - var zDestDb uintptr - // var pSrc uintptr at bp+1352, 8 - - var pBackup uintptr - var nTimeout int32 = 0 - - if objc == 3 { - zDestDb = ts + 354 /* "main" */ - zSrcFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - } else if objc == 4 { - zDestDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - zSrcFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) - } else { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18423 /* "?DATABASE? FILEN..." */) - return 1 - } - rc = sqlite3.Xsqlite3_open_v2(tls, zSrcFile, bp+1352, /* &pSrc */ - (0x00000001 | (*SqliteDb)(unsafe.Pointer(pDb)).FopenFlags), uintptr(0)) - if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+760, ts+19615, /* "cannot open sour..." */ - sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1352 /* pSrc */))), uintptr(0))) - sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1352 /* pSrc */))) - return 1 - } - pBackup = sqlite3.Xsqlite3_backup_init(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zDestDb, *(*uintptr)(unsafe.Pointer(bp + 1352 /* pSrc */)), ts+354 /* "main" */) - if pBackup == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+784, ts+19645, /* "restore failed: " */ - sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) - sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1352 /* pSrc */))) - return 1 - } - for ((crt.AssignInt32(&rc, sqlite3.Xsqlite3_backup_step(tls, pBackup, 100))) == 0) || - (rc == 5) { - if rc == 5 { - if crt.PostIncInt32(&nTimeout, 1) >= 3 { - break - } - sqlite3.Xsqlite3_sleep(tls, 100) - } - } - sqlite3.Xsqlite3_backup_finish(tls, pBackup) - if rc == 101 { - rc = 0 - } else if (rc == 5) || (rc == 6) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+808, ts+19662, /* "restore failed: ..." */ - uintptr(0))) - rc = 1 - } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+824, ts+19645, /* "restore failed: " */ - sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) - rc = 1 - } - sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1352 /* pSrc */))) - break - } +__31: + nTimeout = 0 + + if !(objc == 3) { + goto __268 + } + zDestDb = ts + 84 /* "main" */ + zSrcFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) + goto __269 +__268: + if !(objc == 4) { + goto __270 + } + zDestDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) + zSrcFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) + goto __271 +__270: + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9554 /* "?DATABASE? FILEN..." */) + return 1 +__271: + ; +__269: + ; + rc = sqlite3.Xsqlite3_open_v2(tls, zSrcFile, bp+1392, /* &pSrc */ + (0x00000001 | (*SqliteDb)(unsafe.Pointer(pDb)).FopenFlags), uintptr(0)) + if !(rc != 0) { + goto __272 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+800, ts+10778, /* "cannot open sour..." */ + sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 1392 /* pSrc */))), uintptr(0))) + sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1392 /* pSrc */))) + return 1 +__272: + ; + pBackup1 = sqlite3.Xsqlite3_backup_init(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zDestDb, *(*uintptr)(unsafe.Pointer(bp + 1392 /* pSrc */)), ts+84 /* "main" */) + if !(pBackup1 == uintptr(0)) { + goto __273 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+824, ts+10808, /* "restore failed: " */ + sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) + sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1392 /* pSrc */))) + return 1 +__273: + ; +__274: + if !(((crt.AssignInt32(&rc, sqlite3.Xsqlite3_backup_step(tls, pBackup1, 100))) == 0) || + (rc == 5)) { + goto __275 + } + if !(rc == 5) { + goto __276 + } + if !(crt.PostIncInt32(&nTimeout, 1) >= 3) { + goto __277 + } + goto __275 +__277: + ; + sqlite3.Xsqlite3_sleep(tls, 100) +__276: + ; + goto __274 +__275: + ; + sqlite3.Xsqlite3_backup_finish(tls, pBackup1) + if !(rc == 101) { + goto __278 + } + rc = 0 + goto __279 +__278: + if !((rc == 5) || (rc == 6)) { + goto __280 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+848, ts+10825, /* "restore failed: ..." */ + uintptr(0))) + rc = 1 + goto __281 +__280: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+864, ts+10808, /* "restore failed: " */ + sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) + rc = 1 +__281: + ; +__279: + ; + sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 1392 /* pSrc */))) + goto __3 // $db serialize ?DATABASE? // // Return a serialization of a database. - case DB_SERIALIZE: - { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+848, ts+19104, /* "MEMDB not availa..." */ - uintptr(0))) - rc = 1 - break - } +__32: + if objc >= 3 { + zSchema1 = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) + } else { + zSchema1 = ts + 84 /* "main" */ + } + *(*sqlite3_int64)(unsafe.Pointer(bp + 1400 /* sz */)) = int64(0) + if !((objc != 2) && (objc != 3)) { + goto __282 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10862 /* "?DATABASE?" */) + rc = 1 + goto __283 +__282: + pData1 = sqlite3.Xsqlite3_serialize(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSchema1, bp+1400 /* &sz */, uint32(0x001)) + if !(pData1 != 0) { + goto __284 + } + needFree = 0 + goto __285 +__284: + pData1 = sqlite3.Xsqlite3_serialize(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zSchema1, bp+1400 /* &sz */, uint32(0)) + needFree = 1 +__285: + ; + tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, pData1, int32(*(*sqlite3_int64)(unsafe.Pointer(bp + 1400 /* sz */))))) + if !(needFree != 0) { + goto __286 + } + sqlite3.Xsqlite3_free(tls, pData1) +__286: + ; +__283: + ; + goto __3 // $db status (step|sort|autoindex|vmstep) // // Display SQLITE_STMTSTATUS_FULLSCAN_STEP or // SQLITE_STMTSTATUS_SORT for the most recent eval. - case DB_STATUS: - { - var v int32 - var zOp uintptr - if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19699 /* "(step|sort|autoi..." */) - return 1 - } - zOp = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - if crt.Xstrcmp(tls, zOp, ts+16502 /* "step" */) == 0 { - v = (*SqliteDb)(unsafe.Pointer(pDb)).FnStep - } else if crt.Xstrcmp(tls, zOp, ts+19721 /* "sort" */) == 0 { - v = (*SqliteDb)(unsafe.Pointer(pDb)).FnSort - } else if crt.Xstrcmp(tls, zOp, ts+19726 /* "autoindex" */) == 0 { - v = (*SqliteDb)(unsafe.Pointer(pDb)).FnIndex - } else if crt.Xstrcmp(tls, zOp, ts+19736 /* "vmstep" */) == 0 { - v = (*SqliteDb)(unsafe.Pointer(pDb)).FnVMStep - } else { - tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp+864, ts+19743, /* "bad argument: sh..." */ - uintptr(0))) - return 1 - } - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, v)) - break - } +__33: + if !(objc != 3) { + goto __287 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10873 /* "(step|sort|autoi..." */) + return 1 +__287: + ; + zOp = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) + if !(crt.Xstrcmp(tls, zOp, ts+10895 /* "step" */) == 0) { + goto __288 + } + v2 = (*SqliteDb)(unsafe.Pointer(pDb)).FnStep + goto __289 +__288: + if !(crt.Xstrcmp(tls, zOp, ts+10900 /* "sort" */) == 0) { + goto __290 + } + v2 = (*SqliteDb)(unsafe.Pointer(pDb)).FnSort + goto __291 +__290: + if !(crt.Xstrcmp(tls, zOp, ts+10905 /* "autoindex" */) == 0) { + goto __292 + } + v2 = (*SqliteDb)(unsafe.Pointer(pDb)).FnIndex + goto __293 +__292: + if !(crt.Xstrcmp(tls, zOp, ts+10915 /* "vmstep" */) == 0) { + goto __294 + } + v2 = (*SqliteDb)(unsafe.Pointer(pDb)).FnVMStep + goto __295 +__294: + tcl.XTcl_AppendResult(tls, interp, + crt.VaList(bp+888, ts+10922, /* "bad argument: sh..." */ + uintptr(0))) + return 1 +__295: + ; +__293: + ; +__291: + ; +__289: + ; + tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, v2)) + goto __3 // $db timeout MILLESECONDS // // Delay for the number of milliseconds specified when a file is locked. - case DB_TIMEOUT: - { - // var ms int32 at bp+1360, 4 - - if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19799 /* "MILLISECONDS" */) - return 1 - } - if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1360 /* &ms */) != 0 { - return 1 - } - sqlite3.Xsqlite3_busy_timeout(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*int32)(unsafe.Pointer(bp + 1360 /* ms */))) - break - } +__34: + if !(objc != 3) { + goto __296 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10978 /* "MILLISECONDS" */) + return 1 +__296: + ; + if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1408 /* &ms */) != 0) { + goto __297 + } + return 1 +__297: + ; + sqlite3.Xsqlite3_busy_timeout(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*int32)(unsafe.Pointer(bp + 1408 /* ms */))) + goto __3 // $db total_changes // // Return the number of rows that were modified, inserted, or deleted // since the database handle was created. - case DB_TOTAL_CHANGES: - { - var pResult uintptr - if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+792 /* "" */) - return 1 - } - pResult = tcl.XTcl_GetObjResult(tls, interp) - tcl.XTcl_SetIntObj(tls, pResult, sqlite3.Xsqlite3_total_changes(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) - break - } +__35: + if !(objc != 2) { + goto __298 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+488 /* "" */) + return 1 +__298: + ; + pResult6 = tcl.XTcl_GetObjResult(tls, interp) + tcl.XTcl_SetIntObj(tls, pResult6, sqlite3.Xsqlite3_total_changes(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb)) + goto __3 // $db trace ?CALLBACK? // // Make arrangements to invoke the CALLBACK routine for each SQL statement // that is executed. The text of the SQL is appended to CALLBACK before // it is executed. - case DB_TRACE: - { - if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+18412 /* "?CALLBACK?" */) - return 1 - } else if objc == 2 { - if (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+880, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace, uintptr(0))) - } - } else { - var zTrace uintptr - // var len int32 at bp+1364, 4 - - if (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace) - } - zTrace = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1364 /* &len */) - if (zTrace != 0) && (*(*int32)(unsafe.Pointer(bp + 1364 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1364 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace, zTrace, (uint64(*(*int32)(unsafe.Pointer(bp + 1364 /* len */)) + 1))) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace = uintptr(0) - } - if (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0 { - (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp - sqlite3.Xsqlite3_trace(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, uintptr) - }{DbTraceHandler})), pDb) - } else { - sqlite3.Xsqlite3_trace(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) - } - } - break - } +__36: + if !(objc > 3) { + goto __299 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+9543 /* "?CALLBACK?" */) + return 1 + goto __300 +__299: + if !(objc == 2) { + goto __301 + } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0) { + goto __303 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+904, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace, uintptr(0))) +__303: + ; + goto __302 +__301: + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0) { + goto __304 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace) +__304: + ; + zTrace = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1412 /* &len8 */) + if !((zTrace != 0) && (*(*int32)(unsafe.Pointer(bp + 1412 /* len8 */)) > 0)) { + goto __305 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1412 /* len8 */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace, zTrace, (uint64(*(*int32)(unsafe.Pointer(bp + 1412 /* len8 */)) + 1))) + goto __306 +__305: + (*SqliteDb)(unsafe.Pointer(pDb)).FzTrace = uintptr(0) +__306: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTrace != 0) { + goto __307 + } + (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp + sqlite3.Xsqlite3_trace(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr) + }{DbTraceHandler})), pDb) + goto __308 +__307: + sqlite3.Xsqlite3_trace(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uintptr(0), uintptr(0)) +__308: + ; +__302: + ; +__300: + ; + goto __3 // $db trace_v2 ?CALLBACK? ?MASK? // // Make arrangements to invoke the CALLBACK routine for each trace event // matching the mask that is generated. The parameters are appended to // CALLBACK before it is executed. - case DB_TRACE_V2: - { - if objc > 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19812 /* "?CALLBACK? ?MASK..." */) - return 1 - } else if objc == 2 { - if (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+896, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, uintptr(0))) - } - } else { - var zTraceV2 uintptr - // var len int32 at bp+1368, 4 - - var wMask Tcl_WideInt = int64(0) - if objc == 4 { - const ( /* tclsqlite.c:3324:9: */ - TTYPE_STMT = 0 - TTYPE_PROFILE = 1 - TTYPE_ROW = 2 - TTYPE_CLOSE = 3 - ) - var i int32 - if 0 != tcl.XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1368 /* &len */) { - return 1 - } - for i = 0; i < *(*int32)(unsafe.Pointer(bp + 1368 /* len */)); i++ { - // var pObj uintptr at bp+1376, 8 - - // var ttype int32 at bp+1384, 4 - - if 0 != tcl.XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), i, bp+1376 /* &pObj */) { - return 1 - } - if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1376 /* pObj */)), uintptr(unsafe.Pointer(&TTYPE_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+19830 /* "trace type" */, 0, bp+1384 /* &ttype */) != 0 { - // var wType Tcl_WideInt at bp+1392, 8 - - var pError uintptr = tcl.XTcl_DuplicateObj(tls, tcl.XTcl_GetObjResult(tls, interp)) - (*Tcl_Obj)(unsafe.Pointer(pError)).FrefCount++ - if 0 == tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1376 /* pObj */)), bp+1392 /* &wType */) { - for ok3 := true; ok3; ok3 = 0 != 0 { - var _objPtr uintptr = pError - if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { - tcl.XTclFreeObj(tls, _objPtr) - } - } - wMask = wMask | (*(*Tcl_WideInt)(unsafe.Pointer(bp + 1392 /* wType */))) - } else { - tcl.XTcl_SetObjResult(tls, interp, pError) - for ok4 := true; ok4; ok4 = 0 != 0 { - var _objPtr uintptr = pError - if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { - tcl.XTclFreeObj(tls, _objPtr) - } - } - return 1 - } - } else { - switch uint32(*(*int32)(unsafe.Pointer(bp + 1384 /* ttype */))) { - case TTYPE_STMT: - wMask = wMask | (int64(0x01)) - break - fallthrough - case TTYPE_PROFILE: - wMask = wMask | (int64(0x02)) - break - fallthrough - case TTYPE_ROW: - wMask = wMask | (int64(0x04)) - break - fallthrough - case TTYPE_CLOSE: - wMask = wMask | (int64(0x08)) - break - } - } - } - } else { - wMask = int64(0x01) - } - if (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0 { - tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2) - } - zTraceV2 = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1368 /* &len */) - if (zTraceV2 != 0) && (*(*int32)(unsafe.Pointer(bp + 1368 /* len */)) > 0) { - (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1368 /* len */)) + 1))) - crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, zTraceV2, (uint64(*(*int32)(unsafe.Pointer(bp + 1368 /* len */)) + 1))) - } else { - (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 = uintptr(0) - } - if (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0 { - (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp - sqlite3.Xsqlite3_trace_v2(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uint32(wMask), *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uint32, uintptr, uintptr, uintptr) int32 - }{DbTraceV2Handler})), pDb) - } else { - sqlite3.Xsqlite3_trace_v2(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uint32(0), uintptr(0), uintptr(0)) - } - } - break - } +__37: + if !(objc > 4) { + goto __309 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+10991 /* "?CALLBACK? ?MASK..." */) + return 1 + goto __310 +__309: + if !(objc == 2) { + goto __311 + } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0) { + goto __313 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+920, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, uintptr(0))) +__313: + ; + goto __312 +__311: + wMask = int64(0) + if !(objc == 4) { + goto __314 + } + if !(0 != tcl.XTcl_ListObjLength(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+1416 /* &len9 */)) { + goto __316 + } + return 1 +__316: + ; + i4 = 0 +__317: + if !(i4 < *(*int32)(unsafe.Pointer(bp + 1416 /* len9 */))) { + goto __319 + } + if !(0 != tcl.XTcl_ListObjIndex(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), i4, bp+1424 /* &pObj */)) { + goto __320 + } + return 1 +__320: + ; + if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pObj */)), uintptr(unsafe.Pointer(&TTYPE_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+11009 /* "trace type" */, 0, bp+1432 /* &ttype */) != 0) { + goto __321 + } + pError = tcl.XTcl_DuplicateObj(tls, tcl.XTcl_GetObjResult(tls, interp)) + (*Tcl_Obj)(unsafe.Pointer(pError)).FrefCount++ + if !(0 == tcl.XTcl_GetWideIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 1424 /* pObj */)), bp+1440 /* &wType */)) { + goto __323 + } +__325: + _objPtr3 = pError + if !(crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr3))).FrefCount, 1) <= 1) { + goto __328 + } + tcl.XTclFreeObj(tls, _objPtr3) +__328: + ; + goto __326 +__326: + if 0 != 0 { + goto __325 + } + goto __327 +__327: + ; + wMask = wMask | (*(*Tcl_WideInt)(unsafe.Pointer(bp + 1440 /* wType */))) + goto __324 +__323: + tcl.XTcl_SetObjResult(tls, interp, pError) +__329: + _objPtr4 = pError + if !(crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr4))).FrefCount, 1) <= 1) { + goto __332 + } + tcl.XTclFreeObj(tls, _objPtr4) +__332: + ; + goto __330 +__330: + if 0 != 0 { + goto __329 + } + goto __331 +__331: + ; + return 1 +__324: + ; + goto __322 +__321: + switch uint32(*(*int32)(unsafe.Pointer(bp + 1432 /* ttype */))) { + case uint32(0): + goto __334 + case uint32(1): + goto __335 + case uint32(2): + goto __336 + case uint32(3): + goto __337 + } + goto __333 +__334: + wMask = wMask | (int64(0x01)) + goto __333 +__335: + wMask = wMask | (int64(0x02)) + goto __333 +__336: + wMask = wMask | (int64(0x04)) + goto __333 +__337: + wMask = wMask | (int64(0x08)) + goto __333 +__333: + ; +__322: + ; + goto __318 +__318: + i4++ + goto __317 + goto __319 +__319: + ; + goto __315 +__314: + wMask = int64(0x01) +__315: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0) { + goto __338 + } + tcl.XTcl_Free(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2) +__338: + ; + zTraceV2 = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+1416 /* &len9 */) + if !((zTraceV2 != 0) && (*(*int32)(unsafe.Pointer(bp + 1416 /* len9 */)) > 0)) { + goto __339 + } + (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 = tcl.XTcl_Alloc(tls, (uint32(*(*int32)(unsafe.Pointer(bp + 1416 /* len9 */)) + 1))) + crt.Xmemcpy(tls, (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2, zTraceV2, (uint64(*(*int32)(unsafe.Pointer(bp + 1416 /* len9 */)) + 1))) + goto __340 +__339: + (*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 = uintptr(0) +__340: + ; + if !((*SqliteDb)(unsafe.Pointer(pDb)).FzTraceV2 != 0) { + goto __341 + } + (*SqliteDb)(unsafe.Pointer(pDb)).Finterp = interp + sqlite3.Xsqlite3_trace_v2(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uint32(wMask), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uint32, uintptr, uintptr, uintptr) int32 + }{DbTraceV2Handler})), pDb) + goto __342 +__341: + sqlite3.Xsqlite3_trace_v2(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, uint32(0), uintptr(0), uintptr(0)) +__342: + ; +__312: + ; +__310: + ; + goto __3 // $db transaction [-deferred|-immediate|-exclusive] SCRIPT // @@ -35815,196 +34211,259 @@ func DbObjCmd(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr // // This command was inspired by Dave Thomas's talk on Ruby at the // 2005 O'Reilly Open Source Convention (OSCON). - case DB_TRANSACTION: - { - var pScript uintptr - var zBegin uintptr = ts + 19841 /* "SAVEPOINT _tcl_t..." */ - if (objc != 3) && (objc != 4) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19868 /* "[TYPE] SCRIPT" */) - return 1 - } +__38: + zBegin = ts + 11020 /* "SAVEPOINT _tcl_t..." */ + if !((objc != 3) && (objc != 4)) { + goto __343 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11047 /* "[TYPE] SCRIPT" */) + return 1 +__343: + ; - if ((*SqliteDb)(unsafe.Pointer(pDb)).FnTransaction == 0) && (objc == 4) { - const ( /* tclsqlite.c:3407:7: */ - TTYPE_DEFERRED = 0 - TTYPE_EXCLUSIVE = 1 - TTYPE_IMMEDIATE = 2 - ) - // var ttype int32 at bp+1400, 4 + if !(((*SqliteDb)(unsafe.Pointer(pDb)).FnTransaction == 0) && (objc == 4)) { + goto __344 + } + if !(tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(unsafe.Pointer(&TTYPE_strs1)), int32(unsafe.Sizeof(uintptr(0))), ts+11061 /* "transaction type" */, 0, bp+1448 /* &ttype1 */) != 0) { + goto __345 + } + return 1 +__345: + ; + switch uint32(*(*int32)(unsafe.Pointer(bp + 1448 /* ttype1 */))) { + case uint32(0): + goto __347 + case uint32(1): + goto __348 + case uint32(2): + goto __349 + } + goto __346 +__347: /* no-op */ + ; + goto __346 +__348: + zBegin = ts + 11078 /* "BEGIN EXCLUSIVE" */ + goto __346 +__349: + zBegin = ts + 11094 /* "BEGIN IMMEDIATE" */ + goto __346 +__346: + ; +__344: + ; + pScript2 = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) - if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(unsafe.Pointer(&TTYPE_strs1)), int32(unsafe.Sizeof(uintptr(0))), ts+19882 /* "transaction type" */, 0, bp+1400 /* &ttype */) != 0 { - return 1 - } - switch uint32(*(*int32)(unsafe.Pointer(bp + 1400 /* ttype */))) { - case TTYPE_DEFERRED: /* no-op */ - break - fallthrough - case TTYPE_EXCLUSIVE: - zBegin = ts + 19899 /* "BEGIN EXCLUSIVE" */ - break - fallthrough - case TTYPE_IMMEDIATE: - zBegin = ts + 15602 /* "BEGIN IMMEDIATE" */ - break - } - } - pScript = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) + // Run the SQLite BEGIN command to open a transaction or savepoint. + (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth++ + rc = sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zBegin, uintptr(0), uintptr(0), uintptr(0)) + (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth-- + if !(rc != 0) { + goto __350 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+936, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) + return 1 +__350: + ; + (*SqliteDb)(unsafe.Pointer(pDb)).FnTransaction++ - // Run the SQLite BEGIN command to open a transaction or savepoint. - (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth++ - rc = sqlite3.Xsqlite3_exec(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, zBegin, uintptr(0), uintptr(0), uintptr(0)) - (*SqliteDb)(unsafe.Pointer(pDb)).FdisableAuth-- - if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+912, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) - return 1 - } - (*SqliteDb)(unsafe.Pointer(pDb)).FnTransaction++ - - // If using NRE, schedule a callback to invoke the script pScript, then - // a second callback to commit (or rollback) the transaction or savepoint - // opened above. If not using NRE, evaluate the script directly, then - // call function DbTransPostCmd() to commit (or rollback) the transaction - // or savepoint. - if DbUseNre(tls) != 0 { - tcl.XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, uintptr, int32) int32 - }{DbTransPostCmd})), *(*uintptr)(unsafe.Pointer(bp + 1408 /* cd */)), uintptr(0), uintptr(0), uintptr(0)) - tcl.XTcl_NREvalObj(tls, interp, pScript, 0) - } else { - rc = DbTransPostCmd(tls, bp+1408 /* &cd */, interp, tcl.XTcl_EvalObjEx(tls, interp, pScript, 0)) - } - break - } + // If using NRE, schedule a callback to invoke the script pScript, then + // a second callback to commit (or rollback) the transaction or savepoint + // opened above. If not using NRE, evaluate the script directly, then + // call function DbTransPostCmd() to commit (or rollback) the transaction + // or savepoint. + if !(DbUseNre(tls) != 0) { + goto __351 + } + tcl.XTcl_NRAddCallback(tls, interp, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32) int32 + }{DbTransPostCmd})), *(*uintptr)(unsafe.Pointer(bp + 1456 /* cd */)), uintptr(0), uintptr(0), uintptr(0)) + tcl.XTcl_NREvalObj(tls, interp, pScript2, 0) + goto __352 +__351: + rc = DbTransPostCmd(tls, bp+1456 /* &cd */, interp, tcl.XTcl_EvalObjEx(tls, interp, pScript2, 0)) +__352: + ; + goto __3 // $db unlock_notify ?script? - case DB_UNLOCK_NOTIFY: - { - if (objc != 2) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19915 /* "?SCRIPT?" */) - rc = 1 - } else { - var xNotify uintptr = uintptr(0) - var pNotifyArg uintptr = uintptr(0) +__39: + if !((objc != 2) && (objc != 3)) { + goto __353 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11110 /* "?SCRIPT?" */) + rc = 1 + goto __354 +__353: + xNotify = uintptr(0) + pNotifyArg = uintptr(0) - if (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify != 0 { - for ok5 := true; ok5; ok5 = 0 != 0 { - var _objPtr uintptr = (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify - if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { - tcl.XTclFreeObj(tls, _objPtr) - } - } - (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify = uintptr(0) - } + if !((*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify != 0) { + goto __355 + } +__356: + _objPtr5 = (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify + if !(crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr5))).FrefCount, 1) <= 1) { + goto __359 + } + tcl.XTclFreeObj(tls, _objPtr5) +__359: + ; + goto __357 +__357: + if 0 != 0 { + goto __356 + } + goto __358 +__358: + ; + (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify = uintptr(0) +__355: + ; - if objc == 3 { - xNotify = *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, uintptr, int32) - }{DbUnlockNotify})) - pNotifyArg = pDb - (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify = *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)) - (*Tcl_Obj)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify)).FrefCount++ - } + if !(objc == 3) { + goto __360 + } + xNotify = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32) + }{DbUnlockNotify})) + pNotifyArg = pDb + (*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify = *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)) + (*Tcl_Obj)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FpUnlockNotify)).FrefCount++ +__360: + ; - if sqlite3.Xsqlite3_unlock_notify(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, xNotify, pNotifyArg) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+928, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) - rc = 1 - } - } - break - } + if !(sqlite3.Xsqlite3_unlock_notify(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb, xNotify, pNotifyArg) != 0) { + goto __361 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+952, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(pDb)).Fdb), uintptr(0))) + rc = 1 +__361: + ; +__354: + ; + goto __3 // $db preupdate_hook count // $db preupdate_hook hook ?SCRIPT? // $db preupdate_hook new INDEX // $db preupdate_hook old INDEX - case DB_PREUPDATE: - { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+944, ts+19924, /* "preupdate_hook w..." */ - uintptr(0))) - rc = 1 - break - } +__40: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+968, ts+11119, /* "preupdate_hook w..." */ + uintptr(0))) + rc = 1 + goto __3 // $db wal_hook ?script? // $db update_hook ?script? // $db rollback_hook ?script? - case DB_WAL_HOOK: - fallthrough - case DB_UPDATE_HOOK: - fallthrough - case DB_ROLLBACK_HOOK: - { - // set ppHook to point at pUpdateHook or pRollbackHook, depending on - // whether [$db update_hook] or [$db rollback_hook] was invoked. - var ppHook uintptr = uintptr(0) - if *(*int32)(unsafe.Pointer(bp + 992 /* choice */)) == DB_WAL_HOOK { - ppHook = (pDb + 128 /* &.pWalHook */) - } - if *(*int32)(unsafe.Pointer(bp + 992 /* choice */)) == DB_UPDATE_HOOK { - ppHook = (pDb + 104 /* &.pUpdateHook */) - } - if *(*int32)(unsafe.Pointer(bp + 992 /* choice */)) == DB_ROLLBACK_HOOK { - ppHook = (pDb + 120 /* &.pRollbackHook */) - } - if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19915 /* "?SCRIPT?" */) - return 1 - } +__41: +__42: +__43: + // set ppHook to point at pUpdateHook or pRollbackHook, depending on + // whether [$db update_hook] or [$db rollback_hook] was invoked. + ppHook = uintptr(0) + if !(*(*int32)(unsafe.Pointer(bp + 1016 /* choice */)) == 40) { + goto __362 + } + ppHook = (pDb + 128 /* &.pWalHook */) +__362: + ; + if !(*(*int32)(unsafe.Pointer(bp + 1016 /* choice */)) == 38) { + goto __363 + } + ppHook = (pDb + 104 /* &.pUpdateHook */) +__363: + ; + if !(*(*int32)(unsafe.Pointer(bp + 1016 /* choice */)) == 29) { + goto __364 + } + ppHook = (pDb + 120 /* &.pRollbackHook */) +__364: + ; + if !(objc > 3) { + goto __365 + } + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11110 /* "?SCRIPT?" */) + return 1 +__365: + ; - DbHookCmd(tls, interp, pDb, func() uintptr { - if objc == 3 { - return *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)) - } - return uintptr(0) - }(), ppHook) - break + DbHookCmd(tls, interp, pDb, func() uintptr { + if objc == 3 { + return *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)) } + return uintptr(0) + }(), ppHook) + goto __3 // $db version // // Return the version string for this database. - case DB_VERSION: - { - var i int32 - for i = 2; i < objc; i++ { - var zArg uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) - // Optional arguments to $db version are used for testing purpose - // $db version -use-legacy-prepare BOOLEAN - // - // Turn the use of legacy sqlite3_prepare() on or off. - if (crt.Xstrcmp(tls, zArg, ts+19967 /* "-use-legacy-prep..." */) == 0) && ((i + 1) < objc) { - i++ - if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), (pDb+224 /* &.bLegacyPrepare */)) != 0 { - return 1 - } - } else - - // $db version -last-stmt-ptr - // - // Return a string which is a hex encoding of the pointer to the - // most recent sqlite3_stmt in the statement cache. - if crt.Xstrcmp(tls, zArg, ts+19987 /* "-last-stmt-ptr" */) == 0 { - // var zBuf [100]int8 at bp+1416, 100 - - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+1416 /* &zBuf[0] */, ts+20002, /* "%p" */ - crt.VaList(bp+960, func() uintptr { - if (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList != 0 { - return (*SqlPreparedStmt)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FstmtList)).FpStmt - } - return uintptr(0) - }())) - tcl.XTcl_SetResult(tls, interp, bp+1416 /* &zBuf[0] */, uintptr(1)) - } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+968, ts+20005 /* "unknown argument..." */, zArg, uintptr(0))) - return 1 - } - } - if i == 2 { - tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_libversion(tls), uintptr(0)) +__44: + i5 = 2 +__366: + if !(i5 < objc) { + goto __368 + } + zArg = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i5)*8))) + // Optional arguments to $db version are used for testing purpose + // $db version -use-legacy-prepare BOOLEAN + // + // Turn the use of legacy sqlite3_prepare() on or off. + if !((crt.Xstrcmp(tls, zArg, ts+11162 /* "-use-legacy-prep..." */) == 0) && ((i5 + 1) < objc)) { + goto __369 + } + i5++ + if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i5)*8)), (pDb+224 /* &.bLegacyPrepare */)) != 0) { + goto __371 + } + return 1 +__371: + ; + goto __370 +__369: + + // $db version -last-stmt-ptr + // + // Return a string which is a hex encoding of the pointer to the + // most recent sqlite3_stmt in the statement cache. + if !(crt.Xstrcmp(tls, zArg, ts+11182 /* "-last-stmt-ptr" */) == 0) { + goto __372 + } + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+1464 /* &zBuf[0] */, ts+11197, /* "%p" */ + crt.VaList(bp+984, func() uintptr { + if (*SqliteDb)(unsafe.Pointer(pDb)).FstmtList != 0 { + return (*SqlPreparedStmt)(unsafe.Pointer((*SqliteDb)(unsafe.Pointer(pDb)).FstmtList)).FpStmt } - break - } - } // End of the SWITCH statement + return uintptr(0) + }())) + tcl.XTcl_SetResult(tls, interp, bp+1464 /* &zBuf[0] */, uintptr(1)) + goto __373 +__372: + + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+992, ts+11200 /* "unknown argument..." */, zArg, uintptr(0))) + return 1 +__373: + ; +__370: + ; + goto __367 +__367: + i5++ + goto __366 + goto __368 +__368: + ; + if !(i5 == 2) { + goto __374 + } + tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3_libversion(tls), uintptr(0)) +__374: + ; + goto __3 +__3: + ; // End of the SWITCH statement return rc } @@ -36014,46 +34473,45 @@ type DbConfigChoices = struct { _ [4]byte } -var __func__100 = *(*[9]int8)(unsafe.Pointer(ts + 20024 /* "DbObjCmd" */)) /* tclsqlite.c:1912:2 */ var DB_strs = [42]uintptr{ - ts + 20033 /* "authorizer" */, ts + 20044 /* "backup" */, ts + 20051, /* "bind_fallback" */ - ts + 20065 /* "busy" */, ts + 20070 /* "cache" */, ts + 20076, /* "changes" */ - ts + 16507 /* "close" */, ts + 20084 /* "collate" */, ts + 20092, /* "collation_needed" */ - ts + 20109 /* "commit_hook" */, ts + 20121 /* "complete" */, ts + 20130, /* "config" */ - ts + 20137 /* "copy" */, ts + 20142 /* "deserialize" */, ts + 20154, /* "enable_load_exte..." */ - ts + 20176 /* "errorcode" */, ts + 4437 /* "eval" */, ts + 20186, /* "exists" */ - ts + 20193 /* "function" */, ts + 17096 /* "incrblob" */, ts + 20202, /* "interrupt" */ - ts + 20212 /* "last_insert_rowi..." */, ts + 20230 /* "nullvalue" */, ts + 20240, /* "onecolumn" */ - ts + 20250 /* "preupdate" */, ts + 20260 /* "profile" */, ts + 16581, /* "progress" */ - ts + 20268 /* "rekey" */, ts + 20274 /* "restore" */, ts + 20282, /* "rollback_hook" */ - ts + 20296 /* "serialize" */, ts + 20306 /* "status" */, ts + 20313, /* "timeout" */ - ts + 20321 /* "total_changes" */, ts + 20335 /* "trace" */, ts + 20341, /* "trace_v2" */ - ts + 20350 /* "transaction" */, ts + 20362 /* "unlock_notify" */, ts + 20376, /* "update_hook" */ - ts + 20388 /* "version" */, ts + 20396 /* "wal_hook" */, uintptr(0), + ts + 11219 /* "authorizer" */, ts + 11230 /* "backup" */, ts + 11237, /* "bind_fallback" */ + ts + 11251 /* "busy" */, ts + 11256 /* "cache" */, ts + 11262, /* "changes" */ + ts + 11270 /* "close" */, ts + 11276 /* "collate" */, ts + 11284, /* "collation_needed" */ + ts + 11301 /* "commit_hook" */, ts + 11313 /* "complete" */, ts + 11322, /* "config" */ + ts + 11329 /* "copy" */, ts + 11334 /* "deserialize" */, ts + 11346, /* "enable_load_exte..." */ + ts + 11368 /* "errorcode" */, ts + 3370 /* "eval" */, ts + 11378, /* "exists" */ + ts + 11385 /* "function" */, ts + 8647 /* "incrblob" */, ts + 11394, /* "interrupt" */ + ts + 11404 /* "last_insert_rowi..." */, ts + 11422 /* "nullvalue" */, ts + 11432, /* "onecolumn" */ + ts + 11442 /* "preupdate" */, ts + 11452 /* "profile" */, ts + 11460, /* "progress" */ + ts + 11469 /* "rekey" */, ts + 11475 /* "restore" */, ts + 11483, /* "rollback_hook" */ + ts + 11497 /* "serialize" */, ts + 11507 /* "status" */, ts + 11514, /* "timeout" */ + ts + 11522 /* "total_changes" */, ts + 11536 /* "trace" */, ts + 11542, /* "trace_v2" */ + ts + 11551 /* "transaction" */, ts + 11563 /* "unlock_notify" */, ts + 11577, /* "update_hook" */ + ts + 11589 /* "version" */, ts + 11597 /* "wal_hook" */, uintptr(0), } /* tclsqlite.c:1916:21 */ var aDbConfig = [16]DbConfigChoices{ - {FzName: ts + 20405 /* "defensive" */, Fop: 1010}, - {FzName: ts + 20415 /* "dqs_ddl" */, Fop: 1014}, - {FzName: ts + 20423 /* "dqs_dml" */, Fop: 1013}, - {FzName: ts + 20431 /* "enable_fkey" */, Fop: 1002}, - {FzName: ts + 20443 /* "enable_qpsg" */, Fop: 1007}, - {FzName: ts + 20455 /* "enable_trigger" */, Fop: 1003}, - {FzName: ts + 20470 /* "enable_view" */, Fop: 1015}, - {FzName: ts + 20482 /* "fts3_tokenizer" */, Fop: 1004}, - {FzName: ts + 20497 /* "legacy_alter_tab..." */, Fop: 1012}, - {FzName: ts + 20516 /* "legacy_file_form..." */, Fop: 1016}, - {FzName: ts + 20535 /* "load_extension" */, Fop: 1005}, - {FzName: ts + 20550 /* "no_ckpt_on_close" */, Fop: 1006}, - {FzName: ts + 20567 /* "reset_database" */, Fop: 1009}, - {FzName: ts + 20582 /* "trigger_eqp" */, Fop: 1008}, - {FzName: ts + 20594 /* "trusted_schema" */, Fop: 1017}, - {FzName: ts + 20609 /* "writable_schema" */, Fop: 1011}, + {FzName: ts + 11606 /* "defensive" */, Fop: 1010}, + {FzName: ts + 11616 /* "dqs_ddl" */, Fop: 1014}, + {FzName: ts + 11624 /* "dqs_dml" */, Fop: 1013}, + {FzName: ts + 11632 /* "enable_fkey" */, Fop: 1002}, + {FzName: ts + 11644 /* "enable_qpsg" */, Fop: 1007}, + {FzName: ts + 11656 /* "enable_trigger" */, Fop: 1003}, + {FzName: ts + 11671 /* "enable_view" */, Fop: 1015}, + {FzName: ts + 11683 /* "fts3_tokenizer" */, Fop: 1004}, + {FzName: ts + 11698 /* "legacy_alter_tab..." */, Fop: 1012}, + {FzName: ts + 11717 /* "legacy_file_form..." */, Fop: 1016}, + {FzName: ts + 11736 /* "load_extension" */, Fop: 1005}, + {FzName: ts + 11751 /* "no_ckpt_on_close" */, Fop: 1006}, + {FzName: ts + 11768 /* "reset_database" */, Fop: 1009}, + {FzName: ts + 11783 /* "trigger_eqp" */, Fop: 1008}, + {FzName: ts + 11795 /* "trusted_schema" */, Fop: 1017}, + {FzName: ts + 11810 /* "writable_schema" */, Fop: 1011}, } /* tclsqlite.c:2343:7 */ var TTYPE_strs = [5]uintptr{ - ts + 20625 /* "statement" */, ts + 20260 /* "profile" */, ts + 20635 /* "row" */, ts + 16507 /* "close" */, uintptr(0), + ts + 11826 /* "statement" */, ts + 11452 /* "profile" */, ts + 11836 /* "row" */, ts + 11270 /* "close" */, uintptr(0), } /* tclsqlite.c:3321:27 */ var TTYPE_strs1 = [4]uintptr{ - ts + 20639 /* "deferred" */, ts + 20648 /* "exclusive" */, ts + 20658 /* "immediate" */, uintptr(0), + ts + 11840 /* "deferred" */, ts + 11849 /* "exclusive" */, ts + 11859 /* "immediate" */, uintptr(0), } /* tclsqlite.c:3404:25 */ // Adaptor that provides an objCmd interface to the NRE-enabled @@ -36069,7 +34527,7 @@ func DbObjCmdAdaptor(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv func sqliteCmdUsage(tls *crt.TLS, interp uintptr, objv uintptr) int32 { /* tclsqlite.c:3661:12: */ tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, - ts+20668 /* "HANDLE ?FILENAME..." */) + ts+11869 /* "HANDLE ?FILENAME..." */) return 1 } @@ -36115,16 +34573,16 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) } if objc == 2 { zArg = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(0)) - if crt.Xstrcmp(tls, zArg, ts+20814 /* "-version" */) == 0 { + if crt.Xstrcmp(tls, zArg, ts+12015 /* "-version" */) == 0 { tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, sqlite3.Xsqlite3_libversion(tls), uintptr(0))) return 0 } - if crt.Xstrcmp(tls, zArg, ts+20823 /* "-sourceid" */) == 0 { + if crt.Xstrcmp(tls, zArg, ts+12024 /* "-sourceid" */) == 0 { tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, sqlite3.Xsqlite3_sourceid(tls), uintptr(0))) return 0 } - if crt.Xstrcmp(tls, zArg, ts+20833 /* "-has-codec" */) == 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+8293 /* "0" */, uintptr(0))) + if crt.Xstrcmp(tls, zArg, ts+12034 /* "-has-codec" */) == 0 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+12045 /* "0" */, uintptr(0))) return 0 } if int32(*(*int8)(unsafe.Pointer(zArg + uintptr(0)))) == '-' { @@ -36144,10 +34602,10 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) return sqliteCmdUsage(tls, interp, objv) } i++ - if crt.Xstrcmp(tls, zArg, ts+20844 /* "-key" */) == 0 { - } else if crt.Xstrcmp(tls, zArg, ts+20849 /* "-vfs" */) == 0 { + if crt.Xstrcmp(tls, zArg, ts+12047 /* "-key" */) == 0 { + } else if crt.Xstrcmp(tls, zArg, ts+12052 /* "-vfs" */) == 0 { zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) - } else if crt.Xstrcmp(tls, zArg, ts+19544 /* "-readonly" */) == 0 { + } else if crt.Xstrcmp(tls, zArg, ts+10290 /* "-readonly" */) == 0 { // var b int32 at bp+88, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+88 /* &b */) != 0 { @@ -36160,7 +34618,7 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) flags = flags & (^int32(crt.Int32FromInt32(0x00000001))) flags = flags | (0x00000002) } - } else if crt.Xstrcmp(tls, zArg, ts+20854 /* "-create" */) == 0 { + } else if crt.Xstrcmp(tls, zArg, ts+12057 /* "-create" */) == 0 { // var b int32 at bp+92, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+92 /* &b */) != 0 { @@ -36171,7 +34629,7 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) } else { flags = flags & (^int32(crt.Int32FromInt32(0x00000004))) } - } else if crt.Xstrcmp(tls, zArg, ts+20862 /* "-nofollow" */) == 0 { + } else if crt.Xstrcmp(tls, zArg, ts+12065 /* "-nofollow" */) == 0 { // var b int32 at bp+96, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+96 /* &b */) != 0 { @@ -36182,7 +34640,7 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) } else { flags = flags & (^int32(crt.Int32FromInt32(0x01000000))) } - } else if crt.Xstrcmp(tls, zArg, ts+20872 /* "-nomutex" */) == 0 { + } else if crt.Xstrcmp(tls, zArg, ts+12075 /* "-nomutex" */) == 0 { // var b int32 at bp+100, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+100 /* &b */) != 0 { @@ -36194,7 +34652,7 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) } else { flags = flags & (^int32(crt.Int32FromInt32(0x00008000))) } - } else if crt.Xstrcmp(tls, zArg, ts+20881 /* "-fullmutex" */) == 0 { + } else if crt.Xstrcmp(tls, zArg, ts+12084 /* "-fullmutex" */) == 0 { // var b int32 at bp+104, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+104 /* &b */) != 0 { @@ -36206,7 +34664,7 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) } else { flags = flags & (^int32(crt.Int32FromInt32(0x00010000))) } - } else if crt.Xstrcmp(tls, zArg, ts+20892 /* "-uri" */) == 0 { + } else if crt.Xstrcmp(tls, zArg, ts+12095 /* "-uri" */) == 0 { // var b int32 at bp+108, 4 if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+108 /* &b */) != 0 { @@ -36217,12 +34675,12 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) } else { flags = flags & (^int32(crt.Int32FromInt32(0x00000040))) } - } else if crt.Xstrcmp(tls, zArg, ts+20897 /* "-translatefilena..." */) == 0 { + } else if crt.Xstrcmp(tls, zArg, ts+12100 /* "-translatefilena..." */) == 0 { if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+112 /* &bTranslateFileName */) != 0 { return 1 } } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+20916 /* "unknown option: " */, zArg, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+10300 /* "unknown option: " */, zArg, uintptr(0))) return 1 } } @@ -36230,7 +34688,7 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) p = tcl.XTcl_Alloc(tls, uint32(unsafe.Sizeof(SqliteDb{}))) crt.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(SqliteDb{}))) if zFile == uintptr(0) { - zFile = ts + 792 /* "" */ + zFile = ts + 488 /* "" */ } if *(*int32)(unsafe.Pointer(bp + 112 /* bTranslateFileName */)) != 0 { zFile = tcl.XTcl_TranslateFileName(tls, interp, zFile, bp+120 /* &translatedFilename */) @@ -36241,12 +34699,12 @@ func DbMain(tls *crt.TLS, cd uintptr, interp uintptr, objc int32, objv uintptr) } if (*SqliteDb)(unsafe.Pointer(p)).Fdb != 0 { if 0 != sqlite3.Xsqlite3_errcode(tls, (*SqliteDb)(unsafe.Pointer(p)).Fdb) { - zErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+72, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(p)).Fdb))) + zErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+72, sqlite3.Xsqlite3_errmsg(tls, (*SqliteDb)(unsafe.Pointer(p)).Fdb))) sqlite3.Xsqlite3_close(tls, (*SqliteDb)(unsafe.Pointer(p)).Fdb) (*SqliteDb)(unsafe.Pointer(p)).Fdb = uintptr(0) } } else { - zErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+80, sqlite3.Xsqlite3_errstr(tls, rc))) + zErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+80, sqlite3.Xsqlite3_errstr(tls, rc))) } if (*SqliteDb)(unsafe.Pointer(p)).Fdb == uintptr(0) { tcl.XTcl_SetResult(tls, interp, zErrMsg, uintptr(1)) @@ -36297,16 +34755,16 @@ func Sqlite3_Init(tls *crt.TLS, interp uintptr) int32 { /* tclsqlite.c:3877:12: rc = 1 } if rc == 0 { - tcl.XTcl_CreateObjCommand(tls, interp, ts+20933 /* "sqlite3" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+12119 /* "sqlite3" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{DbMain})), uintptr(0), uintptr(0)) // The "sqlite" alias is undocumented. It is here only to support // legacy scripts. All new scripts should use only the "sqlite3" // command. - tcl.XTcl_CreateObjCommand(tls, interp, ts+20941 /* "sqlite" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+12127 /* "sqlite" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{DbMain})), uintptr(0), uintptr(0)) - rc = tcl.XTcl_PkgProvideEx(tls, interp, ts+20933 /* "sqlite3" */, ts+20948 /* "3.32.3" */, uintptr(0)) + rc = tcl.XTcl_PkgProvideEx(tls, interp, ts+12119 /* "sqlite3" */, ts+12134 /* "3.32.3" */, uintptr(0)) } return rc } @@ -36350,7 +34808,7 @@ func tclsh_main_loop(tls *crt.TLS) uintptr { /* tclsqlite.c:3920:19: */ return uintptr(unsafe.Pointer(&zMainloop)) } -var zMainloop = *(*[431]int8)(unsafe.Pointer(ts + 20955 /* "if {[llength $ar..." */)) /* tclsqlite.c:3921:21 */ +var zMainloop = *(*[431]int8)(unsafe.Pointer(ts + 12141 /* "if {[llength $ar..." */)) /* tclsqlite.c:3921:21 */ func main(tls *crt.TLS, argc int32, argv uintptr) int32 { /* tclsqlite.c:3953:18: */ bp := tls.Alloc(64) @@ -36361,10 +34819,10 @@ func main(tls *crt.TLS, argc int32, argv uintptr) int32 { /* tclsqlite.c:3953:18 var zScript uintptr = uintptr(0) // var zArgc [32]int8 at bp+32, 32 - if crt.Xgetenv(tls, ts+21386 /* "SQLITE_DEBUG_BRE..." */) != 0 { + if crt.Xgetenv(tls, ts+12572 /* "SQLITE_DEBUG_BRE..." */) != 0 { if (crt.Xisatty(tls, 0) != 0) && (crt.Xisatty(tls, 2) != 0) { crt.Xfprintf(tls, crt.Xstderr, - ts+21405, /* "attach debugger ..." */ + ts+12591, /* "attach debugger ..." */ crt.VaList(bp, crt.Xgetpid(tls))) crt.Xfgetc(tls, crt.Xstdin) } else { @@ -36378,27 +34836,27 @@ func main(tls *crt.TLS, argc int32, argv uintptr) int32 { /* tclsqlite.c:3953:18 sqlite3.Xsqlite3_shutdown(tls) tcl.XTcl_FindExecutable(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - tcl.XTcl_SetSystemEncoding(tls, uintptr(0), ts+21467 /* "utf-8" */) + tcl.XTcl_SetSystemEncoding(tls, uintptr(0), ts+12653 /* "utf-8" */) interp = tcl.XTcl_CreateInterp(tls) Sqlite3_Init(tls, interp) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), bp+32 /* &zArgc[0] */, ts+1647 /* "%d" */, crt.VaList(bp+8, (argc-1))) - tcl.XTcl_SetVar2(tls, interp, ts+21473 /* "argc" */, uintptr(0), bp+32 /* &zArgc[0] */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+21478 /* "argv0" */, uintptr(0), *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), 1) - tcl.XTcl_SetVar2(tls, interp, ts+21484 /* "argv" */, uintptr(0), ts+792 /* "" */, 1) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([32]int8{})), bp+32 /* &zArgc[0] */, ts+1237 /* "%d" */, crt.VaList(bp+8, (argc-1))) + tcl.XTcl_SetVar2(tls, interp, ts+12659 /* "argc" */, uintptr(0), bp+32 /* &zArgc[0] */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+12664 /* "argv0" */, uintptr(0), *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), 1) + tcl.XTcl_SetVar2(tls, interp, ts+12670 /* "argv" */, uintptr(0), ts+488 /* "" */, 1) for i = 1; i < argc; i++ { - tcl.XTcl_SetVar2(tls, interp, ts+21484 /* "argv" */, uintptr(0), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), ((1 | 8) | 4)) + tcl.XTcl_SetVar2(tls, interp, ts+12670 /* "argv" */, uintptr(0), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), ((1 | 8) | 4)) } zScript = sqlite3TestInit(tls, interp) if zScript == uintptr(0) { zScript = tclsh_main_loop(tls) } if tcl.XTcl_GlobalEval(tls, interp, zScript) != 0 { - var zInfo uintptr = tcl.XTcl_GetVar2(tls, interp, ts+21489 /* "errorInfo" */, uintptr(0), 1) + var zInfo uintptr = tcl.XTcl_GetVar2(tls, interp, ts+12675 /* "errorInfo" */, uintptr(0), 1) if zInfo == uintptr(0) { zInfo = tcl.XTcl_GetStringResult(tls, interp) } - crt.Xfprintf(tls, crt.Xstderr, ts+21499 /* "%s: %s\n" */, crt.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv)), zInfo)) + crt.Xfprintf(tls, crt.Xstderr, ts+12685 /* "%s: %s\n" */, crt.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv)), zInfo)) return 1 } return 0 @@ -36594,43 +35052,12 @@ type off64_t = int64 /* stdio.h:70:19 */ type fpos64_t = _G_fpos64_t /* stdio.h:89:20 */ type ino64_t = uint64 /* types.h:54:19 */ // Type to count file system inodes. -type blkcnt64_t = int64 /* types.h:236:22 */ // Type to count number of disk blocks. -type fsblkcnt64_t = uint64 /* types.h:237:24 */ // Type to count file system blocks. -type fsfilcnt64_t = uint64 /* types.h:238:24 */ - -// If this symbol has done its job, get rid of it. - -// Unsigned type of `sizeof' something. - -// Define this type if we are doing the whole job, -// or if we want this type in particular. - -// Wide character type. -// Locale-writers should change this as necessary to -// be big enough to hold unique values not between 0 and 127, -// and not (wchar_t) -1, for each defined multibyte character. - -// Define this type if we are doing the whole job, -// or if we want this type in particular. - -// In 4.3bsd-net2, leave these undefined to indicate that size_t, etc. -// are already defined. -// BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here. -// NetBSD 5 requires the I386_ANSI_H and X86_64_ANSI_H checks here. - -// A null pointer constant. - -// Offset of member MEMBER in a struct of type TYPE. - -// Type whose alignment is supported in every context and is at least -// as great as that of any standard type not using alignment -// specifiers. -type max_align_t = struct { - F__max_align_ll int64 - F__max_align_ld float64 -} /* stddef.h:437:3 */ // 2-byte unsigned integer -type i16 = int16 /* sqliteInt.h:773:20 */ // 1-byte unsigned integer -type i8 = int8 /* sqliteInt.h:775:19 */ // 1-byte signed integer +type blkcnt64_t = int64 /* types.h:236:22 */ // Type to count number of disk blocks. +type fsblkcnt64_t = uint64 /* types.h:237:24 */ // Type to count file system blocks. +type fsfilcnt64_t = uint64 /* types.h:238:24 */ // 8-byte unsigned integer +type u321 = uint32 /* sqliteInt.h:771:21 */ // 2-byte unsigned integer +type i16 = int16 /* sqliteInt.h:773:20 */ // 1-byte unsigned integer +type i8 = int8 /* sqliteInt.h:775:19 */ // 1-byte signed integer // SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value // that can be stored in a u32 without loss of data. The value @@ -36641,7 +35068,7 @@ type i8 = int8 /* sqliteInt.h:775:19 */ // 1-byte signed integer // table or index. This is an unsigned integer type. For 99.9% of // the world, a 32-bit integer is sufficient. But a 64-bit integer // can be used at compile-time if desired. -type tRowcnt = u32 /* sqliteInt.h:794:14 */ // 32-bit is the default +type tRowcnt = u321 /* sqliteInt.h:794:14 */ // 32-bit is the default // Estimated quantities used for query planning are stored as 16-bit // logarithms. For quantity X, the value stored is 10*log2(X). This @@ -36960,7 +35387,7 @@ type Expr1 = struct { Fop u8 FaffExpr int8 Fop2 u8 - Fflags u32 + Fflags u321 Fu struct{ FzToken uintptr } FpLeft uintptr FpRight uintptr @@ -37020,7 +35447,7 @@ type FuncDestructor1 = struct { type FuncDestructor = FuncDestructor1 /* sqliteInt.h:1097:31 */ type FuncDef1 = struct { FnArg i8 - FfuncFlags u32 + FfuncFlags u321 FpUserData uintptr FpNext uintptr FxSFunc uintptr @@ -37074,7 +35501,7 @@ type IndexSample1 = struct { type IndexSample = IndexSample1 /* sqliteInt.h:1102:28 */ type KeyInfo1 = struct { - FnRef u32 + FnRef u321 Fenc u8 FnKeyField u16 FnAllField u16 @@ -37085,12 +35512,12 @@ type KeyInfo1 = struct { type KeyInfo = KeyInfo1 /* sqliteInt.h:1104:24 */ type Lookaside1 = struct { - FbDisable u32 + FbDisable u321 Fsz u16 FszTrue u16 FbMalloced u8 - FnSlot u32 - FanStat [3]u32 + FnSlot u321 + FanStat [3]u321 FpInit uintptr FpFree uintptr FpSmallInit uintptr @@ -37167,9 +35594,9 @@ type Parse1 = struct { FpParentParse uintptr FpAggList uintptr FaddrCrTab int32 - FnQueryLoop u32 - Foldmask u32 - Fnewmask u32 + FnQueryLoop u321 + Foldmask u321 + Fnewmask u321 FeTriggerOp u8 FeOrconf u8 FdisableTriggers u8 @@ -37235,10 +35662,10 @@ type Savepoint = Savepoint1 /* sqliteInt.h:1114:26 */ type Select1 = struct { Fop u8 FnSelectRow LogEst - FselFlags u32 + FselFlags u321 FiLimit int32 FiOffset int32 - FselId u32 + FselId u321 FaddrOpenEphm [2]int32 FpEList uintptr FpSrc uintptr @@ -37267,7 +35694,7 @@ type SelectDest1 = struct { type SelectDest = SelectDest1 /* sqliteInt.h:1117:27 */ type SrcList1 = struct { FnSrc int32 - FnAlloc u32 + FnAlloc u321 Fa [1]struct { FpSchema uintptr FzDatabase uintptr @@ -37305,8 +35732,8 @@ type Table1 = struct { FzColAff uintptr FpCheck uintptr Ftnum int32 - FnTabRef u32 - FtabFlags u32 + FnTabRef u321 + FtabFlags u321 FiPKey i16 FnCol i16 FnNVCol i16 @@ -37350,7 +35777,7 @@ type TriggerPrg1 = struct { FpNext uintptr FpProgram uintptr Forconf int32 - FaColmask [2]u32 + FaColmask [2]u321 _ [4]byte } @@ -37518,7 +35945,7 @@ type Btree1 = struct { FhasIncrblobCur u8 FwantToLock int32 FnBackup int32 - FiDataVersion u32 + FiDataVersion u321 FpNext uintptr FpPrev uintptr Flock BtLock @@ -37564,10 +35991,10 @@ type BtShared1 = struct { FminLocal u16 FmaxLeaf u16 FminLeaf u16 - FpageSize u32 - FusableSize u32 + FpageSize u321 + FusableSize u321 FnTransaction int32 - FnPage u32 + FnPage u321 FpSchema uintptr FxFreeSchema uintptr Fmutex uintptr @@ -37636,10 +36063,10 @@ type Vdbe1 = struct { FpNext uintptr FpParse uintptr FnVar ynVar - Fmagic u32 + Fmagic u321 FnMem int32 FnCursor int32 - FcacheCtr u32 + FcacheCtr u321 Fpc int32 Frc int32 FnChange int32 @@ -37669,13 +36096,13 @@ type Vdbe1 = struct { Fexpired uint16 /* bft expired: 2, bft explain: 2, bft changeCntOn: 1, bft runOnlyOnce: 1, bft usesStmtJournal: 1, bft readOnly: 1, bft bIsReader: 1 */ FbtreeMask yDbMask FlockMask yDbMask - FaCounter [7]u32 + FaCounter [7]u321 FzSql uintptr FpFree uintptr FpFrame uintptr FpDelFrame uintptr FnFrame int32 - Fexpmask u32 + Fexpmask u321 FpProgram uintptr FpAuxData uintptr } @@ -37842,7 +36269,7 @@ type RecordCompare = uintptr /* vdbe.h:286:13 */ // The type used to represent a page number. The first page in a file // is called page 1. 0 is used to represent "not a page". -type Pgno = u32 /* pager.h:33:13 */ +type Pgno = u321 /* pager.h:33:13 */ // Handle type for pages. type PgHdr1 = struct { @@ -38155,8 +36582,8 @@ type InitData = struct { FpzErrMsg uintptr FiDb int32 Frc int32 - FmInitFlags u32 - FnInitRow u32 + FmInitFlags u321 + FnInitRow u321 } /* sqliteInt.h:3609:3 */ // Allowed values for mInitFlags @@ -38191,7 +36618,7 @@ type Sqlite3Config = struct { FnPage int32 FmxParserStack int32 FsharedCacheEnabled int32 - FszPma u32 + FszPma u321 FisInit int32 FinProgress int32 FisMutexInit int32 @@ -38201,10 +36628,11 @@ type Sqlite3Config = struct { FpInitMutex uintptr FxLog uintptr FpLogArg uintptr + FmxMemdbSize sqlite3_int64 FxTestCallback uintptr FbLocaltimeFault int32 FiOnceResetThreshold int32 - FszSorterRef u32 + FszSorterRef u321 FiPrngSeed uint32 } @@ -38283,21 +36711,21 @@ type VdbeCursor1 = struct { FpBtx uintptr FseqCount i64 FaAltMap uintptr - FcacheStatus u32 + FcacheStatus u321 FseekResult int32 FpAltCursor uintptr Fuc struct{ FpCursor uintptr } FpKeyInfo uintptr - FiHdrOffset u32 + FiHdrOffset u321 FpgnoRoot Pgno FnField i16 FnHdrParsed u16 FmovetoTarget i64 FaOffset uintptr FaRow uintptr - FpayloadSize u32 - FszRow u32 - FaType [1]u32 + FpayloadSize u321 + FszRow u321 + FaType [1]u321 _ [4]byte } @@ -38449,7 +36877,7 @@ func sqlite3TestTextToPtr(tls *crt.TLS, z uintptr) uintptr { /* test1.c:54:6: */ // var v u64 at bp+8, 8 - // var v2 u32 at bp+16, 4 + // var v2 u321 at bp+16, 4 if (int32(*(*int8)(unsafe.Pointer(z + uintptr(0)))) == '0') && (int32(*(*int8)(unsafe.Pointer(z + uintptr(1)))) == 'x') { z += uintptr(2) @@ -38463,7 +36891,7 @@ func sqlite3TestTextToPtr(tls *crt.TLS, z uintptr) uintptr { /* test1.c:54:6: */ crt.Xmemcpy(tls, bp /* &p */, bp+8 /* &v */, uint64(unsafe.Sizeof(uintptr(0)))) } else { - *(*u32)(unsafe.Pointer(bp + 16 /* v2 */)) = u32(*(*u64)(unsafe.Pointer(bp + 8 /* v */))) + *(*u321)(unsafe.Pointer(bp + 16 /* v2 */)) = u321(*(*u64)(unsafe.Pointer(bp + 8 /* v */))) crt.Xmemcpy(tls, bp /* &p */, bp+16 /* &v2 */, uint64(unsafe.Sizeof(uintptr(0)))) } return *(*uintptr)(unsafe.Pointer(bp /* p */)) @@ -38482,16 +36910,16 @@ func get_sqlite_pointer(tls *crt.TLS, clientData uintptr, interp uintptr, objc i // var zBuf [100]int8 at bp+112, 100 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+21507 /* "SQLITE-CONNECTIO..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+12693 /* "SQLITE-CONNECTIO..." */) return 1 } if !(tcl.XTcl_GetCommandInfo(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &cmdInfo */) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21525, /* "command not foun..." */ + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12711, /* "command not foun..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) return 1 } p = (*Tcl_CmdInfo)(unsafe.Pointer(bp + 48 /* &cmdInfo */)).FobjClientData - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+112 /* &zBuf[0] */, ts+20002 /* "%p" */, crt.VaList(bp+24, (*struct{ Fdb uintptr })(unsafe.Pointer(p)).Fdb)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+112 /* &zBuf[0] */, ts+11197 /* "%p" */, crt.VaList(bp+24, (*struct{ Fdb uintptr })(unsafe.Pointer(p)).Fdb)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, bp+112 /* &zBuf[0] */, 0)) return 0 } @@ -38528,7 +36956,7 @@ func sqlite3TestErrCode(tls *crt.TLS, interp uintptr, db uintptr, rc int32) int3 var r2 int32 = sqlite3.Xsqlite3_errcode(tls, db) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+48, /* &zBuf[0] */ - ts+21545, /* "error code %s (%..." */ + ts+12731, /* "error code %s (%..." */ crt.VaList(bp, sqlite3.Xsqlite3ErrName(tls, rc), rc, sqlite3.Xsqlite3ErrName(tls, r2), r2)) tcl.XTcl_ResetResult(tls, interp) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, bp+48 /* &zBuf[0] */, 0)) @@ -38558,7 +36986,7 @@ func sqlite3TestMakePointerStr(tls *crt.TLS, interp uintptr, zPtr uintptr, p uin bp := tls.Alloc(8) defer tls.Free(8) - sqlite3.Xsqlite3_snprintf(tls, 100, zPtr, ts+20002 /* "%p" */, crt.VaList(bp, p)) + sqlite3.Xsqlite3_snprintf(tls, 100, zPtr, ts+11197 /* "%p" */, crt.VaList(bp, p)) return 0 } @@ -38573,7 +37001,7 @@ func exec_printf_cb(tls *crt.TLS, pArg uintptr, argc int32, argv uintptr, name u if *(*uintptr)(unsafe.Pointer(name + uintptr(i)*8)) != 0 { return *(*uintptr)(unsafe.Pointer(name + uintptr(i)*8)) } - return ts + 5494 /* "NULL" */ + return ts + 4252 /* "NULL" */ }()) } } @@ -38582,7 +37010,7 @@ func exec_printf_cb(tls *crt.TLS, pArg uintptr, argc int32, argv uintptr, name u if *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) != 0 { return *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) } - return ts + 5494 /* "NULL" */ + return ts + 4252 /* "NULL" */ }()) } return 0 @@ -38607,7 +37035,7 @@ func test_io_trace(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, ar // Also return true if the OMIT_MISUSE environment variable exists. func clang_sanitize_address(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test1.c:269:26: */ var res int32 = 0 - if (res == 0) && (crt.Xgetenv(tls, ts+21603 /* "OMIT_MISUSE" */) != uintptr(0)) { + if (res == 0) && (crt.Xgetenv(tls, ts+12789 /* "OMIT_MISUSE" */) != uintptr(0)) { res = 1 } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, res)) @@ -38633,8 +37061,8 @@ func test_exec_printf(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, // var zBuf [30]int8 at bp+280, 30 if argc != 4 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21641 /* " DB FORMAT STRIN..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12827 /* " DB FORMAT STRIN..." */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+48 /* &db */) != 0 { @@ -38646,7 +37074,7 @@ func test_exec_printf(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, f func(*crt.TLS, uintptr, int32, uintptr, uintptr) int32 }{exec_printf_cb})), bp+56 /* &str */, bp+272 /* &zErr */) sqlite3.Xsqlite3_free(tls, zSql) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+280 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+40, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+280 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+40, rc)) tcl.XTcl_AppendElement(tls, interp, bp+280 /* &zBuf[0] */) tcl.XTcl_AppendElement(tls, interp, func() uintptr { if rc == 0 { @@ -38687,8 +37115,8 @@ func test_exec_hex(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, ar // var zBuf [30]int8 at bp+776, 30 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21659 /* " DB HEX" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12845 /* " DB HEX" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+40 /* &db */) != 0 { @@ -38721,7 +37149,7 @@ __3: rc = sqlite3.Xsqlite3_exec(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* db */)), bp+48 /* &zSql[0] */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr, uintptr) int32 }{exec_printf_cb})), bp+552 /* &str */, bp+768 /* &zErr */) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+776 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+32, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+776 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+32, rc)) tcl.XTcl_AppendElement(tls, interp, bp+776 /* &zBuf[0] */) tcl.XTcl_AppendElement(tls, interp, func() uintptr { if rc == 0 { @@ -38750,8 +37178,8 @@ func db_enter(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv ui // var db uintptr at bp+32, 8 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -38767,8 +37195,8 @@ func db_leave(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv ui // var db uintptr at bp+32, 8 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -38797,15 +37225,15 @@ func test_exec(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u // var zBuf [30]int8 at bp+280, 30 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21671 /* " DB SQL" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12857 /* " DB SQL" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+48 /* &db */) != 0 { return 1 } tcl.XTcl_DStringInit(tls, bp+56 /* &str */) - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) for i = crt.AssignInt32(&j, 0); *(*int8)(unsafe.Pointer(zSql + uintptr(i))) != 0; { if int32(*(*int8)(unsafe.Pointer(zSql + uintptr(i)))) == '%' { *(*int8)(unsafe.Pointer(zSql + uintptr(crt.PostIncInt32(&j, 1)))) = (int8((testHexToInt(tls, int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 1)))))) << 4) + testHexToInt(tls, int32(*(*int8)(unsafe.Pointer(zSql + uintptr((i + 2)))))))) @@ -38819,7 +37247,7 @@ func test_exec(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u f func(*crt.TLS, uintptr, int32, uintptr, uintptr) int32 }{exec_printf_cb})), bp+56 /* &str */, bp+272 /* &zErr */) sqlite3.Xsqlite3_free(tls, zSql) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+280 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+40, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+280 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+40, rc)) tcl.XTcl_AppendElement(tls, interp, bp+280 /* &zBuf[0] */) tcl.XTcl_AppendElement(tls, interp, func() uintptr { if rc == 0 { @@ -38850,8 +37278,8 @@ func test_exec_nr(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, arg var rc int32 *(*uintptr)(unsafe.Pointer(bp + 40 /* zErr */)) = uintptr(0) if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21671 /* " DB SQL" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12857 /* " DB SQL" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -38877,7 +37305,7 @@ func test_mprintf_z(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, a var i int32 for i = 2; (i < argc) && ((i == 2) || (zResult != 0)); i++ { - zResult = sqlite3.Xsqlite3_mprintf(tls, ts+11257 /* "%z%s%s" */, crt.VaList(bp, zResult, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) + zResult = sqlite3.Xsqlite3_mprintf(tls, ts+12865 /* "%z%s%s" */, crt.VaList(bp, zResult, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) } tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, zResult, 0)) sqlite3.Xsqlite3_free(tls, zResult) @@ -38894,7 +37322,7 @@ func test_mprintf_n(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, a var zStr uintptr *(*int32)(unsafe.Pointer(bp + 16 /* n */)) = 0 - zStr = sqlite3.Xsqlite3_mprintf(tls, ts+21679 /* "%s%n" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+16 /* &n */)) + zStr = sqlite3.Xsqlite3_mprintf(tls, ts+12872 /* "%s%n" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+16 /* &n */)) sqlite3.Xsqlite3_free(tls, zStr) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 16 /* n */)))) return 0 @@ -38920,7 +37348,7 @@ func test_snprintf_int(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 if uint64(n) > uint64(unsafe.Sizeof([100]int8{})) { n = int32(unsafe.Sizeof([100]int8{})) } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+24 /* &zStr[0] */, ts+21684 /* "abcdefghijklmnop..." */, 0) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+24 /* &zStr[0] */, ts+12877 /* "abcdefghijklmnop..." */, 0) sqlite3.Xsqlite3_snprintf(tls, n, bp+24 /* &zStr[0] */, zFormat, crt.VaList(bp, a1)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+8, bp+24 /* &zStr[0] */, 0)) return 0 @@ -38956,8 +37384,8 @@ func test_get_table_printf(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc i } } if (argc != 4) && (argc != 5) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21711 /* " DB FORMAT STRIN..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12904 /* " DB FORMAT STRIN..." */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+72 /* &db */) != 0 { @@ -38972,13 +37400,13 @@ func test_get_table_printf(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc i *(*int32)(unsafe.Pointer(bp + 64 /* resCount */)) = ((*(*int32)(unsafe.Pointer(bp + 312 /* nRow */)) + 1) * *(*int32)(unsafe.Pointer(bp + 316 /* nCol */))) } sqlite3.Xsqlite3_free(tls, zSql) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+320 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+40, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+320 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+40, rc)) tcl.XTcl_AppendElement(tls, interp, bp+320 /* &zBuf[0] */) if rc == 0 { if argc == 4 { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+320 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+48, *(*int32)(unsafe.Pointer(bp + 312 /* nRow */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+320 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+48, *(*int32)(unsafe.Pointer(bp + 312 /* nRow */)))) tcl.XTcl_AppendElement(tls, interp, bp+320 /* &zBuf[0] */) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+320 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+56, *(*int32)(unsafe.Pointer(bp + 316 /* nCol */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+320 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+56, *(*int32)(unsafe.Pointer(bp + 316 /* nCol */)))) tcl.XTcl_AppendElement(tls, interp, bp+320 /* &zBuf[0] */) } for i = 0; i < *(*int32)(unsafe.Pointer(bp + 64 /* resCount */)); i++ { @@ -38986,7 +37414,7 @@ func test_get_table_printf(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc i if *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 /* aResult */)) + uintptr(i)*8)) != 0 { return *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 /* aResult */)) + uintptr(i)*8)) } - return ts + 5494 /* "NULL" */ + return ts + 4252 /* "NULL" */ }()) } } else { @@ -39014,13 +37442,13 @@ func test_last_rowid(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, // var zBuf [30]int8 at bp+64, 30 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), ts+21737 /* " DB\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), ts+12930 /* " DB\"" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+56 /* &db */) != 0 { return 1 } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+64 /* &zBuf[0] */, ts+17145 /* "%lld" */, crt.VaList(bp+32, sqlite3.Xsqlite3_last_insert_rowid(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* db */))))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+64 /* &zBuf[0] */, ts+8668 /* "%lld" */, crt.VaList(bp+32, sqlite3.Xsqlite3_last_insert_rowid(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* db */))))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+64 /* &zBuf[0] */, 0)) return 0 } @@ -39050,8 +37478,8 @@ func sqlite_test_close(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21742 /* " FILENAME\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12935 /* " FILENAME\"" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -39073,8 +37501,8 @@ func sqlite_test_close_v2(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc in var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21742 /* " FILENAME\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12935 /* " FILENAME\"" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -39112,11 +37540,26 @@ func hex8Func(tls *crt.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:74 z = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) for i = 0; (uint64(i) < ((uint64(unsafe.Sizeof([200]int8{})) / uint64(2)) - uint64(2))) && (*(*uint8)(unsafe.Pointer(z + uintptr(i))) != 0); i++ { - sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([200]int8{})) - (uint64(i * 2)))), (bp + 8 /* &zBuf */ + uintptr((i * 2))), ts+21753 /* "%02x" */, crt.VaList(bp, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) + sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([200]int8{})) - (uint64(i * 2)))), (bp + 8 /* &zBuf */ + uintptr((i * 2))), ts+12946 /* "%02x" */, crt.VaList(bp, int32(*(*uint8)(unsafe.Pointer(z + uintptr(i)))))) } *(*int8)(unsafe.Pointer(bp + 8 /* &zBuf[0] */ + uintptr((i * 2)))) = int8(0) sqlite3.Xsqlite3_result_text(tls, p, bp+8 /* zBuf */, -1, crt.UintptrFromInt32(-1)) } +func hex16Func(tls *crt.TLS, p uintptr, argc int32, argv uintptr) { /* test1.c:760:13: */ + bp := tls.Alloc(408) + defer tls.Free(408) + + var z uintptr + var i int32 + // var zBuf [400]int8 at bp+8, 400 + + z = sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + for i = 0; (uint64(i) < ((uint64(unsafe.Sizeof([400]int8{})) / uint64(4)) - uint64(4))) && (*(*uint16)(unsafe.Pointer(z + uintptr(i)*2)) != 0); i++ { + sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([400]int8{})) - (uint64(i * 4)))), (bp + 8 /* &zBuf */ + uintptr((i * 4))), ts+12951 /* "%04x" */, crt.VaList(bp, (int32(*(*uint16)(unsafe.Pointer(z + uintptr(i)*2)))&0xff))) + } + *(*int8)(unsafe.Pointer(bp + 8 /* &zBuf[0] */ + uintptr((i * 4)))) = int8(0) + sqlite3.Xsqlite3_result_text(tls, p, bp+8 /* zBuf */, -1, crt.UintptrFromInt32(-1)) +} // A structure into which to accumulate text. type dstr = struct { @@ -39152,7 +37595,7 @@ func execFuncCallback(tls *crt.TLS, pData uintptr, argc int32, argv uintptr, Not var i int32 for i = 0; i < argc; i++ { if *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)) == uintptr(0) { - dstrAppend(tls, p, ts+5494 /* "NULL" */, ' ') + dstrAppend(tls, p, ts+4252 /* "NULL" */, ' ') } else { dstrAppend(tls, p, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), ' ') } @@ -39211,7 +37654,7 @@ func tkt2213Function(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { zText3 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) if (zText1 != zText2) || (zText2 != zText3) { - sqlite3.Xsqlite3_result_error(tls, context, ts+21758 /* "tkt2213 is not f..." */, -1) + sqlite3.Xsqlite3_result_error(tls, context, ts+12956 /* "tkt2213 is not f..." */, -1) } else { var zCopy uintptr = sqlite3.Xsqlite3_malloc(tls, nText) crt.Xmemcpy(tls, zCopy, zText1, uint64(nText)) @@ -39252,9 +37695,11 @@ func ptrChngFunction(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { if zCmd == uintptr(0) { return } - if crt.Xstrcmp(tls, zCmd, ts+19413 /* "text" */) == 0 { + if crt.Xstrcmp(tls, zCmd, ts+10620 /* "text" */) == 0 { p1 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - } else if crt.Xstrcmp(tls, zCmd, ts+19418 /* "blob" */) == 0 { + } else if crt.Xstrcmp(tls, zCmd, ts+12977 /* "text16" */) == 0 { + p1 = sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + } else if crt.Xstrcmp(tls, zCmd, ts+10625 /* "blob" */) == 0 { p1 = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } else { return @@ -39263,9 +37708,11 @@ func ptrChngFunction(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { if zCmd == uintptr(0) { return } - if crt.Xstrcmp(tls, zCmd, ts+21779 /* "bytes" */) == 0 { + if crt.Xstrcmp(tls, zCmd, ts+12984 /* "bytes" */) == 0 { sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - } else if crt.Xstrcmp(tls, zCmd, ts+21785 /* "noop" */) == 0 { + } else if crt.Xstrcmp(tls, zCmd, ts+12990 /* "bytes16" */) == 0 { + sqlite3.Xsqlite3_value_bytes16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + } else if crt.Xstrcmp(tls, zCmd, ts+12998 /* "noop" */) == 0 { } else { return } @@ -39273,9 +37720,11 @@ func ptrChngFunction(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { if zCmd == uintptr(0) { return } - if crt.Xstrcmp(tls, zCmd, ts+19413 /* "text" */) == 0 { + if crt.Xstrcmp(tls, zCmd, ts+10620 /* "text" */) == 0 { p2 = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) - } else if crt.Xstrcmp(tls, zCmd, ts+19418 /* "blob" */) == 0 { + } else if crt.Xstrcmp(tls, zCmd, ts+12977 /* "text16" */) == 0 { + p2 = sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + } else if crt.Xstrcmp(tls, zCmd, ts+10625 /* "blob" */) == 0 { p2 = sqlite3.Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } else { return @@ -39323,31 +37772,37 @@ func test_create_function(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc in // var db uintptr at bp+32, 8 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21737 /* " DB\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12930 /* " DB\"" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { return 1 } - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21790 /* "x_coalesce" */, -1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13003 /* "x_coalesce" */, -1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{t1_ifnullFunc})), uintptr(0), uintptr(0)) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21801 /* "hex8" */, 1, (1 | 0x000000800), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13014 /* "hex8" */, 1, (1 | 0x000000800), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{hex8Func})), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21806 /* "tkt2213func" */, 1, 5, uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13019 /* "hex16" */, 1, (4 | 0x000000800), + uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr) + }{hex16Func})), uintptr(0), uintptr(0)) + } + if rc == 0 { + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13025 /* "tkt2213func" */, 1, 5, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tkt2213Function})), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21818 /* "pointer_change" */, 4, 5, uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13037 /* "pointer_change" */, 4, 5, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{ptrChngFunction})), uintptr(0), uintptr(0)) @@ -39357,13 +37812,13 @@ func test_create_function(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc in // both return an ascending integer with each call. But counter1() is marked // as non-deterministic and counter2() is marked as deterministic. if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21833 /* "counter1" */, -1, 1, + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13052 /* "counter1" */, -1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{nondeterministicFunction})), uintptr(0), uintptr(0)) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21842 /* "counter2" */, -1, (1 | 0x000000800), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13061 /* "counter2" */, -1, (1 | 0x000000800), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{nondeterministicFunction})), uintptr(0), uintptr(0)) @@ -39372,12 +37827,33 @@ func test_create_function(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc in // The intreal() function converts its argument to an integer and returns // it as a MEM_IntReal. if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21851 /* "intreal" */, 1, 1, + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13070 /* "intreal" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{intrealFunction})), uintptr(0), uintptr(0)) } + // Use the sqlite3_create_function16() API here. Mainly for fun, but also + // because it is not tested anywhere else. + if rc == 0 { + var zUtf16 uintptr + var pVal uintptr + sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmutex) + pVal = sqlite3.Xsqlite3ValueNew(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))) + sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, ts+13078 /* "x_sqlite_exec" */, uint8(1), uintptr(0)) + zUtf16 = sqlite3.Xsqlite3ValueText(tls, pVal, uint8(2)) + if (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).FmallocFailed != 0 { + rc = 7 + } else { + rc = sqlite3.Xsqlite3_create_function16(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), zUtf16, + 1, 4, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr) + }{sqlite3ExecFunc})), uintptr(0), uintptr(0)) + } + sqlite3.Xsqlite3ValueFree(tls, pVal) + sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmutex) + } + if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), rc) != 0 { return 1 } @@ -39397,8 +37873,8 @@ func test_drop_modules(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 // var db uintptr at bp+32, 8 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21737 /* " DB\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12930 /* " DB\"" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -39435,6 +37911,9 @@ type t1CountCtx1 = struct{ Fn int32 } // a UTF-8 error is reported on the finalize function. type t1CountCtx = t1CountCtx1 /* test1.c:1123:27 */ func t1CountStep(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* test1.c:1127:13: */ + bp := tls.Alloc(9) + defer tls.Free(9) + var p uintptr p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) if ((argc == 0) || (5 != sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))))) && (p != 0) { @@ -39443,7 +37922,10 @@ func t1CountStep(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* t if argc > 0 { var v int32 = sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) if v == 40 { - sqlite3.Xsqlite3_result_error(tls, context, ts+21859 /* "value of 40 hand..." */, -1) + sqlite3.Xsqlite3_result_error(tls, context, ts+13092 /* "value of 40 hand..." */, -1) + } else if v == 41 { + *(*[9]int8)(unsafe.Pointer(bp /* zUtf16ErrMsg */)) = [9]int8{int8(0), int8(0x61), int8(0), int8(0x62), int8(0), int8(0x63), int8(0), int8(0), int8(0)} + sqlite3.Xsqlite3_result_error16(tls, context, (bp /* &zUtf16ErrMsg */ + uintptr((1 - 0))), -1) } } } @@ -39452,7 +37934,7 @@ func t1CountFinalize(tls *crt.TLS, context uintptr) { /* test1.c:1149:13: */ p = sqlite3.Xsqlite3_aggregate_context(tls, context, int32(unsafe.Sizeof(t1CountCtx{}))) if p != 0 { if (*t1CountCtx)(unsafe.Pointer(p)).Fn == 42 { - sqlite3.Xsqlite3_result_error(tls, context, ts+21889 /* "x_count totals t..." */, -1) + sqlite3.Xsqlite3_result_error(tls, context, ts+13122 /* "x_count totals t..." */, -1) } else { sqlite3.Xsqlite3_result_int(tls, context, func() int32 { if p != 0 { @@ -39497,25 +37979,25 @@ func test_create_aggregate(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc i var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21742 /* " FILENAME\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12935 /* " FILENAME\"" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { return 1 } - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21910 /* "x_count" */, 0, 1, uintptr(0), uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13143 /* "x_count" */, 0, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{t1CountStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{t1CountFinalize}))) if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21910 /* "x_count" */, 1, 1, uintptr(0), uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13143 /* "x_count" */, 1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{t1CountStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{t1CountFinalize}))) } if rc == 0 { - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+21918 /* "legacy_count" */, 0, 5, uintptr(0), uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+13151 /* "legacy_count" */, 0, 5, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{legacyCountStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{legacyCountFinalize}))) @@ -39538,11 +38020,11 @@ func test_printf(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv defer tls.Free(40) if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21931 /* " TEXT\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13164 /* " TEXT\"" */, 0)) return 1 } - crt.Xprintf(tls, ts+597 /* "%s\n" */, crt.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)))) + crt.Xprintf(tls, ts+293 /* "%s\n" */, crt.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)))) return 0 } @@ -39558,8 +38040,8 @@ func sqlite3_mprintf_int(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int var i int32 var z uintptr if argc != 5 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21938 /* " FORMAT INT INT ..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13171 /* " FORMAT INT INT ..." */, 0)) return 1 } for i = 2; i < 5; i++ { @@ -39585,13 +38067,13 @@ func sqlite3_mprintf_int64(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc i var z uintptr if argc != 5 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21938 /* " FORMAT INT INT ..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13171 /* " FORMAT INT INT ..." */, 0)) return 1 } for i = 2; i < 5; i++ { if sqlite3.Xsqlite3Atoi64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)), (bp+88 /* &a */ +uintptr((i-2))*8), sqlite3.Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))), uint8(1)) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+21959 /* "argument is not ..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+13192 /* "argument is not ..." */, 0)) return 1 } } @@ -39617,8 +38099,8 @@ func sqlite3_mprintf_long(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc in var z uintptr if argc != 5 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21938 /* " FORMAT INT INT ..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13171 /* " FORMAT INT INT ..." */, 0)) return 1 } for i = 2; i < 5; i++ { @@ -39646,8 +38128,8 @@ func sqlite3_mprintf_str(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int var i int32 var z uintptr if (argc < 4) || (argc > 5) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21998 /* " FORMAT INT INT ..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13231 /* " FORMAT INT INT ..." */, 0)) return 1 } for i = 2; i < 4; i++ { @@ -39680,15 +38162,15 @@ func sqlite3_snprintf_str(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc in var z uintptr if (argc < 5) || (argc > 6) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+22024 /* " INT FORMAT INT ..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13257 /* " INT FORMAT INT ..." */, 0)) return 1 } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+88 /* &n */) != 0 { return 1 } if *(*int32)(unsafe.Pointer(bp + 88 /* n */)) < 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22054 /* "N must be non-ne..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+13287 /* "N must be non-ne..." */, 0)) return 1 } for i = 3; i < 5; i++ { @@ -39722,8 +38204,8 @@ func sqlite3_mprintf_double(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc var z uintptr if argc != 5 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+22077 /* " FORMAT INT INT ..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13310 /* " FORMAT INT INT ..." */, 0)) return 1 } for i = 2; i < 4; i++ { @@ -39754,8 +38236,8 @@ func sqlite3_mprintf_scaled(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc var z uintptr if argc != 4 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+22101 /* " FORMAT DOUBLE D..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13334 /* " FORMAT DOUBLE D..." */, 0)) return 1 } for i = 2; i < 4; i++ { @@ -39780,8 +38262,8 @@ func sqlite3_mprintf_stronly(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc var z uintptr if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+22124 /* " FORMAT STRING\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13357 /* " FORMAT STRING\"" */, 0)) return 1 } z = sqlite3.Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), crt.VaList(bp+32, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) @@ -39808,12 +38290,12 @@ func sqlite3_mprintf_hexdouble(tls *crt.TLS, NotUsed uintptr, interp uintptr, ar // var d sqlite_uint64 at bp+104, 8 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+22124 /* " FORMAT STRING\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13357 /* " FORMAT STRING\"" */, 0)) return 1 } - if crt.X__isoc99_sscanf(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+22140 /* "%08x%08x" */, crt.VaList(bp+32, bp+88 /* &x2 */, bp+92 /* &x1 */)) != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+22149 /* "2nd argument sho..." */, 0)) + if crt.X__isoc99_sscanf(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+13373 /* "%08x%08x" */, crt.VaList(bp+32, bp+88 /* &x2 */, bp+92 /* &x1 */)) != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+13382 /* "2nd argument sho..." */, 0)) return 1 } *(*sqlite_uint64)(unsafe.Pointer(bp + 104 /* d */)) = sqlite_uint64(*(*uint32)(unsafe.Pointer(bp + 88 /* x2 */))) @@ -39837,7 +38319,7 @@ func test_enable_shared(tls *crt.TLS, clientData ClientData, interp uintptr, obj var ret int32 = 0 if (objc != 2) && (objc != 1) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22193 /* "?BOOLEAN?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13426 /* "?BOOLEAN?" */) return 1 } ret = sqlite3.Xsqlite3Config.FsharedCacheEnabled @@ -39867,7 +38349,7 @@ func test_extended_result_codes(tls *crt.TLS, clientData ClientData, interp uint // var db uintptr at bp, 8 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22203 /* "DB BOOLEAN" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13436 /* "DB BOOLEAN" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { @@ -39911,7 +38393,7 @@ func test_table_column_metadata(tls *crt.TLS, clientData ClientData, interp uint // var autoincrement int32 at bp+48, 4 if (objc != 5) && (objc != 4) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22214 /* "DB dbname tblnam..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13447 /* "DB dbname tblnam..." */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+16 /* &db */) != 0 { @@ -39990,7 +38472,7 @@ func test_blob_reopen(tls *crt.TLS, clientData ClientData, interp uintptr, objc var rc int32 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22240 /* "CHANNEL ROWID" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13473 /* "CHANNEL ROWID" */) return 1 } @@ -40082,7 +38564,7 @@ func test_create_collation_v2(tls *crt.TLS, clientData ClientData, interp uintpt var rc int32 if objc != 5 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22254 /* "DB-HANDLE NAME C..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13487 /* "DB-HANDLE NAME C..." */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+16 /* &db */) != 0 { @@ -40102,7 +38584,7 @@ func test_create_collation_v2(tls *crt.TLS, clientData ClientData, interp uintpt }{testCreateCollationCmp})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{testCreateCollationDel}))) if rc != 21 { tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp, ts+22287 /* "sqlite3_create_c..." */, uintptr(0))) + crt.VaList(bp, ts+13520 /* "sqlite3_create_c..." */, uintptr(0))) return 1 } rc = sqlite3.Xsqlite3_create_collation_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), 1, @@ -40203,16 +38685,16 @@ func test_create_function_v2(tls *crt.TLS, clientData ClientData, interp uintptr var rc int32 *(*[6]EncTable)(unsafe.Pointer(bp + 32 /* aEnc */)) = [6]EncTable{ - {FzEnc: ts + 22352 /* "utf8" */, Fenc: 1}, - {FzEnc: ts + 22357 /* "utf16" */, Fenc: 4}, - {FzEnc: ts + 22363 /* "utf16le" */, Fenc: 2}, - {FzEnc: ts + 22371 /* "utf16be" */, Fenc: 3}, - {FzEnc: ts + 19423 /* "any" */, Fenc: 5}, - {FzEnc: ts + 8293 /* "0" */, Fenc: 0}, + {FzEnc: ts + 13585 /* "utf8" */, Fenc: 1}, + {FzEnc: ts + 13590 /* "utf16" */, Fenc: 4}, + {FzEnc: ts + 13596 /* "utf16le" */, Fenc: 2}, + {FzEnc: ts + 13604 /* "utf16be" */, Fenc: 3}, + {FzEnc: ts + 10630 /* "any" */, Fenc: 5}, + {FzEnc: ts + 12045 /* "0" */, Fenc: 0}, } if (objc < 5) || ((objc % 2) == 0) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22379 /* "DB NAME NARG ENC..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13612 /* "DB NAME NARG ENC..." */) return 1 } @@ -40224,7 +38706,7 @@ func test_create_function_v2(tls *crt.TLS, clientData ClientData, interp uintptr return 1 } if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), bp+32 /* &aEnc[0] */, int32(unsafe.Sizeof(EncTable{})), - ts+22408 /* "encoding" */, 0, bp+128 /* &enc */) != 0 { + ts+13641 /* "encoding" */, 0, bp+128 /* &enc */) != 0 { return 1 } *(*int32)(unsafe.Pointer(bp + 128 /* enc */)) = (*EncTable)(unsafe.Pointer(bp + 32 /* &aEnc */ + uintptr(*(*int32)(unsafe.Pointer(bp + 128 /* enc */)))*16)).Fenc @@ -40237,8 +38719,8 @@ func test_create_function_v2(tls *crt.TLS, clientData ClientData, interp uintptr for i = 5; i < objc; i = i + (2) { // var iSwitch int32 at bp+176, 4 - *(*[5]uintptr)(unsafe.Pointer(bp + 136 /* azSwitch */)) = [5]uintptr{ts + 22417 /* "-func" */, ts + 22423 /* "-step" */, ts + 22429 /* "-final" */, ts + 22436 /* "-destroy" */, uintptr(0)} - if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+136 /* &azSwitch[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+22445 /* "switch" */, 0, bp+176 /* &iSwitch */) != 0 { + *(*[5]uintptr)(unsafe.Pointer(bp + 136 /* azSwitch */)) = [5]uintptr{ts + 13650 /* "-func" */, ts + 13656 /* "-step" */, ts + 13662 /* "-final" */, ts + 13669 /* "-destroy" */, uintptr(0)} + if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+136 /* &azSwitch[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+13678 /* "switch" */, 0, bp+176 /* &iSwitch */) != 0 { sqlite3.Xsqlite3_free(tls, p) return 1 } @@ -40340,7 +38822,7 @@ func test_load_extension(tls *crt.TLS, clientData ClientData, interp uintptr, ob var zErr uintptr = uintptr(0) if (objc != 4) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22452 /* "DB-HANDLE FILE ?..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13685 /* "DB-HANDLE FILE ?..." */) return 1 } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -40351,7 +38833,7 @@ func test_load_extension(tls *crt.TLS, clientData ClientData, interp uintptr, ob // Extract the C database handle from the Tcl command name if !(tcl.XTcl_GetCommandInfo(tls, interp, zDb, bp+24 /* &cmdInfo */) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21525 /* "command not foun..." */, zDb, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12711 /* "command not foun..." */, zDb, uintptr(0))) return 1 } db = (*struct{ Fdb uintptr })(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 24 /* &cmdInfo */)).FobjClientData)).Fdb @@ -40360,7 +38842,7 @@ func test_load_extension(tls *crt.TLS, clientData ClientData, interp uintptr, ob // TCL_ERROR and load any error string into the interpreter. If no // error occurs, set rc to TCL_OK. rc = 1 - zErr = sqlite3.Xsqlite3_mprintf(tls, ts+22474 /* "this build omits..." */, 0) + zErr = sqlite3.Xsqlite3_mprintf(tls, ts+13707 /* "this build omits..." */, 0) _ = zProc _ = zFile if rc != 0 { @@ -40368,7 +38850,7 @@ func test_load_extension(tls *crt.TLS, clientData ClientData, interp uintptr, ob if zErr != 0 { return zErr } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), uintptr(1)) rc = 1 } else { @@ -40392,14 +38874,14 @@ func test_enable_load(tls *crt.TLS, clientData ClientData, interp uintptr, objc // var onoff int32 at bp+96, 4 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22516 /* "DB-HANDLE ONOFF" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13749 /* "DB-HANDLE ONOFF" */) return 1 } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) // Extract the C database handle from the Tcl command name if !(tcl.XTcl_GetCommandInfo(tls, interp, zDb, bp+32 /* &cmdInfo */) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21525 /* "command not foun..." */, zDb, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12711 /* "command not foun..." */, zDb, uintptr(0))) return 1 } db = (*struct{ Fdb uintptr })(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 32 /* &cmdInfo */)).FobjClientData)).Fdb @@ -40409,7 +38891,7 @@ func test_enable_load(tls *crt.TLS, clientData ClientData, interp uintptr, objc return 1 } - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+22474 /* "this build omits..." */)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+13707 /* "this build omits..." */)) return 1 } @@ -40436,38 +38918,38 @@ __1: if !(zArg0 != 0) { goto __3 } - if !(0 == sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+17462 /* "int" */)) { + if !(0 == sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+8775 /* "int" */)) { goto __5 } sqlite3.Xsqlite3_result_int(tls, context, sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)))) goto __6 __5: - if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+3370 /* "int64" */) == 0) { + if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+2631 /* "int64" */) == 0) { goto __7 } sqlite3.Xsqlite3_result_int64(tls, context, sqlite3.Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)))) goto __8 __7: - if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+22532 /* "string" */) == 0) { + if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+13765 /* "string" */) == 0) { goto __9 } sqlite3.Xsqlite3_result_text(tls, context, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))), -1, crt.UintptrFromInt32(-1)) goto __10 __9: - if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+3376 /* "double" */) == 0) { + if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+2637 /* "double" */) == 0) { goto __11 } sqlite3.Xsqlite3_result_double(tls, context, sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)))) goto __12 __11: - if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+7418 /* "null" */) == 0) { + if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+5922 /* "null" */) == 0) { goto __13 } sqlite3.Xsqlite3_result_null(tls, context) goto __14 __13: - if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+22539 /* "value" */) == 0) { + if !(sqlite3.Xsqlite3StrICmp(tls, zArg0, ts+13772 /* "value" */) == 0) { goto __15 } sqlite3.Xsqlite3_result_value(tls, context, *(*uintptr)(unsafe.Pointer(argv + uintptr(sqlite3.Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))))*8))) @@ -40500,7 +38982,7 @@ __2: error_out: sqlite3.Xsqlite3_result_error(tls, context, - ts+22545 /* "first argument s..." */, -1) + ts+13778 /* "first argument s..." */, -1) } // Usage: sqlite_register_test_function DB NAME @@ -40514,8 +38996,8 @@ func test_register_func(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 var rc int32 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+22613 /* " DB FUNCTION-NAM..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13846 /* " DB FUNCTION-NAM..." */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+48 /* &db */) != 0 { @@ -40548,8 +39030,8 @@ func test_finalize(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var db uintptr = uintptr(0) if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22631 /* " <STMT>" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+13864 /* " <STMT>" */, 0)) return 1 } @@ -40584,7 +39066,7 @@ func test_stmt_status(tls *crt.TLS, clientData uintptr, interp uintptr, objc int // var pStmt uintptr at bp, 8 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22639 /* "STMT PARAMETER R..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+13872 /* "STMT PARAMETER R..." */) return 1 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &pStmt */) != 0 { @@ -40623,13 +39105,13 @@ var aOp = [7]struct { Fop int32 _ [4]byte }{ - {FzName: ts + 22664 /* "SQLITE_STMTSTATU..." */, Fop: 1}, - {FzName: ts + 22696 /* "SQLITE_STMTSTATU..." */, Fop: 2}, - {FzName: ts + 22719 /* "SQLITE_STMTSTATU..." */, Fop: 3}, - {FzName: ts + 22747 /* "SQLITE_STMTSTATU..." */, Fop: 4}, - {FzName: ts + 22773 /* "SQLITE_STMTSTATU..." */, Fop: 5}, - {FzName: ts + 22801 /* "SQLITE_STMTSTATU..." */, Fop: 6}, - {FzName: ts + 22823 /* "SQLITE_STMTSTATU..." */, Fop: 99}, + {FzName: ts + 13897 /* "SQLITE_STMTSTATU..." */, Fop: 1}, + {FzName: ts + 13929 /* "SQLITE_STMTSTATU..." */, Fop: 2}, + {FzName: ts + 13952 /* "SQLITE_STMTSTATU..." */, Fop: 3}, + {FzName: ts + 13980 /* "SQLITE_STMTSTATU..." */, Fop: 4}, + {FzName: ts + 14006 /* "SQLITE_STMTSTATU..." */, Fop: 5}, + {FzName: ts + 14034 /* "SQLITE_STMTSTATU..." */, Fop: 6}, + {FzName: ts + 14056 /* "SQLITE_STMTSTATU..." */, Fop: 99}, } /* test1.c:2158:5 */ // Usage: sqlite3_config_sorterref @@ -40642,7 +39124,7 @@ func test_config_sorterref(tls *crt.TLS, clientData uintptr, interp uintptr, obj // var iVal int32 at bp+8, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22849 /* "NBYTE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14082 /* "NBYTE" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+8 /* &iVal */) != 0 { @@ -40663,7 +39145,7 @@ func vfsCurrentTimeInt64(tls *crt.TLS, clientData uintptr, interp uintptr, objc var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } (*(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pVfs + 136 /* &.xCurrentTimeInt64 */))))(tls, pVfs, bp /* &t */) @@ -40674,7 +39156,7 @@ func test_delete_database(tls *crt.TLS, clientData uintptr, interp uintptr, objc var rc int32 var zFile uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22855 /* "FILE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14088 /* "FILE" */) return 1 } zFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -40697,7 +39179,7 @@ func test_atomic_batch_write(tls *crt.TLS, clientData uintptr, interp uintptr, o var rc int32 // sqlite3_open() return code if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22860 /* "PATH" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14093 /* "PATH" */) return 1 } zFile = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -40709,7 +39191,7 @@ func test_atomic_batch_write(tls *crt.TLS, clientData uintptr, interp uintptr, o return 1 } - rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+354 /* "main" */, 7, bp+24 /* &pFd */) + rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+84 /* "main" */, 7, bp+24 /* &pFd */) dc = (*(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pFd */)))).FpMethods + 96 /* &.xDeviceCharacteristics */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pFd */))) if (dc & 0x00004000) != 0 { bRes = 1 @@ -40733,8 +39215,8 @@ func test_next_stmt(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 // var zBuf [50]int8 at bp+64, 50 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22865 /* " DB STMT" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14098 /* " DB STMT" */, 0)) return 1 } @@ -40767,8 +39249,8 @@ func test_stmt_readonly(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22874 /* " STMT" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14107 /* " STMT" */, 0)) return 1 } @@ -40793,8 +39275,8 @@ func test_stmt_isexplain(tls *crt.TLS, clientData uintptr, interp uintptr, objc var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22874 /* " STMT" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14107 /* " STMT" */, 0)) return 1 } @@ -40819,8 +39301,8 @@ func test_stmt_busy(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22874 /* " STMT" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14107 /* " STMT" */, 0)) return 1 } @@ -40842,8 +39324,8 @@ func uses_stmt_journal(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // var pStmt uintptr at bp+32, 8 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22874 /* " STMT" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14107 /* " STMT" */, 0)) return 1 } @@ -40867,8 +39349,8 @@ func test_reset(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, ob var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22631 /* " <STMT>" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+13864 /* " <STMT>" */, 0)) return 1 } @@ -40898,8 +39380,8 @@ func test_expired(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, // var pStmt uintptr at bp+32, 8 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22631 /* " <STMT>" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+13864 /* " <STMT>" */, 0)) return 1 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &pStmt */) != 0 { @@ -40921,8 +39403,8 @@ func test_transfer_bind(tls *crt.TLS, clientData uintptr, interp uintptr, objc i // var pStmt2 uintptr at bp+40, 8 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+22880 /* " FROM-STMT TO-ST..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14113 /* " FROM-STMT TO-ST..." */, 0)) return 1 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &pStmt1 */) != 0 { @@ -40947,8 +39429,8 @@ func test_changes(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, // var db uintptr at bp+32, 8 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0 { @@ -40982,8 +39464,8 @@ func test_bind(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u // var idx int32 at bp+88, 4 if argc != 5 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+22899 /* " VM IDX VALUE (n..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+14132 /* " VM IDX VALUE (n..." */, 0)) return 1 } if getStmtPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+80 /* &pStmt */) != 0 { @@ -40992,20 +39474,20 @@ func test_bind(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), bp+88 /* &idx */) != 0 { return 1 } - if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+7418 /* "null" */) == 0 { + if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+5922 /* "null" */) == 0 { rc = sqlite3.Xsqlite3_bind_null(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 88 /* idx */))) - } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+22935 /* "static" */) == 0 { + } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+14168 /* "static" */) == 0 { rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 88 /* idx */)), sqlite_static_bind_value, -1, uintptr(0)) - } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+22942 /* "static-nbytes" */) == 0 { + } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+14175 /* "static-nbytes" */) == 0 { rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 88 /* idx */)), sqlite_static_bind_value, sqlite_static_bind_nbyte, uintptr(0)) - } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+22956 /* "normal" */) == 0 { + } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+14189 /* "normal" */) == 0 { rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 88 /* idx */)), *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8)), -1, crt.UintptrFromInt32(-1)) - } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+22963 /* "blob10" */) == 0 { - rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 88 /* idx */)), ts+22970 /* "abc\x00xyz\x00pq" */, 10, uintptr(0)) + } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), ts+14196 /* "blob10" */) == 0 { + rc = sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 88 /* idx */)), ts+14203 /* "abc\x00xyz\x00pq" */, 10, uintptr(0)) } else { tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp+32, ts+22981 /* "4th argument sho..." */, 0)) + crt.VaList(bp+32, ts+14214 /* "4th argument sho..." */, 0)) return 1 } if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))), rc) != 0 { @@ -41014,13 +39496,382 @@ func test_bind(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u if rc != 0 { // var zBuf [50]int8 at bp+92, 50 - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+92 /* &zBuf[0] */, ts+23035 /* "(%d) " */, crt.VaList(bp+48, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+92 /* &zBuf[0] */, ts+14268 /* "(%d) " */, crt.VaList(bp+48, rc)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+92 /* &zBuf[0] */, sqlite3.Xsqlite3ErrStr(tls, rc), 0)) return 1 } return 0 } +// Usage: add_test_collate <db ptr> <utf8> <utf16le> <utf16be> +// +// This function is used to test that SQLite selects the correct collation +// sequence callback when multiple versions (for different text encodings) +// are available. +// +// Calling this routine registers the collation sequence "test_collate" +// with database handle <db>. The second argument must be a list of three +// boolean values. If the first is true, then a version of test_collate is +// registered for UTF-8, if the second is true, a version is registered for +// UTF-16le, if the third is true, a UTF-16be version is available. +// Previous versions of test_collate are deleted. +// +// The collation sequence test_collate is implemented by calling the +// following TCL script: +// +// "test_collate <enc> <lhs> <rhs>" +// +// The <lhs> and <rhs> are the two values being compared, encoded in UTF-8. +// The <enc> parameter is the encoding of the collation function that +// SQLite selected to call. The TCL test script implements the +// "test_collate" proc. +// +// Note that this will only work with one interpreter at a time, as the +// interp pointer to use when evaluating the TCL script is stored in +// pTestCollateInterp. +var pTestCollateInterp uintptr /* test1.c:2975:18: */ +func test_collate_func(tls *crt.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:2976:12: */ + bp := tls.Alloc(4) + defer tls.Free(4) + + var i uintptr = pTestCollateInterp + var encin int32 = int32(pCtx) + // var res int32 at bp, 4 + + var n int32 + var pVal uintptr + var pX uintptr + + pX = tcl.XTcl_NewStringObj(tls, ts+14274 /* "test_collate" */, -1) + (*Tcl_Obj)(unsafe.Pointer(pX)).FrefCount++ + + switch encin { + case 1: + tcl.XTcl_ListObjAppendElement(tls, i, pX, tcl.XTcl_NewStringObj(tls, ts+14287 /* "UTF-8" */, -1)) + break + case 2: + tcl.XTcl_ListObjAppendElement(tls, i, pX, tcl.XTcl_NewStringObj(tls, ts+14293 /* "UTF-16LE" */, -1)) + break + case 3: + tcl.XTcl_ListObjAppendElement(tls, i, pX, tcl.XTcl_NewStringObj(tls, ts+14302 /* "UTF-16BE" */, -1)) + break + default: + } + + sqlite3.Xsqlite3BeginBenignMalloc(tls) + pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) + if pVal != 0 { + sqlite3.Xsqlite3ValueSetStr(tls, pVal, nA, zA, uint8(encin), uintptr(0)) + n = sqlite3.Xsqlite3_value_bytes(tls, pVal) + tcl.XTcl_ListObjAppendElement(tls, i, pX, + tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, pVal), n)) + sqlite3.Xsqlite3ValueSetStr(tls, pVal, nB, zB, uint8(encin), uintptr(0)) + n = sqlite3.Xsqlite3_value_bytes(tls, pVal) + tcl.XTcl_ListObjAppendElement(tls, i, pX, + tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, pVal), n)) + sqlite3.Xsqlite3ValueFree(tls, pVal) + } + sqlite3.Xsqlite3EndBenignMalloc(tls) + + tcl.XTcl_EvalObjEx(tls, i, pX, 0) + for ok := true; ok; ok = 0 != 0 { + var _objPtr uintptr = pX + if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { + tcl.XTclFreeObj(tls, _objPtr) + } + } + tcl.XTcl_GetIntFromObj(tls, i, tcl.XTcl_GetObjResult(tls, i), bp /* &res */) + return *(*int32)(unsafe.Pointer(bp /* res */)) +} +func test_collate(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3026:26: */ + bp := tls.Alloc(60) + defer tls.Free(60) + + // var db uintptr at bp+48, 8 + + // var val int32 at bp+56, 4 + + var pVal uintptr + var rc int32 + var zUtf16 uintptr + + if !(objc != 5) { + goto __1 + } + goto bad_args +__1: + ; + pTestCollateInterp = interp + if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &db */) != 0) { + goto __2 + } + return 1 +__2: + ; + + if !(0 != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+56 /* &val */)) { + goto __3 + } + return 1 +__3: + ; + rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), ts+14274 /* "test_collate" */, 1, + uintptr(1), func() uintptr { + if *(*int32)(unsafe.Pointer(bp + 56 /* val */)) != 0 { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{test_collate_func})) + } + return uintptr(0) + }()) + if !(rc == 0) { + goto __4 + } + if !(0 != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+56 /* &val */)) { + goto __5 + } + return 1 +__5: + ; + rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), ts+14274 /* "test_collate" */, 2, + uintptr(2), func() uintptr { + if *(*int32)(unsafe.Pointer(bp + 56 /* val */)) != 0 { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{test_collate_func})) + } + return uintptr(0) + }()) + if !(0 != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), bp+56 /* &val */)) { + goto __6 + } + return 1 +__6: + ; + + sqlite3.Xsqlite3_mutex_enter(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* db */)))).Fmutex) + pVal = sqlite3.Xsqlite3ValueNew(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */))) + sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, ts+14274 /* "test_collate" */, uint8(1), uintptr(0)) + zUtf16 = sqlite3.Xsqlite3ValueText(tls, pVal, uint8(2)) + if !((*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* db */)))).FmallocFailed != 0) { + goto __7 + } + rc = 7 + goto __8 +__7: + rc = sqlite3.Xsqlite3_create_collation16(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), zUtf16, 3, + uintptr(3), func() uintptr { + if *(*int32)(unsafe.Pointer(bp + 56 /* val */)) != 0 { + return *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{test_collate_func})) + } + return uintptr(0) + }()) +__8: + ; + sqlite3.Xsqlite3ValueFree(tls, pVal) + sqlite3.Xsqlite3_mutex_leave(tls, (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 48 /* db */)))).Fmutex) +__4: + ; + if !(sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), rc) != 0) { + goto __9 + } + return 1 +__9: + ; + + if !(rc != 0) { + goto __10 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, sqlite3.Xsqlite3ErrName(tls, rc), 0)) + return 1 +__10: + ; + return 0 + +bad_args: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14311 /* " <DB> <utf8> <ut..." */, 0)) + return 1 +} + +// Usage: add_test_utf16bin_collate <db ptr> +// +// Add a utf-16 collation sequence named "utf16bin" to the database +// handle. This collation sequence compares arguments in the same way as the +// built-in collation "binary". +func test_utf16bin_collate_func(tls *crt.TLS, pCtx uintptr, nA int32, zA uintptr, nB int32, zB uintptr) int32 { /* test1.c:3090:12: */ + var nCmp int32 = func() int32 { + if nA > nB { + return nB + } + return nA + }() + var res int32 = crt.Xmemcmp(tls, zA, zB, uint64(nCmp)) + if res == 0 { + res = (nA - nB) + } + return res +} +func test_utf16bin_collate(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3100:26: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var db uintptr at bp, 8 + + var rc int32 + + if !(objc != 2) { + goto __1 + } + goto bad_args +__1: + ; + if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0) { + goto __2 + } + return 1 +__2: + ; + + rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+14344 /* "utf16bin" */, 4, uintptr(0), + *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{test_utf16bin_collate_func}))) + if !(sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* db */)), rc) != 0) { + goto __3 + } + return 1 +__3: + ; + return 0 + +bad_args: + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) + return 1 +} + +// When the collation needed callback is invoked, record the name of +// the requested collating function here. The recorded name is linked +// to a TCL variable and used to make sure that the requested collation +// name is correct. +var zNeededCollation [200]int8 /* test1.c:3129:13: */ +var pzNeededCollation uintptr = 0 /* test1.c:3130:13 */ + +// Called when a collating sequence is needed. Registered using +// sqlite3_collation_needed16(). +func test_collate_needed_cb(tls *crt.TLS, pCtx uintptr, db uintptr, eTextRep int32, pName uintptr) { /* test1.c:3137:13: */ + var enc int32 = int32((*sqlite31)(unsafe.Pointer(db)).Fenc) + var i int32 + var z uintptr + z = pName + i = 0 + for ; (*(*int8)(unsafe.Pointer(z)) != 0) || (*(*int8)(unsafe.Pointer(z + uintptr(1))) != 0); z++ { + if *(*int8)(unsafe.Pointer(z)) != 0 { + zNeededCollation[crt.PostIncInt32(&i, 1)] = *(*int8)(unsafe.Pointer(z)) + } + } + zNeededCollation[i] = int8(0) + sqlite3.Xsqlite3_create_collation(tls, + db, ts+14274 /* "test_collate" */, int32((*sqlite31)(unsafe.Pointer(db)).Fenc), uintptr(int64(enc)), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{test_collate_func}))) +} + +// Usage: add_test_collate_needed DB +func test_collate_needed(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3157:26: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var db uintptr at bp, 8 + + var rc int32 + + if !(objc != 2) { + goto __1 + } + goto bad_args +__1: + ; + if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0) { + goto __2 + } + return 1 +__2: + ; + rc = sqlite3.Xsqlite3_collation_needed16(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) + }{test_collate_needed_cb}))) + zNeededCollation[0] = int8(0) + if !(sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp /* db */)), rc) != 0) { + goto __3 + } + return 1 +__3: + ; + return 0 + +bad_args: + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) + return 1 +} + +// tclcmd: add_alignment_test_collations DB +// +// Add two new collating sequences to the database DB +// +// utf16_aligned +// utf16_unaligned +// +// Both collating sequences use the same sort order as BINARY. +// The only difference is that the utf16_aligned collating +// sequence is declared with the SQLITE_UTF16_ALIGNED flag. +// Both collating functions increment the unaligned utf16 counter +// whenever they see a string that begins on an odd byte boundary. +var unaligned_string_counter int32 = 0 /* test1.c:3192:12 */ +func alignmentCollFunc(tls *crt.TLS, NotUsed uintptr, nKey1 int32, pKey1 uintptr, nKey2 int32, pKey2 uintptr) int32 { /* test1.c:3193:12: */ + var rc int32 + var n int32 + if nKey1 < nKey2 { + n = nKey1 + } else { + n = nKey2 + } + if (nKey1 > 0) && (1 == (1 & (int32(pKey1)))) { + unaligned_string_counter++ + } + if (nKey2 > 0) && (1 == (1 & (int32(pKey2)))) { + unaligned_string_counter++ + } + rc = crt.Xmemcmp(tls, pKey1, pKey2, uint64(n)) + if rc == 0 { + rc = (nKey1 - nKey2) + } + return rc +} +func add_alignment_test_collations(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3208:26: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var db uintptr at bp, 8 + + if objc >= 2 { + if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { + return 1 + } + sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+14353 /* "utf16_unaligned" */, 4, + uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{alignmentCollFunc}))) + sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+14369 /* "utf16_aligned" */, 8, + uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32 + }{alignmentCollFunc}))) + } + return 0 +} + // Usage: add_test_function <db ptr> <utf8> <utf16le> <utf16be> // // This function is used to test that SQLite selects the correct user @@ -41044,7 +39895,153 @@ func test_bind(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u // is passed to SQLite using UTF-16BE for a UTF-8 test_function(), UTF-8 // for a UTF-16LE test_function(), and UTF-16LE for an implementation that // prefers UTF-16BE. +func test_function_utf8(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3252:13: */ + var interp uintptr + var pX uintptr + var pVal uintptr + interp = sqlite3.Xsqlite3_user_data(tls, pCtx) + pX = tcl.XTcl_NewStringObj(tls, ts+14383 /* "test_function" */, -1) + (*Tcl_Obj)(unsafe.Pointer(pX)).FrefCount++ + tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, ts+14287 /* "UTF-8" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pX, + tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), -1)) + tcl.XTcl_EvalObjEx(tls, interp, pX, 0) + for ok := true; ok; ok = 0 != 0 { + var _objPtr uintptr = pX + if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { + tcl.XTclFreeObj(tls, _objPtr) + } + } + sqlite3.Xsqlite3_result_text(tls, pCtx, tcl.XTcl_GetStringResult(tls, interp), -1, crt.UintptrFromInt32(-1)) + pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) + sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, tcl.XTcl_GetStringResult(tls, interp), + uint8(1), uintptr(0)) + sqlite3.Xsqlite3_result_text16be(tls, pCtx, sqlite3.Xsqlite3_value_text16be(tls, pVal), + -1, crt.UintptrFromInt32(-1)) + sqlite3.Xsqlite3ValueFree(tls, pVal) +} +func test_function_utf16le(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3276:13: */ + var interp uintptr + var pX uintptr + var pVal uintptr + interp = sqlite3.Xsqlite3_user_data(tls, pCtx) + pX = tcl.XTcl_NewStringObj(tls, ts+14383 /* "test_function" */, -1) + (*Tcl_Obj)(unsafe.Pointer(pX)).FrefCount++ + tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, ts+14293 /* "UTF-16LE" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pX, + tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), -1)) + tcl.XTcl_EvalObjEx(tls, interp, pX, 0) + for ok := true; ok; ok = 0 != 0 { + var _objPtr uintptr = pX + if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { + tcl.XTclFreeObj(tls, _objPtr) + } + } + pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) + sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, tcl.XTcl_GetStringResult(tls, interp), + uint8(1), uintptr(0)) + sqlite3.Xsqlite3_result_text(tls, pCtx, sqlite3.Xsqlite3_value_text(tls, pVal), -1, crt.UintptrFromInt32(-1)) + sqlite3.Xsqlite3ValueFree(tls, pVal) +} +func test_function_utf16be(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test1.c:3298:13: */ + var interp uintptr + var pX uintptr + var pVal uintptr + interp = sqlite3.Xsqlite3_user_data(tls, pCtx) + pX = tcl.XTcl_NewStringObj(tls, ts+14383 /* "test_function" */, -1) + (*Tcl_Obj)(unsafe.Pointer(pX)).FrefCount++ + tcl.XTcl_ListObjAppendElement(tls, interp, pX, tcl.XTcl_NewStringObj(tls, ts+14302 /* "UTF-16BE" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pX, + tcl.XTcl_NewStringObj(tls, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), -1)) + tcl.XTcl_EvalObjEx(tls, interp, pX, 0) + for ok := true; ok; ok = 0 != 0 { + var _objPtr uintptr = pX + if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { + tcl.XTclFreeObj(tls, _objPtr) + } + } + pVal = sqlite3.Xsqlite3ValueNew(tls, uintptr(0)) + sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, tcl.XTcl_GetStringResult(tls, interp), + uint8(1), uintptr(0)) + sqlite3.Xsqlite3_result_text16(tls, pCtx, sqlite3.Xsqlite3_value_text16le(tls, pVal), + -1, crt.UintptrFromInt32(-1)) + sqlite3.Xsqlite3_result_text16be(tls, pCtx, sqlite3.Xsqlite3_value_text16le(tls, pVal), + -1, crt.UintptrFromInt32(-1)) + sqlite3.Xsqlite3_result_text16le(tls, pCtx, sqlite3.Xsqlite3_value_text16le(tls, pVal), + -1, crt.UintptrFromInt32(-1)) + sqlite3.Xsqlite3ValueFree(tls, pVal) +} func test_function(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3326:26: */ + bp := tls.Alloc(44) + defer tls.Free(44) + + // var db uintptr at bp+32, 8 + + // var val int32 at bp+40, 4 + + if !(objc != 5) { + goto __1 + } + goto bad_args +__1: + ; + if !(getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0) { + goto __2 + } + return 1 +__2: + ; + + if !(0 != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+40 /* &val */)) { + goto __3 + } + return 1 +__3: + ; + if !(*(*int32)(unsafe.Pointer(bp + 40 /* val */)) != 0) { + goto __4 + } + sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+14383 /* "test_function" */, 1, 1, + interp, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr) + }{test_function_utf8})), uintptr(0), uintptr(0)) +__4: + ; + if !(0 != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+40 /* &val */)) { + goto __5 + } + return 1 +__5: + ; + if !(*(*int32)(unsafe.Pointer(bp + 40 /* val */)) != 0) { + goto __6 + } + sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+14383 /* "test_function" */, 1, 2, + interp, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr) + }{test_function_utf16le})), uintptr(0), uintptr(0)) +__6: + ; + if !(0 != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), bp+40 /* &val */)) { + goto __7 + } + return 1 +__7: + ; + if !(*(*int32)(unsafe.Pointer(bp + 40 /* val */)) != 0) { + goto __8 + } + sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+14383 /* "test_function" */, 1, 3, + interp, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32, uintptr) + }{test_function_utf16be})), uintptr(0), uintptr(0)) +__8: + ; + + return 0 +bad_args: + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14311 /* " <DB> <utf8> <ut..." */, 0)) return 1 } @@ -41058,7 +40055,7 @@ func test_errstr(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o var zCode uintptr var i int32 if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23041 /* "<error code>" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14397 /* "<error code>" */) } zCode = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -41104,7 +40101,7 @@ func test_bind_zeroblob(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rc int32 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23054 /* "STMT IDX N" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14410 /* "STMT IDX N" */) return 1 } @@ -41147,7 +40144,7 @@ func test_bind_zeroblob64(tls *crt.TLS, clientData uintptr, interp uintptr, objc var rc int32 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23054 /* "STMT IDX N" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14410 /* "STMT IDX N" */) return 1 } @@ -41191,8 +40188,8 @@ func test_bind_int(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var rc int32 if objc != 4 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+23065 /* " STMT N VALUE" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14421 /* " STMT N VALUE" */, 0)) return 1 } @@ -41337,7 +40334,7 @@ func test_textarray_addr(tls *crt.TLS, clientData uintptr, interp uintptr, objc return 1 } for i = 0; i < (objc - 1); i++ { - *(*uintptr)(unsafe.Pointer(p3 + uintptr(i)*8)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((1+i))*8))))) + *(*uintptr)(unsafe.Pointer(p3 + uintptr(i)*8)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr((1+i))*8))))) } } n = (objc - 1) @@ -41366,8 +40363,8 @@ func test_bind_int64(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 var rc int32 if objc != 4 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+23065 /* " STMT N VALUE" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14421 /* " STMT N VALUE" */, 0)) return 1 } @@ -41411,8 +40408,8 @@ func test_bind_double(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var i int32 if objc != 4 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+23065 /* " STMT N VALUE" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14421 /* " STMT N VALUE" */, 0)) return 1 } @@ -41467,16 +40464,16 @@ var aSpecialFp = [10]struct { FiUpper uint32 FiLower uint32 }{ - {FzName: ts + 23079 /* "NaN" */, FiUpper: uint32(0x7fffffff), FiLower: 0xffffffff}, - {FzName: ts + 23083 /* "SNaN" */, FiUpper: uint32(0x7ff7ffff), FiLower: 0xffffffff}, - {FzName: ts + 23088 /* "-NaN" */, FiUpper: 0xffffffff, FiLower: 0xffffffff}, - {FzName: ts + 23093 /* "-SNaN" */, FiUpper: 0xfff7ffff, FiLower: 0xffffffff}, - {FzName: ts + 23099 /* "+Inf" */, FiUpper: uint32(0x7ff00000), FiLower: uint32(0x00000000)}, - {FzName: ts + 23104 /* "-Inf" */, FiUpper: 0xfff00000, FiLower: uint32(0x00000000)}, - {FzName: ts + 23109 /* "Epsilon" */, FiUpper: uint32(0x00000000), FiLower: uint32(0x00000001)}, - {FzName: ts + 23117 /* "-Epsilon" */, FiUpper: 0x80000000, FiLower: uint32(0x00000001)}, - {FzName: ts + 23126 /* "NaN0" */, FiUpper: uint32(0x7ff80000), FiLower: uint32(0x00000000)}, - {FzName: ts + 23131 /* "-NaN0" */, FiUpper: 0xfff80000, FiLower: uint32(0x00000000)}, + {FzName: ts + 14435 /* "NaN" */, FiUpper: uint32(0x7fffffff), FiLower: 0xffffffff}, + {FzName: ts + 14439 /* "SNaN" */, FiUpper: uint32(0x7ff7ffff), FiLower: 0xffffffff}, + {FzName: ts + 14444 /* "-NaN" */, FiUpper: 0xffffffff, FiLower: 0xffffffff}, + {FzName: ts + 14449 /* "-SNaN" */, FiUpper: 0xfff7ffff, FiLower: 0xffffffff}, + {FzName: ts + 14455 /* "+Inf" */, FiUpper: uint32(0x7ff00000), FiLower: uint32(0x00000000)}, + {FzName: ts + 14460 /* "-Inf" */, FiUpper: 0xfff00000, FiLower: uint32(0x00000000)}, + {FzName: ts + 14465 /* "Epsilon" */, FiUpper: uint32(0x00000000), FiLower: uint32(0x00000001)}, + {FzName: ts + 14473 /* "-Epsilon" */, FiUpper: 0x80000000, FiLower: uint32(0x00000001)}, + {FzName: ts + 14482 /* "NaN0" */, FiUpper: uint32(0x7ff80000), FiLower: uint32(0x00000000)}, + {FzName: ts + 14487 /* "-NaN0" */, FiUpper: 0xfff80000, FiLower: uint32(0x00000000)}, } /* test1.c:3724:5 */ // Usage: sqlite3_bind_null STMT N @@ -41495,8 +40492,8 @@ func test_bind_null(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 var rc int32 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+23137 /* " STMT N" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14493 /* " STMT N" */, 0)) return 1 } @@ -41538,8 +40535,8 @@ func test_bind_text(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 var rc int32 if objc != 5 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+23145 /* " STMT N VALUE BY..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14501 /* " STMT N VALUE BY..." */, 0)) return 1 } @@ -41573,6 +40570,55 @@ func test_bind_text(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 // binds a UTF-16 string STRING to the wildcard. The string is BYTES bytes // long. func test_bind_text16(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:3861:26: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + // var pStmt uintptr at bp+48, 8 + + // var idx int32 at bp+56, 4 + + // var bytes int32 at bp+60, 4 + + var value uintptr + var rc int32 + + var xDel uintptr = func() uintptr { + if objc == 6 { + return uintptr(0) + } + return crt.UintptrFromInt32(-1) + }() + var oStmt uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-4))*8)) + var oN uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-3))*8)) + var oString uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-2))*8)) + var oBytes uintptr = *(*uintptr)(unsafe.Pointer(objv + uintptr((objc-1))*8)) + + if (objc != 5) && (objc != 6) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14501 /* " STMT N VALUE BY..." */, 0)) + return 1 + } + + if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, oStmt), bp+48 /* &pStmt */) != 0 { + return 1 + } + if tcl.XTcl_GetIntFromObj(tls, interp, oN, bp+56 /* &idx */) != 0 { + return 1 + } + value = tcl.XTcl_GetByteArrayFromObj(tls, oString, uintptr(0)) + if tcl.XTcl_GetIntFromObj(tls, interp, oBytes, bp+60 /* &bytes */) != 0 { + return 1 + } + + rc = sqlite3.Xsqlite3_bind_text16(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 56 /* idx */)), value, *(*int32)(unsafe.Pointer(bp + 60 /* bytes */)), xDel) + if sqlite3TestErrCode(tls, interp, sqlite3.Xsqlite3_db_handle(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */))), rc) != 0 { + return 1 + } + if rc != 0 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, sqlite3.Xsqlite3ErrName(tls, rc), 0)) + return 1 + } + return 0 } @@ -41598,8 +40644,8 @@ func test_bind_blob(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 var xDestructor sqlite3_destructor_type = crt.UintptrFromInt32(-1) if (objc != 5) && (objc != 6) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+23165 /* " STMT N DATA BYT..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+14521 /* " STMT N DATA BYT..." */, 0)) return 1 } @@ -41624,7 +40670,7 @@ func test_bind_blob(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 // var zBuf [200]int8 at bp+84, 200 sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+84, /* &zBuf[0] */ - ts+23184 /* "cannot use %d bl..." */, crt.VaList(bp+32, *(*int32)(unsafe.Pointer(bp + 80 /* bytes */)), *(*int32)(unsafe.Pointer(bp + 76 /* len */)))) + ts+14540 /* "cannot use %d bl..." */, crt.VaList(bp+32, *(*int32)(unsafe.Pointer(bp + 80 /* bytes */)), *(*int32)(unsafe.Pointer(bp + 76 /* len */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, bp+84 /* &zBuf[0] */, -1)) return 1 } @@ -41650,7 +40696,7 @@ func test_bind_parameter_count(tls *crt.TLS, clientData uintptr, interp uintptr, // var pStmt uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23218 /* "STMT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14574 /* "STMT" */) return 1 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &pStmt */) != 0 { @@ -41674,7 +40720,7 @@ func test_bind_parameter_name(tls *crt.TLS, clientData uintptr, interp uintptr, // var i int32 at bp+8, 4 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23223 /* "STMT N" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14579 /* "STMT N" */) return 1 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &pStmt */) != 0 { @@ -41699,7 +40745,7 @@ func test_bind_parameter_index(tls *crt.TLS, clientData uintptr, interp uintptr, // var pStmt uintptr at bp, 8 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23230 /* "STMT NAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14586 /* "STMT NAME" */) return 1 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &pStmt */) != 0 { @@ -41720,7 +40766,7 @@ func test_clear_bindings(tls *crt.TLS, clientData uintptr, interp uintptr, objc // var pStmt uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23218 /* "STMT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14574 /* "STMT" */) return 1 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &pStmt */) != 0 { @@ -41738,7 +40784,7 @@ func test_sleep(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, ob // var ms int32 at bp, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+19799 /* "MILLISECONDS" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+10978 /* "MILLISECONDS" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &ms */) != 0 { @@ -41761,8 +40807,8 @@ func test_ex_errcode(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &db */) != 0 { @@ -41786,8 +40832,8 @@ func test_errcode(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &db */) != 0 { @@ -41811,8 +40857,8 @@ func test_errmsg(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o var zErr uintptr if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0 { @@ -41831,6 +40877,31 @@ func test_errmsg(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o // level, and it includes the 0x00 0x00 terminator bytes at the end of the // UTF-16 string. func test_errmsg16(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4164:26: */ + bp := tls.Alloc(40) + defer tls.Free(40) + + // var db uintptr at bp+32, 8 + + var zErr uintptr + var z uintptr + var bytes int32 = 0 + + if objc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+12853 /* " DB" */, 0)) + return 1 + } + if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0 { + return 1 + } + + zErr = sqlite3.Xsqlite3_errmsg16(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))) + if zErr != 0 { + z = zErr + for bytes = 0; (*(*int8)(unsafe.Pointer(z + uintptr(bytes))) != 0) || (*(*int8)(unsafe.Pointer(z + uintptr((bytes + 1)))) != 0); bytes = bytes + (2) { + } + } + tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewByteArrayObj(tls, zErr, bytes)) return 0 } @@ -41856,8 +40927,8 @@ func test_prepare(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var rc int32 if (objc != 5) && (objc != 4) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23240 /* " DB sql bytes ?t..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14596 /* " DB sql bytes ?t..." */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+80 /* &db */) != 0 { @@ -41889,7 +40960,7 @@ func test_prepare(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, } if rc != 0 { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+112 /* &zBuf[0] */, ts+23035 /* "(%d) " */, crt.VaList(bp+32, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+112 /* &zBuf[0] */, ts+14268 /* "(%d) " */, crt.VaList(bp+32, rc)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+112 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */))), 0)) return 1 } @@ -41927,8 +40998,8 @@ func test_prepare_v2(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 var rc int32 if (objc != 5) && (objc != 4) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23264 /* " DB sql bytes ta..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14620 /* " DB sql bytes ta..." */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+80 /* &db */) != 0 { @@ -41973,7 +41044,7 @@ func test_prepare_v2(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 } if rc != 0 { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+112 /* &zBuf[0] */, ts+23035 /* "(%d) " */, crt.VaList(bp+32, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+112 /* &zBuf[0] */, ts+14268 /* "(%d) " */, crt.VaList(bp+32, rc)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+112 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */))), 0)) return 1 } @@ -42013,8 +41084,8 @@ func test_prepare_v3(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 var rc int32 if (objc != 6) && (objc != 5) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23286 /* " DB sql bytes fl..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14642 /* " DB sql bytes fl..." */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+80 /* &db */) != 0 { @@ -42060,7 +41131,7 @@ func test_prepare_v3(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 } if rc != 0 { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+112 /* &zBuf[0] */, ts+23035 /* "(%d) " */, crt.VaList(bp+32, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+112 /* &zBuf[0] */, ts+14268 /* "(%d) " */, crt.VaList(bp+32, rc)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+112 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */))), 0)) return 1 } @@ -42090,8 +41161,8 @@ func test_prepare_tkt3134(tls *crt.TLS, clientData uintptr, interp uintptr, objc var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23264 /* " DB sql bytes ta..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14620 /* " DB sql bytes ta..." */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+80 /* &db */) != 0 { @@ -42104,7 +41175,7 @@ func test_prepare_tkt3134(tls *crt.TLS, clientData uintptr, interp uintptr, objc } if rc != 0 { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+96 /* &zBuf[0] */, ts+23035 /* "(%d) " */, crt.VaList(bp+32, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+96 /* &zBuf[0] */, ts+14268 /* "(%d) " */, crt.VaList(bp+32, rc)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+96 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */))), 0)) return 1 } @@ -42118,7 +41189,7 @@ func test_prepare_tkt3134(tls *crt.TLS, clientData uintptr, interp uintptr, objc return 0 } -var zSql = *(*[10]int8)(unsafe.Pointer(ts + 23314 /* "\x00SELECT 1" */)) /* test1.c:4410:21 */ +var zSql = *(*[10]int8)(unsafe.Pointer(ts + 14670 /* "\x00SELECT 1" */)) /* test1.c:4410:21 */ // Usage: sqlite3_prepare16 DB sql bytes tailvar // @@ -42127,6 +41198,72 @@ var zSql = *(*[10]int8)(unsafe.Pointer(ts + 23314 /* "\x00SELECT 1" */)) /* test // variable that is set to the unused portion of <sql> (if any). A // STMT handle is returned. func test_prepare16(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4446:26: */ + bp := tls.Alloc(130) + defer tls.Free(130) + + // var db uintptr at bp+48, 8 + + var zSql uintptr + *(*uintptr)(unsafe.Pointer(bp + 72 /* zTail */)) = uintptr(0) + var pTail uintptr = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) = uintptr(0) + // var zBuf [50]int8 at bp+80, 50 + + var rc int32 + // var bytes int32 at bp+60, 4 + // The integer specified as arg 3 + // var objlen int32 at bp+56, 4 + // The byte-array length of arg 2 + + if (objc != 5) && (objc != 4) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14596 /* " DB sql bytes ?t..." */, 0)) + return 1 + } + if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &db */) != 0 { + return 1 + } + zSql = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+56 /* &objlen */) + if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+60 /* &bytes */) != 0 { + return 1 + } + + rc = sqlite3.Xsqlite3_prepare16(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), zSql, *(*int32)(unsafe.Pointer(bp + 60 /* bytes */)), bp+64 /* &pStmt */, func() uintptr { + if objc >= 5 { + return bp + 72 /* &zTail */ + } + return uintptr(0) + }()) + if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), rc) != 0 { + return 1 + } + if rc != 0 { + return 1 + } + + if objc >= 5 { + if *(*uintptr)(unsafe.Pointer(bp + 72 /* zTail */)) != 0 { + *(*int32)(unsafe.Pointer(bp + 56 /* objlen */)) = (*(*int32)(unsafe.Pointer(bp + 56 /* objlen */)) - (int32((int64(*(*uintptr)(unsafe.Pointer(bp + 72 /* zTail */))) - int64(zSql)) / 1))) + } else { + *(*int32)(unsafe.Pointer(bp + 56 /* objlen */)) = 0 + } + pTail = tcl.XTcl_NewByteArrayObj(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* zTail */)), *(*int32)(unsafe.Pointer(bp + 56 /* objlen */))) + (*Tcl_Obj)(unsafe.Pointer(pTail)).FrefCount++ + tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), uintptr(0), pTail, 0) + for ok := true; ok; ok = 0 != 0 { + var _objPtr uintptr = pTail + if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { + tcl.XTclFreeObj(tls, _objPtr) + } + } + } + + if *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) != 0 { + if sqlite3TestMakePointerStr(tls, interp, bp+80 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) != 0 { + return 1 + } + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, bp+80 /* &zBuf[0] */, 0)) return 0 } @@ -42137,6 +41274,72 @@ func test_prepare16(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 // variable that is set to the unused portion of <sql> (if any). A // STMT handle is returned. func test_prepare16_v2(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4506:26: */ + bp := tls.Alloc(130) + defer tls.Free(130) + + // var db uintptr at bp+48, 8 + + var zSql uintptr + *(*uintptr)(unsafe.Pointer(bp + 72 /* zTail */)) = uintptr(0) + var pTail uintptr = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) = uintptr(0) + // var zBuf [50]int8 at bp+80, 50 + + var rc int32 + // var bytes int32 at bp+60, 4 + // The integer specified as arg 3 + // var objlen int32 at bp+56, 4 + // The byte-array length of arg 2 + + if (objc != 5) && (objc != 4) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14596 /* " DB sql bytes ?t..." */, 0)) + return 1 + } + if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &db */) != 0 { + return 1 + } + zSql = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+56 /* &objlen */) + if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+60 /* &bytes */) != 0 { + return 1 + } + + rc = sqlite3.Xsqlite3_prepare16_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), zSql, *(*int32)(unsafe.Pointer(bp + 60 /* bytes */)), bp+64 /* &pStmt */, func() uintptr { + if objc >= 5 { + return bp + 72 /* &zTail */ + } + return uintptr(0) + }()) + if sqlite3TestErrCode(tls, interp, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */)), rc) != 0 { + return 1 + } + if rc != 0 { + return 1 + } + + if objc >= 5 { + if *(*uintptr)(unsafe.Pointer(bp + 72 /* zTail */)) != 0 { + *(*int32)(unsafe.Pointer(bp + 56 /* objlen */)) = (*(*int32)(unsafe.Pointer(bp + 56 /* objlen */)) - (int32((int64(*(*uintptr)(unsafe.Pointer(bp + 72 /* zTail */))) - int64(zSql)) / 1))) + } else { + *(*int32)(unsafe.Pointer(bp + 56 /* objlen */)) = 0 + } + pTail = tcl.XTcl_NewByteArrayObj(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* zTail */)), *(*int32)(unsafe.Pointer(bp + 56 /* objlen */))) + (*Tcl_Obj)(unsafe.Pointer(pTail)).FrefCount++ + tcl.XTcl_ObjSetVar2(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), uintptr(0), pTail, 0) + for ok := true; ok; ok = 0 != 0 { + var _objPtr uintptr = pTail + if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { + tcl.XTclFreeObj(tls, _objPtr) + } + } + } + + if *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) != 0 { + if sqlite3TestMakePointerStr(tls, interp, bp+80 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) != 0 { + return 1 + } + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, bp+80 /* &zBuf[0] */, 0)) return 0 } @@ -42151,8 +41354,8 @@ func test_open(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, obj // var zBuf [100]int8 at bp+56, 100 if ((objc != 3) && (objc != 2)) && (objc != 1) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23324 /* " filename option..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14680 /* " filename option..." */, 0)) return 1 } @@ -42190,7 +41393,7 @@ func test_open_v2(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var i int32 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23347 /* "FILENAME FLAGS V..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14703 /* "FILENAME FLAGS V..." */) return 1 } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -42207,29 +41410,29 @@ func test_open_v2(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, // var iFlag int32 at bp+352, 4 *(*[20]OpenFlag)(unsafe.Pointer(bp + 32 /* aFlag */)) = [20]OpenFlag{ - {FzFlag: ts + 23366 /* "SQLITE_OPEN_READ..." */, Fflag: 0x00000001}, - {FzFlag: ts + 23387 /* "SQLITE_OPEN_READ..." */, Fflag: 0x00000002}, - {FzFlag: ts + 23409 /* "SQLITE_OPEN_CREA..." */, Fflag: 0x00000004}, - {FzFlag: ts + 23428 /* "SQLITE_OPEN_DELE..." */, Fflag: 0x00000008}, - {FzFlag: ts + 23454 /* "SQLITE_OPEN_EXCL..." */, Fflag: 0x00000010}, - {FzFlag: ts + 23476 /* "SQLITE_OPEN_AUTO..." */, Fflag: 0x00000020}, - {FzFlag: ts + 23498 /* "SQLITE_OPEN_MAIN..." */, Fflag: 0x00000100}, - {FzFlag: ts + 23518 /* "SQLITE_OPEN_TEMP..." */, Fflag: 0x00000200}, - {FzFlag: ts + 23538 /* "SQLITE_OPEN_TRAN..." */, Fflag: 0x00000400}, - {FzFlag: ts + 23563 /* "SQLITE_OPEN_MAIN..." */, Fflag: 0x00000800}, - {FzFlag: ts + 23588 /* "SQLITE_OPEN_TEMP..." */, Fflag: 0x00001000}, - {FzFlag: ts + 23613 /* "SQLITE_OPEN_SUBJ..." */, Fflag: 0x00002000}, - {FzFlag: ts + 23636 /* "SQLITE_OPEN_MAST..." */, Fflag: 0x00004000}, - {FzFlag: ts + 23663 /* "SQLITE_OPEN_NOMU..." */, Fflag: 0x00008000}, - {FzFlag: ts + 23683 /* "SQLITE_OPEN_FULL..." */, Fflag: 0x00010000}, - {FzFlag: ts + 23705 /* "SQLITE_OPEN_SHAR..." */, Fflag: 0x00020000}, - {FzFlag: ts + 23729 /* "SQLITE_OPEN_PRIV..." */, Fflag: 0x00040000}, - {FzFlag: ts + 23754 /* "SQLITE_OPEN_WAL" */, Fflag: 0x00080000}, - {FzFlag: ts + 23770 /* "SQLITE_OPEN_URI" */, Fflag: 0x00000040}, + {FzFlag: ts + 14722 /* "SQLITE_OPEN_READ..." */, Fflag: 0x00000001}, + {FzFlag: ts + 14743 /* "SQLITE_OPEN_READ..." */, Fflag: 0x00000002}, + {FzFlag: ts + 14765 /* "SQLITE_OPEN_CREA..." */, Fflag: 0x00000004}, + {FzFlag: ts + 14784 /* "SQLITE_OPEN_DELE..." */, Fflag: 0x00000008}, + {FzFlag: ts + 14810 /* "SQLITE_OPEN_EXCL..." */, Fflag: 0x00000010}, + {FzFlag: ts + 14832 /* "SQLITE_OPEN_AUTO..." */, Fflag: 0x00000020}, + {FzFlag: ts + 14854 /* "SQLITE_OPEN_MAIN..." */, Fflag: 0x00000100}, + {FzFlag: ts + 14874 /* "SQLITE_OPEN_TEMP..." */, Fflag: 0x00000200}, + {FzFlag: ts + 14894 /* "SQLITE_OPEN_TRAN..." */, Fflag: 0x00000400}, + {FzFlag: ts + 14919 /* "SQLITE_OPEN_MAIN..." */, Fflag: 0x00000800}, + {FzFlag: ts + 14944 /* "SQLITE_OPEN_TEMP..." */, Fflag: 0x00001000}, + {FzFlag: ts + 14969 /* "SQLITE_OPEN_SUBJ..." */, Fflag: 0x00002000}, + {FzFlag: ts + 14992 /* "SQLITE_OPEN_MAST..." */, Fflag: 0x00004000}, + {FzFlag: ts + 15019 /* "SQLITE_OPEN_NOMU..." */, Fflag: 0x00008000}, + {FzFlag: ts + 15039 /* "SQLITE_OPEN_FULL..." */, Fflag: 0x00010000}, + {FzFlag: ts + 15061 /* "SQLITE_OPEN_SHAR..." */, Fflag: 0x00020000}, + {FzFlag: ts + 15085 /* "SQLITE_OPEN_PRIV..." */, Fflag: 0x00040000}, + {FzFlag: ts + 15110 /* "SQLITE_OPEN_WAL" */, Fflag: 0x00080000}, + {FzFlag: ts + 15126 /* "SQLITE_OPEN_URI" */, Fflag: 0x00000040}, {FzFlag: uintptr(0), Fflag: 0}, } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* apFlag */)) + uintptr(i)*8)), bp+32 /* &aFlag[0] */, int32(unsafe.Sizeof(OpenFlag{})), - ts+23786 /* "flag" */, 0, bp+352 /* &iFlag */) + ts+15142 /* "flag" */, 0, bp+352 /* &iFlag */) if rc != 0 { return rc } @@ -42252,6 +41455,27 @@ type OpenFlag = struct { // Usage: sqlite3_open16 filename options func test_open16(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4658:26: */ + bp := tls.Alloc(156) + defer tls.Free(156) + + var zFilename uintptr + // var db uintptr at bp+48, 8 + + // var zBuf [100]int8 at bp+56, 100 + + if objc != 3 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14680 /* " filename option..." */, 0)) + return 1 + } + + zFilename = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(0)) + sqlite3.Xsqlite3_open16(tls, zFilename, bp+48 /* &db */) + + if sqlite3TestMakePointerStr(tls, interp, bp+56 /* &zBuf[0] */, *(*uintptr)(unsafe.Pointer(bp + 48 /* db */))) != 0 { + return 1 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, bp+56 /* &zBuf[0] */, 0)) return 0 } @@ -42260,6 +41484,15 @@ func test_open16(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o // Return 1 if the supplied argument is a complete SQL statement, or zero // otherwise. func test_complete16(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:4690:26: */ + var zBuf uintptr + + if objc != 2 { + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15147 /* "<utf-16 sql>" */) + return 1 + } + + zBuf = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(0)) + tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, sqlite3.Xsqlite3_complete16(tls, zBuf))) return 0 } @@ -42271,7 +41504,7 @@ func test_normalize(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 var zNorm uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16552 /* "SQL" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+9753 /* "SQL" */) return 1 } @@ -42296,8 +41529,8 @@ func test_step(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, obj var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+22874 /* " STMT" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14107 /* " STMT" */, 0)) return 1 } @@ -42318,7 +41551,7 @@ func test_sql(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv // var pStmt uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23218 /* "STMT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14574 /* "STMT" */) return 1 } @@ -42337,7 +41570,7 @@ func test_ex_sql(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o var z uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23218 /* "STMT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14574 /* "STMT" */) return 1 } @@ -42360,8 +41593,8 @@ func test_column_count(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // var pStmt uintptr at bp+32, 8 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23791 /* " STMT column" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) return 1 } @@ -42387,8 +41620,8 @@ func test_column_type(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var tp int32 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23791 /* " STMT column" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) return 1 } @@ -42402,19 +41635,19 @@ func test_column_type(tls *crt.TLS, clientData uintptr, interp uintptr, objc int tp = sqlite3.Xsqlite3_column_type(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 40 /* col */))) switch tp { case 1: - tcl.XTcl_SetResult(tls, interp, ts+11332 /* "INTEGER" */, uintptr(0)) + tcl.XTcl_SetResult(tls, interp, ts+15173 /* "INTEGER" */, uintptr(0)) break case 5: - tcl.XTcl_SetResult(tls, interp, ts+5494 /* "NULL" */, uintptr(0)) + tcl.XTcl_SetResult(tls, interp, ts+4252 /* "NULL" */, uintptr(0)) break case 2: - tcl.XTcl_SetResult(tls, interp, ts+23804 /* "FLOAT" */, uintptr(0)) + tcl.XTcl_SetResult(tls, interp, ts+15181 /* "FLOAT" */, uintptr(0)) break case 3: - tcl.XTcl_SetResult(tls, interp, ts+23810 /* "TEXT" */, uintptr(0)) + tcl.XTcl_SetResult(tls, interp, ts+15187 /* "TEXT" */, uintptr(0)) break case 4: - tcl.XTcl_SetResult(tls, interp, ts+23815 /* "BLOB" */, uintptr(0)) + tcl.XTcl_SetResult(tls, interp, ts+15192 /* "BLOB" */, uintptr(0)) break default: } @@ -42437,8 +41670,8 @@ func test_column_int64(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var iVal i64 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23791 /* " STMT column" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) return 1 } @@ -42467,8 +41700,8 @@ func test_column_blob(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var pBlob uintptr if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23791 /* " STMT column" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) return 1 } @@ -42499,8 +41732,8 @@ func test_column_double(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rVal float64 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23791 /* " STMT column" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) return 1 } @@ -42526,8 +41759,8 @@ func test_data_count(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 // var pStmt uintptr at bp+32, 8 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23791 /* " STMT column" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) return 1 } @@ -42557,8 +41790,8 @@ func test_stmt_utf8(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 xFunc = clientData if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23791 /* " STMT column" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) return 1 } @@ -42578,7 +41811,7 @@ func test_stmt_utf8(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 func test_global_recover(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5045:26: */ var rc int32 if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } rc = sqlite3.Xsqlite3_global_recover(tls) @@ -42592,6 +41825,40 @@ func test_global_recover(tls *crt.TLS, clientData uintptr, interp uintptr, objc // // Usage: sqlite3_column_name STMT column func test_stmt_utf16(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5070:26: */ + bp := tls.Alloc(44) + defer tls.Free(44) + + // var pStmt uintptr at bp+32, 8 + + // var col int32 at bp+40, 4 + + var pRet uintptr + var zName16 uintptr + var xFunc uintptr + + xFunc = clientData + if objc != 3 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) + return 1 + } + + if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &pStmt */) != 0 { + return 1 + } + if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+40 /* &col */) != 0 { + return 1 + } + + zName16 = (*(*func(*crt.TLS, uintptr, int32) uintptr)(unsafe.Pointer(&xFunc)))(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), *(*int32)(unsafe.Pointer(bp + 40 /* col */))) + if zName16 != 0 { + var n int32 + var z uintptr = zName16 + for n = 0; (*(*int8)(unsafe.Pointer(z + uintptr(n))) != 0) || (*(*int8)(unsafe.Pointer(z + uintptr((n + 1)))) != 0); n = n + (2) { + } + pRet = tcl.XTcl_NewByteArrayObj(tls, zName16, (n + 2)) + tcl.XTcl_SetObjResult(tls, interp, pRet) + } return 0 } @@ -42614,8 +41881,8 @@ func test_stmt_int(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, xFunc = clientData if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23791 /* " STMT column" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+15160 /* " STMT column" */, 0)) return 1 } @@ -42640,20 +41907,20 @@ func sqlite_set_magic(tls *crt.TLS, clientData uintptr, interp uintptr, argc int // var db uintptr at bp+32, 8 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+23820 /* " DB MAGIC" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+15197 /* " DB MAGIC" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { return 1 } - if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+23830 /* "SQLITE_MAGIC_OPE..." */) == 0 { + if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+15207 /* "SQLITE_MAGIC_OPE..." */) == 0 { (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmagic = 0xa029a697 - } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+23848 /* "SQLITE_MAGIC_CLO..." */) == 0 { + } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+15225 /* "SQLITE_MAGIC_CLO..." */) == 0 { (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmagic = 0x9f3c2d33 - } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+23868 /* "SQLITE_MAGIC_BUS..." */) == 0 { + } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+15245 /* "SQLITE_MAGIC_BUS..." */) == 0 { (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmagic = 0xf03b7906 - } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+23886 /* "SQLITE_MAGIC_ERR..." */) == 0 { + } else if crt.Xstrcmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ts+15263 /* "SQLITE_MAGIC_ERR..." */) == 0 { (*sqlite31)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* db */)))).Fmagic = 0xb5357930 } else if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), (*(*uintptr)(unsafe.Pointer(bp + 32 /* db */))+112 /* &.magic */)) != 0 { return 1 @@ -42671,7 +41938,7 @@ func test_interrupt(tls *crt.TLS, clientData uintptr, interp uintptr, argc int32 // var db uintptr at bp+32, 8 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -42694,8 +41961,8 @@ func delete_function(tls *crt.TLS, clientData uintptr, interp uintptr, argc int3 // var db uintptr at bp+32, 8 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+23905 /* " DB function-nam..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+15282 /* " DB function-nam..." */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -42719,8 +41986,8 @@ func delete_collation(tls *crt.TLS, clientData uintptr, interp uintptr, argc int // var db uintptr at bp+32, 8 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+23905 /* " DB function-nam..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+15282 /* " DB function-nam..." */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+32 /* &db */) != 0 { @@ -42744,14 +42011,14 @@ func get_autocommit(tls *crt.TLS, clientData uintptr, interp uintptr, argc int32 // var db uintptr at bp+56, 8 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+56 /* &db */) != 0 { return 1 } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+64 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+32, sqlite3.Xsqlite3_get_autocommit(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* db */))))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+64 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+32, sqlite3.Xsqlite3_get_autocommit(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* db */))))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+64 /* &zBuf[0] */, 0)) return 0 } @@ -42771,8 +42038,8 @@ func test_busy_timeout(tls *crt.TLS, clientData uintptr, interp uintptr, argc in // var db uintptr at bp+48, 8 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+48 /* &db */) != 0 { @@ -42793,7 +42060,7 @@ func test_busy_timeout(tls *crt.TLS, clientData uintptr, interp uintptr, argc in func tcl_variable_type(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test1.c:5301:26: */ var pVar uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23923 /* "VARIABLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15300 /* "VARIABLE" */) return 1 } pVar = tcl.XTcl_GetVar2Ex(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0), 0x200) @@ -42827,7 +42094,7 @@ func test_db_release_memory(tls *crt.TLS, clientData uintptr, interp uintptr, ob var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { @@ -42849,7 +42116,7 @@ func test_db_cacheflush(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { @@ -42876,7 +42143,7 @@ func test_system_errno(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var iErrno int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { @@ -42898,7 +42165,7 @@ func test_db_filename(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var zDbName uintptr if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23932 /* "DB DBNAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15309 /* "DB DBNAME" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+16 /* &db */) != 0 { @@ -42921,7 +42188,7 @@ func test_db_readonly(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var zDbName uintptr if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23932 /* "DB DBNAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15309 /* "DB DBNAME" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { @@ -42944,7 +42211,7 @@ func test_soft_heap_limit(tls *crt.TLS, clientData uintptr, interp uintptr, objc var amt sqlite3_int64 *(*Tcl_WideInt)(unsafe.Pointer(bp /* N */)) = int64(-1) if (objc != 1) && (objc != 2) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23942 /* "?N?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15319 /* "?N?" */) return 1 } if objc == 2 { @@ -42969,7 +42236,7 @@ func test_hard_heap_limit(tls *crt.TLS, clientData uintptr, interp uintptr, objc var amt sqlite3_int64 *(*Tcl_WideInt)(unsafe.Pointer(bp /* N */)) = int64(-1) if (objc != 1) && (objc != 2) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23942 /* "?N?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15319 /* "?N?" */) return 1 } if objc == 2 { @@ -43006,8 +42273,8 @@ func test_pager_refcounts(tls *crt.TLS, clientData uintptr, interp uintptr, objc var pResult uintptr if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0 { @@ -43044,7 +42311,7 @@ func working_64bit_int(tls *crt.TLS, clientData ClientData, interp uintptr, objc var working int32 = 0 pTestObj = tcl.XTcl_NewWideIntObj(tls, (int64(1000000) * int64(1234567890))) - working = (crt.Bool32(crt.Xstrcmp(tls, tcl.XTcl_GetString(tls, pTestObj), ts+23946 /* "1234567890000000" */) == 0)) + working = (crt.Bool32(crt.Xstrcmp(tls, tcl.XTcl_GetString(tls, pTestObj), ts+15323 /* "1234567890000000" */) == 0)) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pTestObj if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { @@ -43074,8 +42341,8 @@ func vfs_unlink_test(tls *crt.TLS, clientData ClientData, interp uintptr, objc i // var two sqlite3_vfs at bp+168, 168 sqlite3.Xsqlite3_vfs_unregister(tls, uintptr(0)) // Unregister of NULL is harmless - (*sqlite3_vfs)(unsafe.Pointer(bp /* &one */)).FzName = ts + 23963 /* "__one" */ - (*sqlite3_vfs)(unsafe.Pointer(bp + 168 /* &two */)).FzName = ts + 23969 /* "__two" */ + (*sqlite3_vfs)(unsafe.Pointer(bp /* &one */)).FzName = ts + 15340 /* "__one" */ + (*sqlite3_vfs)(unsafe.Pointer(bp + 168 /* &two */)).FzName = ts + 15346 /* "__two" */ // Calling sqlite3_vfs_register with 2nd argument of 0 does not // change the default VFS @@ -43147,7 +42414,7 @@ func vfs_initfail_test(tls *crt.TLS, clientData ClientData, interp uintptr, objc // var one sqlite3_vfs at bp, 168 - (*sqlite3_vfs)(unsafe.Pointer(bp /* &one */)).FzName = ts + 23963 /* "__one" */ + (*sqlite3_vfs)(unsafe.Pointer(bp /* &one */)).FzName = ts + 15340 /* "__one" */ if sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) != 0 { return 1 @@ -43211,8 +42478,8 @@ func file_control_test(tls *crt.TLS, clientData ClientData, interp uintptr, objc _ = rc if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0 { @@ -43220,11 +42487,11 @@ func file_control_test(tls *crt.TLS, clientData ClientData, interp uintptr, objc } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), uintptr(0), 0, bp+40 /* &iArg */) - rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+23975 /* "notadatabase" */, 1, bp+40 /* &iArg */) + rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+15352 /* "notadatabase" */, 1, bp+40 /* &iArg */) - rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+354 /* "main" */, -1, bp+40 /* &iArg */) + rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+84 /* "main" */, -1, bp+40 /* &iArg */) - rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+8992 /* "temp" */, -1, bp+40 /* &iArg */) + rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), ts+6914 /* "temp" */, -1, bp+40 /* &iArg */) return 0 } @@ -43243,8 +42510,8 @@ func file_control_lasterrno_test(tls *crt.TLS, clientData ClientData, interp uin var rc int32 if objc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+21667 /* " DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+12853 /* " DB" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+64 /* &db */) != 0 { @@ -43256,8 +42523,8 @@ func file_control_lasterrno_test(tls *crt.TLS, clientData ClientData, interp uin return 1 } if *(*int32)(unsafe.Pointer(bp + 72 /* iArg */)) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+23988, /* "Unexpected non-z..." */ - tcl.XTcl_GetStringFromObj(tls, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 72 /* iArg */))), uintptr(0)), ts+4435 /* " " */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+15365, /* "Unexpected non-z..." */ + tcl.XTcl_GetStringFromObj(tls, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 72 /* iArg */))), uintptr(0)), ts+3368 /* " " */, 0)) return 1 } return 0 @@ -43280,7 +42547,7 @@ func file_control_data_version(tls *crt.TLS, clientData ClientData, interp uintp // var zBuf [100]int8 at bp+20, 100 if (objc != 3) && (objc != 2) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24016 /* "DB [DBNAME]" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15393 /* "DB [DBNAME]" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+8 /* &db */) != 0 { @@ -43297,7 +42564,7 @@ func file_control_data_version(tls *crt.TLS, clientData ClientData, interp uintp tcl.XTcl_SetResult(tls, interp, sqlite3.Xsqlite3ErrName(tls, rc), uintptr(0)) return 1 } else { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+20 /* &zBuf[0] */, ts+24028 /* "%u" */, crt.VaList(bp, *(*uint32)(unsafe.Pointer(bp + 16 /* iVers */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+20 /* &zBuf[0] */, ts+15405 /* "%u" */, crt.VaList(bp, *(*uint32)(unsafe.Pointer(bp + 16 /* iVers */)))) tcl.XTcl_SetResult(tls, interp, bp+20 /* zBuf */, uintptr(1)) return 0 } @@ -43321,7 +42588,7 @@ func file_control_chunksize_test(tls *crt.TLS, clientData ClientData, interp uin var rc int32 // file_control() return code if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24031 /* "DB DBNAME SIZE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15408 /* "DB DBNAME SIZE" */) return 1 } if (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0) || @@ -43357,7 +42624,7 @@ func file_control_sizehint_test(tls *crt.TLS, clientData ClientData, interp uint var rc int32 // file_control() return code if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24031 /* "DB DBNAME SIZE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15408 /* "DB DBNAME SIZE" */) return 1 } if (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0) || @@ -43389,8 +42656,8 @@ func file_control_lockproxy_test(tls *crt.TLS, clientData ClientData, interp uin // var db uintptr at bp+32, 8 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+24046 /* " DB PWD" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+15423 /* " DB PWD" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0 { @@ -43416,8 +42683,8 @@ func file_control_persist_wal(tls *crt.TLS, clientData ClientData, interp uintpt // var z [100]int8 at bp+76, 100 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+24054 /* " DB FLAG" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+15431 /* " DB FLAG" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+64 /* &db */) != 0 { @@ -43427,7 +42694,7 @@ func file_control_persist_wal(tls *crt.TLS, clientData ClientData, interp uintpt return 1 } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), uintptr(0), 10, bp+72 /* &bPersist */) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+76 /* &z[0] */, ts+24063 /* "%d %d" */, crt.VaList(bp+32, rc, *(*int32)(unsafe.Pointer(bp + 72 /* bPersist */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+76 /* &z[0] */, ts+15440 /* "%d %d" */, crt.VaList(bp+32, rc, *(*int32)(unsafe.Pointer(bp + 72 /* bPersist */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, bp+76 /* &z[0] */, uintptr(0))) return 0 } @@ -43448,8 +42715,8 @@ func file_control_powersafe_overwrite(tls *crt.TLS, clientData ClientData, inter // var z [100]int8 at bp+76, 100 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+24054 /* " DB FLAG" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+15431 /* " DB FLAG" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+64 /* &db */) != 0 { @@ -43459,7 +42726,7 @@ func file_control_powersafe_overwrite(tls *crt.TLS, clientData ClientData, inter return 1 } rc = sqlite3.Xsqlite3_file_control(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), uintptr(0), 13, bp+72 /* &b */) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+76 /* &z[0] */, ts+24063 /* "%d %d" */, crt.VaList(bp+32, rc, *(*int32)(unsafe.Pointer(bp + 72 /* b */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+76 /* &z[0] */, ts+15440 /* "%d %d" */, crt.VaList(bp+32, rc, *(*int32)(unsafe.Pointer(bp + 72 /* b */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, bp+76 /* &z[0] */, uintptr(0))) return 0 } @@ -43473,12 +42740,12 @@ func file_control_vfsname(tls *crt.TLS, clientData ClientData, interp uintptr, o // var db uintptr at bp+48, 8 - var zDbName uintptr = ts + 354 /* "main" */ + var zDbName uintptr = ts + 84 /* "main" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* zVfsName */)) = uintptr(0) if (objc != 2) && (objc != 3) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+24069 /* " DB ?AUXDB?" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+15446 /* " DB ?AUXDB?" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &db */) != 0 { @@ -43502,12 +42769,12 @@ func file_control_tempfilename(tls *crt.TLS, clientData ClientData, interp uintp // var db uintptr at bp+48, 8 - var zDbName uintptr = ts + 354 /* "main" */ + var zDbName uintptr = ts + 84 /* "main" */ *(*uintptr)(unsafe.Pointer(bp + 56 /* zTName */)) = uintptr(0) if (objc != 2) && (objc != 3) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+24069 /* " DB ?AUXDB?" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+15446 /* " DB ?AUXDB?" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &db */) != 0 { @@ -43529,7 +42796,7 @@ func vfs_list(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, o var pVfs uintptr var pRet uintptr = tcl.XTcl_NewObj(tls) if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } for pVfs = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)); pVfs != 0; pVfs = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpNext { @@ -43557,8 +42824,8 @@ func test_limit(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, var zId uintptr if objc != 4 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+24081 /* " DB ID VALUE" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+15458 /* " DB ID VALUE" */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+56 /* &db */) != 0 { @@ -43580,7 +42847,7 @@ func test_limit(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, Fid int32 _ [4]byte }{}))) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+24094 /* "unknown limit ty..." */, zId, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+15471 /* "unknown limit ty..." */, zId, uintptr(0))) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+64 /* &val */) != 0 { @@ -43596,22 +42863,22 @@ var aId = [14]struct { Fid int32 _ [4]byte }{ - {FzName: ts + 24115 /* "SQLITE_LIMIT_LEN..." */, Fid: 0}, - {FzName: ts + 24135 /* "SQLITE_LIMIT_SQL..." */, Fid: 1}, - {FzName: ts + 24159 /* "SQLITE_LIMIT_COL..." */, Fid: 2}, - {FzName: ts + 24179 /* "SQLITE_LIMIT_EXP..." */, Fid: 3}, - {FzName: ts + 24203 /* "SQLITE_LIMIT_COM..." */, Fid: 4}, - {FzName: ts + 24232 /* "SQLITE_LIMIT_VDB..." */, Fid: 5}, - {FzName: ts + 24253 /* "SQLITE_LIMIT_FUN..." */, Fid: 6}, - {FzName: ts + 24279 /* "SQLITE_LIMIT_ATT..." */, Fid: 7}, - {FzName: ts + 24301 /* "SQLITE_LIMIT_LIK..." */, Fid: 8}, - {FzName: ts + 24334 /* "SQLITE_LIMIT_VAR..." */, Fid: 9}, - {FzName: ts + 24363 /* "SQLITE_LIMIT_TRI..." */, Fid: 10}, - {FzName: ts + 24390 /* "SQLITE_LIMIT_WOR..." */, Fid: 11}, + {FzName: ts + 15492 /* "SQLITE_LIMIT_LEN..." */, Fid: 0}, + {FzName: ts + 15512 /* "SQLITE_LIMIT_SQL..." */, Fid: 1}, + {FzName: ts + 15536 /* "SQLITE_LIMIT_COL..." */, Fid: 2}, + {FzName: ts + 15556 /* "SQLITE_LIMIT_EXP..." */, Fid: 3}, + {FzName: ts + 15580 /* "SQLITE_LIMIT_COM..." */, Fid: 4}, + {FzName: ts + 15609 /* "SQLITE_LIMIT_VDB..." */, Fid: 5}, + {FzName: ts + 15630 /* "SQLITE_LIMIT_FUN..." */, Fid: 6}, + {FzName: ts + 15656 /* "SQLITE_LIMIT_ATT..." */, Fid: 7}, + {FzName: ts + 15678 /* "SQLITE_LIMIT_LIK..." */, Fid: 8}, + {FzName: ts + 15711 /* "SQLITE_LIMIT_VAR..." */, Fid: 9}, + {FzName: ts + 15740 /* "SQLITE_LIMIT_TRI..." */, Fid: 10}, + {FzName: ts + 15767 /* "SQLITE_LIMIT_WOR..." */, Fid: 11}, // Out of range test cases - {FzName: ts + 24418 /* "SQLITE_LIMIT_TOO..." */, Fid: -1}, - {FzName: ts + 24440 /* "SQLITE_LIMIT_TOO..." */, Fid: (11 + 1)}, + {FzName: ts + 15795 /* "SQLITE_LIMIT_TOO..." */, Fid: -1}, + {FzName: ts + 15817 /* "SQLITE_LIMIT_TOO..." */, Fid: (11 + 1)}, } /* test1.c:6316:5 */ // tclcmd: save_prng_state @@ -43661,7 +42928,7 @@ func prng_seed(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, *(*int32)(unsafe.Pointer(bp + 16 /* i */)) = 0 *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)) = uintptr(0) if (objc != 2) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24460 /* "SEED ?DB?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15837 /* "SEED ?DB?" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), bp+16 /* &i */) != 0 { @@ -43717,13 +42984,13 @@ func test_pcache_stats(tls *crt.TLS, clientData ClientData, interp uintptr, objc sqlite3.Xsqlite3PcacheStats(tls, bp /* &nCurrent */, bp+4 /* &nMax */, bp+8 /* &nMin */, bp+12 /* &nRecyclable */) pRet = tcl.XTcl_NewObj(tls) - tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+24470 /* "current" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+15847 /* "current" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp /* nCurrent */)))) - tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+24478 /* "max" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+15855 /* "max" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 4 /* nMax */)))) - tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+24482 /* "min" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+15859 /* "min" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 8 /* nMin */)))) - tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+24486 /* "recyclable" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+15863 /* "recyclable" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewIntObj(tls, *(*int32)(unsafe.Pointer(bp + 12 /* nRecyclable */)))) tcl.XTcl_SetObjResult(tls, interp, pRet) @@ -43734,7 +43001,7 @@ func test_pcache_stats(tls *crt.TLS, clientData ClientData, interp uintptr, objc func test_unlock_notify_cb(tls *crt.TLS, aArg uintptr, nArg int32) { /* test1.c:6505:13: */ var ii int32 for ii = 0; ii < nArg; ii++ { - tcl.XTcl_EvalEx(tls, *(*uintptr)(unsafe.Pointer(aArg + uintptr(ii)*8)), ts+20362 /* "unlock_notify" */, -1, 0x020000) + tcl.XTcl_EvalEx(tls, *(*uintptr)(unsafe.Pointer(aArg + uintptr(ii)*8)), ts+11563 /* "unlock_notify" */, -1, 0x020000) } } @@ -43748,7 +43015,7 @@ func test_unlock_notify(tls *crt.TLS, clientData ClientData, interp uintptr, obj var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } @@ -43773,7 +43040,7 @@ func test_wal_checkpoint(tls *crt.TLS, clientData ClientData, interp uintptr, ob var rc int32 if (objc != 3) && (objc != 2) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24497 /* "DB ?NAME?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15874 /* "DB ?NAME?" */) return 1 } @@ -43818,10 +43085,10 @@ func test_wal_checkpoint_v2(tls *crt.TLS, clientData ClientData, interp uintptr, *(*int32)(unsafe.Pointer(bp + 92 /* nCkpt */)) = -555 var pRet uintptr - *(*[5]uintptr)(unsafe.Pointer(bp + 48 /* aMode */)) = [5]uintptr{ts + 24507 /* "passive" */, ts + 24515 /* "full" */, ts + 24520 /* "restart" */, ts + 24528 /* "truncate" */, uintptr(0)} + *(*[5]uintptr)(unsafe.Pointer(bp + 48 /* aMode */)) = [5]uintptr{ts + 15884 /* "passive" */, ts + 15892 /* "full" */, ts + 15897 /* "restart" */, ts + 15905 /* "truncate" */, uintptr(0)} if (objc != 3) && (objc != 4) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24537 /* "DB MODE ?NAME?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15914 /* "DB MODE ?NAME?" */) return 1 } @@ -43829,7 +43096,7 @@ func test_wal_checkpoint_v2(tls *crt.TLS, clientData ClientData, interp uintptr, zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) } if (getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0) || ((0 != tcl.XTcl_GetIntFromObj(tls, uintptr(0), *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+40 /* &eMode */)) && - (0 != tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+48 /* &aMode[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+24552 /* "mode" */, 0, bp+40 /* &eMode */))) { + (0 != tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+48 /* &aMode[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+15929 /* "mode" */, 0, bp+40 /* &eMode */))) { return 1 } @@ -43837,7 +43104,7 @@ func test_wal_checkpoint_v2(tls *crt.TLS, clientData ClientData, interp uintptr, if (rc != 0) && (rc != 5) { var zErrCode uintptr = sqlite3.Xsqlite3ErrName(tls, rc) tcl.XTcl_ResetResult(tls, interp) - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, zErrCode, ts+16720 /* " - " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))), 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, zErrCode, ts+15934 /* " - " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */))), 0)) return 1 } @@ -43866,7 +43133,7 @@ func test_wal_autocheckpoint(tls *crt.TLS, clientData ClientData, interp uintptr // var iVal int32 at bp+8, 4 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24557 /* "DB VALUE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15938 /* "DB VALUE" */) return 1 } @@ -43913,7 +43180,7 @@ func test_sqlite3_log(tls *crt.TLS, clientData ClientData, interp uintptr, objc defer tls.Free(32) if objc > 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+18615 /* "SCRIPT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+9746 /* "SCRIPT" */) return 1 } if logcallback.FpObj != 0 { @@ -43949,16 +43216,16 @@ func runAsObjProc(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, // var cmdInfo Tcl_CmdInfo at bp+48, 64 if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24566 /* "COMMAND ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15947 /* "COMMAND ..." */) return 1 } if !(tcl.XTcl_GetCommandInfo(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &cmdInfo */) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21525, /* "command not foun..." */ + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12711, /* "command not foun..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) return 1 } if (*Tcl_CmdInfo)(unsafe.Pointer(bp+48 /* &cmdInfo */)).FobjProc == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+24578, /* "command has no o..." */ + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+15959, /* "command has no o..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) return 1 } @@ -43986,7 +43253,7 @@ func printExplainQueryPlan(tls *crt.TLS, pStmt uintptr) int32 { /* test1.c:6760: return 1 } - zExplain = sqlite3.Xsqlite3_mprintf(tls, ts+538 /* "EXPLAIN QUERY PL..." */, crt.VaList(bp, zSql)) + zExplain = sqlite3.Xsqlite3_mprintf(tls, ts+234 /* "EXPLAIN QUERY PL..." */, crt.VaList(bp, zSql)) if zExplain == uintptr(0) { return 7 } @@ -44003,7 +43270,7 @@ func printExplainQueryPlan(tls *crt.TLS, pStmt uintptr) int32 { /* test1.c:6760: var iFrom int32 = sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pExplain */)), 2) var zDetail uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pExplain */)), 3) - crt.Xprintf(tls, ts+24603 /* "%d %d %d %s\n" */, crt.VaList(bp+8, iSelectid, iOrder, iFrom, zDetail)) + crt.Xprintf(tls, ts+15984 /* "%d %d %d %s\n" */, crt.VaList(bp+8, iSelectid, iOrder, iFrom, zDetail)) } return sqlite3.Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pExplain */))) @@ -44017,7 +43284,7 @@ func test_print_eqp(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 // var pStmt uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23218 /* "STMT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14574 /* "STMT" */) return 1 } if getStmtPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &pStmt */) != 0 { @@ -44038,10 +43305,10 @@ func test_test_control(tls *crt.TLS, clientData uintptr, interp uintptr, objc in defer tls.Free(184) *(*[4]Verb)(unsafe.Pointer(bp + 64 /* aVerb */)) = [4]Verb{ - {FzName: ts + 24616 /* "SQLITE_TESTCTRL_..." */, Fi: 18}, - {FzName: ts + 24648 /* "SQLITE_TESTCTRL_..." */, Fi: 24}, - {FzName: ts + 24676 /* "SQLITE_TESTCTRL_..." */, Fi: 25}, - {FzName: ts + 24701 /* "SQLITE_TESTCTRL_..." */, Fi: 17}, + {FzName: ts + 15997 /* "SQLITE_TESTCTRL_..." */, Fi: 18}, + {FzName: ts + 16029 /* "SQLITE_TESTCTRL_..." */, Fi: 24}, + {FzName: ts + 16057 /* "SQLITE_TESTCTRL_..." */, Fi: 25}, + {FzName: ts + 16082 /* "SQLITE_TESTCTRL_..." */, Fi: 17}, } // var iVerb int32 at bp+128, 4 @@ -44049,12 +43316,12 @@ func test_test_control(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var rc int32 if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24736 /* "VERB ARGS..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16117 /* "VERB ARGS..." */) return 1 } rc = tcl.XTcl_GetIndexFromObjStruct(tls, - interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+64 /* &aVerb[0] */, int32(unsafe.Sizeof(Verb{})), ts+24749 /* "VERB" */, 0, bp+128 /* &iVerb */) + interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+64 /* &aVerb[0] */, int32(unsafe.Sizeof(Verb{})), ts+16130 /* "VERB" */, 0, bp+128 /* &iVerb */) if rc != 0 { return rc } @@ -44065,7 +43332,7 @@ func test_test_control(tls *crt.TLS, clientData uintptr, interp uintptr, objc in { *(*uintptr)(unsafe.Pointer(bp + 136 /* db */)) = uintptr(0) if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), bp+136 /* &db */) != 0 { @@ -44079,7 +43346,7 @@ func test_test_control(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // var val int32 at bp+144, 4 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+24754 /* "ONOFF" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+16135 /* "ONOFF" */) return 1 } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+144 /* &val */) != 0 { @@ -44096,7 +43363,7 @@ func test_test_control(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // var db uintptr at bp+152, 8 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+24760 /* "DB LIMIT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+16141 /* "DB LIMIT" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), bp+152 /* &db */) != 0 { @@ -44119,7 +43386,7 @@ func test_test_control(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // var db uintptr at bp+168, 8 if objc != 6 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+24769 /* "DB dbName onOff ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+16150 /* "DB dbName onOff ..." */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), bp+168 /* &db */) != 0 { @@ -44247,7 +43514,7 @@ func test_getrusage(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 crt.Xgetrusage(tls, 0, bp+48 /* &r */) sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([1024]int8{})), bp+192, /* &buf[0] */ - ts+24790, /* "ru_utime=%d.%06d..." */ + ts+16171, /* "ru_utime=%d.%06d..." */ crt.VaList(bp, int32((*rusage)(unsafe.Pointer(bp+48 /* &r */)).Fru_utime.Ftv_sec), int32((*rusage)(unsafe.Pointer(bp+48 /* &r */)).Fru_utime.Ftv_usec), int32((*rusage)(unsafe.Pointer(bp+48 /* &r */)).Fru_stime.Ftv_sec), int32((*rusage)(unsafe.Pointer(bp+48 /* &r */)).Fru_stime.Ftv_usec), int32(*(*int64)(unsafe.Pointer(bp + 48 /* &r */ + 64 /* &.ru_minflt */))), int32(*(*int64)(unsafe.Pointer(bp + 48 /* &r */ + 72 /* &.ru_majflt */))))) @@ -44273,7 +43540,7 @@ func optimization_control(tls *crt.TLS, clientData uintptr, interp uintptr, objc var mask int32 = 0 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24850 /* "DB OPT BOOLEAN" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16231 /* "DB OPT BOOLEAN" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+56 /* &db */) != 0 { @@ -44301,14 +43568,14 @@ func optimization_control(tls *crt.TLS, clientData uintptr, interp uintptr, objc Fmask int32 _ [4]byte }{}))) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+24865, /* "unknown optimiza..." */ + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+16246, /* "unknown optimiza..." */ uintptr(0))) for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aOpt)) / uint64(unsafe.Sizeof(struct { FzOptName uintptr Fmask int32 _ [4]byte }{}))); i++ { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+4435 /* " " */, aOpt[i].FzOptName, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+3368 /* " " */, aOpt[i].FzOptName, uintptr(0))) } return 1 } @@ -44321,19 +43588,19 @@ var aOpt = [13]struct { Fmask int32 _ [4]byte }{ - {FzOptName: ts + 24906 /* "all" */, Fmask: 0xffff}, - {FzOptName: ts + 24910 /* "none" */, Fmask: 0}, - {FzOptName: ts + 24915 /* "query-flattener" */, Fmask: 0x0001}, - {FzOptName: ts + 24931 /* "groupby-order" */, Fmask: 0x0004}, - {FzOptName: ts + 24945 /* "factor-constants" */, Fmask: 0x0008}, - {FzOptName: ts + 24962 /* "distinct-opt" */, Fmask: 0x0010}, - {FzOptName: ts + 24975 /* "cover-idx-scan" */, Fmask: 0x0020}, - {FzOptName: ts + 24990 /* "order-by-idx-joi..." */, Fmask: 0x0040}, - {FzOptName: ts + 25008 /* "transitive" */, Fmask: 0x0080}, - {FzOptName: ts + 25019 /* "omit-noop-join" */, Fmask: 0x0100}, - {FzOptName: ts + 25034 /* "stat4" */, Fmask: 0x0800}, - {FzOptName: ts + 25040 /* "skip-scan" */, Fmask: 0x4000}, - {FzOptName: ts + 25050 /* "push-down" */, Fmask: 0x1000}, + {FzOptName: ts + 16287 /* "all" */, Fmask: 0xffff}, + {FzOptName: ts + 16291 /* "none" */, Fmask: 0}, + {FzOptName: ts + 16296 /* "query-flattener" */, Fmask: 0x0001}, + {FzOptName: ts + 16312 /* "groupby-order" */, Fmask: 0x0004}, + {FzOptName: ts + 16326 /* "factor-constants" */, Fmask: 0x0008}, + {FzOptName: ts + 16343 /* "distinct-opt" */, Fmask: 0x0010}, + {FzOptName: ts + 16356 /* "cover-idx-scan" */, Fmask: 0x0020}, + {FzOptName: ts + 16371 /* "order-by-idx-joi..." */, Fmask: 0x0040}, + {FzOptName: ts + 16389 /* "transitive" */, Fmask: 0x0080}, + {FzOptName: ts + 16400 /* "omit-noop-join" */, Fmask: 0x0100}, + {FzOptName: ts + 16415 /* "stat4" */, Fmask: 0x0800}, + {FzOptName: ts + 16421 /* "skip-scan" */, Fmask: 0x4000}, + {FzOptName: ts + 16431 /* "push-down" */, Fmask: 0x1000}, } /* test1.c:7200:5 */ // load_static_extension DB NAME ... @@ -44351,7 +43618,7 @@ func tclLoadStaticExtensionCmd(tls *crt.TLS, clientData uintptr, interp uintptr, var rc int32 *(*uintptr)(unsafe.Pointer(bp + 72 /* zErrMsg */)) = uintptr(0) if objc < 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25060 /* "DB NAME ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16441 /* "DB NAME ..." */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+64 /* &db */) != 0 { @@ -44371,7 +43638,7 @@ func tclLoadStaticExtensionCmd(tls *crt.TLS, clientData uintptr, interp uintptr, FzExtName uintptr FpInit uintptr }{})))) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+25072 /* "no such extensio..." */, zName, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+16453 /* "no such extensio..." */, zName, uintptr(0))) return 1 } if aExtension[i].FpInit != 0 { @@ -44380,7 +43647,7 @@ func tclLoadStaticExtensionCmd(tls *crt.TLS, clientData uintptr, interp uintptr, rc = 0 } if (rc != 0) || (*(*uintptr)(unsafe.Pointer(bp + 72 /* zErrMsg */)) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+25092 /* "initialization o..." */, zName, ts+25111 /* " failed: " */, *(*uintptr)(unsafe.Pointer(bp + 72 /* zErrMsg */)), + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+16473 /* "initialization o..." */, zName, ts+16492 /* " failed: " */, *(*uintptr)(unsafe.Pointer(bp + 72 /* zErrMsg */)), uintptr(0))) sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* zErrMsg */))) return 1 @@ -44389,29 +43656,30 @@ func tclLoadStaticExtensionCmd(tls *crt.TLS, clientData uintptr, interp uintptr, return 0 } -var aExtension = [19]struct { +var aExtension = [20]struct { FzExtName uintptr FpInit uintptr }{ - {FzExtName: ts + 25121 /* "amatch" */, FpInit: 0}, - {FzExtName: ts + 3452 /* "carray" */, FpInit: 0}, - {FzExtName: ts + 25128 /* "closure" */, FpInit: 0}, - {FzExtName: ts + 4424 /* "csv" */, FpInit: 0}, - {FzExtName: ts + 4437 /* "eval" */, FpInit: 0}, - {FzExtName: ts + 4515 /* "explain" */, FpInit: 0}, - {FzExtName: ts + 25136 /* "fileio" */, FpInit: 0}, - {FzExtName: ts + 5119 /* "fuzzer" */, FpInit: 0}, - {FzExtName: ts + 5223 /* "ieee754" */, FpInit: 0}, - {FzExtName: ts + 25143 /* "nextchar" */, FpInit: 0}, - {FzExtName: ts + 5829 /* "percentile" */, FpInit: 0}, - {FzExtName: ts + 5904 /* "prefixes" */, FpInit: 0}, - {FzExtName: ts + 6216 /* "regexp" */, FpInit: 0}, - {FzExtName: ts + 6284 /* "remember" */, FpInit: 0}, - {FzExtName: ts + 25152 /* "series" */, FpInit: 0}, - {FzExtName: ts + 25159 /* "spellfix" */, FpInit: 0}, - {FzExtName: ts + 25168 /* "totype" */, FpInit: 0}, - {FzExtName: ts + 8982 /* "unionvtab" */, FpInit: 0}, - {FzExtName: ts + 9682 /* "wholenumber" */, FpInit: 0}, + {FzExtName: ts + 16502 /* "amatch" */, FpInit: 0}, + {FzExtName: ts + 2713 /* "carray" */, FpInit: 0}, + {FzExtName: ts + 16509 /* "closure" */, FpInit: 0}, + {FzExtName: ts + 3357 /* "csv" */, FpInit: 0}, + {FzExtName: ts + 3370 /* "eval" */, FpInit: 0}, + {FzExtName: ts + 3448 /* "explain" */, FpInit: 0}, + {FzExtName: ts + 16517 /* "fileio" */, FpInit: 0}, + {FzExtName: ts + 3957 /* "fuzzer" */, FpInit: 0}, + {FzExtName: ts + 3981 /* "ieee754" */, FpInit: 0}, + {FzExtName: ts + 16524 /* "nextchar" */, FpInit: 0}, + {FzExtName: ts + 4493 /* "percentile" */, FpInit: 0}, + {FzExtName: ts + 4568 /* "prefixes" */, FpInit: 0}, + {FzExtName: ts + 4880 /* "regexp" */, FpInit: 0}, + {FzExtName: ts + 4887 /* "remember" */, FpInit: 0}, + {FzExtName: ts + 16533 /* "series" */, FpInit: 0}, + {FzExtName: ts + 16540 /* "spellfix" */, FpInit: 0}, + {FzExtName: ts + 16549 /* "totype" */, FpInit: 0}, + {FzExtName: ts + 6904 /* "unionvtab" */, FpInit: 0}, + {FzExtName: ts + 7446 /* "wholenumber" */, FpInit: 0}, + {FzExtName: ts + 7549 /* "zipfile" */, FpInit: 0}, } /* test1.c:7280:5 */ // sorter_test_fakeheap BOOL @@ -44423,7 +43691,7 @@ func sorter_test_fakeheap(tls *crt.TLS, clientData uintptr, interp uintptr, objc // var bArg int32 at bp, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25175 /* "BOOL" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16556 /* "BOOL" */) return 1 } @@ -44478,7 +43746,7 @@ func sorter_test_sort4_helper(tls *crt.TLS, clientData uintptr, interp uintptr, if !(objc != 5) { goto __1 } - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25180 /* "DB SQL1 NSTEP SQ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16561 /* "DB SQL1 NSTEP SQ..." */) return 1 __1: ; @@ -44516,7 +43784,7 @@ __5: if !(a != sqlite3.Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)), iB)) { goto __8 } - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+25199 /* "data error: (a!=..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+16580 /* "data error: (a!=..." */, 0)) return 1 __8: ; @@ -44569,14 +43837,14 @@ __14: if !(iCksum1 != iCksum2) { goto __15 } - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+25218 /* "checksum mismatc..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+16599 /* "checksum mismatc..." */, 0)) return 1 __15: ; return 0 sql_error: - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+25236 /* "sql error: " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* db */))), 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+16617 /* "sql error: " */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* db */))), 0)) return 1 } @@ -44604,7 +43872,7 @@ func test_bad_behavior(tls *crt.TLS, clientData ClientData, interp uintptr, objc var a uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25248 /* "TYPE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16629 /* "TYPE" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &iType */) != 0 { @@ -44639,7 +43907,7 @@ func test_bad_behavior(tls *crt.TLS, clientData ClientData, interp uintptr, objc } case 4: { - tcl.XTcl_Panic(tls, ts+25253 /* "Deliberate panic" */, 0) + tcl.XTcl_Panic(tls, ts+16634 /* "Deliberate panic" */, 0) break } } @@ -44657,7 +43925,7 @@ func test_register_dbstat_vtab(tls *crt.TLS, clientData uintptr, interp uintptr, // var cmdInfo Tcl_CmdInfo at bp, 64 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } @@ -44682,20 +43950,20 @@ func test_sqlite3_db_config(tls *crt.TLS, clientData uintptr, interp uintptr, ob // var db uintptr at bp+16, 8 if (objc != 4) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25270 /* "DB SETTING [VALU..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16651 /* "DB SETTING [VALU..." */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+16 /* &db */) != 0 { return 1 } zSetting = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - if sqlite3.Xsqlite3_strglob(tls, ts+25289 /* "SQLITE_*" */, zSetting) == 0 { + if sqlite3.Xsqlite3_strglob(tls, ts+16670 /* "SQLITE_*" */, zSetting) == 0 { zSetting += uintptr(7) } - if sqlite3.Xsqlite3_strglob(tls, ts+25298 /* "DBCONFIG_*" */, zSetting) == 0 { + if sqlite3.Xsqlite3_strglob(tls, ts+16679 /* "DBCONFIG_*" */, zSetting) == 0 { zSetting += uintptr(9) } - if sqlite3.Xsqlite3_strglob(tls, ts+25309 /* "ENABLE_*" */, zSetting) == 0 { + if sqlite3.Xsqlite3_strglob(tls, ts+16690 /* "ENABLE_*" */, zSetting) == 0 { zSetting += uintptr(7) } for i = 0; i < (int32(uint64(unsafe.Sizeof(aSetting)) / uint64(unsafe.Sizeof(struct { @@ -44713,7 +43981,7 @@ func test_sqlite3_db_config(tls *crt.TLS, clientData uintptr, interp uintptr, ob _ [4]byte }{})))) { tcl.XTcl_SetObjResult(tls, interp, - tcl.XTcl_NewStringObj(tls, ts+25318 /* "unknown sqlite3_..." */, -1)) + tcl.XTcl_NewStringObj(tls, ts+16699 /* "unknown sqlite3_..." */, -1)) return 1 } if objc == 4 { @@ -44733,20 +44001,20 @@ var aSetting = [14]struct { FeVal int32 _ [4]byte }{ - {FzName: ts + 25352 /* "FKEY" */, FeVal: 1002}, - {FzName: ts + 25357 /* "TRIGGER" */, FeVal: 1003}, - {FzName: ts + 25365 /* "FTS3_TOKENIZER" */, FeVal: 1004}, - {FzName: ts + 25380 /* "LOAD_EXTENSION" */, FeVal: 1005}, - {FzName: ts + 25395 /* "NO_CKPT_ON_CLOSE" */, FeVal: 1006}, - {FzName: ts + 25412 /* "QPSG" */, FeVal: 1007}, - {FzName: ts + 25417 /* "TRIGGER_EQP" */, FeVal: 1008}, - {FzName: ts + 25429 /* "RESET_DB" */, FeVal: 1009}, - {FzName: ts + 25438 /* "DEFENSIVE" */, FeVal: 1010}, - {FzName: ts + 25448 /* "WRITABLE_SCHEMA" */, FeVal: 1011}, - {FzName: ts + 25464 /* "LEGACY_ALTER_TAB..." */, FeVal: 1012}, - {FzName: ts + 25483 /* "DQS_DML" */, FeVal: 1013}, - {FzName: ts + 25491 /* "DQS_DDL" */, FeVal: 1014}, - {FzName: ts + 25499 /* "LEGACY_FILE_FORM..." */, FeVal: 1016}, + {FzName: ts + 16733 /* "FKEY" */, FeVal: 1002}, + {FzName: ts + 16738 /* "TRIGGER" */, FeVal: 1003}, + {FzName: ts + 16746 /* "FTS3_TOKENIZER" */, FeVal: 1004}, + {FzName: ts + 16761 /* "LOAD_EXTENSION" */, FeVal: 1005}, + {FzName: ts + 16776 /* "NO_CKPT_ON_CLOSE" */, FeVal: 1006}, + {FzName: ts + 16793 /* "QPSG" */, FeVal: 1007}, + {FzName: ts + 16798 /* "TRIGGER_EQP" */, FeVal: 1008}, + {FzName: ts + 16810 /* "RESET_DB" */, FeVal: 1009}, + {FzName: ts + 16819 /* "DEFENSIVE" */, FeVal: 1010}, + {FzName: ts + 16829 /* "WRITABLE_SCHEMA" */, FeVal: 1011}, + {FzName: ts + 16845 /* "LEGACY_ALTER_TAB..." */, FeVal: 1012}, + {FzName: ts + 16864 /* "DQS_DML" */, FeVal: 1013}, + {FzName: ts + 16872 /* "DQS_DDL" */, FeVal: 1014}, + {FzName: ts + 16880 /* "LEGACY_FILE_FORM..." */, FeVal: 1016}, } /* test1.c:7679:5 */ // Change the name of the main database schema from "main" to "icecube". @@ -44758,13 +44026,13 @@ func test_dbconfig_maindbname_icecube(tls *crt.TLS, clientData uintptr, interp u // var db uintptr at bp+8, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } else { if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+8 /* &db */) != 0 { return 1 } - rc = sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)), 1000, crt.VaList(bp, ts+25518 /* "icecube" */)) + rc = sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)), 1000, crt.VaList(bp, ts+16899 /* "icecube" */)) tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) return 0 } @@ -44777,7 +44045,7 @@ func test_mmap_warm(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 defer tls.Free(8) if (objc != 2) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25526 /* "DB ?DBNAME?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16907 /* "DB ?DBNAME?" */) return 1 } else { var rc int32 @@ -44823,7 +44091,7 @@ func test_decode_hexdb(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // var x [16]uint32 at bp+232, 64 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25538 /* "HEXDB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16919 /* "HEXDB" */) return 1 } zIn = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -44840,33 +44108,33 @@ func test_decode_hexdb(tls *crt.TLS, clientData uintptr, interp uintptr, objc in if a == uintptr(0) { // var pgsz int32 at bp+220, 4 - rc = crt.X__isoc99_sscanf(tls, (zIn + uintptr(i)), ts+25544 /* "| size %d pagesi..." */, crt.VaList(bp, bp+216 /* &n */, bp+220 /* &pgsz */)) + rc = crt.X__isoc99_sscanf(tls, (zIn + uintptr(i)), ts+16925 /* "| size %d pagesi..." */, crt.VaList(bp, bp+216 /* &n */, bp+220 /* &pgsz */)) if rc != 2 { continue } if ((*(*int32)(unsafe.Pointer(bp + 220 /* pgsz */)) < 512) || (*(*int32)(unsafe.Pointer(bp + 220 /* pgsz */)) > 65536)) || ((*(*int32)(unsafe.Pointer(bp + 220 /* pgsz */)) & (*(*int32)(unsafe.Pointer(bp + 220 /* pgsz */)) - 1)) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+25566 /* "bad 'pagesize' f..." */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+16947 /* "bad 'pagesize' f..." */, uintptr(0))) return 1 } *(*int32)(unsafe.Pointer(bp + 216 /* n */)) = (((*(*int32)(unsafe.Pointer(bp + 216 /* n */)) + *(*int32)(unsafe.Pointer(bp + 220 /* pgsz */))) - 1) & ^(*(*int32)(unsafe.Pointer(bp + 220 /* pgsz */)) - 1)) // Round n up to the next multiple of pgsz if *(*int32)(unsafe.Pointer(bp + 216 /* n */)) < 512 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+25587 /* "bad 'size' field" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+16968 /* "bad 'size' field" */, uintptr(0))) return 1 } a = crt.Xmalloc(tls, uint64(*(*int32)(unsafe.Pointer(bp + 216 /* n */)))) if a == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+2471 /* "out of memory" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+1929 /* "out of memory" */, uintptr(0))) return 1 } crt.Xmemset(tls, a, 0, uint64(*(*int32)(unsafe.Pointer(bp + 216 /* n */)))) continue } - rc = crt.X__isoc99_sscanf(tls, (zIn + uintptr(i)), ts+25604 /* "| page %d offset..." */, crt.VaList(bp+64, bp+224 /* &j */, bp+228 /* &k */)) + rc = crt.X__isoc99_sscanf(tls, (zIn + uintptr(i)), ts+16985 /* "| page %d offset..." */, crt.VaList(bp+64, bp+224 /* &j */, bp+228 /* &k */)) if rc == 2 { iOffset = *(*int32)(unsafe.Pointer(bp + 228 /* k */)) continue } - rc = crt.X__isoc99_sscanf(tls, (zIn + uintptr(i)), ts+25624, /* "| %d: %x %x %x %..." */ + rc = crt.X__isoc99_sscanf(tls, (zIn + uintptr(i)), ts+17005, /* "| %d: %x %x %x %..." */ crt.VaList(bp+80, bp+224 /* &j */, (bp+232 /* &x */ +uintptr(0)*4), (bp+232 /* &x */ +uintptr(1)*4), (bp+232 /* &x */ +uintptr(2)*4), (bp+232 /* &x */ +uintptr(3)*4), (bp+232 /* &x */ +uintptr(4)*4), (bp+232 /* &x */ +uintptr(5)*4), (bp+232 /* &x */ +uintptr(6)*4), (bp+232 /* &x */ +uintptr(7)*4), (bp+232 /* &x */ +uintptr(8)*4), (bp+232 /* &x */ +uintptr(9)*4), (bp+232 /* &x */ +uintptr(10)*4), (bp+232 /* &x */ +uintptr(11)*4), (bp+232 /* &x */ +uintptr(12)*4), (bp+232 /* &x */ +uintptr(13)*4), (bp+232 /* &x */ +uintptr(14)*4), (bp+232 /* &x */ +uintptr(15)*4))) if rc == 17 { @@ -44895,59 +44163,63 @@ func Sqlitetest1_Init(tls *crt.TLS, interp uintptr) int32 { /* test1.c:7860:5: * }{}))); i++ { tcl.XTcl_CreateCommand(tls, interp, aCmd[i].FzName, aCmd[i].FxProc, uintptr(0), uintptr(0)) } - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd1)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd1[i].FzName, - aObjCmd1[i].FxProc, aObjCmd1[i].FclientData, uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd[i].FzName, + aObjCmd[i].FxProc, aObjCmd[i].FclientData, uintptr(0)) } - tcl.XTcl_LinkVar(tls, interp, ts+25678, /* "sqlite_search_co..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17059, /* "sqlite_search_co..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_search_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25698, /* "sqlite_found_cou..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17079, /* "sqlite_found_cou..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_found_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25717, /* "sqlite_sort_coun..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17098, /* "sqlite_sort_coun..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_sort_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25735, /* "sqlite3_max_blob..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17116, /* "sqlite3_max_blob..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_max_blobsize)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25756, /* "sqlite_like_coun..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17137, /* "sqlite_like_coun..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_like_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25774, /* "sqlite_interrupt..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17155, /* "sqlite_interrupt..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_interrupt_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25797, /* "sqlite_open_file..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17178, /* "sqlite_open_file..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_open_file_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25820, /* "sqlite_current_t..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17201, /* "sqlite_current_t..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_current_time)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25840, /* "sqlite3_xferopt_..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17221, /* "sqlite3_xferopt_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_xferopt_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25862, /* "sqlite3_pager_re..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17243, /* "sqlite3_pager_re..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_pager_readdb_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25889, /* "sqlite3_pager_wr..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17270, /* "sqlite3_pager_wr..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_pager_writedb_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25917, /* "sqlite3_pager_wr..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17298, /* "sqlite3_pager_wr..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_pager_writej_count)), 1) + tcl.XTcl_LinkVar(tls, interp, ts+17325, /* "unaligned_string..." */ + uintptr(unsafe.Pointer(&unaligned_string_counter)), 1) + tcl.XTcl_LinkVar(tls, interp, ts+17350, /* "sqlite_last_need..." */ + uintptr(unsafe.Pointer(&pzNeededCollation)), (4 | 0x80)) { - tcl.XTcl_LinkVar(tls, interp, ts+25944, /* "sqlite_query_pla..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17379, /* "sqlite_query_pla..." */ uintptr(unsafe.Pointer(&query_plan)), (4 | 0x80)) } - tcl.XTcl_LinkVar(tls, interp, ts+25962, /* "sqlite_opentemp_..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17397, /* "sqlite_opentemp_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_opentemp_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+25984, /* "sqlite_static_bi..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17419, /* "sqlite_static_bi..." */ uintptr(unsafe.Pointer(&sqlite_static_bind_value)), 4) - tcl.XTcl_LinkVar(tls, interp, ts+26009, /* "sqlite_static_bi..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17444, /* "sqlite_static_bi..." */ uintptr(unsafe.Pointer(&sqlite_static_bind_nbyte)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+26034, /* "sqlite_temp_dire..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17469, /* "sqlite_temp_dire..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_temp_directory)), 4) - tcl.XTcl_LinkVar(tls, interp, ts+26056, /* "sqlite_data_dire..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17491, /* "sqlite_data_dire..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_data_directory)), 4) - tcl.XTcl_LinkVar(tls, interp, ts+26078, /* "bitmask_size" */ + tcl.XTcl_LinkVar(tls, interp, ts+17513, /* "bitmask_size" */ uintptr(unsafe.Pointer(&bitmask_size)), (1 | 0x80)) - tcl.XTcl_LinkVar(tls, interp, ts+26091, /* "longdouble_size" */ + tcl.XTcl_LinkVar(tls, interp, ts+17526, /* "longdouble_size" */ uintptr(unsafe.Pointer(&longdouble_size)), (1 | 0x80)) - tcl.XTcl_LinkVar(tls, interp, ts+26107, /* "sqlite_sync_coun..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17542, /* "sqlite_sync_coun..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_sync_count)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+26125, /* "sqlite_fullsync_..." */ + tcl.XTcl_LinkVar(tls, interp, ts+17560, /* "sqlite_fullsync_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_fullsync_count)), 1) return 0 } @@ -44957,195 +44229,204 @@ var aCmd = [40]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 26147 /* "db_enter" */, FxProc: 0}, - {FzName: ts + 26156 /* "db_leave" */, FxProc: 0}, - {FzName: ts + 26165 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26185 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26207 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26228 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26248 /* "sqlite3_snprintf..." */, FxProc: 0}, - {FzName: ts + 26269 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26293 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26316 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26339 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26365 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26388 /* "sqlite3_mprintf_..." */, FxProc: 0}, - {FzName: ts + 26411 /* "sqlite3_snprintf..." */, FxProc: 0}, - {FzName: ts + 26432 /* "sqlite3_last_ins..." */, FxProc: 0}, - {FzName: ts + 26458 /* "sqlite3_exec_pri..." */, FxProc: 0}, - {FzName: ts + 26478 /* "sqlite3_exec_hex" */, FxProc: 0}, - {FzName: ts + 26495 /* "sqlite3_exec" */, FxProc: 0}, - {FzName: ts + 26508 /* "sqlite3_exec_nr" */, FxProc: 0}, - {FzName: ts + 26524 /* "sqlite3_get_tabl..." */, FxProc: 0}, - {FzName: ts + 26549 /* "sqlite3_close" */, FxProc: 0}, - {FzName: ts + 26563 /* "sqlite3_close_v2" */, FxProc: 0}, - {FzName: ts + 26580 /* "sqlite3_create_f..." */, FxProc: 0}, - {FzName: ts + 26604 /* "sqlite3_create_a..." */, FxProc: 0}, - {FzName: ts + 26629 /* "sqlite3_drop_mod..." */, FxProc: 0}, - {FzName: ts + 26650 /* "sqlite_register_..." */, FxProc: 0}, - {FzName: ts + 26680 /* "sqlite_abort" */, FxProc: 0}, - {FzName: ts + 26693 /* "sqlite_bind" */, FxProc: 0}, - {FzName: ts + 26705 /* "breakpoint" */, FxProc: 0}, - {FzName: ts + 26716 /* "sqlite3_key" */, FxProc: 0}, - {FzName: ts + 26728 /* "sqlite3_rekey" */, FxProc: 0}, - {FzName: ts + 26742 /* "sqlite_set_magic" */, FxProc: 0}, - {FzName: ts + 26759 /* "sqlite3_interrup..." */, FxProc: 0}, - {FzName: ts + 26777 /* "sqlite_delete_fu..." */, FxProc: 0}, - {FzName: ts + 26800 /* "sqlite_delete_co..." */, FxProc: 0}, - {FzName: ts + 26824 /* "sqlite3_get_auto..." */, FxProc: 0}, - {FzName: ts + 26847 /* "sqlite3_busy_tim..." */, FxProc: 0}, - {FzName: ts + 26868 /* "printf" */, FxProc: 0}, - {FzName: ts + 26875 /* "sqlite3IoTrace" */, FxProc: 0}, - {FzName: ts + 26890 /* "clang_sanitize_a..." */, FxProc: 0}, + {FzName: ts + 17582 /* "db_enter" */, FxProc: 0}, + {FzName: ts + 17591 /* "db_leave" */, FxProc: 0}, + {FzName: ts + 17600 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17620 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17642 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17663 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17683 /* "sqlite3_snprintf..." */, FxProc: 0}, + {FzName: ts + 17704 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17728 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17751 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17774 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17800 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17823 /* "sqlite3_mprintf_..." */, FxProc: 0}, + {FzName: ts + 17846 /* "sqlite3_snprintf..." */, FxProc: 0}, + {FzName: ts + 17867 /* "sqlite3_last_ins..." */, FxProc: 0}, + {FzName: ts + 17893 /* "sqlite3_exec_pri..." */, FxProc: 0}, + {FzName: ts + 17913 /* "sqlite3_exec_hex" */, FxProc: 0}, + {FzName: ts + 17930 /* "sqlite3_exec" */, FxProc: 0}, + {FzName: ts + 17943 /* "sqlite3_exec_nr" */, FxProc: 0}, + {FzName: ts + 17959 /* "sqlite3_get_tabl..." */, FxProc: 0}, + {FzName: ts + 17984 /* "sqlite3_close" */, FxProc: 0}, + {FzName: ts + 17998 /* "sqlite3_close_v2" */, FxProc: 0}, + {FzName: ts + 18015 /* "sqlite3_create_f..." */, FxProc: 0}, + {FzName: ts + 18039 /* "sqlite3_create_a..." */, FxProc: 0}, + {FzName: ts + 18064 /* "sqlite3_drop_mod..." */, FxProc: 0}, + {FzName: ts + 18085 /* "sqlite_register_..." */, FxProc: 0}, + {FzName: ts + 18115 /* "sqlite_abort" */, FxProc: 0}, + {FzName: ts + 18128 /* "sqlite_bind" */, FxProc: 0}, + {FzName: ts + 18140 /* "breakpoint" */, FxProc: 0}, + {FzName: ts + 18151 /* "sqlite3_key" */, FxProc: 0}, + {FzName: ts + 18163 /* "sqlite3_rekey" */, FxProc: 0}, + {FzName: ts + 18177 /* "sqlite_set_magic" */, FxProc: 0}, + {FzName: ts + 18194 /* "sqlite3_interrup..." */, FxProc: 0}, + {FzName: ts + 18212 /* "sqlite_delete_fu..." */, FxProc: 0}, + {FzName: ts + 18235 /* "sqlite_delete_co..." */, FxProc: 0}, + {FzName: ts + 18259 /* "sqlite3_get_auto..." */, FxProc: 0}, + {FzName: ts + 18282 /* "sqlite3_busy_tim..." */, FxProc: 0}, + {FzName: ts + 18303 /* "printf" */, FxProc: 0}, + {FzName: ts + 18310 /* "sqlite3IoTrace" */, FxProc: 0}, + {FzName: ts + 18325 /* "clang_sanitize_a..." */, FxProc: 0}, } /* test1.c:7877:5 */ -var aObjCmd1 = [130]struct { +var aObjCmd = [139]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ - {FzName: ts + 26913 /* "sqlite3_db_confi..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 26931 /* "bad_behavior" */, FxProc: 0, FclientData: 0}, - {FzName: ts + 26944 /* "register_dbstat_..." */, FxProc: 0}, - {FzName: ts + 26965 /* "sqlite3_connecti..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 26992 /* "intarray_addr" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27006 /* "int64array_addr" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27022 /* "doublearray_addr" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27039 /* "textarray_addr" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27054 /* "sqlite3_bind_int" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27071 /* "sqlite3_bind_zer..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27093 /* "sqlite3_bind_zer..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27117 /* "sqlite3_bind_int..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27136 /* "sqlite3_bind_dou..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27156 /* "sqlite3_bind_nul..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27174 /* "sqlite3_bind_tex..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27192 /* "sqlite3_bind_tex..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27212 /* "sqlite3_bind_blo..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27230 /* "sqlite3_bind_par..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27259 /* "sqlite3_bind_par..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27287 /* "sqlite3_bind_par..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27316 /* "sqlite3_clear_bi..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27339 /* "sqlite3_sleep" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27353 /* "sqlite3_errcode" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27369 /* "sqlite3_extended..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27394 /* "sqlite3_errmsg" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27409 /* "sqlite3_errmsg16" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27426 /* "sqlite3_open" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27439 /* "sqlite3_open16" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27454 /* "sqlite3_open_v2" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27470 /* "sqlite3_complete..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27489 /* "sqlite3_normaliz..." */, FxProc: 0, FclientData: uintptr(0)}, - - {FzName: ts + 27507 /* "sqlite3_prepare" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27523 /* "sqlite3_prepare1..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27541 /* "sqlite3_prepare_..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27560 /* "sqlite3_prepare_..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27579 /* "sqlite3_prepare_..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27603 /* "sqlite3_prepare1..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27624 /* "sqlite3_finalize" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27641 /* "sqlite3_stmt_sta..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27661 /* "sqlite3_reset" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27675 /* "sqlite3_expired" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27691 /* "sqlite3_transfer..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27717 /* "sqlite3_changes" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27733 /* "sqlite3_step" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27746 /* "sqlite3_sql" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27758 /* "sqlite3_expanded..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27779 /* "sqlite3_next_stm..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27797 /* "sqlite3_stmt_rea..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27819 /* "sqlite3_stmt_ise..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27842 /* "sqlite3_stmt_bus..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27860 /* "uses_stmt_journa..." */, FxProc: 0, FclientData: uintptr(0)}, - - {FzName: ts + 27878 /* "sqlite3_release_..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27901 /* "sqlite3_db_relea..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27927 /* "sqlite3_db_cache..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27949 /* "sqlite3_system_e..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27970 /* "sqlite3_db_filen..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 27990 /* "sqlite3_db_reado..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28010 /* "sqlite3_soft_hea..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28034 /* "sqlite3_soft_hea..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28060 /* "sqlite3_hard_hea..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28086 /* "sqlite3_thread_c..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28109 /* "sqlite3_pager_re..." */, FxProc: 0, FclientData: uintptr(0)}, - - {FzName: ts + 28133 /* "sqlite3_load_ext..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28156 /* "sqlite3_enable_l..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28186 /* "sqlite3_extended..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28216 /* "sqlite3_limit" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28230 /* "dbconfig_maindbn..." */, FxProc: 0}, - - {FzName: ts + 28258 /* "save_prng_state" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28274 /* "restore_prng_sta..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28293 /* "reset_prng_state" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28310 /* "prng_seed" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28320 /* "database_never_c..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28343 /* "database_may_be_..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28367 /* "optimization_con..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28388 /* "tcl_objproc" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18348 /* "sqlite3_db_confi..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18366 /* "bad_behavior" */, FxProc: 0, FclientData: 0}, + {FzName: ts + 18379 /* "register_dbstat_..." */, FxProc: 0}, + {FzName: ts + 18400 /* "sqlite3_connecti..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18427 /* "intarray_addr" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18441 /* "int64array_addr" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18457 /* "doublearray_addr" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18474 /* "textarray_addr" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18489 /* "sqlite3_bind_int" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18506 /* "sqlite3_bind_zer..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18528 /* "sqlite3_bind_zer..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18552 /* "sqlite3_bind_int..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18571 /* "sqlite3_bind_dou..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18591 /* "sqlite3_bind_nul..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18609 /* "sqlite3_bind_tex..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18627 /* "sqlite3_bind_tex..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18647 /* "sqlite3_bind_blo..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18665 /* "sqlite3_bind_par..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18694 /* "sqlite3_bind_par..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18722 /* "sqlite3_bind_par..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18751 /* "sqlite3_clear_bi..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18774 /* "sqlite3_sleep" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18788 /* "sqlite3_errcode" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18804 /* "sqlite3_extended..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18829 /* "sqlite3_errmsg" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18844 /* "sqlite3_errmsg16" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18861 /* "sqlite3_open" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18874 /* "sqlite3_open16" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18889 /* "sqlite3_open_v2" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18905 /* "sqlite3_complete..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18924 /* "sqlite3_normaliz..." */, FxProc: 0, FclientData: uintptr(0)}, + + {FzName: ts + 18942 /* "sqlite3_prepare" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18958 /* "sqlite3_prepare1..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18976 /* "sqlite3_prepare_..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 18995 /* "sqlite3_prepare_..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19014 /* "sqlite3_prepare_..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19038 /* "sqlite3_prepare1..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19059 /* "sqlite3_finalize" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19076 /* "sqlite3_stmt_sta..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19096 /* "sqlite3_reset" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19110 /* "sqlite3_expired" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19126 /* "sqlite3_transfer..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19152 /* "sqlite3_changes" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19168 /* "sqlite3_step" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19181 /* "sqlite3_sql" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19193 /* "sqlite3_expanded..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19214 /* "sqlite3_next_stm..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19232 /* "sqlite3_stmt_rea..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19254 /* "sqlite3_stmt_ise..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19277 /* "sqlite3_stmt_bus..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19295 /* "uses_stmt_journa..." */, FxProc: 0, FclientData: uintptr(0)}, + + {FzName: ts + 19313 /* "sqlite3_release_..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19336 /* "sqlite3_db_relea..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19362 /* "sqlite3_db_cache..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19384 /* "sqlite3_system_e..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19405 /* "sqlite3_db_filen..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19425 /* "sqlite3_db_reado..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19445 /* "sqlite3_soft_hea..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19469 /* "sqlite3_soft_hea..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19495 /* "sqlite3_hard_hea..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19521 /* "sqlite3_thread_c..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19544 /* "sqlite3_pager_re..." */, FxProc: 0, FclientData: uintptr(0)}, + + {FzName: ts + 19568 /* "sqlite3_load_ext..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19591 /* "sqlite3_enable_l..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19621 /* "sqlite3_extended..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19651 /* "sqlite3_limit" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19665 /* "dbconfig_maindbn..." */, FxProc: 0}, + + {FzName: ts + 19693 /* "save_prng_state" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19709 /* "restore_prng_sta..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19728 /* "reset_prng_state" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19745 /* "prng_seed" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19755 /* "database_never_c..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19778 /* "database_may_be_..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19802 /* "optimization_con..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19823 /* "tcl_objproc" */, FxProc: 0, FclientData: uintptr(0)}, // sqlite3_column_*() API - {FzName: ts + 28400 /* "sqlite3_column_c..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28421 /* "sqlite3_data_cou..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28440 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28460 /* "sqlite3_column_b..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28480 /* "sqlite3_column_d..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28502 /* "sqlite3_column_i..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28523 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 28543 /* "sqlite3_column_n..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 28563 /* "sqlite3_column_i..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 28582 /* "sqlite3_column_b..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 28603 /* "sqlite3_column_d..." */, FxProc: 0, FclientData: 0}, - - {FzName: ts + 28627 /* "sqlite3_create_c..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28655 /* "sqlite3_global_r..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28678 /* "working_64bit_in..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28696 /* "vfs_unlink_test" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28712 /* "vfs_initfail_tes..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28730 /* "vfs_unregister_a..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28749 /* "vfs_reregister_a..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28768 /* "file_control_tes..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28786 /* "file_control_las..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28814 /* "file_control_loc..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28842 /* "file_control_chu..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28870 /* "file_control_siz..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28897 /* "file_control_dat..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28923 /* "file_control_per..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28948 /* "file_control_pow..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 28981 /* "file_control_vfs..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29002 /* "file_control_tem..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29028 /* "sqlite3_vfs_list" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29045 /* "sqlite3_create_f..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19835 /* "sqlite3_column_c..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19856 /* "sqlite3_data_cou..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19875 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19895 /* "sqlite3_column_b..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19915 /* "sqlite3_column_d..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19937 /* "sqlite3_column_i..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 19958 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 19978 /* "sqlite3_column_n..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 19998 /* "sqlite3_column_i..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 20017 /* "sqlite3_column_b..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 20038 /* "sqlite3_column_d..." */, FxProc: 0, FclientData: 0}, + + {FzName: ts + 20062 /* "sqlite3_column_b..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 20085 /* "sqlite3_column_t..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 20107 /* "sqlite3_column_n..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 20129 /* "add_alignment_te..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20159 /* "sqlite3_column_d..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 20185 /* "sqlite3_create_c..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20213 /* "sqlite3_global_r..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20236 /* "working_64bit_in..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20254 /* "vfs_unlink_test" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20270 /* "vfs_initfail_tes..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20288 /* "vfs_unregister_a..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20307 /* "vfs_reregister_a..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20326 /* "file_control_tes..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20344 /* "file_control_las..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20372 /* "file_control_loc..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20400 /* "file_control_chu..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20428 /* "file_control_siz..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20455 /* "file_control_dat..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20481 /* "file_control_per..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20506 /* "file_control_pow..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20539 /* "file_control_vfs..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20560 /* "file_control_tem..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20586 /* "sqlite3_vfs_list" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20603 /* "sqlite3_create_f..." */, FxProc: 0, FclientData: uintptr(0)}, // Functions from os.h - {FzName: ts + 29072 /* "sqlite3_test_err..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29092 /* "tcl_variable_typ..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29110 /* "sqlite3_enable_s..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29138 /* "sqlite3_shared_c..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29166 /* "sqlite3_libversi..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29192 /* "sqlite3_table_co..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29222 /* "sqlite3_blob_reo..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29242 /* "pcache_stats" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29255 /* "sqlite3_unlock_n..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29277 /* "sqlite3_wal_chec..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29300 /* "sqlite3_wal_chec..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29326 /* "sqlite3_wal_auto..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29353 /* "test_sqlite3_log" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29370 /* "print_explain_qu..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29395 /* "sqlite3_test_con..." */, FxProc: 0}, - {FzName: ts + 29416 /* "getrusage" */, FxProc: 0}, - {FzName: ts + 29426 /* "load_static_exte..." */, FxProc: 0}, - {FzName: ts + 29448 /* "sorter_test_fake..." */, FxProc: 0}, - {FzName: ts + 29469 /* "sorter_test_sort..." */, FxProc: 0}, - {FzName: ts + 29494 /* "vfs_current_time..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29517 /* "sqlite3_delete_d..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29541 /* "atomic_batch_wri..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29560 /* "sqlite3_mmap_war..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29578 /* "sqlite3_config_s..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 29603 /* "decode_hexdb" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20630 /* "add_test_collate" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20647 /* "add_test_collate..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20671 /* "add_test_functio..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20689 /* "add_test_utf16bi..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20715 /* "sqlite3_test_err..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20735 /* "tcl_variable_typ..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20753 /* "sqlite3_enable_s..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20781 /* "sqlite3_shared_c..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20809 /* "sqlite3_libversi..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20835 /* "sqlite3_table_co..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20865 /* "sqlite3_blob_reo..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20885 /* "pcache_stats" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20898 /* "sqlite3_unlock_n..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20920 /* "sqlite3_wal_chec..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20943 /* "sqlite3_wal_chec..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20969 /* "sqlite3_wal_auto..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 20996 /* "test_sqlite3_log" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 21013 /* "print_explain_qu..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 21038 /* "sqlite3_test_con..." */, FxProc: 0}, + {FzName: ts + 21059 /* "getrusage" */, FxProc: 0}, + {FzName: ts + 21069 /* "load_static_exte..." */, FxProc: 0}, + {FzName: ts + 21091 /* "sorter_test_fake..." */, FxProc: 0}, + {FzName: ts + 21112 /* "sorter_test_sort..." */, FxProc: 0}, + {FzName: ts + 21137 /* "vfs_current_time..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 21160 /* "sqlite3_delete_d..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 21184 /* "atomic_batch_wri..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 21203 /* "sqlite3_mmap_war..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 21221 /* "sqlite3_config_s..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 21246 /* "decode_hexdb" */, FxProc: 0, FclientData: uintptr(0)}, } /* test1.c:7925:5 */ var bitmask_size int32 = (int32(uint64(unsafe.Sizeof(Bitmask(0))) * uint64(8))) /* test1.c:8143:14 */ var longdouble_size int32 = int32(unsafe.Sizeof(float64(0))) /* test1.c:8144:14 */ -var query_plan uintptr = ts + 29616 /* "*** OBSOLETE VAR..." */ /* test1.c:8219:23 */ +var query_plan uintptr = ts + 21259 /* "*** OBSOLETE VAR..." */ /* test1.c:8219:23 */ // Page size and reserved size used for testing. var test_pagesize int32 = 1024 /* test2.c:31:12 */ @@ -45162,7 +44443,7 @@ func pager_open(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv bp := tls.Alloc(192) defer tls.Free(192) - // var pageSize u32 at bp+88, 4 + // var pageSize u321 at bp+88, 4 // var pPager uintptr at bp+80, 8 @@ -45172,8 +44453,8 @@ func pager_open(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // var zBuf [100]int8 at bp+92, 100 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29642 /* " FILENAME N-PAGE..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21285 /* " FILENAME N-PAGE..." */, 0)) return 1 } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), bp+72 /* &nPage */) != 0 { @@ -45187,9 +44468,9 @@ func pager_open(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv return 1 } sqlite3.Xsqlite3PagerSetCachesize(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pPager */)), *(*int32)(unsafe.Pointer(bp + 72 /* nPage */))) - *(*u32)(unsafe.Pointer(bp + 88 /* pageSize */)) = u32(test_pagesize) + *(*u321)(unsafe.Pointer(bp + 88 /* pageSize */)) = u321(test_pagesize) sqlite3.Xsqlite3PagerSetPagesize(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pPager */)), bp+88 /* &pageSize */, -1) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+92 /* &zBuf[0] */, ts+20002 /* "%p" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 80 /* pPager */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+92 /* &zBuf[0] */, ts+11197 /* "%p" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 80 /* pPager */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+92 /* &zBuf[0] */, 0)) return 0 } @@ -45204,8 +44485,8 @@ func pager_close(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv var pPager uintptr var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45227,8 +44508,8 @@ func pager_rollback(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, a var pPager uintptr var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45250,8 +44531,8 @@ func pager_commit(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, arg var pPager uintptr var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45278,8 +44559,8 @@ func pager_stmt_begin(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, var pPager uintptr var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45301,8 +44582,8 @@ func pager_stmt_rollback(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int var pPager uintptr var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45325,8 +44606,8 @@ func pager_stmt_commit(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 var pPager uintptr var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45349,8 +44630,8 @@ func pager_stats(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv var i int32 var a uintptr if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45359,15 +44640,15 @@ func pager_stats(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // var zBuf [100]int8 at bp+40, 100 tcl.XTcl_AppendElement(tls, interp, zName[i]) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+40 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+32, *(*int32)(unsafe.Pointer(a + uintptr(i)*4)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+40 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+32, *(*int32)(unsafe.Pointer(a + uintptr(i)*4)))) tcl.XTcl_AppendElement(tls, interp, bp+40 /* &zBuf[0] */) } return 0 } var zName = [9]uintptr{ - ts + 29665 /* "ref" */, ts + 29669 /* "page" */, ts + 24478 /* "max" */, ts + 18523 /* "size" */, ts + 16575 /* "state" */, ts + 29674, /* "err" */ - ts + 29678 /* "hit" */, ts + 29682 /* "miss" */, ts + 29687, /* "ovfl" */ + ts + 21308 /* "ref" */, ts + 21312 /* "page" */, ts + 15855 /* "max" */, ts + 9654 /* "size" */, ts + 21317 /* "state" */, ts + 21323, /* "err" */ + ts + 21327 /* "hit" */, ts + 21331 /* "miss" */, ts + 21336, /* "ovfl" */ } /* test2.c:266:17 */ // Usage: pager_pagecount ID @@ -45383,13 +44664,13 @@ func pager_pagecount(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, // var nPage int32 at bp+56, 4 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) sqlite3.Xsqlite3PagerPagecount(tls, pPager, bp+56 /* &nPage */) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+60 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+32, *(*int32)(unsafe.Pointer(bp + 56 /* nPage */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+60 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+32, *(*int32)(unsafe.Pointer(bp + 56 /* nPage */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+60 /* &zBuf[0] */, 0)) return 0 } @@ -45409,8 +44690,8 @@ func page_get(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv ui var rc int32 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29692 /* " ID PGNO\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21341 /* " ID PGNO\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45425,7 +44706,7 @@ func page_get(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv ui tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return 1 } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+88 /* &zBuf[0] */, ts+20002 /* "%p" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 80 /* pPage */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+88 /* &zBuf[0] */, ts+11197 /* "%p" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 80 /* pPage */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+88 /* &zBuf[0] */, 0)) return 0 } @@ -45445,8 +44726,8 @@ func page_lookup(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // var pgno int32 at bp+56, 4 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29692 /* " ID PGNO\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21341 /* " ID PGNO\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45455,7 +44736,7 @@ func page_lookup(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv } pPage = sqlite3.Xsqlite3PagerLookup(tls, pPager, uint32(*(*int32)(unsafe.Pointer(bp + 56 /* pgno */)))) if pPage != 0 { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+60 /* &zBuf[0] */, ts+20002 /* "%p" */, crt.VaList(bp+32, pPage)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+60 /* &zBuf[0] */, ts+11197 /* "%p" */, crt.VaList(bp+32, pPage)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+60 /* &zBuf[0] */, 0)) } return 0 @@ -45470,8 +44751,8 @@ func pager_truncate(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, a // var pgno int32 at bp+32, 4 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29692 /* " ID PGNO\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21341 /* " ID PGNO\"" */, 0)) return 1 } pPager = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45491,8 +44772,8 @@ func page_unref(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv var pPage uintptr if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29702 /* " PAGE\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21351 /* " PAGE\"" */, 0)) return 1 } pPage = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45511,8 +44792,8 @@ func page_read(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u var pPage uintptr if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29702 /* " PAGE\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21351 /* " PAGE\"" */, 0)) return 1 } pPage = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45532,12 +44813,12 @@ func page_number(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv var pPage uintptr if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29702 /* " PAGE\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21351 /* " PAGE\"" */, 0)) return 1 } pPage = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+56 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+32, sqlite3.Xsqlite3PagerPagenumber(tls, pPage))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+56 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+32, sqlite3.Xsqlite3PagerPagenumber(tls, pPage))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+56 /* &zBuf[0] */, 0)) return 0 } @@ -45553,8 +44834,8 @@ func page_write(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv var pData uintptr var rc int32 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29709 /* " PAGE DATA\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21358 /* " PAGE DATA\"" */, 0)) return 1 } pPage = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -45589,8 +44870,8 @@ func fake_big_file(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, ar var zFile uintptr var nFile int32 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29721 /* " N-MEGABYTES FIL..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21370 /* " N-MEGABYTES FIL..." */, 0)) return 1 } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+80 /* &n */) != 0 { @@ -45608,17 +44889,17 @@ func fake_big_file(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, ar rc = sqlite3.Xsqlite3OsOpenMalloc(tls, pVfs, zFile, bp+88, /* &fd */ ((0x00000004 | 0x00000002) | 0x00000100), uintptr(0)) if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+29740 /* "open failed: " */, sqlite3.Xsqlite3ErrName(tls, rc), 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+21389 /* "open failed: " */, sqlite3.Xsqlite3ErrName(tls, rc), 0)) sqlite3.Xsqlite3_free(tls, zFile) return 1 } offset = i64(*(*int32)(unsafe.Pointer(bp + 80 /* n */))) offset = offset * (int64(1024 * 1024)) - rc = sqlite3.Xsqlite3OsWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* fd */)), ts+29754 /* "Hello, World!" */, 14, offset) + rc = sqlite3.Xsqlite3OsWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* fd */)), ts+21403 /* "Hello, World!" */, 14, offset) sqlite3.Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* fd */))) sqlite3.Xsqlite3_free(tls, zFile) if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, ts+29768 /* "write failed: " */, sqlite3.Xsqlite3ErrName(tls, rc), 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, ts+21417 /* "write failed: " */, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return 1 } return 0 @@ -45635,8 +44916,8 @@ func testPendingByte(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29783 /* " PENDING-BYTE\"" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21432 /* " PENDING-BYTE\"" */, uintptr(0))) return 1 } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+40 /* &pbyte */) != 0 { @@ -45661,7 +44942,7 @@ func faultSimCallback(tls *crt.TLS, x int32) int32 { /* test2.c:583:12: */ var isNeg int32 var rc int32 if x == 0 { - crt.Xmemcpy(tls, (faultSimScript + uintptr(faultSimScriptSize)), ts+8293 /* "0" */, uint64(2)) + crt.Xmemcpy(tls, (faultSimScript + uintptr(faultSimScriptSize)), ts+12045 /* "0" */, uint64(2)) } else { // Convert x to text without using any sqlite3 routines if x < 0 { @@ -45694,7 +44975,7 @@ func faultSimCallback(tls *crt.TLS, x int32) int32 { /* test2.c:583:12: */ } rc = tcl.XTcl_Eval(tls, faultSimInterp, faultSimScript) if rc != 0 { - crt.Xfprintf(tls, crt.Xstderr, ts+29798 /* "fault simulator ..." */, crt.VaList(bp, faultSimScript)) + crt.Xfprintf(tls, crt.Xstderr, ts+21447 /* "fault simulator ..." */, crt.VaList(bp, faultSimScript)) rc = 1 } else { rc = crt.Xatoi(tls, tcl.XTcl_GetStringResult(tls, faultSimInterp)) @@ -45716,13 +44997,13 @@ func faultInstallCmd(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, var nScript int32 var rc int32 if (argc != 1) && (argc != 2) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29834 /* " SCRIPT\"" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21483 /* " SCRIPT\"" */, uintptr(0))) } if argc == 2 { zScript = *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)) } else { - zScript = ts + 792 /* "" */ + zScript = ts + 488 /* "" */ } nScript = int32(crt.Xstrlen(tls, zScript)) if faultSimScript != 0 { @@ -45734,7 +45015,7 @@ func faultInstallCmd(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, } else { faultSimScript = crt.Xmalloc(tls, (uint64(nScript + 100))) if faultSimScript == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, ts+2471 /* "out of memory" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, ts+1929 /* "out of memory" */, uintptr(0))) return 1 } crt.Xmemcpy(tls, faultSimScript, zScript, uint64(nScript)) @@ -45763,8 +45044,8 @@ func testBitvecBuiltinTest(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc i var z uintptr if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29843 /* " SIZE PROGRAM\"" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21492 /* " SIZE PROGRAM\"" */, uintptr(0))) } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+48 /* &sz */) != 0 { return 1 @@ -45797,19 +45078,19 @@ func Sqlitetest2_Init(tls *crt.TLS, interp uintptr) int32 { /* test2.c:697:5: */ }{}))); i++ { tcl.XTcl_CreateCommand(tls, interp, aCmd1[i].FzName, aCmd1[i].FxProc, uintptr(0), uintptr(0)) } - tcl.XTcl_LinkVar(tls, interp, ts+29858, /* "sqlite_io_error_..." */ + tcl.XTcl_LinkVar(tls, interp, ts+21507, /* "sqlite_io_error_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_io_error_pending)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+29882, /* "sqlite_io_error_..." */ + tcl.XTcl_LinkVar(tls, interp, ts+21531, /* "sqlite_io_error_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_io_error_persist)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+29906, /* "sqlite_io_error_..." */ + tcl.XTcl_LinkVar(tls, interp, ts+21555, /* "sqlite_io_error_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_io_error_hit)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+29926, /* "sqlite_io_error_..." */ + tcl.XTcl_LinkVar(tls, interp, ts+21575, /* "sqlite_io_error_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_io_error_hardhit)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+29950, /* "sqlite_diskfull_..." */ + tcl.XTcl_LinkVar(tls, interp, ts+21599, /* "sqlite_diskfull_..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_diskfull_pending)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+29974, /* "sqlite_diskfull" */ + tcl.XTcl_LinkVar(tls, interp, ts+21623, /* "sqlite_diskfull" */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3_diskfull)), 1) - tcl.XTcl_LinkVar(tls, interp, ts+29990, /* "sqlite_pending_b..." */ + tcl.XTcl_LinkVar(tls, interp, ts+21639, /* "sqlite_pending_b..." */ uintptr(unsafe.Pointer(&sqlite3.Xsqlite3PendingByte)), (1 | 0x80)) return 0 } @@ -45818,26 +45099,26 @@ var aCmd1 = [20]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 30010 /* "pager_open" */, FxProc: 0}, - {FzName: ts + 30021 /* "pager_close" */, FxProc: 0}, - {FzName: ts + 30033 /* "pager_commit" */, FxProc: 0}, - {FzName: ts + 30046 /* "pager_rollback" */, FxProc: 0}, - {FzName: ts + 30061 /* "pager_stmt_begin" */, FxProc: 0}, - {FzName: ts + 30078 /* "pager_stmt_commi..." */, FxProc: 0}, - {FzName: ts + 30096 /* "pager_stmt_rollb..." */, FxProc: 0}, - {FzName: ts + 30116 /* "pager_stats" */, FxProc: 0}, - {FzName: ts + 30128 /* "pager_pagecount" */, FxProc: 0}, - {FzName: ts + 30144 /* "page_get" */, FxProc: 0}, - {FzName: ts + 30153 /* "page_lookup" */, FxProc: 0}, - {FzName: ts + 30165 /* "page_unref" */, FxProc: 0}, - {FzName: ts + 30176 /* "page_read" */, FxProc: 0}, - {FzName: ts + 30186 /* "page_write" */, FxProc: 0}, - {FzName: ts + 30197 /* "page_number" */, FxProc: 0}, - {FzName: ts + 30209 /* "pager_truncate" */, FxProc: 0}, - {FzName: ts + 30224 /* "fake_big_file" */, FxProc: 0}, - {FzName: ts + 30238 /* "sqlite3BitvecBui..." */, FxProc: 0}, - {FzName: ts + 30263 /* "sqlite3_test_con..." */, FxProc: 0}, - {FzName: ts + 30297 /* "sqlite3_test_con..." */, FxProc: 0}, + {FzName: ts + 21659 /* "pager_open" */, FxProc: 0}, + {FzName: ts + 21670 /* "pager_close" */, FxProc: 0}, + {FzName: ts + 21682 /* "pager_commit" */, FxProc: 0}, + {FzName: ts + 21695 /* "pager_rollback" */, FxProc: 0}, + {FzName: ts + 21710 /* "pager_stmt_begin" */, FxProc: 0}, + {FzName: ts + 21727 /* "pager_stmt_commi..." */, FxProc: 0}, + {FzName: ts + 21745 /* "pager_stmt_rollb..." */, FxProc: 0}, + {FzName: ts + 21765 /* "pager_stats" */, FxProc: 0}, + {FzName: ts + 21777 /* "pager_pagecount" */, FxProc: 0}, + {FzName: ts + 21793 /* "page_get" */, FxProc: 0}, + {FzName: ts + 21802 /* "page_lookup" */, FxProc: 0}, + {FzName: ts + 21814 /* "page_unref" */, FxProc: 0}, + {FzName: ts + 21825 /* "page_read" */, FxProc: 0}, + {FzName: ts + 21835 /* "page_write" */, FxProc: 0}, + {FzName: ts + 21846 /* "page_number" */, FxProc: 0}, + {FzName: ts + 21858 /* "pager_truncate" */, FxProc: 0}, + {FzName: ts + 21873 /* "fake_big_file" */, FxProc: 0}, + {FzName: ts + 21887 /* "sqlite3BitvecBui..." */, FxProc: 0}, + {FzName: ts + 21912 /* "sqlite3_test_con..." */, FxProc: 0}, + {FzName: ts + 21946 /* "sqlite3_test_con..." */, FxProc: 0}, } /* test2.c:707:5 */ // Defer sourcing vdbe.h and btree.h until after the "u8" and @@ -46379,7 +45660,7 @@ type BtLock = BtLock1 /* btreeInt.h:233:23 */ type CellInfo1 = struct { FnKey i64 FpPayload uintptr - FnPayload u32 + FnPayload u321 FnLocal u16 FnSize u16 } @@ -46614,8 +45895,8 @@ func btree_open(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv var n int32 var zFilename uintptr if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+30332 /* " FILENAME NCACHE..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21981 /* " FILENAME NCACHE..." */, 0)) return 1 } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), bp+72 /* &nCache */) != 0 { @@ -46642,7 +45923,7 @@ func btree_open(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv return 1 } sqlite3.Xsqlite3BtreeSetCacheSize(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pBt */)), *(*int32)(unsafe.Pointer(bp + 72 /* nCache */))) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+88 /* &zBuf[0] */, ts+20002 /* "%p" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 80 /* pBt */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+88 /* &zBuf[0] */, ts+11197 /* "%p" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 80 /* pBt */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+88 /* &zBuf[0] */, 0)) return 0 } @@ -46657,8 +45938,8 @@ func btree_close(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv var pBt uintptr var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -46687,8 +45968,8 @@ func btree_begin_transaction(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc var pBt uintptr var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -46714,8 +45995,8 @@ func btree_pager_stats(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 var a uintptr if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -46734,7 +46015,7 @@ func btree_pager_stats(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 // var zBuf [100]int8 at bp+40, 100 tcl.XTcl_AppendElement(tls, interp, zName1[i]) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+40 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+32, *(*int32)(unsafe.Pointer(a + uintptr(i)*4)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+40 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+32, *(*int32)(unsafe.Pointer(a + uintptr(i)*4)))) tcl.XTcl_AppendElement(tls, interp, bp+40 /* &zBuf[0] */) } sqlite3.Xsqlite3BtreeLeave(tls, pBt) @@ -46745,8 +46026,8 @@ func btree_pager_stats(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 } var zName1 = [11]uintptr{ - ts + 29665 /* "ref" */, ts + 29669 /* "page" */, ts + 24478 /* "max" */, ts + 18523 /* "size" */, ts + 16575 /* "state" */, ts + 29674, /* "err" */ - ts + 29678 /* "hit" */, ts + 29682 /* "miss" */, ts + 29687 /* "ovfl" */, ts + 30356 /* "read" */, ts + 30361, /* "write" */ + ts + 21308 /* "ref" */, ts + 21312 /* "page" */, ts + 15855 /* "max" */, ts + 9654 /* "size" */, ts + 21317 /* "state" */, ts + 21323, /* "err" */ + ts + 21327 /* "hit" */, ts + 21331 /* "miss" */, ts + 21336 /* "ovfl" */, ts + 22005 /* "read" */, ts + 22010, /* "write" */ } /* test3.c:179:17 */ // Usage: btree_cursor ID TABLENUM WRITEABLE @@ -46766,8 +46047,8 @@ func btree_cursor(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, arg // var zBuf [30]int8 at bp+80, 30 if argc != 4 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+30367 /* " ID TABLENUM WRI..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22016 /* " ID TABLENUM WRI..." */, 0)) return 1 } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -46795,7 +46076,7 @@ func btree_cursor(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, arg tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return 1 } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+80 /* &zBuf[0] */, ts+20002 /* "%p" */, crt.VaList(bp+48, pCur)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+80 /* &zBuf[0] */, ts+11197 /* "%p" */, crt.VaList(bp+48, pCur)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+80 /* &zBuf[0] */, 0)) return 0 } @@ -46811,8 +46092,8 @@ func btree_close_cursor(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 var rc int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -46847,8 +46128,8 @@ func btree_next(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // var zBuf [100]int8 at bp+72, 100 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -46863,7 +46144,7 @@ func btree_next(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return 1 } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+48, res)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+48, res)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+72 /* &zBuf[0] */, 0)) return 0 } @@ -46882,8 +46163,8 @@ func btree_first(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv // var zBuf [100]int8 at bp+76, 100 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -46894,7 +46175,7 @@ func btree_first(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, sqlite3.Xsqlite3ErrName(tls, rc), 0)) return 1 } - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+76 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+48, *(*int32)(unsafe.Pointer(bp + 72 /* res */)))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+76 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+48, *(*int32)(unsafe.Pointer(bp + 72 /* res */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+76 /* &zBuf[0] */, 0)) return 0 } @@ -46912,15 +46193,15 @@ func btree_eof(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv u // var zBuf [50]int8 at bp+56, 50 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) sqlite3.Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) rc = sqlite3.Xsqlite3BtreeEof(tls, pCur) sqlite3.Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+56 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+32, rc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+56 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+32, rc)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+56 /* &zBuf[0] */, 0)) return 0 } @@ -46933,19 +46214,19 @@ func btree_payload_size(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 defer tls.Free(106) var pCur uintptr - var n u32 + var n u321 // var zBuf [50]int8 at bp+56, 50 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pCur = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) sqlite3.Xsqlite3BtreeEnter(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) n = sqlite3.Xsqlite3BtreePayloadSize(tls, pCur) sqlite3.Xsqlite3BtreeLeave(tls, (*BtCursor)(unsafe.Pointer(pCur)).FpBtree) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+56 /* &zBuf[0] */, ts+24028 /* "%u" */, crt.VaList(bp+32, n)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+56 /* &zBuf[0] */, ts+15405 /* "%u" */, crt.VaList(bp+32, n)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+56 /* &zBuf[0] */, 0)) return 0 } @@ -46966,13 +46247,13 @@ func btree_varint_test(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 bp := tls.Alloc(516) defer tls.Free(516) - // var start u32 at bp+184, 4 + // var start u321 at bp+184, 4 - // var mult u32 at bp+188, 4 + // var mult u321 at bp+188, 4 - // var count u32 at bp+192, 4 + // var count u321 at bp+192, 4 - // var incr u32 at bp+196, 4 + // var incr u321 at bp+196, 4 var in u64 // var out u64 at bp+504, 8 @@ -46984,8 +46265,8 @@ func btree_varint_test(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 // var zBuf [100]uint8 at bp+200, 100 if argc != 5 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+30391 /* " START MULTIPLIE..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22040 /* " START MULTIPLIE..." */, 0)) return 1 } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+184 /* &start */) != 0 { @@ -47000,54 +46281,54 @@ func btree_varint_test(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)), bp+196 /* &incr */) != 0 { return 1 } - in = u64(*(*u32)(unsafe.Pointer(bp + 184 /* start */))) - in = in * (u64(*(*u32)(unsafe.Pointer(bp + 188 /* mult */)))) - for i = 0; i < int32(*(*u32)(unsafe.Pointer(bp + 192 /* count */))); i++ { + in = u64(*(*u321)(unsafe.Pointer(bp + 184 /* start */))) + in = in * (u64(*(*u321)(unsafe.Pointer(bp + 188 /* mult */)))) + for i = 0; i < int32(*(*u321)(unsafe.Pointer(bp + 192 /* count */))); i++ { // var zErr [200]int8 at bp+300, 200 n1 = sqlite3.Xsqlite3PutVarint(tls, bp+200 /* &zBuf[0] */, in) if (n1 > 9) || (n1 < 1) { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+300, /* &zErr[0] */ - ts+30426 /* "putVarint return..." */, crt.VaList(bp+32, n1)) + ts+22075 /* "putVarint return..." */, crt.VaList(bp+32, n1)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+300 /* &zErr[0] */, 0)) return 1 } n2 = int32(sqlite3.Xsqlite3GetVarint(tls, bp+200 /* &zBuf[0] */, bp+504 /* &out */)) if n1 != n2 { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+300, /* &zErr[0] */ - ts+30476 /* "putVarint return..." */, crt.VaList(bp+56, n1, n2)) + ts+22125 /* "putVarint return..." */, crt.VaList(bp+56, n1, n2)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+72, bp+300 /* &zErr[0] */, 0)) return 1 } if in != *(*u64)(unsafe.Pointer(bp + 504 /* out */)) { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+300, /* &zErr[0] */ - ts+30524 /* "Wrote 0x%016llx ..." */, crt.VaList(bp+88, in, *(*u64)(unsafe.Pointer(bp + 504 /* out */)))) + ts+22173 /* "Wrote 0x%016llx ..." */, crt.VaList(bp+88, in, *(*u64)(unsafe.Pointer(bp + 504 /* out */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+104, bp+300 /* &zErr[0] */, 0)) return 1 } if (in & uint64(0xffffffff)) == in { - // var out32 u32 at bp+512, 4 + // var out32 u321 at bp+512, 4 n2 = int32(func() uint8 { if int32(*(*uint8)(unsafe.Pointer(bp + 200 /* zBuf */))) < int32(u8(0x80)) { return uint8(func() int32 { - (*(*u32)(unsafe.Pointer(bp + 512 /* out32 */))) = u32(*(*uint8)(unsafe.Pointer(bp + 200 /* zBuf */))) + (*(*u321)(unsafe.Pointer(bp + 512 /* out32 */))) = u321(*(*uint8)(unsafe.Pointer(bp + 200 /* zBuf */))) return 1 }()) } return sqlite3.Xsqlite3GetVarint32(tls, bp+200 /* &zBuf[0] */, bp+512 /* &out32 */) }()) - *(*u64)(unsafe.Pointer(bp + 504 /* out */)) = u64(*(*u32)(unsafe.Pointer(bp + 512 /* out32 */))) + *(*u64)(unsafe.Pointer(bp + 504 /* out */)) = u64(*(*u321)(unsafe.Pointer(bp + 512 /* out32 */))) if n1 != n2 { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+300, /* &zErr[0] */ - ts+30563, /* "putVarint return..." */ + ts+22212, /* "putVarint return..." */ crt.VaList(bp+120, n1, n2)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+136, bp+300 /* &zErr[0] */, 0)) return 1 } if in != *(*u64)(unsafe.Pointer(bp + 504 /* out */)) { sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([200]int8{})), bp+300, /* &zErr[0] */ - ts+30613, /* "Wrote 0x%016llx ..." */ + ts+22262, /* "Wrote 0x%016llx ..." */ crt.VaList(bp+152, in, *(*u64)(unsafe.Pointer(bp + 504 /* out */)))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+168, bp+300 /* &zErr[0] */, 0)) return 1 @@ -47060,7 +46341,7 @@ func btree_varint_test(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 for j = 0; j < 19; j++ { sqlite3.Xsqlite3GetVarint(tls, bp+200 /* &zBuf[0] */, bp+504 /* &out */) } - in = in + (u64(*(*u32)(unsafe.Pointer(bp + 196 /* incr */)))) + in = in + (u64(*(*u321)(unsafe.Pointer(bp + 196 /* incr */)))) } return 0 } @@ -47085,13 +46366,13 @@ func btree_from_db(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, ar var iDb int32 = 0 if (argc != 2) && (argc != 3) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+30669 /* " DB-HANDLE ?N?\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22318 /* " DB-HANDLE ?N?\"" */, 0)) return 1 } if 1 != tcl.XTcl_GetCommandInfo(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), bp+72 /* &info */) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+30685 /* "No such db-handl..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+18666 /* "\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22334 /* "No such db-handl..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+9801 /* "\"" */, 0)) return 1 } if argc == 3 { @@ -47101,7 +46382,7 @@ func btree_from_db(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, ar db = *(*uintptr)(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 72 /* &info */)).FobjClientData)) pBt = (*Db)(unsafe.Pointer((*sqlite31)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FpBt - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+136 /* &zBuf[0] */, ts+20002 /* "%p" */, crt.VaList(bp+64, pBt)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+136 /* &zBuf[0] */, ts+11197 /* "%p" */, crt.VaList(bp+64, pBt)) tcl.XTcl_SetResult(tls, interp, bp+136 /* &zBuf[0] */, uintptr(1)) return 0 } @@ -47118,8 +46399,8 @@ func btree_ismemdb(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, ar var pFile uintptr if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+29660 /* " ID\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+21303 /* " ID\"" */, 0)) return 1 } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47146,7 +46427,7 @@ func btree_set_cache_size(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc in if argc != 3 { tcl.XTcl_AppendResult(tls, - interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), ts+30706 /* " BT NCACHE\"" */, 0)) + interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), ts+22355 /* " BT NCACHE\"" */, 0)) return 1 } pBt = sqlite3TestTextToPtr(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47175,7 +46456,7 @@ func btree_insert(tls *crt.TLS, clientData ClientData, interp uintptr, objc int3 // var x BtreePayload at bp+16, 48 if (objc != 4) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+30718 /* "?-intkey? CSR KE..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22367 /* "?-intkey? CSR KE..." */) return 1 } @@ -47217,7 +46498,7 @@ func Sqlitetest3_Init(tls *crt.TLS, interp uintptr) int32 { /* test3.c:661:5: */ tcl.XTcl_CreateCommand(tls, interp, aCmd2[i].FzName, aCmd2[i].FxProc, uintptr(0), uintptr(0)) } - tcl.XTcl_CreateObjCommand(tls, interp, ts+30742 /* "btree_insert" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+22391 /* "btree_insert" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{btree_insert})), uintptr(0), uintptr(0)) @@ -47228,20 +46509,20 @@ var aCmd2 = [14]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 30755 /* "btree_open" */, FxProc: 0}, - {FzName: ts + 30766 /* "btree_close" */, FxProc: 0}, - {FzName: ts + 30778 /* "btree_begin_tran..." */, FxProc: 0}, - {FzName: ts + 30802 /* "btree_pager_stat..." */, FxProc: 0}, - {FzName: ts + 30820 /* "btree_cursor" */, FxProc: 0}, - {FzName: ts + 30833 /* "btree_close_curs..." */, FxProc: 0}, - {FzName: ts + 30852 /* "btree_next" */, FxProc: 0}, - {FzName: ts + 30863 /* "btree_eof" */, FxProc: 0}, - {FzName: ts + 30873 /* "btree_payload_si..." */, FxProc: 0}, - {FzName: ts + 30892 /* "btree_first" */, FxProc: 0}, - {FzName: ts + 30904 /* "btree_varint_tes..." */, FxProc: 0}, - {FzName: ts + 30922 /* "btree_from_db" */, FxProc: 0}, - {FzName: ts + 30936 /* "btree_ismemdb" */, FxProc: 0}, - {FzName: ts + 30950 /* "btree_set_cache_..." */, FxProc: 0}, + {FzName: ts + 22404 /* "btree_open" */, FxProc: 0}, + {FzName: ts + 22415 /* "btree_close" */, FxProc: 0}, + {FzName: ts + 22427 /* "btree_begin_tran..." */, FxProc: 0}, + {FzName: ts + 22451 /* "btree_pager_stat..." */, FxProc: 0}, + {FzName: ts + 22469 /* "btree_cursor" */, FxProc: 0}, + {FzName: ts + 22482 /* "btree_close_curs..." */, FxProc: 0}, + {FzName: ts + 22501 /* "btree_next" */, FxProc: 0}, + {FzName: ts + 22512 /* "btree_eof" */, FxProc: 0}, + {FzName: ts + 22522 /* "btree_payload_si..." */, FxProc: 0}, + {FzName: ts + 22541 /* "btree_first" */, FxProc: 0}, + {FzName: ts + 22553 /* "btree_varint_tes..." */, FxProc: 0}, + {FzName: ts + 22571 /* "btree_from_db" */, FxProc: 0}, + {FzName: ts + 22585 /* "btree_ismemdb" */, FxProc: 0}, + {FzName: ts + 22599 /* "btree_set_cache_..." */, FxProc: 0}, } /* test3.c:665:5 */ // Basic access functions. @@ -47251,7 +46532,7 @@ type cpu_set_t = struct{ F__bits [16]uint64 } /* cpu-set.h:42:3 */ // Each thread is controlled by an instance of the following // structure. -type Thread1 = struct { +type Thread = struct { FzFilename uintptr FxOp uintptr FzArg uintptr @@ -47266,11 +46547,7 @@ type Thread1 = struct { Fargc int32 Fargv [100]uintptr Fcolv [100]uintptr -} - -// Each thread is controlled by an instance of the following -// structure. -type Thread = Thread1 /* test4.c:33:23 */ +} /* test4.c:33:23 */ // There can be as many as 26 threads running at once. Each is named // by a capital letter: A, B, C, ..., Y, Z. @@ -47329,7 +46606,7 @@ func parse_thread_id(tls *crt.TLS, interp uintptr, zArg uintptr) int32 { /* test defer tls.Free(16) if (((zArg == uintptr(0)) || (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(0)))) == 0)) || (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(1)))) != 0)) || !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zArg + uintptr(0))))))*2))) & int32(uint16(256))) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+30971 /* "thread ID must b..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+22620 /* "thread ID must b..." */, 0)) return -1 } return (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(0)))) - 'A') @@ -47349,8 +46626,8 @@ func tcl_thread_create(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 var rc int32 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31010 /* " ID FILENAME" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22659 /* " ID FILENAME" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47358,19 +46635,19 @@ func tcl_thread_create(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 return 1 } if threadset[i].Fbusy != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31023 /* "thread " */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+31031 /* " is already runn..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22672 /* "thread " */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+22680 /* " is already runn..." */, 0)) return 1 } threadset[i].Fbusy = 1 sqlite3.Xsqlite3_free(tls, threadset[i].FzFilename) - threadset[i].FzFilename = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) + threadset[i].FzFilename = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) threadset[i].Fopnum = 1 threadset[i].Fcompleted = 0 rc = crt2.Xpthread_create(tls, bp+88 /* &x */, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr) uintptr }{test_thread_main})), (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+72, ts+31051 /* "failed to create..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+72, ts+22700 /* "failed to create..." */, 0)) sqlite3.Xsqlite3_free(tls, threadset[i].FzFilename) threadset[i].Fbusy = 0 return 1 @@ -47396,8 +46673,8 @@ func tcl_thread_wait(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, var i int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31079 /* " ID" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47405,7 +46682,7 @@ func tcl_thread_wait(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47436,8 +46713,8 @@ func tcl_thread_halt(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, var i int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31079 /* " ID" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) return 1 } if (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)) + uintptr(0)))) == '*') && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)) + uintptr(1)))) == 0) { @@ -47452,7 +46729,7 @@ func tcl_thread_halt(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_stop_thread(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47472,8 +46749,8 @@ func tcl_thread_argc(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, // var zBuf [100]int8 at bp+72, 100 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31079 /* " ID" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47481,11 +46758,11 @@ func tcl_thread_argc(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+1647 /* "%d" */, crt.VaList(bp+48, threadset[i].Fargc)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+48, threadset[i].Fargc)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+72 /* &zBuf[0] */, 0)) return 0 } @@ -47502,8 +46779,8 @@ func tcl_thread_argv(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, // var n int32 at bp+80, 4 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31098 /* " ID N" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22747 /* " ID N" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47511,7 +46788,7 @@ func tcl_thread_argv(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), bp+80 /* &n */) != 0 { @@ -47519,7 +46796,7 @@ func tcl_thread_argv(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) if (*(*int32)(unsafe.Pointer(bp + 80 /* n */)) < 0) || (*(*int32)(unsafe.Pointer(bp + 80 /* n */)) >= threadset[i].Fargc) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+31104 /* "column number ou..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+22753 /* "column number ou..." */, 0)) return 1 } tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680 + 80 /* &.argv */) + uintptr(*(*int32)(unsafe.Pointer(bp + 80 /* n */)))*8)), 0)) @@ -47538,8 +46815,8 @@ func tcl_thread_colname(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 // var n int32 at bp+80, 4 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31098 /* " ID N" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22747 /* " ID N" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47547,7 +46824,7 @@ func tcl_thread_colname(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), bp+80 /* &n */) != 0 { @@ -47555,7 +46832,7 @@ func tcl_thread_colname(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) if (*(*int32)(unsafe.Pointer(bp + 80 /* n */)) < 0) || (*(*int32)(unsafe.Pointer(bp + 80 /* n */)) >= threadset[i].Fargc) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+31104 /* "column number ou..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+22753 /* "column number ou..." */, 0)) return 1 } tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680 + 880 /* &.colv */) + uintptr(*(*int32)(unsafe.Pointer(bp + 80 /* n */)))*8)), 0)) @@ -47574,8 +46851,8 @@ func tcl_thread_result(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 var zName uintptr if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31079 /* " ID" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47583,7 +46860,7 @@ func tcl_thread_result(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47603,8 +46880,8 @@ func tcl_thread_error(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, var i int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31079 /* " ID" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47612,7 +46889,7 @@ func tcl_thread_error(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47623,7 +46900,7 @@ func tcl_thread_error(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, // This procedure runs in the thread to compile an SQL statement. func do_compile(tls *crt.TLS, p uintptr) { /* test4.c:419:13: */ if (*Thread)(unsafe.Pointer(p)).Fdb == uintptr(0) { - (*Thread)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+31131 /* "no database is o..." */) + (*Thread)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+22780 /* "no database is o..." */) (*Thread)(unsafe.Pointer(p)).Frc = 1 return } @@ -47643,8 +46920,8 @@ func tcl_thread_compile(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 var i int32 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31151 /* " ID SQL" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22800 /* " ID SQL" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47652,13 +46929,13 @@ func tcl_thread_compile(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) threadset[i].FxOp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{do_compile})) sqlite3.Xsqlite3_free(tls, threadset[i].FzArg) - threadset[i].FzArg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) + threadset[i].FzArg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) threadset[i].Fopnum++ return 0 } @@ -47667,7 +46944,7 @@ func tcl_thread_compile(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int3 func do_step(tls *crt.TLS, p uintptr) { /* test4.c:466:13: */ var i int32 if (*Thread)(unsafe.Pointer(p)).FpStmt == uintptr(0) { - (*Thread)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+31159 /* "no virtual machi..." */) + (*Thread)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+22808 /* "no virtual machi..." */) (*Thread)(unsafe.Pointer(p)).Frc = 1 return } @@ -47692,8 +46969,8 @@ func tcl_thread_step(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, var i int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31188 /* " IDL" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22837 /* " IDL" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47701,7 +46978,7 @@ func tcl_thread_step(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47713,7 +46990,7 @@ func tcl_thread_step(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, // This procedure runs in the thread to finalize a virtual machine. func do_finalize(tls *crt.TLS, p uintptr) { /* test4.c:517:13: */ if (*Thread)(unsafe.Pointer(p)).FpStmt == uintptr(0) { - (*Thread)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+31159 /* "no virtual machi..." */) + (*Thread)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+22808 /* "no virtual machi..." */) (*Thread)(unsafe.Pointer(p)).Frc = 1 return } @@ -47730,8 +47007,8 @@ func tcl_thread_finalize(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int var i int32 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31188 /* " IDL" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22837 /* " IDL" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47739,7 +47016,7 @@ func tcl_thread_finalize(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47761,8 +47038,8 @@ func tcl_thread_swap(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, var j int32 var temp uintptr if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31193 /* " ID1 ID2" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22842 /* " ID1 ID2" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47770,7 +47047,7 @@ func tcl_thread_swap(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47779,7 +47056,7 @@ func tcl_thread_swap(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, return 1 } if !(threadset[j].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(j)*1680)) @@ -47802,8 +47079,8 @@ func tcl_thread_db_get(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 // var zBuf [100]int8 at bp+64, 100 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31079 /* " ID" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47811,7 +47088,7 @@ func tcl_thread_db_get(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47829,8 +47106,8 @@ func tcl_thread_db_put(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 var i int32 if argc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31202 /* " ID DB" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22851 /* " ID DB" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47838,7 +47115,7 @@ func tcl_thread_db_put(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32 return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47859,8 +47136,8 @@ func tcl_thread_stmt_get(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int // var zBuf [100]int8 at bp+64, 100 if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+31079 /* " ID" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) return 1 } i = parse_thread_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) @@ -47868,7 +47145,7 @@ func tcl_thread_stmt_get(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int return 1 } if !(threadset[i].Fbusy != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31083 /* "no such thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) return 1 } test_thread_wait(tls, (uintptr(unsafe.Pointer(&threadset)) + uintptr(i)*1680)) @@ -47895,21 +47172,21 @@ var aCmd3 = [15]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 31209 /* "thread_create" */, FxProc: 0}, - {FzName: ts + 31223 /* "thread_wait" */, FxProc: 0}, - {FzName: ts + 31235 /* "thread_halt" */, FxProc: 0}, - {FzName: ts + 31247 /* "thread_argc" */, FxProc: 0}, - {FzName: ts + 31259 /* "thread_argv" */, FxProc: 0}, - {FzName: ts + 31271 /* "thread_colname" */, FxProc: 0}, - {FzName: ts + 31286 /* "thread_result" */, FxProc: 0}, - {FzName: ts + 31300 /* "thread_error" */, FxProc: 0}, - {FzName: ts + 31313 /* "thread_compile" */, FxProc: 0}, - {FzName: ts + 31328 /* "thread_step" */, FxProc: 0}, - {FzName: ts + 31340 /* "thread_finalize" */, FxProc: 0}, - {FzName: ts + 31356 /* "thread_swap" */, FxProc: 0}, - {FzName: ts + 31368 /* "thread_db_get" */, FxProc: 0}, - {FzName: ts + 31382 /* "thread_db_put" */, FxProc: 0}, - {FzName: ts + 31396 /* "thread_stmt_get" */, FxProc: 0}, + {FzName: ts + 22858 /* "thread_create" */, FxProc: 0}, + {FzName: ts + 22872 /* "thread_wait" */, FxProc: 0}, + {FzName: ts + 22884 /* "thread_halt" */, FxProc: 0}, + {FzName: ts + 22896 /* "thread_argc" */, FxProc: 0}, + {FzName: ts + 22908 /* "thread_argv" */, FxProc: 0}, + {FzName: ts + 22920 /* "thread_colname" */, FxProc: 0}, + {FzName: ts + 22935 /* "thread_result" */, FxProc: 0}, + {FzName: ts + 22949 /* "thread_error" */, FxProc: 0}, + {FzName: ts + 22962 /* "thread_compile" */, FxProc: 0}, + {FzName: ts + 22977 /* "thread_step" */, FxProc: 0}, + {FzName: ts + 22989 /* "thread_finalize" */, FxProc: 0}, + {FzName: ts + 23005 /* "thread_swap" */, FxProc: 0}, + {FzName: ts + 23017 /* "thread_db_get" */, FxProc: 0}, + {FzName: ts + 23031 /* "thread_db_put" */, FxProc: 0}, + {FzName: ts + 23045 /* "thread_stmt_get" */, FxProc: 0}, } /* test4.c:700:5 */ // end block for C++ @@ -47996,8 +47273,8 @@ func test_value_overhead(tls *crt.TLS, clientData uintptr, interp uintptr, objc // var val Mem at bp+40, 56 if objc != 3 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+31412 /* " <repeat-count> ..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), ts+23061 /* " <repeat-count> ..." */, 0)) return 1 } @@ -48009,7 +47286,7 @@ func test_value_overhead(tls *crt.TLS, clientData uintptr, interp uintptr, objc } (*Mem)(unsafe.Pointer(bp + 40 /* &val */)).Fflags = (u16((0x0002 | 0x0200) | 0x0800)) - (*Mem)(unsafe.Pointer(bp + 40 /* &val */)).Fz = ts + 31439 /* "hello world" */ + (*Mem)(unsafe.Pointer(bp + 40 /* &val */)).Fz = ts + 23088 /* "hello world" */ (*Mem)(unsafe.Pointer(bp + 40 /* &val */)).Fenc = u8(1) for i = 0; i < *(*int32)(unsafe.Pointer(bp + 32 /* repeat_count */)); i++ { @@ -48026,10 +47303,10 @@ func name_to_enc(tls *crt.TLS, interp uintptr, pObj uintptr) u8 { /* test5.c:94: defer tls.Free(104) *(*[5]EncName)(unsafe.Pointer(bp + 24 /* encnames */)) = [5]EncName{ - {FzName: ts + 31451 /* "UTF8" */, Fenc: u8(1)}, - {FzName: ts + 31456 /* "UTF16LE" */, Fenc: u8(2)}, - {FzName: ts + 31464 /* "UTF16BE" */, Fenc: u8(3)}, - {FzName: ts + 31472 /* "UTF16" */, Fenc: u8(4)}, + {FzName: ts + 23100 /* "UTF8" */, Fenc: u8(1)}, + {FzName: ts + 23105 /* "UTF16LE" */, Fenc: u8(2)}, + {FzName: ts + 23113 /* "UTF16BE" */, Fenc: u8(3)}, + {FzName: ts + 23121 /* "UTF16" */, Fenc: u8(4)}, {FzName: uintptr(0), Fenc: u8(0)}, } var pEnc uintptr @@ -48040,7 +47317,7 @@ func name_to_enc(tls *crt.TLS, interp uintptr, pObj uintptr) u8 { /* test5.c:94: } } if !(int32((*EncName)(unsafe.Pointer(pEnc)).Fenc) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+31478 /* "No such encoding..." */, z, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+23127 /* "No such encoding..." */, z, 0)) } if int32((*EncName)(unsafe.Pointer(pEnc)).Fenc) == 4 { return u8(2) @@ -48069,9 +47346,9 @@ func test_translate(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 var xDel uintptr = uintptr(0) if (objc != 4) && (objc != 5) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)), uintptr(0)), - ts+31497 /* " <string/blob> <..." */, 0)) + ts+23146 /* " <string/blob> <..." */, 0)) return 1 } if objc == 5 { @@ -48092,7 +47369,7 @@ func test_translate(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 if int32(enc_from) == 1 { z = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) if objc == 5 { - z = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+32, z)) + z = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+32, z)) } sqlite3.Xsqlite3ValueSetStr(tls, pVal, -1, z, enc_from, xDel) } else { @@ -48119,6 +47396,7 @@ func test_translate(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 return 0 } func test_translate_selftest(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test5.c:189:26: */ + sqlite3.Xsqlite3UtfSelfTest(tls) return 0 } @@ -48138,10 +47416,10 @@ var aCmd4 = [4]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 31532 /* "binarize" */, FxProc: 0}, - {FzName: ts + 31541 /* "test_value_overh..." */, FxProc: 0}, - {FzName: ts + 31561 /* "test_translate" */, FxProc: 0}, - {FzName: ts + 31576 /* "translate_selfte..." */, FxProc: 0}, + {FzName: ts + 23181 /* "binarize" */, FxProc: 0}, + {FzName: ts + 23190 /* "test_value_overh..." */, FxProc: 0}, + {FzName: ts + 23210 /* "test_translate" */, FxProc: 0}, + {FzName: ts + 23225 /* "translate_selfte..." */, FxProc: 0}, } /* test5.c:209:5 */ // end block for C++ @@ -48386,7 +47664,7 @@ func writeListAppend(tls *crt.TLS, pFile uintptr, iOffset sqlite3_int64, zBuf ui pNew = crash_malloc(tls, (int32(uint64(unsafe.Sizeof(WriteBuffer{})) + uint64(nBuf)))) if pNew == uintptr(0) { - crt.Xfprintf(tls, crt.Xstderr, ts+31595 /* "out of memory in..." */, 0) + crt.Xfprintf(tls, crt.Xstderr, ts+23244 /* "out of memory in..." */, 0) } crt.Xmemset(tls, pNew, 0, (uint64(unsafe.Sizeof(WriteBuffer{})) + uint64(nBuf))) (*WriteBuffer)(unsafe.Pointer(pNew)).FiOffset = iOffset @@ -48679,19 +47957,19 @@ func processDevSymArgs(tls *crt.TLS, interp uintptr, objc int32, objv uintptr, p defer tls.Free(316) *(*[14]DeviceFlag)(unsafe.Pointer(bp + 88 /* aFlag */)) = [14]DeviceFlag{ - {FzName: ts + 31633 /* "atomic" */, FiValue: 0x00000001}, - {FzName: ts + 31640 /* "atomic512" */, FiValue: 0x00000002}, - {FzName: ts + 31650 /* "atomic1k" */, FiValue: 0x00000004}, - {FzName: ts + 31659 /* "atomic2k" */, FiValue: 0x00000008}, - {FzName: ts + 31668 /* "atomic4k" */, FiValue: 0x00000010}, - {FzName: ts + 31677 /* "atomic8k" */, FiValue: 0x00000020}, - {FzName: ts + 31686 /* "atomic16k" */, FiValue: 0x00000040}, - {FzName: ts + 31696 /* "atomic32k" */, FiValue: 0x00000080}, - {FzName: ts + 31706 /* "atomic64k" */, FiValue: 0x00000100}, - {FzName: ts + 31716 /* "sequential" */, FiValue: 0x00000400}, - {FzName: ts + 31727 /* "safe_append" */, FiValue: 0x00000200}, - {FzName: ts + 31739 /* "powersafe_overwr..." */, FiValue: 0x00001000}, - {FzName: ts + 31759 /* "batch-atomic" */, FiValue: 0x00004000}, + {FzName: ts + 23282 /* "atomic" */, FiValue: 0x00000001}, + {FzName: ts + 23289 /* "atomic512" */, FiValue: 0x00000002}, + {FzName: ts + 23299 /* "atomic1k" */, FiValue: 0x00000004}, + {FzName: ts + 23308 /* "atomic2k" */, FiValue: 0x00000008}, + {FzName: ts + 23317 /* "atomic4k" */, FiValue: 0x00000010}, + {FzName: ts + 23326 /* "atomic8k" */, FiValue: 0x00000020}, + {FzName: ts + 23335 /* "atomic16k" */, FiValue: 0x00000040}, + {FzName: ts + 23345 /* "atomic32k" */, FiValue: 0x00000080}, + {FzName: ts + 23355 /* "atomic64k" */, FiValue: 0x00000100}, + {FzName: ts + 23365 /* "sequential" */, FiValue: 0x00000400}, + {FzName: ts + 23376 /* "safe_append" */, FiValue: 0x00000200}, + {FzName: ts + 23388 /* "powersafe_overwr..." */, FiValue: 0x00001000}, + {FzName: ts + 23408 /* "batch-atomic" */, FiValue: 0x00004000}, {FzName: uintptr(0), FiValue: 0}, } var i int32 @@ -48705,15 +47983,15 @@ func processDevSymArgs(tls *crt.TLS, interp uintptr, objc int32, objv uintptr, p var zOpt uintptr = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp+64 /* &nOpt */) - if (((*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)) > 11) || (*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)) < 2)) || (crt.Xstrncmp(tls, ts+31772 /* "-sectorsize" */, zOpt, uint64(*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)))) != 0)) && - (((*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)) > 16) || (*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)) < 2)) || (crt.Xstrncmp(tls, ts+31784 /* "-characteristics" */, zOpt, uint64(*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)))) != 0)) { + if (((*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)) > 11) || (*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)) < 2)) || (crt.Xstrncmp(tls, ts+23421 /* "-sectorsize" */, zOpt, uint64(*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)))) != 0)) && + (((*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)) > 16) || (*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)) < 2)) || (crt.Xstrncmp(tls, ts+23433 /* "-characteristics" */, zOpt, uint64(*(*int32)(unsafe.Pointer(bp + 64 /* nOpt */)))) != 0)) { tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp, ts+31801 /* "Bad option: \"" */, zOpt, - ts+31815 /* "\" - must be \"-ch..." */, 0)) + crt.VaList(bp, ts+23450 /* "Bad option: \"" */, zOpt, + ts+23464 /* "\" - must be \"-ch..." */, 0)) return 1 } if i == (objc - 1) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31863 /* "Option requires ..." */, zOpt, ts+18666 /* "\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+23512 /* "Option requires ..." */, zOpt, ts+9801 /* "\"" */, 0)) return 1 } @@ -48740,7 +48018,7 @@ func processDevSymArgs(tls *crt.TLS, interp uintptr, objc int32, objv uintptr, p tcl.XTcl_UtfToLower(tls, tcl.XTcl_GetString(tls, pFlag)) rc = tcl.XTcl_GetIndexFromObjStruct(tls, - interp, pFlag, bp+88 /* &aFlag[0] */, int32(unsafe.Sizeof(DeviceFlag{})), ts+31894 /* "no such flag" */, 0, bp+312 /* &iChoice */) + interp, pFlag, bp+88 /* &aFlag[0] */, int32(unsafe.Sizeof(DeviceFlag{})), ts+23543 /* "no such flag" */, 0, bp+312 /* &iChoice */) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pFlag if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { @@ -48779,7 +48057,7 @@ type DeviceFlag = struct { // (writeListSync() calls exit(-1)). func crashNowCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:816:26: */ if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } writeListSync(tls, uintptr(0), 1) @@ -48800,7 +48078,7 @@ func crashEnableCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 *(*int32)(unsafe.Pointer(bp + 4 /* isDefault */)) = 0 if (objc != 2) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31907 /* "ENABLE ?DEFAULT?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23556 /* "ENABLE ?DEFAULT?" */) return 1 } @@ -48833,7 +48111,7 @@ var crashVfs = sqlite3_vfs{FiVersion: 2, FszOsFile: // iVersion 0, FmxPathname:// szOsFile 0, FpNext:// mxPathname uintptr(0), FzName:// pNext -ts + 31924, /* "crash" */ FpAppData:// zName +ts + 23573, /* "crash" */ FpAppData:// zName uintptr(0), FxOpen:// pAppData 0, FxDelete:// xOpen @@ -48886,7 +48164,7 @@ func crashParamsObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc in if !(objc < 3) { goto __1 } - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31930 /* "?OPTIONS? DELAY ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23579 /* "?OPTIONS? DELAY ..." */) goto error __1: ; @@ -48895,7 +48173,7 @@ __1: if !(uint64(*(*int32)(unsafe.Pointer(bp + 32 /* nCrashFile */))) >= uint64(unsafe.Sizeof([500]int8{}))) { goto __2 } - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+31956 /* "Filename is too ..." */, zCrashFile, ts+18666 /* "\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+23605 /* "Filename is too ..." */, zCrashFile, ts+9801 /* "\"" */, 0)) goto error __2: ; @@ -48958,7 +48236,7 @@ func writeCrashObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int *(*int32)(unsafe.Pointer(bp /* nWrite */)) = 0 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31980 /* "NWRITE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23629 /* "NWRITE" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &nWrite */) != 0 { @@ -48973,7 +48251,7 @@ func writeCrashObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int func dsUnregisterObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:1009:26: */ if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -48989,14 +48267,14 @@ func jtObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv var zParent uintptr = uintptr(0) if (objc != 2) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31987 /* "?-default? PAREN..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23636 /* "?-default? PAREN..." */) return 1 } zParent = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) if objc == 3 { - if crt.Xstrcmp(tls, zParent, ts+32009 /* "-default" */) != 0 { + if crt.Xstrcmp(tls, zParent, ts+23658 /* "-default" */) != 0 { tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp, ts+18565 /* "bad option \"" */, zParent, ts+32018 /* "\": must be -defa..." */, 0)) + crt.VaList(bp, ts+9696 /* "bad option \"" */, zParent, ts+23667 /* "\": must be -defa..." */, 0)) return 1 } zParent = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) @@ -49006,7 +48284,7 @@ func jtObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv zParent = uintptr(0) } if jt_register(tls, zParent, (crt.Bool32(objc == 3))) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+32038 /* "Error in jt_regi..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+23687 /* "Error in jt_regi..." */, 0)) return 1 } @@ -49017,7 +48295,7 @@ func jtObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv func jtUnregisterObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test6.c:1067:26: */ if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -49027,44 +48305,661 @@ func jtUnregisterObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc i // This procedure registers the TCL procedures defined in this file. func Sqlitetest6_Init(tls *crt.TLS, interp uintptr) int32 { /* test6.c:1089:5: */ - tcl.XTcl_CreateObjCommand(tls, interp, ts+32059 /* "sqlite3_crash_en..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+23708 /* "sqlite3_crash_en..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{crashEnableCmd})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+32080 /* "sqlite3_crashpar..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+23729 /* "sqlite3_crashpar..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{crashParamsObjCmd})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+32100 /* "sqlite3_crash_no..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+23749 /* "sqlite3_crash_no..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{crashNowCmd})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+32118 /* "sqlite3_simulate..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+23767 /* "sqlite3_simulate..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{devSymObjCmd})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+32142 /* "sqlite3_crash_on..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+23791 /* "sqlite3_crash_on..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{writeCrashObjCmd})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+32165 /* "unregister_devsi..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+23814 /* "unregister_devsi..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{dsUnregisterObjCmd})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+32183 /* "register_jt_vfs" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+23832 /* "register_jt_vfs" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{jtObjCmd})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+32199 /* "unregister_jt_vf..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+23848 /* "unregister_jt_vf..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{jtUnregisterObjCmd})), uintptr(0), uintptr(0)) return 0 } -// end block for C++ +// Each thread is controlled by an instance of the following +// structure. +type Thread1 = struct { + FzFilename uintptr + FxOp uintptr + FzArg uintptr + Fopnum int32 + Fbusy int32 + Fcompleted int32 + Fdb uintptr + FpStmt uintptr + FzErr uintptr + FzStaticErr uintptr + Frc int32 + Fargc int32 + Fargv [100]uintptr + Fcolv [100]uintptr + FnServer int32 + _ [4]byte +} /* test7.c:53:23 */ -// Local Variables: -// mode: c -// c-basic-offset: 4 -// fill-column: 78 -// End: +// There can be as many as 26 threads running at once. Each is named +// by a capital letter: A, B, C, ..., Y, Z. +var threadset1 [26]Thread1 /* test7.c:90:15: */ -// This test only works on UNIX with a SQLITE_THREADSAFE build that includes -// the SQLITE_SERVER option. -func Sqlitetest7_Init(tls *crt.TLS, interp uintptr) int32 { /* test7.c:717:5: */ return 0 } +// The main loop for a thread. Threads use busy waiting. +func client_main(tls *crt.TLS, pArg uintptr) uintptr { /* test7.c:95:13: */ + var p uintptr = pArg + if (*Thread1)(unsafe.Pointer(p)).Fdb != 0 { + sqlite3_client_close(tls, (*Thread1)(unsafe.Pointer(p)).Fdb) + } + sqlite3_client_open(tls, (*Thread1)(unsafe.Pointer(p)).FzFilename, (p + 40 /* &.db */)) + if 0 != sqlite3.Xsqlite3_errcode(tls, (*Thread1)(unsafe.Pointer(p)).Fdb) { + (*Thread1)(unsafe.Pointer(p)).FzErr = crt.Xstrdup(tls, sqlite3.Xsqlite3_errmsg(tls, (*Thread1)(unsafe.Pointer(p)).Fdb)) + sqlite3_client_close(tls, (*Thread1)(unsafe.Pointer(p)).Fdb) + (*Thread1)(unsafe.Pointer(p)).Fdb = uintptr(0) + } + (*Thread1)(unsafe.Pointer(p)).FpStmt = uintptr(0) + (*Thread1)(unsafe.Pointer(p)).Fcompleted = 1 + for (*Thread1)(unsafe.Pointer(p)).Fopnum <= (*Thread1)(unsafe.Pointer(p)).Fcompleted { + crt2.Xsched_yield(tls) + } + for (*Thread1)(unsafe.Pointer(p)).FxOp != 0 { + if ((*Thread1)(unsafe.Pointer(p)).FzErr != 0) && ((*Thread1)(unsafe.Pointer(p)).FzErr != (*Thread1)(unsafe.Pointer(p)).FzStaticErr) { + sqlite3.Xsqlite3_free(tls, (*Thread1)(unsafe.Pointer(p)).FzErr) + (*Thread1)(unsafe.Pointer(p)).FzErr = uintptr(0) + } + (*(*func(*crt.TLS, uintptr))(unsafe.Pointer((p + 8 /* &.xOp */))))(tls, p) + (*Thread1)(unsafe.Pointer(p)).Fcompleted++ + for (*Thread1)(unsafe.Pointer(p)).Fopnum <= (*Thread1)(unsafe.Pointer(p)).Fcompleted { + crt2.Xsched_yield(tls) + } + } + if (*Thread1)(unsafe.Pointer(p)).FpStmt != 0 { + sqlite3_client_finalize(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt) + (*Thread1)(unsafe.Pointer(p)).FpStmt = uintptr(0) + } + if (*Thread1)(unsafe.Pointer(p)).Fdb != 0 { + sqlite3_client_close(tls, (*Thread1)(unsafe.Pointer(p)).Fdb) + (*Thread1)(unsafe.Pointer(p)).Fdb = uintptr(0) + } + if ((*Thread1)(unsafe.Pointer(p)).FzErr != 0) && ((*Thread1)(unsafe.Pointer(p)).FzErr != (*Thread1)(unsafe.Pointer(p)).FzStaticErr) { + sqlite3.Xsqlite3_free(tls, (*Thread1)(unsafe.Pointer(p)).FzErr) + (*Thread1)(unsafe.Pointer(p)).FzErr = uintptr(0) + } + (*Thread1)(unsafe.Pointer(p)).Fcompleted++ + sqlite3.Xsqlite3_thread_cleanup(tls) + return uintptr(0) +} + +// Get a thread ID which is an upper case letter. Return the index. +// If the argument is not a valid thread ID put an error message in +// the interpreter and return -1. +func parse_client_id(tls *crt.TLS, interp uintptr, zArg uintptr) int32 { /* test7.c:142:12: */ + bp := tls.Alloc(16) + defer tls.Free(16) + + if (((zArg == uintptr(0)) || (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(0)))) == 0)) || (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(1)))) != 0)) || !((int32(*(*uint16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(crt.X__ctype_b_loc(tls)))) + uintptr(int32(uint8(*(*int8)(unsafe.Pointer(zArg + uintptr(0))))))*2))) & int32(uint16(256))) != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+22620 /* "thread ID must b..." */, 0)) + return -1 + } + return (int32(*(*int8)(unsafe.Pointer(zArg + uintptr(0)))) - 'A') +} + +// Usage: client_create NAME FILENAME +// +// NAME should be an upper case letter. Start the thread running with +// an open connection to the given database. +func tcl_client_create(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:156:26: */ + bp := tls.Alloc(96) + defer tls.Free(96) + + var i int32 + // var x pthread_t at bp+88, 8 + + var rc int32 + + if argc != 3 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22659 /* " ID FILENAME" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if threadset1[i].Fbusy != 0 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22672 /* "thread " */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+22680 /* " is already runn..." */, 0)) + return 1 + } + threadset1[i].Fbusy = 1 + sqlite3.Xsqlite3_free(tls, threadset1[i].FzFilename) + threadset1[i].FzFilename = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) + threadset1[i].Fopnum = 1 + threadset1[i].Fcompleted = 0 + rc = crt2.Xpthread_create(tls, bp+88 /* &x */, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr) uintptr + }{client_main})), (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + if rc != 0 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+72, ts+22700 /* "failed to create..." */, 0)) + sqlite3.Xsqlite3_free(tls, threadset1[i].FzFilename) + threadset1[i].Fbusy = 0 + return 1 + } + crt2.Xpthread_detach(tls, *(*pthread_t)(unsafe.Pointer(bp + 88 /* x */))) + if threadset1[i].FnServer == 0 { + threadset1[i].FnServer = 1 + sqlite3_server_start2(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688 + 1680 /* &.nServer */)) + } + return 0 +} + +// Wait for a thread to reach its idle state. +func client_wait(tls *crt.TLS, p uintptr) { /* test7.c:200:13: */ + for (*Thread1)(unsafe.Pointer(p)).Fopnum > (*Thread1)(unsafe.Pointer(p)).Fcompleted { + crt2.Xsched_yield(tls) + } +} + +// Usage: client_wait ID +// +// Wait on thread ID to reach its idle state. +func tcl_client_wait(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:209:26: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + + if argc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + return 0 +} + +// Stop a thread. +func stop_thread(tls *crt.TLS, p uintptr) { /* test7.c:235:13: */ + client_wait(tls, p) + (*Thread1)(unsafe.Pointer(p)).FxOp = uintptr(0) + (*Thread1)(unsafe.Pointer(p)).Fopnum++ + client_wait(tls, p) + sqlite3.Xsqlite3_free(tls, (*Thread1)(unsafe.Pointer(p)).FzArg) + (*Thread1)(unsafe.Pointer(p)).FzArg = uintptr(0) + sqlite3.Xsqlite3_free(tls, (*Thread1)(unsafe.Pointer(p)).FzFilename) + (*Thread1)(unsafe.Pointer(p)).FzFilename = uintptr(0) + (*Thread1)(unsafe.Pointer(p)).Fbusy = 0 +} + +// Usage: client_halt ID +// +// Cause a client thread to shut itself down. Wait for the shutdown to be +// completed. If ID is "*" then stop all client threads. +func tcl_client_halt(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:253:26: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + + if argc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) + return 1 + } + if (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)) + uintptr(0)))) == '*') && (int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)) + uintptr(1)))) == 0) { + for i = 0; i < 26; i++ { + if threadset1[i].Fbusy != 0 { + stop_thread(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + } + } + } else { + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + stop_thread(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + } + + // If no client threads are still running, also stop the server + for i = 0; (i < 26) && (threadset1[i].Fbusy == 0); i++ { + } + if i >= 26 { + sqlite3_server_stop(tls) + for 1 != 0 { + for i = 0; (i < 26) && (threadset1[i].FnServer == 0); i++ { + } + if i == 26 { + break + } + crt2.Xsched_yield(tls) + } + } + return 0 +} + +// Usage: client_argc ID +// +// Wait on the most recent client_step to complete, then return the +// number of columns in the result set. +func tcl_client_argc(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:301:26: */ + bp := tls.Alloc(172) + defer tls.Free(172) + + var i int32 + // var zBuf [100]int8 at bp+72, 100 + + if argc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+1237 /* "%d" */, crt.VaList(bp+48, threadset1[i].Fargc)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+56, bp+72 /* &zBuf[0] */, 0)) + return 0 +} + +// Usage: client_argv ID N +// +// Wait on the most recent client_step to complete, then return the +// value of the N-th columns in the result set. +func tcl_client_argv(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:333:26: */ + bp := tls.Alloc(84) + defer tls.Free(84) + + var i int32 + // var n int32 at bp+80, 4 + + if argc != 3 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22747 /* " ID N" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), bp+80 /* &n */) != 0 { + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + if (*(*int32)(unsafe.Pointer(bp + 80 /* n */)) < 0) || (*(*int32)(unsafe.Pointer(bp + 80 /* n */)) >= threadset1[i].Fargc) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+22753 /* "column number ou..." */, 0)) + return 1 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688 + 80 /* &.argv */) + uintptr(*(*int32)(unsafe.Pointer(bp + 80 /* n */)))*8)), 0)) + return 0 +} + +// Usage: client_colname ID N +// +// Wait on the most recent client_step to complete, then return the +// name of the N-th columns in the result set. +func tcl_client_colname(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:369:26: */ + bp := tls.Alloc(84) + defer tls.Free(84) + + var i int32 + // var n int32 at bp+80, 4 + + if argc != 3 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22747 /* " ID N" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + if tcl.XTcl_GetInt(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), bp+80 /* &n */) != 0 { + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + if (*(*int32)(unsafe.Pointer(bp + 80 /* n */)) < 0) || (*(*int32)(unsafe.Pointer(bp + 80 /* n */)) >= threadset1[i].Fargc) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+22753 /* "column number ou..." */, 0)) + return 1 + } + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+64, *(*uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688 + 880 /* &.colv */) + uintptr(*(*int32)(unsafe.Pointer(bp + 80 /* n */)))*8)), 0)) + return 0 +} + +// Usage: client_result ID +// +// Wait on the most recent operation to complete, then return the +// result code from that operation. +func tcl_client_result(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:407:26: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + var zName uintptr + + if argc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + zName = sqlite3.Xsqlite3ErrName(tls, threadset1[i].Frc) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, zName, 0)) + return 0 +} + +// Usage: client_error ID +// +// Wait on the most recent operation to complete, then return the +// error string. +func tcl_client_error(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:439:26: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + + if argc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22728 /* " ID" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, threadset1[i].FzErr, 0)) + return 0 +} + +// This procedure runs in the thread to compile an SQL statement. +func do_compile1(tls *crt.TLS, p uintptr) { /* test7.c:466:13: */ + if (*Thread1)(unsafe.Pointer(p)).Fdb == uintptr(0) { + (*Thread1)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+22780 /* "no database is o..." */) + (*Thread1)(unsafe.Pointer(p)).Frc = 1 + return + } + if (*Thread1)(unsafe.Pointer(p)).FpStmt != 0 { + sqlite3_client_finalize(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt) + (*Thread1)(unsafe.Pointer(p)).FpStmt = uintptr(0) + } + (*Thread1)(unsafe.Pointer(p)).Frc = sqlite3_client_prepare(tls, (*Thread1)(unsafe.Pointer(p)).Fdb, (*Thread1)(unsafe.Pointer(p)).FzArg, -1, (p + 48 /* &.pStmt */), uintptr(0)) +} + +// Usage: client_compile ID SQL +// +// Compile a new virtual machine. +func tcl_client_compile(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:484:26: */ + bp := tls.Alloc(56) + defer tls.Free(56) + + var i int32 + if argc != 3 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22800 /* " ID SQL" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + threadset1[i].FxOp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{do_compile1})) + sqlite3.Xsqlite3_free(tls, threadset1[i].FzArg) + threadset1[i].FzArg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+48, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) + threadset1[i].Fopnum++ + return 0 +} + +// This procedure runs in the thread to step the virtual machine. +func do_step1(tls *crt.TLS, p uintptr) { /* test7.c:513:13: */ + var i int32 + if (*Thread1)(unsafe.Pointer(p)).FpStmt == uintptr(0) { + (*Thread1)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+22808 /* "no virtual machi..." */) + (*Thread1)(unsafe.Pointer(p)).Frc = 1 + return + } + (*Thread1)(unsafe.Pointer(p)).Frc = sqlite3_client_step(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt) + if (*Thread1)(unsafe.Pointer(p)).Frc == 100 { + (*Thread1)(unsafe.Pointer(p)).Fargc = sqlite3.Xsqlite3_column_count(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt) + for i = 0; i < sqlite3.Xsqlite3_data_count(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt); i++ { + *(*uintptr)(unsafe.Pointer((p + 80 /* &.argv */) + uintptr(i)*8)) = sqlite3.Xsqlite3_column_text(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt, i) + } + for i = 0; i < (*Thread1)(unsafe.Pointer(p)).Fargc; i++ { + *(*uintptr)(unsafe.Pointer((p + 880 /* &.colv */) + uintptr(i)*8)) = sqlite3.Xsqlite3_column_name(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt, i) + } + } +} + +// Usage: client_step ID +// +// Advance the virtual machine by one step +func tcl_client_step(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:537:26: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + if argc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22837 /* " IDL" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + threadset1[i].FxOp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{do_step1})) + threadset1[i].Fopnum++ + return 0 +} + +// This procedure runs in the thread to finalize a virtual machine. +func do_finalize1(tls *crt.TLS, p uintptr) { /* test7.c:564:13: */ + if (*Thread1)(unsafe.Pointer(p)).FpStmt == uintptr(0) { + (*Thread1)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+22808 /* "no virtual machi..." */) + (*Thread1)(unsafe.Pointer(p)).Frc = 1 + return + } + (*Thread1)(unsafe.Pointer(p)).Frc = sqlite3_client_finalize(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt) + (*Thread1)(unsafe.Pointer(p)).FpStmt = uintptr(0) +} + +// Usage: client_finalize ID +// +// Finalize the virtual machine. +func tcl_client_finalize(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:579:26: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + if argc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22837 /* " IDL" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + threadset1[i].FxOp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{do_finalize1})) + sqlite3.Xsqlite3_free(tls, threadset1[i].FzArg) + threadset1[i].FzArg = uintptr(0) + threadset1[i].Fopnum++ + return 0 +} + +// This procedure runs in the thread to reset a virtual machine. +func do_reset(tls *crt.TLS, p uintptr) { /* test7.c:608:13: */ + if (*Thread1)(unsafe.Pointer(p)).FpStmt == uintptr(0) { + (*Thread1)(unsafe.Pointer(p)).FzErr = crt.AssignPtrUintptr(p+64 /* &.zStaticErr */, ts+22808 /* "no virtual machi..." */) + (*Thread1)(unsafe.Pointer(p)).Frc = 1 + return + } + (*Thread1)(unsafe.Pointer(p)).Frc = sqlite3_client_reset(tls, (*Thread1)(unsafe.Pointer(p)).FpStmt) + (*Thread1)(unsafe.Pointer(p)).FpStmt = uintptr(0) +} + +// Usage: client_reset ID +// +// Finalize the virtual machine. +func tcl_client_reset(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:623:26: */ + bp := tls.Alloc(48) + defer tls.Free(48) + + var i int32 + if argc != 2 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22837 /* " IDL" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + threadset1[i].FxOp = *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{do_reset})) + sqlite3.Xsqlite3_free(tls, threadset1[i].FzArg) + threadset1[i].FzArg = uintptr(0) + threadset1[i].Fopnum++ + return 0 +} + +// Usage: client_swap ID ID +// +// Interchange the sqlite* pointer between two threads. +func tcl_client_swap(tls *crt.TLS, NotUsed uintptr, interp uintptr, argc int32, argv uintptr) int32 { /* test7.c:654:26: */ + bp := tls.Alloc(64) + defer tls.Free(64) + + var i int32 + var j int32 + var temp uintptr + if argc != 3 { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+22842 /* " ID1 ID2" */, 0)) + return 1 + } + i = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) + if i < 0 { + return 1 + } + if !(threadset1[i].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(i)*1688)) + j = parse_client_id(tls, interp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8))) + if j < 0 { + return 1 + } + if !(threadset1[j].Fbusy != 0) { + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+22732 /* "no such thread" */, 0)) + return 1 + } + client_wait(tls, (uintptr(unsafe.Pointer(&threadset1)) + uintptr(j)*1688)) + temp = threadset1[i].Fdb + threadset1[i].Fdb = threadset1[j].Fdb + threadset1[j].Fdb = temp + return 0 +} + +// Register commands with the TCL interpreter. +func Sqlitetest7_Init(tls *crt.TLS, interp uintptr) int32 { /* test7.c:690:5: */ + var i int32 + + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd5)) / uint64(unsafe.Sizeof(struct { + FzName uintptr + FxProc uintptr + }{}))); i++ { + tcl.XTcl_CreateCommand(tls, interp, aCmd5[i].FzName, aCmd5[i].FxProc, uintptr(0), uintptr(0)) + } + return 0 +} + +var aCmd5 = [13]struct { + FzName uintptr + FxProc uintptr +}{ + {FzName: ts + 23866 /* "client_create" */, FxProc: 0}, + {FzName: ts + 23880 /* "client_wait" */, FxProc: 0}, + {FzName: ts + 23892 /* "client_halt" */, FxProc: 0}, + {FzName: ts + 23904 /* "client_argc" */, FxProc: 0}, + {FzName: ts + 23916 /* "client_argv" */, FxProc: 0}, + {FzName: ts + 23928 /* "client_colname" */, FxProc: 0}, + {FzName: ts + 23943 /* "client_result" */, FxProc: 0}, + {FzName: ts + 23957 /* "client_error" */, FxProc: 0}, + {FzName: ts + 23970 /* "client_compile" */, FxProc: 0}, + {FzName: ts + 23985 /* "client_step" */, FxProc: 0}, + {FzName: ts + 23997 /* "client_reset" */, FxProc: 0}, + {FzName: ts + 24010 /* "client_finalize" */, FxProc: 0}, + {FzName: ts + 24026 /* "client_swap" */, FxProc: 0}, +} /* test7.c:694:5 */ // end block for C++ @@ -49186,10 +49081,10 @@ func simulateVtabError(tls *crt.TLS, p uintptr, zMethod uintptr) int32 { /* test // var zVarname [128]int8 at bp+24, 128 *(*int8)(unsafe.Pointer(bp + 24 /* &zVarname[0] */ + uintptr(127))) = int8(0) - sqlite3.Xsqlite3_snprintf(tls, 127, bp+24 /* &zVarname[0] */, ts+32217 /* "echo_module_fail..." */, crt.VaList(bp, zMethod, (*echo_vtab)(unsafe.Pointer(p)).FzTableName)) + sqlite3.Xsqlite3_snprintf(tls, 127, bp+24 /* &zVarname[0] */, ts+24038 /* "echo_module_fail..." */, crt.VaList(bp, zMethod, (*echo_vtab)(unsafe.Pointer(p)).FzTableName)) zErr = tcl.XTcl_GetVar2(tls, (*echo_vtab)(unsafe.Pointer(p)).Finterp, bp+24 /* &zVarname[0] */, uintptr(0), 1) if zErr != 0 { - (*echo_vtab)(unsafe.Pointer(p)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+32241 /* "echo-vtab-error:..." */, crt.VaList(bp+16, zErr)) + (*echo_vtab)(unsafe.Pointer(p)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+24062 /* "echo-vtab-error:..." */, crt.VaList(bp+16, zErr)) } return (crt.Bool32(zErr != uintptr(0))) } @@ -49273,7 +49168,7 @@ func getColumnNames(tls *crt.TLS, db uintptr, zTab uintptr, paCol uintptr, pnCol // Prepare the statement "SELECT * FROM <tbl>". The column names // of the result set of the compiled SELECT will be the same as // the column names of table <tbl>. - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+32261 /* "SELECT * FROM %Q" */, crt.VaList(bp, zTab)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+24082 /* "SELECT * FROM %Q" */, crt.VaList(bp, zTab)) if !(!(zSql != 0)) { goto __1 } @@ -49331,7 +49226,7 @@ __8: goto __10 } *(*uintptr)(unsafe.Pointer(aCol + uintptr(ii)*8)) = zSpace - sqlite3.Xsqlite3_snprintf(tls, nBytes, zSpace, ts+130 /* "%s" */, crt.VaList(bp+8, sqlite3.Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), ii))) + sqlite3.Xsqlite3_snprintf(tls, nBytes, zSpace, ts /* "%s" */, crt.VaList(bp+8, sqlite3.Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), ii))) zSpace += (uintptr(int32(crt.Xstrlen(tls, zSpace)) + 1)) goto __9 __9: @@ -49389,7 +49284,7 @@ __1: ; // Compile an sqlite pragma to loop through all indices on table zTab - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+32278 /* "PRAGMA index_lis..." */, crt.VaList(bp, zTab)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+24099 /* "PRAGMA index_lis..." */, crt.VaList(bp, zTab)) if !(!(zSql != 0)) { goto __2 } @@ -49414,7 +49309,7 @@ __3: goto __3 __5: ; - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+32300 /* "PRAGMA index_inf..." */, crt.VaList(bp+8, zIdx)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+24121 /* "PRAGMA index_inf..." */, crt.VaList(bp+8, zIdx)) if !(!(zSql != 0)) { goto __6 } @@ -49476,11 +49371,11 @@ __12: // the string element zArg to that list in interpreter interp. func appendToEchoModule(tls *crt.TLS, interp uintptr, zArg uintptr) { /* test8.c:313:13: */ var flags int32 = ((4 | 8) | 1) - tcl.XTcl_SetVar2(tls, interp, ts+32322 /* "echo_module" */, uintptr(0), func() uintptr { + tcl.XTcl_SetVar2(tls, interp, ts+24143 /* "echo_module" */, uintptr(0), func() uintptr { if zArg != 0 { return zArg } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), flags) } @@ -49508,7 +49403,7 @@ func echoDeclareVtab(tls *crt.TLS, pVtab uintptr, db uintptr) int32 { /* test8.c if (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName != 0 { *(*uintptr)(unsafe.Pointer(bp /* pStmt */)) = uintptr(0) rc = sqlite3.Xsqlite3_prepare(tls, db, - ts+32334, /* "SELECT sql FROM ..." */ + ts+24155, /* "SELECT sql FROM ..." */ -1, bp /* &pStmt */, uintptr(0)) if rc == 0 { sqlite3.Xsqlite3_bind_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 1, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName, -1, uintptr(0)) @@ -49575,7 +49470,7 @@ func echoConstructor(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv ui (*echo_vtab)(unsafe.Pointer(pVtab)).Fdb = db // Allocate echo_vtab.zThis - (*echo_vtab)(unsafe.Pointer(pVtab)).FzThis = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) + (*echo_vtab)(unsafe.Pointer(pVtab)).FzThis = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)))) if !(int32((*echo_vtab)(unsafe.Pointer(pVtab)).FzThis) != 0) { echoDestructor(tls, pVtab) return 7 @@ -49583,10 +49478,10 @@ func echoConstructor(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv ui // Allocate echo_vtab.zTableName if argc > 3 { - (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8)))) + (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8)))) dequoteString(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName) if ((*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName != 0) && (int32(*(*int8)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName + uintptr(0)))) == '*') { - var z uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+32398 /* "%s%s" */, crt.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ((*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName+uintptr(1)))) + var z uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+24219 /* "%s%s" */, crt.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)), ((*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName+uintptr(1)))) sqlite3.Xsqlite3_free(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName) (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName = z (*echo_vtab)(unsafe.Pointer(pVtab)).FisPattern = 1 @@ -49622,7 +49517,7 @@ func echoCreate(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr defer tls.Free(24) var rc int32 = 0 - appendToEchoModule(tls, (*EchoModule)(unsafe.Pointer(pAux)).Finterp, ts+32403 /* "xCreate" */) + appendToEchoModule(tls, (*EchoModule)(unsafe.Pointer(pAux)).Finterp, ts+24224 /* "xCreate" */) rc = echoConstructor(tls, db, pAux, argc, argv, ppVtab, pzErr) // If there were two arguments passed to the module at the SQL level @@ -49637,12 +49532,12 @@ func echoCreate(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr if (rc == 0) && (argc == 5) { var zSql uintptr var pVtab uintptr = *(*uintptr)(unsafe.Pointer(ppVtab)) - (*echo_vtab)(unsafe.Pointer(pVtab)).FzLogName = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)))) - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+32411 /* "CREATE TABLE %Q(..." */, crt.VaList(bp+8, (*echo_vtab)(unsafe.Pointer(pVtab)).FzLogName)) + (*echo_vtab)(unsafe.Pointer(pVtab)).FzLogName = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8)))) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+24232 /* "CREATE TABLE %Q(..." */, crt.VaList(bp+8, (*echo_vtab)(unsafe.Pointer(pVtab)).FzLogName)) rc = sqlite3.Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+16, sqlite3.Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+16, sqlite3.Xsqlite3_errmsg(tls, db))) } } @@ -49660,13 +49555,13 @@ func echoCreate(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr // Echo virtual table module xConnect method. func echoConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* test8.c:512:12: */ - appendToEchoModule(tls, (*EchoModule)(unsafe.Pointer(pAux)).Finterp, ts+32435 /* "xConnect" */) + appendToEchoModule(tls, (*EchoModule)(unsafe.Pointer(pAux)).Finterp, ts+24256 /* "xConnect" */) return echoConstructor(tls, db, pAux, argc, argv, ppVtab, pzErr) } // Echo virtual table module xDisconnect method. func echoDisconnect(tls *crt.TLS, pVtab uintptr) int32 { /* test8.c:526:12: */ - appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+32444 /* "xDisconnect" */) + appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+24265 /* "xDisconnect" */) return echoDestructor(tls, pVtab) } @@ -49677,12 +49572,12 @@ func echoDestroy(tls *crt.TLS, pVtab uintptr) int32 { /* test8.c:534:12: */ var rc int32 = 0 var p uintptr = pVtab - appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+32456 /* "xDestroy" */) + appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+24277 /* "xDestroy" */) // Drop the "log" table, if one exists (see echoCreate() for details) if (p != 0) && ((*echo_vtab)(unsafe.Pointer(p)).FzLogName != 0) { var zSql uintptr - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+32465 /* "DROP TABLE %Q" */, crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(p)).FzLogName)) + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+24286 /* "DROP TABLE %Q" */, crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(p)).FzLogName)) rc = sqlite3.Xsqlite3_exec(tls, (*echo_vtab)(unsafe.Pointer(p)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) } @@ -49696,7 +49591,7 @@ func echoDestroy(tls *crt.TLS, pVtab uintptr) int32 { /* test8.c:534:12: */ // Echo virtual table module xOpen method. func echoOpen(tls *crt.TLS, pVTab uintptr, ppCursor uintptr) int32 { /* test8.c:556:12: */ var pCur uintptr - if simulateVtabError(tls, pVTab, ts+32479 /* "xOpen" */) != 0 { + if simulateVtabError(tls, pVTab, ts+24300 /* "xOpen" */) != 0 { return 1 } pCur = sqlite3.Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(echo_cursor{}))) @@ -49736,7 +49631,7 @@ func echoNext(tls *crt.TLS, cur uintptr) int32 { /* test8.c:590:12: */ var rc int32 = 0 var pCur uintptr = cur - if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+32485 /* "xNext" */) != 0 { + if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+24306 /* "xNext" */) != 0 { return 1 } @@ -49758,7 +49653,7 @@ func echoColumn(tls *crt.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test var iCol int32 = (i + 1) var pStmt uintptr = (*echo_cursor)(unsafe.Pointer(cur)).FpStmt - if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+32491 /* "xColumn" */) != 0 { + if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+24312 /* "xColumn" */) != 0 { return 1 } @@ -49775,7 +49670,7 @@ func echoColumn(tls *crt.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* test func echoRowid(tls *crt.TLS, cur uintptr, pRowid uintptr) int32 { /* test8.c:634:12: */ var pStmt uintptr = (*echo_cursor)(unsafe.Pointer(cur)).FpStmt - if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+32499 /* "xRowid" */) != 0 { + if simulateVtabError(tls, (*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab, ts+24320 /* "xRowid" */) != 0 { return 1 } @@ -49791,12 +49686,12 @@ func echoRowid(tls *crt.TLS, cur uintptr, pRowid uintptr) int32 { /* test8.c:634 // In echoFilter(), code assert()s that the supplied idxNum value is // indeed the hash of the supplied idxStr. func hashString(tls *crt.TLS, zString uintptr) int32 { /* test8.c:654:12: */ - var val u32 = u32(0) + var val u321 = u321(0) var ii int32 for ii = 0; *(*int8)(unsafe.Pointer(zString + uintptr(ii))) != 0; ii++ { - val = ((val << 3) + u32(int32(*(*int8)(unsafe.Pointer(zString + uintptr(ii)))))) + val = ((val << 3) + u321(int32(*(*int8)(unsafe.Pointer(zString + uintptr(ii)))))) } - return (int32(val & u32(0x7fffffff))) + return (int32(val & u321(0x7fffffff))) } // Echo virtual table module xFilter method. @@ -49808,14 +49703,14 @@ func echoFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, var pVtab uintptr = (*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab var db uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Fdb - if simulateVtabError(tls, pVtab, ts+32506 /* "xFilter" */) != 0 { + if simulateVtabError(tls, pVtab, ts+24327 /* "xFilter" */) != 0 { return 1 } // Check that idxNum matches idxStr // Log arguments to the ::echo_module Tcl variable - appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+32506 /* "xFilter" */) + appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+24327 /* "xFilter" */) appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, idxStr) for i = 0; i < argc; i++ { appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8)))) @@ -49865,10 +49760,10 @@ func string_concat(tls *crt.TLS, pzStr uintptr, zAppend uintptr, doFree int32, p } else { if zIn != 0 { var zTemp uintptr = zIn - zIn = sqlite3.Xsqlite3_mprintf(tls, ts+32398 /* "%s%s" */, crt.VaList(bp, zIn, zAppend)) + zIn = sqlite3.Xsqlite3_mprintf(tls, ts+24219 /* "%s%s" */, crt.VaList(bp, zIn, zAppend)) sqlite3.Xsqlite3_free(tls, zTemp) } else { - zIn = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+16, zAppend)) + zIn = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+16, zAppend)) } if !(zIn != 0) { *(*int32)(unsafe.Pointer(pRc)) = 7 @@ -49894,7 +49789,7 @@ func echoSelectList(tls *crt.TLS, pTab uintptr, pIdxInfo uintptr) uintptr { /* t var zRet uintptr = uintptr(0) if sqlite3.Xsqlite3_libversion_number(tls) < 3010000 { - zRet = sqlite3.Xsqlite3_mprintf(tls, ts+32514 /* ", *" */, 0) + zRet = sqlite3.Xsqlite3_mprintf(tls, ts+24335 /* ", *" */, 0) } else { var i int32 for i = 0; i < (*echo_vtab)(unsafe.Pointer(pTab)).FnCol; i++ { @@ -49904,9 +49799,9 @@ func echoSelectList(tls *crt.TLS, pTab uintptr, pIdxInfo uintptr) uintptr { /* t } return i }()))) != 0 { - zRet = sqlite3.Xsqlite3_mprintf(tls, ts+32518 /* "%z, %s" */, crt.VaList(bp, zRet, *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*8)))) + zRet = sqlite3.Xsqlite3_mprintf(tls, ts+24339 /* "%z, %s" */, crt.VaList(bp, zRet, *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pTab)).FaCol + uintptr(i)*8)))) } else { - zRet = sqlite3.Xsqlite3_mprintf(tls, ts+32525 /* "%z, NULL" */, crt.VaList(bp+16, zRet)) + zRet = sqlite3.Xsqlite3_mprintf(tls, ts+24346 /* "%z, NULL" */, crt.VaList(bp+16, zRet)) } if !(zRet != 0) { break @@ -49945,7 +49840,7 @@ func echoBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test8 var zCol uintptr = uintptr(0) var zNew uintptr var nArg int32 = 0 - var zSep uintptr = ts + 9599 /* "WHERE" */ + var zSep uintptr = ts + 7375 /* "WHERE" */ var pVtab uintptr = tab *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)) = uintptr(0) var interp uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp @@ -49956,11 +49851,11 @@ func echoBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test8 var useCost int32 = 0 var cost float64 = float64(0) var isIgnoreUsable int32 = 0 - if tcl.XTcl_GetVar2(tls, interp, ts+32534 /* "echo_module_igno..." */, uintptr(0), 1) != 0 { + if tcl.XTcl_GetVar2(tls, interp, ts+24355 /* "echo_module_igno..." */, uintptr(0), 1) != 0 { isIgnoreUsable = 1 } - if simulateVtabError(tls, pVtab, ts+32560 /* "xBestIndex" */) != 0 { + if simulateVtabError(tls, pVtab, ts+24381 /* "xBestIndex" */) != 0 { return 1 } @@ -49968,11 +49863,11 @@ func echoBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test8 // variable nRow. The 'estimated-cost' of the scan will be the number of // rows in the table for a linear scan, or the log (base 2) of the // number of rows if the proposed scan uses an index. - if tcl.XTcl_GetVar2(tls, interp, ts+32571 /* "echo_module_cost" */, uintptr(0), 1) != 0 { - cost = crt.Xatof(tls, tcl.XTcl_GetVar2(tls, interp, ts+32571 /* "echo_module_cost" */, uintptr(0), 1)) + if tcl.XTcl_GetVar2(tls, interp, ts+24392 /* "echo_module_cost" */, uintptr(0), 1) != 0 { + cost = crt.Xatof(tls, tcl.XTcl_GetVar2(tls, interp, ts+24392 /* "echo_module_cost" */, uintptr(0), 1)) useCost = 1 } else { - *(*uintptr)(unsafe.Pointer(bp + 88 /* zQuery */)) = sqlite3.Xsqlite3_mprintf(tls, ts+32588 /* "SELECT count(*) ..." */, crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) + *(*uintptr)(unsafe.Pointer(bp + 88 /* zQuery */)) = sqlite3.Xsqlite3_mprintf(tls, ts+24409 /* "SELECT count(*) ..." */, crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 88 /* zQuery */)) != 0) { return 7 } @@ -49993,7 +49888,7 @@ func echoBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test8 if !(zCol != 0) { return 7 } - *(*uintptr)(unsafe.Pointer(bp + 88 /* zQuery */)) = sqlite3.Xsqlite3_mprintf(tls, ts+32612 /* "SELECT rowid%z F..." */, crt.VaList(bp+8, zCol, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) + *(*uintptr)(unsafe.Pointer(bp + 88 /* zQuery */)) = sqlite3.Xsqlite3_mprintf(tls, ts+24433 /* "SELECT rowid%z F..." */, crt.VaList(bp+8, zCol, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 88 /* zQuery */)) != 0) { return 7 } @@ -50016,29 +49911,29 @@ func echoBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test8 if iCol >= 0 { zNewCol = *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr(iCol)*8)) } else { - zNewCol = ts + 32635 /* "rowid" */ + zNewCol = ts + 24456 /* "rowid" */ } var zOp uintptr = uintptr(0) useIdx = 1 switch int32((*sqlite3_index_constraint)(unsafe.Pointer(pConstraint)).Fop) { case 2: - zOp = ts + 32641 /* "=" */ + zOp = ts + 24462 /* "=" */ break fallthrough case 16: - zOp = ts + 32643 /* "<" */ + zOp = ts + 24464 /* "<" */ break fallthrough case 4: - zOp = ts + 32645 /* ">" */ + zOp = ts + 24466 /* ">" */ break fallthrough case 8: - zOp = ts + 32647 /* "<=" */ + zOp = ts + 24468 /* "<=" */ break fallthrough case 32: - zOp = ts + 32650 /* ">=" */ + zOp = ts + 24471 /* ">=" */ break fallthrough case 64: @@ -50048,30 +49943,30 @@ func echoBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test8 // of code requires the first letter of this operator to be // in upper-case to trigger the special MATCH handling (i.e. // wrapping the bound parameter with literal '%'s). - zOp = ts + 32653 /* "LIKE" */ + zOp = ts + 24474 /* "LIKE" */ break fallthrough case 65: - zOp = ts + 32658 /* "like" */ + zOp = ts + 24479 /* "like" */ break fallthrough case 66: - zOp = ts + 32663 /* "glob" */ + zOp = ts + 24484 /* "glob" */ break fallthrough case 67: - zOp = ts + 6216 /* "regexp" */ + zOp = ts + 4880 /* "regexp" */ break } if zOp != 0 { if int32(*(*int8)(unsafe.Pointer(zOp + uintptr(0)))) == 'L' { - zNew = sqlite3.Xsqlite3_mprintf(tls, ts+32668, /* " %s %s LIKE (SEL..." */ + zNew = sqlite3.Xsqlite3_mprintf(tls, ts+24489, /* " %s %s LIKE (SEL..." */ crt.VaList(bp+24, zSep, zNewCol)) } else { - zNew = sqlite3.Xsqlite3_mprintf(tls, ts+32703 /* " %s %s %s ?" */, crt.VaList(bp+40, zSep, zNewCol, zOp)) + zNew = sqlite3.Xsqlite3_mprintf(tls, ts+24524 /* " %s %s %s ?" */, crt.VaList(bp+40, zSep, zNewCol, zOp)) } string_concat(tls, bp+88 /* &zQuery */, zNew, 1, bp+96 /* &rc */) - zSep = ts + 9626 /* "AND" */ + zSep = ts + 7402 /* "AND" */ (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).FargvIndex = crt.PreIncInt32(&nArg, 1) (*sqlite3_index_constraint_usage)(unsafe.Pointer(pUsage)).Fomit = uint8(1) } @@ -50087,20 +49982,20 @@ func echoBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test8 if iCol >= 0 { zNewCol = *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr(iCol)*8)) } else { - zNewCol = ts + 32635 /* "rowid" */ + zNewCol = ts + 24456 /* "rowid" */ } var zDir uintptr if (*sqlite3_index_orderby)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaOrderBy)).Fdesc != 0 { - zDir = ts + 32715 /* "DESC" */ + zDir = ts + 24536 /* "DESC" */ } else { - zDir = ts + 32720 /* "ASC" */ + zDir = ts + 24541 /* "ASC" */ } - zNew = sqlite3.Xsqlite3_mprintf(tls, ts+32724 /* " ORDER BY %s %s" */, crt.VaList(bp+64, zNewCol, zDir)) + zNew = sqlite3.Xsqlite3_mprintf(tls, ts+24545 /* " ORDER BY %s %s" */, crt.VaList(bp+64, zNewCol, zDir)) string_concat(tls, bp+88 /* &zQuery */, zNew, 1, bp+96 /* &rc */) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).ForderByConsumed = 1 } - appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+32560 /* "xBestIndex" */) + appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, ts+24381 /* "xBestIndex" */) appendToEchoModule(tls, (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp, *(*uintptr)(unsafe.Pointer(bp + 88 /* zQuery */))) @@ -50154,14 +50049,14 @@ func echoUpdate(tls *crt.TLS, tab uintptr, nData int32, apData uintptr, pRowid u // Ticket #3083 - make sure we always start a transaction prior to // making any changes to a virtual table - if simulateVtabError(tls, pVtab, ts+32740 /* "xUpdate" */) != 0 { + if simulateVtabError(tls, pVtab, ts+24561 /* "xUpdate" */) != 0 { return 1 } // If apData[0] is an integer and nData>1 then do an UPDATE if (nData > 1) && (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apData + uintptr(0)*8))) == 1) { - var zSep uintptr = ts + 32748 /* " SET" */ - *(*uintptr)(unsafe.Pointer(bp + 96 /* z */)) = sqlite3.Xsqlite3_mprintf(tls, ts+32753 /* "UPDATE %Q" */, crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) + var zSep uintptr = ts + 24569 /* " SET" */ + *(*uintptr)(unsafe.Pointer(bp + 96 /* z */)) = sqlite3.Xsqlite3_mprintf(tls, ts+24574 /* "UPDATE %Q" */, crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 96 /* z */)) != 0) { *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = 7 } @@ -50170,20 +50065,20 @@ func echoUpdate(tls *crt.TLS, tab uintptr, nData int32, apData uintptr, pRowid u bindArgZero = 1 if bindArgOne != 0 { - string_concat(tls, bp+96 /* &z */, ts+32763 /* " SET rowid=?1 " */, 0, bp+104 /* &rc */) - zSep = ts + 4261 /* "," */ + string_concat(tls, bp+96 /* &z */, ts+24584 /* " SET rowid=?1 " */, 0, bp+104 /* &rc */) + zSep = ts + 3300 /* "," */ } for i = 2; i < nData; i++ { if *(*uintptr)(unsafe.Pointer(apData + uintptr(i)*8)) == uintptr(0) { continue } string_concat(tls, bp+96 /* &z */, sqlite3.Xsqlite3_mprintf(tls, - ts+32778 /* "%s %Q=?%d" */, crt.VaList(bp+8, zSep, *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr((i-2))*8)), i)), 1, bp+104 /* &rc */) - zSep = ts + 4261 /* "," */ + ts+24599 /* "%s %Q=?%d" */, crt.VaList(bp+8, zSep, *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr((i-2))*8)), i)), 1, bp+104 /* &rc */) + zSep = ts + 3300 /* "," */ } - string_concat(tls, bp+96 /* &z */, sqlite3.Xsqlite3_mprintf(tls, ts+32788 /* " WHERE rowid=?%d" */, crt.VaList(bp+32, nData)), 1, bp+104 /* &rc */) + string_concat(tls, bp+96 /* &z */, sqlite3.Xsqlite3_mprintf(tls, ts+24609 /* " WHERE rowid=?%d" */, crt.VaList(bp+32, nData)), 1, bp+104 /* &rc */) } else if (nData == 1) && (sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apData + uintptr(0)*8))) == 1) { - *(*uintptr)(unsafe.Pointer(bp + 96 /* z */)) = sqlite3.Xsqlite3_mprintf(tls, ts+32805 /* "DELETE FROM %Q W..." */, crt.VaList(bp+40, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) + *(*uintptr)(unsafe.Pointer(bp + 96 /* z */)) = sqlite3.Xsqlite3_mprintf(tls, ts+24626 /* "DELETE FROM %Q W..." */, crt.VaList(bp+40, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 96 /* z */)) != 0) { *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = 7 } @@ -50193,37 +50088,37 @@ func echoUpdate(tls *crt.TLS, tab uintptr, nData int32, apData uintptr, pRowid u *(*uintptr)(unsafe.Pointer(bp + 112 /* zInsert */)) = uintptr(0) *(*uintptr)(unsafe.Pointer(bp + 120 /* zValues */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 112 /* zInsert */)) = sqlite3.Xsqlite3_mprintf(tls, ts+32837 /* "INSERT INTO %Q (" */, crt.VaList(bp+48, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) + *(*uintptr)(unsafe.Pointer(bp + 112 /* zInsert */)) = sqlite3.Xsqlite3_mprintf(tls, ts+24658 /* "INSERT INTO %Q (" */, crt.VaList(bp+48, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if !(*(*uintptr)(unsafe.Pointer(bp + 112 /* zInsert */)) != 0) { *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) = 7 } if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apData + uintptr(1)*8))) == 1 { bindArgOne = 1 - *(*uintptr)(unsafe.Pointer(bp + 120 /* zValues */)) = sqlite3.Xsqlite3_mprintf(tls, ts+2682 /* "?" */, 0) - string_concat(tls, bp+112 /* &zInsert */, ts+32635 /* "rowid" */, 0, bp+104 /* &rc */) + *(*uintptr)(unsafe.Pointer(bp + 120 /* zValues */)) = sqlite3.Xsqlite3_mprintf(tls, ts+2063 /* "?" */, 0) + string_concat(tls, bp+112 /* &zInsert */, ts+24456 /* "rowid" */, 0, bp+104 /* &rc */) } for ii = 2; ii < nData; ii++ { string_concat(tls, bp+112, /* &zInsert */ - sqlite3.Xsqlite3_mprintf(tls, ts+32854 /* "%s%Q" */, crt.VaList(bp+56, func() uintptr { + sqlite3.Xsqlite3_mprintf(tls, ts+24675 /* "%s%Q" */, crt.VaList(bp+56, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 120 /* zValues */)) != 0 { - return ts + 359 /* ", " */ + return ts + 89 /* ", " */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), *(*uintptr)(unsafe.Pointer((*echo_vtab)(unsafe.Pointer(pVtab)).FaCol + uintptr((ii-2))*8)))), 1, bp+104 /* &rc */) string_concat(tls, bp+120, /* &zValues */ - sqlite3.Xsqlite3_mprintf(tls, ts+32859 /* "%s?%d" */, crt.VaList(bp+72, func() uintptr { + sqlite3.Xsqlite3_mprintf(tls, ts+24680 /* "%s?%d" */, crt.VaList(bp+72, func() uintptr { if *(*uintptr)(unsafe.Pointer(bp + 120 /* zValues */)) != 0 { - return ts + 359 /* ", " */ + return ts + 89 /* ", " */ } - return ts + 792 /* "" */ + return ts + 488 /* "" */ }(), ii)), 1, bp+104 /* &rc */) } string_concat(tls, bp+96 /* &z */, *(*uintptr)(unsafe.Pointer(bp + 112 /* zInsert */)), 1, bp+104 /* &rc */) - string_concat(tls, bp+96 /* &z */, ts+32865 /* ") VALUES(" */, 0, bp+104 /* &rc */) + string_concat(tls, bp+96 /* &z */, ts+24686 /* ") VALUES(" */, 0, bp+104 /* &rc */) string_concat(tls, bp+96 /* &z */, *(*uintptr)(unsafe.Pointer(bp + 120 /* zValues */)), 1, bp+104 /* &rc */) - string_concat(tls, bp+96 /* &z */, ts+793 /* ")" */, 0, bp+104 /* &rc */) + string_concat(tls, bp+96 /* &z */, ts+489 /* ")" */, 0, bp+104 /* &rc */) } else { return 1 @@ -50258,7 +50153,7 @@ func echoUpdate(tls *crt.TLS, tab uintptr, nData int32, apData uintptr, pRowid u *(*sqlite_int64)(unsafe.Pointer(pRowid)) = sqlite3.Xsqlite3_last_insert_rowid(tls, db) } if *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) != 0 { - (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+32241 /* "echo-vtab-error:..." */, crt.VaList(bp+88, sqlite3.Xsqlite3_errmsg(tls, db))) + (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+24062 /* "echo-vtab-error:..." */, crt.VaList(bp+88, sqlite3.Xsqlite3_errmsg(tls, db))) } return *(*int32)(unsafe.Pointer(bp + 104 /* rc */)) @@ -50273,7 +50168,7 @@ func echoTransactionCall(tls *crt.TLS, tab uintptr, zCall uintptr) int32 { /* te var z uintptr var pVtab uintptr = tab - z = sqlite3.Xsqlite3_mprintf(tls, ts+32875 /* "echo(%s)" */, crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) + z = sqlite3.Xsqlite3_mprintf(tls, ts+24696 /* "echo(%s)" */, crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) if z == uintptr(0) { return 7 } @@ -50291,17 +50186,17 @@ func echoBegin(tls *crt.TLS, tab uintptr) int32 { /* test8.c:1111:12: */ // Ticket #3083 - do not start a transaction if we are already in // a transaction - if simulateVtabError(tls, pVtab, ts+32884 /* "xBegin" */) != 0 { + if simulateVtabError(tls, pVtab, ts+24705 /* "xBegin" */) != 0 { return 1 } - rc = echoTransactionCall(tls, tab, ts+32884 /* "xBegin" */) + rc = echoTransactionCall(tls, tab, ts+24705 /* "xBegin" */) if rc == 0 { // Check if the $::echo_module_begin_fail variable is defined. If it is, // and it is set to the name of the real table underlying this virtual // echo module table, then cause this xSync operation to fail. - zVal = tcl.XTcl_GetVar2(tls, interp, ts+32891 /* "echo_module_begi..." */, uintptr(0), 1) + zVal = tcl.XTcl_GetVar2(tls, interp, ts+24712 /* "echo_module_begi..." */, uintptr(0), 1) if (zVal != 0) && (0 == crt.Xstrcmp(tls, zVal, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) { rc = 1 } @@ -50320,17 +50215,17 @@ func echoSync(tls *crt.TLS, tab uintptr) int32 { /* test8.c:1142:12: */ // Ticket #3083 - Only call xSync if we have previously started a // transaction - if simulateVtabError(tls, pVtab, ts+32914 /* "xSync" */) != 0 { + if simulateVtabError(tls, pVtab, ts+24735 /* "xSync" */) != 0 { return 1 } - rc = echoTransactionCall(tls, tab, ts+32914 /* "xSync" */) + rc = echoTransactionCall(tls, tab, ts+24735 /* "xSync" */) if rc == 0 { // Check if the $::echo_module_sync_fail variable is defined. If it is, // and it is set to the name of the real table underlying this virtual // echo module table, then cause this xSync operation to fail. - zVal = tcl.XTcl_GetVar2(tls, interp, ts+32920 /* "echo_module_sync..." */, uintptr(0), 1) + zVal = tcl.XTcl_GetVar2(tls, interp, ts+24741 /* "echo_module_sync..." */, uintptr(0), 1) if (zVal != 0) && (0 == crt.Xstrcmp(tls, zVal, (*echo_vtab)(unsafe.Pointer(pVtab)).FzTableName)) { rc = -1 } @@ -50344,12 +50239,12 @@ func echoCommit(tls *crt.TLS, tab uintptr) int32 { /* test8.c:1170:12: */ // Ticket #3083 - Only call xCommit if we have previously started // a transaction - if simulateVtabError(tls, pVtab, ts+32942 /* "xCommit" */) != 0 { + if simulateVtabError(tls, pVtab, ts+24763 /* "xCommit" */) != 0 { return 1 } sqlite3.Xsqlite3BeginBenignMalloc(tls) - rc = echoTransactionCall(tls, tab, ts+32942 /* "xCommit" */) + rc = echoTransactionCall(tls, tab, ts+24763 /* "xCommit" */) sqlite3.Xsqlite3EndBenignMalloc(tls) (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc @@ -50361,7 +50256,7 @@ func echoRollback(tls *crt.TLS, tab uintptr) int32 { /* test8.c:1188:12: */ // Ticket #3083 - Only call xRollback if we have previously started // a transaction - rc = echoTransactionCall(tls, tab, ts+32950 /* "xRollback" */) + rc = echoTransactionCall(tls, tab, ts+24771 /* "xRollback" */) (*echo_vtab)(unsafe.Pointer(pVtab)).FinTransaction = 0 return rc } @@ -50379,7 +50274,7 @@ func overloadedGlobFunction(tls *crt.TLS, pContext uintptr, nArg int32, apArg ui var i int32 var rc int32 tcl.XTcl_DStringInit(tls, bp /* &str */) - tcl.XTcl_DStringAppendElement(tls, bp /* &str */, ts+32960 /* "::echo_glob_over..." */) + tcl.XTcl_DStringAppendElement(tls, bp /* &str */, ts+24781 /* "::echo_glob_over..." */) for i = 0; i < nArg; i++ { tcl.XTcl_DStringAppendElement(tls, bp /* &str */, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apArg + uintptr(i)*8)))) } @@ -50408,10 +50303,10 @@ func echoFindFunction(tls *crt.TLS, vtab uintptr, nArg int32, zFuncName uintptr, var interp uintptr = (*echo_vtab)(unsafe.Pointer(pVtab)).Finterp // var info Tcl_CmdInfo at bp, 64 - if crt.Xstrcmp(tls, zFuncName, ts+32663 /* "glob" */) != 0 { + if crt.Xstrcmp(tls, zFuncName, ts+24484 /* "glob" */) != 0 { return 0 } - if tcl.XTcl_GetCommandInfo(tls, interp, ts+32960 /* "::echo_glob_over..." */, bp /* &info */) == 0 { + if tcl.XTcl_GetCommandInfo(tls, interp, ts+24781 /* "::echo_glob_over..." */, bp /* &info */) == 0 { return 0 } *(*uintptr)(unsafe.Pointer(pxFunc)) = *(*uintptr)(unsafe.Pointer(&struct { @@ -50428,13 +50323,13 @@ func echoRename(tls *crt.TLS, vtab uintptr, zNewName uintptr) int32 { /* test8.c var rc int32 = 0 var p uintptr = vtab - if simulateVtabError(tls, p, ts+32981 /* "xRename" */) != 0 { + if simulateVtabError(tls, p, ts+24802 /* "xRename" */) != 0 { return 1 } if (*echo_vtab)(unsafe.Pointer(p)).FisPattern != 0 { var nThis int32 = int32(crt.Xstrlen(tls, (*echo_vtab)(unsafe.Pointer(p)).FzThis)) - var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+32989, /* "ALTER TABLE %s R..." */ + var zSql uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+24810, /* "ALTER TABLE %s R..." */ crt.VaList(bp, (*echo_vtab)(unsafe.Pointer(p)).FzTableName, zNewName, ((*echo_vtab)(unsafe.Pointer(p)).FzTableName+uintptr(nThis)))) rc = sqlite3.Xsqlite3_exec(tls, (*echo_vtab)(unsafe.Pointer(p)).Fdb, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) @@ -50509,7 +50404,7 @@ func register_echo_module(tls *crt.TLS, clientData ClientData, interp uintptr, o var pMod uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { @@ -50520,13 +50415,13 @@ func register_echo_module(tls *crt.TLS, clientData ClientData, interp uintptr, o pMod = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(EchoModule{}))) (*EchoModule)(unsafe.Pointer(pMod)).Finterp = interp rc = sqlite3.Xsqlite3_create_module_v2(tls, - *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+33019 /* "echo" */, uintptr(unsafe.Pointer(&echoModule)), pMod, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{moduleDestroy}))) + *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+24840 /* "echo" */, uintptr(unsafe.Pointer(&echoModule)), pMod, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{moduleDestroy}))) // Virtual table module "echo_v2" if rc == 0 { pMod = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(EchoModule{}))) (*EchoModule)(unsafe.Pointer(pMod)).Finterp = interp - rc = sqlite3.Xsqlite3_create_module_v2(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+33024, /* "echo_v2" */ + rc = sqlite3.Xsqlite3_create_module_v2(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+24845, /* "echo_v2" */ uintptr(unsafe.Pointer(&echoModuleV2)), pMod, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{moduleDestroy}))) } @@ -50545,7 +50440,7 @@ func declare_vtab(tls *crt.TLS, clientData ClientData, interp uintptr, objc int3 var rc int32 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33032 /* "DB SQL" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+24853 /* "DB SQL" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { @@ -50562,24 +50457,24 @@ func declare_vtab(tls *crt.TLS, clientData ClientData, interp uintptr, objc int3 // Register commands with the TCL interpreter. func Sqlitetest8_Init(tls *crt.TLS, interp uintptr) int32 { /* test8.c:1427:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd2)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd1)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd2[i].FzName, - aObjCmd2[i].FxProc, aObjCmd2[i].FclientData, uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd1[i].FzName, + aObjCmd1[i].FxProc, aObjCmd1[i].FclientData, uintptr(0)) } return 0 } -var aObjCmd2 = [2]struct { +var aObjCmd1 = [2]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ - {FzName: ts + 33039 /* "register_echo_mo..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 33060 /* "sqlite3_declare_..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 24860 /* "register_echo_mo..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 24881 /* "sqlite3_declare_..." */, FxProc: 0, FclientData: uintptr(0)}, } /* test8.c:1433:5 */ // end block for C++ @@ -50636,31 +50531,31 @@ func c_collation_test(tls *crt.TLS, clientData ClientData, interp uintptr, objc // var db uintptr at bp+24, 8 var rc int32 - zErrFunction = ts + 33081 /* "N/A" */ + zErrFunction = ts + 24902 /* "N/A" */ if !(objc != 1) { goto __1 } - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 __1: ; // Open a database. - rc = sqlite3.Xsqlite3_open(tls, ts+2108 /* ":memory:" */, bp+24 /* &db */) + rc = sqlite3.Xsqlite3_open(tls, ts+1661 /* ":memory:" */, bp+24 /* &db */) if !(rc != 0) { goto __2 } - zErrFunction = ts + 27426 /* "sqlite3_open" */ + zErrFunction = ts + 18861 /* "sqlite3_open" */ goto error_out __2: ; - rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+20084 /* "collate" */, 456, uintptr(0), uintptr(0)) + rc = sqlite3.Xsqlite3_create_collation(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), ts+11276 /* "collate" */, 456, uintptr(0), uintptr(0)) if !(rc != 21) { goto __3 } sqlite3.Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */))) - zErrFunction = ts + 33085 /* "sqlite3_create_c..." */ + zErrFunction = ts + 24906 /* "sqlite3_create_c..." */ goto error_out __3: ; @@ -50670,7 +50565,7 @@ __3: error_out: tcl.XTcl_ResetResult(tls, interp) - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+33110 /* "Error testing fu..." */, zErrFunction, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+24931 /* "Error testing fu..." */, zErrFunction, 0)) return 1 } @@ -50681,12 +50576,12 @@ func c_realloc_test(tls *crt.TLS, clientData ClientData, interp uintptr, objc in var p uintptr var zErrFunction uintptr - zErrFunction = ts + 33081 /* "N/A" */ + zErrFunction = ts + 24902 /* "N/A" */ if !(objc != 1) { goto __1 } - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 __1: ; @@ -50695,7 +50590,7 @@ __1: if !(!(p != 0)) { goto __2 } - zErrFunction = ts + 33135 /* "sqlite3_malloc" */ + zErrFunction = ts + 24956 /* "sqlite3_malloc" */ goto error_out __2: ; @@ -50706,7 +50601,7 @@ __2: if !(p != 0) { goto __3 } - zErrFunction = ts + 33150 /* "sqlite3_realloc" */ + zErrFunction = ts + 24971 /* "sqlite3_realloc" */ goto error_out __3: ; @@ -50715,7 +50610,7 @@ __3: error_out: tcl.XTcl_ResetResult(tls, interp) - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+33110 /* "Error testing fu..." */, zErrFunction, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+24931 /* "Error testing fu..." */, zErrFunction, 0)) return 1 } @@ -50730,24 +50625,24 @@ func c_misuse_test(tls *crt.TLS, clientData ClientData, interp uintptr, objc int // var pStmt uintptr at bp+32, 8 var rc int32 - zErrFunction = ts + 33081 /* "N/A" */ + zErrFunction = ts + 24902 /* "N/A" */ *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)) = uintptr(0) if !(objc != 1) { goto __1 } - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 __1: ; // Open a database. Then close it again. We need to do this so that // we have a "closed database handle" to pass to various API functions. - rc = sqlite3.Xsqlite3_open(tls, ts+2108 /* ":memory:" */, bp+24 /* &db */) + rc = sqlite3.Xsqlite3_open(tls, ts+1661 /* ":memory:" */, bp+24 /* &db */) if !(rc != 0) { goto __2 } - zErrFunction = ts + 27426 /* "sqlite3_open" */ + zErrFunction = ts + 18861 /* "sqlite3_open" */ goto error_out __2: ; @@ -50757,7 +50652,7 @@ __2: if !(rc != 21) { goto __3 } - zErrFunction = ts + 27353 /* "sqlite3_errcode" */ + zErrFunction = ts + 18788 /* "sqlite3_errcode" */ goto error_out __3: ; @@ -50767,7 +50662,7 @@ __3: if !(rc != 21) { goto __4 } - zErrFunction = ts + 27507 /* "sqlite3_prepare" */ + zErrFunction = ts + 18942 /* "sqlite3_prepare" */ goto error_out __4: ; @@ -50778,41 +50673,61 @@ __4: if !(rc != 21) { goto __5 } - zErrFunction = ts + 27541 /* "sqlite3_prepare_..." */ + zErrFunction = ts + 18976 /* "sqlite3_prepare_..." */ goto error_out __5: ; + *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)) = uintptr(1234) + rc = sqlite3.Xsqlite3_prepare16(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), uintptr(0), 0, bp+32 /* &pStmt */, uintptr(0)) + if !(rc != 21) { + goto __6 + } + zErrFunction = ts + 18958 /* "sqlite3_prepare1..." */ + goto error_out +__6: + ; + + *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)) = uintptr(1234) + rc = sqlite3.Xsqlite3_prepare16_v2(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* db */)), uintptr(0), 0, bp+32 /* &pStmt */, uintptr(0)) + if !(rc != 21) { + goto __7 + } + zErrFunction = ts + 19038 /* "sqlite3_prepare1..." */ + goto error_out +__7: + ; + return 0 error_out: tcl.XTcl_ResetResult(tls, interp) - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+33110 /* "Error testing fu..." */, zErrFunction, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+24931 /* "Error testing fu..." */, zErrFunction, 0)) return 1 } // Register commands with the TCL interpreter. func Sqlitetest9_Init(tls *crt.TLS, interp uintptr) int32 { /* test9.c:188:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd3)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd2)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd3[i].FzName, - aObjCmd3[i].FxProc, aObjCmd3[i].FclientData, uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd2[i].FzName, + aObjCmd2[i].FxProc, aObjCmd2[i].FclientData, uintptr(0)) } return 0 } -var aObjCmd3 = [3]struct { +var aObjCmd2 = [3]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ - {FzName: ts + 33166 /* "c_misuse_test" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 33180 /* "c_realloc_test" */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 33195 /* "c_collation_test" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 24987 /* "c_misuse_test" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 25001 /* "c_realloc_test" */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 25016 /* "c_collation_test" */, FxProc: 0, FclientData: uintptr(0)}, } /* test9.c:193:5 */ // end block for C++ @@ -50853,7 +50768,7 @@ func resetAutoExtObjCmd(tls *crt.TLS, clientData uintptr, interp uintptr, objc i // This procedure registers the TCL procs defined in this file. func Sqlitetest_autoext_Init(tls *crt.TLS, interp uintptr) int32 { /* test_autoext.c:210:5: */ - tcl.XTcl_CreateObjCommand(tls, interp, ts+33212, /* "sqlite3_reset_au..." */ + tcl.XTcl_CreateObjCommand(tls, interp, ts+25033, /* "sqlite3_reset_au..." */ *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{resetAutoExtObjCmd})), uintptr(0), uintptr(0)) @@ -50871,10 +50786,10 @@ func backupTestCmd(tls *crt.TLS, clientData ClientData, interp uintptr, objc int BACKUP_PAGECOUNT = 3 ) *(*[5]BackupSubCommand)(unsafe.Pointer(bp /* aSub */)) = [5]BackupSubCommand{ - {FzCmd: ts + 16502 /* "step" */, FeCmd: BACKUP_STEP, FnArg: 1, FzArg: ts + 33241 /* "npage" */}, - {FzCmd: ts + 33247 /* "finish" */, FeCmd: BACKUP_FINISH, FnArg: 0, FzArg: ts + 792 /* "" */}, - {FzCmd: ts + 33254 /* "remaining" */, FeCmd: BACKUP_REMAINING, FnArg: 0, FzArg: ts + 792 /* "" */}, - {FzCmd: ts + 33264 /* "pagecount" */, FeCmd: BACKUP_PAGECOUNT, FnArg: 0, FzArg: ts + 792 /* "" */}, + {FzCmd: ts + 10895 /* "step" */, FeCmd: BACKUP_STEP, FnArg: 1, FzArg: ts + 25062 /* "npage" */}, + {FzCmd: ts + 25068 /* "finish" */, FeCmd: BACKUP_FINISH, FnArg: 0, FzArg: ts + 488 /* "" */}, + {FzCmd: ts + 25075 /* "remaining" */, FeCmd: BACKUP_REMAINING, FnArg: 0, FzArg: ts + 488 /* "" */}, + {FzCmd: ts + 25085 /* "pagecount" */, FeCmd: BACKUP_PAGECOUNT, FnArg: 0, FzArg: ts + 488 /* "" */}, {FzCmd: uintptr(0), FeCmd: uint32(0), FnArg: 0, FzArg: uintptr(0)}, } @@ -50884,7 +50799,7 @@ func backupTestCmd(tls *crt.TLS, clientData ClientData, interp uintptr, objc int var rc int32 rc = tcl.XTcl_GetIndexFromObjStruct(tls, - interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &aSub[0] */, int32(unsafe.Sizeof(BackupSubCommand{})), ts+18405 /* "option" */, 0, bp+120 /* &iCmd */) + interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &aSub[0] */, int32(unsafe.Sizeof(BackupSubCommand{})), ts+9536 /* "option" */, 0, bp+120 /* &iCmd */) if rc != 0 { return rc } @@ -50964,7 +50879,7 @@ func backupTestInit(tls *crt.TLS, clientData ClientData, interp uintptr, objc in if objc != 6 { tcl.XTcl_WrongNumArgs(tls, - interp, 1, objv, ts+33274 /* "CMDNAME DESTHAND..." */) + interp, 1, objv, ts+25095 /* "CMDNAME DESTHAND..." */) return 1 } @@ -50976,7 +50891,7 @@ func backupTestInit(tls *crt.TLS, clientData ClientData, interp uintptr, objc in pBackup = sqlite3.Xsqlite3_backup_init(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pDestDb */)), zDestName, *(*uintptr)(unsafe.Pointer(bp + 24 /* pSrcDb */)), zSrcName) if !(pBackup != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+33320 /* "sqlite3_backup_i..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+25141 /* "sqlite3_backup_i..." */, 0)) return 1 } @@ -50988,7 +50903,7 @@ func backupTestInit(tls *crt.TLS, clientData ClientData, interp uintptr, objc in } func Sqlitetestbackup_Init(tls *crt.TLS, interp uintptr) int32 { /* test_backup.c:154:5: */ - tcl.XTcl_CreateObjCommand(tls, interp, ts+33349 /* "sqlite3_backup" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+25170 /* "sqlite3_backup" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{backupTestInit})), uintptr(0), uintptr(0)) return 0 @@ -51079,7 +50994,7 @@ func tclConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr var rc int32 = 0 if argc != 4 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+33364 /* "wrong number of ..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+25185 /* "wrong number of ..." */, 0) return 1 } @@ -51097,11 +51012,11 @@ func tclConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr pScript = tcl.XTcl_DuplicateObj(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ - tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+32435 /* "xConnect" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+24256 /* "xConnect" */, -1)) rc = tcl.XTcl_EvalObjEx(tls, interp, pScript, 0x020000) if rc != 0 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, tcl.XTcl_GetStringResult(tls, interp))) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, tcl.XTcl_GetStringResult(tls, interp))) rc = 1 } else { rc = sqlite3.Xsqlite3_declare_vtab(tls, db, tcl.XTcl_GetStringResult(tls, interp)) @@ -51169,7 +51084,7 @@ func tclNext(tls *crt.TLS, pVtabCursor uintptr) int32 { /* test_bestindex.c:255: (*tcl_cursor)(unsafe.Pointer(pCsr)).FpStmt = uintptr(0) if rc != 0 { zErr = sqlite3.Xsqlite3_errmsg(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).Fdb) - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zErr)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zErr)) } } } @@ -51190,12 +51105,12 @@ func tclFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, pScript = tcl.XTcl_DuplicateObj(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ - tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+32506 /* "xFilter" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+24327 /* "xFilter" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewIntObj(tls, idxNum)) if idxStr != 0 { tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, idxStr, -1)) } else { - tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+792 /* "" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+488 /* "" */, -1)) } pArg = tcl.XTcl_NewObj(tls) @@ -51222,7 +51137,7 @@ func tclFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, if rc != 0 { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) rc = 1 - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zErr)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zErr)) } else { // Analyze the scripts return value. The return value should be a tcl // list object with an even number of elements. The first element of each @@ -51237,21 +51152,21 @@ func tclFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, if rc != 0 { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) rc = 1 - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, zErr)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, zErr)) } else { for ii = 0; (rc == 0) && (ii < *(*int32)(unsafe.Pointer(bp + 32 /* nElem */))); ii = ii + (2) { var zCmd uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* apElem */)) + uintptr(ii)*8))) var p uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 40 /* apElem */)) + uintptr((ii+1))*8)) - if sqlite3.Xsqlite3_stricmp(tls, ts+2254 /* "sql" */, zCmd) == 0 { + if sqlite3.Xsqlite3_stricmp(tls, ts+1807 /* "sql" */, zCmd) == 0 { var zSql uintptr = tcl.XTcl_GetString(tls, p) rc = sqlite3.Xsqlite3_prepare_v2(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, (pCsr + 8 /* &.pStmt */), uintptr(0)) if rc != 0 { var zErr uintptr = sqlite3.Xsqlite3_errmsg(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).Fdb) - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+33390 /* "unexpected: %s" */, crt.VaList(bp+16, zErr)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+25211 /* "unexpected: %s" */, crt.VaList(bp+16, zErr)) } } else { rc = 1 - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+33390 /* "unexpected: %s" */, crt.VaList(bp+24, zCmd)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+25211 /* "unexpected: %s" */, crt.VaList(bp+24, zCmd)) } } } @@ -51293,67 +51208,67 @@ func tclBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_b pScript = tcl.XTcl_DuplicateObj(tls, (*tcl_vtab)(unsafe.Pointer(pTab)).FpCmd) (*Tcl_Obj)(unsafe.Pointer(pScript)).FrefCount++ - tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+32560 /* "xBestIndex" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pScript, tcl.XTcl_NewStringObj(tls, ts+24381 /* "xBestIndex" */, -1)) pArg = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pArg)).FrefCount++ for ii = 0; ii < (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint; ii++ { var pCons uintptr = ((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraint + uintptr(ii)*12) var pElem uintptr = tcl.XTcl_NewObj(tls) - var zOp uintptr = ts + 2682 /* "?" */ + var zOp uintptr = ts + 2063 /* "?" */ (*Tcl_Obj)(unsafe.Pointer(pElem)).FrefCount++ switch int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fop) { case 2: - zOp = ts + 33405 /* "eq" */ + zOp = ts + 25226 /* "eq" */ break case 4: - zOp = ts + 33408 /* "gt" */ + zOp = ts + 25229 /* "gt" */ break case 8: - zOp = ts + 33411 /* "le" */ + zOp = ts + 25232 /* "le" */ break case 16: - zOp = ts + 33414 /* "lt" */ + zOp = ts + 25235 /* "lt" */ break case 32: - zOp = ts + 33417 /* "ge" */ + zOp = ts + 25238 /* "ge" */ break case 64: - zOp = ts + 33420 /* "match" */ + zOp = ts + 25241 /* "match" */ break case 65: - zOp = ts + 32658 /* "like" */ + zOp = ts + 24479 /* "like" */ break case 66: - zOp = ts + 32663 /* "glob" */ + zOp = ts + 24484 /* "glob" */ break case 67: - zOp = ts + 6216 /* "regexp" */ + zOp = ts + 4880 /* "regexp" */ break case 68: - zOp = ts + 33426 /* "ne" */ + zOp = ts + 25247 /* "ne" */ break case 69: - zOp = ts + 33429 /* "isnot" */ + zOp = ts + 25250 /* "isnot" */ break case 70: - zOp = ts + 33435 /* "isnotnull" */ + zOp = ts + 25256 /* "isnotnull" */ break case 71: - zOp = ts + 33445 /* "isnull" */ + zOp = ts + 25266 /* "isnull" */ break case 72: - zOp = ts + 5499 /* "is" */ + zOp = ts + 4257 /* "is" */ break } - tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+33452 /* "op" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+25273 /* "op" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, zOp, -1)) - tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+33455 /* "column" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+25276 /* "column" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewIntObj(tls, (*sqlite3_index_constraint)(unsafe.Pointer(pCons)).FiColumn)) - tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+33462 /* "usable" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+25283 /* "usable" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewIntObj(tls, int32((*sqlite3_index_constraint)(unsafe.Pointer(pCons)).Fusable))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pArg, pElem) @@ -51380,9 +51295,9 @@ func tclBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_b var pElem uintptr = tcl.XTcl_NewObj(tls) (*Tcl_Obj)(unsafe.Pointer(pElem)).FrefCount++ - tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+33455 /* "column" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+25276 /* "column" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewIntObj(tls, (*sqlite3_index_orderby)(unsafe.Pointer(pOrder)).FiColumn)) - tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+33469 /* "desc" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewStringObj(tls, ts+25290 /* "desc" */, -1)) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pElem, tcl.XTcl_NewIntObj(tls, int32((*sqlite3_index_orderby)(unsafe.Pointer(pOrder)).Fdesc))) tcl.XTcl_ListObjAppendElement(tls, uintptr(0), pArg, pElem) @@ -51414,7 +51329,7 @@ func tclBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_b if rc != 0 { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) rc = 1 - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, zErr)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, zErr)) } else { // Analyze the scripts return value. The return value should be a tcl // list object with an even number of elements. The first element of each @@ -51435,35 +51350,35 @@ func tclBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_b if rc != 0 { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) rc = 1 - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, zErr)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, zErr)) } else { var iArgv int32 = 1 for ii = 0; (rc == 0) && (ii < *(*int32)(unsafe.Pointer(bp + 48 /* nElem */))); ii = ii + (2) { var zCmd uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* apElem */)) + uintptr(ii)*8))) var p uintptr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 56 /* apElem */)) + uintptr((ii+1))*8)) - if sqlite3.Xsqlite3_stricmp(tls, ts+33474 /* "cost" */, zCmd) == 0 { + if sqlite3.Xsqlite3_stricmp(tls, ts+25295 /* "cost" */, zCmd) == 0 { rc = tcl.XTcl_GetDoubleFromObj(tls, interp, p, (pIdxInfo + 64 /* &.estimatedCost */)) - } else if sqlite3.Xsqlite3_stricmp(tls, ts+33479 /* "orderby" */, zCmd) == 0 { + } else if sqlite3.Xsqlite3_stricmp(tls, ts+25300 /* "orderby" */, zCmd) == 0 { rc = tcl.XTcl_GetIntFromObj(tls, interp, p, (pIdxInfo + 60 /* &.orderByConsumed */)) - } else if sqlite3.Xsqlite3_stricmp(tls, ts+33487 /* "idxnum" */, zCmd) == 0 { + } else if sqlite3.Xsqlite3_stricmp(tls, ts+25308 /* "idxnum" */, zCmd) == 0 { rc = tcl.XTcl_GetIntFromObj(tls, interp, p, (pIdxInfo + 40 /* &.idxNum */)) - } else if sqlite3.Xsqlite3_stricmp(tls, ts+33494 /* "idxstr" */, zCmd) == 0 { + } else if sqlite3.Xsqlite3_stricmp(tls, ts+25315 /* "idxstr" */, zCmd) == 0 { sqlite3.Xsqlite3_free(tls, (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr) - (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+16, tcl.XTcl_GetString(tls, p))) + (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxStr = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+16, tcl.XTcl_GetString(tls, p))) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 - } else if sqlite3.Xsqlite3_stricmp(tls, ts+33501 /* "rows" */, zCmd) == 0 { + } else if sqlite3.Xsqlite3_stricmp(tls, ts+25322 /* "rows" */, zCmd) == 0 { *(*Tcl_WideInt)(unsafe.Pointer(bp + 64 /* x */)) = int64(0) rc = tcl.XTcl_GetWideIntFromObj(tls, interp, p, bp+64 /* &x */) (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FestimatedRows = sqlite3_int64(tRowcnt(*(*Tcl_WideInt)(unsafe.Pointer(bp + 64 /* x */)))) - } else if (sqlite3.Xsqlite3_stricmp(tls, ts+33506 /* "use" */, zCmd) == 0) || - (sqlite3.Xsqlite3_stricmp(tls, ts+33510 /* "omit" */, zCmd) == 0) { + } else if (sqlite3.Xsqlite3_stricmp(tls, ts+25327 /* "use" */, zCmd) == 0) || + (sqlite3.Xsqlite3_stricmp(tls, ts+25331 /* "omit" */, zCmd) == 0) { // var iCons int32 at bp+72, 4 rc = tcl.XTcl_GetIntFromObj(tls, interp, p, bp+72 /* &iCons */) if rc == 0 { if (*(*int32)(unsafe.Pointer(bp + 72 /* iCons */)) < 0) || (*(*int32)(unsafe.Pointer(bp + 72 /* iCons */)) >= (*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FnConstraint) { rc = 1 - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+33515 /* "unexpected: %d" */, crt.VaList(bp+24, *(*int32)(unsafe.Pointer(bp + 72 /* iCons */)))) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+25336 /* "unexpected: %d" */, crt.VaList(bp+24, *(*int32)(unsafe.Pointer(bp + 72 /* iCons */)))) } else { var bOmit int32 = (crt.Bool32((int32(*(*int8)(unsafe.Pointer(zCmd + uintptr(0)))) == 'o') || (int32(*(*int8)(unsafe.Pointer(zCmd + uintptr(0)))) == 'O'))) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(*(*int32)(unsafe.Pointer(bp + 72 /* iCons */)))*8)).FargvIndex = crt.PostIncInt32(&iArgv, 1) @@ -51472,11 +51387,11 @@ func tclBestIndex(tls *crt.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* test_b } } else { rc = 1 - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+33390 /* "unexpected: %s" */, crt.VaList(bp+32, zCmd)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+25211 /* "unexpected: %s" */, crt.VaList(bp+32, zCmd)) } if (rc != 0) && ((*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg == uintptr(0)) { var zErr uintptr = tcl.XTcl_GetStringResult(tls, interp) - (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+40, zErr)) + (*tcl_vtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+40, zErr)) } } } @@ -51512,36 +51427,36 @@ func register_tcl_module(tls *crt.TLS, clientData ClientData, interp uintptr, ob // var db uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { return 1 } - sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+33530 /* "tcl" */, uintptr(unsafe.Pointer(&tclModule)), interp) + sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+25351 /* "tcl" */, uintptr(unsafe.Pointer(&tclModule)), interp) return 0 } // Register commands with the TCL interpreter. func Sqlitetesttcl_Init(tls *crt.TLS, interp uintptr) int32 { /* test_bestindex.c:604:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd4)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd3)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd4[i].FzName, - aObjCmd4[i].FxProc, aObjCmd4[i].FclientData, uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd3[i].FzName, + aObjCmd3[i].FxProc, aObjCmd3[i].FclientData, uintptr(0)) } return 0 } -var aObjCmd4 = [1]struct { +var aObjCmd3 = [1]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ - {FzName: ts + 33534 /* "register_tcl_mod..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 25355 /* "register_tcl_mod..." */, FxProc: 0, FclientData: uintptr(0)}, } /* test_bestindex.c:610:5 */ // Return a pointer to a buffer containing a text representation of the @@ -51551,7 +51466,7 @@ func ptrToText(tls *crt.TLS, p uintptr) uintptr { /* test_blob.c:37:13: */ bp := tls.Alloc(8) defer tls.Free(8) - sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof(buf)) - uint64(1))), uintptr(unsafe.Pointer(&buf)), ts+20002 /* "%p" */, crt.VaList(bp, p)) + sqlite3.Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof(buf)) - uint64(1))), uintptr(unsafe.Pointer(&buf)), ts+11197 /* "%p" */, crt.VaList(bp, p)) return uintptr(unsafe.Pointer(&buf)) } @@ -51577,7 +51492,7 @@ func blobHandleFromObj1(tls *crt.TLS, interp uintptr, pObj uintptr, ppBlob uintp z = tcl.XTcl_GetStringFromObj(tls, pObj, bp /* &n */) if *(*int32)(unsafe.Pointer(bp /* n */)) == 0 { *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) - } else if (*(*int32)(unsafe.Pointer(bp /* n */)) > 9) && (0 == crt.Xmemcmp(tls, ts+33554 /* "incrblob_" */, z, uint64(9))) { + } else if (*(*int32)(unsafe.Pointer(bp /* n */)) > 9) && (0 == crt.Xmemcmp(tls, ts+25375 /* "incrblob_" */, z, uint64(9))) { // var notUsed int32 at bp+4, 4 var channel Tcl_Channel @@ -51641,7 +51556,7 @@ func test_blob_open(tls *crt.TLS, clientData ClientData, interp uintptr, objc in var rc int32 if objc != 8 { - var zUsage uintptr = ts + 33564 /* "DB DATABASE TABL..." */ + var zUsage uintptr = ts + 25385 /* "DB DATABASE TABL..." */ tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, zUsage) return 1 } @@ -51685,7 +51600,7 @@ func test_blob_close(tls *crt.TLS, clientData ClientData, interp uintptr, objc i var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } @@ -51712,7 +51627,7 @@ func test_blob_bytes(tls *crt.TLS, clientData ClientData, interp uintptr, objc i var nByte int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } @@ -51752,7 +51667,7 @@ func test_blob_read(tls *crt.TLS, clientData ClientData, interp uintptr, objc in var rc int32 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33616 /* "CHANNEL OFFSET N" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25437 /* "CHANNEL OFFSET N" */) return 1 } @@ -51767,7 +51682,7 @@ func test_blob_read(tls *crt.TLS, clientData ClientData, interp uintptr, objc in if *(*int32)(unsafe.Pointer(bp + 28 /* nByte */)) > 0 { zBuf = tcl.XTcl_AttemptAlloc(tls, uint32(*(*int32)(unsafe.Pointer(bp + 28 /* nByte */)))) if zBuf == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+33633 /* "out of memory in..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+25454 /* "out of memory in..." */, 0)) return 1 } } @@ -51812,7 +51727,7 @@ func test_blob_write(tls *crt.TLS, clientData ClientData, interp uintptr, objc i // var nBuf int32 at bp+12, 4 if (objc != 4) && (objc != 5) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33694 /* "HANDLE OFFSET DA..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25515 /* "HANDLE OFFSET DA..." */) return 1 } @@ -51843,24 +51758,24 @@ func test_blob_write(tls *crt.TLS, clientData ClientData, interp uintptr, objc i // Register commands with the TCL interpreter. func Sqlitetest_blob_Init(tls *crt.TLS, interp uintptr) int32 { /* test_blob.c:312:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd5)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd4)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd5[i].FzName, aObjCmd5[i].FxProc, uintptr(0), uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd4[i].FzName, aObjCmd4[i].FxProc, uintptr(0), uintptr(0)) } return 0 } -var aObjCmd5 = [5]struct { +var aObjCmd4 = [5]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 33721 /* "sqlite3_blob_ope..." */, FxProc: 0}, - {FzName: ts + 33739 /* "sqlite3_blob_clo..." */, FxProc: 0}, - {FzName: ts + 33758 /* "sqlite3_blob_byt..." */, FxProc: 0}, - {FzName: ts + 33777 /* "sqlite3_blob_rea..." */, FxProc: 0}, - {FzName: ts + 33795 /* "sqlite3_blob_wri..." */, FxProc: 0}, + {FzName: ts + 25542 /* "sqlite3_blob_ope..." */, FxProc: 0}, + {FzName: ts + 25560 /* "sqlite3_blob_clo..." */, FxProc: 0}, + {FzName: ts + 25579 /* "sqlite3_blob_byt..." */, FxProc: 0}, + {FzName: ts + 25598 /* "sqlite3_blob_rea..." */, FxProc: 0}, + {FzName: ts + 25616 /* "sqlite3_blob_wri..." */, FxProc: 0}, } /* test_blob.c:317:5 */ // end block for C++ @@ -51943,357 +51858,357 @@ func sqlite3BtreeCursorList(tls *crt.TLS, p uintptr) { /* test_btree.c:52:6: */ // according to the compile-time configuration of the database. Test // procedures use this to determine when tests should be omitted. func set_options(tls *crt.TLS, interp uintptr) { /* test_config.c:47:13: */ - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33829 /* "malloc_usable_si..." */, ts+8293, /* "0" */ + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25650 /* "malloc_usable_si..." */, ts+12045, /* "0" */ 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33848 /* "rowid32" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25669 /* "rowid32" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33856 /* "casesensitivelik..." */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25677 /* "casesensitivelik..." */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33874 /* "curdir" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25695 /* "curdir" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33883 /* "win32malloc" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25704 /* "win32malloc" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33895 /* "debug" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25716 /* "debug" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33901 /* "default_ckptfull..." */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25722 /* "default_ckptfull..." */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33923 /* "direct_read" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25744 /* "direct_read" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33935 /* "dirsync" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25756 /* "dirsync" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33943 /* "lfs" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25764 /* "lfs" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33947 /* "pagecache_overfl..." */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25768 /* "pagecache_overfl..." */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33972 /* "mmap" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25793 /* "mmap" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33977, /* "worker_threads" */ - ts+33992 /* "8" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25798, /* "worker_threads" */ + ts+25813 /* "8" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+33994 /* "memdebug" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25815 /* "memdebug" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34003 /* "8_3_names" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25824 /* "8_3_names" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34013 /* "cursorhints" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25834 /* "cursorhints" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34025 /* "hiddencolumns" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25846 /* "hiddencolumns" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+20142 /* "deserialize" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+11334 /* "deserialize" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34039 /* "mem3" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25860 /* "mem3" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34044 /* "mem5" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25865 /* "mem5" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34049 /* "offset_sql_func" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25870 /* "offset_sql_func" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+20250 /* "preupdate" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+11442 /* "preupdate" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34065 /* "snapshot" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25886 /* "snapshot" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34074 /* "mutex" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25895 /* "mutex" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34080 /* "mutex_noop" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25901 /* "mutex_noop" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34091 /* "altertable" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25912 /* "altertable" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+2264 /* "analyze" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+1817 /* "analyze" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34102 /* "api_armor" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25923 /* "api_armor" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34112 /* "atomicwrite" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25933 /* "atomicwrite" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34124 /* "json1" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25945 /* "json1" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34130 /* "has_codec" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25951 /* "has_codec" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34140 /* "like_match_blobs" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25961 /* "like_match_blobs" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34157 /* "attach" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25978 /* "attach" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34164 /* "auth" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25985 /* "auth" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34169 /* "autoinc" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25990 /* "autoinc" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+19726 /* "autoindex" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+10905 /* "autoindex" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34177 /* "autoreset" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+25998 /* "autoreset" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34187 /* "autovacuum" */, ts+33881 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34198, /* "default_autovacu..." */ - ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26008 /* "autovacuum" */, ts+25702 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26019, /* "default_autovacu..." */ + ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34217 /* "between_opt" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26038 /* "between_opt" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34229 /* "builtin_test" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26050 /* "builtin_test" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34242 /* "bloblit" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26063 /* "bloblit" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34250 /* "cast" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26071 /* "cast" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34255 /* "check" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26076 /* "check" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34261 /* "cte" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26082 /* "cte" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34265 /* "columnmetadata" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26086 /* "columnmetadata" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34280 /* "oversize_cell_ch..." */, ts+8293, /* "0" */ + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26101 /* "oversize_cell_ch..." */, ts+12045, /* "0" */ 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34300 /* "compileoption_di..." */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26121 /* "compileoption_di..." */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+20121 /* "complete" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+11313 /* "complete" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34320 /* "compound" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26141 /* "compound" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34329 /* "conflict" */, ts+33881 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34338 /* "crashtest" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26150 /* "conflict" */, ts+25702 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26159 /* "crashtest" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34348 /* "datetime" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26169 /* "datetime" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34357 /* "decltype" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26178 /* "decltype" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34366 /* "deprecated" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26187 /* "deprecated" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34377 /* "diskio" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26198 /* "diskio" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+4515 /* "explain" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+3448 /* "explain" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34384 /* "floatingpoint" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26205 /* "floatingpoint" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34398 /* "foreignkey" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26219 /* "foreignkey" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34409 /* "fts1" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26230 /* "fts1" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34414 /* "fts2" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26235 /* "fts2" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34419 /* "fts3" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26240 /* "fts3" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34424 /* "fts5" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26245 /* "fts5" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34429 /* "fts3_unicode" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26250 /* "fts3_unicode" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34442 /* "fts4_deferred" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26263 /* "fts4_deferred" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34456 /* "gettable" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26277 /* "gettable" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34465 /* "icu" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26286 /* "icu" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34469 /* "icu_collations" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26290 /* "icu_collations" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+17096 /* "incrblob" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+8647 /* "incrblob" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34484 /* "integrityck" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26305 /* "integrityck" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34496 /* "legacyformat" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26317 /* "legacyformat" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34509 /* "like_opt" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26330 /* "like_opt" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34518 /* "load_ext" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26339 /* "load_ext" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34527 /* "localtime" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26348 /* "localtime" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34537 /* "lookaside" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26358 /* "lookaside" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34547, /* "long_double" */ + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26368, /* "long_double" */ func() uintptr { if uint64(unsafe.Sizeof(float64(0))) > uint64(unsafe.Sizeof(float64(0))) { - return ts + 33881 /* "1" */ + return ts + 25702 /* "1" */ } - return ts + 8293 /* "0" */ + return ts + 12045 /* "0" */ }(), 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34559 /* "memorydb" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26380 /* "memorydb" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34568 /* "memorymanage" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26389 /* "memorymanage" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34581 /* "mergesort" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26402 /* "mergesort" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34591 /* "null_trim" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26412 /* "null_trim" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34601 /* "or_opt" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26422 /* "or_opt" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34608 /* "rbu" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26429 /* "rbu" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34612 /* "pager_pragmas" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26433 /* "pager_pragmas" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34626 /* "pragma" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26447 /* "pragma" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+16581 /* "progress" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+11460 /* "progress" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34633 /* "reindex" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26454 /* "reindex" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34641 /* "rtree" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26462 /* "rtree" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34647 /* "rtree_int_only" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26468 /* "rtree_int_only" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34662 /* "schema_pragmas" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26483 /* "schema_pragmas" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34677 /* "schema_version" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26498 /* "schema_version" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34692 /* "session" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26513 /* "session" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+25034 /* "stat4" */, ts+8293 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34700 /* "stmtvtab" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+16415 /* "stat4" */, ts+12045 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26521 /* "stmtvtab" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34709 /* "scanstatus" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26530 /* "scanstatus" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34720 /* "lock_proxy_pragm..." */, ts+8293 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34739 /* "prefer_proxy_loc..." */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26541 /* "lock_proxy_pragm..." */, ts+12045 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26560 /* "prefer_proxy_loc..." */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34760 /* "shared_cache" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26581 /* "shared_cache" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34773 /* "subquery" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26594 /* "subquery" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34782 /* "tclvar" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26603 /* "tclvar" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34789, /* "threadsafe" */ + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26610, /* "threadsafe" */ func() uintptr { - if 2 != 0 { - return ts + 33881 /* "1" */ + if 1 != 0 { + return ts + 25702 /* "1" */ } - return ts + 8293 /* "0" */ + return ts + 12045 /* "0" */ }(), 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34800, /* "threadsafe1" */ + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26621, /* "threadsafe1" */ func() uintptr { - if 2 == 1 { - return ts + 33881 /* "1" */ + if 1 == 1 { + return ts + 25702 /* "1" */ } - return ts + 8293 /* "0" */ + return ts + 12045 /* "0" */ }(), 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34812, /* "threadsafe2" */ + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26633, /* "threadsafe2" */ func() uintptr { - if 2 == 2 { - return ts + 33881 /* "1" */ + if 1 == 2 { + return ts + 25702 /* "1" */ } - return ts + 8293 /* "0" */ + return ts + 12045 /* "0" */ }(), 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34824 /* "tempdb" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26645 /* "tempdb" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+20335 /* "trace" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+11536 /* "trace" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34831 /* "trigger" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26652 /* "trigger" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34839 /* "truncate_opt" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26660 /* "truncate_opt" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+22357 /* "utf16" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+13590 /* "utf16" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+15560 /* "vacuum" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26673 /* "vacuum" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34852 /* "view" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26680 /* "view" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34857 /* "vtab" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26685 /* "vtab" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34862 /* "wal" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26690 /* "wal" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34866 /* "wsd" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26694 /* "wsd" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34870 /* "update_delete_li..." */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26698 /* "update_delete_li..." */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+20362 /* "unlock_notify" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+11563 /* "unlock_notify" */, ts+25702 /* "1" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34890 /* "fast_secure_dele..." */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26718 /* "fast_secure_dele..." */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34909 /* "secure_delete" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26737 /* "secure_delete" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34923 /* "userauth" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26751 /* "userauth" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34932 /* "multiplex_ext_ov..." */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26760 /* "multiplex_ext_ov..." */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34956 /* "yytrackmaxstackd..." */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26784 /* "yytrackmaxstackd..." */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34977 /* "sqllog" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26805 /* "sqllog" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34984 /* "uri_00_error" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26812 /* "uri_00_error" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+34997 /* "normalize" */, ts+8293 /* "0" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26825 /* "normalize" */, ts+12045 /* "0" */, 1) - tcl.XTcl_SetVar2(tls, interp, ts+33814 /* "sqlite_options" */, ts+35007 /* "windowfunc" */, ts+33881 /* "1" */, 1) + tcl.XTcl_SetVar2(tls, interp, ts+25635 /* "sqlite_options" */, ts+26835 /* "windowfunc" */, ts+25702 /* "1" */, 1) { - tcl.XTcl_LinkVar(tls, interp, ts+35018 /* "SQLITE_MAX_LENGT..." */, uintptr(unsafe.Pointer(&cv_MAX_LENGTH)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+26846 /* "SQLITE_MAX_LENGT..." */, uintptr(unsafe.Pointer(&cv_MAX_LENGTH)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35036 /* "SQLITE_MAX_COLUM..." */, uintptr(unsafe.Pointer(&cv_MAX_COLUMN)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+26864 /* "SQLITE_MAX_COLUM..." */, uintptr(unsafe.Pointer(&cv_MAX_COLUMN)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35054 /* "SQLITE_MAX_SQL_L..." */, uintptr(unsafe.Pointer(&cv_MAX_SQL_LENGTH)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+26882 /* "SQLITE_MAX_SQL_L..." */, uintptr(unsafe.Pointer(&cv_MAX_SQL_LENGTH)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35076 /* "SQLITE_MAX_EXPR_..." */, uintptr(unsafe.Pointer(&cv_MAX_EXPR_DEPTH)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+26904 /* "SQLITE_MAX_EXPR_..." */, uintptr(unsafe.Pointer(&cv_MAX_EXPR_DEPTH)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35098 /* "SQLITE_MAX_COMPO..." */, uintptr(unsafe.Pointer(&cv_MAX_COMPOUND_SELECT)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+26926 /* "SQLITE_MAX_COMPO..." */, uintptr(unsafe.Pointer(&cv_MAX_COMPOUND_SELECT)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35125 /* "SQLITE_MAX_VDBE_..." */, uintptr(unsafe.Pointer(&cv_MAX_VDBE_OP)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+26953 /* "SQLITE_MAX_VDBE_..." */, uintptr(unsafe.Pointer(&cv_MAX_VDBE_OP)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35144 /* "SQLITE_MAX_FUNCT..." */, uintptr(unsafe.Pointer(&cv_MAX_FUNCTION_ARG)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+26972 /* "SQLITE_MAX_FUNCT..." */, uintptr(unsafe.Pointer(&cv_MAX_FUNCTION_ARG)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35168 /* "SQLITE_MAX_VARIA..." */, uintptr(unsafe.Pointer(&cv_MAX_VARIABLE_NUMBER)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+26996 /* "SQLITE_MAX_VARIA..." */, uintptr(unsafe.Pointer(&cv_MAX_VARIABLE_NUMBER)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35195 /* "SQLITE_MAX_PAGE_..." */, uintptr(unsafe.Pointer(&cv_MAX_PAGE_SIZE)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27023 /* "SQLITE_MAX_PAGE_..." */, uintptr(unsafe.Pointer(&cv_MAX_PAGE_SIZE)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35216 /* "SQLITE_MAX_PAGE_..." */, uintptr(unsafe.Pointer(&cv_MAX_PAGE_COUNT)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27044 /* "SQLITE_MAX_PAGE_..." */, uintptr(unsafe.Pointer(&cv_MAX_PAGE_COUNT)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35238 /* "SQLITE_MAX_LIKE_..." */, uintptr(unsafe.Pointer(&cv_MAX_LIKE_PATTERN_LENGTH)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27066 /* "SQLITE_MAX_LIKE_..." */, uintptr(unsafe.Pointer(&cv_MAX_LIKE_PATTERN_LENGTH)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35269 /* "SQLITE_MAX_TRIGG..." */, uintptr(unsafe.Pointer(&cv_MAX_TRIGGER_DEPTH)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27097 /* "SQLITE_MAX_TRIGG..." */, uintptr(unsafe.Pointer(&cv_MAX_TRIGGER_DEPTH)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35294 /* "SQLITE_DEFAULT_C..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_CACHE_SIZE)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27122 /* "SQLITE_DEFAULT_C..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_CACHE_SIZE)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35320 /* "SQLITE_DEFAULT_P..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_PAGE_SIZE)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27148 /* "SQLITE_DEFAULT_P..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_PAGE_SIZE)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35345 /* "SQLITE_DEFAULT_F..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_FILE_FORMAT)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27173 /* "SQLITE_DEFAULT_F..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_FILE_FORMAT)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35372 /* "SQLITE_DEFAULT_S..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_SYNCHRONOUS)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27200 /* "SQLITE_DEFAULT_S..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_SYNCHRONOUS)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35399 /* "SQLITE_DEFAULT_W..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_WAL_SYNCHRONOUS)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27227 /* "SQLITE_DEFAULT_W..." */, uintptr(unsafe.Pointer(&cv_DEFAULT_WAL_SYNCHRONOUS)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35430 /* "SQLITE_MAX_ATTAC..." */, uintptr(unsafe.Pointer(&cv_MAX_ATTACHED)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27258 /* "SQLITE_MAX_ATTAC..." */, uintptr(unsafe.Pointer(&cv_MAX_ATTACHED)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35450 /* "SQLITE_MAX_DEFAU..." */, uintptr(unsafe.Pointer(&cv_MAX_DEFAULT_PAGE_SIZE)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27278 /* "SQLITE_MAX_DEFAU..." */, uintptr(unsafe.Pointer(&cv_MAX_DEFAULT_PAGE_SIZE)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35479 /* "SQLITE_MAX_WORKE..." */, uintptr(unsafe.Pointer(&cv_MAX_WORKER_THREADS)), (1 | 0x80)) + tcl.XTcl_LinkVar(tls, interp, ts+27307 /* "SQLITE_MAX_WORKE..." */, uintptr(unsafe.Pointer(&cv_MAX_WORKER_THREADS)), (1 | 0x80)) } { - tcl.XTcl_LinkVar(tls, interp, ts+35505 /* "TEMP_STORE" */, uintptr(unsafe.Pointer(&cv_TEMP_STORE)), + tcl.XTcl_LinkVar(tls, interp, ts+27333 /* "TEMP_STORE" */, uintptr(unsafe.Pointer(&cv_TEMP_STORE)), (1 | 0x80)) } @@ -52356,9 +52271,7 @@ func sqlite3Delete83Name(tls *crt.TLS, z uintptr) { /* test_delete.c:46:13: */ // If an error occurs, non-zero is returned. Or, if no error occurs, zero. func sqlite3DeleteUnlinkIfExists(tls *crt.TLS, pVfs uintptr, zFile uintptr, pbExists uintptr) int32 { /* test_delete.c:60:12: */ var rc int32 = 1 - if !(pVfs == uintptr(0)) { - crt.X__assert_fail(tls, ts+35516 /* "pVfs==0" */, ts+35524 /* "testdata/sqlite-..." */, uint32(76), uintptr(unsafe.Pointer(&__func__101))) - } + rc = crt.Xaccess(tls, zFile, 0) if rc != 0 { if (*(*int32)(unsafe.Pointer(crt.X__errno_location(tls)))) == 2 { @@ -52376,8 +52289,6 @@ func sqlite3DeleteUnlinkIfExists(tls *crt.TLS, pVfs uintptr, zFile uintptr, pbEx return rc } -var __func__101 = *(*[28]int8)(unsafe.Pointer(ts + 35570 /* "sqlite3DeleteUnl..." */)) /* test_delete.c:64:2 */ - // Delete the database file identified by the string argument passed to this // function. The string must contain a filename, not an SQLite URI. func sqlite3_delete_database(tls *crt.TLS, zFile uintptr) int32 { /* test_delete.c:95:16: */ @@ -52389,15 +52300,15 @@ func sqlite3_delete_database(tls *crt.TLS, zFile uintptr) int32 { /* test_delete var rc int32 = 0 // System error code var i int32 // Iterate through azFmt[] and aMFile[] - *(*[4]uintptr)(unsafe.Pointer(bp + 24 /* azFmt */)) = [4]uintptr{ts + 130 /* "%s" */, ts + 35598 /* "%s-journal" */, ts + 14141 /* "%s-wal" */, ts + 35609 /* "%s-shm" */} + *(*[4]uintptr)(unsafe.Pointer(bp + 24 /* azFmt */)) = [4]uintptr{ts /* "%s" */, ts + 27344 /* "%s-journal" */, ts + 27355 /* "%s-wal" */, ts + 27362 /* "%s-shm" */} *(*[6]MFile)(unsafe.Pointer(bp + 56 /* aMFile */)) = [6]MFile{ - {FzFmt: ts + 35616 /* "%s%03d" */, FiOffset: 0, Fb83: 0}, - {FzFmt: ts + 35623 /* "%s-journal%03d" */, FiOffset: 0, Fb83: 0}, - {FzFmt: ts + 35638 /* "%s-wal%03d" */, FiOffset: 0, Fb83: 0}, - {FzFmt: ts + 35616 /* "%s%03d" */, FiOffset: 0, Fb83: 1}, - {FzFmt: ts + 35623 /* "%s-journal%03d" */, FiOffset: 400, Fb83: 1}, - {FzFmt: ts + 35638 /* "%s-wal%03d" */, FiOffset: 700, Fb83: 1}, + {FzFmt: ts + 27369 /* "%s%03d" */, FiOffset: 0, Fb83: 0}, + {FzFmt: ts + 27376 /* "%s-journal%03d" */, FiOffset: 0, Fb83: 0}, + {FzFmt: ts + 27391 /* "%s-wal%03d" */, FiOffset: 0, Fb83: 0}, + {FzFmt: ts + 27369 /* "%s%03d" */, FiOffset: 0, Fb83: 1}, + {FzFmt: ts + 27376 /* "%s-journal%03d" */, FiOffset: 400, Fb83: 1}, + {FzFmt: ts + 27391 /* "%s-wal%03d" */, FiOffset: 700, Fb83: 1}, } var pVfs uintptr = uintptr(0) @@ -52454,6 +52365,542 @@ type MFile = struct { Fb83 int32 } +// Some versions of <linux/posix_types.h> define this macros. +// It's easier to assume 8-bit bytes than to get CHAR_BIT. + +// fd_set for select and pselect. +type fd_set2 = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */ + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX Standard: 6.5 File Control Operations <fcntl.h> + +// Size of the write buffer used by journal files in bytes. + +// The maximum pathname length supported by this VFS. + +// When using this VFS, the sqlite3_file* handles that SQLite uses are +// actually pointers to instances of type DemoFile. +type DemoFile1 = struct { + Fbase sqlite3_file + Ffd int32 + FaBuffer uintptr + FnBuffer int32 + FiBufferOfst sqlite3_int64 +} + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// POSIX Standard: 6.5 File Control Operations <fcntl.h> + +// Size of the write buffer used by journal files in bytes. + +// The maximum pathname length supported by this VFS. + +// When using this VFS, the sqlite3_file* handles that SQLite uses are +// actually pointers to instances of type DemoFile. +type DemoFile = DemoFile1 /* test_demovfs.c:147:25 */ + +// Write directly to the file passed as the first argument. Even if the +// file has a write-buffer (DemoFile.aBuffer), ignore it. +func demoDirectWrite(tls *crt.TLS, p uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_demovfs.c:161:12: */ + var ofst off_t // Return value from lseek() + var nWrite size_t // Return value from write() + + ofst = crt.Xlseek(tls, (*DemoFile)(unsafe.Pointer(p)).Ffd, int64(iOfst), 0) + if sqlite_int64(ofst) != iOfst { + return (10 | (int32(3) << 8)) + } + + nWrite = size_t(crt.Xwrite(tls, (*DemoFile)(unsafe.Pointer(p)).Ffd, zBuf, uint64(iAmt))) + if nWrite != size_t(iAmt) { + return (10 | (int32(3) << 8)) + } + + return 0 +} + +// Flush the contents of the DemoFile.aBuffer buffer to disk. This is a +// no-op if this particular file does not have a buffer (i.e. it is not +// a journal file) or if the buffer is currently empty. +func demoFlushBuffer(tls *crt.TLS, p uintptr) int32 { /* test_demovfs.c:188:12: */ + var rc int32 = 0 + if (*DemoFile)(unsafe.Pointer(p)).FnBuffer != 0 { + rc = demoDirectWrite(tls, p, (*DemoFile)(unsafe.Pointer(p)).FaBuffer, (*DemoFile)(unsafe.Pointer(p)).FnBuffer, (*DemoFile)(unsafe.Pointer(p)).FiBufferOfst) + (*DemoFile)(unsafe.Pointer(p)).FnBuffer = 0 + } + return rc +} + +// Close a file. +func demoClose(tls *crt.TLS, pFile uintptr) int32 { /* test_demovfs.c:200:12: */ + var rc int32 + var p uintptr = pFile + rc = demoFlushBuffer(tls, p) + sqlite3.Xsqlite3_free(tls, (*DemoFile)(unsafe.Pointer(p)).FaBuffer) + crt.Xclose(tls, (*DemoFile)(unsafe.Pointer(p)).Ffd) + return rc +} + +// Read data from a file. +func demoRead(tls *crt.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_demovfs.c:212:12: */ + var p uintptr = pFile + var ofst off_t // Return value from lseek() + var nRead int32 // Return value from read() + var rc int32 // Return code from demoFlushBuffer() + + // Flush any data in the write buffer to disk in case this operation + // is trying to read data the file-region currently cached in the buffer. + // It would be possible to detect this case and possibly save an + // unnecessary write here, but in practice SQLite will rarely read from + // a journal file when there is data cached in the write-buffer. + rc = demoFlushBuffer(tls, p) + if rc != 0 { + return rc + } + + ofst = crt.Xlseek(tls, (*DemoFile)(unsafe.Pointer(p)).Ffd, int64(iOfst), 0) + if sqlite_int64(ofst) != iOfst { + return (10 | (int32(1) << 8)) + } + nRead = int32(crt.Xread(tls, (*DemoFile)(unsafe.Pointer(p)).Ffd, zBuf, uint64(iAmt))) + + if nRead == iAmt { + return 0 + } else if nRead >= 0 { + if nRead < iAmt { + crt.Xmemset(tls, ((zBuf) + uintptr(nRead)), 0, (uint64(iAmt - nRead))) + } + return (10 | (int32(2) << 8)) + } + + return (10 | (int32(1) << 8)) +} + +// Write data to a crash-file. +func demoWrite(tls *crt.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_demovfs.c:255:12: */ + var p uintptr = pFile + + if (*DemoFile)(unsafe.Pointer(p)).FaBuffer != 0 { + var z uintptr = zBuf // Pointer to remaining data to write + var n int32 = iAmt // Number of bytes at z + var i sqlite3_int64 = iOfst // File offset to write to + + for n > 0 { + var nCopy int32 // Number of bytes to copy into buffer + + // If the buffer is full, or if this data is not being written directly + // following the data already buffered, flush the buffer. Flushing + // the buffer is a no-op if it is empty. + if ((*DemoFile)(unsafe.Pointer(p)).FnBuffer == 8192) || (((*DemoFile)(unsafe.Pointer(p)).FiBufferOfst + sqlite3_int64((*DemoFile)(unsafe.Pointer(p)).FnBuffer)) != i) { + var rc int32 = demoFlushBuffer(tls, p) + if rc != 0 { + return rc + } + } + + (*DemoFile)(unsafe.Pointer(p)).FiBufferOfst = (i - sqlite3_int64((*DemoFile)(unsafe.Pointer(p)).FnBuffer)) + + // Copy as much data as possible into the buffer. + nCopy = (8192 - (*DemoFile)(unsafe.Pointer(p)).FnBuffer) + if nCopy > n { + nCopy = n + } + crt.Xmemcpy(tls, ((*DemoFile)(unsafe.Pointer(p)).FaBuffer + uintptr((*DemoFile)(unsafe.Pointer(p)).FnBuffer)), z, uint64(nCopy)) + *(*int32)(unsafe.Pointer(p + 24 /* &.nBuffer */)) += (nCopy) + + n = n - (nCopy) + i = i + (sqlite3_int64(nCopy)) + z += uintptr(nCopy) + } + } else { + return demoDirectWrite(tls, p, zBuf, iAmt, iOfst) + } + + return 0 +} + +// Truncate a file. This is a no-op for this VFS (see header comments at +// the top of the file). +func demoTruncate(tls *crt.TLS, pFile uintptr, size sqlite_int64) int32 { /* test_demovfs.c:307:12: */ + return 0 +} + +// Sync the contents of the file to the persistent media. +func demoSync(tls *crt.TLS, pFile uintptr, flags int32) int32 { /* test_demovfs.c:317:12: */ + var p uintptr = pFile + var rc int32 + + rc = demoFlushBuffer(tls, p) + if rc != 0 { + return rc + } + + rc = crt.Xfsync(tls, (*DemoFile)(unsafe.Pointer(p)).Ffd) + return func() int32 { + if rc == 0 { + return 0 + } + return (10 | (int32(4) << 8)) + }() +} + +// Write the size of the file in bytes to *pSize. +func demoFileSize(tls *crt.TLS, pFile uintptr, pSize uintptr) int32 { /* test_demovfs.c:333:12: */ + bp := tls.Alloc(144) + defer tls.Free(144) + + var p uintptr = pFile + var rc int32 // Return code from fstat() call + // var sStat struct {Fst_dev uint64;Fst_ino uint64;Fst_nlink uint64;Fst_mode uint32;Fst_uid uint32;Fst_gid uint32;F__pad0 int32;Fst_rdev uint64;Fst_size int64;Fst_blksize int64;Fst_blocks int64;Fst_atim timespec;Fst_mtim timespec;Fst_ctim timespec;F__glibc_reserved [3]int64;} at bp, 144 + // Output of fstat() call + + // Flush the contents of the buffer to disk. As with the flush in the + // demoRead() method, it would be possible to avoid this and save a write + // here and there. But in practice this comes up so infrequently it is + // not worth the trouble. + rc = demoFlushBuffer(tls, p) + if rc != 0 { + return rc + } + + rc = crt2.Xfstat(tls, (*DemoFile)(unsafe.Pointer(p)).Ffd, bp /* &sStat */) + if rc != 0 { + return (10 | (int32(7) << 8)) + } + *(*sqlite_int64)(unsafe.Pointer(pSize)) = sqlite_int64((*struct { + Fst_dev uint64 + Fst_ino uint64 + Fst_nlink uint64 + Fst_mode uint32 + Fst_uid uint32 + Fst_gid uint32 + F__pad0 int32 + Fst_rdev uint64 + Fst_size int64 + Fst_blksize int64 + Fst_blocks int64 + Fst_atim timespec + Fst_mtim timespec + Fst_ctim timespec + F__glibc_reserved [3]int64 + })(unsafe.Pointer(bp /* &sStat */)).Fst_size) + return 0 +} + +// Locking functions. The xLock() and xUnlock() methods are both no-ops. +// The xCheckReservedLock() always indicates that no other process holds +// a reserved lock on the database file. This ensures that if a hot-journal +// file is found in the file-system it is rolled back. +func demoLock(tls *crt.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:360:12: */ + return 0 +} +func demoUnlock(tls *crt.TLS, pFile uintptr, eLock int32) int32 { /* test_demovfs.c:363:12: */ + return 0 +} +func demoCheckReservedLock(tls *crt.TLS, pFile uintptr, pResOut uintptr) int32 { /* test_demovfs.c:366:12: */ + *(*int32)(unsafe.Pointer(pResOut)) = 0 + return 0 +} + +// No xFileControl() verbs are implemented by this VFS. +func demoFileControl(tls *crt.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* test_demovfs.c:374:12: */ + return 12 +} + +// The xSectorSize() and xDeviceCharacteristics() methods. These two +// may return special values allowing SQLite to optimize file-system +// access to some extent. But it is also safe to simply return 0. +func demoSectorSize(tls *crt.TLS, pFile uintptr) int32 { /* test_demovfs.c:383:12: */ + return 0 +} +func demoDeviceCharacteristics(tls *crt.TLS, pFile uintptr) int32 { /* test_demovfs.c:386:12: */ + return 0 +} + +// Open a file handle. +func demoOpen(tls *crt.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int32, pOutFlags uintptr) int32 { /* test_demovfs.c:393:12: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + var p uintptr = pFile // Populate this structure + var oflags int32 = 0 // flags to pass to open() call + var aBuf uintptr = uintptr(0) + + if zName == uintptr(0) { + return 10 + } + + if (flags & 0x00000800) != 0 { + aBuf = sqlite3.Xsqlite3_malloc(tls, 8192) + if !(aBuf != 0) { + return 7 + } + } + + if (flags & 0x00000010) != 0 { + oflags = oflags | (0200) + } + if (flags & 0x00000004) != 0 { + oflags = oflags | (0100) + } + if (flags & 0x00000001) != 0 { + oflags = oflags | (00) + } + if (flags & 0x00000002) != 0 { + oflags = oflags | (02) + } + + crt.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(DemoFile{}))) + (*DemoFile)(unsafe.Pointer(p)).Ffd = crt.Xopen(tls, zName, oflags, crt.VaList(bp, 0600)) + if (*DemoFile)(unsafe.Pointer(p)).Ffd < 0 { + sqlite3.Xsqlite3_free(tls, aBuf) + return 14 + } + (*DemoFile)(unsafe.Pointer(p)).FaBuffer = aBuf + + if pOutFlags != 0 { + *(*int32)(unsafe.Pointer(pOutFlags)) = flags + } + (*DemoFile)(unsafe.Pointer(p)).Fbase.FpMethods = uintptr(unsafe.Pointer(&demoio)) + return 0 +} + +var demoio = sqlite3_io_methods{FiVersion: 1, FxClose: // iVersion +0, FxRead:// xClose +0, FxWrite:// xRead +0, FxTruncate:// xWrite +0, FxSync:// xTruncate +0, FxFileSize:// xSync +0, FxLock:// xFileSize +0, FxUnlock:// xLock +0, FxCheckReservedLock:// xUnlock +0, FxFileControl:// xCheckReservedLock +0, FxSectorSize:// xFileControl +0, FxDeviceCharacteristics:// xSectorSize +0, // xDeviceCharacteristics +} /* test_demovfs.c:400:35 */ + +// Delete the file identified by argument zPath. If the dirSync parameter +// is non-zero, then ensure the file-system modification to delete the +// file has been synced to disk before returning. +func demoDelete(tls *crt.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* test_demovfs.c:456:12: */ + bp := tls.Alloc(529) + defer tls.Free(529) + + var rc int32 // Return code + + rc = crt.Xunlink(tls, zPath) + if (rc != 0) && ((*(*int32)(unsafe.Pointer(crt.X__errno_location(tls)))) == 2) { + return 0 + } + + if (rc == 0) && (dirSync != 0) { + var dfd int32 // File descriptor open on directory + var i int32 // Iterator variable + // var zDir [513]int8 at bp+16, 513 + // Name of directory containing file zPath + + // Figure out the directory name from the path of the file deleted. + sqlite3.Xsqlite3_snprintf(tls, 512, bp+16 /* &zDir[0] */, ts /* "%s" */, crt.VaList(bp, zPath)) + *(*int8)(unsafe.Pointer(bp + 16 /* &zDir[0] */ + uintptr(512))) = int8(0) + for i = int32(crt.Xstrlen(tls, bp+16 /* &zDir[0] */)); (i > 1) && (int32(*(*int8)(unsafe.Pointer(bp + 16 /* &zDir[0] */ + uintptr(i)))) != '/'); i++ { + } + *(*int8)(unsafe.Pointer(bp + 16 /* &zDir[0] */ + uintptr(i))) = int8(0) + + // Open a file-descriptor on the directory. Sync. Close. + dfd = crt.Xopen(tls, bp+16 /* &zDir[0] */, 00, crt.VaList(bp+8, 0)) + if dfd < 0 { + rc = -1 + } else { + rc = crt.Xfsync(tls, dfd) + crt.Xclose(tls, dfd) + } + } + return func() int32 { + if rc == 0 { + return 0 + } + return (10 | (int32(10) << 8)) + }() +} + +// Query the file-system to see if the named file exists, is readable or +// is both readable and writable. +func demoAccess(tls *crt.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test_demovfs.c:499:12: */ + var rc int32 // access() return code + var eAccess int32 = 0 // Second argument to access() + + if flags == 1 { + eAccess = (4 | 2) + } + if flags == 2 { + eAccess = 4 + } + + rc = crt.Xaccess(tls, zPath, eAccess) + *(*int32)(unsafe.Pointer(pResOut)) = (crt.Bool32(rc == 0)) + return 0 +} + +// Argument zPath points to a nul-terminated string containing a file path. +// If zPath is an absolute path, then it is copied as is into the output +// buffer. Otherwise, if it is a relative path, then the equivalent full +// path is written to the output buffer. +// +// This function assumes that paths are UNIX style. Specifically, that: +// +// 1. Path components are separated by a '/'. and +// 2. Full paths begin with a '/' character. +func demoFullPathname(tls *crt.TLS, pVfs uintptr, zPath uintptr, nPathOut int32, zPathOut uintptr) int32 { /* test_demovfs.c:532:12: */ + bp := tls.Alloc(529) + defer tls.Free(529) + + // var zDir [513]int8 at bp+16, 513 + + if int32(*(*int8)(unsafe.Pointer(zPath + uintptr(0)))) == '/' { + *(*int8)(unsafe.Pointer(bp + 16 /* &zDir[0] */ + uintptr(0))) = int8(0) + } else { + if crt.Xgetcwd(tls, bp+16 /* &zDir[0] */, uint64(unsafe.Sizeof([513]int8{}))) == uintptr(0) { + return 10 + } + } + *(*int8)(unsafe.Pointer(bp + 16 /* &zDir[0] */ + uintptr(512))) = int8(0) + + sqlite3.Xsqlite3_snprintf(tls, nPathOut, zPathOut, ts+3680 /* "%s/%s" */, crt.VaList(bp, bp+16 /* &zDir[0] */, zPath)) + *(*int8)(unsafe.Pointer(zPathOut + uintptr((nPathOut - 1)))) = int8(0) + + return 0 +} + +// The following four VFS methods: +// +// xDlOpen +// xDlError +// xDlSym +// xDlClose +// +// are supposed to implement the functionality needed by SQLite to load +// extensions compiled as shared objects. This simple VFS does not support +// this functionality, so the following functions are no-ops. +func demoDlOpen(tls *crt.TLS, pVfs uintptr, zPath uintptr) uintptr { /* test_demovfs.c:564:13: */ + return uintptr(0) +} +func demoDlError(tls *crt.TLS, pVfs uintptr, nByte int32, zErrMsg uintptr) { /* test_demovfs.c:567:13: */ + sqlite3.Xsqlite3_snprintf(tls, nByte, zErrMsg, ts+27402 /* "Loadable extensi..." */, 0) + *(*int8)(unsafe.Pointer(zErrMsg + uintptr((nByte - 1)))) = int8(0) +} +func demoDlSym(tls *crt.TLS, pVfs uintptr, pH uintptr, z uintptr) uintptr { /* test_demovfs.c:571:13: */ + return uintptr(0) +} +func demoDlClose(tls *crt.TLS, pVfs uintptr, pHandle uintptr) { /* test_demovfs.c:574:13: */ + return +} + +// Parameter zByte points to a buffer nByte bytes in size. Populate this +// buffer with pseudo-random data. +func demoRandomness(tls *crt.TLS, pVfs uintptr, nByte int32, zByte uintptr) int32 { /* test_demovfs.c:582:12: */ + return 0 +} + +// Sleep for at least nMicro microseconds. Return the (approximate) number +// of microseconds slept for. +func demoSleep(tls *crt.TLS, pVfs uintptr, nMicro int32) int32 { /* test_demovfs.c:590:12: */ + crt.Xsleep(tls, (uint32(nMicro / 1000000))) + crt.Xusleep(tls, (uint32(nMicro % 1000000))) + return nMicro +} + +// Set *pTime to the current UTC time expressed as a Julian day. Return +// SQLITE_OK if successful, or an error code otherwise. +// +// http://en.wikipedia.org/wiki/Julian_day +// +// This implementation is not very good. The current time is rounded to +// an integer number of seconds. Also, assuming time_t is a signed 32-bit +// value, it will stop working some time in the year 2038 AD (the so-called +// "year 2038" problem that afflicts systems that store time this way). +func demoCurrentTime(tls *crt.TLS, pVfs uintptr, pTime uintptr) int32 { /* test_demovfs.c:607:12: */ + var t time_t = crt.Xtime(tls, uintptr(0)) + *(*float64)(unsafe.Pointer(pTime)) = ((float64(t) / 86400.0) + 2440587.5) + return 0 +} + +// This function returns a pointer to the VFS implemented in this file. +// To make the VFS available to SQLite: +// +// sqlite3_vfs_register(sqlite3_demovfs(), 0); +func sqlite3_demovfs(tls *crt.TLS) uintptr { /* test_demovfs.c:619:13: */ + return uintptr(unsafe.Pointer(&demovfs)) +} + +var demovfs = sqlite3_vfs{FiVersion: 1, FszOsFile: // iVersion +int32(unsafe.Sizeof(DemoFile{})), FmxPathname:// szOsFile +512, FpNext:// mxPathname +uintptr(0), FzName:// pNext +ts + 27440, /* "demo" */ FpAppData:// zName +uintptr(0), FxOpen:// pAppData +0, FxDelete:// xOpen +0, FxAccess:// xDelete +0, FxFullPathname:// xAccess +0, FxDlOpen:// xFullPathname +0, FxDlError:// xDlOpen +0, FxDlSym:// xDlError +0, FxDlClose:// xDlSym +0, FxRandomness:// xDlClose +0, FxSleep:// xRandomness +0, FxCurrentTime:// xSleep +0, // xCurrentTime +} /* test_demovfs.c:620:22 */ + +type Tcl_StatBuf = struct { + Fst_dev uint64 + Fst_ino uint64 + Fst_nlink uint64 + Fst_mode uint32 + Fst_uid uint32 + Fst_gid uint32 + F__pad0 int32 + Fst_rdev uint64 + Fst_size int64 + Fst_blksize int64 + Fst_blocks int64 + Fst_atim timespec + Fst_mtim timespec + Fst_ctim timespec + F__glibc_reserved [3]int64 +} /* tcl.h:470:25 */ + // end block for C++ // Local Variables: @@ -52462,7 +52909,25 @@ type MFile = struct { // fill-column: 78 // End: -func Sqlitetest_demovfs_Init(tls *crt.TLS, interp uintptr) int32 { /* test_demovfs.c:686:5: */ return 0 } +func register_demovfs(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_demovfs.c:657:26: */ + sqlite3.Xsqlite3_vfs_register(tls, sqlite3_demovfs(tls), 1) + return 0 +} +func unregister_demovfs(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_demovfs.c:666:26: */ + sqlite3.Xsqlite3_vfs_unregister(tls, sqlite3_demovfs(tls)) + return 0 +} + +// Register commands with the TCL interpreter. +func Sqlitetest_demovfs_Init(tls *crt.TLS, interp uintptr) int32 { /* test_demovfs.c:679:5: */ + tcl.XTcl_CreateObjCommand(tls, interp, ts+27445 /* "register_demovfs" */, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 + }{register_demovfs})), uintptr(0), uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, ts+27462 /* "unregister_demov..." */, *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 + }{unregister_demovfs})), uintptr(0), uintptr(0)) + return 0 +} // Maximum pathname length supported by the devsym backend. @@ -52705,7 +53170,7 @@ var devsym_vfs = sqlite3_vfs{FiVersion: 2, FszOsFile: // iVersion int32(unsafe.Sizeof(devsym_file{})), FmxPathname:// szOsFile 512, FpNext:// mxPathname uintptr(0), FzName:// pNext -ts + 35649, /* "devsym" */ FpAppData:// zName +ts + 27481, /* "devsym" */ FpAppData:// zName uintptr(0), FxOpen:// pAppData 0, FxDelete:// xOpen 0, FxAccess:// xDelete @@ -52726,7 +53191,7 @@ var writecrash_vfs = sqlite3_vfs{FiVersion: 2, FszOsFile: // iVersion int32(unsafe.Sizeof(devsym_file{})), FmxPathname:// szOsFile 512, FpNext:// mxPathname uintptr(0), FzName:// pNext -ts + 35656, /* "writecrash" */ FpAppData:// zName +ts + 27488, /* "writecrash" */ FpAppData:// zName uintptr(0), FxOpen:// pAppData 0, FxDelete:// xOpen 0, FxAccess:// xDelete @@ -52786,7 +53251,7 @@ func devsym_crash_on_write(tls *crt.TLS, nWrite int32) { /* test_devsym.c:514:6: g1.FnWriteCrash = nWrite } -type Tcl_StatBuf = struct { +type Tcl_StatBuf1 = struct { Fst_dev uint64 Fst_ino uint64 Fst_nlink uint64 @@ -52879,7 +53344,7 @@ func fsdirConnect1(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint var pTab uintptr if argc != 3 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+33364 /* "wrong number of ..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+25185 /* "wrong number of ..." */, 0) return 1 } @@ -52890,7 +53355,7 @@ func fsdirConnect1(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint crt.Xmemset(tls, pTab, 0, uint64(unsafe.Sizeof(FsdirVtab{}))) *(*uintptr)(unsafe.Pointer(ppVtab)) = (pTab /* &.base */) - sqlite3.Xsqlite3_declare_vtab(tls, db, ts+35667 /* "CREATE TABLE xyz..." */) + sqlite3.Xsqlite3_declare_vtab(tls, db, ts+27499 /* "CREATE TABLE xyz..." */) return 0 } @@ -53071,7 +53536,7 @@ func fstreeConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint var pTab uintptr if argc != 3 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+33364 /* "wrong number of ..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+25185 /* "wrong number of ..." */, 0) return 1 } @@ -53083,7 +53548,7 @@ func fstreeConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint (*FstreeVtab)(unsafe.Pointer(pTab)).Fdb = db *(*uintptr)(unsafe.Pointer(ppVtab)) = (pTab /* &.base */) - sqlite3.Xsqlite3_declare_vtab(tls, db, ts+35696 /* "CREATE TABLE xyz..." */) + sqlite3.Xsqlite3_declare_vtab(tls, db, ts+27528 /* "CREATE TABLE xyz..." */) return 0 } @@ -53175,7 +53640,7 @@ func fstreeFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt var pCsr uintptr = pVtabCursor var pTab uintptr = (*FstreeCsr)(unsafe.Pointer(pCsr)).Fbase.FpVtab var rc int32 - var zSql uintptr = ts + 35732 /* "WITH r(d) AS ( ..." */ + var zSql uintptr = ts + 27564 /* "WITH r(d) AS ( ..." */ var zRoot uintptr var nRoot int32 var zPrefix uintptr @@ -53184,9 +53649,9 @@ func fstreeFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt var nDir int32 *(*[2]int8)(unsafe.Pointer(bp /* aWild */)) = [2]int8{int8(0), int8(0)} - zRoot = ts + 35964 /* "/" */ + zRoot = ts + 27796 /* "/" */ nRoot = 1 - zPrefix = ts + 792 /* "" */ + zPrefix = ts + 488 /* "" */ nPrefix = 0 zDir = zRoot @@ -53305,7 +53770,7 @@ func fsConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, var zDb uintptr = *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)) if argc != 4 { - *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+33364 /* "wrong number of ..." */, 0) + *(*uintptr)(unsafe.Pointer(pzErr)) = sqlite3.Xsqlite3_mprintf(tls, ts+25185 /* "wrong number of ..." */, 0) return 1 } zTbl = *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8)) @@ -53322,7 +53787,7 @@ func fsConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, crt.Xmemcpy(tls, (*fs_vtab)(unsafe.Pointer(pVtab)).FzTbl, zTbl, crt.Xstrlen(tls, zTbl)) crt.Xmemcpy(tls, (*fs_vtab)(unsafe.Pointer(pVtab)).FzDb, zDb, crt.Xstrlen(tls, zDb)) *(*uintptr)(unsafe.Pointer(ppVtab)) = (pVtab /* &.base */) - sqlite3.Xsqlite3_declare_vtab(tls, db, ts+35966 /* "CREATE TABLE x(p..." */) + sqlite3.Xsqlite3_declare_vtab(tls, db, ts+27798 /* "CREATE TABLE x(p..." */) return 0 } @@ -53376,7 +53841,7 @@ func fsFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, a if idxNum == 1 { var zStmt uintptr = sqlite3.Xsqlite3_mprintf(tls, - ts+36003 /* "SELECT * FROM %Q..." */, crt.VaList(bp, (*fs_vtab)(unsafe.Pointer(p)).FzDb, (*fs_vtab)(unsafe.Pointer(p)).FzTbl)) + ts+27835 /* "SELECT * FROM %Q..." */, crt.VaList(bp, (*fs_vtab)(unsafe.Pointer(p)).FzDb, (*fs_vtab)(unsafe.Pointer(p)).FzTbl)) if !(zStmt != 0) { return 7 } @@ -53386,7 +53851,7 @@ func fsFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, a sqlite3.Xsqlite3_bind_value(tls, (*fs_cursor)(unsafe.Pointer(pCur)).FpStmt, 1, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) } } else { - var zStmt uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+2684 /* "SELECT * FROM %Q..." */, crt.VaList(bp+16, (*fs_vtab)(unsafe.Pointer(p)).FzDb, (*fs_vtab)(unsafe.Pointer(p)).FzTbl)) + var zStmt uintptr = sqlite3.Xsqlite3_mprintf(tls, ts+2065 /* "SELECT * FROM %Q..." */, crt.VaList(bp+16, (*fs_vtab)(unsafe.Pointer(p)).FzDb, (*fs_vtab)(unsafe.Pointer(p)).FzTbl)) if !(zStmt != 0) { return 7 } @@ -53551,46 +54016,40 @@ func register_fs_module(tls *crt.TLS, clientData ClientData, interp uintptr, obj // var db uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { return 1 } - sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+36037 /* "fs" */, uintptr(unsafe.Pointer(&fsModule)), interp) - sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+4961 /* "fsdir" */, uintptr(unsafe.Pointer(&fsdirModule)), uintptr(0)) - sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+36040 /* "fstree" */, uintptr(unsafe.Pointer(&fstreeModule)), uintptr(0)) + sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+27869 /* "fs" */, uintptr(unsafe.Pointer(&fsModule)), interp) + sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+3799 /* "fsdir" */, uintptr(unsafe.Pointer(&fsdirModule)), uintptr(0)) + sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+27872 /* "fstree" */, uintptr(unsafe.Pointer(&fstreeModule)), uintptr(0)) return 0 } // Register commands with the TCL interpreter. func Sqlitetestfs_Init(tls *crt.TLS, interp uintptr) int32 { /* test_fs.c:901:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd6)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd5)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd6[i].FzName, - aObjCmd6[i].FxProc, aObjCmd6[i].FclientData, uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd5[i].FzName, + aObjCmd5[i].FxProc, aObjCmd5[i].FclientData, uintptr(0)) } return 0 } -var aObjCmd6 = [1]struct { +var aObjCmd5 = [1]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ - {FzName: ts + 36047 /* "register_fs_modu..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 27879 /* "register_fs_modu..." */, FxProc: 0, FclientData: uintptr(0)}, } /* test_fs.c:907:5 */ -// Some versions of <linux/posix_types.h> define this macros. -// It's easier to assume 8-bit bytes than to get CHAR_BIT. - -// fd_set for select and pselect. -type fd_set2 = struct{ F__fds_bits [16]int64 } /* select.h:70:5 */ - // Allocate nByte bytes of space using sqlite3_malloc(). If the // allocation fails, call sqlite3_result_error_nomem() to notify // the database handle that malloc() has failed. @@ -53648,7 +54107,7 @@ func randStr(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* test_ sqlite3.Xsqlite3_result_text(tls, context, bp+4 /* zBuf */, n, crt.UintptrFromInt32(-1)) } -var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 36066 /* "abcdefghijklmnop..." */)) /* test_func.c:46:30 */ +var zSrc = *(*[79]uint8)(unsafe.Pointer(ts + 27898 /* "abcdefghijklmnop..." */)) /* test_func.c:46:30 */ // The following two SQL functions are used to test returning a text // result with a destructor. Function 'test_destructor' takes one argument @@ -53687,12 +54146,37 @@ func test_destructor(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* crt.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), uint64(len)) sqlite3.Xsqlite3_result_text(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{destructor}))) } +func test_destructor16(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:122:13: */ + var zVal uintptr + var len int32 + + test_destructor_count_var++ + + if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) == 5 { + return + } + len = sqlite3.Xsqlite3_value_bytes16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + zVal = testContextMalloc(tls, pCtx, (len + 3)) + if !(zVal != 0) { + return + } + *(*int8)(unsafe.Pointer(zVal + uintptr((len + 1)))) = int8(0) + *(*int8)(unsafe.Pointer(zVal + uintptr((len + 2)))) = int8(0) + zVal++ + crt.Xmemcpy(tls, zVal, sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))), uint64(len)) + sqlite3.Xsqlite3_result_text16(tls, pCtx, zVal, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{destructor}))) +} func test_destructor_count(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:145:13: */ sqlite3.Xsqlite3_result_int(tls, pCtx, test_destructor_count_var) } func test_agg_errmsg16_step(tls *crt.TLS, a uintptr, b int32, c uintptr) { /* test_func.c:165:13: */ } func test_agg_errmsg16_final(tls *crt.TLS, ctx uintptr) { /* test_func.c:167:13: */ + var z uintptr + var db uintptr = sqlite3.Xsqlite3_context_db_handle(tls, ctx) + sqlite3.Xsqlite3_aggregate_context(tls, ctx, 2048) + z = sqlite3.Xsqlite3_errmsg16(tls, db) + sqlite3.Xsqlite3_result_text16(tls, ctx, z, -1, crt.UintptrFromInt32(-1)) } // Routines for testing the sqlite3_get_auxdata() and sqlite3_set_auxdata() @@ -53777,6 +54261,10 @@ func counterFunc(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test // We want to verify that the type conversions that occur on the // first argument do not invalidate the second argument. func test_isolation(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:276:13: */ + sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + sqlite3.Xsqlite3_value_text16(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) sqlite3.Xsqlite3_result_value(tls, pCtx, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8))) } @@ -53804,7 +54292,7 @@ func test_eval(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_f if rc != 0 { var zErr uintptr - zErr = sqlite3.Xsqlite3_mprintf(tls, ts+36145 /* "sqlite3_prepare_..." */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) + zErr = sqlite3.Xsqlite3_mprintf(tls, ts+27977 /* "sqlite3_prepare_..." */, crt.VaList(bp, sqlite3.Xsqlite3_errmsg(tls, db))) sqlite3.Xsqlite3_result_text(tls, pCtx, zErr, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) sqlite3.Xsqlite3_result_error_code(tls, pCtx, rc) } @@ -53834,6 +54322,21 @@ func testHexToBin(tls *crt.TLS, zIn uintptr, zOut uintptr) { /* test_func.c:340: // // Convert the input string from HEX into binary. Then return the // result using sqlite3_result_text16le(). +func testHexToUtf16be(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:354:13: */ + var n int32 + var zIn uintptr + var zOut uintptr + + n = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + zIn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + zOut = sqlite3.Xsqlite3_malloc(tls, (n / 2)) + if zOut == uintptr(0) { + sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) + } else { + testHexToBin(tls, zIn, zOut) + sqlite3.Xsqlite3_result_text16be(tls, pCtx, zOut, (n / 2), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) + } +} // hex_to_utf8(HEX) // @@ -53859,6 +54362,21 @@ func testHexToUtf8(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* te // // Convert the input string from HEX into binary. Then return the // result using sqlite3_result_text16le(). +func testHexToUtf16le(tls *crt.TLS, pCtx uintptr, nArg int32, argv uintptr) { /* test_func.c:408:13: */ + var n int32 + var zIn uintptr + var zOut uintptr + + n = sqlite3.Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + zIn = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) + zOut = sqlite3.Xsqlite3_malloc(tls, (n / 2)) + if zOut == uintptr(0) { + sqlite3.Xsqlite3_result_error_nomem(tls, pCtx) + } else { + testHexToBin(tls, zIn, zOut) + sqlite3.Xsqlite3_result_text16le(tls, pCtx, zOut, (n / 2), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) + } +} // SQL function: real2hex(X) // @@ -53880,11 +54398,11 @@ func real2hex(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* test *(*float64)(unsafe.Pointer(bp /* &v */)) = sqlite3.Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8))) for i = 0; i < 8; i++ { if bigEndian != 0 { - *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr((i * 2)))) = *(*int8)(unsafe.Pointer(ts + 36176 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) >> 4)))) - *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr(((i * 2) + 1)))) = *(*int8)(unsafe.Pointer(ts + 36176 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) & 0xf)))) + *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr((i * 2)))) = *(*int8)(unsafe.Pointer(ts + 28008 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) >> 4)))) + *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr(((i * 2) + 1)))) = *(*int8)(unsafe.Pointer(ts + 28008 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) & 0xf)))) } else { - *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr((14 - (i * 2))))) = *(*int8)(unsafe.Pointer(ts + 36176 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) >> 4)))) - *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr(((14 - (i * 2)) + 1)))) = *(*int8)(unsafe.Pointer(ts + 36176 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) & 0xf)))) + *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr((14 - (i * 2))))) = *(*int8)(unsafe.Pointer(ts + 28008 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) >> 4)))) + *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr(((14 - (i * 2)) + 1)))) = *(*int8)(unsafe.Pointer(ts + 28008 /* "0123456789abcdef" */ + uintptr((int32(*(*uint8)(unsafe.Pointer((bp /* &v */ /* &.x */) + uintptr(i)))) & 0xf)))) } } *(*int8)(unsafe.Pointer(bp + 8 /* &zOut[0] */ + uintptr(16))) = int8(0) @@ -53926,7 +54444,7 @@ func test_extract(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* (*Mem)(unsafe.Pointer(bp + 8 /* &mem */)).Fdb = db (*Mem)(unsafe.Pointer(bp + 8 /* &mem */)).Fenc = (*sqlite31)(unsafe.Pointer(db)).Fenc pHdr += uintptr(sqlite3.Xsqlite3GetVarint(tls, pHdr, bp+64 /* &iSerialType */)) - pBody += uintptr(sqlite3.Xsqlite3VdbeSerialGet(tls, pBody, u32(*(*u64)(unsafe.Pointer(bp + 64 /* iSerialType */))), bp+8 /* &mem */)) + pBody += uintptr(sqlite3.Xsqlite3VdbeSerialGet(tls, pBody, u321(*(*u64)(unsafe.Pointer(bp + 64 /* iSerialType */))), bp+8 /* &mem */)) if iCurrent == iIdx { sqlite3.Xsqlite3_result_value(tls, context, bp+8 /* &mem */) @@ -53974,7 +54492,7 @@ func test_decode(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* t (*Mem)(unsafe.Pointer(bp + 40 /* &mem */)).Fdb = db (*Mem)(unsafe.Pointer(bp + 40 /* &mem */)).Fenc = (*sqlite31)(unsafe.Pointer(db)).Fenc pHdr += uintptr(sqlite3.Xsqlite3GetVarint(tls, pHdr, bp+96 /* &iSerialType */)) - pBody += uintptr(sqlite3.Xsqlite3VdbeSerialGet(tls, pBody, u32(*(*u64)(unsafe.Pointer(bp + 96 /* iSerialType */))), bp+40 /* &mem */)) + pBody += uintptr(sqlite3.Xsqlite3VdbeSerialGet(tls, pBody, u321(*(*u64)(unsafe.Pointer(bp + 96 /* iSerialType */))), bp+40 /* &mem */)) switch sqlite3.Xsqlite3_value_type(tls, bp+40 /* &mem */) { case 3: @@ -53990,7 +54508,7 @@ func test_decode(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* t var n int32 = sqlite3.Xsqlite3_value_bytes(tls, bp+40 /* &mem */) var z uintptr = sqlite3.Xsqlite3_value_blob(tls, bp+40 /* &mem */) var i int32 - pVal = tcl.XTcl_NewStringObj(tls, ts+36193 /* "x'" */, -1) + pVal = tcl.XTcl_NewStringObj(tls, ts+28025 /* "x'" */, -1) for i = 0; i < n; i++ { // var hex [3]int8 at bp+104, 3 @@ -53999,7 +54517,7 @@ func test_decode(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* t *(*int8)(unsafe.Pointer(bp + 104 /* &hex[0] */ + uintptr(2))) = int8(0) tcl.XTcl_AppendStringsToObj(tls, pVal, crt.VaList(bp, bp+104 /* &hex[0] */, 0)) } - tcl.XTcl_AppendStringsToObj(tls, pVal, crt.VaList(bp+16, ts+5272 /* "'" */, 0)) + tcl.XTcl_AppendStringsToObj(tls, pVal, crt.VaList(bp+16, ts+4030 /* "'" */, 0)) break } @@ -54012,7 +54530,7 @@ func test_decode(tls *crt.TLS, context uintptr, argc int32, argv uintptr) { /* t break case 5: - pVal = tcl.XTcl_NewStringObj(tls, ts+5494 /* "NULL" */, -1) + pVal = tcl.XTcl_NewStringObj(tls, ts+4252 /* "NULL" */, -1) break default: @@ -54088,7 +54606,7 @@ func registerTestFunctions(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pThunk ui int32(aFuncs[i].FeTextRep), uintptr(0), aFuncs[i].FxFunc, uintptr(0), uintptr(0)) } - sqlite3.Xsqlite3_create_function(tls, db, ts+36196 /* "test_agg_errmsg1..." */, 0, 5, uintptr(0), uintptr(0), + sqlite3.Xsqlite3_create_function(tls, db, ts+28028 /* "test_agg_errmsg1..." */, 0, 5, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{test_agg_errmsg16_step})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{test_agg_errmsg16_final}))) @@ -54096,29 +54614,32 @@ func registerTestFunctions(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pThunk ui return 0 } -var aFuncs = [17]struct { +var aFuncs = [20]struct { FzName uintptr FnArg int8 FeTextRep uint32 FxFunc uintptr }{ - {FzName: ts + 36214 /* "randstr" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36222 /* "test_destructor" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36238 /* "hex_to_utf8" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36250 /* "test_destructor_..." */, FnArg: int8(0), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36272 /* "test_auxdata" */, FnArg: int8(-1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36285 /* "test_error" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36285 /* "test_error" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36296 /* "test_eval" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36306 /* "test_isolation" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36321 /* "test_counter" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36334 /* "real2hex" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36343 /* "test_decode" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36355 /* "test_extract" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36368 /* "test_zeroblob" */, FnArg: int8(1), FeTextRep: (uint32(1 | 0x000000800)), FxFunc: 0}, - {FzName: ts + 36382 /* "test_getsubtype" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36398 /* "test_setsubtype" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, - {FzName: ts + 36414 /* "test_frombind" */, FnArg: int8(-1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28046 /* "randstr" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28054 /* "test_destructor" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28070 /* "test_destructor1..." */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28088 /* "hex_to_utf16be" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28103 /* "hex_to_utf16le" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28118 /* "hex_to_utf8" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28130 /* "test_destructor_..." */, FnArg: int8(0), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28152 /* "test_auxdata" */, FnArg: int8(-1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28165 /* "test_error" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28165 /* "test_error" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28176 /* "test_eval" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28186 /* "test_isolation" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28201 /* "test_counter" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28214 /* "real2hex" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28223 /* "test_decode" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28235 /* "test_extract" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28248 /* "test_zeroblob" */, FnArg: int8(1), FeTextRep: (uint32(1 | 0x000000800)), FxFunc: 0}, + {FzName: ts + 28262 /* "test_getsubtype" */, FnArg: int8(1), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28278 /* "test_setsubtype" */, FnArg: int8(2), FeTextRep: uint32(1), FxFunc: 0}, + {FzName: ts + 28294 /* "test_frombind" */, FnArg: int8(-1), FeTextRep: uint32(1), FxFunc: 0}, } /* test_func.c:674:5 */ // TCLCMD: autoinstall_test_functions @@ -54165,7 +54686,7 @@ func abuse_create_function(tls *crt.TLS, clientData uintptr, interp uintptr, obj __1: ; - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+36428 /* "tx" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+28308 /* "tx" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tStep})), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) @@ -54177,7 +54698,7 @@ __1: __2: ; - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+36428 /* "tx" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+28308 /* "tx" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tStep})), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) @@ -54189,7 +54710,7 @@ __2: __3: ; - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+36428 /* "tx" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+28308 /* "tx" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{tFinal}))) if !(rc != 21) { @@ -54199,7 +54720,7 @@ __3: __4: ; - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+36428 /* "tx" */, 1, 1, uintptr(0), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{tFinal}))) + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+28308 /* "tx" */, 1, 1, uintptr(0), uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{tFinal}))) if !(rc != 21) { goto __5 } @@ -54207,7 +54728,7 @@ __4: __5: ; - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+36428 /* "tx" */, 1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+28308 /* "tx" */, 1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0)) if !(rc != 21) { @@ -54217,7 +54738,7 @@ __5: __6: ; - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+36428 /* "tx" */, -2, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+28308 /* "tx" */, -2, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), uintptr(0)) if !(rc != 21) { @@ -54227,7 +54748,7 @@ __6: __7: ; - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+36428 /* "tx" */, 128, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), ts+28308 /* "tx" */, 128, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), uintptr(0)) if !(rc != 21) { @@ -54239,7 +54760,7 @@ __8: rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), - ts+36431, /* "funcxx_123456789..." */ + ts+28311, /* "funcxx_123456789..." */ 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), uintptr(0)) @@ -54257,7 +54778,7 @@ __9: mxArg = sqlite3.Xsqlite3_limit(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), 6, -1) rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)), - ts+36688, /* "nullx_123456789_..." */ + ts+28568, /* "nullx_123456789_..." */ mxArg, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{tStep})), uintptr(0), uintptr(0)) @@ -54271,7 +54792,7 @@ __10: return 0 abuse_err: - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+36944, /* "sqlite3_create_f..." */ + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+28824, /* "sqlite3_create_f..." */ uintptr(0))) return 1 } @@ -54358,7 +54879,7 @@ __2: goto __3 } sqlite3.Xsqlite3_result_error(tls, pCtx, - ts+36987 /* "invalid matchinf..." */, -1) + ts+28867 /* "invalid matchinf..." */, -1) return __3: ; @@ -54419,7 +54940,7 @@ __7: // Jump here if the wrong number of arguments are passed to this function wrong_number_args: - sqlite3.Xsqlite3_result_error(tls, pCtx, ts+37036 /* "wrong number of ..." */, -1) + sqlite3.Xsqlite3_result_error(tls, pCtx, ts+28916 /* "wrong number of ..." */, -1) } func install_fts3_rank_function(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_func.c:910:26: */ @@ -54429,14 +54950,14 @@ func install_fts3_rank_function(tls *crt.TLS, clientData uintptr, interp uintptr // var db uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { return 1 } - sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+37081 /* "rank" */, -1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+28961 /* "rank" */, -1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{rankfunc})), uintptr(0), uintptr(0)) return 0 @@ -54446,11 +54967,11 @@ func install_fts3_rank_function(tls *crt.TLS, clientData uintptr, interp uintptr func Sqlitetest_func_Init(tls *crt.TLS, interp uintptr) int32 { /* test_func.c:933:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd7)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd6)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd7[i].FzName, aObjCmd7[i].FxProc, uintptr(0), uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd6[i].FzName, aObjCmd6[i].FxProc, uintptr(0), uintptr(0)) } sqlite3.Xsqlite3_initialize(tls) sqlite3.Xsqlite3_auto_extension(tls, *(*uintptr)(unsafe.Pointer(&struct { @@ -54462,13 +54983,13 @@ func Sqlitetest_func_Init(tls *crt.TLS, interp uintptr) int32 { /* test_func.c:9 return 0 } -var aObjCmd7 = [3]struct { +var aObjCmd6 = [3]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 37086 /* "autoinstall_test..." */, FxProc: 0}, - {FzName: ts + 37113 /* "abuse_create_fun..." */, FxProc: 0}, - {FzName: ts + 37135 /* "install_fts3_ran..." */, FxProc: 0}, + {FzName: ts + 28966 /* "autoinstall_test..." */, FxProc: 0}, + {FzName: ts + 28993 /* "abuse_create_fun..." */, FxProc: 0}, + {FzName: ts + 29015 /* "install_fts3_ran..." */, FxProc: 0}, } /* test_func.c:937:5 */ // end block for C++ @@ -54570,7 +55091,7 @@ func sqlite3TestBinToHex(tls *crt.TLS, zBuf uintptr, N int32) { /* test_hexio.c: bp := tls.Alloc(17) defer tls.Free(17) - *(*[17]uint8)(unsafe.Pointer(bp /* zHex */)) = *(*[17]uint8)(unsafe.Pointer(ts + 37162 /* "0123456789ABCDEF" */)) + *(*[17]uint8)(unsafe.Pointer(bp /* zHex */)) = *(*[17]uint8)(unsafe.Pointer(ts + 29042 /* "0123456789ABCDEF" */)) var i int32 var j int32 var c uint8 @@ -54650,7 +55171,7 @@ func hexio_read(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, ob var in uintptr if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37179 /* "FILENAME OFFSET ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29059 /* "FILENAME OFFSET ..." */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+40 /* &offset */) != 0 { @@ -54664,12 +55185,12 @@ func hexio_read(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, ob if zBuf == uintptr(0) { return 1 } - in = crt.Xfopen64(tls, zFile, ts+3756 /* "rb" */) + in = crt.Xfopen64(tls, zFile, ts+2937 /* "rb" */) if in == uintptr(0) { - in = crt.Xfopen64(tls, zFile, ts+37199 /* "r" */) + in = crt.Xfopen64(tls, zFile, ts+29079 /* "r" */) } if in == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+37201 /* "cannot open inpu..." */, zFile, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29081 /* "cannot open inpu..." */, zFile, 0)) return 1 } crt.Xfseek(tls, in, int64(*(*int32)(unsafe.Pointer(bp + 40 /* offset */))), 0) @@ -54704,7 +55225,7 @@ func hexio_write(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o var out uintptr if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37225 /* "FILENAME OFFSET ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29105 /* "FILENAME OFFSET ..." */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+24 /* &offset */) != 0 { @@ -54717,12 +55238,12 @@ func hexio_write(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o return 1 } nOut = sqlite3TestHexToBin(tls, zIn, *(*int32)(unsafe.Pointer(bp + 28 /* nIn */)), aOut) - out = crt.Xfopen64(tls, zFile, ts+37249 /* "r+b" */) + out = crt.Xfopen64(tls, zFile, ts+29129 /* "r+b" */) if out == uintptr(0) { - out = crt.Xfopen64(tls, zFile, ts+37253 /* "r+" */) + out = crt.Xfopen64(tls, zFile, ts+29133 /* "r+" */) } if out == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+37256 /* "cannot open outp..." */, zFile, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29136 /* "cannot open outp..." */, zFile, 0)) return 1 } crt.Xfseek(tls, out, int64(*(*int32)(unsafe.Pointer(bp + 24 /* offset */))), 0) @@ -54751,7 +55272,7 @@ func hexio_get_int(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, // var aNum [4]uint8 at bp+4, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37281 /* "HEXDATA" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29161 /* "HEXDATA" */) return 1 } zIn = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &nIn */) @@ -54784,7 +55305,7 @@ func hexio_render_int16(tls *crt.TLS, clientData uintptr, interp uintptr, objc i // var aNum [10]uint8 at bp+4, 10 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11332 /* "INTEGER" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15173 /* "INTEGER" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &val */) != 0 { @@ -54809,7 +55330,7 @@ func hexio_render_int32(tls *crt.TLS, clientData uintptr, interp uintptr, objc i // var aNum [10]uint8 at bp+4, 10 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+11332 /* "INTEGER" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+15173 /* "INTEGER" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &val */) != 0 { @@ -54834,7 +55355,7 @@ func utf8_to_utf8(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, defer tls.Free(16) tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp, ts+37289 /* "[utf8_to_utf8] u..." */, 0)) + crt.VaList(bp, ts+29169 /* "[utf8_to_utf8] u..." */, 0)) return 1 } @@ -54879,7 +55400,7 @@ func read_fts3varint(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 var nVal int32 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37343 /* "BLOB VARNAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29223 /* "BLOB VARNAME" */) return 1 } zBlob = tcl.XTcl_GetByteArrayFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &nBlob */) @@ -54903,7 +55424,7 @@ func make_fts3record(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 var i int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37356 /* "LIST" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29236 /* "LIST" */) return 1 } if tcl.XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &nArg */, bp+8 /* &aArg */) != 0 { @@ -54961,27 +55482,27 @@ func make_fts3record(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 // Register commands with the TCL interpreter. func Sqlitetest_hexio_Init(tls *crt.TLS, interp uintptr) int32 { /* test_hexio.c:446:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd8)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd7)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd8[i].FzName, aObjCmd8[i].FxProc, uintptr(0), uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd7[i].FzName, aObjCmd7[i].FxProc, uintptr(0), uintptr(0)) } return 0 } -var aObjCmd8 = [8]struct { +var aObjCmd7 = [8]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 37361 /* "hexio_read" */, FxProc: 0}, - {FzName: ts + 37372 /* "hexio_write" */, FxProc: 0}, - {FzName: ts + 37384 /* "hexio_get_int" */, FxProc: 0}, - {FzName: ts + 37398 /* "hexio_render_int..." */, FxProc: 0}, - {FzName: ts + 37417 /* "hexio_render_int..." */, FxProc: 0}, - {FzName: ts + 37436 /* "utf8_to_utf8" */, FxProc: 0}, - {FzName: ts + 37449 /* "read_fts3varint" */, FxProc: 0}, - {FzName: ts + 37465 /* "make_fts3record" */, FxProc: 0}, + {FzName: ts + 29241 /* "hexio_read" */, FxProc: 0}, + {FzName: ts + 29252 /* "hexio_write" */, FxProc: 0}, + {FzName: ts + 29264 /* "hexio_get_int" */, FxProc: 0}, + {FzName: ts + 29278 /* "hexio_render_int..." */, FxProc: 0}, + {FzName: ts + 29297 /* "hexio_render_int..." */, FxProc: 0}, + {FzName: ts + 29316 /* "utf8_to_utf8" */, FxProc: 0}, + {FzName: ts + 29329 /* "read_fts3varint" */, FxProc: 0}, + {FzName: ts + 29345 /* "make_fts3record" */, FxProc: 0}, } /* test_hexio.c:450:5 */ // end block for C++ @@ -55170,14 +55691,14 @@ func init_wrapper_install(tls *crt.TLS, clientData ClientData, interp uintptr, o installInitWrappers(tls) for i = 1; i < objc; i++ { var z uintptr = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8))) - if crt.Xstrcmp(tls, z, ts+37481 /* "mem" */) == 0 { + if crt.Xstrcmp(tls, z, ts+29361 /* "mem" */) == 0 { wrapped.Fmem_fail = 1 - } else if crt.Xstrcmp(tls, z, ts+34074 /* "mutex" */) == 0 { + } else if crt.Xstrcmp(tls, z, ts+25895 /* "mutex" */) == 0 { wrapped.Fmutex_fail = 1 - } else if crt.Xstrcmp(tls, z, ts+37485 /* "pcache" */) == 0 { + } else if crt.Xstrcmp(tls, z, ts+29365 /* "pcache" */) == 0 { wrapped.Fpcache_fail = 1 } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+37492 /* "Unknown argument..." */, z, ts+18666 /* "\"" */)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29372 /* "Unknown argument..." */, z, ts+9801 /* "\"" */)) return 1 } } @@ -55189,7 +55710,7 @@ func init_wrapper_uninstall(tls *crt.TLS, clientData ClientData, interp uintptr, defer tls.Free(24) if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -55202,7 +55723,7 @@ func init_wrapper_uninstall(tls *crt.TLS, clientData ClientData, interp uintptr, func init_wrapper_clear(tls *crt.TLS, clientData ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_init.c:233:26: */ if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -55216,19 +55737,19 @@ func init_wrapper_query(tls *crt.TLS, clientData ClientData, interp uintptr, obj var pRet uintptr if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } pRet = tcl.XTcl_NewObj(tls) if wrapped.Fmutex_init != 0 { - tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+34074 /* "mutex" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+25895 /* "mutex" */, -1)) } if wrapped.Fmem_init != 0 { - tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+37481 /* "mem" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+29361 /* "mem" */, -1)) } if wrapped.Fpcache_init != 0 { - tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+37485 /* "pcache" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pRet, tcl.XTcl_NewStringObj(tls, ts+29365 /* "pcache" */, -1)) } tcl.XTcl_SetObjResult(tls, interp, pRet) @@ -55238,24 +55759,24 @@ func init_wrapper_query(tls *crt.TLS, clientData ClientData, interp uintptr, obj func Sqlitetest_init_Init(tls *crt.TLS, interp uintptr) int32 { /* test_init.c:278:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd9)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd8)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd9[i].FzName, aObjCmd9[i].FxProc, uintptr(0), uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd8[i].FzName, aObjCmd8[i].FxProc, uintptr(0), uintptr(0)) } return 0 } -var aObjCmd9 = [4]struct { +var aObjCmd8 = [4]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 37512 /* "init_wrapper_ins..." */, FxProc: 0}, - {FzName: ts + 37533 /* "init_wrapper_que..." */, FxProc: 0}, - {FzName: ts + 37552 /* "init_wrapper_uni..." */, FxProc: 0}, - {FzName: ts + 37575 /* "init_wrapper_cle..." */, FxProc: 0}, + {FzName: ts + 29392 /* "init_wrapper_ins..." */, FxProc: 0}, + {FzName: ts + 29413 /* "init_wrapper_que..." */, FxProc: 0}, + {FzName: ts + 29432 /* "init_wrapper_uni..." */, FxProc: 0}, + {FzName: ts + 29455 /* "init_wrapper_cle..." */, FxProc: 0}, } /* test_init.c:282:5 */ // @@ -55327,7 +55848,7 @@ func intarrayCreate(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uin if pVtab != 0 { crt.Xmemset(tls, pVtab, 0, uint64(unsafe.Sizeof(intarray_vtab{}))) (*intarray_vtab)(unsafe.Pointer(pVtab)).FpContent = pAux - rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+37594 /* "CREATE TABLE x(v..." */) + rc = sqlite3.Xsqlite3_declare_vtab(tls, db, ts+29474 /* "CREATE TABLE x(v..." */) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pVtab return rc @@ -55444,7 +55965,7 @@ func sqlite3_intarray_create(tls *crt.TLS, db uintptr, zName uintptr, ppReturn u *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{intarrayFree}))) if rc == 0 { var zSql uintptr - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+37636, /* "CREATE VIRTUAL T..." */ + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+29516, /* "CREATE VIRTUAL T..." */ crt.VaList(bp, zName, zName)) rc = sqlite3.Xsqlite3_exec(tls, db, zSql, uintptr(0), uintptr(0), uintptr(0)) sqlite3.Xsqlite3_free(tls, zSql) @@ -55484,7 +56005,7 @@ func test_intarray_create(tls *crt.TLS, clientData ClientData, interp uintptr, o // var zPtr [100]int8 at bp+48, 100 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+32 /* &db */) != 0 { @@ -55515,14 +56036,14 @@ func test_intarray_bind(tls *crt.TLS, clientData ClientData, interp uintptr, obj var a uintptr if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37674 /* "INTARRAY" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29554 /* "INTARRAY" */) return 1 } pArray = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) n = (objc - 2) a = sqlite3.Xsqlite3_malloc64(tls, (uint64(uint64(unsafe.Sizeof(sqlite3_int64(0))) * uint64(n)))) if a == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+37683 /* "SQLITE_NOMEM" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29563 /* "SQLITE_NOMEM" */, uintptr(0))) return 1 } for i = 0; i < n; i++ { @@ -55541,24 +56062,24 @@ func test_intarray_bind(tls *crt.TLS, clientData ClientData, interp uintptr, obj // Register commands with the TCL interpreter. func Sqlitetestintarray_Init(tls *crt.TLS, interp uintptr) int32 { /* test_intarray.c:375:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd10)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd9)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd10[i].FzName, - aObjCmd10[i].FxProc, aObjCmd10[i].FclientData, uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd9[i].FzName, + aObjCmd9[i].FxProc, aObjCmd9[i].FclientData, uintptr(0)) } return 0 } -var aObjCmd10 = [2]struct { +var aObjCmd9 = [2]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ - {FzName: ts + 37696 /* "sqlite3_intarray..." */, FxProc: 0, FclientData: uintptr(0)}, - {FzName: ts + 37720 /* "sqlite3_intarray..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 29576 /* "sqlite3_intarray..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 29600 /* "sqlite3_intarray..." */, FxProc: 0, FclientData: uintptr(0)}, } /* test_intarray.c:380:5 */ // Maximum pathname length supported by the jt backend. @@ -55570,8 +56091,8 @@ type jt_file1 = struct { FzName uintptr Fflags int32 FeLock int32 - FnPage u32 - FnPagesize u32 + FnPage u321 + FnPagesize u321 FpWritable uintptr FaCksum uintptr FnSync int32 @@ -55590,7 +56111,7 @@ var jt_vfs = sqlite3_vfs{FiVersion: 2, FszOsFile: // iVersion int32(unsafe.Sizeof(jt_file{})), FmxPathname:// szOsFile 512, FpNext:// mxPathname uintptr(0), FzName:// pNext -ts + 37742, /* "jt" */ FpAppData:// zName +ts + 29622, /* "jt" */ FpAppData:// zName uintptr(0), FxOpen:// pAppData 0, FxDelete:// xOpen 0, FxAccess:// xDelete @@ -55701,7 +56222,7 @@ func locateDatabaseHandle(tls *crt.TLS, zJournal uintptr, noLock int32) uintptr var pMain uintptr = uintptr(0) enterJtMutex(tls) for pMain = g2.FpList; pMain != 0; pMain = (*jt_file)(unsafe.Pointer(pMain)).FpNext { - var nName int32 = (int32(crt.Xstrlen(tls, zJournal) - crt.Xstrlen(tls, ts+37745 /* "-journal" */))) + var nName int32 = (int32(crt.Xstrlen(tls, zJournal) - crt.Xstrlen(tls, ts+29625 /* "-journal" */))) if (((((*jt_file)(unsafe.Pointer(pMain)).Fflags & 0x00000100) != 0) && (int32(crt.Xstrlen(tls, (*jt_file)(unsafe.Pointer(pMain)).FzName)) == nName)) && (0 == crt.Xmemcmp(tls, (*jt_file)(unsafe.Pointer(pMain)).FzName, zJournal, uint64(nName)))) && @@ -55716,17 +56237,17 @@ func locateDatabaseHandle(tls *crt.TLS, zJournal uintptr, noLock int32) uintptr // Parameter z points to a buffer of 4 bytes in size containing a // unsigned 32-bit integer stored in big-endian format. Decode the // integer and return its value. -func decodeUint32(tls *crt.TLS, z uintptr) u32 { /* test_journal.c:314:12: */ - return (u32((((int32(*(*uint8)(unsafe.Pointer(z + uintptr(0)))) << 24) + (int32(*(*uint8)(unsafe.Pointer(z + uintptr(1)))) << 16)) + (int32(*(*uint8)(unsafe.Pointer(z + uintptr(2)))) << 8)) + int32(*(*uint8)(unsafe.Pointer(z + uintptr(3)))))) +func decodeUint32(tls *crt.TLS, z uintptr) u321 { /* test_journal.c:314:12: */ + return (u321((((int32(*(*uint8)(unsafe.Pointer(z + uintptr(0)))) << 24) + (int32(*(*uint8)(unsafe.Pointer(z + uintptr(1)))) << 16)) + (int32(*(*uint8)(unsafe.Pointer(z + uintptr(2)))) << 8)) + int32(*(*uint8)(unsafe.Pointer(z + uintptr(3)))))) } // Calculate a checksum from the buffer of length n bytes pointed to // by parameter z. -func genCksum(tls *crt.TLS, z uintptr, n int32) u32 { /* test_journal.c:322:12: */ +func genCksum(tls *crt.TLS, z uintptr, n int32) u321 { /* test_journal.c:322:12: */ var i int32 - var cksum u32 = u32(0) + var cksum u321 = u321(0) for i = 0; i < n; i++ { - cksum = ((cksum + u32(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) + (cksum << 3)) + cksum = ((cksum + u321(*(*uint8)(unsafe.Pointer(z + uintptr(i))))) + (cksum << 3)) } return cksum } @@ -55747,16 +56268,16 @@ func decodeJournalHdr(tls *crt.TLS, zBuf uintptr, pnRec uintptr, pnPage uintptr, return 1 } if pnRec != 0 { - *(*u32)(unsafe.Pointer(pnRec)) = decodeUint32(tls, (zBuf + uintptr(8))) + *(*u321)(unsafe.Pointer(pnRec)) = decodeUint32(tls, (zBuf + uintptr(8))) } if pnPage != 0 { - *(*u32)(unsafe.Pointer(pnPage)) = decodeUint32(tls, (zBuf + uintptr(16))) + *(*u321)(unsafe.Pointer(pnPage)) = decodeUint32(tls, (zBuf + uintptr(16))) } if pnSector != 0 { - *(*u32)(unsafe.Pointer(pnSector)) = decodeUint32(tls, (zBuf + uintptr(20))) + *(*u321)(unsafe.Pointer(pnSector)) = decodeUint32(tls, (zBuf + uintptr(20))) } if pnPagesize != 0 { - *(*u32)(unsafe.Pointer(pnPagesize)) = decodeUint32(tls, (zBuf + uintptr(24))) + *(*u321)(unsafe.Pointer(pnPagesize)) = decodeUint32(tls, (zBuf + uintptr(24))) } return 0 } @@ -55774,13 +56295,13 @@ func openTransaction(tls *crt.TLS, pMain uintptr, pJournal uintptr) int32 { /* t closeTransaction(tls, pMain) aData = sqlite3.Xsqlite3_malloc(tls, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) (*jt_file)(unsafe.Pointer(pMain)).FpWritable = sqlite3.Xsqlite3BitvecCreate(tls, (*jt_file)(unsafe.Pointer(pMain)).FnPage) - (*jt_file)(unsafe.Pointer(pMain)).FaCksum = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(u32(0))) * (uint64((*jt_file)(unsafe.Pointer(pMain)).FnPage + u32(1)))))) + (*jt_file)(unsafe.Pointer(pMain)).FaCksum = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(u321(0))) * (uint64((*jt_file)(unsafe.Pointer(pMain)).FnPage + u321(1)))))) (*jt_file)(unsafe.Pointer(pJournal)).FiMaxOff = int64(0) if (!(int32((*jt_file)(unsafe.Pointer(pMain)).FpWritable) != 0) || !(int32((*jt_file)(unsafe.Pointer(pMain)).FaCksum) != 0)) || !(aData != 0) { rc = (10 | (int32(12) << 8)) - } else if (*jt_file)(unsafe.Pointer(pMain)).FnPage > u32(0) { - var iTrunk u32 + } else if (*jt_file)(unsafe.Pointer(pMain)).FnPage > u321(0) { + var iTrunk u321 // var iSave int32 at bp, 4 // var iSave2 int32 at bp+4, 4 @@ -55791,23 +56312,23 @@ func openTransaction(tls *crt.TLS, pMain uintptr, pJournal uintptr) int32 { /* t // leaf to the jt_file.pWritable bitvec. rc = sqlite3.Xsqlite3OsRead(tls, p, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize), int64(0)) if rc == 0 { - var nDbsize u32 = decodeUint32(tls, (aData + uintptr(28))) - if (nDbsize > u32(0)) && (crt.Xmemcmp(tls, (aData+uintptr(24)), (aData+uintptr(92)), uint64(4)) == 0) { - var iPg u32 - for iPg = (nDbsize + u32(1)); iPg <= (*jt_file)(unsafe.Pointer(pMain)).FnPage; iPg++ { + var nDbsize u321 = decodeUint32(tls, (aData + uintptr(28))) + if (nDbsize > u321(0)) && (crt.Xmemcmp(tls, (aData+uintptr(24)), (aData+uintptr(92)), uint64(4)) == 0) { + var iPg u321 + for iPg = (nDbsize + u321(1)); iPg <= (*jt_file)(unsafe.Pointer(pMain)).FnPage; iPg++ { sqlite3.Xsqlite3BitvecSet(tls, (*jt_file)(unsafe.Pointer(pMain)).FpWritable, iPg) } } } iTrunk = decodeUint32(tls, (aData + uintptr(32))) - for (rc == 0) && (iTrunk > u32(0)) { - var nLeaf u32 - var iLeaf u32 - var iOff sqlite3_int64 = ((i64(iTrunk - u32(1))) * i64((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) + for (rc == 0) && (iTrunk > u321(0)) { + var nLeaf u321 + var iLeaf u321 + var iOff sqlite3_int64 = ((i64(iTrunk - u321(1))) * i64((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) rc = sqlite3.Xsqlite3OsRead(tls, p, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize), iOff) nLeaf = decodeUint32(tls, (aData + uintptr(4))) - for iLeaf = u32(0); (rc == 0) && (iLeaf < nLeaf); iLeaf++ { - var pgno u32 = decodeUint32(tls, (aData + uintptr((u32(8) + (u32(4) * iLeaf))))) + for iLeaf = u321(0); (rc == 0) && (iLeaf < nLeaf); iLeaf++ { + var pgno u321 = decodeUint32(tls, (aData + uintptr((u321(8) + (u321(4) * iLeaf))))) sqlite3.Xsqlite3BitvecSet(tls, (*jt_file)(unsafe.Pointer(pMain)).FpWritable, pgno) } iTrunk = decodeUint32(tls, aData) @@ -55822,7 +56343,7 @@ func openTransaction(tls *crt.TLS, pMain uintptr, pJournal uintptr) int32 { /* t continue } rc = sqlite3.Xsqlite3OsRead(tls, (*jt_file)(unsafe.Pointer(pMain)).FpReal, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize), iOff) - *(*u32)(unsafe.Pointer((*jt_file)(unsafe.Pointer(pMain)).FaCksum + uintptr(ii)*4)) = genCksum(tls, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) + *(*u321)(unsafe.Pointer((*jt_file)(unsafe.Pointer(pMain)).FaCksum + uintptr(ii)*4)) = genCksum(tls, aData, int32((*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) if ((ii + 1) == int32((*jt_file)(unsafe.Pointer(pMain)).FnPage)) && (rc == (10 | (int32(2) << 8))) { rc = 0 } @@ -55854,18 +56375,18 @@ func readJournalFile(tls *crt.TLS, p uintptr, pMain uintptr) int32 { /* test_jou // var iSave2 int32 at bp+4, 4 - var cksum u32 + var cksum u321 _ = cksum - var pgno u32 - // var nRec u32 at bp+36, 4 + var pgno u321 + // var nRec u321 at bp+36, 4 - // var nPage u32 at bp+40, 4 + // var nPage u321 at bp+40, 4 - // var nSector u32 at bp+44, 4 + // var nSector u321 at bp+44, 4 - // var nPagesize u32 at bp+48, 4 + // var nPagesize u321 at bp+48, 4 - var ii u32 + var ii u321 rc = 0 pReal = (*jt_file)(unsafe.Pointer(p)).FpReal iOff = int64(0) @@ -55895,15 +56416,15 @@ __2: goto finish_rjf __4: ; - iOff = iOff + (sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */)))) + iOff = iOff + (sqlite3_int64(*(*u321)(unsafe.Pointer(bp + 44 /* nSector */)))) - if !(*(*u32)(unsafe.Pointer(bp + 36 /* nRec */)) == u32(0)) { + if !(*(*u321)(unsafe.Pointer(bp + 36 /* nRec */)) == u321(0)) { goto __5 } // A trick. There might be another journal-header immediately // following this one. In this case, 0 records means 0 records, // not "read until the end of the file". See also ticket #2565. - if !(iSize >= (iOff + sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */))))) { + if !(iSize >= (iOff + sqlite3_int64(*(*u321)(unsafe.Pointer(bp + 44 /* nSector */))))) { goto __6 } rc = sqlite3.Xsqlite3OsRead(tls, pReal, bp+8 /* &zBuf[0] */, 28, iOff) @@ -55915,14 +56436,14 @@ __7: ; __6: ; - *(*u32)(unsafe.Pointer(bp + 36 /* nRec */)) = (u32((iSize - iOff) / (sqlite3_int64((*jt_file)(unsafe.Pointer(pMain)).FnPagesize + u32(8))))) + *(*u321)(unsafe.Pointer(bp + 36 /* nRec */)) = (u321((iSize - iOff) / (sqlite3_int64((*jt_file)(unsafe.Pointer(pMain)).FnPagesize + u321(8))))) __5: ; // Read all the records that follow the journal-header just read. - ii = u32(0) + ii = u321(0) __8: - if !(((rc == 0) && (ii < *(*u32)(unsafe.Pointer(bp + 36 /* nRec */)))) && (iOff < iSize)) { + if !(((rc == 0) && (ii < *(*u321)(unsafe.Pointer(bp + 36 /* nRec */)))) && (iOff < iSize)) { goto __10 } rc = sqlite3.Xsqlite3OsRead(tls, pReal, bp+8 /* &zBuf[0] */, 4, iOff) @@ -55930,7 +56451,7 @@ __8: goto __11 } pgno = decodeUint32(tls, bp+8 /* &zBuf[0] */) - if !((pgno > u32(0)) && (pgno <= (*jt_file)(unsafe.Pointer(pMain)).FnPage)) { + if !((pgno > u321(0)) && (pgno <= (*jt_file)(unsafe.Pointer(pMain)).FnPage)) { goto __12 } if !(0 == sqlite3.Xsqlite3BitvecTest(tls, (*jt_file)(unsafe.Pointer(pMain)).FpWritable, pgno)) { @@ -55948,7 +56469,7 @@ __13: sqlite3.Xsqlite3BitvecSet(tls, (*jt_file)(unsafe.Pointer(pMain)).FpWritable, pgno) __12: ; - iOff = iOff + (sqlite3_int64(u32(8) + (*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) + iOff = iOff + (sqlite3_int64(u321(8) + (*jt_file)(unsafe.Pointer(pMain)).FnPagesize)) __11: ; goto __9 @@ -55959,7 +56480,7 @@ __9: __10: ; - iOff = (((iOff + (sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */)) - u32(1)))) / sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */)))) * sqlite3_int64(*(*u32)(unsafe.Pointer(bp + 44 /* nSector */)))) + iOff = (((iOff + (sqlite3_int64(*(*u321)(unsafe.Pointer(bp + 44 /* nSector */)) - u321(1)))) / sqlite3_int64(*(*u321)(unsafe.Pointer(bp + 44 /* nSector */)))) * sqlite3_int64(*(*u321)(unsafe.Pointer(bp + 44 /* nSector */)))) goto __2 __3: ; @@ -56006,11 +56527,11 @@ func jtWrite(tls *crt.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite if (((*jt_file)(unsafe.Pointer(p)).Fflags & 0x00000100) != 0) && ((*jt_file)(unsafe.Pointer(p)).FpWritable != 0) { if (((iAmt < int32((*jt_file)(unsafe.Pointer(p)).FnPagesize)) && - (((*jt_file)(unsafe.Pointer(p)).FnPagesize % u32(iAmt)) == u32(0))) && + (((*jt_file)(unsafe.Pointer(p)).FnPagesize % u321(iAmt)) == u321(0))) && (iOfst >= (sqlite_int64(sqlite3.Xsqlite3PendingByte + 512)))) && - ((iOfst + sqlite_int64(iAmt)) <= (sqlite_int64(u32(sqlite3.Xsqlite3PendingByte) + (*jt_file)(unsafe.Pointer(p)).FnPagesize))) { + ((iOfst + sqlite_int64(iAmt)) <= (sqlite_int64(u321(sqlite3.Xsqlite3PendingByte) + (*jt_file)(unsafe.Pointer(p)).FnPagesize))) { } else { - var pgno u32 = (u32((iOfst / sqlite_int64((*jt_file)(unsafe.Pointer(p)).FnPagesize)) + int64(1))) + var pgno u321 = (u321((iOfst / sqlite_int64((*jt_file)(unsafe.Pointer(p)).FnPagesize)) + int64(1))) _ = pgno // The following assert() statements may fail if this layer is used @@ -56040,10 +56561,10 @@ func jtTruncate(tls *crt.TLS, pFile uintptr, size sqlite_int64) int32 { /* test_ closeTransaction(tls, pMain) } if (((*jt_file)(unsafe.Pointer(p)).Fflags & 0x00000100) != 0) && ((*jt_file)(unsafe.Pointer(p)).FpWritable != 0) { - var pgno u32 - var locking_page u32 = ((u32(sqlite3.Xsqlite3PendingByte) / (*jt_file)(unsafe.Pointer(p)).FnPagesize) + u32(1)) + var pgno u321 + var locking_page u321 = ((u321(sqlite3.Xsqlite3PendingByte) / (*jt_file)(unsafe.Pointer(p)).FnPagesize) + u321(1)) _ = locking_page - for pgno = (u32((size / sqlite_int64((*jt_file)(unsafe.Pointer(p)).FnPagesize)) + int64(1))); pgno <= (*jt_file)(unsafe.Pointer(p)).FnPage; pgno++ { + for pgno = (u321((size / sqlite_int64((*jt_file)(unsafe.Pointer(p)).FnPagesize)) + int64(1))); pgno <= (*jt_file)(unsafe.Pointer(p)).FnPage; pgno++ { } } return sqlite3.Xsqlite3OsTruncate(tls, (*jt_file)(unsafe.Pointer(p)).FpReal, size) @@ -56160,7 +56681,7 @@ func jtOpen(tls *crt.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags int3 // returning. func jtDelete(tls *crt.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { /* test_journal.c:733:12: */ var nPath int32 = int32(crt.Xstrlen(tls, zPath)) - if (nPath > 8) && (0 == crt.Xstrcmp(tls, ts+37745 /* "-journal" */, (zPath+uintptr((nPath-8))))) { + if (nPath > 8) && (0 == crt.Xstrcmp(tls, ts+29625 /* "-journal" */, (zPath+uintptr((nPath-8))))) { // Deleting a journal file. The end of a transaction. var pMain uintptr = locateDatabaseHandle(tls, zPath, 0) if pMain != 0 { @@ -56675,7 +57196,7 @@ func pointerToText(tls *crt.TLS, p uintptr, z uintptr) { /* test_malloc.c:272:13 // var n sqlite3_uint64 at bp, 8 if *(*uintptr)(unsafe.Pointer(bp + 8 /* p */)) == uintptr(0) { - crt.Xstrcpy(tls, z, ts+8293 /* "0" */) + crt.Xstrcpy(tls, z, ts+12045 /* "0" */) return } if uint64(unsafe.Sizeof(sqlite3_uint64(0))) == uint64(unsafe.Sizeof(uintptr(0))) { @@ -56706,7 +57227,7 @@ __3: *(*int8)(unsafe.Pointer(z + uintptr((uint64(unsafe.Sizeof(uintptr(0))) * uint64(2))))) = int8(0) } -var zHex = *(*[17]int8)(unsafe.Pointer(ts + 36176 /* "0123456789abcdef" */)) /* test_malloc.c:273:21 */ +var zHex = *(*[17]int8)(unsafe.Pointer(ts + 28008 /* "0123456789abcdef" */)) /* test_malloc.c:273:21 */ func hexToInt(tls *crt.TLS, h int32) int32 { /* test_malloc.c:295:12: */ if (h >= '0') && (h <= '9') { return (h - '0') @@ -56759,7 +57280,7 @@ func test_malloc(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o // var zOut [100]int8 at bp+20, 100 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37754 /* "NBYTES" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29634 /* "NBYTES" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+16 /* &nByte */) != 0 { @@ -56786,14 +57307,14 @@ func test_realloc(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, // var zOut [100]int8 at bp+56, 100 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37761 /* "PRIOR NBYTES" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29641 /* "PRIOR NBYTES" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+40 /* &nByte */) != 0 { return 1 } if textToPointer(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+48 /* &pPrior */) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+37774 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29654 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) return 1 } p = sqlite3.Xsqlite3_realloc(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pPrior */)), int32(uint32(*(*int32)(unsafe.Pointer(bp + 40 /* nByte */))))) @@ -56812,11 +57333,11 @@ func test_free(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, obj // var pPrior uintptr at bp+24, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37788 /* "PRIOR" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29668 /* "PRIOR" */) return 1 } if textToPointer(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+24 /* &pPrior */) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+37774 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29654 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) return 1 } sqlite3.Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPrior */))) @@ -56843,18 +57364,18 @@ func test_memset(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o // var zBin [100]int8 at bp+72, 100 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37794 /* "ADDRESS SIZE HEX" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29674 /* "ADDRESS SIZE HEX" */) return 1 } if textToPointer(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+56 /* &p */) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+37774 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29654 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+64 /* &size */) != 0 { return 1 } if *(*int32)(unsafe.Pointer(bp + 64 /* size */)) <= 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+37811 /* "size must be pos..." */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+29691 /* "size must be pos..." */, uintptr(0))) return 1 } zHex = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+68 /* &n */) @@ -56863,7 +57384,7 @@ func test_memset(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o } *(*int32)(unsafe.Pointer(bp + 68 /* n */)) = sqlite3TestHexToBin(tls, zHex, *(*int32)(unsafe.Pointer(bp + 68 /* n */)), bp+72 /* &zBin[0] */) if *(*int32)(unsafe.Pointer(bp + 68 /* n */)) == 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, ts+37833 /* "no data" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, ts+29713 /* "no data" */, uintptr(0))) return 1 } zOut = *(*uintptr)(unsafe.Pointer(bp + 56 /* p */)) @@ -56889,18 +57410,18 @@ func test_memget(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o // var zHex [100]int8 at bp+68, 100 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37841 /* "ADDRESS SIZE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29721 /* "ADDRESS SIZE" */) return 1 } if textToPointer(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+56 /* &p */) != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+37774 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29654 /* "bad pointer: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), uintptr(0))) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+64 /* &size */) != 0 { return 1 } if *(*int32)(unsafe.Pointer(bp + 64 /* size */)) <= 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+37811 /* "size must be pos..." */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+29691 /* "size must be pos..." */, uintptr(0))) return 1 } zBin = *(*uintptr)(unsafe.Pointer(bp + 56 /* p */)) @@ -56936,7 +57457,7 @@ func test_memory_highwater(tls *crt.TLS, clientData uintptr, interp uintptr, obj *(*int32)(unsafe.Pointer(bp /* resetFlag */)) = 0 if (objc != 1) && (objc != 2) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37854 /* "?RESET?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29734 /* "?RESET?" */) return 1 } if objc == 2 { @@ -56960,7 +57481,7 @@ func test_memdebug_backtrace(tls *crt.TLS, clientData uintptr, interp uintptr, o // var depth int32 at bp, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37862 /* "DEPT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29742 /* "DEPT" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &depth */) != 0 { @@ -56974,7 +57495,7 @@ func test_memdebug_backtrace(tls *crt.TLS, clientData uintptr, interp uintptr, o // Write a summary of unfreed memory to FILENAME. func test_memdebug_dump(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:575:26: */ if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37867 /* "FILENAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29747 /* "FILENAME" */) return 1 } return 0 @@ -56986,7 +57507,7 @@ func test_memdebug_dump(tls *crt.TLS, clientData uintptr, interp uintptr, objc i func test_memdebug_malloc_count(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:600:26: */ var nMalloc int32 = -1 if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, nMalloc)) @@ -57022,7 +57543,7 @@ func test_memdebug_fail(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var nFail int32 = 0 if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37876 /* "COUNTER ?OPTIONS..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29756 /* "COUNTER ?OPTIONS..." */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+24 /* &iFail */) != 0 { @@ -57035,22 +57556,22 @@ func test_memdebug_fail(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var zOption uintptr = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(ii)*8)), bp+28 /* &nOption */) var zErr uintptr = uintptr(0) - if (*(*int32)(unsafe.Pointer(bp + 28 /* nOption */)) > 1) && (crt.Xstrncmp(tls, zOption, ts+37894 /* "-repeat" */, uint64(*(*int32)(unsafe.Pointer(bp + 28 /* nOption */)))) == 0) { + if (*(*int32)(unsafe.Pointer(bp + 28 /* nOption */)) > 1) && (crt.Xstrncmp(tls, zOption, ts+29774 /* "-repeat" */, uint64(*(*int32)(unsafe.Pointer(bp + 28 /* nOption */)))) == 0) { if ii == (objc - 1) { - zErr = ts + 19287 /* "option requires ..." */ + zErr = ts + 10494 /* "option requires ..." */ } else { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((ii+1))*8)), bp+32 /* &nRepeat */) != 0 { return 1 } } - } else if (*(*int32)(unsafe.Pointer(bp + 28 /* nOption */)) > 1) && (crt.Xstrncmp(tls, zOption, ts+37902 /* "-benigncnt" */, uint64(*(*int32)(unsafe.Pointer(bp + 28 /* nOption */)))) == 0) { + } else if (*(*int32)(unsafe.Pointer(bp + 28 /* nOption */)) > 1) && (crt.Xstrncmp(tls, zOption, ts+29782 /* "-benigncnt" */, uint64(*(*int32)(unsafe.Pointer(bp + 28 /* nOption */)))) == 0) { if ii == (objc - 1) { - zErr = ts + 19287 /* "option requires ..." */ + zErr = ts + 10494 /* "option requires ..." */ } else { pBenignCnt = *(*uintptr)(unsafe.Pointer(objv + uintptr((ii+1))*8)) } } else { - zErr = ts + 20916 /* "unknown option: " */ + zErr = ts + 10300 /* "unknown option: " */ } if zErr != 0 { @@ -57078,7 +57599,7 @@ func test_memdebug_fail(tls *crt.TLS, clientData uintptr, interp uintptr, objc i func test_memdebug_pending(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:706:26: */ var nPending int32 if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } nPending = faultsimPending(tls) @@ -57102,7 +57623,7 @@ var sqlite3_memdebug_title_count int32 = 0 /* test_malloc.c:727:12 */ func test_memdebug_settitle(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:739:26: */ sqlite3_memdebug_title_count++ if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37913 /* "TITLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29793 /* "TITLE" */) return 1 } return 0 @@ -57163,9 +57684,9 @@ func test_memdebug_log(tls *crt.TLS, clientData uintptr, interp uintptr, objc in } if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37919 /* "SUB-COMMAND ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29799 /* "SUB-COMMAND ..." */) } - if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(unsafe.Pointer(&MB_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+2321 /* "sub-command" */, 0, bp /* &iSub */) != 0 { + if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(unsafe.Pointer(&MB_strs)), int32(unsafe.Sizeof(uintptr(0))), ts+1874 /* "sub-command" */, 0, bp /* &iSub */) != 0 { return 1 } @@ -57224,7 +57745,7 @@ func test_memdebug_log(tls *crt.TLS, clientData uintptr, interp uintptr, objc in } var isInit int32 = 0 /* test_malloc.c:826:14 */ -var MB_strs = [5]uintptr{ts + 37935 /* "start" */, ts + 37941 /* "stop" */, ts + 37946 /* "dump" */, ts + 37951 /* "clear" */, ts + 37957 /* "sync" */} /* test_malloc.c:829:21 */ +var MB_strs = [5]uintptr{ts + 29815 /* "start" */, ts + 29821 /* "stop" */, ts + 29826 /* "dump" */, ts + 29831 /* "clear" */, ts + 29837 /* "sync" */} /* test_malloc.c:829:21 */ // Usage: sqlite3_config_pagecache SIZE N // @@ -57244,7 +57765,7 @@ func test_config_pagecache(tls *crt.TLS, clientData uintptr, interp uintptr, obj var pRes uintptr if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37962 /* "SIZE N" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29842 /* "SIZE N" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+48 /* &sz */) != 0 { @@ -57292,7 +57813,7 @@ func test_alt_pcache(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 *(*int32)(unsafe.Pointer(bp + 28 /* highStress */)) = 0 if (objc < 2) || (objc > 5) { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, - ts+37969 /* "INSTALLFLAG DISC..." */) + ts+29849 /* "INSTALLFLAG DISC..." */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+16 /* &installFlag */) != 0 { @@ -57308,7 +57829,7 @@ func test_alt_pcache(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 return 1 } if (*(*int32)(unsafe.Pointer(bp + 20 /* discardChance */)) < 0) || (*(*int32)(unsafe.Pointer(bp + 20 /* discardChance */)) > 100) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+38016, /* "discard-chance s..." */ + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+29896, /* "discard-chance s..." */ uintptr(0))) return 1 } @@ -57328,7 +57849,7 @@ func test_config_memstatus(tls *crt.TLS, clientData uintptr, interp uintptr, obj var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38059 /* "BOOLEAN" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29939 /* "BOOLEAN" */) return 1 } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+8 /* &enable */) != 0 { @@ -57351,7 +57872,7 @@ func test_config_lookaside(tls *crt.TLS, clientData uintptr, interp uintptr, obj var pRet uintptr if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38067 /* "SIZE COUNT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29947 /* "SIZE COUNT" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+16 /* &sz */) != 0 { @@ -57389,7 +57910,7 @@ func test_db_config_lookaside(tls *crt.TLS, clientData uintptr, interp uintptr, // var bufid int32 at bp+72, 4 if objc != 5 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38078 /* "BUFID SIZE COUNT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29958 /* "BUFID SIZE COUNT" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+64 /* &db */) != 0 { @@ -57409,7 +57930,7 @@ func test_db_config_lookaside(tls *crt.TLS, clientData uintptr, interp uintptr, } else if ((*(*int32)(unsafe.Pointer(bp + 72 /* bufid */)) >= 1) && (*(*int32)(unsafe.Pointer(bp + 72 /* bufid */)) <= 2)) && ((uint64(*(*int32)(unsafe.Pointer(bp + 76 /* sz */)) * *(*int32)(unsafe.Pointer(bp + 80 /* cnt */)))) <= uint64(unsafe.Sizeof([10000]int8{}))) { rc = sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* db */)), 1001, crt.VaList(bp+24, (uintptr(unsafe.Pointer(&azBuf))+uintptr(*(*int32)(unsafe.Pointer(bp + 72 /* bufid */)))*10000), *(*int32)(unsafe.Pointer(bp + 76 /* sz */)), *(*int32)(unsafe.Pointer(bp + 80 /* cnt */)))) } else { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+38095 /* "illegal argument..." */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+29975 /* "illegal argument..." */, uintptr(0))) return 1 } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, rc)) @@ -57433,7 +57954,7 @@ func test_config_heap(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var nArg int32 = (objc - 1) if nArg != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38133 /* "NBYTE NMINALLOC" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+30013 /* "NBYTE NMINALLOC" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(aArg + uintptr(0)*8)), bp+48 /* &nByte */) != 0 { @@ -57471,7 +57992,7 @@ func test_config_heap_size(tls *crt.TLS, clientData uintptr, interp uintptr, obj var nArg int32 = (objc - 1) if nArg != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+22849 /* "NBYTE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14082 /* "NBYTE" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(aArg + uintptr(0)*8)), bp+8 /* &nByte */) != 0 { @@ -57495,7 +58016,7 @@ func test_config_error(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // var db uintptr at bp+32, 8 if (objc != 2) && (objc != 1) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38149 /* "[DB]" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+30029 /* "[DB]" */) return 1 } if objc == 2 { @@ -57504,14 +58025,14 @@ func test_config_error(tls *crt.TLS, clientData uintptr, interp uintptr, objc in } if sqlite3.Xsqlite3_db_config(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* db */)), 99999, 0) != 1 { tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp, ts+38154, /* "sqlite3_db_confi..." */ + crt.VaList(bp, ts+30034, /* "sqlite3_db_confi..." */ uintptr(0))) return 1 } } else { if sqlite3.Xsqlite3_config(tls, 99999, 0) != 1 { tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp+16, ts+38212, /* "sqlite3_config(9..." */ + crt.VaList(bp+16, ts+30092, /* "sqlite3_config(9..." */ uintptr(0))) return 1 } @@ -57531,7 +58052,7 @@ func test_config_uri(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 // var bOpenUri int32 at bp+8, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25175 /* "BOOL" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16556 /* "BOOL" */) return 1 } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+8 /* &bOpenUri */) != 0 { @@ -57556,7 +58077,7 @@ func test_config_cis(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 // var bUseCis int32 at bp+8, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25175 /* "BOOL" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16556 /* "BOOL" */) return 1 } if tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+8 /* &bUseCis */) != 0 { @@ -57580,7 +58101,7 @@ func test_config_pmasz(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // var iPmaSz int32 at bp+8, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25175 /* "BOOL" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16556 /* "BOOL" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+8 /* &iPmaSz */) != 0 { @@ -57599,7 +58120,7 @@ func test_config_pmasz(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // Write a summary of unfreed memsys3 allocations to FILENAME. func test_dump_memsys3(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_malloc.c:1284:26: */ if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37867 /* "FILENAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29747 /* "FILENAME" */) return 1 } @@ -57635,7 +58156,7 @@ func test_status(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o var zOpName uintptr var pResult uintptr if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38263 /* "PARAMETER RESETF..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+30143 /* "PARAMETER RESETF..." */) return 1 } zOpName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -57677,16 +58198,16 @@ var aOp1 = [10]struct { Fop int32 _ [4]byte }{ - {FzName: ts + 38283 /* "SQLITE_STATUS_ME..." */, Fop: 0}, - {FzName: ts + 38309 /* "SQLITE_STATUS_MA..." */, Fop: 5}, - {FzName: ts + 38335 /* "SQLITE_STATUS_PA..." */, Fop: 1}, - {FzName: ts + 38364 /* "SQLITE_STATUS_PA..." */, Fop: 2}, - {FzName: ts + 38397 /* "SQLITE_STATUS_PA..." */, Fop: 7}, - {FzName: ts + 38426 /* "SQLITE_STATUS_SC..." */, Fop: 3}, - {FzName: ts + 38453 /* "SQLITE_STATUS_SC..." */, Fop: 4}, - {FzName: ts + 38484 /* "SQLITE_STATUS_SC..." */, Fop: 8}, - {FzName: ts + 38511 /* "SQLITE_STATUS_PA..." */, Fop: 6}, - {FzName: ts + 38538 /* "SQLITE_STATUS_MA..." */, Fop: 9}, + {FzName: ts + 30163 /* "SQLITE_STATUS_ME..." */, Fop: 0}, + {FzName: ts + 30189 /* "SQLITE_STATUS_MA..." */, Fop: 5}, + {FzName: ts + 30215 /* "SQLITE_STATUS_PA..." */, Fop: 1}, + {FzName: ts + 30244 /* "SQLITE_STATUS_PA..." */, Fop: 2}, + {FzName: ts + 30277 /* "SQLITE_STATUS_PA..." */, Fop: 7}, + {FzName: ts + 30306 /* "SQLITE_STATUS_SC..." */, Fop: 3}, + {FzName: ts + 30333 /* "SQLITE_STATUS_SC..." */, Fop: 4}, + {FzName: ts + 30364 /* "SQLITE_STATUS_SC..." */, Fop: 8}, + {FzName: ts + 30391 /* "SQLITE_STATUS_PA..." */, Fop: 6}, + {FzName: ts + 30418 /* "SQLITE_STATUS_MA..." */, Fop: 9}, } /* test_malloc.c:1332:5 */ // Usage: sqlite3_db_status DATABASE OPCODE RESETFLAG @@ -57711,17 +58232,17 @@ func test_db_status(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 var pResult uintptr if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38565 /* "DB PARAMETER RES..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+30445 /* "DB PARAMETER RES..." */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { return 1 } zOpName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) - if crt.Xmemcmp(tls, zOpName, ts+38588 /* "SQLITE_" */, uint64(7)) == 0 { + if crt.Xmemcmp(tls, zOpName, ts+30468 /* "SQLITE_" */, uint64(7)) == 0 { zOpName += uintptr(7) } - if crt.Xmemcmp(tls, zOpName, ts+38596 /* "DBSTATUS_" */, uint64(9)) == 0 { + if crt.Xmemcmp(tls, zOpName, ts+30476 /* "DBSTATUS_" */, uint64(9)) == 0 { zOpName += uintptr(9) } for i = 0; i < (int32(uint64(unsafe.Sizeof(aOp2)) / uint64(unsafe.Sizeof(struct { @@ -57762,19 +58283,19 @@ var aOp2 = [13]struct { Fop int32 _ [4]byte }{ - {FzName: ts + 38606 /* "LOOKASIDE_USED" */, Fop: 0}, - {FzName: ts + 38621 /* "CACHE_USED" */, Fop: 1}, - {FzName: ts + 38632 /* "SCHEMA_USED" */, Fop: 2}, - {FzName: ts + 38644 /* "STMT_USED" */, Fop: 3}, - {FzName: ts + 38654 /* "LOOKASIDE_HIT" */, Fop: 4}, - {FzName: ts + 38668 /* "LOOKASIDE_MISS_S..." */, Fop: 5}, - {FzName: ts + 38688 /* "LOOKASIDE_MISS_F..." */, Fop: 6}, - {FzName: ts + 38708 /* "CACHE_HIT" */, Fop: 7}, - {FzName: ts + 38718 /* "CACHE_MISS" */, Fop: 8}, - {FzName: ts + 38729 /* "CACHE_WRITE" */, Fop: 9}, - {FzName: ts + 38741 /* "DEFERRED_FKS" */, Fop: 10}, - {FzName: ts + 38754 /* "CACHE_USED_SHARE..." */, Fop: 11}, - {FzName: ts + 38772 /* "CACHE_SPILL" */, Fop: 12}, + {FzName: ts + 30486 /* "LOOKASIDE_USED" */, Fop: 0}, + {FzName: ts + 30501 /* "CACHE_USED" */, Fop: 1}, + {FzName: ts + 30512 /* "SCHEMA_USED" */, Fop: 2}, + {FzName: ts + 30524 /* "STMT_USED" */, Fop: 3}, + {FzName: ts + 30534 /* "LOOKASIDE_HIT" */, Fop: 4}, + {FzName: ts + 30548 /* "LOOKASIDE_MISS_S..." */, Fop: 5}, + {FzName: ts + 30568 /* "LOOKASIDE_MISS_F..." */, Fop: 6}, + {FzName: ts + 30588 /* "CACHE_HIT" */, Fop: 7}, + {FzName: ts + 30598 /* "CACHE_MISS" */, Fop: 8}, + {FzName: ts + 30609 /* "CACHE_WRITE" */, Fop: 9}, + {FzName: ts + 30621 /* "DEFERRED_FKS" */, Fop: 10}, + {FzName: ts + 30634 /* "CACHE_USED_SHARE..." */, Fop: 11}, + {FzName: ts + 30652 /* "CACHE_SPILL" */, Fop: 12}, } /* test_malloc.c:1391:5 */ // install_malloc_faultsim BOOLEAN @@ -57786,7 +58307,7 @@ func test_install_malloc_faultsim(tls *crt.TLS, clientData uintptr, interp uintp // var isInstall int32 at bp, 4 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38059 /* "BOOLEAN" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29939 /* "BOOLEAN" */) return 1 } if 0 != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &isInstall */) { @@ -57809,7 +58330,7 @@ func test_vfs_oom_test(tls *crt.TLS, clientData uintptr, interp uintptr, objc in defer tls.Free(4) if objc > 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38784 /* "?INTEGER?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+30664 /* "?INTEGER?" */) return 1 } else if objc == 2 { // var iNew int32 at bp, 4 @@ -57826,56 +58347,56 @@ func test_vfs_oom_test(tls *crt.TLS, clientData uintptr, interp uintptr, objc in // Register commands with the TCL interpreter. func Sqlitetest_malloc_Init(tls *crt.TLS, interp uintptr) int32 { /* test_malloc.c:1500:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd11)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd10)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData int32 _ [4]byte }{}))); i++ { - var c ClientData = uintptr(int64(aObjCmd11[i].FclientData)) - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd11[i].FzName, aObjCmd11[i].FxProc, c, uintptr(0)) + var c ClientData = uintptr(int64(aObjCmd10[i].FclientData)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd10[i].FzName, aObjCmd10[i].FxProc, c, uintptr(0)) } return 0 } -var aObjCmd11 = [32]struct { +var aObjCmd10 = [32]struct { FzName uintptr FxProc uintptr FclientData int32 _ [4]byte }{ - {FzName: ts + 33135 /* "sqlite3_malloc" */, FxProc: 0, FclientData: 0}, - {FzName: ts + 33150 /* "sqlite3_realloc" */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38794 /* "sqlite3_free" */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38807 /* "memset" */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38814 /* "memget" */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38821 /* "sqlite3_memory_u..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38841 /* "sqlite3_memory_h..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38866 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38893 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38915 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38937 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38962 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 38988 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39018 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39039 /* "sqlite3_config_p..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39064 /* "sqlite3_config_a..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39090 /* "sqlite3_status" */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39105 /* "sqlite3_db_statu..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39123 /* "install_malloc_f..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39147 /* "sqlite3_config_h..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39167 /* "sqlite3_config_h..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39192 /* "sqlite3_config_m..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39217 /* "sqlite3_config_l..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39242 /* "sqlite3_config_e..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39263 /* "sqlite3_config_u..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39282 /* "sqlite3_config_c..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39301 /* "sqlite3_config_p..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39322 /* "sqlite3_db_confi..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39350 /* "sqlite3_dump_mem..." */, FxProc: 0, FclientData: 3}, - {FzName: ts + 39371 /* "sqlite3_dump_mem..." */, FxProc: 0, FclientData: 5}, - {FzName: ts + 39392 /* "sqlite3_install_..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 39416 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 24956 /* "sqlite3_malloc" */, FxProc: 0, FclientData: 0}, + {FzName: ts + 24971 /* "sqlite3_realloc" */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30674 /* "sqlite3_free" */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30687 /* "memset" */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30694 /* "memget" */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30701 /* "sqlite3_memory_u..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30721 /* "sqlite3_memory_h..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30746 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30773 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30795 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30817 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30842 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30868 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30898 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30919 /* "sqlite3_config_p..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30944 /* "sqlite3_config_a..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30970 /* "sqlite3_status" */, FxProc: 0, FclientData: 0}, + {FzName: ts + 30985 /* "sqlite3_db_statu..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31003 /* "install_malloc_f..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31027 /* "sqlite3_config_h..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31047 /* "sqlite3_config_h..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31072 /* "sqlite3_config_m..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31097 /* "sqlite3_config_l..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31122 /* "sqlite3_config_e..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31143 /* "sqlite3_config_u..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31162 /* "sqlite3_config_c..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31181 /* "sqlite3_config_p..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31202 /* "sqlite3_db_confi..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31230 /* "sqlite3_dump_mem..." */, FxProc: 0, FclientData: 3}, + {FzName: ts + 31251 /* "sqlite3_dump_mem..." */, FxProc: 0, FclientData: 5}, + {FzName: ts + 31272 /* "sqlite3_install_..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 31296 /* "sqlite3_memdebug..." */, FxProc: 0, FclientData: 0}, } /* test_malloc.c:1505:5 */ // end block for C++ @@ -58261,7 +58782,7 @@ func MD5DigestToBase16(tls *crt.TLS, digest uintptr, zBuf uintptr) { /* test_md5 *(*int8)(unsafe.Pointer(zBuf + uintptr(j))) = int8(0) } -var zEncode = *(*[17]int8)(unsafe.Pointer(ts + 36176 /* "0123456789abcdef" */)) /* test_md5.c:285:21 */ +var zEncode = *(*[17]int8)(unsafe.Pointer(ts + 28008 /* "0123456789abcdef" */)) /* test_md5.c:285:21 */ // Convert a 128-bit MD5 digest into sequency of eight 5-digit integers // each representing 16 bits of the digest and separated from each @@ -58278,7 +58799,7 @@ func MD5DigestToBase10x8(tls *crt.TLS, digest uintptr, zDigest uintptr) { /* tes if i > 0 { *(*int8)(unsafe.Pointer(zDigest + uintptr(crt.PostIncInt32(&j, 1)))) = int8('-') } - sqlite3.Xsqlite3_snprintf(tls, (50 - j), (zDigest + uintptr(j)), ts+39446 /* "%05u" */, crt.VaList(bp, x)) + sqlite3.Xsqlite3_snprintf(tls, (50 - j), (zDigest + uintptr(j)), ts+31326 /* "%05u" */, crt.VaList(bp, x)) j = j + (5) } *(*int8)(unsafe.Pointer(zDigest + uintptr(j))) = int8(0) @@ -58299,8 +58820,8 @@ func md5_cmd(tls *crt.TLS, cd uintptr, interp uintptr, argc int32, argv uintptr) var converter uintptr if argc != 2 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+21931 /* " TEXT\"" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+13164 /* " TEXT\"" */, uintptr(0))) return 1 } MD5Init(tls, bp+48 /* &ctx */) @@ -58329,8 +58850,8 @@ func md5file_cmd(tls *crt.TLS, cd uintptr, interp uintptr, argc int32, argv uint // var zBuf [10240]int8 at bp+172, 10240 if (argc != 2) && (argc != 4) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), - ts+39451 /* " FILENAME [OFFSE..." */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801 /* "wrong # args: sh..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)), + ts+31331 /* " FILENAME [OFFSE..." */, uintptr(0))) return 1 } if argc == 4 { @@ -58340,10 +58861,10 @@ func md5file_cmd(tls *crt.TLS, cd uintptr, interp uintptr, argc int32, argv uint ofst = 0 amt = 2147483647 } - in = crt.Xfopen(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+3756 /* "rb" */) + in = crt.Xfopen(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+2937 /* "rb" */) if in == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+39475 /* "unable to open f..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), - ts+39497 /* "\" for reading" */, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+31355 /* "unable to open f..." */, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), + ts+31377 /* "\" for reading" */, uintptr(0))) return 1 } crt.Xfseek(tls, in, int64(ofst), 0) @@ -58373,25 +58894,25 @@ func md5file_cmd(tls *crt.TLS, cd uintptr, interp uintptr, argc int32, argv uint // Register the four new TCL commands for generating MD5 checksums // with the TCL interpreter. func Md5_Init(tls *crt.TLS, interp uintptr) int32 { /* test_md5.c:400:5: */ - tcl.XTcl_CreateCommand(tls, interp, ts+39511 /* "md5" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateCommand(tls, interp, ts+31391 /* "md5" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{md5_cmd})), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr) }{MD5DigestToBase16})), uintptr(0)) - tcl.XTcl_CreateCommand(tls, interp, ts+39515 /* "md5-10x8" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateCommand(tls, interp, ts+31395 /* "md5-10x8" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{md5_cmd})), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr) }{MD5DigestToBase10x8})), uintptr(0)) - tcl.XTcl_CreateCommand(tls, interp, ts+39524 /* "md5file" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateCommand(tls, interp, ts+31404 /* "md5file" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{md5file_cmd})), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr) }{MD5DigestToBase16})), uintptr(0)) - tcl.XTcl_CreateCommand(tls, interp, ts+39532 /* "md5file-10x8" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateCommand(tls, interp, ts+31412 /* "md5file-10x8" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{md5file_cmd})), *(*uintptr)(unsafe.Pointer(&struct { @@ -58437,11 +58958,11 @@ func md5finalize(tls *crt.TLS, context uintptr) { /* test_md5.c:432:13: */ sqlite3.Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, crt.UintptrFromInt32(-1)) } func Md5_Register(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pThunk uintptr) int32 { /* test_md5.c:441:5: */ - var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+39545 /* "md5sum" */, -1, 1, uintptr(0), uintptr(0), + var rc int32 = sqlite3.Xsqlite3_create_function(tls, db, ts+31425 /* "md5sum" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{md5step})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{md5finalize}))) - sqlite3.Xsqlite3_overload_function(tls, db, ts+39545 /* "md5sum" */, -1) // To exercise this API + sqlite3.Xsqlite3_overload_function(tls, db, ts+31425 /* "md5sum" */, -1) // To exercise this API return rc } @@ -58610,18 +59131,13 @@ func multiplexFilename(tls *crt.TLS, zBase uintptr, nBase int32, flags int32, iC var n int32 = nBase crt.Xmemcpy(tls, zOut, zBase, (uint64(n + 1))) if (iChunk != 0) && (iChunk <= 299) { - sqlite3.Xsqlite3_snprintf(tls, 4, (zOut + uintptr(n)), ts+39552 /* "%03d" */, crt.VaList(bp, iChunk)) + sqlite3.Xsqlite3_snprintf(tls, 4, (zOut + uintptr(n)), ts+31432 /* "%03d" */, crt.VaList(bp, iChunk)) n = n + (3) } - if !(int32(*(*int8)(unsafe.Pointer(zOut + uintptr(n)))) == 0) { - crt.X__assert_fail(tls, ts+39557 /* "zOut[n]=='\\0'" */, ts+39571 /* "testdata/sqlite-..." */, uint32(250), uintptr(unsafe.Pointer(&__func__102))) - } *(*int8)(unsafe.Pointer(zOut + uintptr((n + 1)))) = int8(0) } -var __func__102 = *(*[18]int8)(unsafe.Pointer(ts + 39620 /* "multiplexFilenam..." */)) /* test_multiplex.c:225:2 */ - // Compute the filename for the iChunk-th chunk func multiplexSubFilename(tls *crt.TLS, pGroup uintptr, iChunk int32) int32 { /* test_multiplex.c:256:12: */ if iChunk >= (*multiplexGroup)(unsafe.Pointer(pGroup)).FnReal { @@ -58642,7 +59158,7 @@ func multiplexSubFilename(tls *crt.TLS, pGroup uintptr, iChunk int32) int32 { /* return 7 } multiplexFilename(tls, (*multiplexGroup)(unsafe.Pointer(pGroup)).FzName, (*multiplexGroup)(unsafe.Pointer(pGroup)).FnName, (*multiplexGroup)(unsafe.Pointer(pGroup)).Fflags, iChunk, z) - (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(iChunk)*16)).Fz = sqlite3.Xsqlite3_create_filename(tls, z, ts+792 /* "" */, ts+792 /* "" */, 0, uintptr(0)) + (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(iChunk)*16)).Fz = sqlite3.Xsqlite3_create_filename(tls, z, ts+488 /* "" */, ts+488 /* "" */, 0, uintptr(0)) sqlite3.Xsqlite3_free(tls, z) if (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz == uintptr(0) { return 7 @@ -58680,7 +59196,7 @@ func multiplexSubOpen(tls *crt.TLS, pGroup uintptr, iChunk int32, rc uintptr, pO 0, bp+16 /* &bExists */) if (*(*int32)(unsafe.Pointer(rc)) != 0) || !(*(*int32)(unsafe.Pointer(bp + 16 /* bExists */)) != 0) { if *(*int32)(unsafe.Pointer(rc)) != 0 { - sqlite3.Xsqlite3_log(tls, *(*int32)(unsafe.Pointer(rc)), ts+39638, /* "multiplexor.xAcc..." */ + sqlite3.Xsqlite3_log(tls, *(*int32)(unsafe.Pointer(rc)), ts+31437, /* "multiplexor.xAcc..." */ crt.VaList(bp, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz)) } return uintptr(0) @@ -58696,7 +59212,7 @@ func multiplexSubOpen(tls *crt.TLS, pGroup uintptr, iChunk int32, rc uintptr, pO *(*int32)(unsafe.Pointer(rc)) = (*(*func(*crt.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pOrigVfs + 40 /* &.xOpen */))))(tls, pOrigVfs, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz, pSubOpen, flags, pOutFlags) if (*(*int32)(unsafe.Pointer(rc))) != 0 { - sqlite3.Xsqlite3_log(tls, *(*int32)(unsafe.Pointer(rc)), ts+39672, /* "multiplexor.xOpe..." */ + sqlite3.Xsqlite3_log(tls, *(*int32)(unsafe.Pointer(rc)), ts+31471, /* "multiplexor.xOpe..." */ crt.VaList(bp+8, (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal+uintptr(iChunk)*16)).Fz)) sqlite3.Xsqlite3_free(tls, pSubOpen) (*multiplexReal)(unsafe.Pointer((*multiplexGroup)(unsafe.Pointer(pGroup)).FaReal + uintptr(iChunk)*16)).Fp = uintptr(0) @@ -58772,7 +59288,7 @@ func multiplexControlFunc(tls *crt.TLS, context uintptr, argc int32, argv uintpt // multiplex_control() function. func multiplexFuncInit(tls *crt.TLS, db uintptr, pzErrMsg uintptr, pApi uintptr) int32 { /* test_multiplex.c:417:12: */ var rc int32 - rc = sqlite3.Xsqlite3_create_function(tls, db, ts+39704 /* "multiplex_contro..." */, 2, 5, + rc = sqlite3.Xsqlite3_create_function(tls, db, ts+31503 /* "multiplex_contro..." */, 2, 5, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{multiplexControlFunc})), uintptr(0), uintptr(0)) @@ -58826,9 +59342,6 @@ func multiplexOpen(tls *crt.TLS, pVfs uintptr, zName uintptr, pConn uintptr, fla _ = pVfs crt.Xmemset(tls, pConn, 0, uint64((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) - if !((zName != 0) || ((flags & 0x00000008) != 0)) { - crt.X__assert_fail(tls, ts+39722 /* "zName || (flags ..." */, ts+39571 /* "testdata/sqlite-..." */, uint32(487), uintptr(unsafe.Pointer(&__func__103))) - } // We need to create a group structure and manage // access to this group of files. @@ -58860,9 +59373,9 @@ func multiplexOpen(tls *crt.TLS, pVfs uintptr, zName uintptr, pConn uintptr, fla crt.Xmemset(tls, pGroup, 0, uint64(sz)) (*multiplexConn)(unsafe.Pointer(pMultiplexOpen)).FpGroup = pGroup (*multiplexGroup)(unsafe.Pointer(pGroup)).FbEnabled = crt.Uint8(crt.Uint8FromInt32(-1)) - (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate = uint8(sqlite3.Xsqlite3_uri_boolean(tls, zUri, ts+24528, /* "truncate" */ + (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate = uint8(sqlite3.Xsqlite3_uri_boolean(tls, zUri, ts+15905, /* "truncate" */ (crt.Bool32((flags & 0x00000100) == 0)))) - (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk = uint32(int32(sqlite3.Xsqlite3_uri_int64(tls, zUri, ts+39752, /* "chunksize" */ + (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk = uint32(int32(sqlite3.Xsqlite3_uri_int64(tls, zUri, ts+31521, /* "chunksize" */ int64(2147418112)))) (*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk = (((*multiplexGroup)(unsafe.Pointer(pGroup)).FszChunk + uint32(0xffff)) & ^uint32(crt.Int32FromInt32(0xffff))) if zName != 0 { @@ -58947,8 +59460,6 @@ func multiplexOpen(tls *crt.TLS, pVfs uintptr, zName uintptr, pConn uintptr, fla return *(*int32)(unsafe.Pointer(bp /* rc */)) } -var __func__103 = *(*[14]int8)(unsafe.Pointer(ts + 39762 /* "multiplexOpen" */)) /* test_multiplex.c:475:2 */ - // This is the xDelete method used for the "multiplex" VFS. // It attempts to delete the filename specified. func multiplexDelete(tls *crt.TLS, pVfs uintptr, zName uintptr, syncDir int32) int32 { /* test_multiplex.c:611:12: */ @@ -59325,13 +59836,13 @@ func multiplexFileControl(tls *crt.TLS, pConn uintptr, op int32, pArg uintptr) i // 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. - if (*(*uintptr)(unsafe.Pointer(aFcntl + uintptr(1)*8)) != 0) && (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(1)*8)), ts+39776 /* "multiplex_trunca..." */) == 0) { + if (*(*uintptr)(unsafe.Pointer(aFcntl + uintptr(1)*8)) != 0) && (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(1)*8)), ts+31531 /* "multiplex_trunca..." */) == 0) { if (*(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)) != 0) && (*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)) + uintptr(0))) != 0) { - if (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)), ts+4000 /* "on" */) == 0) || - (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)), ts+33881 /* "1" */) == 0) { + if (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)), ts+3073 /* "on" */) == 0) || + (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)), ts+25702 /* "1" */) == 0) { (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate = uint8(1) - } else if (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)), ts+4011 /* "off" */) == 0) || - (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)), ts+8293 /* "0" */) == 0) { + } else if (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)), ts+3084 /* "off" */) == 0) || + (sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(2)*8)), ts+12045 /* "0" */) == 0) { (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate = uint8(0) } } @@ -59342,9 +59853,9 @@ func multiplexFileControl(tls *crt.TLS, pConn uintptr, op int32, pArg uintptr) i // or the error message if the pragma fails. *(*uintptr)(unsafe.Pointer(aFcntl + uintptr(0)*8)) = sqlite3.Xsqlite3_mprintf(tls, func() uintptr { if (*multiplexGroup)(unsafe.Pointer(pGroup)).FbTruncate != 0 { - return ts + 4000 /* "on" */ + return ts + 3073 /* "on" */ } - return ts + 4011 /* "off" */ + return ts + 3084 /* "off" */ }(), 0) *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = 0 break @@ -59358,7 +59869,7 @@ func multiplexFileControl(tls *crt.TLS, pConn uintptr, op int32, pArg uintptr) i if pSubOpen != 0 { *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = (*(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 80 /* &.xFileControl */))))(tls, pSubOpen, op, pArg) if (op == 12) && (*(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == 0) { - *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+39795 /* "multiplex/%z" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) + *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+31550 /* "multiplex/%z" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) } } break @@ -59475,14 +59986,12 @@ func sqlite3_multiplex_initialize(tls *crt.TLS, zOrigVfsName uintptr, makeDefaul if pOrigVfs == uintptr(0) { return 1 } - if !(pOrigVfs != (uintptr(unsafe.Pointer(&gMultiplex)) + 8 /* &.sThisVfs */)) { - crt.X__assert_fail(tls, ts+39808 /* "pOrigVfs!=&gMult..." */, ts+39571 /* "testdata/sqlite-..." */, uint32(1102), uintptr(unsafe.Pointer(&__func__104))) - } + gMultiplex.FisInitialized = 1 gMultiplex.FpOrigVfs = pOrigVfs gMultiplex.FsThisVfs = *(*sqlite3_vfs)(unsafe.Pointer(pOrigVfs)) *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&gMultiplex)) + 8 /* &.sThisVfs */ + 4 /* &.szOsFile */)) += int32((uint64(unsafe.Sizeof(multiplexConn{})))) - gMultiplex.FsThisVfs.FzName = ts + 39839 /* "multiplex" */ + gMultiplex.FsThisVfs.FzName = ts + 31563 /* "multiplex" */ gMultiplex.FsThisVfs.FxOpen = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32 }{multiplexOpen})) @@ -59575,8 +60084,6 @@ func sqlite3_multiplex_initialize(tls *crt.TLS, zOrigVfsName uintptr, makeDefaul return 0 } -var __func__104 = *(*[29]int8)(unsafe.Pointer(ts + 39849 /* "sqlite3_multiple..." */)) /* test_multiplex.c:1097:76 */ - // CAPI: Shutdown the multiplex system - sqlite3_multiplex_shutdown() // // All SQLite database connections must be closed before calling this @@ -59609,7 +60116,7 @@ func test_multiplex_initialize(tls *crt.TLS, clientData uintptr, interp uintptr, // Process arguments if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+39878 /* "NAME MAKEDEFAULT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31573 /* "NAME MAKEDEFAULT" */) return 1 } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -59633,11 +60140,11 @@ func test_multiplex_shutdown(tls *crt.TLS, clientData uintptr, interp uintptr, o _ = clientData - if (objc == 2) && (crt.Xstrcmp(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), ts+39895 /* "-force" */) != 0) { + if (objc == 2) && (crt.Xstrcmp(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), ts+31590 /* "-force" */) != 0) { objc = 3 } if (objc != 1) && (objc != 2) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+39902 /* "?-force?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31597 /* "?-force?" */) return 1 } @@ -59671,20 +60178,20 @@ func test_multiplex_control(tls *crt.TLS, cd ClientData, interp uintptr, objc in Fop int32 Fargtype int32 }{ - {FzName: ts + 39911 /* "enable" */, Fop: 214014, Fargtype: 1}, - {FzName: ts + 39918 /* "chunk_size" */, Fop: 214015, Fargtype: 1}, - {FzName: ts + 39929 /* "max_chunks" */, Fop: 214016, Fargtype: 1}, + {FzName: ts + 31606 /* "enable" */, Fop: 214014, Fargtype: 1}, + {FzName: ts + 31613 /* "chunk_size" */, Fop: 214015, Fargtype: 1}, + {FzName: ts + 31624 /* "max_chunks" */, Fop: 214016, Fargtype: 1}, {FzName: uintptr(0), Fop: 0, Fargtype: 0}, } if objc != 5 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+39940 /* "HANDLE DBNAME SU..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31635 /* "HANDLE DBNAME SU..." */) return 1 } if 0 == tcl.XTcl_GetCommandInfo(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+40 /* &cmdInfo */) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+39976 /* "expected databas..." */, 0)) - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), ts+18666 /* "\"" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+31671 /* "expected databas..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), ts+9801 /* "\"" */, 0)) return 1 } else { db = *(*uintptr)(unsafe.Pointer((*Tcl_CmdInfo)(unsafe.Pointer(bp + 40 /* &cmdInfo */)).FobjClientData)) @@ -59695,7 +60202,7 @@ func test_multiplex_control(tls *crt.TLS, cd ClientData, interp uintptr, objc in FzName uintptr Fop int32 Fargtype int32 - }{})), ts+2321 /* "sub-command" */, 0, bp+168 /* &idx */) + }{})), ts+1874 /* "sub-command" */, 0, bp+168 /* &idx */) if rc != 0 { return rc } @@ -59712,7 +60219,7 @@ func test_multiplex_control(tls *crt.TLS, cd ClientData, interp uintptr, objc in pArg = bp + 172 /* &iValue */ break default: - tcl.XTcl_WrongNumArgs(tls, interp, 4, objv, ts+40008 /* "SUB-COMMAND" */) + tcl.XTcl_WrongNumArgs(tls, interp, 4, objv, ts+31703 /* "SUB-COMMAND" */) return 1 } @@ -59734,23 +60241,23 @@ func test_multiplex_control(tls *crt.TLS, cd ClientData, interp uintptr, objc in func Sqlitemultiplex_Init(tls *crt.TLS, interp uintptr) int32 { /* test_multiplex.c:1306:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd5)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd6)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aCmd5[i].FzName, aCmd5[i].FxProc, uintptr(0), uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aCmd6[i].FzName, aCmd6[i].FxProc, uintptr(0), uintptr(0)) } return 0 } -var aCmd5 = [3]struct { +var aCmd6 = [3]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 39849 /* "sqlite3_multiple..." */, FxProc: 0}, - {FzName: ts + 40020 /* "sqlite3_multiple..." */, FxProc: 0}, - {FzName: ts + 40047 /* "sqlite3_multiple..." */, FxProc: 0}, + {FzName: ts + 31715 /* "sqlite3_multiple..." */, FxProc: 0}, + {FzName: ts + 31744 /* "sqlite3_multiple..." */, FxProc: 0}, + {FzName: ts + 31771 /* "sqlite3_multiple..." */, FxProc: 0}, } /* test_multiplex.c:1310:5 */ // CAPI3REF: Standard File Control Opcodes @@ -60087,10 +60594,10 @@ var aCmd5 = [3]struct { type sqlite3_mutex = sqlite3_mutex1 /* sqlite3.h:1183:30 */ var aName = [15]uintptr{ - ts + 40073 /* "fast" */, ts + 40078 /* "recursive" */, ts + 40088 /* "static_master" */, ts + 40102, /* "static_mem" */ - ts + 40113 /* "static_open" */, ts + 40125 /* "static_prng" */, ts + 40137 /* "static_lru" */, ts + 40148, /* "static_pmem" */ - ts + 40160 /* "static_app1" */, ts + 40172 /* "static_app2" */, ts + 40184 /* "static_app3" */, ts + 40196, /* "static_vfs1" */ - ts + 40208 /* "static_vfs2" */, ts + 40220 /* "static_vfs3" */, uintptr(0), + ts + 31797 /* "fast" */, ts + 31802 /* "recursive" */, ts + 31812 /* "static_master" */, ts + 31826, /* "static_mem" */ + ts + 31837 /* "static_open" */, ts + 31849 /* "static_prng" */, ts + 31861 /* "static_lru" */, ts + 31872, /* "static_pmem" */ + ts + 31884 /* "static_app1" */, ts + 31896 /* "static_app2" */, ts + 31908 /* "static_app3" */, ts + 31920, /* "static_vfs1" */ + ts + 31932 /* "static_vfs2" */, ts + 31944 /* "static_vfs3" */, uintptr(0), } /* test_mutex.c:32:19 */ // State variables @@ -60197,7 +60704,7 @@ func test_shutdown(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var rc int32 if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -60211,7 +60718,7 @@ func test_initialize(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 var rc int32 if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -60231,7 +60738,7 @@ func test_install_mutex_counters(tls *crt.TLS, clientData uintptr, interp uintpt *(*sqlite3_mutex_methods)(unsafe.Pointer(bp + 64 /* counter_methods */)) = sqlite3_mutex_methods{FxMutexInit: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS) int32 }{counterMutexInit})), FxMutexEnd: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS) int32 }{counterMutexEnd})), FxMutexAlloc: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, int32) uintptr }{counterMutexAlloc})), FxMutexFree: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{counterMutexFree})), FxMutexEnter: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{counterMutexEnter})), FxMutexTry: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) int32 }{counterMutexTry})), FxMutexLeave: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{counterMutexLeave})), FxMutexHeld: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) int32 }{counterMutexHeld})), FxMutexNotheld: *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) int32 }{counterMutexNotheld}))} if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+38059 /* "BOOLEAN" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29939 /* "BOOLEAN" */) return 1 } if 0 != tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+56 /* &isInstall */) { @@ -60239,12 +60746,12 @@ func test_install_mutex_counters(tls *crt.TLS, clientData uintptr, interp uintpt } if *(*int32)(unsafe.Pointer(bp + 56 /* isInstall */)) == g3.FisInstalled { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+40232 /* "mutex counters a..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+31956 /* "mutex counters a..." */, 0)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, func() uintptr { if *(*int32)(unsafe.Pointer(bp + 56 /* isInstall */)) != 0 { - return ts + 40252 /* "already installe..." */ + return ts + 31976 /* "already installe..." */ } - return ts + 40270 /* "not installed" */ + return ts + 31994 /* "not installed" */ }(), 0)) return 1 } @@ -60276,7 +60783,7 @@ func test_read_mutex_counters(tls *crt.TLS, clientData uintptr, interp uintptr, var ii int32 if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -60302,7 +60809,7 @@ func test_clear_mutex_counters(tls *crt.TLS, clientData uintptr, interp uintptr, var ii int32 if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -60323,7 +60830,7 @@ func test_alloc_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, objc int // var zBuf [100]int8 at bp+24, 100 sqlite3.Xsqlite3_mutex_free(tls, p) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+24 /* &zBuf[0] */, ts+20002 /* "%p" */, crt.VaList(bp, p)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+24 /* &zBuf[0] */, ts+11197 /* "%p" */, crt.VaList(bp, p)) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+8, bp+24 /* &zBuf[0] */, uintptr(0))) return 0 } @@ -60342,9 +60849,9 @@ func test_config(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o defer tls.Free(68) *(*[4]ConfigOption)(unsafe.Pointer(bp /* aOpt */)) = [4]ConfigOption{ - {FzName: ts + 40284 /* "singlethread" */, FiValue: 1}, - {FzName: ts + 40297 /* "multithread" */, FiValue: 2}, - {FzName: ts + 40309 /* "serialized" */, FiValue: 3}, + {FzName: ts + 32008 /* "singlethread" */, FiValue: 1}, + {FzName: ts + 32021 /* "multithread" */, FiValue: 2}, + {FzName: ts + 32033 /* "serialized" */, FiValue: 3}, {FzName: uintptr(0), FiValue: 0}, } var s int32 = int32(unsafe.Sizeof(ConfigOption{})) @@ -60353,11 +60860,11 @@ func test_config(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } - if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &aOpt[0] */, s, ts+23786 /* "flag" */, 0, bp+64 /* &i */) != 0 { + if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp /* &aOpt[0] */, s, ts+15142 /* "flag" */, 0, bp+64 /* &i */) != 0 { if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+64 /* &i */) != 0 { return 1 } @@ -60399,7 +60906,7 @@ func getStaticMutexPointer(tls *crt.TLS, pInterp uintptr, pObj uintptr) uintptr // var iMutex int32 at bp, 4 - if tcl.XTcl_GetIndexFromObjStruct(tls, pInterp, pObj, uintptr(unsafe.Pointer(&aName)), int32(unsafe.Sizeof(uintptr(0))), ts+40320 /* "mutex name" */, 0, bp /* &iMutex */) != 0 { + if tcl.XTcl_GetIndexFromObjStruct(tls, pInterp, pObj, uintptr(unsafe.Pointer(&aName)), int32(unsafe.Sizeof(uintptr(0))), ts+32044 /* "mutex name" */, 0, bp /* &iMutex */) != 0 { return uintptr(0) } @@ -60409,7 +60916,7 @@ func getStaticMutexPointer(tls *crt.TLS, pInterp uintptr, pObj uintptr) uintptr func test_enter_static_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:404:26: */ var pMutex uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16896 /* "NAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32055 /* "NAME" */) return 1 } pMutex = getStaticMutexPointer(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -60423,7 +60930,7 @@ func test_enter_static_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, o func test_leave_static_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:423:26: */ var pMutex uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+16896 /* "NAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32055 /* "NAME" */) return 1 } pMutex = getStaticMutexPointer(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -60437,7 +60944,7 @@ func test_leave_static_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, o func test_enter_db_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:442:26: */ var db uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } db = getDbPointer1(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -60451,7 +60958,7 @@ func test_enter_db_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, objc func test_leave_db_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_mutex.c:461:26: */ var db uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } db = getDbPointer1(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -60464,38 +60971,38 @@ func test_leave_db_mutex(tls *crt.TLS, clientData uintptr, interp uintptr, objc func Sqlitetest_mutex_Init(tls *crt.TLS, interp uintptr) int32 { /* test_mutex.c:480:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd6)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd7)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aCmd6[i].FzName, aCmd6[i].FxProc, uintptr(0), uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aCmd7[i].FzName, aCmd7[i].FxProc, uintptr(0), uintptr(0)) } - tcl.XTcl_LinkVar(tls, interp, ts+40331, /* "disable_mutex_in..." */ + tcl.XTcl_LinkVar(tls, interp, ts+32060, /* "disable_mutex_in..." */ (uintptr(unsafe.Pointer(&g3)) + 4 /* &.disableInit */), 1) - tcl.XTcl_LinkVar(tls, interp, ts+40350, /* "disable_mutex_tr..." */ + tcl.XTcl_LinkVar(tls, interp, ts+32079, /* "disable_mutex_tr..." */ (uintptr(unsafe.Pointer(&g3)) + 8 /* &.disableTry */), 1) return 0 } -var aCmd6 = [11]struct { +var aCmd7 = [11]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 40368 /* "sqlite3_shutdown" */, FxProc: 0}, - {FzName: ts + 40385 /* "sqlite3_initiali..." */, FxProc: 0}, - {FzName: ts + 40404 /* "sqlite3_config" */, FxProc: 0}, + {FzName: ts + 32097 /* "sqlite3_shutdown" */, FxProc: 0}, + {FzName: ts + 32114 /* "sqlite3_initiali..." */, FxProc: 0}, + {FzName: ts + 32133 /* "sqlite3_config" */, FxProc: 0}, - {FzName: ts + 40419 /* "enter_static_mut..." */, FxProc: 0}, - {FzName: ts + 40438 /* "leave_static_mut..." */, FxProc: 0}, + {FzName: ts + 32148 /* "enter_static_mut..." */, FxProc: 0}, + {FzName: ts + 32167 /* "leave_static_mut..." */, FxProc: 0}, - {FzName: ts + 40457 /* "enter_db_mutex" */, FxProc: 0}, - {FzName: ts + 40472 /* "leave_db_mutex" */, FxProc: 0}, + {FzName: ts + 32186 /* "enter_db_mutex" */, FxProc: 0}, + {FzName: ts + 32201 /* "leave_db_mutex" */, FxProc: 0}, - {FzName: ts + 40487 /* "alloc_dealloc_mu..." */, FxProc: 0}, - {FzName: ts + 40507 /* "install_mutex_co..." */, FxProc: 0}, - {FzName: ts + 40530 /* "read_mutex_count..." */, FxProc: 0}, - {FzName: ts + 40550 /* "clear_mutex_coun..." */, FxProc: 0}, + {FzName: ts + 32216 /* "alloc_dealloc_mu..." */, FxProc: 0}, + {FzName: ts + 32236 /* "install_mutex_co..." */, FxProc: 0}, + {FzName: ts + 32259 /* "read_mutex_count..." */, FxProc: 0}, + {FzName: ts + 32279 /* "clear_mutex_coun..." */, FxProc: 0}, } /* test_mutex.c:484:5 */ // Maximum pathname length supported by the fs backend. @@ -60548,7 +61055,7 @@ var fs_vfs = fs_vfs_t{Fbase: sqlite3_vfs{FiVersion: 1, FszOsFile: // iVersion 0, FmxPathname:// szOsFile 0, FpNext:// mxPathname uintptr(0), FzName:// pNext -ts + 36037, /* "fs" */ FpAppData:// zName +ts + 27869, /* "fs" */ FpAppData:// zName uintptr(0), FxOpen:// pAppData 0, FxDelete:// xOpen 0, FxAccess:// xDelete @@ -60708,9 +61215,6 @@ func fsClose1(tls *crt.TLS, pFile uintptr) int32 { /* test_onefile.c:375:12: */ // Decrement the real_file ref-count. (*fs_real_file)(unsafe.Pointer(pReal)).FnRef-- - if !((*fs_real_file)(unsafe.Pointer(pReal)).FnRef >= 0) { - crt.X__assert_fail(tls, ts+40571 /* "pReal->nRef>=0" */, ts+40586 /* "testdata/sqlite-..." */, uint32(382), uintptr(unsafe.Pointer(&__func__105))) - } // When the ref-count reaches 0, destroy the structure if (*fs_real_file)(unsafe.Pointer(pReal)).FnRef == 0 { @@ -60725,8 +61229,6 @@ func fsClose1(tls *crt.TLS, pFile uintptr) int32 { /* test_onefile.c:375:12: */ return rc } -var __func__105 = *(*[8]int8)(unsafe.Pointer(ts + 40633 /* "fsClose" */)) /* test_onefile.c:375:40 */ - // Read data from an fs-file. func fsRead(tls *crt.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlite_int64) int32 { /* test_onefile.c:400:12: */ var rc int32 = 0 @@ -60957,9 +61459,6 @@ __1: (*fs_file)(unsafe.Pointer(p)).Fbase.FpMethods = uintptr(unsafe.Pointer(&fs_io_methods)) (*fs_file)(unsafe.Pointer(p)).FeType = eType - if !(crt.Xstrlen(tls, ts+37745 /* "-journal" */) == uint64(8)) { - crt.X__assert_fail(tls, ts+40641 /* "strlen(\"-journal..." */, ts+40586 /* "testdata/sqlite-..." */, uint32(609), uintptr(unsafe.Pointer(&__func__106))) - } nName = (int32(crt.Xstrlen(tls, zName)) - (func() int32 { if eType == 2 { return 8 @@ -60984,9 +61483,6 @@ __4: } real_flags = ((flags & ^int32(crt.Int32FromInt32(0x00000100))) | 0x00000200) pParent = (*fs_vfs_t)(unsafe.Pointer(pFsVfs)).FpParent - if !(eType == 1) { - crt.X__assert_fail(tls, ts+40663 /* "eType==1" */, ts+40586 /* "testdata/sqlite-..." */, uint32(619), uintptr(unsafe.Pointer(&__func__106))) - } pReal = sqlite3.Xsqlite3_malloc(tls, (int32(uint64(unsafe.Sizeof(fs_real_file{})) + uint64((*sqlite3_vfs)(unsafe.Pointer(pParent)).FszOsFile)))) if !(!(pReal != 0)) { @@ -61019,7 +61515,7 @@ __8: if !(*(*sqlite3_int64)(unsafe.Pointer(bp /* size */)) == int64(0)) { goto __9 } - rc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pRealFile)).FpMethods + 24 /* &.xWrite */))))(tls, pRealFile, ts+40672 /* "\x00" */, 1, (int64(10485760 - 1))) + rc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pRealFile)).FpMethods + 24 /* &.xWrite */))))(tls, pRealFile, ts+32300 /* "\x00" */, 1, (int64(10485760 - 1))) (*fs_real_file)(unsafe.Pointer(pReal)).FnBlob = 10485760 goto __10 __9: @@ -61083,8 +61579,6 @@ __15: return rc } -var __func__106 = *(*[7]int8)(unsafe.Pointer(ts + 40674 /* "fsOpen" */)) /* test_onefile.c:590:2 */ - // Delete the file located at zPath. If the dirSync argument is true, // ensure the file-system modifications are synced to disk before // returning. @@ -61095,19 +61589,12 @@ func fsDelete(tls *crt.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { var pF uintptr var nName int32 = (int32(crt.Xstrlen(tls, zPath)) - 8) - if !(crt.Xstrlen(tls, ts+37745 /* "-journal" */) == uint64(8)) { - crt.X__assert_fail(tls, ts+40641 /* "strlen(\"-journal..." */, ts+40586 /* "testdata/sqlite-..." */, uint32(693), uintptr(unsafe.Pointer(&__func__107))) - } - if !(crt.Xstrcmp(tls, ts+37745 /* "-journal" */, (zPath+uintptr(nName))) == 0) { - crt.X__assert_fail(tls, ts+40681 /* "strcmp(\"-journal..." */, ts+40586 /* "testdata/sqlite-..." */, uint32(694), uintptr(unsafe.Pointer(&__func__107))) - } - pReal = (*fs_vfs_t)(unsafe.Pointer(pFsVfs)).FpFileList for ; (pReal != 0) && (crt.Xstrncmp(tls, (*fs_real_file)(unsafe.Pointer(pReal)).FzName, zPath, uint64(nName)) != 0); pReal = (*fs_real_file)(unsafe.Pointer(pReal)).FpNext { } if pReal != 0 { pF = (*fs_real_file)(unsafe.Pointer(pReal)).FpFile - rc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pF)).FpMethods + 24 /* &.xWrite */))))(tls, pF, ts+40718 /* "\x00\x00\x00\x00" */, 4, (int64((*fs_real_file)(unsafe.Pointer(pReal)).FnBlob - 512))) + rc = (*(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pF)).FpMethods + 24 /* &.xWrite */))))(tls, pF, ts+32302 /* "\x00\x00\x00\x00" */, 4, (int64((*fs_real_file)(unsafe.Pointer(pReal)).FnBlob - 512))) if rc == 0 { (*fs_real_file)(unsafe.Pointer(pReal)).FnJournal = 0 } @@ -61115,8 +61602,6 @@ func fsDelete(tls *crt.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 { return rc } -var __func__107 = *(*[9]int8)(unsafe.Pointer(ts + 40723 /* "fsDelete" */)) /* test_onefile.c:686:71 */ - // Test for access permissions. Return true if the requested permission // is available, or false otherwise. func fsAccess(tls *crt.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut uintptr) int32 { /* test_onefile.c:712:12: */ @@ -61130,10 +61615,7 @@ func fsAccess(tls *crt.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut ui return (*(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pParent + 56 /* &.xAccess */))))(tls, pParent, zPath, flags, pResOut) } - if !(crt.Xstrlen(tls, ts+37745 /* "-journal" */) == uint64(8)) { - crt.X__assert_fail(tls, ts+40641 /* "strlen(\"-journal..." */, ts+40586 /* "testdata/sqlite-..." */, uint32(728), uintptr(unsafe.Pointer(&__func__108))) - } - if (nName > 8) && (crt.Xstrcmp(tls, ts+37745 /* "-journal" */, (zPath+uintptr((nName-8)))) == 0) { + if (nName > 8) && (crt.Xstrcmp(tls, ts+29625 /* "-journal" */, (zPath+uintptr((nName-8)))) == 0) { nName = nName - (8) isJournal = 1 } @@ -61146,8 +61628,6 @@ func fsAccess(tls *crt.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut ui return 0 } -var __func__108 = *(*[9]int8)(unsafe.Pointer(ts + 40732 /* "fsAccess" */)) /* test_onefile.c:717:2 */ - // 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 (FS_MAX_PATHNAME+1) bytes. @@ -61224,15 +61704,52 @@ func SqlitetestOnefile_Init(tls *crt.TLS) int32 { /* test_onefile.c:830:7: */ return fs_register(tls) } -// When possible, define assert so that it does not add extra -// parentheses around EXPR. Otherwise, those added parentheses would -// suppress warnings we'd expect to be detected by gcc's -Wparentheses. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.2 Diagnostics <assert.h> -// Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' -// which contains the name of the function currently being defined. -// This is broken in G++ before version 2.6. -// C9x has a similar variable called __func__, but prefer the GCC one since -// it demangles C++ function names. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// void assert (int expression); +// +// If NDEBUG is defined, do nothing. +// If not, and EXPRESSION is zero, print an error message and abort. + +// void assert_perror (int errnum); +// +// If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an +// error message with the error text for ERRNUM and abort. +// (This is a GNU extension.) // Maximum pathname length supported by the vfslog backend. @@ -61247,15 +61764,52 @@ type VfslogVfs1 = struct { _ [4]byte } -// When possible, define assert so that it does not add extra -// parentheses around EXPR. Otherwise, those added parentheses would -// suppress warnings we'd expect to be detected by gcc's -Wparentheses. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. -// Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' -// which contains the name of the function currently being defined. -// This is broken in G++ before version 2.6. -// C9x has a similar variable called __func__, but prefer the GCC one since -// it demangles C++ function names. +// ISO C99 Standard: 7.2 Diagnostics <assert.h> + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// void assert (int expression); +// +// If NDEBUG is defined, do nothing. +// If not, and EXPRESSION is zero, print an error message and abort. + +// void assert_perror (int errnum); +// +// If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an +// error message with the error text for ERRNUM and abort. +// (This is a GNU extension.) // Maximum pathname length supported by the vfslog backend. @@ -61442,7 +61996,7 @@ func vfslogFileControl(tls *crt.TLS, pFile uintptr, op int32, pArg uintptr) int3 var p uintptr = pFile var rc int32 = (*(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogFile)(unsafe.Pointer(p)).FpReal)).FpMethods + 80 /* &.xFileControl */))))(tls, (*VfslogFile)(unsafe.Pointer(p)).FpReal, op, pArg) if (op == 12) && (rc == 0) { - *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+40741 /* "vfslog/%z" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) + *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+32307 /* "vfslog/%z" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) } return rc } @@ -61733,7 +62287,7 @@ func sqlite3_vfslog_new(tls *crt.TLS, zVfs uintptr, zParentVfs uintptr, zLog uin (*(*func(*crt.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pParent + 48 /* &.xDelete */))))(tls, pParent, zFile, 0) rc = (*(*func(*crt.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer((pParent + 40 /* &.xOpen */))))(tls, pParent, zFile, (*VfslogVfs)(unsafe.Pointer(p)).FpLog, *(*int32)(unsafe.Pointer(bp /* flags */)), bp /* &flags */) if rc == 0 { - crt.Xmemcpy(tls, p+204 /* &.aBuf */, ts+40751 /* "sqlite_ostrace1...." */, uint64(20)) + crt.Xmemcpy(tls, p+204 /* &.aBuf */, ts+32317 /* "sqlite_ostrace1...." */, uint64(20)) (*VfslogVfs)(unsafe.Pointer(p)).FiOffset = int64(0) (*VfslogVfs)(unsafe.Pointer(p)).FnBuf = 20 rc = sqlite3.Xsqlite3_vfs_register(tls, p, 1) @@ -61762,78 +62316,78 @@ func vfslog_eventname(tls *crt.TLS, eEvent int32) uintptr { /* test_osinst.c:769 switch eEvent { case 3: - zEvent = ts + 40772 /* "xClose" */ + zEvent = ts + 32338 /* "xClose" */ break case 14: - zEvent = ts + 40779 /* "xRead" */ + zEvent = ts + 32345 /* "xRead" */ break case 20: - zEvent = ts + 40785 /* "xWrite" */ + zEvent = ts + 32351 /* "xWrite" */ break case 18: - zEvent = ts + 40792 /* "xTruncate" */ + zEvent = ts + 32358 /* "xTruncate" */ break case 17: - zEvent = ts + 32914 /* "xSync" */ + zEvent = ts + 24735 /* "xSync" */ break case 8: - zEvent = ts + 40802 /* "xFilesize" */ + zEvent = ts + 32368 /* "xFilesize" */ break case 11: - zEvent = ts + 40812 /* "xLock" */ + zEvent = ts + 32378 /* "xLock" */ break case 19: - zEvent = ts + 40818 /* "xUnlock" */ + zEvent = ts + 32384 /* "xUnlock" */ break case 2: - zEvent = ts + 40826 /* "xCheckResLock" */ + zEvent = ts + 32392 /* "xCheckResLock" */ break case 7: - zEvent = ts + 40840 /* "xFileControl" */ + zEvent = ts + 32406 /* "xFileControl" */ break case 15: - zEvent = ts + 40853 /* "xSectorSize" */ + zEvent = ts + 32419 /* "xSectorSize" */ break case 6: - zEvent = ts + 40865 /* "xDeviceChar" */ + zEvent = ts + 32431 /* "xDeviceChar" */ break case 12: - zEvent = ts + 32479 /* "xOpen" */ + zEvent = ts + 24300 /* "xOpen" */ break case 5: - zEvent = ts + 40877 /* "xDelete" */ + zEvent = ts + 32443 /* "xDelete" */ break case 1: - zEvent = ts + 40885 /* "xAccess" */ + zEvent = ts + 32451 /* "xAccess" */ break case 9: - zEvent = ts + 40893 /* "xFullPathname" */ + zEvent = ts + 32459 /* "xFullPathname" */ break case 13: - zEvent = ts + 40907 /* "xRandomness" */ + zEvent = ts + 32473 /* "xRandomness" */ break case 16: - zEvent = ts + 40919 /* "xSleep" */ + zEvent = ts + 32485 /* "xSleep" */ break case 4: - zEvent = ts + 40926 /* "xCurrentTime" */ + zEvent = ts + 32492 /* "xCurrentTime" */ break case 22: - zEvent = ts + 40939 /* "xShmUnmap" */ + zEvent = ts + 32505 /* "xShmUnmap" */ break case 25: - zEvent = ts + 40949 /* "xShmLock" */ + zEvent = ts + 32515 /* "xShmLock" */ break case 26: - zEvent = ts + 40958 /* "xShmBarrier" */ + zEvent = ts + 32524 /* "xShmBarrier" */ break case 23: - zEvent = ts + 40970 /* "xShmMap" */ + zEvent = ts + 32536 /* "xShmMap" */ break case 28: - zEvent = ts + 40978 /* "annotation" */ + zEvent = ts + 32544 /* "annotation" */ break } @@ -61916,7 +62470,7 @@ func vlogConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt (*VfslogVtab)(unsafe.Pointer(p)).FpFd = (p + uintptr(1)*48) (*VfslogVtab)(unsafe.Pointer(p)).FzFile = (((*VfslogVtab)(unsafe.Pointer(p)).FpFd) + uintptr((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FszOsFile)) - zFile = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8)))) + zFile = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(argv + uintptr(3)*8)))) if !(zFile != 0) { sqlite3.Xsqlite3_free(tls, p) return 7 @@ -61931,7 +62485,7 @@ func vlogConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintpt if rc == 0 { (*(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer((*VfslogVtab)(unsafe.Pointer(p)).FpFd)).FpMethods + 48 /* &.xFileSize */))))(tls, (*VfslogVtab)(unsafe.Pointer(p)).FpFd, (p + 32 /* &.nByte */)) sqlite3.Xsqlite3_declare_vtab(tls, db, - ts+40989 /* "CREATE TABLE xxx..." */) + ts+32555 /* "CREATE TABLE xxx..." */) *(*uintptr)(unsafe.Pointer(ppVtab)) = (p /* &.base */) } else { sqlite3.Xsqlite3_free(tls, p) @@ -62056,9 +62610,6 @@ func vlogColumn(tls *crt.TLS, pCursor uintptr, ctx uintptr, i int32) int32 { /* var val uint32 var pCsr uintptr = pCursor - if !(i < 7) { - crt.X__assert_fail(tls, ts+41044 /* "i<7" */, ts+41048 /* "testdata/sqlite-..." */, uint32(1041), uintptr(unsafe.Pointer(&__func__109))) - } val = get32bits(tls, ((pCsr + 48 /* &.aBuf */) + uintptr((4 * i)))) switch i { @@ -62084,8 +62635,6 @@ func vlogColumn(tls *crt.TLS, pCursor uintptr, ctx uintptr, i int32) int32 { /* return 0 } -var __func__109 = *(*[11]int8)(unsafe.Pointer(ts + 41094 /* "vlogColumn" */)) /* test_osinst.c:1037:2 */ - func vlogRowid(tls *crt.TLS, pCursor uintptr, pRowid uintptr) int32 { /* test_osinst.c:1065:12: */ var pCsr uintptr = pCursor *(*sqlite_int64)(unsafe.Pointer(pRowid)) = (*VfslogCsr)(unsafe.Pointer(pCsr)).FiRowid @@ -62094,7 +62643,7 @@ func vlogRowid(tls *crt.TLS, pCursor uintptr, pRowid uintptr) int32 { /* test_os func sqlite3_vfslog_register(tls *crt.TLS, db uintptr) int32 { /* test_osinst.c:1071:5: */ - sqlite3.Xsqlite3_create_module(tls, db, ts+41105 /* "vfslog" */, uintptr(unsafe.Pointer(&vfslog_module)), uintptr(0)) + sqlite3.Xsqlite3_create_module(tls, db, ts+32610 /* "vfslog" */, uintptr(unsafe.Pointer(&vfslog_module)), uintptr(0)) return 0 } @@ -62145,10 +62694,10 @@ func test_vfslog(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o // var iSub int32 at bp+72, 4 if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37919 /* "SUB-COMMAND ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29799 /* "SUB-COMMAND ..." */) return 1 } - if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(unsafe.Pointer(&strs)), int32(unsafe.Sizeof(uintptr(0))), ts+2321 /* "sub-command" */, 0, bp+72 /* &iSub */) != 0 { + if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), uintptr(unsafe.Pointer(&strs)), int32(unsafe.Sizeof(uintptr(0))), ts+1874 /* "sub-command" */, 0, bp+72 /* &iSub */) != 0 { return 1 } @@ -62158,14 +62707,14 @@ func test_vfslog(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o var zVfs uintptr var zMsg uintptr if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 3, objv, ts+41112 /* "VFS" */) + tcl.XTcl_WrongNumArgs(tls, interp, 3, objv, ts+32617 /* "VFS" */) return 1 } zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) zMsg = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) rc = sqlite3_vfslog_annotate(tls, zVfs, zMsg) if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+41116 /* "failed" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+32621 /* "failed" */, 0)) return 1 } break @@ -62174,13 +62723,13 @@ func test_vfslog(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o { var zVfs uintptr if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+41112 /* "VFS" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+32617 /* "VFS" */) return 1 } zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) rc = sqlite3_vfslog_finalize(tls, zVfs) if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+41116 /* "failed" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+16, ts+32621 /* "failed" */, 0)) return 1 } break @@ -62192,7 +62741,7 @@ func test_vfslog(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o var zParent uintptr var zLog uintptr if objc != 5 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+41123 /* "VFS PARENT LOGFI..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+32628 /* "VFS PARENT LOGFI..." */) return 1 } zVfs = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) @@ -62203,7 +62752,7 @@ func test_vfslog(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o } rc = sqlite3_vfslog_new(tls, zVfs, zParent, zLog) if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+41116 /* "failed" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+32, ts+32621 /* "failed" */, 0)) return 1 } break @@ -62213,7 +62762,7 @@ func test_vfslog(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o { var zDb uintptr if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+1910 /* "DB" */) return 1 } zDb = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) @@ -62222,7 +62771,7 @@ func test_vfslog(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o rc = sqlite3_vfslog_register(tls, db) } if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+41142 /* "bad sqlite3 hand..." */, zDb, uintptr(0))) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+32647 /* "bad sqlite3 hand..." */, zDb, uintptr(0))) return 1 } break @@ -62232,24 +62781,61 @@ func test_vfslog(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, o return 0 } -var strs = [5]uintptr{ts + 41163 /* "annotate" */, ts + 41172 /* "finalize" */, ts + 12847 /* "new" */, ts + 41181 /* "register" */, uintptr(0)} /* test_osinst.c:1127:21 */ +var strs = [5]uintptr{ts + 32668 /* "annotate" */, ts + 32677 /* "finalize" */, ts + 32686 /* "new" */, ts + 32690 /* "register" */, uintptr(0)} /* test_osinst.c:1127:21 */ func SqlitetestOsinst_Init(tls *crt.TLS, interp uintptr) int32 { /* test_osinst.c:1219:5: */ - tcl.XTcl_CreateObjCommand(tls, interp, ts+41105 /* "vfslog" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+32610 /* "vfslog" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_vfslog})), uintptr(0), uintptr(0)) return 0 } -// When possible, define assert so that it does not add extra -// parentheses around EXPR. Otherwise, those added parentheses would -// suppress warnings we'd expect to be detected by gcc's -Wparentheses. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. -// Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' -// which contains the name of the function currently being defined. -// This is broken in G++ before version 2.6. -// C9x has a similar variable called __func__, but prefer the GCC one since -// it demangles C++ function names. +// ISO C99 Standard: 7.2 Diagnostics <assert.h> + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// void assert (int expression); +// +// If NDEBUG is defined, do nothing. +// If not, and EXPRESSION is zero, print an error message and abort. + +// void assert_perror (int errnum); +// +// If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an +// error message with the error text for ERRNUM and abort. +// (This is a GNU extension.) // Global data used by this test implementation. There is no // mutexing, which means this page cache will not work in a @@ -62262,15 +62848,52 @@ type testpcacheGlobalType1 = struct { FhighStress uint32 } -// When possible, define assert so that it does not add extra -// parentheses around EXPR. Otherwise, those added parentheses would -// suppress warnings we'd expect to be detected by gcc's -Wparentheses. +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.2 Diagnostics <assert.h> + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// void assert (int expression); +// +// If NDEBUG is defined, do nothing. +// If not, and EXPRESSION is zero, print an error message and abort. -// Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' -// which contains the name of the function currently being defined. -// This is broken in G++ before version 2.6. -// C9x has a similar variable called __func__, but prefer the GCC one since -// it demangles C++ function names. +// void assert_perror (int errnum); +// +// If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an +// error message with the error text for ERRNUM and abort. +// (This is a GNU extension.) // Global data used by this test implementation. There is no // mutexing, which means this page cache will not work in a @@ -62287,15 +62910,7 @@ var testpcacheGlobal testpcacheGlobalType /* test_pcache.c:41:29: */ // the destructor always gets call - otherwise there would be a // memory leak. func testpcacheInit(tls *crt.TLS, pArg uintptr) int32 { /* test_pcache.c:53:12: */ - if !(pArg == uintptr(unsafe.Pointer(&testpcacheGlobal))) { - crt.X__assert_fail(tls, ts+41190 /* "pArg==(void*)&te..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(54), uintptr(unsafe.Pointer(&__func__110))) - } - if !(testpcacheGlobal.FpDummy == uintptr(0)) { - crt.X__assert_fail(tls, ts+41267 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(55), uintptr(unsafe.Pointer(&__func__110))) - } - if !(testpcacheGlobal.FnInstance == 0) { - crt.X__assert_fail(tls, ts+41294 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(56), uintptr(unsafe.Pointer(&__func__110))) - } + testpcacheGlobal.FpDummy = sqlite3.Xsqlite3_malloc(tls, 10) if testpcacheGlobal.FpDummy == uintptr(0) { return 7 @@ -62303,28 +62918,16 @@ func testpcacheInit(tls *crt.TLS, pArg uintptr) int32 { /* test_pcache.c:53:12: return 0 } -var __func__110 = *(*[15]int8)(unsafe.Pointer(ts + 41324 /* "testpcacheInit" */)) /* test_pcache.c:53:38 */ - // Destructor // // Verify that this is only called after initialization. // Free the memory allocated by the initializer. func testpcacheShutdown(tls *crt.TLS, pArg uintptr) { /* test_pcache.c:67:13: */ - if !(pArg == uintptr(unsafe.Pointer(&testpcacheGlobal))) { - crt.X__assert_fail(tls, ts+41190 /* "pArg==(void*)&te..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(68), uintptr(unsafe.Pointer(&__func__111))) - } - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(69), uintptr(unsafe.Pointer(&__func__111))) - } - if !(testpcacheGlobal.FnInstance == 0) { - crt.X__assert_fail(tls, ts+41294 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(70), uintptr(unsafe.Pointer(&__func__111))) - } + sqlite3.Xsqlite3_free(tls, testpcacheGlobal.FpDummy) testpcacheGlobal.FpDummy = uintptr(0) } -var __func__111 = *(*[19]int8)(unsafe.Pointer(ts + 41366 /* "testpcacheShutdo..." */)) /* test_pcache.c:67:43 */ - // Number of pages in a cache. // // The number of pages is a hard upper bound in this test module. @@ -62386,9 +62989,7 @@ func testpcacheCreate(tls *crt.TLS, szPage int32, szExtra int32, bPurgeable int3 var x uintptr var p uintptr var i int32 - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(142), uintptr(unsafe.Pointer(&__func__112))) - } + szPage = ((szPage + 7) & ^int32(crt.Int32FromInt32(7))) nMem = (int32(uint64(unsafe.Sizeof(testpcache{})) + (uint64(217 * (szPage + szExtra))))) p = sqlite3.Xsqlite3_malloc(tls, nMem) @@ -62426,65 +63027,33 @@ __3: return p } -var __func__112 = *(*[17]int8)(unsafe.Pointer(ts + 41385 /* "testpcacheCreate" */)) /* test_pcache.c:137:2 */ - // Set the cache size func testpcacheCachesize(tls *crt.TLS, pCache uintptr, newSize int32) { /* test_pcache.c:168:13: */ var p uintptr = pCache - if !((*testpcache)(unsafe.Pointer(p)).FiMagic == uint32(0x364585fd)) { - crt.X__assert_fail(tls, ts+41402 /* "p->iMagic==0x364..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(170), uintptr(unsafe.Pointer(&__func__113))) - } - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(171), uintptr(unsafe.Pointer(&__func__113))) - } - if !(testpcacheGlobal.FnInstance > 0) { - crt.X__assert_fail(tls, ts+41424 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(172), uintptr(unsafe.Pointer(&__func__113))) - } -} + _ = p -var __func__113 = *(*[20]int8)(unsafe.Pointer(ts + 41453 /* "testpcacheCaches..." */)) /* test_pcache.c:168:69 */ +} // Return the number of pages in the cache that are being used. // This includes both pinned and unpinned pages. func testpcachePagecount(tls *crt.TLS, pCache uintptr) int32 { /* test_pcache.c:179:12: */ var p uintptr = pCache - if !((*testpcache)(unsafe.Pointer(p)).FiMagic == uint32(0x364585fd)) { - crt.X__assert_fail(tls, ts+41402 /* "p->iMagic==0x364..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(181), uintptr(unsafe.Pointer(&__func__114))) - } - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(182), uintptr(unsafe.Pointer(&__func__114))) - } - if !(testpcacheGlobal.FnInstance > 0) { - crt.X__assert_fail(tls, ts+41424 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(183), uintptr(unsafe.Pointer(&__func__114))) - } + return (217 - (*testpcache)(unsafe.Pointer(p)).FnFree) } -var __func__114 = *(*[20]int8)(unsafe.Pointer(ts + 41473 /* "testpcachePageco..." */)) /* test_pcache.c:179:55 */ - // Fetch a page. func testpcacheFetch(tls *crt.TLS, pCache uintptr, key uint32, createFlag int32) uintptr { /* test_pcache.c:190:28: */ var p uintptr = pCache var i int32 var j int32 - if !((*testpcache)(unsafe.Pointer(p)).FiMagic == uint32(0x364585fd)) { - crt.X__assert_fail(tls, ts+41402 /* "p->iMagic==0x364..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(197), uintptr(unsafe.Pointer(&__func__115))) - } - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(198), uintptr(unsafe.Pointer(&__func__115))) - } - if !(testpcacheGlobal.FnInstance > 0) { - crt.X__assert_fail(tls, ts+41424 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(199), uintptr(unsafe.Pointer(&__func__115))) - } // See if the page is already in cache. Return immediately if it is for i = 0; i < 217; i++ { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).Fkey == key { if !((*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).FisPinned != 0) { (*testpcache)(unsafe.Pointer(p)).FnPinned++ - if !((*testpcache)(unsafe.Pointer(p)).FnPinned <= (217 - (*testpcache)(unsafe.Pointer(p)).FnFree)) { - crt.X__assert_fail(tls, ts+41493 /* "p->nPinned <= 21..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(206), uintptr(unsafe.Pointer(&__func__115))) - } + (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).FisPinned = 1 } return ((p + 32 /* &.a */) + uintptr(i)*24 /* &.page */) @@ -62531,9 +63100,7 @@ func testpcacheFetch(tls *crt.TLS, pCache uintptr, key uint32, createFlag int32) crt.Xmemset(tls, (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fpage.FpExtra, 0, uint64((*testpcache)(unsafe.Pointer(p)).FszExtra)) (*testpcache)(unsafe.Pointer(p)).FnPinned++ (*testpcache)(unsafe.Pointer(p)).FnFree-- - if !((*testpcache)(unsafe.Pointer(p)).FnPinned <= (217 - (*testpcache)(unsafe.Pointer(p)).FnFree)) { - crt.X__assert_fail(tls, ts+41493 /* "p->nPinned <= 21..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(250), uintptr(unsafe.Pointer(&__func__115))) - } + return ((p + 32 /* &.a */) + uintptr(j)*24 /* &.page */) } } @@ -62544,12 +63111,8 @@ func testpcacheFetch(tls *crt.TLS, pCache uintptr, key uint32, createFlag int32) goto __1 goto __3 __3: - ; // The prior loop always finds a freepage to allocate - if !(0 != 0) { - crt.X__assert_fail(tls, ts+8293 /* "0" */, ts+41221 /* "testdata/sqlite-..." */, uint32(256), uintptr(unsafe.Pointer(&__func__115))) - } } // If this cache is not purgeable then we have to fail. @@ -62572,9 +63135,7 @@ __4: crt.Xmemset(tls, (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fpage.FpBuf, 0, uint64((*testpcache)(unsafe.Pointer(p)).FszPage)) crt.Xmemset(tls, (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(j)*24)).Fpage.FpExtra, 0, uint64((*testpcache)(unsafe.Pointer(p)).FszExtra)) (*testpcache)(unsafe.Pointer(p)).FnPinned++ - if !((*testpcache)(unsafe.Pointer(p)).FnPinned <= (217 - (*testpcache)(unsafe.Pointer(p)).FnFree)) { - crt.X__assert_fail(tls, ts+41493 /* "p->nPinned <= 21..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(276), uintptr(unsafe.Pointer(&__func__115))) - } + return ((p + 32 /* &.a */) + uintptr(j)*24 /* &.page */) } } @@ -62588,27 +63149,14 @@ __6: ; // The previous loop always finds a page to recycle. - if !(0 != 0) { - crt.X__assert_fail(tls, ts+8293 /* "0" */, ts+41221 /* "testdata/sqlite-..." */, uint32(282), uintptr(unsafe.Pointer(&__func__115))) - } + return uintptr(0) } -var __func__115 = *(*[16]int8)(unsafe.Pointer(ts + 41522 /* "testpcacheFetch" */)) /* test_pcache.c:194:2 */ - // Unpin a page. func testpcacheUnpin(tls *crt.TLS, pCache uintptr, pOldPage uintptr, discard int32) { /* test_pcache.c:289:13: */ var p uintptr = pCache var i int32 - if !((*testpcache)(unsafe.Pointer(p)).FiMagic == uint32(0x364585fd)) { - crt.X__assert_fail(tls, ts+41402 /* "p->iMagic==0x364..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(296), uintptr(unsafe.Pointer(&__func__116))) - } - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(297), uintptr(unsafe.Pointer(&__func__116))) - } - if !(testpcacheGlobal.FnInstance > 0) { - crt.X__assert_fail(tls, ts+41424 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(298), uintptr(unsafe.Pointer(&__func__116))) - } // Randomly discard pages as they are unpinned according to the // discardChance setting. If discardChance is 0, the random discard @@ -62621,60 +63169,36 @@ func testpcacheUnpin(tls *crt.TLS, pCache uintptr, pOldPage uintptr, discard int for i = 0; i < 217; i++ { if ((p + 32 /* &.a */) + uintptr(i)*24 /* &.page */) == pOldPage { // The pOldPage pointer always points to a pinned page - if !((*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).FisPinned != 0) { - crt.X__assert_fail(tls, ts+41538 /* "p->a[i].isPinned" */, ts+41221 /* "testdata/sqlite-..." */, uint32(313), uintptr(unsafe.Pointer(&__func__116))) - } + (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).FisPinned = 0 (*testpcache)(unsafe.Pointer(p)).FnPinned-- - if !((*testpcache)(unsafe.Pointer(p)).FnPinned >= 0) { - crt.X__assert_fail(tls, ts+41555 /* "p->nPinned>=0" */, ts+41221 /* "testdata/sqlite-..." */, uint32(316), uintptr(unsafe.Pointer(&__func__116))) - } + if discard != 0 { (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = uint32(0) (*testpcache)(unsafe.Pointer(p)).FnFree++ - if !((*testpcache)(unsafe.Pointer(p)).FnFree <= 217) { - crt.X__assert_fail(tls, ts+41569 /* "p->nFree<=217" */, ts+41221 /* "testdata/sqlite-..." */, uint32(320), uintptr(unsafe.Pointer(&__func__116))) - } } return } } // The pOldPage pointer always points to a valid page - if !(0 != 0) { - crt.X__assert_fail(tls, ts+8293 /* "0" */, ts+41221 /* "testdata/sqlite-..." */, uint32(327), uintptr(unsafe.Pointer(&__func__116))) - } -} -var __func__116 = *(*[16]int8)(unsafe.Pointer(ts + 41583 /* "testpcacheUnpin" */)) /* test_pcache.c:293:2 */ +} // Rekey a single page. func testpcacheRekey(tls *crt.TLS, pCache uintptr, pOldPage uintptr, oldKey uint32, newKey uint32) { /* test_pcache.c:334:13: */ var p uintptr = pCache var i int32 - if !((*testpcache)(unsafe.Pointer(p)).FiMagic == uint32(0x364585fd)) { - crt.X__assert_fail(tls, ts+41402 /* "p->iMagic==0x364..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(342), uintptr(unsafe.Pointer(&__func__117))) - } - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(343), uintptr(unsafe.Pointer(&__func__117))) - } - if !(testpcacheGlobal.FnInstance > 0) { - crt.X__assert_fail(tls, ts+41424 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(344), uintptr(unsafe.Pointer(&__func__117))) - } // If there already exists another page at newKey, verify that // the other page is unpinned and discard it. for i = 0; i < 217; i++ { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).Fkey == newKey { // The new key is never a page that is already pinned - if !((*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).FisPinned == 0) { - crt.X__assert_fail(tls, ts+41599 /* "p->a[i].isPinned..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(352), uintptr(unsafe.Pointer(&__func__117))) - } + (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = uint32(0) (*testpcache)(unsafe.Pointer(p)).FnFree++ - if !((*testpcache)(unsafe.Pointer(p)).FnFree <= 217) { - crt.X__assert_fail(tls, ts+41569 /* "p->nFree<=217" */, ts+41221 /* "testdata/sqlite-..." */, uint32(355), uintptr(unsafe.Pointer(&__func__117))) - } + break } } @@ -62683,78 +63207,44 @@ func testpcacheRekey(tls *crt.TLS, pCache uintptr, pOldPage uintptr, oldKey uint for i = 0; i < 217; i++ { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).Fkey == oldKey { // The oldKey and pOldPage parameters match - if !(((p + 32 /* &.a */) + uintptr(i)*24 /* &.page */) == pOldPage) { - crt.X__assert_fail(tls, ts+41619 /* "&p->a[i].page==p..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(365), uintptr(unsafe.Pointer(&__func__117))) - } + // Page to be rekeyed must be pinned - if !((*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).FisPinned != 0) { - crt.X__assert_fail(tls, ts+41538 /* "p->a[i].isPinned" */, ts+41221 /* "testdata/sqlite-..." */, uint32(367), uintptr(unsafe.Pointer(&__func__117))) - } + (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = newKey return } } // Rekey is always given a valid page to work with - if !(0 != 0) { - crt.X__assert_fail(tls, ts+8293 /* "0" */, ts+41221 /* "testdata/sqlite-..." */, uint32(374), uintptr(unsafe.Pointer(&__func__117))) - } -} -var __func__117 = *(*[16]int8)(unsafe.Pointer(ts + 41643 /* "testpcacheRekey" */)) /* test_pcache.c:339:2 */ +} // Truncate the page cache. Every page with a key of iLimit or larger // is discarded. func testpcacheTruncate(tls *crt.TLS, pCache uintptr, iLimit uint32) { /* test_pcache.c:382:13: */ var p uintptr = pCache var i uint32 - if !((*testpcache)(unsafe.Pointer(p)).FiMagic == uint32(0x364585fd)) { - crt.X__assert_fail(tls, ts+41402 /* "p->iMagic==0x364..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(385), uintptr(unsafe.Pointer(&__func__118))) - } - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(386), uintptr(unsafe.Pointer(&__func__118))) - } - if !(testpcacheGlobal.FnInstance > 0) { - crt.X__assert_fail(tls, ts+41424 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(387), uintptr(unsafe.Pointer(&__func__118))) - } + for i = uint32(0); i < uint32(217); i++ { if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).Fkey >= iLimit { (*testpcachePage)(unsafe.Pointer((p + 32 /* &.a */) + uintptr(i)*24)).Fkey = uint32(0) if (*testpcachePage)(unsafe.Pointer((p+32 /* &.a */)+uintptr(i)*24)).FisPinned != 0 { (*testpcache)(unsafe.Pointer(p)).FnPinned-- - if !((*testpcache)(unsafe.Pointer(p)).FnPinned >= 0) { - crt.X__assert_fail(tls, ts+41555 /* "p->nPinned>=0" */, ts+41221 /* "testdata/sqlite-..." */, uint32(393), uintptr(unsafe.Pointer(&__func__118))) - } } (*testpcache)(unsafe.Pointer(p)).FnFree++ - if !((*testpcache)(unsafe.Pointer(p)).FnFree <= 217) { - crt.X__assert_fail(tls, ts+41569 /* "p->nFree<=217" */, ts+41221 /* "testdata/sqlite-..." */, uint32(396), uintptr(unsafe.Pointer(&__func__118))) - } } } } -var __func__118 = *(*[19]int8)(unsafe.Pointer(ts + 41659 /* "testpcacheTrunca..." */)) /* test_pcache.c:382:72 */ - // Destroy a page cache. func testpcacheDestroy(tls *crt.TLS, pCache uintptr) { /* test_pcache.c:404:13: */ var p uintptr = pCache - if !((*testpcache)(unsafe.Pointer(p)).FiMagic == uint32(0x364585fd)) { - crt.X__assert_fail(tls, ts+41402 /* "p->iMagic==0x364..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(406), uintptr(unsafe.Pointer(&__func__119))) - } - if !(testpcacheGlobal.FpDummy != uintptr(0)) { - crt.X__assert_fail(tls, ts+41339 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(407), uintptr(unsafe.Pointer(&__func__119))) - } - if !(testpcacheGlobal.FnInstance > 0) { - crt.X__assert_fail(tls, ts+41424 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(408), uintptr(unsafe.Pointer(&__func__119))) - } + (*testpcache)(unsafe.Pointer(p)).FiMagic = 0xd42670d4 sqlite3.Xsqlite3_free(tls, p) testpcacheGlobal.FnInstance-- } -var __func__119 = *(*[18]int8)(unsafe.Pointer(ts + 41678 /* "testpcacheDestro..." */)) /* test_pcache.c:404:54 */ - // Invoke this routine to register or unregister the testing pager cache // implemented by this file. // @@ -62769,38 +63259,22 @@ func installTestPCache(tls *crt.TLS, installFlag int32, discardChance uint32, pr bp := tls.Alloc(24) defer tls.Free(24) - if !(testpcacheGlobal.FnInstance == 0) { - crt.X__assert_fail(tls, ts+41294 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(450), uintptr(unsafe.Pointer(&__func__120))) - } - if !(testpcacheGlobal.FpDummy == uintptr(0)) { - crt.X__assert_fail(tls, ts+41267 /* "testpcacheGlobal..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(451), uintptr(unsafe.Pointer(&__func__120))) - } - if !(discardChance <= uint32(100)) { - crt.X__assert_fail(tls, ts+41696 /* "discardChance<=1..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(452), uintptr(unsafe.Pointer(&__func__120))) - } testpcacheGlobal.FdiscardChance = discardChance testpcacheGlobal.FprngSeed = (prngSeed ^ (prngSeed << 16)) testpcacheGlobal.FhighStress = highStress if installFlag != isInstalled { if installFlag != 0 { sqlite3.Xsqlite3_config(tls, 19, crt.VaList(bp, uintptr(unsafe.Pointer(&defaultPcache)))) - if !(defaultPcache.FxCreate != *(*uintptr)(unsafe.Pointer(&struct { - f func(*crt.TLS, int32, int32, int32) uintptr - }{testpcacheCreate}))) { - crt.X__assert_fail(tls, ts+41715 /* "defaultPcache.xC..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(459), uintptr(unsafe.Pointer(&__func__120))) - } + sqlite3.Xsqlite3_config(tls, 18, crt.VaList(bp+8, uintptr(unsafe.Pointer(&testPcache)))) } else { - if !(defaultPcache.FxCreate != uintptr(0)) { - crt.X__assert_fail(tls, ts+41755 /* "defaultPcache.xC..." */, ts+41221 /* "testdata/sqlite-..." */, uint32(462), uintptr(unsafe.Pointer(&__func__120))) - } + sqlite3.Xsqlite3_config(tls, 18, crt.VaList(bp+16, uintptr(unsafe.Pointer(&defaultPcache)))) } isInstalled = installFlag } } -var __func__120 = *(*[18]int8)(unsafe.Pointer(ts + 41780 /* "installTestPCach..." */)) /* test_pcache.c:432:2 */ var testPcache = sqlite3_pcache_methods2{FiVersion: 1, FpArg: 0, FxInit: 0, FxShutdown: 0, FxCreate: 0, FxCachesize: 0, FxPagecount: 0, FxFetch: 0, FxUnpin: 0, FxRekey: 0, FxTruncate: 0, FxDestroy: 0} /* test_pcache.c:433:40 */ var defaultPcache sqlite3_pcache_methods2 /* test_pcache.c:447:34: */ var isInstalled int32 = 0 /* test_pcache.c:448:14 */ @@ -62917,15 +63391,11 @@ func quotaRemoveFile(tls *crt.TLS, pFile uintptr) { /* test_quota.c:207:13: */ // all files will be closed when this routine is called. func quotaRemoveAllFiles(tls *crt.TLS, pGroup uintptr) { /* test_quota.c:218:13: */ for (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles != 0 { - if !((*quotaFile)(unsafe.Pointer((*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles)).FnRef == 0) { - crt.X__assert_fail(tls, ts+41798 /* "pGroup->pFiles->..." */, ts+41822 /* "testdata/sqlite-..." */, uint32(220), uintptr(unsafe.Pointer(&__func__121))) - } + quotaRemoveFile(tls, (*quotaGroup)(unsafe.Pointer(pGroup)).FpFiles) } } -var __func__121 = *(*[20]int8)(unsafe.Pointer(ts + 41867 /* "quotaRemoveAllFi..." */)) /* test_quota.c:218:52 */ - // If the reference count and threshold for a quotaGroup are both // zero, then destroy the quotaGroup. func quotaGroupDeref(tls *crt.TLS, pGroup uintptr) { /* test_quota.c:229:13: */ @@ -63335,7 +63805,7 @@ func quotaFileControl(tls *crt.TLS, pConn uintptr, op int32, pArg uintptr) int32 var pSubOpen uintptr = quotaSubOpen(tls, pConn) var rc int32 = (*(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(pSubOpen)).FpMethods + 80 /* &.xFileControl */))))(tls, pSubOpen, op, pArg) if (op == 12) && (rc == 0) { - *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+41887 /* "quota/%z" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) + *(*uintptr)(unsafe.Pointer(pArg)) = sqlite3.Xsqlite3_mprintf(tls, ts+32699 /* "quota/%z" */, crt.VaList(bp, *(*uintptr)(unsafe.Pointer(pArg)))) } return rc } @@ -63395,9 +63865,7 @@ func sqlite3_quota_initialize(tls *crt.TLS, zOrigVfsName uintptr, makeDefault in if pOrigVfs == uintptr(0) { return 1 } - if !(pOrigVfs != (uintptr(unsafe.Pointer(&gQuota)) + 8 /* &.sThisVfs */)) { - crt.X__assert_fail(tls, ts+41896 /* "pOrigVfs!=&gQuot..." */, ts+41822 /* "testdata/sqlite-..." */, uint32(754), uintptr(unsafe.Pointer(&__func__122))) - } + gQuota.FpMutex = sqlite3.Xsqlite3_mutex_alloc(tls, 0) if !(int32(gQuota.FpMutex) != 0) { return 7 @@ -63412,7 +63880,7 @@ func sqlite3_quota_initialize(tls *crt.TLS, zOrigVfsName uintptr, makeDefault in f func(*crt.TLS, uintptr, uintptr, int32) int32 }{quotaDelete})) *(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&gQuota)) + 8 /* &.sThisVfs */ + 4 /* &.szOsFile */)) += int32((uint64(unsafe.Sizeof(quotaConn{})))) - gQuota.FsThisVfs.FzName = ts + 41923 /* "quota" */ + gQuota.FsThisVfs.FzName = ts + 32708 /* "quota" */ gQuota.FsIoMethodsV1.FiVersion = 1 gQuota.FsIoMethodsV1.FxClose = *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) int32 }{quotaClose})) gQuota.FsIoMethodsV1.FxRead = *(*uintptr)(unsafe.Pointer(&struct { @@ -63460,8 +63928,6 @@ func sqlite3_quota_initialize(tls *crt.TLS, zOrigVfsName uintptr, makeDefault in return 0 } -var __func__122 = *(*[25]int8)(unsafe.Pointer(ts + 41929 /* "sqlite3_quota_in..." */)) /* test_quota.c:749:72 */ - // Shutdown the quota system. // // All SQLite database connections must be closed before calling this @@ -63483,9 +63949,7 @@ func sqlite3_quota_shutdown(tls *crt.TLS) int32 { /* test_quota.c:798:5: */ pGroup = gQuota.FpGroup gQuota.FpGroup = (*quotaGroup)(unsafe.Pointer(pGroup)).FpNext (*quotaGroup)(unsafe.Pointer(pGroup)).FiLimit = int64(0) - if !(quotaGroupOpenFileCount(tls, pGroup) == 0) { - crt.X__assert_fail(tls, ts+41954 /* "quotaGroupOpenFi..." */, ts+41822 /* "testdata/sqlite-..." */, uint32(808), uintptr(unsafe.Pointer(&__func__123))) - } + quotaGroupDeref(tls, pGroup) } gQuota.FisInitialized = 0 @@ -63495,8 +63959,6 @@ func sqlite3_quota_shutdown(tls *crt.TLS) int32 { /* test_quota.c:798:5: */ return 0 } -var __func__123 = *(*[23]int8)(unsafe.Pointer(ts + 41989 /* "sqlite3_quota_sh..." */)) /* test_quota.c:798:33 */ - // Create or destroy a quota group. // // The quota group is defined by the zPattern. When calling this routine @@ -63976,7 +64438,7 @@ func sqlite3_quota_remove(tls *crt.TLS, zFilename uintptr) int32 { /* test_quota return rc } -type Tcl_StatBuf1 = struct { +type Tcl_StatBuf2 = struct { Fst_dev uint64 Fst_ino uint64 Fst_nlink uint64 @@ -64036,7 +64498,7 @@ func tclQuotaCallback(tls *crt.TLS, zFilename uintptr, piLimit uintptr, iSize sq return } - pVarname = tcl.XTcl_NewStringObj(tls, ts+42012 /* "::piLimit_" */, -1) + pVarname = tcl.XTcl_NewStringObj(tls, ts+32714 /* "::piLimit_" */, -1) (*Tcl_Obj)(unsafe.Pointer(pVarname)).FrefCount++ sqlite3.Xsqlite3_randomness(tls, int32(unsafe.Sizeof(uint32(0))), bp /* &rnd */) tcl.XTcl_AppendObjToObj(tls, pVarname, tcl.XTcl_NewIntObj(tls, (int32(*(*uint32)(unsafe.Pointer(bp /* rnd */))&uint32(0x7FFFFFFF))))) @@ -64101,7 +64563,7 @@ func test_quota_initialize(tls *crt.TLS, clientData uintptr, interp uintptr, obj // Process arguments if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+39878 /* "NAME MAKEDEFAULT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31573 /* "NAME MAKEDEFAULT" */) return 1 } zName = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -64124,7 +64586,7 @@ func test_quota_shutdown(tls *crt.TLS, clientData uintptr, interp uintptr, objc var rc int32 // Value returned by quota_shutdown() if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } @@ -64153,7 +64615,7 @@ func test_quota_set(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 // Process arguments if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+42023 /* "PATTERN LIMIT SC..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32725 /* "PATTERN LIMIT SC..." */) return 1 } zPattern = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -64167,7 +64629,7 @@ func test_quota_set(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32 // Allocate a TclQuotaCallback object p = sqlite3.Xsqlite3_malloc(tls, int32(unsafe.Sizeof(TclQuotaCallback{}))) if !(p != 0) { - tcl.XTcl_SetResult(tls, interp, ts+37683 /* "SQLITE_NOMEM" */, uintptr(0)) + tcl.XTcl_SetResult(tls, interp, ts+29563 /* "SQLITE_NOMEM" */, uintptr(0)) return 0 } crt.Xmemset(tls, p, 0, uint64(unsafe.Sizeof(TclQuotaCallback{}))) @@ -64198,7 +64660,7 @@ func test_quota_file(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 // Process arguments if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37867 /* "FILENAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29747 /* "FILENAME" */) return 1 } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -64236,7 +64698,7 @@ func test_quota_dump(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 // var zTemp [1000]int8 at bp+8, 1000 pFileTerm = tcl.XTcl_NewObj(tls) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([1000]int8{})), bp+8 /* &zTemp[0] */, ts+130 /* "%s" */, crt.VaList(bp, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([1000]int8{})), bp+8 /* &zTemp[0] */, ts /* "%s" */, crt.VaList(bp, (*quotaFile)(unsafe.Pointer(pFile)).FzFilename)) for i = 0; *(*int8)(unsafe.Pointer(bp + 8 /* &zTemp[0] */ + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(bp + 8 /* &zTemp[0] */ + uintptr(i)))) == '\\' { *(*int8)(unsafe.Pointer(bp + 8 /* &zTemp[0] */ + uintptr(i))) = int8('/') @@ -64272,13 +64734,13 @@ func test_quota_fopen(tls *crt.TLS, clientData uintptr, interp uintptr, objc int // Process arguments if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+42044 /* "FILENAME MODE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32746 /* "FILENAME MODE" */) return 1 } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) zMode = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) p = sqlite3_quota_fopen(tls, zFilename, zMode) - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+8 /* &zReturn[0] */, ts+20002 /* "%p" */, crt.VaList(bp, p)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+8 /* &zReturn[0] */, ts+11197 /* "%p" */, crt.VaList(bp, p)) tcl.XTcl_SetResult(tls, interp, bp+8 /* &zReturn[0] */, uintptr(1)) return 0 } @@ -64297,7 +64759,7 @@ func test_quota_fread(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var got size_t if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+42058 /* "HANDLE SIZE NELE..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32760 /* "HANDLE SIZE NELE..." */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64309,7 +64771,7 @@ func test_quota_fread(tls *crt.TLS, clientData uintptr, interp uintptr, objc int } zBuf = sqlite3.Xsqlite3_malloc(tls, ((*(*int32)(unsafe.Pointer(bp /* sz */)) * *(*int32)(unsafe.Pointer(bp + 4 /* nElem */))) + 1)) if zBuf == uintptr(0) { - tcl.XTcl_SetResult(tls, interp, ts+2471 /* "out of memory" */, uintptr(0)) + tcl.XTcl_SetResult(tls, interp, ts+1929 /* "out of memory" */, uintptr(0)) return 1 } got = sqlite3_quota_fread(tls, zBuf, uint64(*(*int32)(unsafe.Pointer(bp /* sz */))), uint64(*(*int32)(unsafe.Pointer(bp + 4 /* nElem */))), p) @@ -64333,7 +64795,7 @@ func test_quota_fwrite(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var got size_t if objc != 5 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+42076 /* "HANDLE SIZE NELE..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32778 /* "HANDLE SIZE NELE..." */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64355,7 +64817,7 @@ func test_quota_fclose(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64374,7 +64836,7 @@ func test_quota_fflush(tls *crt.TLS, clientData uintptr, interp uintptr, objc in *(*int32)(unsafe.Pointer(bp /* doSync */)) = 0 if (objc != 2) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+42102 /* "HANDLE ?HARDSYNC..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32804 /* "HANDLE ?HARDSYNC..." */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64401,7 +64863,7 @@ func test_quota_fseek(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var rc int32 if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+42120 /* "HANDLE OFFSET WH..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32822 /* "HANDLE OFFSET WH..." */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64409,15 +64871,15 @@ func test_quota_fseek(tls *crt.TLS, clientData uintptr, interp uintptr, objc int return 1 } zWhence = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8))) - if crt.Xstrcmp(tls, zWhence, ts+42141 /* "SEEK_SET" */) == 0 { + if crt.Xstrcmp(tls, zWhence, ts+32843 /* "SEEK_SET" */) == 0 { whence = 0 - } else if crt.Xstrcmp(tls, zWhence, ts+42150 /* "SEEK_CUR" */) == 0 { + } else if crt.Xstrcmp(tls, zWhence, ts+32852 /* "SEEK_CUR" */) == 0 { whence = 1 - } else if crt.Xstrcmp(tls, zWhence, ts+42159 /* "SEEK_END" */) == 0 { + } else if crt.Xstrcmp(tls, zWhence, ts+32861 /* "SEEK_END" */) == 0 { whence = 2 } else { tcl.XTcl_AppendResult(tls, interp, - crt.VaList(bp, ts+42168 /* "WHENCE should be..." */, uintptr(0))) + crt.VaList(bp, ts+32870 /* "WHENCE should be..." */, uintptr(0))) return 1 } rc = sqlite3_quota_fseek(tls, p, int64(*(*int32)(unsafe.Pointer(bp + 16 /* ofst */))), whence) @@ -64429,7 +64891,7 @@ func test_quota_fseek(tls *crt.TLS, clientData uintptr, interp uintptr, objc int func test_quota_rewind(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_quota.c:1718:26: */ var p uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64442,7 +64904,7 @@ func test_quota_ftell(tls *crt.TLS, clientData uintptr, interp uintptr, objc int var p uintptr var x sqlite3_int64 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64462,7 +64924,7 @@ func test_quota_ftruncate(tls *crt.TLS, clientData uintptr, interp uintptr, objc var rc int32 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+42217 /* "HANDLE SIZE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32919 /* "HANDLE SIZE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64480,7 +64942,7 @@ func test_quota_file_size(tls *crt.TLS, clientData uintptr, interp uintptr, objc var p uintptr var x sqlite3_int64 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64494,7 +64956,7 @@ func test_quota_file_truesize(tls *crt.TLS, clientData uintptr, interp uintptr, var p uintptr var x sqlite3_int64 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64512,7 +64974,7 @@ func test_quota_file_mtime(tls *crt.TLS, clientData uintptr, interp uintptr, obj // var t time_t at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64527,7 +64989,7 @@ func test_quota_remove(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var zFilename uintptr // File pattern to configure var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37867 /* "FILENAME" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29747 /* "FILENAME" */) return 1 } zFilename = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -64545,7 +65007,7 @@ func test_quota_glob(tls *crt.TLS, clientData uintptr, interp uintptr, objc int3 var zText uintptr // Text to compare agains the pattern var rc int32 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+42229 /* "PATTERN TEXT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+32931 /* "PATTERN TEXT" */) return 1 } zPattern = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))) @@ -64563,7 +65025,7 @@ func test_quota_file_available(tls *crt.TLS, clientData uintptr, interp uintptr, var p uintptr var x sqlite3_int64 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64579,7 +65041,7 @@ func test_quota_ferror(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var p uintptr var x int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+33609 /* "HANDLE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+25430 /* "HANDLE" */) return 1 } p = sqlite3TestTextToPtr(tls, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)))) @@ -64594,41 +65056,41 @@ func test_quota_ferror(tls *crt.TLS, clientData uintptr, interp uintptr, objc in func Sqlitequota_Init(tls *crt.TLS, interp uintptr) int32 { /* test_quota.c:1944:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd7)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aCmd8)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aCmd7[i].FzName, aCmd7[i].FxProc, uintptr(0), uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aCmd8[i].FzName, aCmd8[i].FxProc, uintptr(0), uintptr(0)) } return 0 } -var aCmd7 = [21]struct { +var aCmd8 = [21]struct { FzName uintptr FxProc uintptr }{ - {FzName: ts + 41929 /* "sqlite3_quota_in..." */, FxProc: 0}, - {FzName: ts + 41989 /* "sqlite3_quota_sh..." */, FxProc: 0}, - {FzName: ts + 42242 /* "sqlite3_quota_se..." */, FxProc: 0}, - {FzName: ts + 42260 /* "sqlite3_quota_fi..." */, FxProc: 0}, - {FzName: ts + 42279 /* "sqlite3_quota_du..." */, FxProc: 0}, - {FzName: ts + 42298 /* "sqlite3_quota_fo..." */, FxProc: 0}, - {FzName: ts + 42318 /* "sqlite3_quota_fr..." */, FxProc: 0}, - {FzName: ts + 42338 /* "sqlite3_quota_fw..." */, FxProc: 0}, - {FzName: ts + 42359 /* "sqlite3_quota_fc..." */, FxProc: 0}, - {FzName: ts + 42380 /* "sqlite3_quota_ff..." */, FxProc: 0}, - {FzName: ts + 42401 /* "sqlite3_quota_fs..." */, FxProc: 0}, - {FzName: ts + 42421 /* "sqlite3_quota_re..." */, FxProc: 0}, - {FzName: ts + 42442 /* "sqlite3_quota_ft..." */, FxProc: 0}, - {FzName: ts + 42462 /* "sqlite3_quota_ft..." */, FxProc: 0}, - {FzName: ts + 42486 /* "sqlite3_quota_fi..." */, FxProc: 0}, - {FzName: ts + 42510 /* "sqlite3_quota_fi..." */, FxProc: 0}, - {FzName: ts + 42538 /* "sqlite3_quota_fi..." */, FxProc: 0}, - {FzName: ts + 42563 /* "sqlite3_quota_re..." */, FxProc: 0}, - {FzName: ts + 42584 /* "sqlite3_quota_gl..." */, FxProc: 0}, - {FzName: ts + 42603 /* "sqlite3_quota_fi..." */, FxProc: 0}, - {FzName: ts + 42632 /* "sqlite3_quota_fe..." */, FxProc: 0}, + {FzName: ts + 32944 /* "sqlite3_quota_in..." */, FxProc: 0}, + {FzName: ts + 32969 /* "sqlite3_quota_sh..." */, FxProc: 0}, + {FzName: ts + 32992 /* "sqlite3_quota_se..." */, FxProc: 0}, + {FzName: ts + 33010 /* "sqlite3_quota_fi..." */, FxProc: 0}, + {FzName: ts + 33029 /* "sqlite3_quota_du..." */, FxProc: 0}, + {FzName: ts + 33048 /* "sqlite3_quota_fo..." */, FxProc: 0}, + {FzName: ts + 33068 /* "sqlite3_quota_fr..." */, FxProc: 0}, + {FzName: ts + 33088 /* "sqlite3_quota_fw..." */, FxProc: 0}, + {FzName: ts + 33109 /* "sqlite3_quota_fc..." */, FxProc: 0}, + {FzName: ts + 33130 /* "sqlite3_quota_ff..." */, FxProc: 0}, + {FzName: ts + 33151 /* "sqlite3_quota_fs..." */, FxProc: 0}, + {FzName: ts + 33171 /* "sqlite3_quota_re..." */, FxProc: 0}, + {FzName: ts + 33192 /* "sqlite3_quota_ft..." */, FxProc: 0}, + {FzName: ts + 33212 /* "sqlite3_quota_ft..." */, FxProc: 0}, + {FzName: ts + 33236 /* "sqlite3_quota_fi..." */, FxProc: 0}, + {FzName: ts + 33260 /* "sqlite3_quota_fi..." */, FxProc: 0}, + {FzName: ts + 33288 /* "sqlite3_quota_fi..." */, FxProc: 0}, + {FzName: ts + 33313 /* "sqlite3_quota_re..." */, FxProc: 0}, + {FzName: ts + 33334 /* "sqlite3_quota_gl..." */, FxProc: 0}, + {FzName: ts + 33353 /* "sqlite3_quota_fi..." */, FxProc: 0}, + {FzName: ts + 33382 /* "sqlite3_quota_fe..." */, FxProc: 0}, } /* test_quota.c:1948:5 */ func register_cube_geom(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, objv uintptr) int32 { /* test_rtree.c:443:26: */ @@ -64648,10 +65110,10 @@ func register_circle_geom(tls *crt.TLS, clientData uintptr, interp uintptr, objc } func Sqlitetestrtree_Init(tls *crt.TLS, interp uintptr) int32 { /* test_rtree.c:507:5: */ - tcl.XTcl_CreateObjCommand(tls, interp, ts+42653 /* "register_cube_ge..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+33403 /* "register_cube_ge..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{register_cube_geom})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+42672 /* "register_circle_..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+33422 /* "register_circle_..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{register_circle_geom})), uintptr(0), uintptr(0)) return 0 @@ -64875,7 +65337,7 @@ func schemaCreate(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uintp if pVtab != 0 { crt.Xmemset(tls, pVtab, 0, uint64(unsafe.Sizeof(schema_vtab{}))) (*schema_vtab)(unsafe.Pointer(pVtab)).Fdb = db - rc = sqlite3.Xsqlite3_declare_vtab(tls, db /* Name of database (i.e. main, temp etc.) */ /* Name of table */ /* Column number (from left-to-right, 0 upward) */ /* Column name */ /* Specified type (i.e. VARCHAR(32)) */ /* Boolean. True if NOT NULL was specified */ /* Default value for this column */ /* True if this column is part of the primary key */, ts+42693 /* "CREATE TABLE x(d..." */) + rc = sqlite3.Xsqlite3_declare_vtab(tls, db /* Name of database (i.e. main, temp etc.) */ /* Name of table */ /* Column number (from left-to-right, 0 upward) */ /* Column name */ /* Specified type (i.e. VARCHAR(32)) */ /* Boolean. True if NOT NULL was specified */ /* Default value for this column */ /* True if this column is part of the primary key */, ts+33443 /* "CREATE TABLE x(d..." */) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pVtab return rc @@ -64999,12 +65461,12 @@ __8: goto __9 } zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+42765 /* "SELECT name FROM..." */, 0) + ts+33515 /* "SELECT name FROM..." */, 0) goto __10 __9: pDbList = (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList zSql = sqlite3.Xsqlite3_mprintf(tls, - ts+42820, /* "SELECT name FROM..." */ + ts+33570, /* "SELECT name FROM..." */ crt.VaList(bp, sqlite3.Xsqlite3_column_text(tls, pDbList, 1))) __10: ; @@ -65031,7 +65493,7 @@ __5: // Set zSql to the SQL to the table_info pragma for the table currently // identified by the rows pointed to by statements pCur->pDbList and // pCur->pTableList. - zSql = sqlite3.Xsqlite3_mprintf(tls, ts+42873, /* "PRAGMA %Q.table_..." */ + zSql = sqlite3.Xsqlite3_mprintf(tls, ts+33623, /* "PRAGMA %Q.table_..." */ crt.VaList(bp+8, sqlite3.Xsqlite3_column_text(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpDbList, 1), sqlite3.Xsqlite3_column_text(tls, (*schema_cursor)(unsafe.Pointer(pCur)).FpTableList, 0))) @@ -65069,7 +65531,7 @@ func schemaFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt finalize(tls, (pCur + 16 /* &.pTableList */)) finalize(tls, (pCur + 24 /* &.pColumnList */)) finalize(tls, (pCur + 8 /* &.pDbList */)) - rc = sqlite3.Xsqlite3_prepare(tls, (*schema_vtab)(unsafe.Pointer(pVtab)).Fdb, ts+42898 /* "PRAGMA database_..." */, -1, (pCur + 8 /* &.pDbList */), uintptr(0)) + rc = sqlite3.Xsqlite3_prepare(tls, (*schema_vtab)(unsafe.Pointer(pVtab)).Fdb, ts+33648 /* "PRAGMA database_..." */, -1, (pCur + 8 /* &.pDbList */), uintptr(0)) return func() int32 { if rc == 0 { return schemaNext(tls, pVtabCursor) @@ -65110,47 +65572,565 @@ func register_schema_module(tls *crt.TLS, clientData ClientData, interp uintptr, // var db uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { return 1 } - sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+4325 /* "schema" */, uintptr(unsafe.Pointer(&schemaModule)), uintptr(0)) + sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+3350 /* "schema" */, uintptr(unsafe.Pointer(&schemaModule)), uintptr(0)) return 0 } // Register commands with the TCL interpreter. func Sqlitetestschema_Init(tls *crt.TLS, interp uintptr) int32 { /* test_schema.c:330:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd12)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd11)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd12[i].FzName, - aObjCmd12[i].FxProc, aObjCmd12[i].FclientData, uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd11[i].FzName, + aObjCmd11[i].FxProc, aObjCmd11[i].FclientData, uintptr(0)) } return 0 } -var aObjCmd12 = [1]struct { +var aObjCmd11 = [1]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ - {FzName: ts + 42919 /* "register_schema_..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 33669 /* "register_schema_..." */, FxProc: 0, FclientData: uintptr(0)}, } /* test_schema.c:335:5 */ -// When possible, define assert so that it does not add extra -// parentheses around EXPR. Otherwise, those added parentheses would -// suppress warnings we'd expect to be detected by gcc's -Wparentheses. +// 2001-09-15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface that the SQLite library +// presents to client programs. If a C-function, structure, datatype, +// or constant definition does not appear in this file, then it is +// not a published API of SQLite, is subject to change without +// notice, and should not be referenced by programs that use SQLite. +// +// Some of the definitions that are in this file are marked as +// "experimental". Experimental interfaces are normally new +// features recently added to SQLite. We do not anticipate changes +// to experimental interfaces but reserve the right to make minor changes +// if experience from use "in the wild" suggest such changes are prudent. +// +// The official C-language API documentation for SQLite is derived +// from comments in this file. This file is the authoritative source +// on how SQLite interfaces are supposed to operate. +// +// The name of this file under configuration management is "sqlite.h.in". +// The makefile makes some minor changes to this file (such as inserting +// the version number) and changes its name to "sqlite3.h" as +// part of the build process. + +//******* Begin file sqlite3rtree.h ******** +// 2010 August 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +//******* End of sqlite3rtree.h ******** +//******* Begin file sqlite3session.h ******** + +//******* End of sqlite3session.h ******** +//******* Begin file fts5.h ******** +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Interfaces to extend FTS5. Using the interfaces defined in this file, +// FTS5 may be extended with: +// +// * custom tokenizers, and +// * custom auxiliary functions. + +//******* End of fts5.h ******** + +// Messages are passed from client to server and back again as +// instances of the following structure. +type SqlMessage1 = struct { + Fop int32 + FpDb uintptr + FpStmt uintptr + FerrCode int32 + FzIn uintptr + FnByte int32 + FzOut uintptr + FpNext uintptr + FpPrev uintptr + FclientMutex pthread_mutex_t + FclientWakeup pthread_cond_t +} + +// 2001-09-15 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// This header file defines the interface that the SQLite library +// presents to client programs. If a C-function, structure, datatype, +// or constant definition does not appear in this file, then it is +// not a published API of SQLite, is subject to change without +// notice, and should not be referenced by programs that use SQLite. +// +// Some of the definitions that are in this file are marked as +// "experimental". Experimental interfaces are normally new +// features recently added to SQLite. We do not anticipate changes +// to experimental interfaces but reserve the right to make minor changes +// if experience from use "in the wild" suggest such changes are prudent. +// +// The official C-language API documentation for SQLite is derived +// from comments in this file. This file is the authoritative source +// on how SQLite interfaces are supposed to operate. +// +// The name of this file under configuration management is "sqlite.h.in". +// The makefile makes some minor changes to this file (such as inserting +// the version number) and changes its name to "sqlite3.h" as +// part of the build process. + +//******* Begin file sqlite3rtree.h ******** +// 2010 August 30 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// + +//******* End of sqlite3rtree.h ******** +//******* Begin file sqlite3session.h ******** + +//******* End of sqlite3session.h ******** +//******* Begin file fts5.h ******** +// 2014 May 31 +// +// The author disclaims copyright to this source code. In place of +// a legal notice, here is a blessing: +// +// May you do good and not evil. +// May you find forgiveness for yourself and forgive others. +// May you share freely, never taking more than you give. +// +// +// +// Interfaces to extend FTS5. Using the interfaces defined in this file, +// FTS5 may be extended with: +// +// * custom tokenizers, and +// * custom auxiliary functions. + +//******* End of fts5.h ******** + +// Messages are passed from client to server and back again as +// instances of the following structure. +type SqlMessage = SqlMessage1 /* test_server.c:221:27 */ + +// Legal values for SqlMessage.op + +// State information about the server is stored in a static variable +// named "g" as follows: +type ServerState = struct { + FqueueMutex pthread_mutex_t + FserverMutex pthread_mutex_t + FserverWakeup pthread_cond_t + FserverHalt int32 + FpQueueHead uintptr + FpQueueTail uintptr +} + +// Legal values for SqlMessage.op + +// State information about the server is stored in a static variable +// named "g" as follows: +var g4 = ServerState{FqueueMutex: pthread_mutex_t{F__data: struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list struct { + F__prev uintptr + F__next uintptr + } +}{F__lock: 0, F__count: uint32(0), F__owner: 0, F__nusers: uint32(0), F__kind: 0, F__spins: int16(0), F__elision: int16(0), F__list: struct { + F__prev uintptr + F__next uintptr +}{F__prev: uintptr(0), F__next: uintptr(0)}}}, FserverMutex: pthread_mutex_t{F__data: struct { + F__lock int32 + F__count uint32 + F__owner int32 + F__nusers uint32 + F__kind int32 + F__spins int16 + F__elision int16 + F__list struct { + F__prev uintptr + F__next uintptr + } +}{F__lock: 0, F__count: uint32(0), F__owner: 0, F__nusers: uint32(0), F__kind: 0, F__spins: int16(0), F__elision: int16(0), F__list: struct { + F__prev uintptr + F__next uintptr +}{F__prev: uintptr(0), F__next: uintptr(0)}}}, FserverWakeup: pthread_cond_t{F__data: struct { + F__0 struct{ F__wseq uint64 } + F__8 struct{ F__g1_start uint64 } + F__g_refs [2]uint32 + F__g_size [2]uint32 + F__g1_orig_size uint32 + F__wrefs uint32 + F__g_signals [2]uint32 +}{F__0: struct{ F__wseq uint64 }{F__wseq: uint64(0)}, F__8: struct{ F__g1_start uint64 }{F__g1_start: uint64(0)}, F__g_refs: [2]uint32{uint32(0), uint32(0)}, F__g_size: [2]uint32{uint32(0), uint32(0)}, F__g1_orig_size: uint32(0), F__wrefs: uint32(0), F__g_signals: [2]uint32{uint32(0), uint32(0)}}}, +} /* test_server.c:259:3 */ + +// Send a message to the server. Block until we get a reply. +// +// The mutex and condition variable in the message are uninitialized +// when this routine is called. This routine takes care of +// initializing them and destroying them when it has finished. +func sendToServer(tls *crt.TLS, pMsg uintptr) { /* test_server.c:272:13: */ + // Initialize the mutex and condition variable on the message + crt2.Xpthread_mutex_init(tls, (pMsg + 72 /* &.clientMutex */), uintptr(0)) + crt2.Xpthread_cond_init(tls, (pMsg + 112 /* &.clientWakeup */), uintptr(0)) + + // Add the message to the head of the server's message queue. + crt2.Xpthread_mutex_lock(tls, (uintptr(unsafe.Pointer(&g4)) /* &.queueMutex */)) + (*SqlMessage)(unsafe.Pointer(pMsg)).FpNext = g4.FpQueueHead + if g4.FpQueueHead == uintptr(0) { + g4.FpQueueTail = pMsg + } else { + (*SqlMessage)(unsafe.Pointer(g4.FpQueueHead)).FpPrev = pMsg + } + (*SqlMessage)(unsafe.Pointer(pMsg)).FpPrev = uintptr(0) + g4.FpQueueHead = pMsg + crt2.Xpthread_mutex_unlock(tls, (uintptr(unsafe.Pointer(&g4)) /* &.queueMutex */)) + + // Signal the server that the new message has be queued, then + // block waiting for the server to process the message. + crt2.Xpthread_mutex_lock(tls, (pMsg + 72 /* &.clientMutex */)) + crt2.Xpthread_cond_signal(tls, (uintptr(unsafe.Pointer(&g4)) + 80 /* &.serverWakeup */)) + for (*SqlMessage)(unsafe.Pointer(pMsg)).Fop != 7 { + crt2.Xpthread_cond_wait(tls, (pMsg + 112 /* &.clientWakeup */), (pMsg + 72 /* &.clientMutex */)) + } + crt2.Xpthread_mutex_unlock(tls, (pMsg + 72 /* &.clientMutex */)) + + // Destroy the mutex and condition variable of the message. + crt2.Xpthread_mutex_destroy(tls, (pMsg + 72 /* &.clientMutex */)) + crt2.Xpthread_cond_destroy(tls, (pMsg + 112 /* &.clientWakeup */)) +} + +// The following 6 routines are client-side implementations of the +// core SQLite interfaces: +// +// sqlite3_open +// sqlite3_prepare +// sqlite3_step +// sqlite3_reset +// sqlite3_finalize +// sqlite3_close +// +// Clients should use the following client-side routines instead of +// the core routines above. +// +// sqlite3_client_open +// sqlite3_client_prepare +// sqlite3_client_step +// sqlite3_client_reset +// sqlite3_client_finalize +// sqlite3_client_close +// +// Each of these routines creates a message for the desired operation, +// sends that message to the server, waits for the server to process +// then message and return a response. +func sqlite3_client_open(tls *crt.TLS, zDatabaseName uintptr, ppDb uintptr) int32 { /* test_server.c:332:5: */ + bp := tls.Alloc(160) + defer tls.Free(160) + + // var msg SqlMessage at bp, 160 + + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).Fop = 1 + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FzIn = zDatabaseName + sendToServer(tls, bp /* &msg */) + *(*uintptr)(unsafe.Pointer(ppDb)) = (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpDb + return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode +} +func sqlite3_client_prepare(tls *crt.TLS, pDb uintptr, zSql uintptr, nByte int32, ppStmt uintptr, pzTail uintptr) int32 { /* test_server.c:340:5: */ + bp := tls.Alloc(160) + defer tls.Free(160) + + // var msg SqlMessage at bp, 160 + + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).Fop = 2 + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpDb = pDb + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FzIn = zSql + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FnByte = nByte + sendToServer(tls, bp /* &msg */) + *(*uintptr)(unsafe.Pointer(ppStmt)) = (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpStmt + if pzTail != 0 { + *(*uintptr)(unsafe.Pointer(pzTail)) = (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FzOut + } + return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode +} +func sqlite3_client_step(tls *crt.TLS, pStmt uintptr) int32 { /* test_server.c:357:5: */ + bp := tls.Alloc(160) + defer tls.Free(160) + + // var msg SqlMessage at bp, 160 -// Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' -// which contains the name of the function currently being defined. -// This is broken in G++ before version 2.6. -// C9x has a similar variable called __func__, but prefer the GCC one since -// it demangles C++ function names. + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).Fop = 3 + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpStmt = pStmt + sendToServer(tls, bp /* &msg */) + return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode +} +func sqlite3_client_reset(tls *crt.TLS, pStmt uintptr) int32 { /* test_server.c:364:5: */ + bp := tls.Alloc(160) + defer tls.Free(160) + + // var msg SqlMessage at bp, 160 + + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).Fop = 4 + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpStmt = pStmt + sendToServer(tls, bp /* &msg */) + return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode +} +func sqlite3_client_finalize(tls *crt.TLS, pStmt uintptr) int32 { /* test_server.c:371:5: */ + bp := tls.Alloc(160) + defer tls.Free(160) + + // var msg SqlMessage at bp, 160 + + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).Fop = 5 + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpStmt = pStmt + sendToServer(tls, bp /* &msg */) + return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode +} +func sqlite3_client_close(tls *crt.TLS, pDb uintptr) int32 { /* test_server.c:378:5: */ + bp := tls.Alloc(160) + defer tls.Free(160) + + // var msg SqlMessage at bp, 160 + + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).Fop = 6 + (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FpDb = pDb + sendToServer(tls, bp /* &msg */) + return (*SqlMessage)(unsafe.Pointer(bp /* &msg */)).FerrCode +} + +// This routine implements the server. To start the server, first +// make sure g.serverHalt is false, then create a new detached thread +// on this procedure. See the sqlite3_server_start() routine below +// for an example. This procedure loops until g.serverHalt becomes +// true. +func sqlite3_server(tls *crt.TLS, NotUsed uintptr) uintptr { /* test_server.c:393:6: */ + if crt2.Xpthread_mutex_trylock(tls, (uintptr(unsafe.Pointer(&g4))+40 /* &.serverMutex */)) != 0 { + return uintptr(0) + } + sqlite3.Xsqlite3_enable_shared_cache(tls, 1) + for !(g4.FserverHalt != 0) { + var pMsg uintptr + + // Remove the last message from the message queue. + crt2.Xpthread_mutex_lock(tls, (uintptr(unsafe.Pointer(&g4)) /* &.queueMutex */)) + for (g4.FpQueueTail == uintptr(0)) && (g4.FserverHalt == 0) { + crt2.Xpthread_cond_wait(tls, (uintptr(unsafe.Pointer(&g4)) + 80 /* &.serverWakeup */), (uintptr(unsafe.Pointer(&g4)) /* &.queueMutex */)) + } + pMsg = g4.FpQueueTail + if pMsg != 0 { + if (*SqlMessage)(unsafe.Pointer(pMsg)).FpPrev != 0 { + (*SqlMessage)(unsafe.Pointer((*SqlMessage)(unsafe.Pointer(pMsg)).FpPrev)).FpNext = uintptr(0) + } else { + g4.FpQueueHead = uintptr(0) + } + g4.FpQueueTail = (*SqlMessage)(unsafe.Pointer(pMsg)).FpPrev + } + crt2.Xpthread_mutex_unlock(tls, (uintptr(unsafe.Pointer(&g4)) /* &.queueMutex */)) + if pMsg == uintptr(0) { + break + } + + // Process the message just removed + crt2.Xpthread_mutex_lock(tls, (pMsg + 72 /* &.clientMutex */)) + switch (*SqlMessage)(unsafe.Pointer(pMsg)).Fop { + case 1: + { + (*SqlMessage)(unsafe.Pointer(pMsg)).FerrCode = sqlite3.Xsqlite3_open(tls, (*SqlMessage)(unsafe.Pointer(pMsg)).FzIn, (pMsg + 8 /* &.pDb */)) + break + } + case 2: + { + (*SqlMessage)(unsafe.Pointer(pMsg)).FerrCode = sqlite3.Xsqlite3_prepare(tls, (*SqlMessage)(unsafe.Pointer(pMsg)).FpDb, (*SqlMessage)(unsafe.Pointer(pMsg)).FzIn, (*SqlMessage)(unsafe.Pointer(pMsg)).FnByte, + (pMsg + 16 /* &.pStmt */), (pMsg + 48 /* &.zOut */)) + break + } + case 3: + { + (*SqlMessage)(unsafe.Pointer(pMsg)).FerrCode = sqlite3.Xsqlite3_step(tls, (*SqlMessage)(unsafe.Pointer(pMsg)).FpStmt) + break + } + case 4: + { + (*SqlMessage)(unsafe.Pointer(pMsg)).FerrCode = sqlite3.Xsqlite3_reset(tls, (*SqlMessage)(unsafe.Pointer(pMsg)).FpStmt) + break + } + case 5: + { + (*SqlMessage)(unsafe.Pointer(pMsg)).FerrCode = sqlite3.Xsqlite3_finalize(tls, (*SqlMessage)(unsafe.Pointer(pMsg)).FpStmt) + break + } + case 6: + { + (*SqlMessage)(unsafe.Pointer(pMsg)).FerrCode = sqlite3.Xsqlite3_close(tls, (*SqlMessage)(unsafe.Pointer(pMsg)).FpDb) + break + } + } + + // Signal the client that the message has been processed. + (*SqlMessage)(unsafe.Pointer(pMsg)).Fop = 7 + crt2.Xpthread_mutex_unlock(tls, (pMsg + 72 /* &.clientMutex */)) + crt2.Xpthread_cond_signal(tls, (pMsg + 112 /* &.clientWakeup */)) + } + crt2.Xpthread_mutex_unlock(tls, (uintptr(unsafe.Pointer(&g4)) + 40 /* &.serverMutex */)) + return uintptr(0) +} + +// Start a server thread if one is not already running. If there +// is aleady a server thread running, the new thread will quickly +// die and this routine is effectively a no-op. +func sqlite3_server_start(tls *crt.TLS) { /* test_server.c:465:6: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var x pthread_t at bp, 8 + + var rc int32 + g4.FserverHalt = 0 + rc = crt2.Xpthread_create(tls, bp /* &x */, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr) uintptr + }{sqlite3_server})), uintptr(0)) + if rc == 0 { + crt2.Xpthread_detach(tls, *(*pthread_t)(unsafe.Pointer(bp /* x */))) + } +} + +// A wrapper around sqlite3_server() that decrements the int variable +// pointed to by the first argument after the sqlite3_server() call +// returns. +func serverWrapper(tls *crt.TLS, pnDecr uintptr) uintptr { /* test_server.c:480:13: */ + var p uintptr = sqlite3_server(tls, uintptr(0)) + (*(*int32)(unsafe.Pointer(pnDecr)))-- + return p +} + +// This function is the similar to sqlite3_server_start(), except that +// the integer pointed to by the first argument is decremented when +// the server thread exits. +func sqlite3_server_start2(tls *crt.TLS, pnDecr uintptr) { /* test_server.c:491:6: */ + bp := tls.Alloc(8) + defer tls.Free(8) + + // var x pthread_t at bp, 8 + + var rc int32 + g4.FserverHalt = 0 + rc = crt2.Xpthread_create(tls, bp /* &x */, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr) uintptr + }{serverWrapper})), pnDecr) + if rc == 0 { + crt2.Xpthread_detach(tls, *(*pthread_t)(unsafe.Pointer(bp /* x */))) + } +} + +// If a server thread is running, then stop it. If no server is +// running, this routine is effectively a no-op. +// +// This routine waits until the server has actually stopped before +// returning. +func sqlite3_server_stop(tls *crt.TLS) { /* test_server.c:508:6: */ + g4.FserverHalt = 1 + crt2.Xpthread_cond_broadcast(tls, (uintptr(unsafe.Pointer(&g4)) + 80 /* &.serverWakeup */)) + crt2.Xpthread_mutex_lock(tls, (uintptr(unsafe.Pointer(&g4)) + 40 /* &.serverMutex */)) + crt2.Xpthread_mutex_unlock(tls, (uintptr(unsafe.Pointer(&g4)) + 40 /* &.serverMutex */)) +} + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// ISO C99 Standard: 7.2 Diagnostics <assert.h> + +// Copyright (C) 1991-2018 Free Software Foundation, Inc. +// This file is part of the GNU C Library. +// +// The GNU C Library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// The GNU C Library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with the GNU C Library; if not, see +// <http://www.gnu.org/licenses/>. + +// void assert (int expression); +// +// If NDEBUG is defined, do nothing. +// If not, and EXPRESSION is zero, print an error message and abort. + +// void assert_perror (int errnum); +// +// If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an +// error message with the error text for ERRNUM and abort. +// (This is a GNU extension.) // A structure to collect a busy-handler callback and argument and a count // of the number of times it has been invoked. @@ -65200,7 +66180,7 @@ func superlockIsWal(tls *crt.TLS, pLock uintptr) int32 { /* test_superlock.c:67: // var pStmt uintptr at bp, 8 // Compiled PRAGMA journal_mode statement - rc = sqlite3.Xsqlite3_prepare(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+42942 /* "PRAGMA main.jour..." */, -1, bp /* &pStmt */, uintptr(0)) + rc = sqlite3.Xsqlite3_prepare(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+33692 /* "PRAGMA main.jour..." */, -1, bp /* &pStmt */, uintptr(0)) if rc != 0 { return rc } @@ -65208,7 +66188,7 @@ func superlockIsWal(tls *crt.TLS, pLock uintptr) int32 { /* test_superlock.c:67: (*Superlock)(unsafe.Pointer(pLock)).FbWal = 0 if 100 == sqlite3.Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */))) { var zMode uintptr = sqlite3.Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp /* pStmt */)), 0) - if ((zMode != 0) && (crt.Xstrlen(tls, zMode) == uint64(3))) && (sqlite3.Xsqlite3_strnicmp(tls, ts+34862 /* "wal" */, zMode, 3) == 0) { + if ((zMode != 0) && (crt.Xstrlen(tls, zMode) == uint64(3))) && (sqlite3.Xsqlite3_strnicmp(tls, ts+26690 /* "wal" */, zMode, 3) == 0) { (*Superlock)(unsafe.Pointer(pLock)).FbWal = 1 } } @@ -65240,7 +66220,7 @@ func superlockWalLock(tls *crt.TLS, db uintptr, pBusy uintptr) int32 { /* test_s *(*uintptr)(unsafe.Pointer(bp + 8 /* p */)) = uintptr(0) // Pointer to first page of shared memory // Obtain a pointer to the sqlite3_file object open on the main db file. - rc = sqlite3.Xsqlite3_file_control(tls, db, ts+354 /* "main" */, 7, bp /* &fd */) + rc = sqlite3.Xsqlite3_file_control(tls, db, ts+84 /* "main" */, 7, bp /* &fd */) if rc != 0 { return rc } @@ -65283,7 +66263,7 @@ func sqlite3demo_superunlock(tls *crt.TLS, pLock uintptr) { /* test_superlock.c: var rc int32 // Return code var flags int32 = (1 | 8) *(*uintptr)(unsafe.Pointer(bp /* fd */)) = uintptr(0) - rc = sqlite3.Xsqlite3_file_control(tls, (*Superlock)(unsafe.Pointer(p)).Fdb, ts+354 /* "main" */, 7, bp /* &fd */) + rc = sqlite3.Xsqlite3_file_control(tls, (*Superlock)(unsafe.Pointer(p)).Fdb, ts+84 /* "main" */, 7, bp /* &fd */) if rc == 0 { (*(*func(*crt.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* fd */)))).FpMethods + 112 /* &.xShmLock */))))(tls, *(*uintptr)(unsafe.Pointer(bp /* fd */)), 2, 1, flags) (*(*func(*crt.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(((*sqlite3_file)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp /* fd */)))).FpMethods + 112 /* &.xShmLock */))))(tls, *(*uintptr)(unsafe.Pointer(bp /* fd */)), 3, (8 - 3), flags) @@ -65342,7 +66322,7 @@ func sqlite3demo_superlock(tls *crt.TLS, zPath uintptr, zVfs uintptr, xBusy uint sqlite3.Xsqlite3_busy_handler(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32) int32 }{superlockBusyHandler})), bp /* &busy */) - rc = sqlite3.Xsqlite3_exec(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+19899 /* "BEGIN EXCLUSIVE" */, uintptr(0), uintptr(0), uintptr(0)) + rc = sqlite3.Xsqlite3_exec(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+11078 /* "BEGIN EXCLUSIVE" */, uintptr(0), uintptr(0), uintptr(0)) } // If the BEGIN EXCLUSIVE was executed successfully and this is a WAL @@ -65355,7 +66335,7 @@ func sqlite3demo_superlock(tls *crt.TLS, zPath uintptr, zVfs uintptr, xBusy uint // new WAL locks may conflict with the old. if rc == 0 { if (0 == (crt.AssignInt32(&rc, superlockIsWal(tls, pLock)))) && ((*Superlock)(unsafe.Pointer(pLock)).FbWal != 0) { - rc = sqlite3.Xsqlite3_exec(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+15071 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0)) + rc = sqlite3.Xsqlite3_exec(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, ts+9473 /* "COMMIT" */, uintptr(0), uintptr(0), uintptr(0)) if rc == 0 { rc = superlockWalLock(tls, (*Superlock)(unsafe.Pointer(pLock)).Fdb, bp /* &busy */) } @@ -65393,7 +66373,7 @@ func superunlock_del(tls *crt.TLS, cd ClientData) { /* test_superlock.c:274:27: func superunlock_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_superlock.c:278:26: */ if objc != 1 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+488 /* "" */) return 1 } tcl.XTcl_DeleteCommand(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8)))) @@ -65438,7 +66418,7 @@ func superlock_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, objv if (objc < 3) || (objc > 5) { tcl.XTcl_WrongNumArgs(tls, - interp, 1, objv, ts+42967 /* "CMDNAME PATH ?VF..." */) + interp, 1, objv, ts+33717 /* "CMDNAME PATH ?VF..." */) return 1 } @@ -65459,12 +66439,6 @@ func superlock_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, objv } rc = sqlite3demo_superlock(tls, zPath, zVfs, xBusy, bp+16 /* &busy */, bp+32 /* &pLock */) - if !((rc == 0) || (*(*uintptr)(unsafe.Pointer(bp + 32 /* pLock */)) == uintptr(0))) { - crt.X__assert_fail(tls, ts+43008 /* "rc==0 || pLock==..." */, ts+43026 /* "testdata/sqlite-..." */, uint32(342), uintptr(unsafe.Pointer(&__func__124))) - } - if !((rc != 0) || (*(*uintptr)(unsafe.Pointer(bp + 32 /* pLock */)) != uintptr(0))) { - crt.X__assert_fail(tls, ts+43075 /* "rc!=0 || pLock!=..." */, ts+43026 /* "testdata/sqlite-..." */, uint32(343), uintptr(unsafe.Pointer(&__func__124))) - } if rc != 0 { tcl.XTcl_ResetResult(tls, interp) @@ -65480,10 +66454,8 @@ func superlock_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, objv return 0 } -var __func__124 = *(*[14]int8)(unsafe.Pointer(ts + 43093 /* "superlock_cmd" */)) /* test_superlock.c:315:2 */ - func SqliteSuperlock_Init(tls *crt.TLS, interp uintptr) int32 { /* test_superlock.c:359:5: */ - tcl.XTcl_CreateObjCommand(tls, interp, ts+43107 /* "sqlite3demo_supe..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+33758 /* "sqlite3demo_supe..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{superlock_cmd})), uintptr(0), uintptr(0)) return 0 @@ -65508,24 +66480,24 @@ type TestSyscallArray = struct { } var aSyscall = [19]TestSyscallArray{ - /* 0 */ {FzName: ts + 43129 /* "open" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 13, Fcustom_errno: 0}, - /* 1 */ {FzName: ts + 16507 /* "close" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 2 */ {FzName: ts + 43134 /* "access" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 3 */ {FzName: ts + 43141 /* "getcwd" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 4 */ {FzName: ts + 13771 /* "stat" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 5 */ {FzName: ts + 43148 /* "fstat" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 6 */ {FzName: ts + 43154 /* "ftruncate" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 5, Fcustom_errno: 0}, - /* 7 */ {FzName: ts + 43164 /* "fcntl" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 13, Fcustom_errno: 0}, - /* 8 */ {FzName: ts + 30356 /* "read" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 9 */ {FzName: ts + 43170 /* "pread" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 10 */ {FzName: ts + 43176 /* "pread64" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 11 */ {FzName: ts + 30361 /* "write" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 12 */ {FzName: ts + 43184 /* "pwrite" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 13 */ {FzName: ts + 43191 /* "pwrite64" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 14 */ {FzName: ts + 43200 /* "fchmod" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 15 */ {FzName: ts + 43207 /* "fallocate" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 16 */ {FzName: ts + 33972 /* "mmap" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, - /* 17 */ {FzName: ts + 43217 /* "mremap" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 0 */ {FzName: ts + 33780 /* "open" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 13, Fcustom_errno: 0}, + /* 1 */ {FzName: ts + 11270 /* "close" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 2 */ {FzName: ts + 33785 /* "access" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 3 */ {FzName: ts + 33792 /* "getcwd" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 4 */ {FzName: ts + 33799 /* "stat" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 5 */ {FzName: ts + 33804 /* "fstat" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 6 */ {FzName: ts + 33810 /* "ftruncate" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 5, Fcustom_errno: 0}, + /* 7 */ {FzName: ts + 33820 /* "fcntl" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 13, Fcustom_errno: 0}, + /* 8 */ {FzName: ts + 22005 /* "read" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 9 */ {FzName: ts + 33826 /* "pread" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 10 */ {FzName: ts + 33832 /* "pread64" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 11 */ {FzName: ts + 22010 /* "write" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 12 */ {FzName: ts + 33840 /* "pwrite" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 13 */ {FzName: ts + 33847 /* "pwrite64" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 14 */ {FzName: ts + 33856 /* "fchmod" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 15 */ {FzName: ts + 33863 /* "fallocate" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 16 */ {FzName: ts + 25793 /* "mmap" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, + /* 17 */ {FzName: ts + 33873 /* "mremap" */, FxTest: 0, FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, {FzName: uintptr(0), FxTest: uintptr(0), FxOrig: uintptr(0), Fdefault_errno: 0, Fcustom_errno: 0}, } /* test_syscall.c:133:3 */ @@ -65577,7 +66549,7 @@ func tsIsFailErrno(tls *crt.TLS, zFunc uintptr) int32 { /* test_syscall.c:215:12 // A wrapper around open(). func ts_open(tls *crt.TLS, zFile uintptr, flags int32, mode int32) int32 { /* test_syscall.c:226:12: */ - if tsIsFailErrno(tls, ts+43129 /* "open" */) != 0 { + if tsIsFailErrno(tls, ts+33780 /* "open" */) != 0 { return -1 } return (*(*func(*crt.TLS, uintptr, int32, int32) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(0)*32 + 16 /* &.xOrig */))))(tls, zFile, flags, mode) @@ -65623,7 +66595,7 @@ func ts_stat(tls *crt.TLS, zPath uintptr, p uintptr) int32 { /* test_syscall.c:2 // A wrapper around fstat(). func ts_fstat(tls *crt.TLS, fd int32, p uintptr) int32 { /* test_syscall.c:282:12: */ - if tsIsFailErrno(tls, ts+43148 /* "fstat" */) != 0 { + if tsIsFailErrno(tls, ts+33804 /* "fstat" */) != 0 { return -1 } return (*(*func(*crt.TLS, int32, uintptr) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(5)*32 + 16 /* &.xOrig */))))(tls, fd, p) @@ -65631,7 +66603,7 @@ func ts_fstat(tls *crt.TLS, fd int32, p uintptr) int32 { /* test_syscall.c:282:1 // A wrapper around ftruncate(). func ts_ftruncate(tls *crt.TLS, fd int32, n off_t) int32 { /* test_syscall.c:292:12: */ - if tsIsFailErrno(tls, ts+43154 /* "ftruncate" */) != 0 { + if tsIsFailErrno(tls, ts+33810 /* "ftruncate" */) != 0 { return -1 } return (*(*func(*crt.TLS, int32, off_t) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(6)*32 + 16 /* &.xOrig */))))(tls, fd, n) @@ -65645,7 +66617,7 @@ func ts_fcntl(tls *crt.TLS, fd int32, cmd int32, va uintptr) int32 { /* test_sys var ap va_list _ = ap var pArg uintptr - if tsIsFailErrno(tls, ts+43164 /* "fcntl" */) != 0 { + if tsIsFailErrno(tls, ts+33820 /* "fcntl" */) != 0 { return -1 } ap = va @@ -65655,7 +66627,7 @@ func ts_fcntl(tls *crt.TLS, fd int32, cmd int32, va uintptr) int32 { /* test_sys // A wrapper around read(). func ts_read(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t) int32 { /* test_syscall.c:316:12: */ - if tsIsFailErrno(tls, ts+30356 /* "read" */) != 0 { + if tsIsFailErrno(tls, ts+22005 /* "read" */) != 0 { return -1 } return int32((*(*func(*crt.TLS, int32, uintptr, size_t) ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(8)*32 + 16 /* &.xOrig */))))(tls, fd, aBuf, nBuf)) @@ -65663,7 +66635,7 @@ func ts_read(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t) int32 { /* test_ // A wrapper around pread(). func ts_pread(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t, off off_t) int32 { /* test_syscall.c:326:12: */ - if tsIsFailErrno(tls, ts+43170 /* "pread" */) != 0 { + if tsIsFailErrno(tls, ts+33826 /* "pread" */) != 0 { return -1 } return int32((*(*func(*crt.TLS, int32, uintptr, size_t, off_t) ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(9)*32 + 16 /* &.xOrig */))))(tls, fd, aBuf, nBuf, off)) @@ -65671,7 +66643,7 @@ func ts_pread(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t, off off_t) int3 // A wrapper around pread64(). func ts_pread64(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t, off sqlite3_uint64) int32 { /* test_syscall.c:336:12: */ - if tsIsFailErrno(tls, ts+43176 /* "pread64" */) != 0 { + if tsIsFailErrno(tls, ts+33832 /* "pread64" */) != 0 { return -1 } return int32((*(*func(*crt.TLS, int32, uintptr, size_t, sqlite3_uint64) ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(10)*32 + 16 /* &.xOrig */))))(tls, fd, aBuf, nBuf, off)) @@ -65679,8 +66651,8 @@ func ts_pread64(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t, off sqlite3_u // A wrapper around write(). func ts_write(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t) int32 { /* test_syscall.c:346:12: */ - if tsIsFailErrno(tls, ts+30361 /* "write" */) != 0 { - if tsErrno(tls, ts+30361 /* "write" */) == 4 { + if tsIsFailErrno(tls, ts+22010 /* "write" */) != 0 { + if tsErrno(tls, ts+22010 /* "write" */) == 4 { (*(*func(*crt.TLS, int32, uintptr, size_t) ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(11)*32 + 16 /* &.xOrig */))))(tls, fd, aBuf, (nBuf / uint64(2))) } return -1 @@ -65690,7 +66662,7 @@ func ts_write(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t) int32 { /* test // A wrapper around pwrite(). func ts_pwrite(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t, off off_t) int32 { /* test_syscall.c:357:12: */ - if tsIsFailErrno(tls, ts+43184 /* "pwrite" */) != 0 { + if tsIsFailErrno(tls, ts+33840 /* "pwrite" */) != 0 { return -1 } return int32((*(*func(*crt.TLS, int32, uintptr, size_t, off_t) ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(12)*32 + 16 /* &.xOrig */))))(tls, fd, aBuf, nBuf, off)) @@ -65698,7 +66670,7 @@ func ts_pwrite(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t, off off_t) int // A wrapper around pwrite64(). func ts_pwrite64(tls *crt.TLS, fd int32, aBuf uintptr, nBuf size_t, off sqlite3_uint64) int32 { /* test_syscall.c:367:12: */ - if tsIsFailErrno(tls, ts+43191 /* "pwrite64" */) != 0 { + if tsIsFailErrno(tls, ts+33847 /* "pwrite64" */) != 0 { return -1 } return int32((*(*func(*crt.TLS, int32, uintptr, size_t, sqlite3_uint64) ssize_t)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(13)*32 + 16 /* &.xOrig */))))(tls, fd, aBuf, nBuf, off)) @@ -65721,13 +66693,13 @@ func ts_fchmod(tls *crt.TLS, fd int32, mode mode_t) int32 { /* test_syscall.c:37 // failure. Note that errno is not set. func ts_fallocate(tls *crt.TLS, fd int32, off off_t, len off_t) int32 { /* test_syscall.c:393:12: */ if tsIsFail(tls) != 0 { - return tsErrno(tls, ts+43207 /* "fallocate" */) + return tsErrno(tls, ts+33863 /* "fallocate" */) } return (*(*func(*crt.TLS, int32, off_t, off_t) int32)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(15)*32 + 16 /* &.xOrig */))))(tls, fd, off, len) } func ts_mmap(tls *crt.TLS, pAddr uintptr, nByte size_t, prot int32, flags int32, fd int32, iOff off_t) uintptr { /* test_syscall.c:400:13: */ - if tsIsFailErrno(tls, ts+33972 /* "mmap" */) != 0 { + if tsIsFailErrno(tls, ts+25793 /* "mmap" */) != 0 { return crt.UintptrFromInt32(-1) } return (*(*func(*crt.TLS, uintptr, size_t, int32, int32, int32, off_t) uintptr)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + uintptr(16)*32 + 16 /* &.xOrig */))))(tls, pAddr, nByte, prot, flags, fd, iOff) @@ -65740,7 +66712,7 @@ func ts_mremap(tls *crt.TLS, a uintptr, b size_t, c size_t, d int32, va uintptr) var ap va_list _ = ap var pArg uintptr - if tsIsFailErrno(tls, ts+43217 /* "mremap" */) != 0 { + if tsIsFailErrno(tls, ts+33873 /* "mremap" */) != 0 { return crt.UintptrFromInt32(-1) } ap = va @@ -65759,7 +66731,7 @@ func test_syscall_install(tls *crt.TLS, clientData uintptr, interp uintptr, objc // var apElem uintptr at bp+8, 8 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+43224 /* "SYSCALL-LIST" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+33880 /* "SYSCALL-LIST" */) return 1 } if tcl.XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp /* &nElem */, bp+8 /* &apElem */) != 0 { @@ -65771,7 +66743,7 @@ func test_syscall_install(tls *crt.TLS, clientData uintptr, interp uintptr, objc // var iCall int32 at bp+16, 4 var rc int32 = tcl.XTcl_GetIndexFromObjStruct(tls, interp, - *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* apElem */)) + uintptr(i)*8)), uintptr(unsafe.Pointer(&aSyscall)), int32(unsafe.Sizeof(TestSyscallArray{})), ts+43237 /* "system-call" */, 0, bp+16 /* &iCall */) + *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 8 /* apElem */)) + uintptr(i)*8)), uintptr(unsafe.Pointer(&aSyscall)), int32(unsafe.Sizeof(TestSyscallArray{})), ts+33893 /* "system-call" */, 0, bp+16 /* &iCall */) if rc != 0 { return rc } @@ -65790,7 +66762,7 @@ func test_syscall_uninstall(tls *crt.TLS, clientData uintptr, interp uintptr, ob var i int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+488 /* "" */) return 1 } @@ -65813,7 +66785,7 @@ func test_syscall_reset(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rc int32 if (objc != 2) && (objc != 3) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+488 /* "" */) return 1 } @@ -65852,7 +66824,7 @@ func test_syscall_exists(tls *crt.TLS, clientData uintptr, interp uintptr, objc var x sqlite3_syscall_ptr if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+488 /* "" */) return 1 } @@ -65871,7 +66843,7 @@ func test_syscall_fault(tls *crt.TLS, clientData uintptr, interp uintptr, objc i *(*int32)(unsafe.Pointer(bp + 4 /* bPersist */)) = 0 if (objc != 2) && (objc != 4) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+43249 /* "?COUNT PERSIST?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+33905 /* "?COUNT PERSIST?" */) return 1 } @@ -65900,32 +66872,32 @@ func test_syscall_errno(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rc int32 *(*[12]Errno)(unsafe.Pointer(bp + 8 /* aErrno */)) = [12]Errno{ - {Fz: ts + 43265 /* "EACCES" */, Fi: 13}, - {Fz: ts + 43272 /* "EINTR" */, Fi: 4}, - {Fz: ts + 43278 /* "EIO" */, Fi: 5}, - {Fz: ts + 43282 /* "EOVERFLOW" */, Fi: 75}, - {Fz: ts + 43292 /* "ENOMEM" */, Fi: 12}, - {Fz: ts + 43299 /* "EAGAIN" */, Fi: 11}, - {Fz: ts + 43306 /* "ETIMEDOUT" */, Fi: 110}, - {Fz: ts + 43316 /* "EBUSY" */, Fi: 16}, - {Fz: ts + 43322 /* "EPERM" */, Fi: 1}, - {Fz: ts + 43328 /* "EDEADLK" */, Fi: 35}, - {Fz: ts + 43336 /* "ENOLCK" */, Fi: 37}, + {Fz: ts + 33921 /* "EACCES" */, Fi: 13}, + {Fz: ts + 33928 /* "EINTR" */, Fi: 4}, + {Fz: ts + 33934 /* "EIO" */, Fi: 5}, + {Fz: ts + 33938 /* "EOVERFLOW" */, Fi: 75}, + {Fz: ts + 33948 /* "ENOMEM" */, Fi: 12}, + {Fz: ts + 33955 /* "EAGAIN" */, Fi: 11}, + {Fz: ts + 33962 /* "ETIMEDOUT" */, Fi: 110}, + {Fz: ts + 33972 /* "EBUSY" */, Fi: 16}, + {Fz: ts + 33978 /* "EPERM" */, Fi: 1}, + {Fz: ts + 33984 /* "EDEADLK" */, Fi: 35}, + {Fz: ts + 33992 /* "ENOLCK" */, Fi: 37}, {Fz: uintptr(0), Fi: 0}, } if objc != 4 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+43343 /* "SYSCALL ERRNO" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+33999 /* "SYSCALL ERRNO" */) return 1 } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, - *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(unsafe.Pointer(&aSyscall)), int32(unsafe.Sizeof(TestSyscallArray{})), ts+43237 /* "system-call" */, 0, bp /* &iCall */) + *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), uintptr(unsafe.Pointer(&aSyscall)), int32(unsafe.Sizeof(TestSyscallArray{})), ts+33893 /* "system-call" */, 0, bp /* &iCall */) if rc != 0 { return rc } rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, - *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+8 /* &aErrno[0] */, int32(unsafe.Sizeof(Errno{})), ts+43357 /* "errno" */, 0, bp+200 /* &iErrno */) + *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+8 /* &aErrno[0] */, int32(unsafe.Sizeof(Errno{})), ts+34013 /* "errno" */, 0, bp+200 /* &iErrno */) if rc != 0 { return rc } @@ -65946,7 +66918,7 @@ func test_syscall_list(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var pList uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+488 /* "" */) return 1 } @@ -65971,7 +66943,7 @@ func test_syscall_defaultvfs(tls *crt.TLS, clientData uintptr, interp uintptr, o var pVfs uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+792 /* "" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+488 /* "" */) return 1 } @@ -65992,7 +66964,7 @@ func test_syscall_pagesize(tls *crt.TLS, clientData uintptr, interp uintptr, obj // var pgsz int32 at bp+16, 4 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+43363 /* "PGSZ" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+34019 /* "PGSZ" */) return 1 } if tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+16 /* &pgsz */) != 0 { @@ -66001,17 +66973,17 @@ func test_syscall_pagesize(tls *crt.TLS, clientData uintptr, interp uintptr, obj if *(*int32)(unsafe.Pointer(bp + 16 /* pgsz */)) < 0 { if gSyscall.Forig_getpagesize != 0 { - (*(*func(*crt.TLS, uintptr, uintptr, sqlite3_syscall_ptr) int32)(unsafe.Pointer((pVfs + 144 /* &.xSetSystemCall */))))(tls, pVfs, ts+43368 /* "getpagesize" */, gSyscall.Forig_getpagesize) + (*(*func(*crt.TLS, uintptr, uintptr, sqlite3_syscall_ptr) int32)(unsafe.Pointer((pVfs + 144 /* &.xSetSystemCall */))))(tls, pVfs, ts+34024 /* "getpagesize" */, gSyscall.Forig_getpagesize) } } else { if (*(*int32)(unsafe.Pointer(bp + 16 /* pgsz */)) < 512) || ((*(*int32)(unsafe.Pointer(bp + 16 /* pgsz */)) & (*(*int32)(unsafe.Pointer(bp + 16 /* pgsz */)) - 1)) != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+43380 /* "pgsz out of rang..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+34036 /* "pgsz out of rang..." */, 0)) return 1 } - gSyscall.Forig_getpagesize = (*(*func(*crt.TLS, uintptr, uintptr) sqlite3_syscall_ptr)(unsafe.Pointer((pVfs + 152 /* &.xGetSystemCall */))))(tls, pVfs, ts+43368 /* "getpagesize" */) + gSyscall.Forig_getpagesize = (*(*func(*crt.TLS, uintptr, uintptr) sqlite3_syscall_ptr)(unsafe.Pointer((pVfs + 152 /* &.xGetSystemCall */))))(tls, pVfs, ts+34024 /* "getpagesize" */) gSyscall.Fpgsz = *(*int32)(unsafe.Pointer(bp + 16 /* pgsz */)) (*(*func(*crt.TLS, uintptr, uintptr, sqlite3_syscall_ptr) int32)(unsafe.Pointer((pVfs + 144 /* &.xSetSystemCall */))))(tls, - pVfs, ts+43368 /* "getpagesize" */, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS) int32 }{ts_getpagesize}))) + pVfs, ts+34024 /* "getpagesize" */, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS) int32 }{ts_getpagesize}))) } return 0 @@ -66022,31 +66994,31 @@ func test_syscall(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, defer tls.Free(180) *(*[10]SyscallCmd)(unsafe.Pointer(bp + 16 /* aCmd */)) = [10]SyscallCmd{ - {FzName: ts + 43398 /* "fault" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 34054 /* "fault" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_fault}))}, - {FzName: ts + 43404 /* "install" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 34060 /* "install" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_install}))}, - {FzName: ts + 43412 /* "uninstall" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 34068 /* "uninstall" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_uninstall}))}, - {FzName: ts + 7412 /* "reset" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 5916 /* "reset" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_reset}))}, - {FzName: ts + 43357 /* "errno" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 34013 /* "errno" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_errno}))}, - {FzName: ts + 20186 /* "exists" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 11378 /* "exists" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_exists}))}, - {FzName: ts + 43422 /* "list" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 34078 /* "list" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_list}))}, - {FzName: ts + 43427 /* "defaultvfs" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 34083 /* "defaultvfs" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_defaultvfs}))}, - {FzName: ts + 43438 /* "pagesize" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 34094 /* "pagesize" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall_pagesize}))}, {FzName: uintptr(0), FxCmd: uintptr(0)}, @@ -66057,15 +67029,15 @@ func test_syscall(tls *crt.TLS, clientData uintptr, interp uintptr, objc int32, var pVfs uintptr = sqlite3.Xsqlite3_vfs_find(tls, uintptr(0)) if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+37919 /* "SUB-COMMAND ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+29799 /* "SUB-COMMAND ..." */) return 1 } if ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FiVersion < 3) || ((*sqlite3_vfs)(unsafe.Pointer(pVfs)).FxSetSystemCall == uintptr(0)) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+43447 /* "VFS does not sup..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+34103 /* "VFS does not sup..." */, 0)) rc = 1 } else { rc = tcl.XTcl_GetIndexFromObjStruct(tls, interp, - *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+16 /* &aCmd[0] */, int32(unsafe.Sizeof(SyscallCmd{})), ts+2321 /* "sub-command" */, 0, bp+176 /* &iCmd */) + *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+16 /* &aCmd[0] */, int32(unsafe.Sizeof(SyscallCmd{})), ts+1874 /* "sub-command" */, 0, bp+176 /* &iCmd */) } if rc != 0 { return rc @@ -66083,7 +67055,7 @@ func SqlitetestSyscall_Init(tls *crt.TLS, interp uintptr) int32 { /* test_syscal defer tls.Free(16) *(*[1]SyscallCmd)(unsafe.Pointer(bp /* aCmd */)) = [1]SyscallCmd{ - {FzName: ts + 43483 /* "test_syscall" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 34139 /* "test_syscall" */, FxCmd: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_syscall}))}, } @@ -66122,7 +67094,7 @@ func sqlite3TestInit(tls *crt.TLS, interp uintptr) uintptr { /* test_tclsh.c:58: crt.Xsetrlimit(tls, 4, bp /* &x */) } - if tcl.XTcl_GetCommandInfo(tls, interp, ts+20933 /* "sqlite3" */, bp+16 /* &cmdInfo */) == 0 { + if tcl.XTcl_GetCommandInfo(tls, interp, ts+12119 /* "sqlite3" */, bp+16 /* &cmdInfo */) == 0 { Sqlite3_Init(tls, interp) } Md5_Init(tls, interp) @@ -66168,7 +67140,7 @@ func sqlite3TestInit(tls *crt.TLS, interp uintptr) uintptr { /* test_tclsh.c:58: Sqlitetestvdbecov_Init(tls, interp) tcl.XTcl_CreateObjCommand(tls, - interp, ts+43496 /* "load_testfixture..." */, *(*uintptr)(unsafe.Pointer(&struct { + interp, ts+34152 /* "load_testfixture..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{load_testfixture_extensions})), uintptr(0), uintptr(0)) return uintptr(0) @@ -66178,7 +67150,7 @@ func sqlite3TestInit(tls *crt.TLS, interp uintptr) uintptr { /* test_tclsh.c:58: func load_testfixture_extensions(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, objv uintptr) int32 { /* test_tclsh.c:185:26: */ var slave uintptr if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+43524 /* "SLAVE" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+34180 /* "SLAVE" */) return 1 } @@ -66314,7 +67286,7 @@ func tclvarConnect(tls *crt.TLS, db uintptr, pAux uintptr, argc int32, argv uint return 0 } -var zSchema = *(*[100]int8)(unsafe.Pointer(ts + 43530 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ +var zSchema = *(*[100]int8)(unsafe.Pointer(ts + 34186 /* "CREATE TABLE x( ..." */)) /* test_tclvar.c:88:21 */ // Note that for this virtual table, the xCreate and xConnect // methods are identical. @@ -66365,7 +67337,7 @@ func next2(tls *crt.TLS, interp uintptr, pCur uintptr, pObj uintptr) int32 { /* if pObj != 0 { if !(int32((*tclvar_cursor)(unsafe.Pointer(pCur)).FpList2) != 0) { - p = tcl.XTcl_NewStringObj(tls, ts+43630 /* "array names" */, -1) + p = tcl.XTcl_NewStringObj(tls, ts+34286 /* "array names" */, -1) (*Tcl_Obj)(unsafe.Pointer(p)).FrefCount++ tcl.XTcl_ListObjAppendElement(tls, uintptr(0), p, pObj) tcl.XTcl_EvalObjEx(tls, interp, p, 0x020000) @@ -66425,13 +67397,13 @@ func tclvarNext(tls *crt.TLS, cur uintptr) int32 { /* test_tclvar.c:168:12: */ func tclvarFilter(tls *crt.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* test_tclvar.c:188:12: */ var pCur uintptr = pVtabCursor var interp uintptr = (*tclvar_vtab)(unsafe.Pointer((*sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab)).Finterp - var p uintptr = tcl.XTcl_NewStringObj(tls, ts+43642 /* "tclvar_filter_cm..." */, -1) + var p uintptr = tcl.XTcl_NewStringObj(tls, ts+34298 /* "tclvar_filter_cm..." */, -1) - var zEq uintptr = ts + 792 /* "" */ - var zMatch uintptr = ts + 792 /* "" */ - var zGlob uintptr = ts + 792 /* "" */ - var zRegexp uintptr = ts + 792 /* "" */ - var zLike uintptr = ts + 792 /* "" */ + var zEq uintptr = ts + 488 /* "" */ + var zMatch uintptr = ts + 488 /* "" */ + var zGlob uintptr = ts + 488 /* "" */ + var zRegexp uintptr = ts + 488 /* "" */ + var zLike uintptr = ts + 488 /* "" */ var i int32 for i = 0; *(*int8)(unsafe.Pointer(idxStr + uintptr(i))) != 0; i++ { @@ -66503,7 +67475,7 @@ func tclvarColumn(tls *crt.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* te // var p2 uintptr at bp+24, 8 var z1 uintptr - var z2 uintptr = ts + 792 /* "" */ + var z2 uintptr = ts + 488 /* "" */ var pCur uintptr = cur var interp uintptr = (*tclvar_vtab)(unsafe.Pointer((*sqlite3_vtab_cursor)(unsafe.Pointer(cur)).FpVtab)).Finterp @@ -66539,7 +67511,7 @@ func tclvarColumn(tls *crt.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* te { var z3 uintptr if *(*uintptr)(unsafe.Pointer(bp + 24 /* p2 */)) != 0 { - z3 = sqlite3.Xsqlite3_mprintf(tls, ts+43660 /* "%s(%s)" */, crt.VaList(bp, z1, z2)) + z3 = sqlite3.Xsqlite3_mprintf(tls, ts+34316 /* "%s(%s)" */, crt.VaList(bp, z1, z2)) sqlite3.Xsqlite3_result_text(tls, ctx, z3, -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{sqlite3.Xsqlite3_free}))) } else { sqlite3.Xsqlite3_result_text(tls, ctx, z1, -1, crt.UintptrFromInt32(-1)) @@ -66593,7 +67565,7 @@ func tclvarSetOmit(tls *crt.TLS, interp uintptr) int32 { /* test_tclvar.c:324:12 *(*int32)(unsafe.Pointer(bp /* res */)) = 0 var pRes uintptr rc = tcl.XTcl_Eval(tls, interp, - ts+43667 /* "expr {[info exis..." */) + ts+34323 /* "expr {[info exis..." */) if rc == 0 { pRes = tcl.XTcl_GetObjResult(tls, interp) rc = tcl.XTcl_GetBooleanFromObj(tls, uintptr(0), pRes, bp /* &res */) @@ -66690,7 +67662,7 @@ func tclvarUpdate(tls *crt.TLS, tab uintptr, argc int32, argv uintptr, pRowid ui var zValue uintptr = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(4)*8))) var zName uintptr if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(5)*8))) != 3 { - (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+43728 /* "the 'fullname' c..." */, 0) + (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+34384 /* "the 'fullname' c..." */, 0) return 1 } zName = sqlite3.Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(5)*8))) @@ -66716,7 +67688,7 @@ func tclvarUpdate(tls *crt.TLS, tab uintptr, argc int32, argv uintptr, pRowid ui } return 0 } - (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+43763 /* "prohibited TCL v..." */, 0) + (*sqlite3_vtab)(unsafe.Pointer(tab)).FzErrMsg = sqlite3.Xsqlite3_mprintf(tls, ts+34419 /* "prohibited TCL v..." */, 0) return 1 } @@ -66748,39 +67720,39 @@ func register_tclvar_module(tls *crt.TLS, clientData ClientData, interp uintptr, // var db uintptr at bp, 8 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { return 1 } - sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+34782 /* "tclvar" */, uintptr(unsafe.Pointer(&tclvarModule)), interp) + sqlite3.Xsqlite3_create_module(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+26603 /* "tclvar" */, uintptr(unsafe.Pointer(&tclvarModule)), interp) rc = tcl.XTcl_Eval(tls, interp, - ts+43794 /* "proc like {patte..." */) + ts+34450 /* "proc like {patte..." */) return rc } // Register commands with the TCL interpreter. func Sqlitetesttclvar_Init(tls *crt.TLS, interp uintptr) int32 { /* test_tclvar.c:546:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd13)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd12)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData uintptr }{}))); i++ { - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd13[i].FzName, - aObjCmd13[i].FxProc, aObjCmd13[i].FclientData, uintptr(0)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd12[i].FzName, + aObjCmd12[i].FxProc, aObjCmd12[i].FclientData, uintptr(0)) } return 0 } -var aObjCmd13 = [1]struct { +var aObjCmd12 = [1]struct { FzName uintptr FxProc uintptr FclientData uintptr }{ - {FzName: ts + 44330 /* "register_tclvar_..." */, FxProc: 0, FclientData: uintptr(0)}, + {FzName: ts + 34986 /* "register_tclvar_..." */, FxProc: 0, FclientData: uintptr(0)}, } /* test_tclvar.c:552:5 */ // Prior to Issue 6, the Single Unix Specification required these @@ -66875,21 +67847,21 @@ func tclScriptThread(tls *crt.TLS, pSqlThread ClientData) { /* test_thread.c:114 var p uintptr = pSqlThread interp = tcl.XTcl_CreateInterp(tls) - tcl.XTcl_CreateObjCommand(tls, interp, ts+44353 /* "clock_seconds" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+35009 /* "clock_seconds" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{clock_seconds_proc})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+44367 /* "sqlthread" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+35023 /* "sqlthread" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{sqlthread_proc})), pSqlThread, uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+44377 /* "sqlite3_blocking..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+35033 /* "sqlite3_blocking..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{blocking_step_proc})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, - ts+44399 /* "sqlite3_blocking..." */, *(*uintptr)(unsafe.Pointer(&struct { + ts+35055 /* "sqlite3_blocking..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{blocking_prepare_v2_proc})), uintptr(1), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, - ts+44427 /* "sqlite3_nonblock..." */, *(*uintptr)(unsafe.Pointer(&struct { + ts+35083 /* "sqlite3_nonblock..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{blocking_prepare_v2_proc})), uintptr(0), uintptr(0)) Sqlitetest1_Init(tls, interp) @@ -66903,7 +67875,7 @@ func tclScriptThread(tls *crt.TLS, pSqlThread ClientData) { /* test_thread.c:114 (*Tcl_Obj)(unsafe.Pointer(pRes)).FrefCount++ if rc != 0 { - tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewStringObj(tls, ts+16749 /* "error" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewStringObj(tls, ts+35114 /* "error" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pList, pRes) postToParent(tls, p, pList) for ok := true; ok; ok = 0 != 0 { @@ -66915,7 +67887,7 @@ func tclScriptThread(tls *crt.TLS, pSqlThread ClientData) { /* test_thread.c:114 pList = tcl.XTcl_NewObj(tls) } - tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewStringObj(tls, ts+44458 /* "set" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewStringObj(tls, ts+35120 /* "set" */, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pList, tcl.XTcl_NewStringObj(tls, (*SqlThread)(unsafe.Pointer(p)).FzVarname, -1)) tcl.XTcl_ListObjAppendElement(tls, interp, pList, pRes) postToParent(tls, p, pList) @@ -66983,7 +67955,7 @@ func sqlthread_spawn(tls *crt.TLS, clientData ClientData, interp uintptr, objc i rc = tcl.XTcl_CreateThread(tls, bp+24 /* &x */, *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, ClientData) }{tclScriptThread})), pNew, nStack, flags) if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+44462 /* "Error in Tcl_Cre..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+35124 /* "Error in Tcl_Cre..." */, 0)) tcl.XTcl_Free(tls, pNew) return 1 } @@ -67013,7 +67985,7 @@ func sqlthread_parent(tls *crt.TLS, clientData ClientData, interp uintptr, objc _ = objc if p == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+44490 /* "no parent thread" */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+35152 /* "no parent thread" */, 0)) return 1 } @@ -67099,18 +68071,18 @@ func sqlthread_proc(tls *crt.TLS, clientData ClientData, interp uintptr, objc in FnArg int32 FzUsage uintptr }{ - {FzName: ts + 44507 /* "parent" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { + {FzName: ts + 35169 /* "parent" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 - }{sqlthread_parent})), FnArg: 1, FzUsage: ts + 18615 /* "SCRIPT" */}, - {FzName: ts + 44514 /* "spawn" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { + }{sqlthread_parent})), FnArg: 1, FzUsage: ts + 9746 /* "SCRIPT" */}, + {FzName: ts + 35176 /* "spawn" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 - }{sqlthread_spawn})), FnArg: 2, FzUsage: ts + 44520 /* "VARNAME SCRIPT" */}, - {FzName: ts + 43129 /* "open" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { + }{sqlthread_spawn})), FnArg: 2, FzUsage: ts + 35182 /* "VARNAME SCRIPT" */}, + {FzName: ts + 33780 /* "open" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 - }{sqlthread_open})), FnArg: 1, FzUsage: ts + 44535 /* "DBNAME" */}, - {FzName: ts + 44542 /* "id" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { + }{sqlthread_open})), FnArg: 1, FzUsage: ts + 35197 /* "DBNAME" */}, + {FzName: ts + 35204 /* "id" */, FxProc: *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 - }{sqlthread_id})), FnArg: 0, FzUsage: ts + 792 /* "" */}, + }{sqlthread_id})), FnArg: 0, FzUsage: ts + 488 /* "" */}, {FzName: uintptr(0), FxProc: uintptr(0), FnArg: 0}, } var pSub uintptr @@ -67118,7 +68090,7 @@ func sqlthread_proc(tls *crt.TLS, clientData ClientData, interp uintptr, objc in // var iIndex int32 at bp+160, 4 if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+40008 /* "SUB-COMMAND" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+31703 /* "SUB-COMMAND" */) return 1 } @@ -67128,7 +68100,7 @@ func sqlthread_proc(tls *crt.TLS, clientData ClientData, interp uintptr, objc in FxProc uintptr FnArg int32 FzUsage uintptr - }{})), ts+2321 /* "sub-command" */, 0, bp+160 /* &iIndex */) + }{})), ts+1874 /* "sub-command" */, 0, bp+160 /* &iIndex */) if rc != 0 { return rc } @@ -67299,7 +68271,7 @@ func blocking_step_proc(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+23218 /* "STMT" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+14574 /* "STMT" */) return 1 } @@ -67329,8 +68301,8 @@ func blocking_prepare_v2_proc(tls *crt.TLS, clientData uintptr, interp uintptr, var isBlocking int32 = crt.BoolInt32(!(clientData == uintptr(0))) if (objc != 5) && (objc != 4) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+21615, /* "wrong # args: sh..." */ - tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+23264 /* " DB sql bytes ta..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+12801, /* "wrong # args: sh..." */ + tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(0)*8))), ts+14620 /* " DB sql bytes ta..." */, 0)) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp+80 /* &db */) != 0 { @@ -67355,7 +68327,7 @@ func blocking_prepare_v2_proc(tls *crt.TLS, clientData uintptr, interp uintptr, } if rc != 0 { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+112 /* &zBuf[0] */, ts+44545 /* "%s " */, crt.VaList(bp+32, sqlite3.Xsqlite3ErrName(tls, rc))) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+112 /* &zBuf[0] */, ts+35207 /* "%s " */, crt.VaList(bp+32, sqlite3.Xsqlite3ErrName(tls, rc))) tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+40, bp+112 /* &zBuf[0] */, sqlite3.Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* db */))), 0)) return 1 } @@ -67375,21 +68347,21 @@ func blocking_prepare_v2_proc(tls *crt.TLS, clientData uintptr, interp uintptr, // Register commands with the TCL interpreter. func SqlitetestThread_Init(tls *crt.TLS, interp uintptr) int32 { /* test_thread.c:619:5: */ - tcl.XTcl_CreateObjCommand(tls, interp, ts+44367 /* "sqlthread" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+35023 /* "sqlthread" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{sqlthread_proc})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+44353 /* "clock_seconds" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+35009 /* "clock_seconds" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{clock_seconds_proc})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+44377 /* "sqlite3_blocking..." */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+35033 /* "sqlite3_blocking..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{blocking_step_proc})), uintptr(0), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, - ts+44399 /* "sqlite3_blocking..." */, *(*uintptr)(unsafe.Pointer(&struct { + ts+35055 /* "sqlite3_blocking..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{blocking_prepare_v2_proc})), uintptr(1), uintptr(0)) tcl.XTcl_CreateObjCommand(tls, interp, - ts+44427 /* "sqlite3_nonblock..." */, *(*uintptr)(unsafe.Pointer(&struct { + ts+35083 /* "sqlite3_nonblock..." */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{blocking_prepare_v2_proc})), uintptr(0), uintptr(0)) return 0 @@ -67462,8 +68434,8 @@ type TestvfsFd1 = struct { FpReal uintptr FpShmId uintptr FpShm uintptr - Fexcllock u32 - Fsharedlock u32 + Fexcllock u321 + Fsharedlock u321 FpNext uintptr } @@ -67502,15 +68474,15 @@ func tvfsResultCode(tls *crt.TLS, p uintptr, pRc uintptr) int32 { /* test_vfs.c: defer tls.Free(144) *(*[9]errcode)(unsafe.Pointer(bp /* aCode */)) = [9]errcode{ - {FeCode: 0, FzCode: ts + 18111 /* "SQLITE_OK" */}, - {FeCode: 1, FzCode: ts + 44549 /* "SQLITE_ERROR" */}, - {FeCode: 10, FzCode: ts + 44562 /* "SQLITE_IOERR" */}, - {FeCode: 6, FzCode: ts + 44575 /* "SQLITE_LOCKED" */}, - {FeCode: 5, FzCode: ts + 44589 /* "SQLITE_BUSY" */}, - {FeCode: 8, FzCode: ts + 44601 /* "SQLITE_READONLY" */}, - {FeCode: (8 | (int32(5) << 8)), FzCode: ts + 44617 /* "SQLITE_READONLY_..." */}, - {FeCode: 12, FzCode: ts + 44642 /* "SQLITE_NOTFOUND" */}, - {FeCode: -1, FzCode: ts + 44658 /* "SQLITE_OMIT" */}, + {FeCode: 0, FzCode: ts + 9424 /* "SQLITE_OK" */}, + {FeCode: 1, FzCode: ts + 35211 /* "SQLITE_ERROR" */}, + {FeCode: 10, FzCode: ts + 35224 /* "SQLITE_IOERR" */}, + {FeCode: 6, FzCode: ts + 35237 /* "SQLITE_LOCKED" */}, + {FeCode: 5, FzCode: ts + 35251 /* "SQLITE_BUSY" */}, + {FeCode: 8, FzCode: ts + 35263 /* "SQLITE_READONLY" */}, + {FeCode: (8 | (int32(5) << 8)), FzCode: ts + 35279 /* "SQLITE_READONLY_..." */}, + {FeCode: 12, FzCode: ts + 35304 /* "SQLITE_NOTFOUND" */}, + {FeCode: -1, FzCode: ts + 35320 /* "SQLITE_OMIT" */}, } var z uintptr var i int32 @@ -67588,7 +68560,7 @@ func tvfsClose(tls *crt.TLS, pFile uintptr) int32 { /* test_vfs.c:317:12: */ var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00000800) != 0) { - tvfsExecTcl(tls, p, ts+40772, /* "xClose" */ + tvfsExecTcl(tls, p, ts+32338, /* "xClose" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) } @@ -67619,7 +68591,7 @@ func tvfsRead(tls *crt.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqlit var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00010000) != 0) { - tvfsExecTcl(tls, p, ts+40779, /* "xRead" */ + tvfsExecTcl(tls, p, ts+32345, /* "xRead" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } @@ -67642,7 +68614,7 @@ func tvfsWrite(tls *crt.TLS, pFile uintptr, zBuf uintptr, iAmt int32, iOfst sqli var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00001000) != 0) { - tvfsExecTcl(tls, p, ts+40785, /* "xWrite" */ + tvfsExecTcl(tls, p, ts+32351, /* "xWrite" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, tcl.XTcl_NewWideIntObj(tls, int64(iOfst)), tcl.XTcl_NewIntObj(tls, iAmt)) tvfsResultCode(tls, p, bp /* &rc */) @@ -67674,7 +68646,7 @@ func tvfsTruncate(tls *crt.TLS, pFile uintptr, size sqlite_int64) int32 { /* tes var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00002000) != 0) { - tvfsExecTcl(tls, p, ts+40792, /* "xTruncate" */ + tvfsExecTcl(tls, p, ts+32358, /* "xTruncate" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } @@ -67699,25 +68671,25 @@ func tvfsSync(tls *crt.TLS, pFile uintptr, flags int32) int32 { /* test_vfs.c:42 switch flags { case 0x00002: - zFlags = ts + 22956 /* "normal" */ + zFlags = ts + 14189 /* "normal" */ break fallthrough case 0x00003: - zFlags = ts + 24515 /* "full" */ + zFlags = ts + 15892 /* "full" */ break fallthrough case (0x00002 | 0x00010): - zFlags = ts + 44670 /* "normal|dataonly" */ + zFlags = ts + 35332 /* "normal|dataonly" */ break fallthrough case (0x00003 | 0x00010): - zFlags = ts + 44686 /* "full|dataonly" */ + zFlags = ts + 35348 /* "full|dataonly" */ break fallthrough default: } - tvfsExecTcl(tls, p, ts+32914, /* "xSync" */ + tvfsExecTcl(tls, p, ts+24735, /* "xSync" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, tcl.XTcl_NewStringObj(tls, zFlags, -1), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) @@ -67750,8 +68722,8 @@ func tvfsLock(tls *crt.TLS, pFile uintptr, eLock int32) int32 { /* test_vfs.c:47 if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00040000) != 0) { // var zLock [30]int8 at bp+8, 30 - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zLock[0] */, ts+1647 /* "%d" */, crt.VaList(bp, eLock)) - tvfsExecTcl(tls, p, ts+40812 /* "xLock" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zLock[0] */, ts+1237 /* "%d" */, crt.VaList(bp, eLock)) + tvfsExecTcl(tls, p, ts+32378 /* "xLock" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), tcl.XTcl_NewStringObj(tls, bp+8 /* &zLock[0] */, -1), uintptr(0), uintptr(0)) } return sqlite3.Xsqlite3OsLock(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, eLock) @@ -67767,8 +68739,8 @@ func tvfsUnlock(tls *crt.TLS, pFile uintptr, eLock int32) int32 { /* test_vfs.c: if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00020000) != 0) { // var zLock [30]int8 at bp+8, 30 - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zLock[0] */, ts+1647 /* "%d" */, crt.VaList(bp, eLock)) - tvfsExecTcl(tls, p, ts+40818 /* "xUnlock" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([30]int8{})), bp+8 /* &zLock[0] */, ts+1237 /* "%d" */, crt.VaList(bp, eLock)) + tvfsExecTcl(tls, p, ts+32384 /* "xUnlock" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), tcl.XTcl_NewStringObj(tls, bp+8 /* &zLock[0] */, -1), uintptr(0), uintptr(0)) } if (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00001000) != 0) && (tvfsInjectIoerr(tls, p) != 0) { @@ -67782,7 +68754,7 @@ func tvfsCheckReservedLock(tls *crt.TLS, pFile uintptr, pResOut uintptr) int32 { var pFd uintptr = (*TestvfsFile)(unsafe.Pointer(pFile)).FpFd var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00080000) != 0) { - tvfsExecTcl(tls, p, ts+44700 /* "xCheckReservedLo..." */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), + tvfsExecTcl(tls, p, ts+35362 /* "xCheckReservedLo..." */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), uintptr(0), uintptr(0), uintptr(0)) } return sqlite3.Xsqlite3OsCheckReservedLock(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FpReal, pResOut) @@ -67797,7 +68769,7 @@ func tvfsFileControl(tls *crt.TLS, pFile uintptr, op int32, pArg uintptr) int32 var p uintptr = (*sqlite3_vfs)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpVfs)).FpAppData if op == 14 { var argv uintptr = pArg - if sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+16749 /* "error" */) == 0 { + if sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+35114 /* "error" */) == 0 { var rc int32 = 1 if *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)) != 0 { var z uintptr = *(*uintptr)(unsafe.Pointer(argv + uintptr(2)*8)) @@ -67812,21 +68784,21 @@ func tvfsFileControl(tls *crt.TLS, pFile uintptr, op int32, pArg uintptr) int32 } } if *(*int8)(unsafe.Pointer(z + uintptr(0))) != 0 { - *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp, z)) + *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp, z)) } } return rc } - if sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+4311 /* "filename" */) == 0 { - *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)) = sqlite3.Xsqlite3_mprintf(tls, ts+130 /* "%s" */, crt.VaList(bp+8, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename)) + if sqlite3.Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(1)*8)), ts+3336 /* "filename" */) == 0 { + *(*uintptr)(unsafe.Pointer(argv + uintptr(0)*8)) = sqlite3.Xsqlite3_mprintf(tls, ts /* "%s" */, crt.VaList(bp+8, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename)) return 0 } } if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00100000) != 0) { *(*[3]Fcntl)(unsafe.Pointer(bp + 16 /* aF */)) = [3]Fcntl{ - {FiFnctl: 31, FzFnctl: ts + 44719 /* "BEGIN_ATOMIC_WRI..." */}, - {FiFnctl: 32, FzFnctl: ts + 44738 /* "COMMIT_ATOMIC_WR..." */}, - {FiFnctl: 25, FzFnctl: ts + 44758 /* "ZIPVFS" */}, + {FiFnctl: 31, FzFnctl: ts + 35381 /* "BEGIN_ATOMIC_WRI..." */}, + {FiFnctl: 32, FzFnctl: ts + 35400 /* "COMMIT_ATOMIC_WR..." */}, + {FiFnctl: 25, FzFnctl: ts + 35420 /* "ZIPVFS" */}, } var i int32 for i = 0; uint64(i) < (uint64(unsafe.Sizeof([3]Fcntl{})) / uint64(unsafe.Sizeof(Fcntl{}))); i++ { @@ -67836,7 +68808,7 @@ func tvfsFileControl(tls *crt.TLS, pFile uintptr, op int32, pArg uintptr) int32 } if uint64(i) < (uint64(unsafe.Sizeof([3]Fcntl{})) / uint64(unsafe.Sizeof(Fcntl{}))) { *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = 0 - tvfsExecTcl(tls, p, ts+40840, /* "xFileControl" */ + tvfsExecTcl(tls, p, ts+32406, /* "xFileControl" */ tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), tcl.XTcl_NewStringObj(tls, (*Fcntl)(unsafe.Pointer(bp+16 /* &aF */ +uintptr(i)*16)).FzFnctl, -1), uintptr(0), uintptr(0)) @@ -67922,7 +68894,7 @@ func tvfsOpen(tls *crt.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags in z += (uintptr(crt.Xstrlen(tls, z) + uint64(1))) } } - tvfsExecTcl(tls, p, ts+32479 /* "xOpen" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), pArg, uintptr(0), uintptr(0)) + tvfsExecTcl(tls, p, ts+24300 /* "xOpen" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), pArg, uintptr(0), uintptr(0)) for ok := true; ok; ok = 0 != 0 { var _objPtr uintptr = pArg if crt.PostDecInt32(&(*Tcl_Obj)(unsafe.Pointer((_objPtr))).FrefCount, 1) <= 1 { @@ -67949,7 +68921,7 @@ func tvfsOpen(tls *crt.TLS, pVfs uintptr, zName uintptr, pFile uintptr, flags in } if !(pId != 0) { - pId = tcl.XTcl_NewStringObj(tls, ts+44765 /* "anon" */, -1) + pId = tcl.XTcl_NewStringObj(tls, ts+35427 /* "anon" */, -1) } (*Tcl_Obj)(unsafe.Pointer(pId)).FrefCount++ (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId = pId @@ -67995,7 +68967,7 @@ func tvfsDelete(tls *crt.TLS, pVfs uintptr, zPath uintptr, dirSync int32) int32 var p uintptr = (*sqlite3_vfs)(unsafe.Pointer(pVfs)).FpAppData if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00000400) != 0) { - tvfsExecTcl(tls, p, ts+40877, /* "xDelete" */ + tvfsExecTcl(tls, p, ts+32443, /* "xDelete" */ tcl.XTcl_NewStringObj(tls, zPath, -1), tcl.XTcl_NewIntObj(tls, dirSync), uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } @@ -68017,15 +68989,15 @@ func tvfsAccess(tls *crt.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOut var zArg uintptr = uintptr(0) if flags == 0 { - zArg = ts + 44770 /* "SQLITE_ACCESS_EX..." */ + zArg = ts + 35432 /* "SQLITE_ACCESS_EX..." */ } if flags == 1 { - zArg = ts + 44791 /* "SQLITE_ACCESS_RE..." */ + zArg = ts + 35453 /* "SQLITE_ACCESS_RE..." */ } if flags == 2 { - zArg = ts + 44815 /* "SQLITE_ACCESS_RE..." */ + zArg = ts + 35477 /* "SQLITE_ACCESS_RE..." */ } - tvfsExecTcl(tls, p, ts+40885, /* "xAccess" */ + tvfsExecTcl(tls, p, ts+32451, /* "xAccess" */ tcl.XTcl_NewStringObj(tls, zPath, -1), tcl.XTcl_NewStringObj(tls, zArg, -1), uintptr(0), uintptr(0)) if tvfsResultCode(tls, p, bp /* &rc */) != 0 { if *(*int32)(unsafe.Pointer(bp /* rc */)) != 0 { @@ -68052,7 +69024,7 @@ func tvfsFullPathname(tls *crt.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOu if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00008000) != 0) { // var rc int32 at bp, 4 - tvfsExecTcl(tls, p, ts+40893 /* "xFullPathname" */, tcl.XTcl_NewStringObj(tls, zPath, -1), uintptr(0), uintptr(0), uintptr(0)) + tvfsExecTcl(tls, p, ts+32459 /* "xFullPathname" */, tcl.XTcl_NewStringObj(tls, zPath, -1), uintptr(0), uintptr(0), uintptr(0)) if tvfsResultCode(tls, p, bp /* &rc */) != 0 { if *(*int32)(unsafe.Pointer(bp /* rc */)) != 0 { return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -68096,7 +69068,7 @@ func tvfsShmOpen(tls *crt.TLS, pFile uintptr) int32 { /* test_vfs.c:827:12: */ // SCRIPT xShmOpen FILENAME tcl.XTcl_ResetResult(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp) if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00000001) != 0) { - tvfsExecTcl(tls, p, ts+44834 /* "xShmOpen" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), uintptr(0), uintptr(0), uintptr(0)) + tvfsExecTcl(tls, p, ts+35496 /* "xShmOpen" */, tcl.XTcl_NewStringObj(tls, (*TestvfsFd)(unsafe.Pointer(pFd)).FzFilename, -1), uintptr(0), uintptr(0), uintptr(0)) if tvfsResultCode(tls, p, bp /* &rc */) != 0 { if *(*int32)(unsafe.Pointer(bp /* rc */)) != 0 { return *(*int32)(unsafe.Pointer(bp /* rc */)) @@ -68166,7 +69138,7 @@ func tvfsShmMap(tls *crt.TLS, pFile uintptr, iPage int32, pgsz int32, isWrite in tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pArg, tcl.XTcl_NewIntObj(tls, iPage)) tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pArg, tcl.XTcl_NewIntObj(tls, pgsz)) tcl.XTcl_ListObjAppendElement(tls, (*Testvfs)(unsafe.Pointer(p)).Finterp, pArg, tcl.XTcl_NewIntObj(tls, isWrite)) - tvfsExecTcl(tls, p, ts+40970, /* "xShmMap" */ + tvfsExecTcl(tls, p, ts+32536, /* "xShmMap" */ tcl.XTcl_NewStringObj(tls, (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FzFile, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, pArg, uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) for ok := true; ok; ok = 0 != 0 { @@ -68205,20 +69177,20 @@ func tvfsShmLock(tls *crt.TLS, pFile uintptr, ofst int32, n int32, flags int32) } if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00000010) != 0) { - sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([80]int8{})), bp+16 /* &zLock[0] */, ts+24063 /* "%d %d" */, crt.VaList(bp, ofst, n)) + sqlite3.Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([80]int8{})), bp+16 /* &zLock[0] */, ts+15440 /* "%d %d" */, crt.VaList(bp, ofst, n)) nLock = int32(crt.Xstrlen(tls, bp+16 /* &zLock[0] */)) if (flags & 2) != 0 { - crt.Xstrcpy(tls, (bp + 16 /* &zLock */ + uintptr(nLock)), ts+44843 /* " lock" */) + crt.Xstrcpy(tls, (bp + 16 /* &zLock */ + uintptr(nLock)), ts+35505 /* " lock" */) } else { - crt.Xstrcpy(tls, (bp + 16 /* &zLock */ + uintptr(nLock)), ts+44849 /* " unlock" */) + crt.Xstrcpy(tls, (bp + 16 /* &zLock */ + uintptr(nLock)), ts+35511 /* " unlock" */) } nLock = nLock + (int32(crt.Xstrlen(tls, (bp + 16 /* &zLock */ + uintptr(nLock))))) if (flags & 4) != 0 { - crt.Xstrcpy(tls, (bp + 16 /* &zLock */ + uintptr(nLock)), ts+44857 /* " shared" */) + crt.Xstrcpy(tls, (bp + 16 /* &zLock */ + uintptr(nLock)), ts+35519 /* " shared" */) } else { - crt.Xstrcpy(tls, (bp + 16 /* &zLock */ + uintptr(nLock)), ts+44865 /* " exclusive" */) + crt.Xstrcpy(tls, (bp + 16 /* &zLock */ + uintptr(nLock)), ts+35527 /* " exclusive" */) } - tvfsExecTcl(tls, p, ts+40949, /* "xShmLock" */ + tvfsExecTcl(tls, p, ts+32515, /* "xShmLock" */ tcl.XTcl_NewStringObj(tls, (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FzFile, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, tcl.XTcl_NewStringObj(tls, bp+16 /* &zLock[0] */, -1), uintptr(0)) tvfsResultCode(tls, p, bp+96 /* &rc */) @@ -68231,7 +69203,7 @@ func tvfsShmLock(tls *crt.TLS, pFile uintptr, ofst int32, n int32, flags int32) if *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) == 0 { var isLock int32 = (flags & 2) var isExcl int32 = (flags & 8) - var mask u32 = (u32(((int32(1) << n) - 1) << ofst)) + var mask u321 = (u321(((int32(1) << n) - 1) << ofst)) if isLock != 0 { var p2 uintptr for p2 = (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FpFile; p2 != 0; p2 = (*TestvfsFd)(unsafe.Pointer(p2)).FpNext { @@ -68245,18 +69217,18 @@ func tvfsShmLock(tls *crt.TLS, pFile uintptr, ofst int32, n int32, flags int32) } if *(*int32)(unsafe.Pointer(bp + 96 /* rc */)) == 0 { if isExcl != 0 { - *(*u32)(unsafe.Pointer(pFd + 40 /* &.excllock */)) |= (mask) + *(*u321)(unsafe.Pointer(pFd + 40 /* &.excllock */)) |= (mask) } if !(isExcl != 0) { - *(*u32)(unsafe.Pointer(pFd + 44 /* &.sharedlock */)) |= (mask) + *(*u321)(unsafe.Pointer(pFd + 44 /* &.sharedlock */)) |= (mask) } } } else { if isExcl != 0 { - *(*u32)(unsafe.Pointer(pFd + 40 /* &.excllock */)) &= (^mask) + *(*u321)(unsafe.Pointer(pFd + 40 /* &.excllock */)) &= (^mask) } if !(isExcl != 0) { - *(*u32)(unsafe.Pointer(pFd + 44 /* &.sharedlock */)) &= (^mask) + *(*u321)(unsafe.Pointer(pFd + 44 /* &.sharedlock */)) &= (^mask) } } } @@ -68273,9 +69245,9 @@ func tvfsShmBarrier(tls *crt.TLS, pFile uintptr) { /* test_vfs.c:1002:13: */ if (*TestvfsFd)(unsafe.Pointer(pFd)).FpShm != 0 { z = (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FzFile } else { - z = ts + 792 /* "" */ + z = ts + 488 /* "" */ } - tvfsExecTcl(tls, p, ts+40958 /* "xShmBarrier" */, tcl.XTcl_NewStringObj(tls, z, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) + tvfsExecTcl(tls, p, ts+32524 /* "xShmBarrier" */, tcl.XTcl_NewStringObj(tls, z, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) } if (*Testvfs)(unsafe.Pointer(p)).FisFullshm != 0 { @@ -68303,7 +69275,7 @@ func tvfsShmUnmap(tls *crt.TLS, pFile uintptr, deleteFlag int32) int32 { /* test } if ((*Testvfs)(unsafe.Pointer(p)).FpScript != 0) && (((*Testvfs)(unsafe.Pointer(p)).Fmask & 0x00000080) != 0) { - tvfsExecTcl(tls, p, ts+40939, /* "xShmUnmap" */ + tvfsExecTcl(tls, p, ts+32505, /* "xShmUnmap" */ tcl.XTcl_NewStringObj(tls, (*TestvfsBuffer)(unsafe.Pointer((*TestvfsFd)(unsafe.Pointer(pFd)).FpShm)).FzFile, -1), (*TestvfsFd)(unsafe.Pointer(pFd)).FpShmId, uintptr(0), uintptr(0)) tvfsResultCode(tls, p, bp /* &rc */) } @@ -68358,25 +69330,25 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob CMD_CANTOPENERR = 8 ) *(*[10]TestvfsSubcmd)(unsafe.Pointer(bp + 96 /* aSubcmd */)) = [10]TestvfsSubcmd{ - {FzName: ts + 44876 /* "shm" */, FeCmd: CMD_SHM}, - {FzName: ts + 44880 /* "delete" */, FeCmd: CMD_DELETE}, - {FzName: ts + 44887 /* "filter" */, FeCmd: CMD_FILTER}, - {FzName: ts + 44894 /* "ioerr" */, FeCmd: CMD_IOERR}, - {FzName: ts + 44900 /* "fullerr" */, FeCmd: CMD_FULLERR}, - {FzName: ts + 44908 /* "cantopenerr" */, FeCmd: CMD_CANTOPENERR}, - {FzName: ts + 44920 /* "script" */, FeCmd: CMD_SCRIPT}, - {FzName: ts + 44927 /* "devchar" */, FeCmd: CMD_DEVCHAR}, - {FzName: ts + 44935 /* "sectorsize" */, FeCmd: CMD_SECTORSIZE}, + {FzName: ts + 35538 /* "shm" */, FeCmd: CMD_SHM}, + {FzName: ts + 35542 /* "delete" */, FeCmd: CMD_DELETE}, + {FzName: ts + 35549 /* "filter" */, FeCmd: CMD_FILTER}, + {FzName: ts + 35556 /* "ioerr" */, FeCmd: CMD_IOERR}, + {FzName: ts + 35562 /* "fullerr" */, FeCmd: CMD_FULLERR}, + {FzName: ts + 35570 /* "cantopenerr" */, FeCmd: CMD_CANTOPENERR}, + {FzName: ts + 35582 /* "script" */, FeCmd: CMD_SCRIPT}, + {FzName: ts + 35589 /* "devchar" */, FeCmd: CMD_DEVCHAR}, + {FzName: ts + 35597 /* "sectorsize" */, FeCmd: CMD_SECTORSIZE}, {FzName: uintptr(0), FeCmd: uint32(0)}, } // var i int32 at bp+256, 4 if objc < 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2306 /* "SUBCOMMAND ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1859 /* "SUBCOMMAND ..." */) return 1 } if tcl.XTcl_GetIndexFromObjStruct(tls, - interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+96 /* &aSubcmd[0] */, int32(unsafe.Sizeof(TestvfsSubcmd{})), ts+44946 /* "subcommand" */, 0, bp+256 /* &i */) != 0 { + interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8)), bp+96 /* &aSubcmd[0] */, int32(unsafe.Sizeof(TestvfsSubcmd{})), ts+35608 /* "subcommand" */, 0, bp+256 /* &i */) != 0 { return 1 } tcl.XTcl_ResetResult(tls, interp) @@ -68389,7 +69361,7 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob var pBuffer uintptr var zName uintptr if (objc != 3) && (objc != 4) { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+44957 /* "FILE ?VALUE?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+35619 /* "FILE ?VALUE?" */) return 1 } zName = tcl.XTcl_Alloc(tls, uint32((*sqlite3_vfs)(unsafe.Pointer((*Testvfs)(unsafe.Pointer(p)).FpParent)).FmxPathname)) @@ -68397,7 +69369,7 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob (*Testvfs)(unsafe.Pointer(p)).FpParent, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), (*sqlite3_vfs)(unsafe.Pointer((*Testvfs)(unsafe.Pointer(p)).FpParent)).FmxPathname, zName) if rc != 0 { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+44970, /* "failed to get fu..." */ + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+35632, /* "failed to get fu..." */ tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), 0)) tcl.XTcl_Free(tls, zName) return 1 @@ -68409,7 +69381,7 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob } tcl.XTcl_Free(tls, zName) if !(pBuffer != 0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+44996 /* "no such file: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+24, ts+35658 /* "no such file: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), 0)) return 1 } if objc == 4 { @@ -68451,7 +69423,7 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob *(*int32)(unsafe.Pointer(bp + 264 /* nElem */)) = 0 var mask int32 = 0 if objc != 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+37356 /* "LIST" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+29236 /* "LIST" */) return 1 } if tcl.XTcl_ListObjGetElements(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8)), bp+264 /* &nElem */, bp+272 /* &apElem */) != 0 { @@ -68468,7 +69440,7 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob } } if iMethod == (int32(uint64(unsafe.Sizeof(vfsmethod)) / uint64(unsafe.Sizeof(VfsMethod{})))) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+45011 /* "unknown method: " */, zElem, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+48, ts+35673 /* "unknown method: " */, zElem, 0)) return 1 } } @@ -68500,7 +69472,7 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob (*Tcl_Obj)(unsafe.Pointer((*Testvfs)(unsafe.Pointer(p)).FpScript)).FrefCount++ } } else if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+19915 /* "?SCRIPT?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+11110 /* "?SCRIPT?" */) return 1 } @@ -68558,7 +69530,7 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob }() (*TestFaultInject)(unsafe.Pointer(pTest)).FiCnt = *(*int32)(unsafe.Pointer(bp + 284 /* iCnt */)) } else if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+45028 /* "?CNT PERSIST?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+35690 /* "?CNT PERSIST?" */) return 1 } tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, iRet)) @@ -68574,28 +69546,28 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob case CMD_DEVCHAR: { *(*[16]DeviceFlag)(unsafe.Pointer(bp + 304 /* aFlag */)) = [16]DeviceFlag{ - {FzName: ts + 45042 /* "default" */, FiValue: -1}, - {FzName: ts + 31633 /* "atomic" */, FiValue: 0x00000001}, - {FzName: ts + 31640 /* "atomic512" */, FiValue: 0x00000002}, - {FzName: ts + 31650 /* "atomic1k" */, FiValue: 0x00000004}, - {FzName: ts + 31659 /* "atomic2k" */, FiValue: 0x00000008}, - {FzName: ts + 31668 /* "atomic4k" */, FiValue: 0x00000010}, - {FzName: ts + 31677 /* "atomic8k" */, FiValue: 0x00000020}, - {FzName: ts + 31686 /* "atomic16k" */, FiValue: 0x00000040}, - {FzName: ts + 31696 /* "atomic32k" */, FiValue: 0x00000080}, - {FzName: ts + 31706 /* "atomic64k" */, FiValue: 0x00000100}, - {FzName: ts + 31716 /* "sequential" */, FiValue: 0x00000400}, - {FzName: ts + 31727 /* "safe_append" */, FiValue: 0x00000200}, - {FzName: ts + 45050 /* "undeletable_when..." */, FiValue: 0x00000800}, - {FzName: ts + 31739 /* "powersafe_overwr..." */, FiValue: 0x00001000}, - {FzName: ts + 45072 /* "immutable" */, FiValue: 0x00002000}, + {FzName: ts + 35704 /* "default" */, FiValue: -1}, + {FzName: ts + 23282 /* "atomic" */, FiValue: 0x00000001}, + {FzName: ts + 23289 /* "atomic512" */, FiValue: 0x00000002}, + {FzName: ts + 23299 /* "atomic1k" */, FiValue: 0x00000004}, + {FzName: ts + 23308 /* "atomic2k" */, FiValue: 0x00000008}, + {FzName: ts + 23317 /* "atomic4k" */, FiValue: 0x00000010}, + {FzName: ts + 23326 /* "atomic8k" */, FiValue: 0x00000020}, + {FzName: ts + 23335 /* "atomic16k" */, FiValue: 0x00000040}, + {FzName: ts + 23345 /* "atomic32k" */, FiValue: 0x00000080}, + {FzName: ts + 23355 /* "atomic64k" */, FiValue: 0x00000100}, + {FzName: ts + 23365 /* "sequential" */, FiValue: 0x00000400}, + {FzName: ts + 23376 /* "safe_append" */, FiValue: 0x00000200}, + {FzName: ts + 35712 /* "undeletable_when..." */, FiValue: 0x00000800}, + {FzName: ts + 23388 /* "powersafe_overwr..." */, FiValue: 0x00001000}, + {FzName: ts + 35734 /* "immutable" */, FiValue: 0x00002000}, {FzName: uintptr(0), FiValue: 0}, } var pRet uintptr var iFlag int32 if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+45082 /* "?ATTR-LIST?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+35744 /* "?ATTR-LIST?" */) return 1 } if objc == 3 { @@ -68611,11 +69583,11 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob for j = 0; j < *(*int32)(unsafe.Pointer(bp + 292 /* nFlags */)); j++ { *(*int32)(unsafe.Pointer(bp + 560 /* idx */)) = 0 if tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 296 /* flags */)) + uintptr(j)*8)), bp+304, /* &aFlag[0] */ - int32(unsafe.Sizeof(DeviceFlag{})), ts+23786 /* "flag" */, 0, bp+560 /* &idx */) != 0 { + int32(unsafe.Sizeof(DeviceFlag{})), ts+15142 /* "flag" */, 0, bp+560 /* &idx */) != 0 { return 1 } if ((*DeviceFlag)(unsafe.Pointer(bp+304 /* &aFlag */ +uintptr(*(*int32)(unsafe.Pointer(bp + 560 /* idx */)))*16)).FiValue < 0) && (*(*int32)(unsafe.Pointer(bp + 292 /* nFlags */)) > 1) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+72, ts+45094 /* "bad flags: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp+72, ts+35756 /* "bad flags: " */, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))), 0)) return 1 } iNew = iNew | ((*DeviceFlag)(unsafe.Pointer(bp + 304 /* &aFlag */ + uintptr(*(*int32)(unsafe.Pointer(bp + 560 /* idx */)))*16)).FiValue) @@ -68639,7 +69611,7 @@ func testvfs_obj_cmd(tls *crt.TLS, cd ClientData, interp uintptr, objc int32, ob case CMD_SECTORSIZE: { if objc > 3 { - tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+45106 /* "?VALUE?" */) + tcl.XTcl_WrongNumArgs(tls, interp, 2, objv, ts+35768 /* "?VALUE?" */) return 1 } if objc == 3 { @@ -68670,24 +69642,24 @@ type VfsMethod = struct { } var vfsmethod = [18]VfsMethod{ - {FzName: ts + 44834 /* "xShmOpen" */, Fmask: 0x00000001}, - {FzName: ts + 40949 /* "xShmLock" */, Fmask: 0x00000010}, - {FzName: ts + 40958 /* "xShmBarrier" */, Fmask: 0x00000040}, - {FzName: ts + 40939 /* "xShmUnmap" */, Fmask: 0x00000080}, - {FzName: ts + 40970 /* "xShmMap" */, Fmask: 0x00000020}, - {FzName: ts + 32914 /* "xSync" */, Fmask: 0x00000200}, - {FzName: ts + 40877 /* "xDelete" */, Fmask: 0x00000400}, - {FzName: ts + 40785 /* "xWrite" */, Fmask: 0x00001000}, - {FzName: ts + 40779 /* "xRead" */, Fmask: 0x00010000}, - {FzName: ts + 40792 /* "xTruncate" */, Fmask: 0x00002000}, - {FzName: ts + 32479 /* "xOpen" */, Fmask: 0x00000100}, - {FzName: ts + 40772 /* "xClose" */, Fmask: 0x00000800}, - {FzName: ts + 40885 /* "xAccess" */, Fmask: 0x00004000}, - {FzName: ts + 40893 /* "xFullPathname" */, Fmask: 0x00008000}, - {FzName: ts + 40818 /* "xUnlock" */, Fmask: 0x00020000}, - {FzName: ts + 40812 /* "xLock" */, Fmask: 0x00040000}, - {FzName: ts + 44700 /* "xCheckReservedLo..." */, Fmask: 0x00080000}, - {FzName: ts + 40840 /* "xFileControl" */, Fmask: 0x00100000}, + {FzName: ts + 35496 /* "xShmOpen" */, Fmask: 0x00000001}, + {FzName: ts + 32515 /* "xShmLock" */, Fmask: 0x00000010}, + {FzName: ts + 32524 /* "xShmBarrier" */, Fmask: 0x00000040}, + {FzName: ts + 32505 /* "xShmUnmap" */, Fmask: 0x00000080}, + {FzName: ts + 32536 /* "xShmMap" */, Fmask: 0x00000020}, + {FzName: ts + 24735 /* "xSync" */, Fmask: 0x00000200}, + {FzName: ts + 32443 /* "xDelete" */, Fmask: 0x00000400}, + {FzName: ts + 32351 /* "xWrite" */, Fmask: 0x00001000}, + {FzName: ts + 32345 /* "xRead" */, Fmask: 0x00010000}, + {FzName: ts + 32358 /* "xTruncate" */, Fmask: 0x00002000}, + {FzName: ts + 24300 /* "xOpen" */, Fmask: 0x00000100}, + {FzName: ts + 32338 /* "xClose" */, Fmask: 0x00000800}, + {FzName: ts + 32451 /* "xAccess" */, Fmask: 0x00004000}, + {FzName: ts + 32459 /* "xFullPathname" */, Fmask: 0x00008000}, + {FzName: ts + 32384 /* "xUnlock" */, Fmask: 0x00020000}, + {FzName: ts + 32378 /* "xLock" */, Fmask: 0x00040000}, + {FzName: ts + 35362 /* "xCheckReservedLo..." */, Fmask: 0x00080000}, + {FzName: ts + 32406 /* "xFileControl" */, Fmask: 0x00100000}, } /* test_vfs.c:1178:9 */ func testvfs_obj_del(tls *crt.TLS, cd ClientData) { /* test_vfs.c:1389:27: */ @@ -68785,7 +69757,7 @@ __2: } zSwitch = tcl.XTcl_GetStringFromObj(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(i)*8)), bp /* &nSwitch */) - if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+45114 /* "-noshm" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { + if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+35776 /* "-noshm" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __5 } if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+4 /* &isNoshm */) != 0) { @@ -68802,7 +69774,7 @@ __8: ; goto __6 __5: - if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+32009 /* "-default" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { + if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+23658 /* "-default" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __9 } if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+8 /* &isDefault */) != 0) { @@ -68813,7 +69785,7 @@ __11: ; goto __10 __9: - if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+45121 /* "-szosfile" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { + if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+35783 /* "-szosfile" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __12 } if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+12 /* &szOsFile */) != 0) { @@ -68824,7 +69796,7 @@ __14: ; goto __13 __12: - if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+45131 /* "-mxpathname" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { + if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+35793 /* "-mxpathname" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __15 } if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+16 /* &mxPathname */) != 0) { @@ -68835,7 +69807,7 @@ __17: ; goto __16 __15: - if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+45143 /* "-iversion" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { + if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+35805 /* "-iversion" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __18 } if !(tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+20 /* &iVersion */) != 0) { @@ -68846,7 +69818,7 @@ __20: ; goto __19 __18: - if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+45153 /* "-fullshm" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { + if !((*(*int32)(unsafe.Pointer(bp /* nSwitch */)) > 2) && (0 == crt.Xstrncmp(tls, ts+35815 /* "-fullshm" */, zSwitch, uint64(*(*int32)(unsafe.Pointer(bp /* nSwitch */)))))) { goto __21 } if !(tcl.XTcl_GetBooleanFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr((i+1))*8)), bp+24 /* &isFullshm */) != 0) { @@ -68935,7 +69907,7 @@ __26: return 0 bad_args: - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+45162 /* "VFSNAME ?-noshm ..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+35824 /* "VFSNAME ?-noshm ..." */) return 1 } @@ -68968,8 +69940,8 @@ func test_vfs_shmlock(tls *crt.TLS, clientData uintptr, interp uintptr, objc int bp := tls.Alloc(88) defer tls.Free(88) - *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azArg1 */)) = [3]uintptr{ts + 45266 /* "shared" */, ts + 20648 /* "exclusive" */, uintptr(0)} - *(*[3]uintptr)(unsafe.Pointer(bp + 40 /* azArg2 */)) = [3]uintptr{ts + 45273 /* "lock" */, ts + 45278 /* "unlock" */, uintptr(0)} + *(*[3]uintptr)(unsafe.Pointer(bp + 8 /* azArg1 */)) = [3]uintptr{ts + 35928 /* "shared" */, ts + 11849 /* "exclusive" */, uintptr(0)} + *(*[3]uintptr)(unsafe.Pointer(bp + 40 /* azArg2 */)) = [3]uintptr{ts + 35935 /* "lock" */, ts + 35940 /* "unlock" */, uintptr(0)} *(*uintptr)(unsafe.Pointer(bp /* db */)) = uintptr(0) var rc int32 = 0 var zDbname uintptr = uintptr(0) @@ -68981,14 +69953,14 @@ func test_vfs_shmlock(tls *crt.TLS, clientData uintptr, interp uintptr, objc int if objc != 7 { tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, - ts+45285 /* "DB DBNAME (share..." */) + ts+35947 /* "DB DBNAME (share..." */) return 1 } zDbname = tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(2)*8))) if ((((getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0) || - (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+8 /* &azArg1[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+45337 /* "ARG" */, 0, bp+32 /* &iArg1 */) != 0)) || - (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), bp+40 /* &azArg2[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+45337 /* "ARG" */, 0, bp+64 /* &iArg2 */) != 0)) || + (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(3)*8)), bp+8 /* &azArg1[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+35999 /* "ARG" */, 0, bp+32 /* &iArg1 */) != 0)) || + (tcl.XTcl_GetIndexFromObjStruct(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(4)*8)), bp+40 /* &azArg2[0] */, int32(unsafe.Sizeof(uintptr(0))), ts+35999 /* "ARG" */, 0, bp+64 /* &iArg2 */) != 0)) || (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(5)*8)), bp+68 /* &iOffset */) != 0)) || (tcl.XTcl_GetIntFromObj(tls, interp, *(*uintptr)(unsafe.Pointer(objv + uintptr(6)*8)), bp+72 /* &n */) != 0) { return 1 @@ -69031,7 +70003,7 @@ func test_vfs_set_readmark(tls *crt.TLS, clientData uintptr, interp uintptr, obj var iOff int32 if (objc != 4) && (objc != 5) { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+45341 /* "DB DBNAME SLOT ?..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+36003 /* "DB DBNAME SLOT ?..." */) return 1 } @@ -69052,28 +70024,28 @@ func test_vfs_set_readmark(tls *crt.TLS, clientData uintptr, interp uintptr, obj return 1 } if *(*uintptr)(unsafe.Pointer(bp + 40 /* pShm */)) == uintptr(0) { - tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+45364 /* "*-shm is not yet..." */, 0)) + tcl.XTcl_AppendResult(tls, interp, crt.VaList(bp, ts+36026 /* "*-shm is not yet..." */, 0)) return 1 } aShm = *(*uintptr)(unsafe.Pointer(bp + 40 /* pShm */)) iOff = (((12 * 2) + 1) + *(*int32)(unsafe.Pointer(bp + 24 /* iSlot */))) if objc == 5 { - *(*u32)(unsafe.Pointer(aShm + uintptr(iOff)*4)) = u32(*(*int32)(unsafe.Pointer(bp + 28 /* iVal */))) + *(*u321)(unsafe.Pointer(aShm + uintptr(iOff)*4)) = u321(*(*int32)(unsafe.Pointer(bp + 28 /* iVal */))) } - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, int32(*(*u32)(unsafe.Pointer(aShm + uintptr(iOff)*4))))) + tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewIntObj(tls, int32(*(*u321)(unsafe.Pointer(aShm + uintptr(iOff)*4))))) return 0 } func Sqlitetestvfs_Init(tls *crt.TLS, interp uintptr) int32 { /* test_vfs.c:1681:5: */ - tcl.XTcl_CreateObjCommand(tls, interp, ts+45388 /* "testvfs" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+36050 /* "testvfs" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32 }{testvfs_cmd})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+45396 /* "vfs_shmlock" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+36058 /* "vfs_shmlock" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_vfs_shmlock})), uintptr(0), uintptr(0)) - tcl.XTcl_CreateObjCommand(tls, interp, ts+45408 /* "vfs_set_readmark" */, *(*uintptr)(unsafe.Pointer(&struct { + tcl.XTcl_CreateObjCommand(tls, interp, ts+36070 /* "vfs_set_readmark" */, *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_vfs_set_readmark})), uintptr(0), uintptr(0)) return 0 @@ -69111,7 +70083,7 @@ func doTestWindowStep(tls *crt.TLS, bInverse int32, ctx uintptr, nArg int32, apA if (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal != 0 { tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_DuplicateObj(tls, (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal)) } else { - tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, ts+792 /* "" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, ts+488 /* "" */, -1)) } for i = 0; i < nArg; i++ { var pArg uintptr @@ -69160,7 +70132,7 @@ func doTestWindowFinalize(tls *crt.TLS, bValue int32, ctx uintptr) { /* test_win if (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal != 0 { tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_DuplicateObj(tls, (*TestWindowCtx)(unsafe.Pointer(pCtx)).FpVal)) } else { - tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, ts+792 /* "" */, -1)) + tcl.XTcl_ListObjAppendElement(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, tcl.XTcl_NewStringObj(tls, ts+488 /* "" */, -1)) } rc = tcl.XTcl_EvalObjEx(tls, (*TestWindow)(unsafe.Pointer(p)).Finterp, pEval, 0x020000) @@ -69221,7 +70193,7 @@ func test_create_window(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rc int32 if objc != 7 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+45425 /* "DB NAME XSTEP XF..." */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+36087 /* "DB NAME XSTEP XF..." */) return 1 } @@ -69268,7 +70240,7 @@ func test_create_window_misuse(tls *crt.TLS, clientData uintptr, interp uintptr, if !(objc != 2) { goto __1 } - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 __1: ; @@ -69279,7 +70251,7 @@ __1: __2: ; - rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+45462 /* "fff" */, -1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+36124 /* "fff" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{testWindowFinal})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{testWindowValue})), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{testWindowInverse})), @@ -69290,7 +70262,7 @@ __2: goto error __3: ; - rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+45462 /* "fff" */, -1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+36124 /* "fff" */, -1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{testWindowStep})), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{testWindowValue})), *(*uintptr)(unsafe.Pointer(&struct { @@ -69303,7 +70275,7 @@ __3: goto error __4: ; - rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+45462 /* "fff" */, -1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+36124 /* "fff" */, -1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{testWindowStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{testWindowFinal})), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { @@ -69316,7 +70288,7 @@ __4: goto error __5: ; - rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+45462 /* "fff" */, -1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+36124 /* "fff" */, -1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{testWindowStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{testWindowFinal})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{testWindowValue})), uintptr(0), @@ -69331,7 +70303,7 @@ __6: return 0 error: - tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, ts+45466 /* "misuse test erro..." */, -1)) + tcl.XTcl_SetObjResult(tls, interp, tcl.XTcl_NewStringObj(tls, ts+36128 /* "misuse test erro..." */, -1)) return 1 } @@ -69340,7 +70312,7 @@ func sumintStep(tls *crt.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* test_ var pInt uintptr if sqlite3.Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(apArg + uintptr(0)*8))) != 1 { - sqlite3.Xsqlite3_result_error(tls, ctx, ts+45484 /* "invalid argument" */, -1) + sqlite3.Xsqlite3_result_error(tls, ctx, ts+36146 /* "invalid argument" */, -1) return } pInt = sqlite3.Xsqlite3_aggregate_context(tls, ctx, int32(unsafe.Sizeof(sqlite3_int64(0)))) @@ -69387,14 +70359,14 @@ func test_create_sumint(tls *crt.TLS, clientData uintptr, interp uintptr, objc i var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { return 1 } - rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+45501 /* "sumint" */, 1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_window_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+36163 /* "sumint" */, 1, 1, uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{sumintStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{sumintFinal})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{sumintValue})), *(*uintptr)(unsafe.Pointer(&struct { @@ -69418,14 +70390,14 @@ func test_override_sum(tls *crt.TLS, clientData uintptr, interp uintptr, objc in var rc int32 if objc != 2 { - tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+2452 /* "DB" */) + tcl.XTcl_WrongNumArgs(tls, interp, 1, objv, ts+1910 /* "DB" */) return 1 } if getDbPointer(tls, interp, tcl.XTcl_GetString(tls, *(*uintptr)(unsafe.Pointer(objv + uintptr(1)*8))), bp /* &db */) != 0 { return 1 } - rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+45508 /* "sum" */, -1, 1, uintptr(0), + rc = sqlite3.Xsqlite3_create_function(tls, *(*uintptr)(unsafe.Pointer(bp /* db */)), ts+36170 /* "sum" */, -1, 1, uintptr(0), uintptr(0), *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, uintptr) }{sumintStep})), *(*uintptr)(unsafe.Pointer(&struct{ f func(*crt.TLS, uintptr) }{sumintFinal}))) @@ -69439,28 +70411,28 @@ func test_override_sum(tls *crt.TLS, clientData uintptr, interp uintptr, objc in func Sqlitetest_window_Init(tls *crt.TLS, interp uintptr) int32 { /* test_window.c:331:5: */ var i int32 - for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd14)) / uint64(unsafe.Sizeof(struct { + for i = 0; uint64(i) < (uint64(unsafe.Sizeof(aObjCmd13)) / uint64(unsafe.Sizeof(struct { FzName uintptr FxProc uintptr FclientData int32 _ [4]byte }{}))); i++ { - var c ClientData = uintptr(int64(aObjCmd14[i].FclientData)) - tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd14[i].FzName, aObjCmd14[i].FxProc, c, uintptr(0)) + var c ClientData = uintptr(int64(aObjCmd13[i].FclientData)) + tcl.XTcl_CreateObjCommand(tls, interp, aObjCmd13[i].FzName, aObjCmd13[i].FxProc, c, uintptr(0)) } return 0 } -var aObjCmd14 = [4]struct { +var aObjCmd13 = [4]struct { FzName uintptr FxProc uintptr FclientData int32 _ [4]byte }{ - {FzName: ts + 45512 /* "sqlite3_create_w..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 45543 /* "test_create_wind..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 45578 /* "test_create_sumi..." */, FxProc: 0, FclientData: 0}, - {FzName: ts + 45597 /* "test_override_su..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 36174 /* "sqlite3_create_w..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 36205 /* "test_create_wind..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 36240 /* "test_create_sumi..." */, FxProc: 0, FclientData: 0}, + {FzName: ts + 36259 /* "test_override_su..." */, FxProc: 0, FclientData: 0}, } /* test_window.c:336:5 */ func init() { @@ -69790,317 +70762,376 @@ func init() { *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd4)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_translate_selftest})) // test5.c:213:34: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 8 /* .xProc */)) = test_multiplex_initialize // test_multiplex.c:1311:39: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 24 /* .xProc */)) = test_multiplex_shutdown // test_multiplex.c:1312:37: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 40 /* .xProc */)) = test_multiplex_control // test_multiplex.c:1313:36: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 8 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 8 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_create})) // test7.c:695:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 24 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_wait})) // test7.c:696:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 40 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_halt})) // test7.c:697:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_argc})) // test7.c:698:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 72 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_argv})) // test7.c:699:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 88 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_colname})) // test7.c:700:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 104 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_result})) // test7.c:701:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 120 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_error})) // test7.c:702:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 136 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_compile})) // test7.c:703:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 152 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_step})) // test7.c:704:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 168 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_reset})) // test7.c:705:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 184 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_finalize})) // test7.c:706:29: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd5)) + 200 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 + }{tcl_client_swap})) // test7.c:707:29: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 8 /* .xProc */)) = test_multiplex_initialize // test_multiplex.c:1311:39: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 24 /* .xProc */)) = test_multiplex_shutdown // test_multiplex.c:1312:37: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 40 /* .xProc */)) = test_multiplex_control // test_multiplex.c:1313:36: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 8 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_shutdown})) // test_mutex.c:485:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 24 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 24 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_initialize})) // test_mutex.c:486:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 40 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 40 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_config})) // test_mutex.c:487:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 56 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_enter_static_mutex})) // test_mutex.c:489:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 72 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 72 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_leave_static_mutex})) // test_mutex.c:490:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 88 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 88 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_enter_db_mutex})) // test_mutex.c:492:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 104 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 104 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_leave_db_mutex})) // test_mutex.c:493:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 120 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 120 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_alloc_mutex})) // test_mutex.c:495:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 136 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 136 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_install_mutex_counters})) // test_mutex.c:496:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 152 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 152 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_read_mutex_counters})) // test_mutex.c:497:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd6)) + 168 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 168 /* .xProc */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32 }{test_clear_mutex_counters})) // test_mutex.c:498:34: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 8 /* .xProc */)) = test_quota_initialize // test_quota.c:1949:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 24 /* .xProc */)) = test_quota_shutdown // test_quota.c:1950:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 40 /* .xProc */)) = test_quota_set // test_quota.c:1951:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 56 /* .xProc */)) = test_quota_file // test_quota.c:1952:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 72 /* .xProc */)) = test_quota_dump // test_quota.c:1953:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 88 /* .xProc */)) = test_quota_fopen // test_quota.c:1954:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 104 /* .xProc */)) = test_quota_fread // test_quota.c:1955:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 120 /* .xProc */)) = test_quota_fwrite // test_quota.c:1956:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 136 /* .xProc */)) = test_quota_fclose // test_quota.c:1957:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 152 /* .xProc */)) = test_quota_fflush // test_quota.c:1958:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 168 /* .xProc */)) = test_quota_fseek // test_quota.c:1959:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 184 /* .xProc */)) = test_quota_rewind // test_quota.c:1960:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 200 /* .xProc */)) = test_quota_ftell // test_quota.c:1961:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 216 /* .xProc */)) = test_quota_ftruncate // test_quota.c:1962:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 232 /* .xProc */)) = test_quota_file_size // test_quota.c:1963:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 248 /* .xProc */)) = test_quota_file_truesize // test_quota.c:1964:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 264 /* .xProc */)) = test_quota_file_mtime // test_quota.c:1965:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 280 /* .xProc */)) = test_quota_remove // test_quota.c:1966:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 296 /* .xProc */)) = test_quota_glob // test_quota.c:1967:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 312 /* .xProc */)) = test_quota_file_available // test_quota.c:1968:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd7)) + 328 /* .xProc */)) = test_quota_ferror // test_quota.c:1969:38: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 8 /* .pInit */)) = sqlite3_amatch_init // test1.c:7281:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 24 /* .pInit */)) = sqlite3_carray_init // test1.c:7282:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 40 /* .pInit */)) = sqlite3_closure_init // test1.c:7283:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 56 /* .pInit */)) = sqlite3_csv_init // test1.c:7284:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 72 /* .pInit */)) = sqlite3_eval_init // test1.c:7285:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 88 /* .pInit */)) = sqlite3_explain_init // test1.c:7286:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 104 /* .pInit */)) = sqlite3_fileio_init // test1.c:7287:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 120 /* .pInit */)) = sqlite3_fuzzer_init // test1.c:7288:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 136 /* .pInit */)) = sqlite3_ieee_init // test1.c:7289:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 152 /* .pInit */)) = sqlite3_nextchar_init // test1.c:7290:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 168 /* .pInit */)) = sqlite3_percentile_init // test1.c:7291:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 184 /* .pInit */)) = sqlite3_prefixes_init // test1.c:7293:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 200 /* .pInit */)) = sqlite3_regexp_init // test1.c:7295:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 216 /* .pInit */)) = sqlite3_remember_init // test1.c:7296:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 232 /* .pInit */)) = sqlite3_series_init // test1.c:7297:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 248 /* .pInit */)) = sqlite3_spellfix_init // test1.c:7298:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 264 /* .pInit */)) = sqlite3_totype_init // test1.c:7299:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 280 /* .pInit */)) = sqlite3_unionvtab_init // test1.c:7300:32: - *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 296 /* .pInit */)) = sqlite3_wholenumber_init // test1.c:7301:32: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 16 /* .xFunc */)) = randStr // test_func.c:675:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 40 /* .xFunc */)) = test_destructor // test_func.c:676:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 64 /* .xFunc */)) = testHexToUtf8 // test_func.c:682:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 88 /* .xFunc */)) = test_destructor_count // test_func.c:683:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 112 /* .xFunc */)) = test_auxdata // test_func.c:684:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 136 /* .xFunc */)) = test_error // test_func.c:685:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 160 /* .xFunc */)) = test_error // test_func.c:686:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 184 /* .xFunc */)) = test_eval // test_func.c:687:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 208 /* .xFunc */)) = test_isolation // test_func.c:688:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 232 /* .xFunc */)) = counterFunc // test_func.c:689:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 256 /* .xFunc */)) = real2hex // test_func.c:690:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 280 /* .xFunc */)) = test_decode // test_func.c:691:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 304 /* .xFunc */)) = test_extract // test_func.c:692:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 328 /* .xFunc */)) = test_zeroblob // test_func.c:693:62: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 352 /* .xFunc */)) = test_getsubtype // test_func.c:694:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 376 /* .xFunc */)) = test_setsubtype // test_func.c:695:48: - *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 400 /* .xFunc */)) = test_frombind // test_func.c:696:48: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 8 /* .xProc */)) = test_sqlite3rbu // test_rbu.c:370:21: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 24 /* .xProc */)) = test_sqlite3rbu_vacuum // test_rbu.c:371:28: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 40 /* .xProc */)) = test_sqlite3rbu_create_vfs // test_rbu.c:372:32: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 56 /* .xProc */)) = test_sqlite3rbu_destroy_vfs // test_rbu.c:373:33: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 72 /* .xProc */)) = test_sqlite3rbu_internal_test // test_rbu.c:374:35: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 8 /* .xProc */)) = test_sqlite3_db_config // test1.c:7926:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 32 /* .xProc */)) = test_bad_behavior // test1.c:7927:41: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 40 /* .clientData */)) = uintptr(unsafe.Pointer(&iZero)) // test1.c:7927:61: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 56 /* .xProc */)) = test_register_dbstat_vtab // test1.c:7928:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 80 /* .xProc */)) = get_sqlite_pointer // test1.c:7929:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 104 /* .xProc */)) = test_intarray_addr // test1.c:7930:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 128 /* .xProc */)) = test_int64array_addr // test1.c:7931:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 152 /* .xProc */)) = test_doublearray_addr // test1.c:7932:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 176 /* .xProc */)) = test_textarray_addr // test1.c:7933:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 200 /* .xProc */)) = test_bind_int // test1.c:7934:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 224 /* .xProc */)) = test_bind_zeroblob // test1.c:7935:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 248 /* .xProc */)) = test_bind_zeroblob64 // test1.c:7936:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 272 /* .xProc */)) = test_bind_int64 // test1.c:7937:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 296 /* .xProc */)) = test_bind_double // test1.c:7938:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 320 /* .xProc */)) = test_bind_null // test1.c:7939:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 344 /* .xProc */)) = test_bind_text // test1.c:7940:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 368 /* .xProc */)) = test_bind_text16 // test1.c:7941:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 392 /* .xProc */)) = test_bind_blob // test1.c:7942:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 416 /* .xProc */)) = test_bind_parameter_count // test1.c:7943:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 440 /* .xProc */)) = test_bind_parameter_name // test1.c:7944:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 464 /* .xProc */)) = test_bind_parameter_index // test1.c:7945:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 488 /* .xProc */)) = test_clear_bindings // test1.c:7946:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 512 /* .xProc */)) = test_sleep // test1.c:7947:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 536 /* .xProc */)) = test_errcode // test1.c:7948:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 560 /* .xProc */)) = test_ex_errcode // test1.c:7949:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 584 /* .xProc */)) = test_errmsg // test1.c:7950:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 608 /* .xProc */)) = test_errmsg16 // test1.c:7951:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 632 /* .xProc */)) = test_open // test1.c:7952:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 656 /* .xProc */)) = test_open16 // test1.c:7953:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 680 /* .xProc */)) = test_open_v2 // test1.c:7954:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 704 /* .xProc */)) = test_complete16 // test1.c:7955:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 728 /* .xProc */)) = test_normalize // test1.c:7956:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 752 /* .xProc */)) = test_prepare // test1.c:7958:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 776 /* .xProc */)) = test_prepare16 // test1.c:7959:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 800 /* .xProc */)) = test_prepare_v2 // test1.c:7960:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 824 /* .xProc */)) = test_prepare_v3 // test1.c:7961:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 848 /* .xProc */)) = test_prepare_tkt3134 // test1.c:7962:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 872 /* .xProc */)) = test_prepare16_v2 // test1.c:7963:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 896 /* .xProc */)) = test_finalize // test1.c:7964:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 920 /* .xProc */)) = test_stmt_status // test1.c:7965:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 944 /* .xProc */)) = test_reset // test1.c:7966:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 968 /* .xProc */)) = test_expired // test1.c:7967:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 992 /* .xProc */)) = test_transfer_bind // test1.c:7968:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1016 /* .xProc */)) = test_changes // test1.c:7969:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1040 /* .xProc */)) = test_step // test1.c:7970:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1064 /* .xProc */)) = test_sql // test1.c:7971:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1088 /* .xProc */)) = test_ex_sql // test1.c:7972:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1112 /* .xProc */)) = test_next_stmt // test1.c:7976:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1136 /* .xProc */)) = test_stmt_readonly // test1.c:7977:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1160 /* .xProc */)) = test_stmt_isexplain // test1.c:7978:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1184 /* .xProc */)) = test_stmt_busy // test1.c:7979:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1208 /* .xProc */)) = uses_stmt_journal // test1.c:7980:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1232 /* .xProc */)) = test_release_memory // test1.c:7982:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1256 /* .xProc */)) = test_db_release_memory // test1.c:7983:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1280 /* .xProc */)) = test_db_cacheflush // test1.c:7984:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1304 /* .xProc */)) = test_system_errno // test1.c:7985:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1328 /* .xProc */)) = test_db_filename // test1.c:7986:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1352 /* .xProc */)) = test_db_readonly // test1.c:7987:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1376 /* .xProc */)) = test_soft_heap_limit // test1.c:7988:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1400 /* .xProc */)) = test_soft_heap_limit // test1.c:7989:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1424 /* .xProc */)) = test_hard_heap_limit // test1.c:7990:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1448 /* .xProc */)) = test_thread_cleanup // test1.c:7991:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1472 /* .xProc */)) = test_pager_refcounts // test1.c:7992:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1496 /* .xProc */)) = test_load_extension // test1.c:7994:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1520 /* .xProc */)) = test_enable_load // test1.c:7995:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1544 /* .xProc */)) = test_extended_result_codes // test1.c:7996:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1568 /* .xProc */)) = test_limit // test1.c:7997:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1592 /* .xProc */)) = test_dbconfig_maindbname_icecube // test1.c:7998:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1616 /* .xProc */)) = save_prng_state // test1.c:8000:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1640 /* .xProc */)) = restore_prng_state // test1.c:8001:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1664 /* .xProc */)) = reset_prng_state // test1.c:8002:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1688 /* .xProc */)) = prng_seed // test1.c:8003:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1712 /* .xProc */)) = database_never_corrupt // test1.c:8004:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1736 /* .xProc */)) = database_may_be_corrupt // test1.c:8005:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1760 /* .xProc */)) = optimization_control // test1.c:8006:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1784 /* .xProc */)) = runAsObjProc // test1.c:8015:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1808 /* .xProc */)) = test_column_count // test1.c:8018:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1832 /* .xProc */)) = test_data_count // test1.c:8019:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1856 /* .xProc */)) = test_column_type // test1.c:8020:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1880 /* .xProc */)) = test_column_blob // test1.c:8021:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1904 /* .xProc */)) = test_column_double // test1.c:8022:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1928 /* .xProc */)) = test_column_int64 // test1.c:8023:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1952 /* .xProc */)) = test_stmt_utf8 // test1.c:8024:33: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1960 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 8 /* .xProc */)) = test_quota_initialize // test_quota.c:1949:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 24 /* .xProc */)) = test_quota_shutdown // test_quota.c:1950:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 40 /* .xProc */)) = test_quota_set // test_quota.c:1951:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 56 /* .xProc */)) = test_quota_file // test_quota.c:1952:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 72 /* .xProc */)) = test_quota_dump // test_quota.c:1953:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 88 /* .xProc */)) = test_quota_fopen // test_quota.c:1954:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 104 /* .xProc */)) = test_quota_fread // test_quota.c:1955:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 120 /* .xProc */)) = test_quota_fwrite // test_quota.c:1956:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 136 /* .xProc */)) = test_quota_fclose // test_quota.c:1957:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 152 /* .xProc */)) = test_quota_fflush // test_quota.c:1958:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 168 /* .xProc */)) = test_quota_fseek // test_quota.c:1959:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 184 /* .xProc */)) = test_quota_rewind // test_quota.c:1960:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 200 /* .xProc */)) = test_quota_ftell // test_quota.c:1961:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 216 /* .xProc */)) = test_quota_ftruncate // test_quota.c:1962:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 232 /* .xProc */)) = test_quota_file_size // test_quota.c:1963:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 248 /* .xProc */)) = test_quota_file_truesize // test_quota.c:1964:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 264 /* .xProc */)) = test_quota_file_mtime // test_quota.c:1965:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 280 /* .xProc */)) = test_quota_remove // test_quota.c:1966:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 296 /* .xProc */)) = test_quota_glob // test_quota.c:1967:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 312 /* .xProc */)) = test_quota_file_available // test_quota.c:1968:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aCmd8)) + 328 /* .xProc */)) = test_quota_ferror // test_quota.c:1969:38: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 8 /* .pInit */)) = sqlite3_amatch_init // test1.c:7281:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 24 /* .pInit */)) = sqlite3_carray_init // test1.c:7282:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 40 /* .pInit */)) = sqlite3_closure_init // test1.c:7283:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 56 /* .pInit */)) = sqlite3_csv_init // test1.c:7284:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 72 /* .pInit */)) = sqlite3_eval_init // test1.c:7285:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 88 /* .pInit */)) = sqlite3_explain_init // test1.c:7286:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 104 /* .pInit */)) = sqlite3_fileio_init // test1.c:7287:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 120 /* .pInit */)) = sqlite3_fuzzer_init // test1.c:7288:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 136 /* .pInit */)) = sqlite3_ieee_init // test1.c:7289:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 152 /* .pInit */)) = sqlite3_nextchar_init // test1.c:7290:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 168 /* .pInit */)) = sqlite3_percentile_init // test1.c:7291:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 184 /* .pInit */)) = sqlite3_prefixes_init // test1.c:7293:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 200 /* .pInit */)) = sqlite3_regexp_init // test1.c:7295:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 216 /* .pInit */)) = sqlite3_remember_init // test1.c:7296:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 232 /* .pInit */)) = sqlite3_series_init // test1.c:7297:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 248 /* .pInit */)) = sqlite3_spellfix_init // test1.c:7298:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 264 /* .pInit */)) = sqlite3_totype_init // test1.c:7299:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 280 /* .pInit */)) = sqlite3_unionvtab_init // test1.c:7300:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 296 /* .pInit */)) = sqlite3_wholenumber_init // test1.c:7301:32: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aExtension)) + 312 /* .pInit */)) = sqlite3_zipfile_init // test1.c:7303:32: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 16 /* .xFunc */)) = randStr // test_func.c:675:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 40 /* .xFunc */)) = test_destructor // test_func.c:676:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 64 /* .xFunc */)) = test_destructor16 // test_func.c:678:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 88 /* .xFunc */)) = testHexToUtf16be // test_func.c:679:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 112 /* .xFunc */)) = testHexToUtf16le // test_func.c:680:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 136 /* .xFunc */)) = testHexToUtf8 // test_func.c:682:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 160 /* .xFunc */)) = test_destructor_count // test_func.c:683:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 184 /* .xFunc */)) = test_auxdata // test_func.c:684:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 208 /* .xFunc */)) = test_error // test_func.c:685:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 232 /* .xFunc */)) = test_error // test_func.c:686:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 256 /* .xFunc */)) = test_eval // test_func.c:687:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 280 /* .xFunc */)) = test_isolation // test_func.c:688:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 304 /* .xFunc */)) = counterFunc // test_func.c:689:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 328 /* .xFunc */)) = real2hex // test_func.c:690:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 352 /* .xFunc */)) = test_decode // test_func.c:691:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 376 /* .xFunc */)) = test_extract // test_func.c:692:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 400 /* .xFunc */)) = test_zeroblob // test_func.c:693:62: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 424 /* .xFunc */)) = test_getsubtype // test_func.c:694:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 448 /* .xFunc */)) = test_setsubtype // test_func.c:695:48: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&aFuncs)) + 472 /* .xFunc */)) = test_frombind // test_func.c:696:48: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 8 /* .xProc */)) = test_sqlite3_db_config // test1.c:7926:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 32 /* .xProc */)) = test_bad_behavior // test1.c:7927:41: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 40 /* .clientData */)) = uintptr(unsafe.Pointer(&iZero)) // test1.c:7927:61: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 56 /* .xProc */)) = test_register_dbstat_vtab // test1.c:7928:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 80 /* .xProc */)) = get_sqlite_pointer // test1.c:7929:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 104 /* .xProc */)) = test_intarray_addr // test1.c:7930:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 128 /* .xProc */)) = test_int64array_addr // test1.c:7931:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 152 /* .xProc */)) = test_doublearray_addr // test1.c:7932:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 176 /* .xProc */)) = test_textarray_addr // test1.c:7933:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 200 /* .xProc */)) = test_bind_int // test1.c:7934:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 224 /* .xProc */)) = test_bind_zeroblob // test1.c:7935:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 248 /* .xProc */)) = test_bind_zeroblob64 // test1.c:7936:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 272 /* .xProc */)) = test_bind_int64 // test1.c:7937:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 296 /* .xProc */)) = test_bind_double // test1.c:7938:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 320 /* .xProc */)) = test_bind_null // test1.c:7939:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 344 /* .xProc */)) = test_bind_text // test1.c:7940:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 368 /* .xProc */)) = test_bind_text16 // test1.c:7941:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 392 /* .xProc */)) = test_bind_blob // test1.c:7942:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 416 /* .xProc */)) = test_bind_parameter_count // test1.c:7943:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 440 /* .xProc */)) = test_bind_parameter_name // test1.c:7944:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 464 /* .xProc */)) = test_bind_parameter_index // test1.c:7945:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 488 /* .xProc */)) = test_clear_bindings // test1.c:7946:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 512 /* .xProc */)) = test_sleep // test1.c:7947:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 536 /* .xProc */)) = test_errcode // test1.c:7948:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 560 /* .xProc */)) = test_ex_errcode // test1.c:7949:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 584 /* .xProc */)) = test_errmsg // test1.c:7950:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 608 /* .xProc */)) = test_errmsg16 // test1.c:7951:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 632 /* .xProc */)) = test_open // test1.c:7952:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 656 /* .xProc */)) = test_open16 // test1.c:7953:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 680 /* .xProc */)) = test_open_v2 // test1.c:7954:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 704 /* .xProc */)) = test_complete16 // test1.c:7955:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 728 /* .xProc */)) = test_normalize // test1.c:7956:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 752 /* .xProc */)) = test_prepare // test1.c:7958:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 776 /* .xProc */)) = test_prepare16 // test1.c:7959:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 800 /* .xProc */)) = test_prepare_v2 // test1.c:7960:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 824 /* .xProc */)) = test_prepare_v3 // test1.c:7961:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 848 /* .xProc */)) = test_prepare_tkt3134 // test1.c:7962:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 872 /* .xProc */)) = test_prepare16_v2 // test1.c:7963:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 896 /* .xProc */)) = test_finalize // test1.c:7964:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 920 /* .xProc */)) = test_stmt_status // test1.c:7965:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 944 /* .xProc */)) = test_reset // test1.c:7966:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 968 /* .xProc */)) = test_expired // test1.c:7967:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 992 /* .xProc */)) = test_transfer_bind // test1.c:7968:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1016 /* .xProc */)) = test_changes // test1.c:7969:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1040 /* .xProc */)) = test_step // test1.c:7970:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1064 /* .xProc */)) = test_sql // test1.c:7971:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1088 /* .xProc */)) = test_ex_sql // test1.c:7972:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1112 /* .xProc */)) = test_next_stmt // test1.c:7976:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1136 /* .xProc */)) = test_stmt_readonly // test1.c:7977:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1160 /* .xProc */)) = test_stmt_isexplain // test1.c:7978:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1184 /* .xProc */)) = test_stmt_busy // test1.c:7979:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1208 /* .xProc */)) = uses_stmt_journal // test1.c:7980:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1232 /* .xProc */)) = test_release_memory // test1.c:7982:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1256 /* .xProc */)) = test_db_release_memory // test1.c:7983:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1280 /* .xProc */)) = test_db_cacheflush // test1.c:7984:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1304 /* .xProc */)) = test_system_errno // test1.c:7985:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1328 /* .xProc */)) = test_db_filename // test1.c:7986:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1352 /* .xProc */)) = test_db_readonly // test1.c:7987:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1376 /* .xProc */)) = test_soft_heap_limit // test1.c:7988:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1400 /* .xProc */)) = test_soft_heap_limit // test1.c:7989:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1424 /* .xProc */)) = test_hard_heap_limit // test1.c:7990:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1448 /* .xProc */)) = test_thread_cleanup // test1.c:7991:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1472 /* .xProc */)) = test_pager_refcounts // test1.c:7992:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1496 /* .xProc */)) = test_load_extension // test1.c:7994:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1520 /* .xProc */)) = test_enable_load // test1.c:7995:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1544 /* .xProc */)) = test_extended_result_codes // test1.c:7996:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1568 /* .xProc */)) = test_limit // test1.c:7997:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1592 /* .xProc */)) = test_dbconfig_maindbname_icecube // test1.c:7998:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1616 /* .xProc */)) = save_prng_state // test1.c:8000:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1640 /* .xProc */)) = restore_prng_state // test1.c:8001:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1664 /* .xProc */)) = reset_prng_state // test1.c:8002:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1688 /* .xProc */)) = prng_seed // test1.c:8003:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1712 /* .xProc */)) = database_never_corrupt // test1.c:8004:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1736 /* .xProc */)) = database_may_be_corrupt // test1.c:8005:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1760 /* .xProc */)) = optimization_control // test1.c:8006:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1784 /* .xProc */)) = runAsObjProc // test1.c:8015:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1808 /* .xProc */)) = test_column_count // test1.c:8018:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1832 /* .xProc */)) = test_data_count // test1.c:8019:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1856 /* .xProc */)) = test_column_type // test1.c:8020:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1880 /* .xProc */)) = test_column_blob // test1.c:8021:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1904 /* .xProc */)) = test_column_double // test1.c:8022:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1928 /* .xProc */)) = test_column_int64 // test1.c:8023:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1952 /* .xProc */)) = test_stmt_utf8 // test1.c:8024:33: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1960 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_text})) // test1.c:8024:50: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1976 /* .xProc */)) = test_stmt_utf8 // test1.c:8025:33: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 1984 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1976 /* .xProc */)) = test_stmt_utf8 // test1.c:8025:33: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 1984 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_name})) // test1.c:8025:50: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2000 /* .xProc */)) = test_stmt_int // test1.c:8026:33: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2008 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2000 /* .xProc */)) = test_stmt_int // test1.c:8026:33: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2008 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32) int32 }{sqlite3.Xsqlite3_column_int})) // test1.c:8026:50: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2024 /* .xProc */)) = test_stmt_int // test1.c:8027:33: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2032 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2024 /* .xProc */)) = test_stmt_int // test1.c:8027:33: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2032 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32) int32 }{sqlite3.Xsqlite3_column_bytes})) // test1.c:8027:50: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2048 /* .xProc */)) = test_stmt_utf8 // test1.c:8029:34: - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2056 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2048 /* .xProc */)) = test_stmt_utf8 // test1.c:8029:34: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2056 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32) uintptr }{sqlite3.Xsqlite3_column_decltype})) // test1.c:8029:49: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2072 /* .xProc */)) = test_create_collation_v2 // test1.c:8052:39: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2096 /* .xProc */)) = test_global_recover // test1.c:8053:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2120 /* .xProc */)) = working_64bit_int // test1.c:8054:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2144 /* .xProc */)) = vfs_unlink_test // test1.c:8055:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2168 /* .xProc */)) = vfs_initfail_test // test1.c:8056:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2192 /* .xProc */)) = vfs_unregister_all // test1.c:8057:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2216 /* .xProc */)) = vfs_reregister_all // test1.c:8058:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2240 /* .xProc */)) = file_control_test // test1.c:8059:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2264 /* .xProc */)) = file_control_lasterrno_test // test1.c:8060:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2288 /* .xProc */)) = file_control_lockproxy_test // test1.c:8061:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2312 /* .xProc */)) = file_control_chunksize_test // test1.c:8062:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2336 /* .xProc */)) = file_control_sizehint_test // test1.c:8063:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2360 /* .xProc */)) = file_control_data_version // test1.c:8064:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2384 /* .xProc */)) = file_control_persist_wal // test1.c:8070:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2408 /* .xProc */)) = file_control_powersafe_overwrite // test1.c:8071:43: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2432 /* .xProc */)) = file_control_vfsname // test1.c:8072:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2456 /* .xProc */)) = file_control_tempfilename // test1.c:8073:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2480 /* .xProc */)) = vfs_list // test1.c:8074:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2504 /* .xProc */)) = test_create_function_v2 // test1.c:8075:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2528 /* .xProc */)) = test_errstr // test1.c:8084:35: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2552 /* .xProc */)) = tcl_variable_type // test1.c:8085:35: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2576 /* .xProc */)) = test_enable_shared // test1.c:8087:39: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2600 /* .xProc */)) = sqlite3BtreeSharedCacheReport // test1.c:8088:39: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2624 /* .xProc */)) = test_libversion_number // test1.c:8090:37: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2648 /* .xProc */)) = test_table_column_metadata // test1.c:8091:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2672 /* .xProc */)) = test_blob_reopen // test1.c:8093:31: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2696 /* .xProc */)) = test_pcache_stats // test1.c:8095:30: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2720 /* .xProc */)) = test_unlock_notify // test1.c:8097:33: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2744 /* .xProc */)) = test_wal_checkpoint // test1.c:8099:36: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2768 /* .xProc */)) = test_wal_checkpoint_v2 // test1.c:8100:36: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2792 /* .xProc */)) = test_wal_autocheckpoint // test1.c:8101:37: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2816 /* .xProc */)) = test_sqlite3_log // test1.c:8102:36: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2840 /* .xProc */)) = test_print_eqp // test1.c:8104:36: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2864 /* .xProc */)) = test_test_control // test1.c:8106:32: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2888 /* .xProc */)) = test_getrusage // test1.c:8108:21: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2912 /* .xProc */)) = tclLoadStaticExtensionCmd // test1.c:8110:33: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2936 /* .xProc */)) = sorter_test_fakeheap // test1.c:8111:32: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2960 /* .xProc */)) = sorter_test_sort4_helper // test1.c:8112:36: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 2984 /* .xProc */)) = vfsCurrentTimeInt64 // test1.c:8126:44: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3008 /* .xProc */)) = test_delete_database // test1.c:8137:35: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3032 /* .xProc */)) = test_atomic_batch_write // test1.c:8138:35: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3056 /* .xProc */)) = test_mmap_warm // test1.c:8139:35: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3080 /* .xProc */)) = test_config_sorterref // test1.c:8140:36: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 3104 /* .xProc */)) = test_decode_hexdb // test1.c:8141:36: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 8 /* .xProc */)) = test_intarray_create // test_intarray.c:381:35: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 32 /* .xProc */)) = test_intarray_bind // test_intarray.c:382:33: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 8 /* .xProc */)) = test_malloc // test_malloc.c:1506:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 32 /* .xProc */)) = test_realloc // test_malloc.c:1507:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 56 /* .xProc */)) = test_free // test_malloc.c:1508:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 80 /* .xProc */)) = test_memset // test_malloc.c:1509:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 104 /* .xProc */)) = test_memget // test_malloc.c:1510:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 128 /* .xProc */)) = test_memory_used // test_malloc.c:1511:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 152 /* .xProc */)) = test_memory_highwater // test_malloc.c:1512:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 176 /* .xProc */)) = test_memdebug_backtrace // test_malloc.c:1513:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 200 /* .xProc */)) = test_memdebug_dump // test_malloc.c:1514:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 224 /* .xProc */)) = test_memdebug_fail // test_malloc.c:1515:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 248 /* .xProc */)) = test_memdebug_pending // test_malloc.c:1516:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 272 /* .xProc */)) = test_memdebug_settitle // test_malloc.c:1517:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 296 /* .xProc */)) = test_memdebug_malloc_count // test_malloc.c:1518:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 320 /* .xProc */)) = test_memdebug_log // test_malloc.c:1519:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 344 /* .xProc */)) = test_config_pagecache // test_malloc.c:1520:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 368 /* .xProc */)) = test_alt_pcache // test_malloc.c:1521:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 392 /* .xProc */)) = test_status // test_malloc.c:1522:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 416 /* .xProc */)) = test_db_status // test_malloc.c:1523:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 440 /* .xProc */)) = test_install_malloc_faultsim // test_malloc.c:1524:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 464 /* .xProc */)) = test_config_heap // test_malloc.c:1525:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 488 /* .xProc */)) = test_config_heap_size // test_malloc.c:1526:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 512 /* .xProc */)) = test_config_memstatus // test_malloc.c:1527:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 536 /* .xProc */)) = test_config_lookaside // test_malloc.c:1528:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 560 /* .xProc */)) = test_config_error // test_malloc.c:1529:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 584 /* .xProc */)) = test_config_uri // test_malloc.c:1530:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 608 /* .xProc */)) = test_config_cis // test_malloc.c:1531:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 632 /* .xProc */)) = test_config_pmasz // test_malloc.c:1532:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 656 /* .xProc */)) = test_db_config_lookaside // test_malloc.c:1533:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 680 /* .xProc */)) = test_dump_memsys3 // test_malloc.c:1534:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 704 /* .xProc */)) = test_dump_memsys3 // test_malloc.c:1535:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 728 /* .xProc */)) = test_install_memsys3 // test_malloc.c:1536:38: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 752 /* .xProc */)) = test_vfs_oom_test // test_malloc.c:1537:41: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd12)) + 8 /* .xProc */)) = register_schema_module // test_schema.c:336:34: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd13)) + 8 /* .xProc */)) = register_tclvar_module // test_tclvar.c:553:36: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd14)) + 8 /* .xProc */)) = test_create_window // test_window.c:337:42: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd14)) + 32 /* .xProc */)) = test_create_window_misuse // test_window.c:338:46: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd14)) + 56 /* .xProc */)) = test_create_sumint // test_window.c:339:30: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd14)) + 80 /* .xProc */)) = test_override_sum // test_window.c:340:29: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd2)) + 8 /* .xProc */)) = register_echo_module // test8.c:1434:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd2)) + 32 /* .xProc */)) = declare_vtab // test8.c:1435:38: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd3)) + 8 /* .xProc */)) = c_misuse_test // test9.c:194:28: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd3)) + 32 /* .xProc */)) = c_realloc_test // test9.c:195:28: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd3)) + 56 /* .xProc */)) = c_collation_test // test9.c:196:28: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd4)) + 8 /* .xProc */)) = register_tcl_module // test_bestindex.c:611:33: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 8 /* .xProc */)) = test_blob_open // test_blob.c:318:40: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 24 /* .xProc */)) = test_blob_close // test_blob.c:319:40: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 40 /* .xProc */)) = test_blob_bytes // test_blob.c:320:40: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 56 /* .xProc */)) = test_blob_read // test_blob.c:321:40: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 72 /* .xProc */)) = test_blob_write // test_blob.c:322:40: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd6)) + 8 /* .xProc */)) = register_fs_module // test_fs.c:908:32: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 8 /* .xProc */)) = autoinstall_test_funcs // test_func.c:938:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 24 /* .xProc */)) = abuse_create_function // test_func.c:939:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 40 /* .xProc */)) = install_fts3_rank_function // test_func.c:940:41: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 8 /* .xProc */)) = hexio_read // test_hexio.c:451:40: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 24 /* .xProc */)) = hexio_write // test_hexio.c:452:40: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 40 /* .xProc */)) = hexio_get_int // test_hexio.c:453:40: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 56 /* .xProc */)) = hexio_render_int16 // test_hexio.c:454:40: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 72 /* .xProc */)) = hexio_render_int32 // test_hexio.c:455:40: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 88 /* .xProc */)) = utf8_to_utf8 // test_hexio.c:456:40: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 104 /* .xProc */)) = read_fts3varint // test_hexio.c:457:40: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 120 /* .xProc */)) = make_fts3record // test_hexio.c:458:40: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 8 /* .xProc */)) = init_wrapper_install // test_init.c:283:32: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 24 /* .xProc */)) = init_wrapper_query // test_init.c:284:32: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 40 /* .xProc */)) = init_wrapper_uninstall // test_init.c:285:32: - *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 56 /* .xProc */)) = init_wrapper_clear // test_init.c:286:32: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2072 /* .xProc */)) = test_stmt_int // test1.c:8038:34: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2080 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32) int32 + }{sqlite3.Xsqlite3_column_bytes16})) // test1.c:8038:49: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2096 /* .xProc */)) = test_stmt_utf16 // test1.c:8039:34: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2104 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32) uintptr + }{sqlite3.Xsqlite3_column_text16})) // test1.c:8039:51: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2120 /* .xProc */)) = test_stmt_utf16 // test1.c:8040:34: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2128 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32) uintptr + }{sqlite3.Xsqlite3_column_name16})) // test1.c:8040:51: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2144 /* .xProc */)) = add_alignment_test_collations // test1.c:8041:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2168 /* .xProc */)) = test_stmt_utf16 // test1.c:8043:36: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2176 /* .clientData */)) = *(*uintptr)(unsafe.Pointer(&struct { + f func(*crt.TLS, uintptr, int32) uintptr + }{sqlite3.Xsqlite3_column_decltype16})) // test1.c:8043:52: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2192 /* .xProc */)) = test_create_collation_v2 // test1.c:8052:39: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2216 /* .xProc */)) = test_global_recover // test1.c:8053:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2240 /* .xProc */)) = working_64bit_int // test1.c:8054:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2264 /* .xProc */)) = vfs_unlink_test // test1.c:8055:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2288 /* .xProc */)) = vfs_initfail_test // test1.c:8056:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2312 /* .xProc */)) = vfs_unregister_all // test1.c:8057:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2336 /* .xProc */)) = vfs_reregister_all // test1.c:8058:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2360 /* .xProc */)) = file_control_test // test1.c:8059:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2384 /* .xProc */)) = file_control_lasterrno_test // test1.c:8060:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2408 /* .xProc */)) = file_control_lockproxy_test // test1.c:8061:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2432 /* .xProc */)) = file_control_chunksize_test // test1.c:8062:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2456 /* .xProc */)) = file_control_sizehint_test // test1.c:8063:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2480 /* .xProc */)) = file_control_data_version // test1.c:8064:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2504 /* .xProc */)) = file_control_persist_wal // test1.c:8070:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2528 /* .xProc */)) = file_control_powersafe_overwrite // test1.c:8071:43: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2552 /* .xProc */)) = file_control_vfsname // test1.c:8072:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2576 /* .xProc */)) = file_control_tempfilename // test1.c:8073:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2600 /* .xProc */)) = vfs_list // test1.c:8074:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2624 /* .xProc */)) = test_create_function_v2 // test1.c:8075:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2648 /* .xProc */)) = test_collate // test1.c:8079:35: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2672 /* .xProc */)) = test_collate_needed // test1.c:8080:35: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2696 /* .xProc */)) = test_function // test1.c:8081:35: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2720 /* .xProc */)) = test_utf16bin_collate // test1.c:8082:40: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2744 /* .xProc */)) = test_errstr // test1.c:8084:35: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2768 /* .xProc */)) = tcl_variable_type // test1.c:8085:35: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2792 /* .xProc */)) = test_enable_shared // test1.c:8087:39: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2816 /* .xProc */)) = sqlite3BtreeSharedCacheReport // test1.c:8088:39: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2840 /* .xProc */)) = test_libversion_number // test1.c:8090:37: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2864 /* .xProc */)) = test_table_column_metadata // test1.c:8091:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2888 /* .xProc */)) = test_blob_reopen // test1.c:8093:31: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2912 /* .xProc */)) = test_pcache_stats // test1.c:8095:30: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2936 /* .xProc */)) = test_unlock_notify // test1.c:8097:33: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2960 /* .xProc */)) = test_wal_checkpoint // test1.c:8099:36: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 2984 /* .xProc */)) = test_wal_checkpoint_v2 // test1.c:8100:36: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3008 /* .xProc */)) = test_wal_autocheckpoint // test1.c:8101:37: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3032 /* .xProc */)) = test_sqlite3_log // test1.c:8102:36: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3056 /* .xProc */)) = test_print_eqp // test1.c:8104:36: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3080 /* .xProc */)) = test_test_control // test1.c:8106:32: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3104 /* .xProc */)) = test_getrusage // test1.c:8108:21: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3128 /* .xProc */)) = tclLoadStaticExtensionCmd // test1.c:8110:33: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3152 /* .xProc */)) = sorter_test_fakeheap // test1.c:8111:32: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3176 /* .xProc */)) = sorter_test_sort4_helper // test1.c:8112:36: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3200 /* .xProc */)) = vfsCurrentTimeInt64 // test1.c:8126:44: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3224 /* .xProc */)) = test_delete_database // test1.c:8137:35: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3248 /* .xProc */)) = test_atomic_batch_write // test1.c:8138:35: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3272 /* .xProc */)) = test_mmap_warm // test1.c:8139:35: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3296 /* .xProc */)) = test_config_sorterref // test1.c:8140:36: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd)) + 3320 /* .xProc */)) = test_decode_hexdb // test1.c:8141:36: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 8 /* .xProc */)) = register_echo_module // test8.c:1434:38: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd1)) + 32 /* .xProc */)) = declare_vtab // test8.c:1435:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 8 /* .xProc */)) = test_malloc // test_malloc.c:1506:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 32 /* .xProc */)) = test_realloc // test_malloc.c:1507:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 56 /* .xProc */)) = test_free // test_malloc.c:1508:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 80 /* .xProc */)) = test_memset // test_malloc.c:1509:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 104 /* .xProc */)) = test_memget // test_malloc.c:1510:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 128 /* .xProc */)) = test_memory_used // test_malloc.c:1511:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 152 /* .xProc */)) = test_memory_highwater // test_malloc.c:1512:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 176 /* .xProc */)) = test_memdebug_backtrace // test_malloc.c:1513:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 200 /* .xProc */)) = test_memdebug_dump // test_malloc.c:1514:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 224 /* .xProc */)) = test_memdebug_fail // test_malloc.c:1515:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 248 /* .xProc */)) = test_memdebug_pending // test_malloc.c:1516:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 272 /* .xProc */)) = test_memdebug_settitle // test_malloc.c:1517:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 296 /* .xProc */)) = test_memdebug_malloc_count // test_malloc.c:1518:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 320 /* .xProc */)) = test_memdebug_log // test_malloc.c:1519:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 344 /* .xProc */)) = test_config_pagecache // test_malloc.c:1520:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 368 /* .xProc */)) = test_alt_pcache // test_malloc.c:1521:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 392 /* .xProc */)) = test_status // test_malloc.c:1522:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 416 /* .xProc */)) = test_db_status // test_malloc.c:1523:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 440 /* .xProc */)) = test_install_malloc_faultsim // test_malloc.c:1524:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 464 /* .xProc */)) = test_config_heap // test_malloc.c:1525:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 488 /* .xProc */)) = test_config_heap_size // test_malloc.c:1526:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 512 /* .xProc */)) = test_config_memstatus // test_malloc.c:1527:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 536 /* .xProc */)) = test_config_lookaside // test_malloc.c:1528:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 560 /* .xProc */)) = test_config_error // test_malloc.c:1529:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 584 /* .xProc */)) = test_config_uri // test_malloc.c:1530:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 608 /* .xProc */)) = test_config_cis // test_malloc.c:1531:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 632 /* .xProc */)) = test_config_pmasz // test_malloc.c:1532:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 656 /* .xProc */)) = test_db_config_lookaside // test_malloc.c:1533:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 680 /* .xProc */)) = test_dump_memsys3 // test_malloc.c:1534:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 704 /* .xProc */)) = test_dump_memsys3 // test_malloc.c:1535:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 728 /* .xProc */)) = test_install_memsys3 // test_malloc.c:1536:38: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd10)) + 752 /* .xProc */)) = test_vfs_oom_test // test_malloc.c:1537:41: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd11)) + 8 /* .xProc */)) = register_schema_module // test_schema.c:336:34: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd12)) + 8 /* .xProc */)) = register_tclvar_module // test_tclvar.c:553:36: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd13)) + 8 /* .xProc */)) = test_create_window // test_window.c:337:42: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd13)) + 32 /* .xProc */)) = test_create_window_misuse // test_window.c:338:46: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd13)) + 56 /* .xProc */)) = test_create_sumint // test_window.c:339:30: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd13)) + 80 /* .xProc */)) = test_override_sum // test_window.c:340:29: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd2)) + 8 /* .xProc */)) = c_misuse_test // test9.c:194:28: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd2)) + 32 /* .xProc */)) = c_realloc_test // test9.c:195:28: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd2)) + 56 /* .xProc */)) = c_collation_test // test9.c:196:28: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd3)) + 8 /* .xProc */)) = register_tcl_module // test_bestindex.c:611:33: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd4)) + 8 /* .xProc */)) = test_blob_open // test_blob.c:318:40: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd4)) + 24 /* .xProc */)) = test_blob_close // test_blob.c:319:40: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd4)) + 40 /* .xProc */)) = test_blob_bytes // test_blob.c:320:40: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd4)) + 56 /* .xProc */)) = test_blob_read // test_blob.c:321:40: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd4)) + 72 /* .xProc */)) = test_blob_write // test_blob.c:322:40: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd5)) + 8 /* .xProc */)) = register_fs_module // test_fs.c:908:32: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd6)) + 8 /* .xProc */)) = autoinstall_test_funcs // test_func.c:938:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd6)) + 24 /* .xProc */)) = abuse_create_function // test_func.c:939:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd6)) + 40 /* .xProc */)) = install_fts3_rank_function // test_func.c:940:41: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 8 /* .xProc */)) = hexio_read // test_hexio.c:451:40: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 24 /* .xProc */)) = hexio_write // test_hexio.c:452:40: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 40 /* .xProc */)) = hexio_get_int // test_hexio.c:453:40: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 56 /* .xProc */)) = hexio_render_int16 // test_hexio.c:454:40: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 72 /* .xProc */)) = hexio_render_int32 // test_hexio.c:455:40: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 88 /* .xProc */)) = utf8_to_utf8 // test_hexio.c:456:40: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 104 /* .xProc */)) = read_fts3varint // test_hexio.c:457:40: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd7)) + 120 /* .xProc */)) = make_fts3record // test_hexio.c:458:40: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 8 /* .xProc */)) = init_wrapper_install // test_init.c:283:32: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 24 /* .xProc */)) = init_wrapper_query // test_init.c:284:32: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 40 /* .xProc */)) = init_wrapper_uninstall // test_init.c:285:32: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd8)) + 56 /* .xProc */)) = init_wrapper_clear // test_init.c:286:32: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 8 /* .xProc */)) = test_intarray_create // test_intarray.c:381:35: + *(*func(*crt.TLS, ClientData, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&aObjCmd9)) + 32 /* .xProc */)) = test_intarray_bind // test_intarray.c:382:33: *(*sqlite3_syscall_ptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&aSyscall)) + 8 /* .xTest */)) = *(*uintptr)(unsafe.Pointer(&struct { f func(*crt.TLS, uintptr, int32, int32) int32 }{ts_open})) // test_syscall.c:134:27: @@ -70200,6 +71231,29 @@ func init() { *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 112 /* .xSleep */)) = cfSleep // test6.c:862:5: *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 120 /* .xCurrentTime */)) = cfCurrentTime // test6.c:863:5: *(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&crashVfs)) + 128 /* .xGetLastError */)) = cfGetLastError // test6.c:864:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 8 /* .xClose */)) = demoClose // test_demovfs.c:402:5: + *(*func(*crt.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 16 /* .xRead */)) = demoRead // test_demovfs.c:403:5: + *(*func(*crt.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 24 /* .xWrite */)) = demoWrite // test_demovfs.c:404:5: + *(*func(*crt.TLS, uintptr, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 32 /* .xTruncate */)) = demoTruncate // test_demovfs.c:405:5: + *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 40 /* .xSync */)) = demoSync // test_demovfs.c:406:5: + *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 48 /* .xFileSize */)) = demoFileSize // test_demovfs.c:407:5: + *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 56 /* .xLock */)) = demoLock // test_demovfs.c:408:5: + *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 64 /* .xUnlock */)) = demoUnlock // test_demovfs.c:409:5: + *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 72 /* .xCheckReservedLock */)) = demoCheckReservedLock // test_demovfs.c:410:5: + *(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 80 /* .xFileControl */)) = demoFileControl // test_demovfs.c:411:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 88 /* .xSectorSize */)) = demoSectorSize // test_demovfs.c:412:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demoio)) + 96 /* .xDeviceCharacteristics */)) = demoDeviceCharacteristics // test_demovfs.c:413:5: + *(*func(*crt.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 40 /* .xOpen */)) = demoOpen // test_demovfs.c:627:5: + *(*func(*crt.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 48 /* .xDelete */)) = demoDelete // test_demovfs.c:628:5: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 56 /* .xAccess */)) = demoAccess // test_demovfs.c:629:5: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 64 /* .xFullPathname */)) = demoFullPathname // test_demovfs.c:630:5: + *(*func(*crt.TLS, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 72 /* .xDlOpen */)) = demoDlOpen // test_demovfs.c:631:5: + *(*func(*crt.TLS, uintptr, int32, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 80 /* .xDlError */)) = demoDlError // test_demovfs.c:632:5: + *(*func(*crt.TLS, uintptr, uintptr, uintptr) uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 88 /* .xDlSym */)) = demoDlSym // test_demovfs.c:633:5: + *(*func(*crt.TLS, uintptr, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 96 /* .xDlClose */)) = demoDlClose // test_demovfs.c:634:5: + *(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 104 /* .xRandomness */)) = demoRandomness // test_demovfs.c:635:5: + *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 112 /* .xSleep */)) = demoSleep // test_demovfs.c:636:5: + *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&demovfs)) + 120 /* .xCurrentTime */)) = demoCurrentTime // test_demovfs.c:637:5: *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 8 /* .xClose */)) = devsymClose // test_devsym.c:229:3: *(*func(*crt.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 16 /* .xRead */)) = devsymRead // test_devsym.c:230:3: *(*func(*crt.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&devsym_io_methods)) + 24 /* .xWrite */)) = devsymWrite // test_devsym.c:231:3: @@ -70422,22 +71476,7 @@ func init() { *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 80 /* .xEof */)) = prefixesEof // prefixes.c:238:21: *(*func(*crt.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 88 /* .xColumn */)) = prefixesColumn // prefixes.c:239:21: *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&prefixesModule)) + 96 /* .xRowid */)) = prefixesRowid // prefixes.c:240:21: - *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 8 /* .xClose */)) = rbuVfsClose // sqlite3rbu.c:4951:5: - *(*func(*crt.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 16 /* .xRead */)) = rbuVfsRead // sqlite3rbu.c:4952:5: - *(*func(*crt.TLS, uintptr, uintptr, int32, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 24 /* .xWrite */)) = rbuVfsWrite // sqlite3rbu.c:4953:5: - *(*func(*crt.TLS, uintptr, sqlite_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 32 /* .xTruncate */)) = rbuVfsTruncate // sqlite3rbu.c:4954:5: - *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 40 /* .xSync */)) = rbuVfsSync // sqlite3rbu.c:4955:5: - *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 48 /* .xFileSize */)) = rbuVfsFileSize // sqlite3rbu.c:4956:5: - *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 56 /* .xLock */)) = rbuVfsLock // sqlite3rbu.c:4957:5: - *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 64 /* .xUnlock */)) = rbuVfsUnlock // sqlite3rbu.c:4958:5: - *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 72 /* .xCheckReservedLock */)) = rbuVfsCheckReservedLock // sqlite3rbu.c:4959:5: - *(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 80 /* .xFileControl */)) = rbuVfsFileControl // sqlite3rbu.c:4960:5: - *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 88 /* .xSectorSize */)) = rbuVfsSectorSize // sqlite3rbu.c:4961:5: - *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 96 /* .xDeviceCharacteristics */)) = rbuVfsDeviceCharacteristics // sqlite3rbu.c:4962:5: - *(*func(*crt.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 104 /* .xShmMap */)) = rbuVfsShmMap // sqlite3rbu.c:4963:5: - *(*func(*crt.TLS, uintptr, int32, int32, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 112 /* .xShmLock */)) = rbuVfsShmLock // sqlite3rbu.c:4964:5: - *(*func(*crt.TLS, uintptr))(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 120 /* .xShmBarrier */)) = rbuVfsShmBarrier // sqlite3rbu.c:4965:5: - *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&rbuvfs_io_methods)) + 128 /* .xShmUnmap */)) = rbuVfsShmUnmap // sqlite3rbu.c:4966:5: + *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&pzNeededCollation)) + 0)) = uintptr(unsafe.Pointer(&zNeededCollation)) // test1.c:3130:34: *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 8 /* .xCreate */)) = schemaCreate // test_schema.c:276:3: *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 16 /* .xConnect */)) = schemaCreate // test_schema.c:277:3: *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&schemaModule)) + 24 /* .xBestIndex */)) = schemaBestIndex // test_schema.c:278:3: @@ -70559,14 +71598,6 @@ func init() { *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 80 /* .xEof */)) = unionEof // unionvtab.c:1341:5: *(*func(*crt.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 88 /* .xColumn */)) = unionColumn // unionvtab.c:1342:5: *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&unionModule)) + 96 /* .xRowid */)) = unionRowid // unionvtab.c:1343:5: - *(*func(*crt.TLS, uintptr, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 40 /* .xOpen */)) = rbuVfsOpen // sqlite3rbu.c:5222:5: - *(*func(*crt.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 48 /* .xDelete */)) = rbuVfsDelete // sqlite3rbu.c:5223:5: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 56 /* .xAccess */)) = rbuVfsAccess // sqlite3rbu.c:5224:5: - *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 64 /* .xFullPathname */)) = rbuVfsFullPathname // sqlite3rbu.c:5225:5: - *(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 104 /* .xRandomness */)) = rbuVfsRandomness // sqlite3rbu.c:5236:5: - *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 112 /* .xSleep */)) = rbuVfsSleep // sqlite3rbu.c:5237:5: - *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 120 /* .xCurrentTime */)) = rbuVfsCurrentTime // sqlite3rbu.c:5238:5: - *(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfs_template)) + 128 /* .xGetLastError */)) = rbuVfsGetLastError // sqlite3rbu.c:5239:5: *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 8 /* .xClose */)) = vfslogClose // test_osinst.c:204:3: *(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 16 /* .xRead */)) = vfslogRead // test_osinst.c:205:3: *(*func(*crt.TLS, uintptr, uintptr, int32, sqlite3_int64) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&vfslog_io_methods)) + 24 /* .xWrite */)) = vfslogWrite // test_osinst.c:206:3: @@ -70643,7 +71674,23 @@ func init() { *(*func(*crt.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 104 /* .xRandomness */)) = devsymRandomness // test_devsym.c:472:3: *(*func(*crt.TLS, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 112 /* .xSleep */)) = devsymSleep // test_devsym.c:473:3: *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&writecrash_vfs)) + 120 /* .xCurrentTime */)) = devsymCurrentTime // test_devsym.c:474:3: -} - -var ts1 = "*pRc==0\x00testdata/sqlite-src-3320300/ext/expert/sqlite3expert.c\x00nByte>0\x00idxMalloc\x00iHash>=0\x00idxHashAdd\x00idxHashFind\x00idxNewConstraint\x00%s\x00zIn[0]=='\\''\x00zIn[n-1]=='\\''\x00zIn[iIn+1]=='\\''\x00expertDequote\x00internal error!\x00sqlite3_stricmp(p->pTab->zName, argv[2])==0\x00expertConnect\x00pCsr->pData\x00expertNext\x00SELECT * FROM main.%Q WHERE sample()\x00expert\x00PRAGMA table_info=%Q\x00main\x00, \x00%Q\x00 COLLATE %Q\x00 COLLATE %s\x00 DESC\x00PRAGMA index_list=%Q\x00PRAGMA index_xInfo=%Q\x00%s_idx_%08x\x00CREATE INDEX '%q' ON %Q(%s)\x00CREATE INDEX %s ON %s(%s)\x00pCon->pLink==0\x00idxCreateFromWhere\x00EXPLAIN QUERY PLAN %s\x00 USING INDEX \x00 USING COVERING INDEX \x00%s\n\x00%s;\n\x00SELECT 'CREATE TEMP' || substr(sql, 7) FROM sqlite_master WHERE tbl_name = %Q AND type IN ('table', 'trigger') ORDER BY type;\x00ALTER TABLE temp.%Q RENAME TO %Q\x00INSERT INTO %Q VALUES(\x00%s?\x00\x00)\x00UPDATE %Q SET \x00%s%Q=?\x00pWrite->eOp==9\x00DELETE FROM %Q\x00idxProcessOneTrigger\x00t592690916721053953805701627921227776\x00DROP TABLE t592690916721053953805701627921227776\x00SELECT type, name, sql, 1 FROM sqlite_master WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%%' UNION ALL SELECT type, name, sql, 2 FROM sqlite_master WHERE type = 'trigger' AND tbl_name IN(SELECT name FROM sqlite_master WHERE type = 'view') ORDER BY 4, 1\x00CREATE TABLE x(\x00%s%Q COLLATE %s\x00CREATE VIRTUAL TABLE %Q USING expert(%Q)\x00argc==0\x00idxSampleFunc\x00argc==2\x00iSlot<=p->nSlot\x00idxRemFunc\x00SELECT max(i.seqno) FROM sqlite_master AS s, pragma_index_list(s.name) AS l, pragma_index_info(l.name) AS i WHERE s.type = 'table'\x00p->iSample>0\x00%sx.%Q IS rem(%d, x.%Q) COLLATE %s\x00%s%d\x00SELECT %s FROM %Q x ORDER BY %s\x00SELECT %s FROM temp.t592690916721053953805701627921227776 x ORDER BY %s\x00%d\x00 %d\x00pEntry->zVal2==0\x00idxPopulateOneStat1\x00DROP TABLE IF EXISTS temp.t592690916721053953805701627921227776\x00CREATE TABLE temp.t592690916721053953805701627921227776 AS SELECT * FROM %Q\x00SELECT s.rowid, s.name, l.name FROM sqlite_master AS s, pragma_index_list(s.name) AS l WHERE s.type = 'table'\x00SELECT name, coll FROM pragma_index_xinfo(?) WHERE key\x00INSERT INTO sqlite_stat1 VALUES(?, ?, ?)\x00ANALYZE; PRAGMA writable_schema=1\x00rem\x00sample\x00ANALYZE sqlite_master\x00:memory:\x00SELECT sql FROM sqlite_master WHERE name NOT LIKE 'sqlite_%%' AND sql NOT LIKE 'CREATE VIRTUAL %%'\x00%s;%s%s\n\x00 -- stat1: \x00no such handle: \x00sql\x00TABLE\x00analyze\x00count\x00report\x00STMT EREPORT\x00destroy\x00SUBCOMMAND ...\x00sub-command\x00indexes\x00plan\x00candidates\x001==1\x00testdata/sqlite-src-3320300/ext/expert/test_expert.c\x002==2\x003==3\x004==4\x00iSub==4\x00testExpertCmd\x00DB\x00sqlite3expert%d\x00out of memory\x00sqlite3_expert_new\x00pBalance==pOld\x00testdata/sqlite-src-3320300/ext/misc/amatch.c\x00amatchAvlRemove\x00%s: cost must be between 1 and %d\x00%s: maximum string length is %d\x00%s: iLang must be between 0 and %d\x00?\x00SELECT * FROM %Q.%Q\x00%s: %s\x00%s: %s has %d columns, expected 4\x00p->pRule==0\x00amatchLoadRules\x00(int)strlen(zOut)<=nIn\x00amatchDequote\x00p->nCursor==0\x00amatchDisconnect\x00vocabulary_table\x00vocabulary_word\x00vocabulary_language\x00edit_distances\x00unrecognized argument: [%s]\n\x00no edit_distances table specified\x00CREATE TABLE x(word,distance,language,command HIDDEN,nword HIDDEN)\x000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^abcdefghijklmnopqrstuvwxyz~\x00pOther==0\x00amatchAddWord\x00SELECT \"%w\" FROM \"%w\"\x00 WHERE \"%w\">=?1 AND \"%w\"=?2 ORDER BY 1\x00SELECT \"%w\" FROM \"%w\" WHERE \"%w\">=?1 ORDER BY 1\x00*\x00DELETE from %s is not allowed\x00UPDATE of %s is not allowed\x00INSERT INTO %s allowed for column [command] only\x00approximate_match\x00int32\x00int64\x00double\x00char*\x00CREATE TABLE x(value,pointer hidden,count hidden,ctype hidden)\x00carray\x00unknown datatype: %Q\x00inttoptr\x00testdata/sqlite-src-3320300/ext/misc/closure.c\x00closureDequote\x00closureDisconnect\x00tablename\x00idcolumn\x00parentcolumn\x00CREATE TABLE x(id,depth,root HIDDEN,tablename HIDDEN,idcolumn HIDDEN,parentcolumn HIDDEN)\x00SELECT \"%w\".\"%w\" FROM \"%w\" WHERE \"%w\".\"%w\"=?1\x00transitive_closure\x00rb\x00cannot open '%s' for reading\x00p->in==0\x00testdata/sqlite-src-3320300/ext/misc/csv.c\x00csv_reader_open\x00p->iIn>=p->nIn\x00p->in!=0\x00csv_getc_refill\x00line %d: unescaped %c character\x00line %d: unterminated %c-quoted field\n\x00more than one '%s' parameter\x00yes\x00on\x00true\x00no\x00off\x00false\x00sizeof(azPValue)==sizeof(azParam)\x00header\x00more than one 'header' parameter\x00testflags\x00columns\x00more than one 'columns' parameter\x00column= value must be positive\x00bad parameter: '%s'\x00must specify either filename= or data= but not both\x00%sc%d TEXT\x00,\x00%s\"%w\" TEXT\x00bad schema: '%s' - %s\x00csvtabConnect\x00filename\x00data\x00schema\x00pCur->rdr.zIn==pTab->zData\x00pTab->iStart>=0\x00(size_t)pTab->iStart<=pCur->rdr.nIn\x00csvtabFilter\x00csv\x00csv_wr\x00 \x00eval\x00CREATE TABLE x(addr,opcode,p1,p2,p3,p4,p5,comment,sql HIDDEN)\x00EXPLAIN %s\x00explain\x00wb\x00wrong number of arguments to function writefile()\x00failed to create symlink: %s\x00failed to create directory: %s\x00failed to write file: %s\x00CREATE TABLE x(name,mode,mtime,data,path HIDDEN,dir HIDDEN)\x00cannot read directory: %s\x00%s/%s\x00cannot stat file: %s\x00table function fsdir requires an argument\x00argc==idxNum && (argc==1 || argc==2)\x00testdata/sqlite-src-3320300/ext/misc/fileio.c\x00table function fsdir requires a non-NULL argument\x00fsdirFilter\x00fsdir\x00readfile\x00writefile\x00lsmode\x00%s: ruleset must be between 0 and %d\x00%s: wrong number of CREATE VIRTUAL TABLE arguments\x00CREATE TABLE x(word,distance,ruleset)\x00fuzzer\x00sizeof(m)==sizeof(r)\x00testdata/sqlite-src-3320300/ext/misc/ieee754.c\x00ieee754(%lld,%d)\x00ieee754func\x00ieee754\x00BEGIN; SELECT * FROM %s%q%ssqlite_master\x00'\x00'.\x00PRAGMA %s%q%spage_size\x00sqlite3_mmap_warm_cache: Warmed up %d pages of %s\x00END\x00AND (%s)\x00collate \"%w\"\x00SELECT %s FROM %s WHERE %s>=(?1 || ?2) %s AND %s<=(?1 || char(1114111)) %s %s ORDER BY 1 %s ASC LIMIT 1\x00next_char\x00NULL\x00is\x00not\x00in(\x00in(select\x00in(with\x00?,?,?\x00sizeof(u)==sizeof(r)\x00testdata/sqlite-src-3320300/ext/misc/percentile.c\x00isInfinity\x002nd argument to percentile() is not a number between 0.0 and 100.0\x002nd argument to percentile() is not the same for all input rows\x001st argument to percentile() is not numeric\x00Inf input to percentile()\x00percentStep\x00percentile\x00CREATE TABLE prefixes(prefix TEXT, original_string TEXT HIDDEN)\x00prefixes\x00prefix_length\x00unknown \\ escape\x00afnrtv\\()*.+?[$^{|}]\x00\a\f\n\r\t\v\x00unmatched '('\x00'*' without operand\x00'+' without operand\x00'?' without operand\x00'{m,n}' without operand\x00unmatched '{'\x00n less than m in '{m,n}'\x00both m and n are zero in '{m,n}'\x00POSIX character classes not supported\x00unclosed '['\x00unrecognized character\x00regexp\x00testdata/sqlite-src-3320300/ext/misc/remember.c\x00rememberFunc\x00remember\x00CREATE TABLE x(value,start hidden,stop hidden,step hidden)\x002 == 1+1\x00testdata/sqlite-src-3320300/ext/misc/series.c\x003 == 1+2\x00iCol>=0 && iCol<=2\x00seriesBestIndex\x00generate_series() requires SQLite 3.8.12 or later\x00generate_series\x00.ABCDHLRMY9 ?\x00non-ASCII input to editdist()\x00NULL input to editdist()\x00SELECT iLang, cFrom, cTo, iCost FROM \"%w\" WHERE iLang>=0 ORDER BY iLang\x00editdist3\x00DROP TABLE IF EXISTS \"%w\".\"%w_vocab\"\x00CREATE TABLE x(word,rank,distance,langid, score, matchlen, phonehash HIDDEN, top HIDDEN, scope HIDDEN, srchcnt HIDDEN, soundslike HIDDEN, command HIDDEN)\x00CREATE TABLE IF NOT EXISTS \"%w\".\"%w_vocab\"(\n id INTEGER PRIMARY KEY,\n rank INT,\n langid INT,\n word TEXT,\n k1 TEXT,\n k2 TEXT\n);\n\x00CREATE INDEX IF NOT EXISTS \"%w\".\"%w_vocab_index_langid_k2\" ON \"%w_vocab\"(langid,k2);\x00edit_cost_table=\x00bad argument to spellfix1(): \"%s\"\x00SELECT id, word, rank, coalesce(k1,word) FROM \"%w\".\"%w_vocab\" WHERE langid=%d AND k2>=?1 AND k2<?2\x00SELECT word, rank, NULL, langid, id FROM \"%w\".\"%w_vocab\"%s\x00 WHERE rowid=?\x00ROLLBACK\x00IGNORE\x00ABORT\x00REPLACE\x00DELETE FROM \"%w\".\"%w_vocab\" WHERE id=%lld\x00NOT NULL constraint failed: %s.word\x00reset\x00null\x00unknown value for %s.command: \"%w\"\x00INSERT INTO \"%w\".\"%w_vocab\"(rank,langid,word,k1,k2) VALUES(%d,%d,%Q,nullif(%Q,%Q),%Q)\x00INSERT OR %s INTO \"%w\".\"%w_vocab\"(id,rank,langid,word,k1,k2) VALUES(%lld,%d,%d,%Q,nullif(%Q,%Q),%Q)\x00UPDATE OR %s \"%w\".\"%w_vocab\" SET id=%lld, rank=%d, langid=%d, word=%Q, k1=nullif(%Q,%Q), k2=%Q WHERE id=%lld\x00ALTER TABLE \"%w\".\"%w_vocab\" RENAME TO \"%w_vocab\"\x00spellfix1_translit\x00spellfix1_editdist\x00spellfix1_phonehash\x00spellfix1_scriptcode\x00spellfix1\x00922337203685477580\x00u<=(0xffffffff|(((sqlite3_int64)0x7fffffff)<<32))\x00testdata/sqlite-src-3320300/ext/misc/totype.c\x00u-1==(0xffffffff|(((sqlite3_int64)0x7fffffff)<<32))\x00(*pNum)==(((sqlite3_int64)-1) - (0xffffffff|(((sqlite3_int64)0x7fffffff)<<32)))\x00totypeAtoi64\x00argc==1\x00sqlite3_value_type(argv[0])==5\x00tointegerFunc\x00torealFunc\x00tointeger\x00toreal\x00testdata/sqlite-src-3320300/ext/misc/unionvtab.c\x00unionMalloc\x000\x00unionDequote\x00pzErr\x00sql error: %s\x00unionPrepare\x00p->db\x00unionCloseSources\x00_rowid_\x00integer\x00no such rowid table: %s%s%s\x00.\x00SELECT group_concat(quote(name) || '.' || quote(type)) FROM pragma_table_info(?, ?)\x00*pzErr==0\x00source table schema mismatch\x00unionSourceCheck\x00pTab->bSwarm && iSrc<pTab->nSrc\x00unionOpenDatabase\x00pSrc->nUser>=0 && pSrc->db\x00unionIncrRefcount\x00pSrc->nUser>=0\x00unionFinalizeCsrStmt\x00swarmvtab: no such SQL parameter: %s\x00maxopen\x00swarmvtab: illegal maxopen value\x00missing\x00swarmvtab: duplicate \"missing\" option\x00SELECT \"%w\"(?%s)\x00,?\x00openclose\x00swarmvtab: duplicate \"openclose\" option\x00SELECT \"%w\"(?,?%s)\x00swarmvtab: unrecognized option: %s\x00SELECT \"%w\"(?)\x00swarmvtab: parse error: %s\x00swarmvtab\x00unionvtab\x00temp\x00%s tables must be created in TEMP schema\x00wrong number of arguments for %s\x00SELECT * FROM (%z) ORDER BY 3\x00rc==0\x00rowid range mismatch error\x00no source tables configured\x00SELECT 'CREATE TABLE xyz(' || group_concat(quote(name) || ' ' || type, ', ') || ')',max((cid+1) * (type='INTEGER' COLLATE nocase AND pk=1))-1 FROM pragma_table_info(%Q, ?)\x00unionConnect\x00pCsr->pStmt\x00SELECT rowid, * FROM %Q %s %lld\x00WHERE _rowid_ <=\x00-- \x00doUnionNext\x00idxNum==0 || idxNum==2 || idxNum==8 || idxNum==32 || idxNum==16 || idxNum==4 || idxNum==(32|8)\x00argc>=1\x00%z%sSELECT rowid, * FROM %s%q%s%Q\x00 UNION ALL \x00%z WHERE rowid=%lld\x00WHERE\x00%z WHERE rowid>=%lld\x00AND\x00%z %s rowid<=%lld\x00unionFilter\x00CREATE TABLE x(value)\x00wholenumber\x00testdata/sqlite-src-3320300/ext/rbu/sqlite3rbu.c\x00corrupt fossil delta\x00rbuFossilDeltaFunc\x00*pzErrmsg==0\x00prepareFreeAndCollectError\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;\x00argc==1 || argc==2\x00argc==2 || argc==1\x00rbuTargetNameFunc\x00SELECT rbu_target_name(name, type='view') AS target, name FROM sqlite_master 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_master WHERE type='index' AND tbl_name = ?\x00rbuMalloc\x00p->rc==0\x00SELECT (sql LIKE 'create virtual%%'), rootpage FROM sqlite_master WHERE name=%Q\x00SELECT rootpage FROM sqlite_master WHERE name = %Q\x00rbuTableType\x00PRAGMA main.index_list = %Q\x00PRAGMA main.index_xinfo = %Q\x00pIter->eType==0\x00no such table: %s\x00pIter->eType==1 || pIter->eType==2 || pIter->eType==3 || pIter->eType==4 || pIter->eType==5\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\x00iPk>=0\x00pIter->eType!=5 || pIter->abIndexed==0\x00pIter->eType!=5 || pIter->nIndex==0\x00rbuObjIterCacheTableInfo\x00%z%s\"%w\"\x00%z%s%s\"%w\"%s\x00SELECT max(_rowid_) FROM \"%s%w\"\x00 WHERE _rowid_ > %lld \x00quote(\x00||','||\x00SELECT %s FROM \"%s%w\" ORDER BY %s LIMIT 1\x00 WHERE (%s) > (%s) \x00i<pIter->nTblCol\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)\x00rbuVacuumIndexStart\x00p->zErrmsg==0\x00%z%s(%.*s) COLLATE %Q\x00INTEGER\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 AND \x00rbuObjIterGetIndexCols\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)\x00pIter->zIdx==0\x00PRIMARY KEY(\x00pk\x00%z%s\"%w\"%s\x00%z)\x00rbuWithoutRowidPK\x00SELECT name FROM sqlite_master 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\x00pIter->pTmpInsert==0\x00INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)\x00rbuObjIterPrepareTmpInsert\x00sqlite3_value_int(apVal[0])!=0 || p->objiter.eType==3 || p->objiter.eType==1\x00rbuTmpInsertFunc\x00pIter->zIdxSql==0 && pIter->nIdxCol==0 && pIter->aIdxCol==0\x00SELECT trim(sql) FROM sqlite_master WHERE type='index' AND name=?\x00iIdxCol==0\x00rbuObjIterGetIndexWhere\x00pIter->bCleanup==0\x00 LIMIT -1 OFFSET %d\x00pIter->eType!=5\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\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\x00old\x00new\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 \x00ORDER BY\x00rbuObjIterPrepareAll\x00pUp==0 || pUp->pNext==0\x00UPDATE \"%s%w\" SET %s WHERE %s\x00rbuGetUpdateStmt\x00SELECT k, v FROM %s.rbu_state\x00p->rc || (p->dbMain==0 && p->dbRbu==0)\x00p->rc || ((p)->zTarget==0) || p->zTarget!=0\x00file://%s-vacuum?modeof=%s\x00ATTACH %Q AS stat\x00stat\x00CREATE TABLE IF NOT EXISTS %s.rbu_state(k INTEGER PRIMARY KEY, v)\x00cannot vacuum wal mode database\x00file:\x00file:%s-vactmp?rbu_memory=1%s%s\x00&\x00rbu_tmp_insert\x00rbu_fossil_delta\x00rbu_target_name\x00SELECT * FROM sqlite_master\x00rbu vfs not found\x00rbuOpenDatabase\x00PRAGMA main.wal_checkpoint=restart\x00p->nPagePerSector==0\x00rbuSetupCheckpoint\x00rbuCheckpointFrame\x00rbuLockDatabase\x00%s-oal\x00%s-wal\x00p->eStage==2\x00p->rc==0 && p->zErrmsg==0\x00rbuMoveOalFile\x00eType!=2 || pIter->zIdx==0\x00eType==2 || eType==4 || eType==1 || eType==5\x00datatype mismatch\x00rbuStepOneOp\x00eType==1 || eType==2 || eType==3 || eType==4 || eType==5 || eType==6\x00eType!=6 || pIter->zIdx==0\x00eType==6\x00rbuStep\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) \x00pInsert==0 || rc==0\x00rbuSaveState\x00PRAGMA main.%s\x00PRAGMA main.%s = %d\x00((p)->zTarget==0)\x00PRAGMA writable_schema=1\x00SELECT sql FROM sqlite_master WHERE sql!='' AND rootpage!=0 AND name!='sqlite_sequence' ORDER BY type DESC\x00SELECT * FROM sqlite_master WHERE rootpage=0 OR rootpage IS NULL\x00INSERT INTO sqlite_master VALUES(?,?,?,?,?)\x00PRAGMA writable_schema=0\x00rbuCreateTargetSchema\x00user_version\x00application_id\x00DELETE FROM %s.'rbu_tmp_%q'\x00pIter->zTbl==0\x00COMMIT\x00sqlite3rbu_step\x00rbu_state mismatch error\x00rbuSetupOal\x00pVfs && p->rc==0 && p->zErrmsg==0\x00rbuDeleteOalFile\x00rbu_vfs_%d\x00pVfs\x00rbuCreateVfs\x00nVal==1\x00SELECT count(*) FROM sqlite_master WHERE type='index' AND tbl_name = %Q\x00rbuIndexCntFunc\x00rbu_index_cnt\x00SELECT 1 FROM sqlite_master WHERE tbl_name = 'rbu_count'\x00SELECT sum(cnt * (1 + rbu_index_cnt(rbu_target_name(tbl))))FROM rbu_count\x00pState || p->rc!=0\x00p->rc!=0 || p->eStage!=0\x00cannot update wal mode database\x00database modified during rbu %s\x00vacuum\x00update\x00BEGIN\x00page_size\x00auto_vacuum\x00BEGIN IMMEDIATE\x00PRAGMA journal_mode=off\x00openRbuHandle\x00-vactmp\x00DELETE FROM stat.rbu_state\x00p->szTemp==0\x00sqlite3rbu_close\x00sqlite3rbu_bp_progress\x005==5\x00aRes[1]==1\x00aRes[2]==2\x00aRes[4]==3\x00aRes[5]==4\x00p->rc!=101 || p->eStage==5\x00p->eStage==1 || p->eStage==2 || p->eStage==4 || p->eStage==5\x00sqlite3rbu_state\x00p->eStage>=1 && p->eStage<=5\x00rc!=101\x00sqlite3rbu_savestate\x00p->openFlags & 0x00000100\x00rbuUnlockShm\x00pRbu->szTemp>=0\x00rbuUpdateTempSize\x00(p->openFlags & 0x00000100)\x00rbuMainlistAdd\x00p->pMainNext==0 && p->pRbuVfs->pMain!=p\x00rbuVfsClose\x00p->openFlags & 0x00080000\x00rbuVfsRead\x00rbuVfsWrite\x00p->openFlags & (0x00000100|0x00000200)\x00rbuVfsLock\x00p->openFlags & (0x00000100|0x00000200) || p->openFlags & (0x00000400|0x00001000)\x00rbu/zipvfs setup error\x00rbu(%s)/%z\x00rbuVfsFileControl\x00rbuVfsShmLock\x00iRegion==p->nShm\x00p->apShm==0\x00rbuVfsShmMap\x00rbuVfsShmUnmap\x00rbu_memory\x00oflags & 0x00000100\x00rbuVfsOpen\x00pDb->pRbu\x00rbuVfsAccess\x00rbu_delta\x00step\x00close\x00create_rbu_delta\x00savestate\x00dbMain_eval\x00SQL\x00bp_progress\x00db\x00RBU\x00state\x00progress\x00close_no_error\x00temp_size_limit\x00LIMIT\x00temp_size\x00dbRbu_eval\x00METHOD\x00method\x00zErrmsg==0\x00testdata/sqlite-src-3320300/ext/rbu/test_rbu.c\x00 - \x00oal\x00move\x00checkpoint\x00done\x00error\x00eState>0 && eState<=5\x00!\"cannot happen\"\x00test_sqlite3rbu_cmd\x00NAME TARGET-DB RBU-DB ?STATE-DB?\x00NAME TARGET-DB ?STATE-DB?\x00?-default? NAME PARENT\x00NAME\x00sqlite3rbu_db(0, 0)!=0\x00sqlite3rbu\x00sqlite3rbu_vacuum\x00sqlite3rbu_create_vfs\x00sqlite3rbu_destroy_vfs\x00sqlite3rbu_internal_test\x00!\"Bad seekMode\"\x00testdata/sqlite-src-3320300/src/tclsqlite.c\x00incrblobSeek\x00incrblob\x00incrblob_%d\x00pFunc->pDb==pDb\x00DbDeleteCmd\x00%lld\x00pDb->pRollbackHook\x00DbRollbackHandler\x00pDb->pWalHook\x00db==pDb->db\x00DbWalHandler\x00sqlite_unlock_notify_arg\x00sqlite_unlock_notify_argcount\x00pDb->pUnlockNotify\x00DbUnlockNotify\x00(9-1)/9 == 0\x00(18-1)/9 == 1\x00(23-1)/9 == 2\x00pDb->pUpdateHook\x00op==18 || op==23 || op==9\x00DbUpdateHandler\x00DELETE\x00INSERT\x00UPDATE\x00bytearray\x00boolean\x00wideInt\x00int\x00SQLITE_COPY\x00SQLITE_CREATE_INDEX\x00SQLITE_CREATE_TABLE\x00SQLITE_CREATE_TEMP_INDEX\x00SQLITE_CREATE_TEMP_TABLE\x00SQLITE_CREATE_TEMP_TRIGGER\x00SQLITE_CREATE_TEMP_VIEW\x00SQLITE_CREATE_TRIGGER\x00SQLITE_CREATE_VIEW\x00SQLITE_DELETE\x00SQLITE_DROP_INDEX\x00SQLITE_DROP_TABLE\x00SQLITE_DROP_TEMP_INDEX\x00SQLITE_DROP_TEMP_TABLE\x00SQLITE_DROP_TEMP_TRIGGER\x00SQLITE_DROP_TEMP_VIEW\x00SQLITE_DROP_TRIGGER\x00SQLITE_DROP_VIEW\x00SQLITE_INSERT\x00SQLITE_PRAGMA\x00SQLITE_READ\x00SQLITE_SELECT\x00SQLITE_TRANSACTION\x00SQLITE_UPDATE\x00SQLITE_ATTACH\x00SQLITE_DETACH\x00SQLITE_ALTER_TABLE\x00SQLITE_REINDEX\x00SQLITE_ANALYZE\x00SQLITE_CREATE_VTABLE\x00SQLITE_DROP_VTABLE\x00SQLITE_FUNCTION\x00SQLITE_SAVEPOINT\x00SQLITE_RECURSIVE\x00????\x00SQLITE_DENY\x00SQLITE_OK\x00SQLITE_IGNORE\x00RELEASE _tcl_transaction\x00ROLLBACK TO _tcl_transaction ; RELEASE _tcl_transaction\x00pPreStmt==0\x00pPreStmt\x00strlen30(pPreStmt->zSql)==pPreStmt->nSql\x000==memcmp(pPreStmt->zSql, zSql, pPreStmt->nSql)\x00dbPrepareAndBind\x00pDb->nStmt==0\x00pDb->nStmt>0\x00dbReleaseStmt\x00!(*ppHook)\x00DbHookCmd\x00option\x00?CALLBACK?\x00?DATABASE? FILENAME\x00cannot open target database: \x00backup failed: \x00CALLBACK\x00cache option ?arg?\x00flush\x00size\x00size n\x00cannot convert \"\x00\" to integer\x00bad option \"\x00\": must be flush or size\x00NAME SCRIPT\x00SCRIPT\x00?OPTION? ?BOOLEAN?\x00unknown config option: \"\x00\"\x00CONFLICT-ALGORITHM TABLE FILENAME ?SEPARATOR? ?NULLINDICATOR?\x00\t\x00Error: non-null separator required for copy\x00rollback\x00abort\x00fail\x00ignore\x00replace\x00Error: \"\x00\", conflict-algorithm must be one of: rollback, abort, fail, ignore, or replace\x00Error: no such table: \x00Error: \x00Error: can't malloc()\x00INSERT OR %q INTO '%q' VALUES(?\x00Error: cannot open file: \x00Error: %s line %d: expected %d columns of data but found %d\x00, failed while processing line: \x00MEMDB not available in this build\x00extension loading is turned off at compile-time\x00-withoutnulls\x00unknown option: \"\x00?OPTIONS? SQL ?ARRAY-NAME? ?SCRIPT?\x00NAME ?SWITCHES? SCRIPT\x00-argcount\x00option requires an argument: \x00number of arguments must be non-negative\x00-deterministic\x00-directonly\x00-innocuous\x00-returntype\x00real\x00text\x00blob\x00any\x001==1 && 2==2 && 3==3\x004==4 && 5==5\x00type\x00\": must be -argcount, -deterministic, -directonly, -innocuous, or -returntype\x00-readonly\x00?-readonly? ?DB? TABLE COLUMN ROWID\x00NULLVALUE\x00N CALLBACK\x00KEY\x00cannot open source database: \x00restore failed: \x00restore failed: source database busy\x00(step|sort|autoindex)\x00sort\x00autoindex\x00vmstep\x00bad argument: should be autoindex, step, sort or vmstep\x00MILLISECONDS\x00?CALLBACK? ?MASK?\x00trace type\x00SAVEPOINT _tcl_transaction\x00[TYPE] SCRIPT\x00transaction type\x00BEGIN EXCLUSIVE\x00?SCRIPT?\x00preupdate_hook was omitted at compile-time\x00-use-legacy-prepare\x00-last-stmt-ptr\x00%p\x00unknown argument: \x00DbObjCmd\x00authorizer\x00backup\x00bind_fallback\x00busy\x00cache\x00changes\x00collate\x00collation_needed\x00commit_hook\x00complete\x00config\x00copy\x00deserialize\x00enable_load_extension\x00errorcode\x00exists\x00function\x00interrupt\x00last_insert_rowid\x00nullvalue\x00onecolumn\x00preupdate\x00profile\x00rekey\x00restore\x00rollback_hook\x00serialize\x00status\x00timeout\x00total_changes\x00trace\x00trace_v2\x00transaction\x00unlock_notify\x00update_hook\x00version\x00wal_hook\x00defensive\x00dqs_ddl\x00dqs_dml\x00enable_fkey\x00enable_qpsg\x00enable_trigger\x00enable_view\x00fts3_tokenizer\x00legacy_alter_table\x00legacy_file_format\x00load_extension\x00no_ckpt_on_close\x00reset_database\x00trigger_eqp\x00trusted_schema\x00writable_schema\x00statement\x00row\x00deferred\x00exclusive\x00immediate\x00HANDLE ?FILENAME? ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nofollow BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?\x00-version\x00-sourceid\x00-has-codec\x00-key\x00-vfs\x00-create\x00-nofollow\x00-nomutex\x00-fullmutex\x00-uri\x00-translatefilename\x00unknown option: \x00sqlite3\x00sqlite\x003.32.3\x00if {[llength $argv]>=1} {\nset argv0 [lindex $argv 0]\nset argv [lrange $argv 1 end]\nsource $argv0\n} else {\nset line {}\nwhile {![eof stdin]} {\nif {$line!=\"\"} {\nputs -nonewline \"> \"\n} else {\nputs -nonewline \"% \"\n}\nflush stdout\nappend line [gets stdin]\nif {[info complete $line]} {\nif {[catch {uplevel #0 $line} result]} {\nputs stderr \"Error: $result\"\n} elseif {$result!=\"\"} {\nputs $result\n}\nset line {}\n} else {\nappend line \\n\n}\n}\n}\n\x00SQLITE_DEBUG_BREAK\x00attach debugger to process %d and press any key to continue.\n\x00utf-8\x00argc\x00argv0\x00argv\x00errorInfo\x00%s: %s\n\x00SQLITE-CONNECTION\x00command not found: \x00error code %s (%d) does not match sqlite3_errcode %s (%d)\x00OMIT_MISUSE\x00wrong # args: should be \"\x00 DB FORMAT STRING\x00 DB HEX\x00 DB\x00 DB SQL\x00%s%n\x00abcdefghijklmnopqrstuvwxyz\x00 DB FORMAT STRING ?COUNT?\x00 DB\"\x00 FILENAME\"\x00%02x\x00tkt2213 is not fixed\x00bytes\x00noop\x00x_coalesce\x00hex8\x00tkt2213func\x00pointer_change\x00counter1\x00counter2\x00intreal\x00value of 40 handed to x_count\x00x_count totals to 42\x00x_count\x00legacy_count\x00 TEXT\"\x00 FORMAT INT INT INT\"\x00argument is not a valid 64-bit integer\x00 FORMAT INT INT ?STRING?\"\x00 INT FORMAT INT INT ?STRING?\"\x00N must be non-negative\x00 FORMAT INT INT DOUBLE\"\x00 FORMAT DOUBLE DOUBLE\"\x00 FORMAT STRING\"\x00%08x%08x\x002nd argument should be 16-characters of hex\x00?BOOLEAN?\x00DB BOOLEAN\x00DB dbname tblname colname\x00CHANNEL ROWID\x00DB-HANDLE NAME CMP-PROC DEL-PROC\x00sqlite3_create_collate_v2() failed to detect an invalid encoding\x00utf8\x00utf16\x00utf16le\x00utf16be\x00DB NAME NARG ENC SWITCHES...\x00encoding\x00-func\x00-step\x00-final\x00-destroy\x00switch\x00DB-HANDLE FILE ?PROC?\x00this build omits sqlite3_load_extension()\x00DB-HANDLE ONOFF\x00string\x00value\x00first argument should be one of: int int64 string double null value\x00 DB FUNCTION-NAME\x00 <STMT>\x00STMT PARAMETER RESETFLAG\x00SQLITE_STMTSTATUS_FULLSCAN_STEP\x00SQLITE_STMTSTATUS_SORT\x00SQLITE_STMTSTATUS_AUTOINDEX\x00SQLITE_STMTSTATUS_VM_STEP\x00SQLITE_STMTSTATUS_REPREPARE\x00SQLITE_STMTSTATUS_RUN\x00SQLITE_STMTSTATUS_MEMUSED\x00NBYTE\x00FILE\x00PATH\x00 DB STMT\x00 STMT\x00 FROM-STMT TO-STMT\x00 VM IDX VALUE (null|static|normal)\"\x00static\x00static-nbytes\x00normal\x00blob10\x00abc\x00xyz\x00pq\x004th argument should be \"null\" or \"static\" or \"normal\"\x00(%d) \x00<error code>\x00STMT IDX N\x00 STMT N VALUE\x00NaN\x00SNaN\x00-NaN\x00-SNaN\x00+Inf\x00-Inf\x00Epsilon\x00-Epsilon\x00NaN0\x00-NaN0\x00 STMT N\x00 STMT N VALUE BYTES\x00 STMT N DATA BYTES\x00cannot use %d blob bytes, have %d\x00STMT\x00STMT N\x00STMT NAME\x00 DB sql bytes ?tailvar?\x00 DB sql bytes tailvar\x00 DB sql bytes flags tailvar\x00\x00SELECT 1\x00 filename options-list\x00FILENAME FLAGS VFS\x00SQLITE_OPEN_READONLY\x00SQLITE_OPEN_READWRITE\x00SQLITE_OPEN_CREATE\x00SQLITE_OPEN_DELETEONCLOSE\x00SQLITE_OPEN_EXCLUSIVE\x00SQLITE_OPEN_AUTOPROXY\x00SQLITE_OPEN_MAIN_DB\x00SQLITE_OPEN_TEMP_DB\x00SQLITE_OPEN_TRANSIENT_DB\x00SQLITE_OPEN_MAIN_JOURNAL\x00SQLITE_OPEN_TEMP_JOURNAL\x00SQLITE_OPEN_SUBJOURNAL\x00SQLITE_OPEN_MASTER_JOURNAL\x00SQLITE_OPEN_NOMUTEX\x00SQLITE_OPEN_FULLMUTEX\x00SQLITE_OPEN_SHAREDCACHE\x00SQLITE_OPEN_PRIVATECACHE\x00SQLITE_OPEN_WAL\x00SQLITE_OPEN_URI\x00flag\x00 STMT column\x00FLOAT\x00TEXT\x00BLOB\x00 DB MAGIC\x00SQLITE_MAGIC_OPEN\x00SQLITE_MAGIC_CLOSED\x00SQLITE_MAGIC_BUSY\x00SQLITE_MAGIC_ERROR\x00 DB function-name\x00VARIABLE\x00DB DBNAME\x00?N?\x001234567890000000\x00__one\x00__two\x00notadatabase\x00Unexpected non-zero errno: \x00DB [DBNAME]\x00%u\x00DB DBNAME SIZE\x00 DB PWD\x00 DB FLAG\x00%d %d\x00 DB ?AUXDB?\x00 DB ID VALUE\x00unknown limit type: \x00SQLITE_LIMIT_LENGTH\x00SQLITE_LIMIT_SQL_LENGTH\x00SQLITE_LIMIT_COLUMN\x00SQLITE_LIMIT_EXPR_DEPTH\x00SQLITE_LIMIT_COMPOUND_SELECT\x00SQLITE_LIMIT_VDBE_OP\x00SQLITE_LIMIT_FUNCTION_ARG\x00SQLITE_LIMIT_ATTACHED\x00SQLITE_LIMIT_LIKE_PATTERN_LENGTH\x00SQLITE_LIMIT_VARIABLE_NUMBER\x00SQLITE_LIMIT_TRIGGER_DEPTH\x00SQLITE_LIMIT_WORKER_THREADS\x00SQLITE_LIMIT_TOOSMALL\x00SQLITE_LIMIT_TOOBIG\x00SEED ?DB?\x00current\x00max\x00min\x00recyclable\x00DB ?NAME?\x00passive\x00full\x00restart\x00truncate\x00DB MODE ?NAME?\x00mode\x00DB VALUE\x00COMMAND ...\x00command has no objProc: \x00%d %d %d %s\n\x00SQLITE_TESTCTRL_LOCALTIME_FAULT\x00SQLITE_TESTCTRL_SORTER_MMAP\x00SQLITE_TESTCTRL_IMPOSTER\x00SQLITE_TESTCTRL_INTERNAL_FUNCTIONS\x00VERB ARGS...\x00VERB\x00ONOFF\x00DB LIMIT\x00DB dbName onOff tnum\x00ru_utime=%d.%06d ru_stime=%d.%06d ru_minflt=%d ru_majflt=%d\x00DB OPT BOOLEAN\x00unknown optimization - should be one of:\x00all\x00none\x00query-flattener\x00groupby-order\x00factor-constants\x00distinct-opt\x00cover-idx-scan\x00order-by-idx-join\x00transitive\x00omit-noop-join\x00stat4\x00skip-scan\x00push-down\x00DB NAME ...\x00no such extension: \x00initialization of \x00 failed: \x00amatch\x00closure\x00fileio\x00nextchar\x00series\x00spellfix\x00totype\x00BOOL\x00DB SQL1 NSTEP SQL2\x00data error: (a!=b)\x00checksum mismatch\x00sql error: \x00TYPE\x00Deliberate panic\x00DB SETTING [VALUE]\x00SQLITE_*\x00DBCONFIG_*\x00ENABLE_*\x00unknown sqlite3_db_config setting\x00FKEY\x00TRIGGER\x00FTS3_TOKENIZER\x00LOAD_EXTENSION\x00NO_CKPT_ON_CLOSE\x00QPSG\x00TRIGGER_EQP\x00RESET_DB\x00DEFENSIVE\x00WRITABLE_SCHEMA\x00LEGACY_ALTER_TABLE\x00DQS_DML\x00DQS_DDL\x00LEGACY_FILE_FORMAT\x00icecube\x00DB ?DBNAME?\x00HEXDB\x00| size %d pagesize %d\x00bad 'pagesize' field\x00bad 'size' field\x00| page %d offset %d\x00| %d: %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\x00sqlite_search_count\x00sqlite_found_count\x00sqlite_sort_count\x00sqlite3_max_blobsize\x00sqlite_like_count\x00sqlite_interrupt_count\x00sqlite_open_file_count\x00sqlite_current_time\x00sqlite3_xferopt_count\x00sqlite3_pager_readdb_count\x00sqlite3_pager_writedb_count\x00sqlite3_pager_writej_count\x00sqlite_query_plan\x00sqlite_opentemp_count\x00sqlite_static_bind_value\x00sqlite_static_bind_nbyte\x00sqlite_temp_directory\x00sqlite_data_directory\x00bitmask_size\x00longdouble_size\x00sqlite_sync_count\x00sqlite_fullsync_count\x00db_enter\x00db_leave\x00sqlite3_mprintf_int\x00sqlite3_mprintf_int64\x00sqlite3_mprintf_long\x00sqlite3_mprintf_str\x00sqlite3_snprintf_str\x00sqlite3_mprintf_stronly\x00sqlite3_mprintf_double\x00sqlite3_mprintf_scaled\x00sqlite3_mprintf_hexdouble\x00sqlite3_mprintf_z_test\x00sqlite3_mprintf_n_test\x00sqlite3_snprintf_int\x00sqlite3_last_insert_rowid\x00sqlite3_exec_printf\x00sqlite3_exec_hex\x00sqlite3_exec\x00sqlite3_exec_nr\x00sqlite3_get_table_printf\x00sqlite3_close\x00sqlite3_close_v2\x00sqlite3_create_function\x00sqlite3_create_aggregate\x00sqlite3_drop_modules\x00sqlite_register_test_function\x00sqlite_abort\x00sqlite_bind\x00breakpoint\x00sqlite3_key\x00sqlite3_rekey\x00sqlite_set_magic\x00sqlite3_interrupt\x00sqlite_delete_function\x00sqlite_delete_collation\x00sqlite3_get_autocommit\x00sqlite3_busy_timeout\x00printf\x00sqlite3IoTrace\x00clang_sanitize_address\x00sqlite3_db_config\x00bad_behavior\x00register_dbstat_vtab\x00sqlite3_connection_pointer\x00intarray_addr\x00int64array_addr\x00doublearray_addr\x00textarray_addr\x00sqlite3_bind_int\x00sqlite3_bind_zeroblob\x00sqlite3_bind_zeroblob64\x00sqlite3_bind_int64\x00sqlite3_bind_double\x00sqlite3_bind_null\x00sqlite3_bind_text\x00sqlite3_bind_text16\x00sqlite3_bind_blob\x00sqlite3_bind_parameter_count\x00sqlite3_bind_parameter_name\x00sqlite3_bind_parameter_index\x00sqlite3_clear_bindings\x00sqlite3_sleep\x00sqlite3_errcode\x00sqlite3_extended_errcode\x00sqlite3_errmsg\x00sqlite3_errmsg16\x00sqlite3_open\x00sqlite3_open16\x00sqlite3_open_v2\x00sqlite3_complete16\x00sqlite3_normalize\x00sqlite3_prepare\x00sqlite3_prepare16\x00sqlite3_prepare_v2\x00sqlite3_prepare_v3\x00sqlite3_prepare_tkt3134\x00sqlite3_prepare16_v2\x00sqlite3_finalize\x00sqlite3_stmt_status\x00sqlite3_reset\x00sqlite3_expired\x00sqlite3_transfer_bindings\x00sqlite3_changes\x00sqlite3_step\x00sqlite3_sql\x00sqlite3_expanded_sql\x00sqlite3_next_stmt\x00sqlite3_stmt_readonly\x00sqlite3_stmt_isexplain\x00sqlite3_stmt_busy\x00uses_stmt_journal\x00sqlite3_release_memory\x00sqlite3_db_release_memory\x00sqlite3_db_cacheflush\x00sqlite3_system_errno\x00sqlite3_db_filename\x00sqlite3_db_readonly\x00sqlite3_soft_heap_limit\x00sqlite3_soft_heap_limit64\x00sqlite3_hard_heap_limit64\x00sqlite3_thread_cleanup\x00sqlite3_pager_refcounts\x00sqlite3_load_extension\x00sqlite3_enable_load_extension\x00sqlite3_extended_result_codes\x00sqlite3_limit\x00dbconfig_maindbname_icecube\x00save_prng_state\x00restore_prng_state\x00reset_prng_state\x00prng_seed\x00database_never_corrupt\x00database_may_be_corrupt\x00optimization_control\x00tcl_objproc\x00sqlite3_column_count\x00sqlite3_data_count\x00sqlite3_column_type\x00sqlite3_column_blob\x00sqlite3_column_double\x00sqlite3_column_int64\x00sqlite3_column_text\x00sqlite3_column_name\x00sqlite3_column_int\x00sqlite3_column_bytes\x00sqlite3_column_decltype\x00sqlite3_create_collation_v2\x00sqlite3_global_recover\x00working_64bit_int\x00vfs_unlink_test\x00vfs_initfail_test\x00vfs_unregister_all\x00vfs_reregister_all\x00file_control_test\x00file_control_lasterrno_test\x00file_control_lockproxy_test\x00file_control_chunksize_test\x00file_control_sizehint_test\x00file_control_data_version\x00file_control_persist_wal\x00file_control_powersafe_overwrite\x00file_control_vfsname\x00file_control_tempfilename\x00sqlite3_vfs_list\x00sqlite3_create_function_v2\x00sqlite3_test_errstr\x00tcl_variable_type\x00sqlite3_enable_shared_cache\x00sqlite3_shared_cache_report\x00sqlite3_libversion_number\x00sqlite3_table_column_metadata\x00sqlite3_blob_reopen\x00pcache_stats\x00sqlite3_unlock_notify\x00sqlite3_wal_checkpoint\x00sqlite3_wal_checkpoint_v2\x00sqlite3_wal_autocheckpoint\x00test_sqlite3_log\x00print_explain_query_plan\x00sqlite3_test_control\x00getrusage\x00load_static_extension\x00sorter_test_fakeheap\x00sorter_test_sort4_helper\x00vfs_current_time_int64\x00sqlite3_delete_database\x00atomic_batch_write\x00sqlite3_mmap_warm\x00sqlite3_config_sorterref\x00decode_hexdb\x00*** OBSOLETE VARIABLE ***\x00 FILENAME N-PAGE\"\x00 ID\"\x00ref\x00page\x00err\x00hit\x00miss\x00ovfl\x00 ID PGNO\"\x00 PAGE\"\x00 PAGE DATA\"\x00 N-MEGABYTES FILE\"\x00open failed: \x00Hello, World!\x00write failed: \x00 PENDING-BYTE\"\x00fault simulator script failed: [%s]\x00 SCRIPT\"\x00 SIZE PROGRAM\"\x00sqlite_io_error_pending\x00sqlite_io_error_persist\x00sqlite_io_error_hit\x00sqlite_io_error_hardhit\x00sqlite_diskfull_pending\x00sqlite_diskfull\x00sqlite_pending_byte\x00pager_open\x00pager_close\x00pager_commit\x00pager_rollback\x00pager_stmt_begin\x00pager_stmt_commit\x00pager_stmt_rollback\x00pager_stats\x00pager_pagecount\x00page_get\x00page_lookup\x00page_unref\x00page_read\x00page_write\x00page_number\x00pager_truncate\x00fake_big_file\x00sqlite3BitvecBuiltinTest\x00sqlite3_test_control_pending_byte\x00sqlite3_test_control_fault_install\x00 FILENAME NCACHE FLAGS\"\x00read\x00write\x00 ID TABLENUM WRITEABLE\"\x00 START MULTIPLIER COUNT INCREMENT\"\x00putVarint returned %d - should be between 1 and 9\x00putVarint returned %d and getVarint returned %d\x00Wrote 0x%016llx and got back 0x%016llx\x00putVarint returned %d and GetVarint32 returned %d\x00Wrote 0x%016llx and got back 0x%016llx from GetVarint32\x00 DB-HANDLE ?N?\"\x00No such db-handle: \"\x00 BT NCACHE\"\x00?-intkey? CSR KEY VALUE\x00btree_insert\x00btree_open\x00btree_close\x00btree_begin_transaction\x00btree_pager_stats\x00btree_cursor\x00btree_close_cursor\x00btree_next\x00btree_eof\x00btree_payload_size\x00btree_first\x00btree_varint_test\x00btree_from_db\x00btree_ismemdb\x00btree_set_cache_size\x00thread ID must be an upper case letter\x00 ID FILENAME\x00thread \x00 is already running\x00failed to create the thread\x00 ID\x00no such thread\x00 ID N\x00column number out of range\x00no database is open\x00 ID SQL\x00no virtual machine available\x00 IDL\x00 ID1 ID2\x00 ID DB\x00thread_create\x00thread_wait\x00thread_halt\x00thread_argc\x00thread_argv\x00thread_colname\x00thread_result\x00thread_error\x00thread_compile\x00thread_step\x00thread_finalize\x00thread_swap\x00thread_db_get\x00thread_db_put\x00thread_stmt_get\x00 <repeat-count> <do-calls>\x00hello world\x00UTF8\x00UTF16LE\x00UTF16BE\x00UTF16\x00No such encoding: \x00 <string/blob> <from enc> <to enc>\x00binarize\x00test_value_overhead\x00test_translate\x00translate_selftest\x00out of memory in the crash simulator\n\x00atomic\x00atomic512\x00atomic1k\x00atomic2k\x00atomic4k\x00atomic8k\x00atomic16k\x00atomic32k\x00atomic64k\x00sequential\x00safe_append\x00powersafe_overwrite\x00batch-atomic\x00-sectorsize\x00-characteristics\x00Bad option: \"\x00\" - must be \"-characteristics\" or \"-sectorsize\"\x00Option requires an argument: \"\x00no such flag\x00ENABLE ?DEFAULT?\x00crash\x00?OPTIONS? DELAY CRASHFILE\x00Filename is too long: \"\x00NWRITE\x00?-default? PARENT-VFS\x00-default\x00\": must be -default\x00Error in jt_register\x00sqlite3_crash_enable\x00sqlite3_crashparams\x00sqlite3_crash_now\x00sqlite3_simulate_device\x00sqlite3_crash_on_write\x00unregister_devsim\x00register_jt_vfs\x00unregister_jt_vfs\x00echo_module_fail(%s,%s)\x00echo-vtab-error: %s\x00SELECT * FROM %Q\x00PRAGMA index_list(%s)\x00PRAGMA index_info(%s)\x00echo_module\x00SELECT sql FROM sqlite_master WHERE type = 'table' AND name = ?\x00%s%s\x00xCreate\x00CREATE TABLE %Q(logmsg)\x00xConnect\x00xDisconnect\x00xDestroy\x00DROP TABLE %Q\x00xOpen\x00xNext\x00xColumn\x00xRowid\x00xFilter\x00, *\x00%z, %s\x00%z, NULL\x00echo_module_ignore_usable\x00xBestIndex\x00echo_module_cost\x00SELECT count(*) FROM %Q\x00SELECT rowid%z FROM %Q\x00rowid\x00=\x00<\x00>\x00<=\x00>=\x00LIKE\x00like\x00glob\x00 %s %s LIKE (SELECT '%%'||?||'%%')\x00 %s %s %s ?\x00DESC\x00ASC\x00 ORDER BY %s %s\x00xUpdate\x00 SET\x00UPDATE %Q\x00 SET rowid=?1 \x00%s %Q=?%d\x00 WHERE rowid=?%d\x00DELETE FROM %Q WHERE rowid = ?1\x00INSERT INTO %Q (\x00%s%Q\x00%s?%d\x00) VALUES(\x00echo(%s)\x00xBegin\x00echo_module_begin_fail\x00xSync\x00echo_module_sync_fail\x00xCommit\x00xRollback\x00::echo_glob_overload\x00xRename\x00ALTER TABLE %s RENAME TO %s%s\x00echo\x00echo_v2\x00DB SQL\x00register_echo_module\x00sqlite3_declare_vtab\x00N/A\x00sqlite3_create_collation\x00Error testing function: \x00sqlite3_malloc\x00sqlite3_realloc\x00c_misuse_test\x00c_realloc_test\x00c_collation_test\x00sqlite3_reset_auto_extension\x00npage\x00finish\x00remaining\x00pagecount\x00CMDNAME DESTHANDLE DESTNAME SRCHANDLE SRCNAME\x00sqlite3_backup_init() failed\x00sqlite3_backup\x00wrong number of arguments\x00unexpected: %s\x00eq\x00gt\x00le\x00lt\x00ge\x00match\x00ne\x00isnot\x00isnotnull\x00isnull\x00op\x00column\x00usable\x00desc\x00cost\x00orderby\x00idxnum\x00idxstr\x00rows\x00use\x00omit\x00unexpected: %d\x00tcl\x00register_tcl_module\x00incrblob_\x00DB DATABASE TABLE COLUMN ROWID FLAGS VARNAME\x00HANDLE\x00CHANNEL OFFSET N\x00out of memory in testdata/sqlite-src-3320300/src/test_blob.c\x00HANDLE OFFSET DATA ?NDATA?\x00sqlite3_blob_open\x00sqlite3_blob_close\x00sqlite3_blob_bytes\x00sqlite3_blob_read\x00sqlite3_blob_write\x00sqlite_options\x00malloc_usable_size\x00rowid32\x00casesensitivelike\x00curdir\x001\x00win32malloc\x00debug\x00default_ckptfullfsync\x00direct_read\x00dirsync\x00lfs\x00pagecache_overflow_stats\x00mmap\x00worker_threads\x008\x00memdebug\x008_3_names\x00cursorhints\x00hiddencolumns\x00mem3\x00mem5\x00offset_sql_func\x00snapshot\x00mutex\x00mutex_noop\x00altertable\x00api_armor\x00atomicwrite\x00json1\x00has_codec\x00like_match_blobs\x00attach\x00auth\x00autoinc\x00autoreset\x00autovacuum\x00default_autovacuum\x00between_opt\x00builtin_test\x00bloblit\x00cast\x00check\x00cte\x00columnmetadata\x00oversize_cell_check\x00compileoption_diags\x00compound\x00conflict\x00crashtest\x00datetime\x00decltype\x00deprecated\x00diskio\x00floatingpoint\x00foreignkey\x00fts1\x00fts2\x00fts3\x00fts5\x00fts3_unicode\x00fts4_deferred\x00gettable\x00icu\x00icu_collations\x00integrityck\x00legacyformat\x00like_opt\x00load_ext\x00localtime\x00lookaside\x00long_double\x00memorydb\x00memorymanage\x00mergesort\x00null_trim\x00or_opt\x00rbu\x00pager_pragmas\x00pragma\x00reindex\x00rtree\x00rtree_int_only\x00schema_pragmas\x00schema_version\x00session\x00stmtvtab\x00scanstatus\x00lock_proxy_pragmas\x00prefer_proxy_locking\x00shared_cache\x00subquery\x00tclvar\x00threadsafe\x00threadsafe1\x00threadsafe2\x00tempdb\x00trigger\x00truncate_opt\x00view\x00vtab\x00wal\x00wsd\x00update_delete_limit\x00fast_secure_delete\x00secure_delete\x00userauth\x00multiplex_ext_overwrite\x00yytrackmaxstackdepth\x00sqllog\x00uri_00_error\x00normalize\x00windowfunc\x00SQLITE_MAX_LENGTH\x00SQLITE_MAX_COLUMN\x00SQLITE_MAX_SQL_LENGTH\x00SQLITE_MAX_EXPR_DEPTH\x00SQLITE_MAX_COMPOUND_SELECT\x00SQLITE_MAX_VDBE_OP\x00SQLITE_MAX_FUNCTION_ARG\x00SQLITE_MAX_VARIABLE_NUMBER\x00SQLITE_MAX_PAGE_SIZE\x00SQLITE_MAX_PAGE_COUNT\x00SQLITE_MAX_LIKE_PATTERN_LENGTH\x00SQLITE_MAX_TRIGGER_DEPTH\x00SQLITE_DEFAULT_CACHE_SIZE\x00SQLITE_DEFAULT_PAGE_SIZE\x00SQLITE_DEFAULT_FILE_FORMAT\x00SQLITE_DEFAULT_SYNCHRONOUS\x00SQLITE_DEFAULT_WAL_SYNCHRONOUS\x00SQLITE_MAX_ATTACHED\x00SQLITE_MAX_DEFAULT_PAGE_SIZE\x00SQLITE_MAX_WORKER_THREADS\x00TEMP_STORE\x00pVfs==0\x00testdata/sqlite-src-3320300/src/test_delete.c\x00sqlite3DeleteUnlinkIfExists\x00%s-journal\x00%s-shm\x00%s%03d\x00%s-journal%03d\x00%s-wal%03d\x00devsym\x00writecrash\x00CREATE TABLE xyz(dir, name);\x00CREATE TABLE xyz(path, size, data);\x00WITH r(d) AS ( SELECT CASE WHEN dir=?2 THEN ?3 ELSE dir END || '/' || name FROM fsdir WHERE dir=?1 AND name NOT LIKE '.%' UNION ALL SELECT dir || '/' || name FROM r, fsdir WHERE dir=d AND name NOT LIKE '.%') SELECT d FROM r;\x00/\x00CREATE TABLE x(path TEXT, data TEXT)\x00SELECT * FROM %Q.%Q WHERE rowid=?\x00fs\x00fstree\x00register_fs_module\x00abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-!,:*^+=_|?/<> \x00sqlite3_prepare_v2() error: %s\x000123456789abcdef\x00x'\x00test_agg_errmsg16\x00randstr\x00test_destructor\x00hex_to_utf8\x00test_destructor_count\x00test_auxdata\x00test_error\x00test_eval\x00test_isolation\x00test_counter\x00real2hex\x00test_decode\x00test_extract\x00test_zeroblob\x00test_getsubtype\x00test_setsubtype\x00test_frombind\x00tx\x00funcxx_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789\x00nullx_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789\x00sqlite3_create_function abused test failed\x00invalid matchinfo blob passed to function rank()\x00wrong number of arguments to function rank()\x00rank\x00autoinstall_test_functions\x00abuse_create_function\x00install_fts3_rank_function\x000123456789ABCDEF\x00FILENAME OFFSET AMT\x00r\x00cannot open input file \x00FILENAME OFFSET HEXDATA\x00r+b\x00r+\x00cannot open output file \x00HEXDATA\x00[utf8_to_utf8] unavailable - SQLITE_DEBUG not defined\x00BLOB VARNAME\x00LIST\x00hexio_read\x00hexio_write\x00hexio_get_int\x00hexio_render_int16\x00hexio_render_int32\x00utf8_to_utf8\x00read_fts3varint\x00make_fts3record\x00mem\x00pcache\x00Unknown argument: \"\x00init_wrapper_install\x00init_wrapper_query\x00init_wrapper_uninstall\x00init_wrapper_clear\x00CREATE TABLE x(value INTEGER PRIMARY KEY)\x00CREATE VIRTUAL TABLE temp.%Q USING %Q\x00INTARRAY\x00SQLITE_NOMEM\x00sqlite3_intarray_create\x00sqlite3_intarray_bind\x00jt\x00-journal\x00NBYTES\x00PRIOR NBYTES\x00bad pointer: \x00PRIOR\x00ADDRESS SIZE HEX\x00size must be positive\x00no data\x00ADDRESS SIZE\x00?RESET?\x00DEPT\x00FILENAME\x00COUNTER ?OPTIONS?\x00-repeat\x00-benigncnt\x00TITLE\x00SUB-COMMAND ...\x00start\x00stop\x00dump\x00clear\x00sync\x00SIZE N\x00INSTALLFLAG DISCARDCHANCE PRNGSEEED HIGHSTRESS\x00discard-chance should be between 0 and 100\x00BOOLEAN\x00SIZE COUNT\x00BUFID SIZE COUNT\x00illegal arguments - see documentation\x00NBYTE NMINALLOC\x00[DB]\x00sqlite3_db_config(db, 99999) does not return SQLITE_ERROR\x00sqlite3_config(99999) does not return SQLITE_ERROR\x00PARAMETER RESETFLAG\x00SQLITE_STATUS_MEMORY_USED\x00SQLITE_STATUS_MALLOC_SIZE\x00SQLITE_STATUS_PAGECACHE_USED\x00SQLITE_STATUS_PAGECACHE_OVERFLOW\x00SQLITE_STATUS_PAGECACHE_SIZE\x00SQLITE_STATUS_SCRATCH_USED\x00SQLITE_STATUS_SCRATCH_OVERFLOW\x00SQLITE_STATUS_SCRATCH_SIZE\x00SQLITE_STATUS_PARSER_STACK\x00SQLITE_STATUS_MALLOC_COUNT\x00DB PARAMETER RESETFLAG\x00SQLITE_\x00DBSTATUS_\x00LOOKASIDE_USED\x00CACHE_USED\x00SCHEMA_USED\x00STMT_USED\x00LOOKASIDE_HIT\x00LOOKASIDE_MISS_SIZE\x00LOOKASIDE_MISS_FULL\x00CACHE_HIT\x00CACHE_MISS\x00CACHE_WRITE\x00DEFERRED_FKS\x00CACHE_USED_SHARED\x00CACHE_SPILL\x00?INTEGER?\x00sqlite3_free\x00memset\x00memget\x00sqlite3_memory_used\x00sqlite3_memory_highwater\x00sqlite3_memdebug_backtrace\x00sqlite3_memdebug_dump\x00sqlite3_memdebug_fail\x00sqlite3_memdebug_pending\x00sqlite3_memdebug_settitle\x00sqlite3_memdebug_malloc_count\x00sqlite3_memdebug_log\x00sqlite3_config_pagecache\x00sqlite3_config_alt_pcache\x00sqlite3_status\x00sqlite3_db_status\x00install_malloc_faultsim\x00sqlite3_config_heap\x00sqlite3_config_heap_size\x00sqlite3_config_memstatus\x00sqlite3_config_lookaside\x00sqlite3_config_error\x00sqlite3_config_uri\x00sqlite3_config_cis\x00sqlite3_config_pmasz\x00sqlite3_db_config_lookaside\x00sqlite3_dump_memsys3\x00sqlite3_dump_memsys5\x00sqlite3_install_memsys3\x00sqlite3_memdebug_vfs_oom_test\x00%05u\x00 FILENAME [OFFSET AMT]\"\x00unable to open file \"\x00\" for reading\x00md5\x00md5-10x8\x00md5file\x00md5file-10x8\x00md5sum\x00%03d\x00zOut[n]=='\\0'\x00testdata/sqlite-src-3320300/src/test_multiplex.c\x00multiplexFilename\x00multiplexor.xAccess failure on %s\x00multiplexor.xOpen failure on %s\x00multiplex_control\x00zName || (flags & 0x00000008)\x00chunksize\x00multiplexOpen\x00multiplex_truncate\x00multiplex/%z\x00pOrigVfs!=&gMultiplex.sThisVfs\x00multiplex\x00sqlite3_multiplex_initialize\x00NAME MAKEDEFAULT\x00-force\x00?-force?\x00enable\x00chunk_size\x00max_chunks\x00HANDLE DBNAME SUB-COMMAND INT-VALUE\x00expected database handle, got \"\x00SUB-COMMAND\x00sqlite3_multiplex_shutdown\x00sqlite3_multiplex_control\x00fast\x00recursive\x00static_master\x00static_mem\x00static_open\x00static_prng\x00static_lru\x00static_pmem\x00static_app1\x00static_app2\x00static_app3\x00static_vfs1\x00static_vfs2\x00static_vfs3\x00mutex counters are \x00already installed\x00not installed\x00singlethread\x00multithread\x00serialized\x00mutex name\x00disable_mutex_init\x00disable_mutex_try\x00sqlite3_shutdown\x00sqlite3_initialize\x00sqlite3_config\x00enter_static_mutex\x00leave_static_mutex\x00enter_db_mutex\x00leave_db_mutex\x00alloc_dealloc_mutex\x00install_mutex_counters\x00read_mutex_counters\x00clear_mutex_counters\x00pReal->nRef>=0\x00testdata/sqlite-src-3320300/src/test_onefile.c\x00fsClose\x00strlen(\"-journal\")==8\x00eType==1\x00\x00\x00fsOpen\x00strcmp(\"-journal\", &zPath[nName])==0\x00\x00\x00\x00\x00\x00fsDelete\x00fsAccess\x00vfslog/%z\x00sqlite_ostrace1.....\x00xClose\x00xRead\x00xWrite\x00xTruncate\x00xFilesize\x00xLock\x00xUnlock\x00xCheckResLock\x00xFileControl\x00xSectorSize\x00xDeviceChar\x00xDelete\x00xAccess\x00xFullPathname\x00xRandomness\x00xSleep\x00xCurrentTime\x00xShmUnmap\x00xShmLock\x00xShmBarrier\x00xShmMap\x00annotation\x00CREATE TABLE xxx(event, file, click, rc, size, offset)\x00i<7\x00testdata/sqlite-src-3320300/src/test_osinst.c\x00vlogColumn\x00vfslog\x00VFS\x00failed\x00VFS PARENT LOGFILE\x00bad sqlite3 handle: \x00annotate\x00finalize\x00register\x00pArg==(void*)&testpcacheGlobal\x00testdata/sqlite-src-3320300/src/test_pcache.c\x00testpcacheGlobal.pDummy==0\x00testpcacheGlobal.nInstance==0\x00testpcacheInit\x00testpcacheGlobal.pDummy!=0\x00testpcacheShutdown\x00testpcacheCreate\x00p->iMagic==0x364585fd\x00testpcacheGlobal.nInstance>0\x00testpcacheCachesize\x00testpcachePagecount\x00p->nPinned <= 217 - p->nFree\x00testpcacheFetch\x00p->a[i].isPinned\x00p->nPinned>=0\x00p->nFree<=217\x00testpcacheUnpin\x00p->a[i].isPinned==0\x00&p->a[i].page==pOldPage\x00testpcacheRekey\x00testpcacheTruncate\x00testpcacheDestroy\x00discardChance<=100\x00defaultPcache.xCreate!=testpcacheCreate\x00defaultPcache.xCreate!=0\x00installTestPCache\x00pGroup->pFiles->nRef==0\x00testdata/sqlite-src-3320300/src/test_quota.c\x00quotaRemoveAllFiles\x00quota/%z\x00pOrigVfs!=&gQuota.sThisVfs\x00quota\x00sqlite3_quota_initialize\x00quotaGroupOpenFileCount(pGroup)==0\x00sqlite3_quota_shutdown\x00::piLimit_\x00PATTERN LIMIT SCRIPT\x00FILENAME MODE\x00HANDLE SIZE NELEM\x00HANDLE SIZE NELEM CONTENT\x00HANDLE ?HARDSYNC?\x00HANDLE OFFSET WHENCE\x00SEEK_SET\x00SEEK_CUR\x00SEEK_END\x00WHENCE should be SEEK_SET, SEEK_CUR, or SEEK_END\x00HANDLE SIZE\x00PATTERN TEXT\x00sqlite3_quota_set\x00sqlite3_quota_file\x00sqlite3_quota_dump\x00sqlite3_quota_fopen\x00sqlite3_quota_fread\x00sqlite3_quota_fwrite\x00sqlite3_quota_fclose\x00sqlite3_quota_fflush\x00sqlite3_quota_fseek\x00sqlite3_quota_rewind\x00sqlite3_quota_ftell\x00sqlite3_quota_ftruncate\x00sqlite3_quota_file_size\x00sqlite3_quota_file_truesize\x00sqlite3_quota_file_mtime\x00sqlite3_quota_remove\x00sqlite3_quota_glob\x00sqlite3_quota_file_available\x00sqlite3_quota_ferror\x00register_cube_geom\x00register_circle_geom\x00CREATE TABLE x(database,tablename,cid,name,type,not_null,dflt_value,pk)\x00SELECT name FROM sqlite_temp_master WHERE type='table'\x00SELECT name FROM %Q.sqlite_master WHERE type='table'\x00PRAGMA %Q.table_info(%Q)\x00PRAGMA database_list\x00register_schema_module\x00PRAGMA main.journal_mode\x00CMDNAME PATH ?VFS? ?BUSY-HANDLER-SCRIPT?\x00rc==0 || pLock==0\x00testdata/sqlite-src-3320300/src/test_superlock.c\x00rc!=0 || pLock!=0\x00superlock_cmd\x00sqlite3demo_superlock\x00open\x00access\x00getcwd\x00fstat\x00ftruncate\x00fcntl\x00pread\x00pread64\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00mremap\x00SYSCALL-LIST\x00system-call\x00?COUNT PERSIST?\x00EACCES\x00EINTR\x00EIO\x00EOVERFLOW\x00ENOMEM\x00EAGAIN\x00ETIMEDOUT\x00EBUSY\x00EPERM\x00EDEADLK\x00ENOLCK\x00SYSCALL ERRNO\x00errno\x00PGSZ\x00getpagesize\x00pgsz out of range\x00fault\x00install\x00uninstall\x00list\x00defaultvfs\x00pagesize\x00VFS does not support xSetSystemCall\x00test_syscall\x00load_testfixture_extensions\x00SLAVE\x00CREATE TABLE x( name TEXT, arrayname TEXT, value TEXT, fullname TEXT PRIMARY KEY) WITHOUT ROWID\x00array names\x00tclvar_filter_cmd\x00%s(%s)\x00expr {[info exists ::tclvar_set_omit] && $::tclvar_set_omit}\x00the 'fullname' column must be TEXT\x00prohibited TCL variable change\x00proc like {pattern str} {\n set p [string map {% * _ ?} $pattern]\n string match $p $str\n}\nproc tclvar_filter_cmd {eq match glob regexp like} {\n set res {}\n set pattern $eq\n if {$pattern=={}} { set pattern $match }\n if {$pattern=={}} { set pattern * }\n foreach v [uplevel #0 info vars $pattern] {\n if {($glob=={} || [string match $glob [uplevel #0 set $v]])\n && ($like=={} || [like $like [uplevel #0 set $v]])\n && ($regexp=={} || [regexp $regexp [uplevel #0 set $v]])\n } {\n lappend res $v\n }\n }\n set res\n}\n\x00register_tclvar_module\x00clock_seconds\x00sqlthread\x00sqlite3_blocking_step\x00sqlite3_blocking_prepare_v2\x00sqlite3_nonblocking_prepare_v2\x00set\x00Error in Tcl_CreateThread()\x00no parent thread\x00parent\x00spawn\x00VARNAME SCRIPT\x00DBNAME\x00id\x00%s \x00SQLITE_ERROR\x00SQLITE_IOERR\x00SQLITE_LOCKED\x00SQLITE_BUSY\x00SQLITE_READONLY\x00SQLITE_READONLY_CANTINIT\x00SQLITE_NOTFOUND\x00SQLITE_OMIT\x00normal|dataonly\x00full|dataonly\x00xCheckReservedLock\x00BEGIN_ATOMIC_WRITE\x00COMMIT_ATOMIC_WRITE\x00ZIPVFS\x00anon\x00SQLITE_ACCESS_EXISTS\x00SQLITE_ACCESS_READWRITE\x00SQLITE_ACCESS_READ\x00xShmOpen\x00 lock\x00 unlock\x00 shared\x00 exclusive\x00shm\x00delete\x00filter\x00ioerr\x00fullerr\x00cantopenerr\x00script\x00devchar\x00sectorsize\x00subcommand\x00FILE ?VALUE?\x00failed to get full path: \x00no such file: \x00unknown method: \x00?CNT PERSIST?\x00default\x00undeletable_when_open\x00immutable\x00?ATTR-LIST?\x00bad flags: \x00?VALUE?\x00-noshm\x00-szosfile\x00-mxpathname\x00-iversion\x00-fullshm\x00VFSNAME ?-noshm BOOL? ?-fullshm BOOL? ?-default BOOL? ?-mxpathname INT? ?-szosfile INT? ?-iversion INT?\x00shared\x00lock\x00unlock\x00DB DBNAME (shared|exclusive) (lock|unlock) OFFSET N\x00ARG\x00DB DBNAME SLOT ?VALUE?\x00*-shm is not yet mapped\x00testvfs\x00vfs_shmlock\x00vfs_set_readmark\x00DB NAME XSTEP XFINAL XVALUE XINVERSE\x00fff\x00misuse test error\x00invalid argument\x00sumint\x00sum\x00sqlite3_create_window_function\x00test_create_window_function_misuse\x00test_create_sumint\x00test_override_sum\x00" + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 8 /* .xCreate */)) = zipfileConnect // zipfile.c:2143:5: + *(*func(*crt.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 16 /* .xConnect */)) = zipfileConnect // zipfile.c:2144:5: + *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 24 /* .xBestIndex */)) = zipfileBestIndex // zipfile.c:2145:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 32 /* .xDisconnect */)) = zipfileDisconnect // zipfile.c:2146:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 40 /* .xDestroy */)) = zipfileDisconnect // zipfile.c:2147:5: + *(*func(*crt.TLS, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 48 /* .xOpen */)) = zipfileOpen // zipfile.c:2148:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 56 /* .xClose */)) = zipfileClose // zipfile.c:2149:5: + *(*func(*crt.TLS, uintptr, int32, uintptr, int32, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 64 /* .xFilter */)) = zipfileFilter // zipfile.c:2150:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 72 /* .xNext */)) = zipfileNext // zipfile.c:2151:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 80 /* .xEof */)) = zipfileEof // zipfile.c:2152:5: + *(*func(*crt.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 88 /* .xColumn */)) = zipfileColumn // zipfile.c:2153:5: + *(*func(*crt.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 104 /* .xUpdate */)) = zipfileUpdate // zipfile.c:2155:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 112 /* .xBegin */)) = zipfileBegin // zipfile.c:2156:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 128 /* .xCommit */)) = zipfileCommit // zipfile.c:2158:5: + *(*func(*crt.TLS, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 136 /* .xRollback */)) = zipfileRollback // zipfile.c:2159:5: + *(*func(*crt.TLS, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(uintptr(unsafe.Pointer(&zipfileModule)) + 144 /* .xFindFunction */)) = zipfileFindFunction // zipfile.c:2160:5: +} + +var ts1 = "%s\x00internal error!\x00SELECT * FROM main.%Q WHERE sample()\x00expert\x00PRAGMA table_info=%Q\x00main\x00, \x00%Q\x00 COLLATE %Q\x00 COLLATE %s\x00 DESC\x00PRAGMA index_list=%Q\x00PRAGMA index_xInfo=%Q\x00%s_idx_%08x\x00CREATE INDEX '%q' ON %Q(%s)\x00CREATE INDEX %s ON %s(%s)\x00EXPLAIN QUERY PLAN %s\x00 USING INDEX \x00 USING COVERING INDEX \x00%s\n\x00%s;\n\x00SELECT 'CREATE TEMP' || substr(sql, 7) FROM sqlite_master WHERE tbl_name = %Q AND type IN ('table', 'trigger') ORDER BY type;\x00ALTER TABLE temp.%Q RENAME TO %Q\x00INSERT INTO %Q VALUES(\x00%s?\x00\x00)\x00UPDATE %Q SET \x00%s%Q=?\x00DELETE FROM %Q\x00t592690916721053953805701627921227776\x00DROP TABLE t592690916721053953805701627921227776\x00SELECT type, name, sql, 1 FROM sqlite_master WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%%' UNION ALL SELECT type, name, sql, 2 FROM sqlite_master WHERE type = 'trigger' AND tbl_name IN(SELECT name FROM sqlite_master WHERE type = 'view') ORDER BY 4, 1\x00CREATE TABLE x(\x00%s%Q COLLATE %s\x00CREATE VIRTUAL TABLE %Q USING expert(%Q)\x00SELECT max(i.seqno) FROM sqlite_master AS s, pragma_index_list(s.name) AS l, pragma_index_info(l.name) AS i WHERE s.type = 'table'\x00%sx.%Q IS rem(%d, x.%Q) COLLATE %s\x00%s%d\x00SELECT %s FROM %Q x ORDER BY %s\x00SELECT %s FROM temp.t592690916721053953805701627921227776 x ORDER BY %s\x00%d\x00 %d\x00DROP TABLE IF EXISTS temp.t592690916721053953805701627921227776\x00CREATE TABLE temp.t592690916721053953805701627921227776 AS SELECT * FROM %Q\x00SELECT s.rowid, s.name, l.name FROM sqlite_master AS s, pragma_index_list(s.name) AS l WHERE s.type = 'table'\x00SELECT name, coll FROM pragma_index_xinfo(?) WHERE key\x00INSERT INTO sqlite_stat1 VALUES(?, ?, ?)\x00ANALYZE; PRAGMA writable_schema=1\x00rem\x00sample\x00ANALYZE sqlite_master\x00:memory:\x00SELECT sql FROM sqlite_master WHERE name NOT LIKE 'sqlite_%%' AND sql NOT LIKE 'CREATE VIRTUAL %%'\x00%s;%s%s\n\x00 -- stat1: \x00no such handle: \x00sql\x00TABLE\x00analyze\x00count\x00report\x00STMT EREPORT\x00destroy\x00SUBCOMMAND ...\x00sub-command\x00indexes\x00plan\x00candidates\x00DB\x00sqlite3expert%d\x00out of memory\x00sqlite3_expert_new\x00%s: cost must be between 1 and %d\x00%s: maximum string length is %d\x00%s: iLang must be between 0 and %d\x00?\x00SELECT * FROM %Q.%Q\x00%s: %s\x00%s: %s has %d columns, expected 4\x00vocabulary_table\x00vocabulary_word\x00vocabulary_language\x00edit_distances\x00unrecognized argument: [%s]\n\x00no edit_distances table specified\x00CREATE TABLE x(word,distance,language,command HIDDEN,nword HIDDEN)\x000123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^abcdefghijklmnopqrstuvwxyz~\x00SELECT \"%w\" FROM \"%w\"\x00 WHERE \"%w\">=?1 AND \"%w\"=?2 ORDER BY 1\x00SELECT \"%w\" FROM \"%w\" WHERE \"%w\">=?1 ORDER BY 1\x00*\x00DELETE from %s is not allowed\x00UPDATE of %s is not allowed\x00INSERT INTO %s allowed for column [command] only\x00approximate_match\x00int32\x00int64\x00double\x00char*\x00CREATE TABLE x(value,pointer hidden,count hidden,ctype hidden)\x00carray\x00unknown datatype: %Q\x00inttoptr\x00tablename\x00idcolumn\x00parentcolumn\x00CREATE TABLE x(id,depth,root HIDDEN,tablename HIDDEN,idcolumn HIDDEN,parentcolumn HIDDEN)\x00SELECT \"%w\".\"%w\" FROM \"%w\" WHERE \"%w\".\"%w\"=?1\x00transitive_closure\x00rb\x00cannot open '%s' for reading\x00line %d: unescaped %c character\x00line %d: unterminated %c-quoted field\n\x00more than one '%s' parameter\x00yes\x00on\x00true\x00no\x00off\x00false\x00header\x00more than one 'header' parameter\x00testflags\x00columns\x00more than one 'columns' parameter\x00column= value must be positive\x00bad parameter: '%s'\x00must specify either filename= or data= but not both\x00%sc%d TEXT\x00,\x00%s\"%w\" TEXT\x00bad schema: '%s' - %s\x00filename\x00data\x00schema\x00csv\x00csv_wr\x00 \x00eval\x00CREATE TABLE x(addr,opcode,p1,p2,p3,p4,p5,comment,sql HIDDEN)\x00EXPLAIN %s\x00explain\x00wb\x00wrong number of arguments to function writefile()\x00failed to create symlink: %s\x00failed to create directory: %s\x00failed to write file: %s\x00CREATE TABLE x(name,mode,mtime,data,path HIDDEN,dir HIDDEN)\x00cannot read directory: %s\x00%s/%s\x00cannot stat file: %s\x00table function fsdir requires an argument\x00table function fsdir requires a non-NULL argument\x00fsdir\x00readfile\x00writefile\x00lsmode\x00%s: ruleset must be between 0 and %d\x00%s: wrong number of CREATE VIRTUAL TABLE arguments\x00CREATE TABLE x(word,distance,ruleset)\x00fuzzer\x00ieee754(%lld,%d)\x00ieee754\x00BEGIN; SELECT * FROM %s%q%ssqlite_master\x00'\x00'.\x00PRAGMA %s%q%spage_size\x00sqlite3_mmap_warm_cache: Warmed up %d pages of %s\x00END\x00AND (%s)\x00collate \"%w\"\x00SELECT %s FROM %s WHERE %s>=(?1 || ?2) %s AND %s<=(?1 || char(1114111)) %s %s ORDER BY 1 %s ASC LIMIT 1\x00next_char\x00NULL\x00is\x00not\x00in(\x00in(select\x00in(with\x00?,?,?\x002nd argument to percentile() is not a number between 0.0 and 100.0\x002nd argument to percentile() is not the same for all input rows\x001st argument to percentile() is not numeric\x00Inf input to percentile()\x00percentile\x00CREATE TABLE prefixes(prefix TEXT, original_string TEXT HIDDEN)\x00prefixes\x00prefix_length\x00unknown \\ escape\x00afnrtv\\()*.+?[$^{|}]\x00\a\f\n\r\t\v\x00unmatched '('\x00'*' without operand\x00'+' without operand\x00'?' without operand\x00'{m,n}' without operand\x00unmatched '{'\x00n less than m in '{m,n}'\x00both m and n are zero in '{m,n}'\x00POSIX character classes not supported\x00unclosed '['\x00unrecognized character\x00regexp\x00remember\x00CREATE TABLE x(value,start hidden,stop hidden,step hidden)\x00generate_series() requires SQLite 3.8.12 or later\x00generate_series\x00.ABCDHLRMY9 ?\x00non-ASCII input to editdist()\x00NULL input to editdist()\x00SELECT iLang, cFrom, cTo, iCost FROM \"%w\" WHERE iLang>=0 ORDER BY iLang\x00editdist3\x00DROP TABLE IF EXISTS \"%w\".\"%w_vocab\"\x00CREATE TABLE x(word,rank,distance,langid, score, matchlen, phonehash HIDDEN, top HIDDEN, scope HIDDEN, srchcnt HIDDEN, soundslike HIDDEN, command HIDDEN)\x00CREATE TABLE IF NOT EXISTS \"%w\".\"%w_vocab\"(\n id INTEGER PRIMARY KEY,\n rank INT,\n langid INT,\n word TEXT,\n k1 TEXT,\n k2 TEXT\n);\n\x00CREATE INDEX IF NOT EXISTS \"%w\".\"%w_vocab_index_langid_k2\" ON \"%w_vocab\"(langid,k2);\x00edit_cost_table=\x00bad argument to spellfix1(): \"%s\"\x00SELECT id, word, rank, coalesce(k1,word) FROM \"%w\".\"%w_vocab\" WHERE langid=%d AND k2>=?1 AND k2<?2\x00SELECT word, rank, NULL, langid, id FROM \"%w\".\"%w_vocab\"%s\x00 WHERE rowid=?\x00ROLLBACK\x00IGNORE\x00ABORT\x00REPLACE\x00DELETE FROM \"%w\".\"%w_vocab\" WHERE id=%lld\x00NOT NULL constraint failed: %s.word\x00reset\x00null\x00unknown value for %s.command: \"%w\"\x00INSERT INTO \"%w\".\"%w_vocab\"(rank,langid,word,k1,k2) VALUES(%d,%d,%Q,nullif(%Q,%Q),%Q)\x00INSERT OR %s INTO \"%w\".\"%w_vocab\"(id,rank,langid,word,k1,k2) VALUES(%lld,%d,%d,%Q,nullif(%Q,%Q),%Q)\x00UPDATE OR %s \"%w\".\"%w_vocab\" SET id=%lld, rank=%d, langid=%d, word=%Q, k1=nullif(%Q,%Q), k2=%Q WHERE id=%lld\x00ALTER TABLE \"%w\".\"%w_vocab\" RENAME TO \"%w_vocab\"\x00spellfix1_translit\x00spellfix1_editdist\x00spellfix1_phonehash\x00spellfix1_scriptcode\x00spellfix1\x00922337203685477580\x00tointeger\x00toreal\x00sql error: %s\x00_rowid_\x00integer\x00no such rowid table: %s%s%s\x00.\x00SELECT group_concat(quote(name) || '.' || quote(type)) FROM pragma_table_info(?, ?)\x00source table schema mismatch\x00swarmvtab: no such SQL parameter: %s\x00maxopen\x00swarmvtab: illegal maxopen value\x00missing\x00swarmvtab: duplicate \"missing\" option\x00SELECT \"%w\"(?%s)\x00,?\x00openclose\x00swarmvtab: duplicate \"openclose\" option\x00SELECT \"%w\"(?,?%s)\x00swarmvtab: unrecognized option: %s\x00SELECT \"%w\"(?)\x00swarmvtab: parse error: %s\x00swarmvtab\x00unionvtab\x00temp\x00%s tables must be created in TEMP schema\x00wrong number of arguments for %s\x00SELECT * FROM (%z) ORDER BY 3\x00rowid range mismatch error\x00no source tables configured\x00SELECT 'CREATE TABLE xyz(' || group_concat(quote(name) || ' ' || type, ', ') || ')',max((cid+1) * (type='INTEGER' COLLATE nocase AND pk=1))-1 FROM pragma_table_info(%Q, ?)\x00SELECT rowid, * FROM %Q %s %lld\x00WHERE _rowid_ <=\x00-- \x00%z%sSELECT rowid, * FROM %s%q%s%Q\x00 UNION ALL \x00%z WHERE rowid=%lld\x00WHERE\x00%z WHERE rowid>=%lld\x00AND\x00%z %s rowid<=%lld\x00CREATE TABLE x(value)\x00wholenumber\x00CREATE TABLE y(name PRIMARY KEY,mode,mtime,sz,rawdata,data,method,z HIDDEN) WITHOUT ROWID;\x00zipfile\x00zipfile constructor requires one argument\x00error in fread()\x00error in fwrite()\x00failed to read CDS at offset %lld\x00%.*s\x00failed to read LFH at offset %d\x001.2.11\x00inflateInit2() failed (%d)\x00inflate() failed (%d)\x00zipfile: deflate() error\x00cannot find end of central directory record\x00zipfile() function requires an argument\x00cannot open file: %s\x00-rwxrwxrwx\x00zipfile: mode does not match data\x00zipfile: parse error in mode: %s\x00zipfile: missing filename\x00ab+\x00zipfile: failed to open file %s for writing\x00sz must be NULL\x00rawdata must be NULL\x00unknown compression method: %d\x00%s/\x00duplicate name: \"%s\"\x00{\"version-made-by\" : %u, \"version-to-extract\" : %u, \"flags\" : %u, \"compression\" : %u, \"time\" : %u, \"date\" : %u, \"crc32\" : %u, \"compressed-size\" : %u, \"uncompressed-size\" : %u, \"file-name-length\" : %u, \"extra-field-length\" : %u, \"file-comment-length\" : %u, \"disk-number-start\" : %u, \"internal-attr\" : %u, \"external-attr\" : %u, \"offset\" : %u }\x00zipfile_cds\x00wrong number of arguments to function zipfile()\x00first argument to zipfile() must be non-NULL\x00illegal method value: %d\x00non-directory name must not end with /\x00incrblob\x00incrblob_%d\x00%lld\x00sqlite_unlock_notify_arg\x00sqlite_unlock_notify_argcount\x00DELETE\x00INSERT\x00UPDATE\x00bytearray\x00boolean\x00wideInt\x00int\x00SQLITE_COPY\x00SQLITE_CREATE_INDEX\x00SQLITE_CREATE_TABLE\x00SQLITE_CREATE_TEMP_INDEX\x00SQLITE_CREATE_TEMP_TABLE\x00SQLITE_CREATE_TEMP_TRIGGER\x00SQLITE_CREATE_TEMP_VIEW\x00SQLITE_CREATE_TRIGGER\x00SQLITE_CREATE_VIEW\x00SQLITE_DELETE\x00SQLITE_DROP_INDEX\x00SQLITE_DROP_TABLE\x00SQLITE_DROP_TEMP_INDEX\x00SQLITE_DROP_TEMP_TABLE\x00SQLITE_DROP_TEMP_TRIGGER\x00SQLITE_DROP_TEMP_VIEW\x00SQLITE_DROP_TRIGGER\x00SQLITE_DROP_VIEW\x00SQLITE_INSERT\x00SQLITE_PRAGMA\x00SQLITE_READ\x00SQLITE_SELECT\x00SQLITE_TRANSACTION\x00SQLITE_UPDATE\x00SQLITE_ATTACH\x00SQLITE_DETACH\x00SQLITE_ALTER_TABLE\x00SQLITE_REINDEX\x00SQLITE_ANALYZE\x00SQLITE_CREATE_VTABLE\x00SQLITE_DROP_VTABLE\x00SQLITE_FUNCTION\x00SQLITE_SAVEPOINT\x00SQLITE_RECURSIVE\x00????\x00SQLITE_DENY\x00SQLITE_OK\x00SQLITE_IGNORE\x00RELEASE _tcl_transaction\x00COMMIT\x00ROLLBACK TO _tcl_transaction ; RELEASE _tcl_transaction\x00option\x00?CALLBACK?\x00?DATABASE? FILENAME\x00cannot open target database: \x00backup failed: \x00CALLBACK\x00cache option ?arg?\x00flush\x00size\x00size n\x00cannot convert \"\x00\" to integer\x00bad option \"\x00\": must be flush or size\x00NAME SCRIPT\x00SCRIPT\x00SQL\x00?OPTION? ?BOOLEAN?\x00unknown config option: \"\x00\"\x00CONFLICT-ALGORITHM TABLE FILENAME ?SEPARATOR? ?NULLINDICATOR?\x00\t\x00Error: non-null separator required for copy\x00rollback\x00abort\x00fail\x00ignore\x00replace\x00Error: \"\x00\", conflict-algorithm must be one of: rollback, abort, fail, ignore, or replace\x00SELECT * FROM '%q'\x00Error: no such table: \x00Error: \x00Error: can't malloc()\x00INSERT OR %q INTO '%q' VALUES(?\x00Error: cannot open file: \x00BEGIN\x00Error: %s line %d: expected %d columns of data but found %d\x00, failed while processing line: \x00?DATABASE? VALUE\x00-maxsize\x00-readonly\x00unknown option: \x00unable to set MEMDB content\x00extension loading is turned off at compile-time\x00-withoutnulls\x00unknown option: \"\x00?OPTIONS? SQL ?ARRAY-NAME? ?SCRIPT?\x00NAME ?SWITCHES? SCRIPT\x00-argcount\x00option requires an argument: \x00number of arguments must be non-negative\x00-deterministic\x00-directonly\x00-innocuous\x00-returntype\x00real\x00text\x00blob\x00any\x00type\x00\": must be -argcount, -deterministic, -directonly, -innocuous, or -returntype\x00?-readonly? ?DB? TABLE COLUMN ROWID\x00NULLVALUE\x00N CALLBACK\x00KEY\x00cannot open source database: \x00restore failed: \x00restore failed: source database busy\x00?DATABASE?\x00(step|sort|autoindex)\x00step\x00sort\x00autoindex\x00vmstep\x00bad argument: should be autoindex, step, sort or vmstep\x00MILLISECONDS\x00?CALLBACK? ?MASK?\x00trace type\x00SAVEPOINT _tcl_transaction\x00[TYPE] SCRIPT\x00transaction type\x00BEGIN EXCLUSIVE\x00BEGIN IMMEDIATE\x00?SCRIPT?\x00preupdate_hook was omitted at compile-time\x00-use-legacy-prepare\x00-last-stmt-ptr\x00%p\x00unknown argument: \x00authorizer\x00backup\x00bind_fallback\x00busy\x00cache\x00changes\x00close\x00collate\x00collation_needed\x00commit_hook\x00complete\x00config\x00copy\x00deserialize\x00enable_load_extension\x00errorcode\x00exists\x00function\x00interrupt\x00last_insert_rowid\x00nullvalue\x00onecolumn\x00preupdate\x00profile\x00progress\x00rekey\x00restore\x00rollback_hook\x00serialize\x00status\x00timeout\x00total_changes\x00trace\x00trace_v2\x00transaction\x00unlock_notify\x00update_hook\x00version\x00wal_hook\x00defensive\x00dqs_ddl\x00dqs_dml\x00enable_fkey\x00enable_qpsg\x00enable_trigger\x00enable_view\x00fts3_tokenizer\x00legacy_alter_table\x00legacy_file_format\x00load_extension\x00no_ckpt_on_close\x00reset_database\x00trigger_eqp\x00trusted_schema\x00writable_schema\x00statement\x00row\x00deferred\x00exclusive\x00immediate\x00HANDLE ?FILENAME? ?-vfs VFSNAME? ?-readonly BOOLEAN? ?-create BOOLEAN? ?-nofollow BOOLEAN? ?-nomutex BOOLEAN? ?-fullmutex BOOLEAN? ?-uri BOOLEAN?\x00-version\x00-sourceid\x00-has-codec\x000\x00-key\x00-vfs\x00-create\x00-nofollow\x00-nomutex\x00-fullmutex\x00-uri\x00-translatefilename\x00sqlite3\x00sqlite\x003.32.3\x00if {[llength $argv]>=1} {\nset argv0 [lindex $argv 0]\nset argv [lrange $argv 1 end]\nsource $argv0\n} else {\nset line {}\nwhile {![eof stdin]} {\nif {$line!=\"\"} {\nputs -nonewline \"> \"\n} else {\nputs -nonewline \"% \"\n}\nflush stdout\nappend line [gets stdin]\nif {[info complete $line]} {\nif {[catch {uplevel #0 $line} result]} {\nputs stderr \"Error: $result\"\n} elseif {$result!=\"\"} {\nputs $result\n}\nset line {}\n} else {\nappend line \\n\n}\n}\n}\n\x00SQLITE_DEBUG_BREAK\x00attach debugger to process %d and press any key to continue.\n\x00utf-8\x00argc\x00argv0\x00argv\x00errorInfo\x00%s: %s\n\x00SQLITE-CONNECTION\x00command not found: \x00error code %s (%d) does not match sqlite3_errcode %s (%d)\x00OMIT_MISUSE\x00wrong # args: should be \"\x00 DB FORMAT STRING\x00 DB HEX\x00 DB\x00 DB SQL\x00%z%s%s\x00%s%n\x00abcdefghijklmnopqrstuvwxyz\x00 DB FORMAT STRING ?COUNT?\x00 DB\"\x00 FILENAME\"\x00%02x\x00%04x\x00tkt2213 is not fixed\x00text16\x00bytes\x00bytes16\x00noop\x00x_coalesce\x00hex8\x00hex16\x00tkt2213func\x00pointer_change\x00counter1\x00counter2\x00intreal\x00x_sqlite_exec\x00value of 40 handed to x_count\x00x_count totals to 42\x00x_count\x00legacy_count\x00 TEXT\"\x00 FORMAT INT INT INT\"\x00argument is not a valid 64-bit integer\x00 FORMAT INT INT ?STRING?\"\x00 INT FORMAT INT INT ?STRING?\"\x00N must be non-negative\x00 FORMAT INT INT DOUBLE\"\x00 FORMAT DOUBLE DOUBLE\"\x00 FORMAT STRING\"\x00%08x%08x\x002nd argument should be 16-characters of hex\x00?BOOLEAN?\x00DB BOOLEAN\x00DB dbname tblname colname\x00CHANNEL ROWID\x00DB-HANDLE NAME CMP-PROC DEL-PROC\x00sqlite3_create_collate_v2() failed to detect an invalid encoding\x00utf8\x00utf16\x00utf16le\x00utf16be\x00DB NAME NARG ENC SWITCHES...\x00encoding\x00-func\x00-step\x00-final\x00-destroy\x00switch\x00DB-HANDLE FILE ?PROC?\x00this build omits sqlite3_load_extension()\x00DB-HANDLE ONOFF\x00string\x00value\x00first argument should be one of: int int64 string double null value\x00 DB FUNCTION-NAME\x00 <STMT>\x00STMT PARAMETER RESETFLAG\x00SQLITE_STMTSTATUS_FULLSCAN_STEP\x00SQLITE_STMTSTATUS_SORT\x00SQLITE_STMTSTATUS_AUTOINDEX\x00SQLITE_STMTSTATUS_VM_STEP\x00SQLITE_STMTSTATUS_REPREPARE\x00SQLITE_STMTSTATUS_RUN\x00SQLITE_STMTSTATUS_MEMUSED\x00NBYTE\x00FILE\x00PATH\x00 DB STMT\x00 STMT\x00 FROM-STMT TO-STMT\x00 VM IDX VALUE (null|static|normal)\"\x00static\x00static-nbytes\x00normal\x00blob10\x00abc\x00xyz\x00pq\x004th argument should be \"null\" or \"static\" or \"normal\"\x00(%d) \x00test_collate\x00UTF-8\x00UTF-16LE\x00UTF-16BE\x00 <DB> <utf8> <utf16le> <utf16be>\x00utf16bin\x00utf16_unaligned\x00utf16_aligned\x00test_function\x00<error code>\x00STMT IDX N\x00 STMT N VALUE\x00NaN\x00SNaN\x00-NaN\x00-SNaN\x00+Inf\x00-Inf\x00Epsilon\x00-Epsilon\x00NaN0\x00-NaN0\x00 STMT N\x00 STMT N VALUE BYTES\x00 STMT N DATA BYTES\x00cannot use %d blob bytes, have %d\x00STMT\x00STMT N\x00STMT NAME\x00 DB sql bytes ?tailvar?\x00 DB sql bytes tailvar\x00 DB sql bytes flags tailvar\x00\x00SELECT 1\x00 filename options-list\x00FILENAME FLAGS VFS\x00SQLITE_OPEN_READONLY\x00SQLITE_OPEN_READWRITE\x00SQLITE_OPEN_CREATE\x00SQLITE_OPEN_DELETEONCLOSE\x00SQLITE_OPEN_EXCLUSIVE\x00SQLITE_OPEN_AUTOPROXY\x00SQLITE_OPEN_MAIN_DB\x00SQLITE_OPEN_TEMP_DB\x00SQLITE_OPEN_TRANSIENT_DB\x00SQLITE_OPEN_MAIN_JOURNAL\x00SQLITE_OPEN_TEMP_JOURNAL\x00SQLITE_OPEN_SUBJOURNAL\x00SQLITE_OPEN_MASTER_JOURNAL\x00SQLITE_OPEN_NOMUTEX\x00SQLITE_OPEN_FULLMUTEX\x00SQLITE_OPEN_SHAREDCACHE\x00SQLITE_OPEN_PRIVATECACHE\x00SQLITE_OPEN_WAL\x00SQLITE_OPEN_URI\x00flag\x00<utf-16 sql>\x00 STMT column\x00INTEGER\x00FLOAT\x00TEXT\x00BLOB\x00 DB MAGIC\x00SQLITE_MAGIC_OPEN\x00SQLITE_MAGIC_CLOSED\x00SQLITE_MAGIC_BUSY\x00SQLITE_MAGIC_ERROR\x00 DB function-name\x00VARIABLE\x00DB DBNAME\x00?N?\x001234567890000000\x00__one\x00__two\x00notadatabase\x00Unexpected non-zero errno: \x00DB [DBNAME]\x00%u\x00DB DBNAME SIZE\x00 DB PWD\x00 DB FLAG\x00%d %d\x00 DB ?AUXDB?\x00 DB ID VALUE\x00unknown limit type: \x00SQLITE_LIMIT_LENGTH\x00SQLITE_LIMIT_SQL_LENGTH\x00SQLITE_LIMIT_COLUMN\x00SQLITE_LIMIT_EXPR_DEPTH\x00SQLITE_LIMIT_COMPOUND_SELECT\x00SQLITE_LIMIT_VDBE_OP\x00SQLITE_LIMIT_FUNCTION_ARG\x00SQLITE_LIMIT_ATTACHED\x00SQLITE_LIMIT_LIKE_PATTERN_LENGTH\x00SQLITE_LIMIT_VARIABLE_NUMBER\x00SQLITE_LIMIT_TRIGGER_DEPTH\x00SQLITE_LIMIT_WORKER_THREADS\x00SQLITE_LIMIT_TOOSMALL\x00SQLITE_LIMIT_TOOBIG\x00SEED ?DB?\x00current\x00max\x00min\x00recyclable\x00DB ?NAME?\x00passive\x00full\x00restart\x00truncate\x00DB MODE ?NAME?\x00mode\x00 - \x00DB VALUE\x00COMMAND ...\x00command has no objProc: \x00%d %d %d %s\n\x00SQLITE_TESTCTRL_LOCALTIME_FAULT\x00SQLITE_TESTCTRL_SORTER_MMAP\x00SQLITE_TESTCTRL_IMPOSTER\x00SQLITE_TESTCTRL_INTERNAL_FUNCTIONS\x00VERB ARGS...\x00VERB\x00ONOFF\x00DB LIMIT\x00DB dbName onOff tnum\x00ru_utime=%d.%06d ru_stime=%d.%06d ru_minflt=%d ru_majflt=%d\x00DB OPT BOOLEAN\x00unknown optimization - should be one of:\x00all\x00none\x00query-flattener\x00groupby-order\x00factor-constants\x00distinct-opt\x00cover-idx-scan\x00order-by-idx-join\x00transitive\x00omit-noop-join\x00stat4\x00skip-scan\x00push-down\x00DB NAME ...\x00no such extension: \x00initialization of \x00 failed: \x00amatch\x00closure\x00fileio\x00nextchar\x00series\x00spellfix\x00totype\x00BOOL\x00DB SQL1 NSTEP SQL2\x00data error: (a!=b)\x00checksum mismatch\x00sql error: \x00TYPE\x00Deliberate panic\x00DB SETTING [VALUE]\x00SQLITE_*\x00DBCONFIG_*\x00ENABLE_*\x00unknown sqlite3_db_config setting\x00FKEY\x00TRIGGER\x00FTS3_TOKENIZER\x00LOAD_EXTENSION\x00NO_CKPT_ON_CLOSE\x00QPSG\x00TRIGGER_EQP\x00RESET_DB\x00DEFENSIVE\x00WRITABLE_SCHEMA\x00LEGACY_ALTER_TABLE\x00DQS_DML\x00DQS_DDL\x00LEGACY_FILE_FORMAT\x00icecube\x00DB ?DBNAME?\x00HEXDB\x00| size %d pagesize %d\x00bad 'pagesize' field\x00bad 'size' field\x00| page %d offset %d\x00| %d: %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x %x\x00sqlite_search_count\x00sqlite_found_count\x00sqlite_sort_count\x00sqlite3_max_blobsize\x00sqlite_like_count\x00sqlite_interrupt_count\x00sqlite_open_file_count\x00sqlite_current_time\x00sqlite3_xferopt_count\x00sqlite3_pager_readdb_count\x00sqlite3_pager_writedb_count\x00sqlite3_pager_writej_count\x00unaligned_string_counter\x00sqlite_last_needed_collation\x00sqlite_query_plan\x00sqlite_opentemp_count\x00sqlite_static_bind_value\x00sqlite_static_bind_nbyte\x00sqlite_temp_directory\x00sqlite_data_directory\x00bitmask_size\x00longdouble_size\x00sqlite_sync_count\x00sqlite_fullsync_count\x00db_enter\x00db_leave\x00sqlite3_mprintf_int\x00sqlite3_mprintf_int64\x00sqlite3_mprintf_long\x00sqlite3_mprintf_str\x00sqlite3_snprintf_str\x00sqlite3_mprintf_stronly\x00sqlite3_mprintf_double\x00sqlite3_mprintf_scaled\x00sqlite3_mprintf_hexdouble\x00sqlite3_mprintf_z_test\x00sqlite3_mprintf_n_test\x00sqlite3_snprintf_int\x00sqlite3_last_insert_rowid\x00sqlite3_exec_printf\x00sqlite3_exec_hex\x00sqlite3_exec\x00sqlite3_exec_nr\x00sqlite3_get_table_printf\x00sqlite3_close\x00sqlite3_close_v2\x00sqlite3_create_function\x00sqlite3_create_aggregate\x00sqlite3_drop_modules\x00sqlite_register_test_function\x00sqlite_abort\x00sqlite_bind\x00breakpoint\x00sqlite3_key\x00sqlite3_rekey\x00sqlite_set_magic\x00sqlite3_interrupt\x00sqlite_delete_function\x00sqlite_delete_collation\x00sqlite3_get_autocommit\x00sqlite3_busy_timeout\x00printf\x00sqlite3IoTrace\x00clang_sanitize_address\x00sqlite3_db_config\x00bad_behavior\x00register_dbstat_vtab\x00sqlite3_connection_pointer\x00intarray_addr\x00int64array_addr\x00doublearray_addr\x00textarray_addr\x00sqlite3_bind_int\x00sqlite3_bind_zeroblob\x00sqlite3_bind_zeroblob64\x00sqlite3_bind_int64\x00sqlite3_bind_double\x00sqlite3_bind_null\x00sqlite3_bind_text\x00sqlite3_bind_text16\x00sqlite3_bind_blob\x00sqlite3_bind_parameter_count\x00sqlite3_bind_parameter_name\x00sqlite3_bind_parameter_index\x00sqlite3_clear_bindings\x00sqlite3_sleep\x00sqlite3_errcode\x00sqlite3_extended_errcode\x00sqlite3_errmsg\x00sqlite3_errmsg16\x00sqlite3_open\x00sqlite3_open16\x00sqlite3_open_v2\x00sqlite3_complete16\x00sqlite3_normalize\x00sqlite3_prepare\x00sqlite3_prepare16\x00sqlite3_prepare_v2\x00sqlite3_prepare_v3\x00sqlite3_prepare_tkt3134\x00sqlite3_prepare16_v2\x00sqlite3_finalize\x00sqlite3_stmt_status\x00sqlite3_reset\x00sqlite3_expired\x00sqlite3_transfer_bindings\x00sqlite3_changes\x00sqlite3_step\x00sqlite3_sql\x00sqlite3_expanded_sql\x00sqlite3_next_stmt\x00sqlite3_stmt_readonly\x00sqlite3_stmt_isexplain\x00sqlite3_stmt_busy\x00uses_stmt_journal\x00sqlite3_release_memory\x00sqlite3_db_release_memory\x00sqlite3_db_cacheflush\x00sqlite3_system_errno\x00sqlite3_db_filename\x00sqlite3_db_readonly\x00sqlite3_soft_heap_limit\x00sqlite3_soft_heap_limit64\x00sqlite3_hard_heap_limit64\x00sqlite3_thread_cleanup\x00sqlite3_pager_refcounts\x00sqlite3_load_extension\x00sqlite3_enable_load_extension\x00sqlite3_extended_result_codes\x00sqlite3_limit\x00dbconfig_maindbname_icecube\x00save_prng_state\x00restore_prng_state\x00reset_prng_state\x00prng_seed\x00database_never_corrupt\x00database_may_be_corrupt\x00optimization_control\x00tcl_objproc\x00sqlite3_column_count\x00sqlite3_data_count\x00sqlite3_column_type\x00sqlite3_column_blob\x00sqlite3_column_double\x00sqlite3_column_int64\x00sqlite3_column_text\x00sqlite3_column_name\x00sqlite3_column_int\x00sqlite3_column_bytes\x00sqlite3_column_decltype\x00sqlite3_column_bytes16\x00sqlite3_column_text16\x00sqlite3_column_name16\x00add_alignment_test_collations\x00sqlite3_column_decltype16\x00sqlite3_create_collation_v2\x00sqlite3_global_recover\x00working_64bit_int\x00vfs_unlink_test\x00vfs_initfail_test\x00vfs_unregister_all\x00vfs_reregister_all\x00file_control_test\x00file_control_lasterrno_test\x00file_control_lockproxy_test\x00file_control_chunksize_test\x00file_control_sizehint_test\x00file_control_data_version\x00file_control_persist_wal\x00file_control_powersafe_overwrite\x00file_control_vfsname\x00file_control_tempfilename\x00sqlite3_vfs_list\x00sqlite3_create_function_v2\x00add_test_collate\x00add_test_collate_needed\x00add_test_function\x00add_test_utf16bin_collate\x00sqlite3_test_errstr\x00tcl_variable_type\x00sqlite3_enable_shared_cache\x00sqlite3_shared_cache_report\x00sqlite3_libversion_number\x00sqlite3_table_column_metadata\x00sqlite3_blob_reopen\x00pcache_stats\x00sqlite3_unlock_notify\x00sqlite3_wal_checkpoint\x00sqlite3_wal_checkpoint_v2\x00sqlite3_wal_autocheckpoint\x00test_sqlite3_log\x00print_explain_query_plan\x00sqlite3_test_control\x00getrusage\x00load_static_extension\x00sorter_test_fakeheap\x00sorter_test_sort4_helper\x00vfs_current_time_int64\x00sqlite3_delete_database\x00atomic_batch_write\x00sqlite3_mmap_warm\x00sqlite3_config_sorterref\x00decode_hexdb\x00*** OBSOLETE VARIABLE ***\x00 FILENAME N-PAGE\"\x00 ID\"\x00ref\x00page\x00state\x00err\x00hit\x00miss\x00ovfl\x00 ID PGNO\"\x00 PAGE\"\x00 PAGE DATA\"\x00 N-MEGABYTES FILE\"\x00open failed: \x00Hello, World!\x00write failed: \x00 PENDING-BYTE\"\x00fault simulator script failed: [%s]\x00 SCRIPT\"\x00 SIZE PROGRAM\"\x00sqlite_io_error_pending\x00sqlite_io_error_persist\x00sqlite_io_error_hit\x00sqlite_io_error_hardhit\x00sqlite_diskfull_pending\x00sqlite_diskfull\x00sqlite_pending_byte\x00pager_open\x00pager_close\x00pager_commit\x00pager_rollback\x00pager_stmt_begin\x00pager_stmt_commit\x00pager_stmt_rollback\x00pager_stats\x00pager_pagecount\x00page_get\x00page_lookup\x00page_unref\x00page_read\x00page_write\x00page_number\x00pager_truncate\x00fake_big_file\x00sqlite3BitvecBuiltinTest\x00sqlite3_test_control_pending_byte\x00sqlite3_test_control_fault_install\x00 FILENAME NCACHE FLAGS\"\x00read\x00write\x00 ID TABLENUM WRITEABLE\"\x00 START MULTIPLIER COUNT INCREMENT\"\x00putVarint returned %d - should be between 1 and 9\x00putVarint returned %d and getVarint returned %d\x00Wrote 0x%016llx and got back 0x%016llx\x00putVarint returned %d and GetVarint32 returned %d\x00Wrote 0x%016llx and got back 0x%016llx from GetVarint32\x00 DB-HANDLE ?N?\"\x00No such db-handle: \"\x00 BT NCACHE\"\x00?-intkey? CSR KEY VALUE\x00btree_insert\x00btree_open\x00btree_close\x00btree_begin_transaction\x00btree_pager_stats\x00btree_cursor\x00btree_close_cursor\x00btree_next\x00btree_eof\x00btree_payload_size\x00btree_first\x00btree_varint_test\x00btree_from_db\x00btree_ismemdb\x00btree_set_cache_size\x00thread ID must be an upper case letter\x00 ID FILENAME\x00thread \x00 is already running\x00failed to create the thread\x00 ID\x00no such thread\x00 ID N\x00column number out of range\x00no database is open\x00 ID SQL\x00no virtual machine available\x00 IDL\x00 ID1 ID2\x00 ID DB\x00thread_create\x00thread_wait\x00thread_halt\x00thread_argc\x00thread_argv\x00thread_colname\x00thread_result\x00thread_error\x00thread_compile\x00thread_step\x00thread_finalize\x00thread_swap\x00thread_db_get\x00thread_db_put\x00thread_stmt_get\x00 <repeat-count> <do-calls>\x00hello world\x00UTF8\x00UTF16LE\x00UTF16BE\x00UTF16\x00No such encoding: \x00 <string/blob> <from enc> <to enc>\x00binarize\x00test_value_overhead\x00test_translate\x00translate_selftest\x00out of memory in the crash simulator\n\x00atomic\x00atomic512\x00atomic1k\x00atomic2k\x00atomic4k\x00atomic8k\x00atomic16k\x00atomic32k\x00atomic64k\x00sequential\x00safe_append\x00powersafe_overwrite\x00batch-atomic\x00-sectorsize\x00-characteristics\x00Bad option: \"\x00\" - must be \"-characteristics\" or \"-sectorsize\"\x00Option requires an argument: \"\x00no such flag\x00ENABLE ?DEFAULT?\x00crash\x00?OPTIONS? DELAY CRASHFILE\x00Filename is too long: \"\x00NWRITE\x00?-default? PARENT-VFS\x00-default\x00\": must be -default\x00Error in jt_register\x00sqlite3_crash_enable\x00sqlite3_crashparams\x00sqlite3_crash_now\x00sqlite3_simulate_device\x00sqlite3_crash_on_write\x00unregister_devsim\x00register_jt_vfs\x00unregister_jt_vfs\x00client_create\x00client_wait\x00client_halt\x00client_argc\x00client_argv\x00client_colname\x00client_result\x00client_error\x00client_compile\x00client_step\x00client_reset\x00client_finalize\x00client_swap\x00echo_module_fail(%s,%s)\x00echo-vtab-error: %s\x00SELECT * FROM %Q\x00PRAGMA index_list(%s)\x00PRAGMA index_info(%s)\x00echo_module\x00SELECT sql FROM sqlite_master WHERE type = 'table' AND name = ?\x00%s%s\x00xCreate\x00CREATE TABLE %Q(logmsg)\x00xConnect\x00xDisconnect\x00xDestroy\x00DROP TABLE %Q\x00xOpen\x00xNext\x00xColumn\x00xRowid\x00xFilter\x00, *\x00%z, %s\x00%z, NULL\x00echo_module_ignore_usable\x00xBestIndex\x00echo_module_cost\x00SELECT count(*) FROM %Q\x00SELECT rowid%z FROM %Q\x00rowid\x00=\x00<\x00>\x00<=\x00>=\x00LIKE\x00like\x00glob\x00 %s %s LIKE (SELECT '%%'||?||'%%')\x00 %s %s %s ?\x00DESC\x00ASC\x00 ORDER BY %s %s\x00xUpdate\x00 SET\x00UPDATE %Q\x00 SET rowid=?1 \x00%s %Q=?%d\x00 WHERE rowid=?%d\x00DELETE FROM %Q WHERE rowid = ?1\x00INSERT INTO %Q (\x00%s%Q\x00%s?%d\x00) VALUES(\x00echo(%s)\x00xBegin\x00echo_module_begin_fail\x00xSync\x00echo_module_sync_fail\x00xCommit\x00xRollback\x00::echo_glob_overload\x00xRename\x00ALTER TABLE %s RENAME TO %s%s\x00echo\x00echo_v2\x00DB SQL\x00register_echo_module\x00sqlite3_declare_vtab\x00N/A\x00sqlite3_create_collation\x00Error testing function: \x00sqlite3_malloc\x00sqlite3_realloc\x00c_misuse_test\x00c_realloc_test\x00c_collation_test\x00sqlite3_reset_auto_extension\x00npage\x00finish\x00remaining\x00pagecount\x00CMDNAME DESTHANDLE DESTNAME SRCHANDLE SRCNAME\x00sqlite3_backup_init() failed\x00sqlite3_backup\x00wrong number of arguments\x00unexpected: %s\x00eq\x00gt\x00le\x00lt\x00ge\x00match\x00ne\x00isnot\x00isnotnull\x00isnull\x00op\x00column\x00usable\x00desc\x00cost\x00orderby\x00idxnum\x00idxstr\x00rows\x00use\x00omit\x00unexpected: %d\x00tcl\x00register_tcl_module\x00incrblob_\x00DB DATABASE TABLE COLUMN ROWID FLAGS VARNAME\x00HANDLE\x00CHANNEL OFFSET N\x00out of memory in testdata/sqlite-src-3320300/src/test_blob.c\x00HANDLE OFFSET DATA ?NDATA?\x00sqlite3_blob_open\x00sqlite3_blob_close\x00sqlite3_blob_bytes\x00sqlite3_blob_read\x00sqlite3_blob_write\x00sqlite_options\x00malloc_usable_size\x00rowid32\x00casesensitivelike\x00curdir\x001\x00win32malloc\x00debug\x00default_ckptfullfsync\x00direct_read\x00dirsync\x00lfs\x00pagecache_overflow_stats\x00mmap\x00worker_threads\x008\x00memdebug\x008_3_names\x00cursorhints\x00hiddencolumns\x00mem3\x00mem5\x00offset_sql_func\x00snapshot\x00mutex\x00mutex_noop\x00altertable\x00api_armor\x00atomicwrite\x00json1\x00has_codec\x00like_match_blobs\x00attach\x00auth\x00autoinc\x00autoreset\x00autovacuum\x00default_autovacuum\x00between_opt\x00builtin_test\x00bloblit\x00cast\x00check\x00cte\x00columnmetadata\x00oversize_cell_check\x00compileoption_diags\x00compound\x00conflict\x00crashtest\x00datetime\x00decltype\x00deprecated\x00diskio\x00floatingpoint\x00foreignkey\x00fts1\x00fts2\x00fts3\x00fts5\x00fts3_unicode\x00fts4_deferred\x00gettable\x00icu\x00icu_collations\x00integrityck\x00legacyformat\x00like_opt\x00load_ext\x00localtime\x00lookaside\x00long_double\x00memorydb\x00memorymanage\x00mergesort\x00null_trim\x00or_opt\x00rbu\x00pager_pragmas\x00pragma\x00reindex\x00rtree\x00rtree_int_only\x00schema_pragmas\x00schema_version\x00session\x00stmtvtab\x00scanstatus\x00lock_proxy_pragmas\x00prefer_proxy_locking\x00shared_cache\x00subquery\x00tclvar\x00threadsafe\x00threadsafe1\x00threadsafe2\x00tempdb\x00trigger\x00truncate_opt\x00vacuum\x00view\x00vtab\x00wal\x00wsd\x00update_delete_limit\x00fast_secure_delete\x00secure_delete\x00userauth\x00multiplex_ext_overwrite\x00yytrackmaxstackdepth\x00sqllog\x00uri_00_error\x00normalize\x00windowfunc\x00SQLITE_MAX_LENGTH\x00SQLITE_MAX_COLUMN\x00SQLITE_MAX_SQL_LENGTH\x00SQLITE_MAX_EXPR_DEPTH\x00SQLITE_MAX_COMPOUND_SELECT\x00SQLITE_MAX_VDBE_OP\x00SQLITE_MAX_FUNCTION_ARG\x00SQLITE_MAX_VARIABLE_NUMBER\x00SQLITE_MAX_PAGE_SIZE\x00SQLITE_MAX_PAGE_COUNT\x00SQLITE_MAX_LIKE_PATTERN_LENGTH\x00SQLITE_MAX_TRIGGER_DEPTH\x00SQLITE_DEFAULT_CACHE_SIZE\x00SQLITE_DEFAULT_PAGE_SIZE\x00SQLITE_DEFAULT_FILE_FORMAT\x00SQLITE_DEFAULT_SYNCHRONOUS\x00SQLITE_DEFAULT_WAL_SYNCHRONOUS\x00SQLITE_MAX_ATTACHED\x00SQLITE_MAX_DEFAULT_PAGE_SIZE\x00SQLITE_MAX_WORKER_THREADS\x00TEMP_STORE\x00%s-journal\x00%s-wal\x00%s-shm\x00%s%03d\x00%s-journal%03d\x00%s-wal%03d\x00Loadable extensions are not supported\x00demo\x00register_demovfs\x00unregister_demovfs\x00devsym\x00writecrash\x00CREATE TABLE xyz(dir, name);\x00CREATE TABLE xyz(path, size, data);\x00WITH r(d) AS ( SELECT CASE WHEN dir=?2 THEN ?3 ELSE dir END || '/' || name FROM fsdir WHERE dir=?1 AND name NOT LIKE '.%' UNION ALL SELECT dir || '/' || name FROM r, fsdir WHERE dir=d AND name NOT LIKE '.%') SELECT d FROM r;\x00/\x00CREATE TABLE x(path TEXT, data TEXT)\x00SELECT * FROM %Q.%Q WHERE rowid=?\x00fs\x00fstree\x00register_fs_module\x00abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-!,:*^+=_|?/<> \x00sqlite3_prepare_v2() error: %s\x000123456789abcdef\x00x'\x00test_agg_errmsg16\x00randstr\x00test_destructor\x00test_destructor16\x00hex_to_utf16be\x00hex_to_utf16le\x00hex_to_utf8\x00test_destructor_count\x00test_auxdata\x00test_error\x00test_eval\x00test_isolation\x00test_counter\x00real2hex\x00test_decode\x00test_extract\x00test_zeroblob\x00test_getsubtype\x00test_setsubtype\x00test_frombind\x00tx\x00funcxx_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789\x00nullx_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789\x00sqlite3_create_function abused test failed\x00invalid matchinfo blob passed to function rank()\x00wrong number of arguments to function rank()\x00rank\x00autoinstall_test_functions\x00abuse_create_function\x00install_fts3_rank_function\x000123456789ABCDEF\x00FILENAME OFFSET AMT\x00r\x00cannot open input file \x00FILENAME OFFSET HEXDATA\x00r+b\x00r+\x00cannot open output file \x00HEXDATA\x00[utf8_to_utf8] unavailable - SQLITE_DEBUG not defined\x00BLOB VARNAME\x00LIST\x00hexio_read\x00hexio_write\x00hexio_get_int\x00hexio_render_int16\x00hexio_render_int32\x00utf8_to_utf8\x00read_fts3varint\x00make_fts3record\x00mem\x00pcache\x00Unknown argument: \"\x00init_wrapper_install\x00init_wrapper_query\x00init_wrapper_uninstall\x00init_wrapper_clear\x00CREATE TABLE x(value INTEGER PRIMARY KEY)\x00CREATE VIRTUAL TABLE temp.%Q USING %Q\x00INTARRAY\x00SQLITE_NOMEM\x00sqlite3_intarray_create\x00sqlite3_intarray_bind\x00jt\x00-journal\x00NBYTES\x00PRIOR NBYTES\x00bad pointer: \x00PRIOR\x00ADDRESS SIZE HEX\x00size must be positive\x00no data\x00ADDRESS SIZE\x00?RESET?\x00DEPT\x00FILENAME\x00COUNTER ?OPTIONS?\x00-repeat\x00-benigncnt\x00TITLE\x00SUB-COMMAND ...\x00start\x00stop\x00dump\x00clear\x00sync\x00SIZE N\x00INSTALLFLAG DISCARDCHANCE PRNGSEEED HIGHSTRESS\x00discard-chance should be between 0 and 100\x00BOOLEAN\x00SIZE COUNT\x00BUFID SIZE COUNT\x00illegal arguments - see documentation\x00NBYTE NMINALLOC\x00[DB]\x00sqlite3_db_config(db, 99999) does not return SQLITE_ERROR\x00sqlite3_config(99999) does not return SQLITE_ERROR\x00PARAMETER RESETFLAG\x00SQLITE_STATUS_MEMORY_USED\x00SQLITE_STATUS_MALLOC_SIZE\x00SQLITE_STATUS_PAGECACHE_USED\x00SQLITE_STATUS_PAGECACHE_OVERFLOW\x00SQLITE_STATUS_PAGECACHE_SIZE\x00SQLITE_STATUS_SCRATCH_USED\x00SQLITE_STATUS_SCRATCH_OVERFLOW\x00SQLITE_STATUS_SCRATCH_SIZE\x00SQLITE_STATUS_PARSER_STACK\x00SQLITE_STATUS_MALLOC_COUNT\x00DB PARAMETER RESETFLAG\x00SQLITE_\x00DBSTATUS_\x00LOOKASIDE_USED\x00CACHE_USED\x00SCHEMA_USED\x00STMT_USED\x00LOOKASIDE_HIT\x00LOOKASIDE_MISS_SIZE\x00LOOKASIDE_MISS_FULL\x00CACHE_HIT\x00CACHE_MISS\x00CACHE_WRITE\x00DEFERRED_FKS\x00CACHE_USED_SHARED\x00CACHE_SPILL\x00?INTEGER?\x00sqlite3_free\x00memset\x00memget\x00sqlite3_memory_used\x00sqlite3_memory_highwater\x00sqlite3_memdebug_backtrace\x00sqlite3_memdebug_dump\x00sqlite3_memdebug_fail\x00sqlite3_memdebug_pending\x00sqlite3_memdebug_settitle\x00sqlite3_memdebug_malloc_count\x00sqlite3_memdebug_log\x00sqlite3_config_pagecache\x00sqlite3_config_alt_pcache\x00sqlite3_status\x00sqlite3_db_status\x00install_malloc_faultsim\x00sqlite3_config_heap\x00sqlite3_config_heap_size\x00sqlite3_config_memstatus\x00sqlite3_config_lookaside\x00sqlite3_config_error\x00sqlite3_config_uri\x00sqlite3_config_cis\x00sqlite3_config_pmasz\x00sqlite3_db_config_lookaside\x00sqlite3_dump_memsys3\x00sqlite3_dump_memsys5\x00sqlite3_install_memsys3\x00sqlite3_memdebug_vfs_oom_test\x00%05u\x00 FILENAME [OFFSET AMT]\"\x00unable to open file \"\x00\" for reading\x00md5\x00md5-10x8\x00md5file\x00md5file-10x8\x00md5sum\x00%03d\x00multiplexor.xAccess failure on %s\x00multiplexor.xOpen failure on %s\x00multiplex_control\x00chunksize\x00multiplex_truncate\x00multiplex/%z\x00multiplex\x00NAME MAKEDEFAULT\x00-force\x00?-force?\x00enable\x00chunk_size\x00max_chunks\x00HANDLE DBNAME SUB-COMMAND INT-VALUE\x00expected database handle, got \"\x00SUB-COMMAND\x00sqlite3_multiplex_initialize\x00sqlite3_multiplex_shutdown\x00sqlite3_multiplex_control\x00fast\x00recursive\x00static_master\x00static_mem\x00static_open\x00static_prng\x00static_lru\x00static_pmem\x00static_app1\x00static_app2\x00static_app3\x00static_vfs1\x00static_vfs2\x00static_vfs3\x00mutex counters are \x00already installed\x00not installed\x00singlethread\x00multithread\x00serialized\x00mutex name\x00NAME\x00disable_mutex_init\x00disable_mutex_try\x00sqlite3_shutdown\x00sqlite3_initialize\x00sqlite3_config\x00enter_static_mutex\x00leave_static_mutex\x00enter_db_mutex\x00leave_db_mutex\x00alloc_dealloc_mutex\x00install_mutex_counters\x00read_mutex_counters\x00clear_mutex_counters\x00\x00\x00\x00\x00\x00\x00\x00vfslog/%z\x00sqlite_ostrace1.....\x00xClose\x00xRead\x00xWrite\x00xTruncate\x00xFilesize\x00xLock\x00xUnlock\x00xCheckResLock\x00xFileControl\x00xSectorSize\x00xDeviceChar\x00xDelete\x00xAccess\x00xFullPathname\x00xRandomness\x00xSleep\x00xCurrentTime\x00xShmUnmap\x00xShmLock\x00xShmBarrier\x00xShmMap\x00annotation\x00CREATE TABLE xxx(event, file, click, rc, size, offset)\x00vfslog\x00VFS\x00failed\x00VFS PARENT LOGFILE\x00bad sqlite3 handle: \x00annotate\x00finalize\x00new\x00register\x00quota/%z\x00quota\x00::piLimit_\x00PATTERN LIMIT SCRIPT\x00FILENAME MODE\x00HANDLE SIZE NELEM\x00HANDLE SIZE NELEM CONTENT\x00HANDLE ?HARDSYNC?\x00HANDLE OFFSET WHENCE\x00SEEK_SET\x00SEEK_CUR\x00SEEK_END\x00WHENCE should be SEEK_SET, SEEK_CUR, or SEEK_END\x00HANDLE SIZE\x00PATTERN TEXT\x00sqlite3_quota_initialize\x00sqlite3_quota_shutdown\x00sqlite3_quota_set\x00sqlite3_quota_file\x00sqlite3_quota_dump\x00sqlite3_quota_fopen\x00sqlite3_quota_fread\x00sqlite3_quota_fwrite\x00sqlite3_quota_fclose\x00sqlite3_quota_fflush\x00sqlite3_quota_fseek\x00sqlite3_quota_rewind\x00sqlite3_quota_ftell\x00sqlite3_quota_ftruncate\x00sqlite3_quota_file_size\x00sqlite3_quota_file_truesize\x00sqlite3_quota_file_mtime\x00sqlite3_quota_remove\x00sqlite3_quota_glob\x00sqlite3_quota_file_available\x00sqlite3_quota_ferror\x00register_cube_geom\x00register_circle_geom\x00CREATE TABLE x(database,tablename,cid,name,type,not_null,dflt_value,pk)\x00SELECT name FROM sqlite_temp_master WHERE type='table'\x00SELECT name FROM %Q.sqlite_master WHERE type='table'\x00PRAGMA %Q.table_info(%Q)\x00PRAGMA database_list\x00register_schema_module\x00PRAGMA main.journal_mode\x00CMDNAME PATH ?VFS? ?BUSY-HANDLER-SCRIPT?\x00sqlite3demo_superlock\x00open\x00access\x00getcwd\x00stat\x00fstat\x00ftruncate\x00fcntl\x00pread\x00pread64\x00pwrite\x00pwrite64\x00fchmod\x00fallocate\x00mremap\x00SYSCALL-LIST\x00system-call\x00?COUNT PERSIST?\x00EACCES\x00EINTR\x00EIO\x00EOVERFLOW\x00ENOMEM\x00EAGAIN\x00ETIMEDOUT\x00EBUSY\x00EPERM\x00EDEADLK\x00ENOLCK\x00SYSCALL ERRNO\x00errno\x00PGSZ\x00getpagesize\x00pgsz out of range\x00fault\x00install\x00uninstall\x00list\x00defaultvfs\x00pagesize\x00VFS does not support xSetSystemCall\x00test_syscall\x00load_testfixture_extensions\x00SLAVE\x00CREATE TABLE x( name TEXT, arrayname TEXT, value TEXT, fullname TEXT PRIMARY KEY) WITHOUT ROWID\x00array names\x00tclvar_filter_cmd\x00%s(%s)\x00expr {[info exists ::tclvar_set_omit] && $::tclvar_set_omit}\x00the 'fullname' column must be TEXT\x00prohibited TCL variable change\x00proc like {pattern str} {\n set p [string map {% * _ ?} $pattern]\n string match $p $str\n}\nproc tclvar_filter_cmd {eq match glob regexp like} {\n set res {}\n set pattern $eq\n if {$pattern=={}} { set pattern $match }\n if {$pattern=={}} { set pattern * }\n foreach v [uplevel #0 info vars $pattern] {\n if {($glob=={} || [string match $glob [uplevel #0 set $v]])\n && ($like=={} || [like $like [uplevel #0 set $v]])\n && ($regexp=={} || [regexp $regexp [uplevel #0 set $v]])\n } {\n lappend res $v\n }\n }\n set res\n}\n\x00register_tclvar_module\x00clock_seconds\x00sqlthread\x00sqlite3_blocking_step\x00sqlite3_blocking_prepare_v2\x00sqlite3_nonblocking_prepare_v2\x00error\x00set\x00Error in Tcl_CreateThread()\x00no parent thread\x00parent\x00spawn\x00VARNAME SCRIPT\x00DBNAME\x00id\x00%s \x00SQLITE_ERROR\x00SQLITE_IOERR\x00SQLITE_LOCKED\x00SQLITE_BUSY\x00SQLITE_READONLY\x00SQLITE_READONLY_CANTINIT\x00SQLITE_NOTFOUND\x00SQLITE_OMIT\x00normal|dataonly\x00full|dataonly\x00xCheckReservedLock\x00BEGIN_ATOMIC_WRITE\x00COMMIT_ATOMIC_WRITE\x00ZIPVFS\x00anon\x00SQLITE_ACCESS_EXISTS\x00SQLITE_ACCESS_READWRITE\x00SQLITE_ACCESS_READ\x00xShmOpen\x00 lock\x00 unlock\x00 shared\x00 exclusive\x00shm\x00delete\x00filter\x00ioerr\x00fullerr\x00cantopenerr\x00script\x00devchar\x00sectorsize\x00subcommand\x00FILE ?VALUE?\x00failed to get full path: \x00no such file: \x00unknown method: \x00?CNT PERSIST?\x00default\x00undeletable_when_open\x00immutable\x00?ATTR-LIST?\x00bad flags: \x00?VALUE?\x00-noshm\x00-szosfile\x00-mxpathname\x00-iversion\x00-fullshm\x00VFSNAME ?-noshm BOOL? ?-fullshm BOOL? ?-default BOOL? ?-mxpathname INT? ?-szosfile INT? ?-iversion INT?\x00shared\x00lock\x00unlock\x00DB DBNAME (shared|exclusive) (lock|unlock) OFFSET N\x00ARG\x00DB DBNAME SLOT ?VALUE?\x00*-shm is not yet mapped\x00testvfs\x00vfs_shmlock\x00vfs_set_readmark\x00DB NAME XSTEP XFINAL XVALUE XINVERSE\x00fff\x00misuse test error\x00invalid argument\x00sumint\x00sum\x00sqlite3_create_window_function\x00test_create_window_function_misuse\x00test_create_sumint\x00test_override_sum\x00" var ts = (*reflect.StringHeader)(unsafe.Pointer(&ts1)).Data |